diff --git a/BUILDME.sh b/BUILDME.sh index 1b90c7d1e..c879a0a3b 100755 --- a/BUILDME.sh +++ b/BUILDME.sh @@ -7,7 +7,7 @@ KERNEL="4.19" # Final directory where NOOBS files will be copied to NOOBS_OUTPUT_DIR="output" -export QT_SELECT=4 +export QT_SELECT=5 function get_package_version { PACKAGE=$1 @@ -51,7 +51,7 @@ function update_github_package_version { function get_kernel_version { CONFIG_FILE=.config - CONFIG_VAR=BR2_LINUX_KERNEL_VERSION + CONFIG_VAR=BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION grep -E "^$CONFIG_VAR=\".+\"$" "$CONFIG_FILE" | tr -d '"' | cut -d= -f2 } @@ -76,8 +76,6 @@ function update_github_kernel_version { else CONFIG_VAR=BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION sed -ri "s/(^$CONFIG_VAR=\")[0-9a-f]+(\")$/\1$GITREV\2/" "$CONFIG_FILE" - CONFIG_VAR=BR2_LINUX_KERNEL_VERSION - sed -ri "s/(^$CONFIG_VAR=\")[0-9a-f]+(\")$/\1$GITREV\2/" "$CONFIG_FILE" echo "$PACKAGE ($BRANCH) updated to version $GITREV" fi fi @@ -246,6 +244,10 @@ if [ $SKIP_KERNEL_REBUILD -ne 1 ]; then echo "Warning: kernel armv6 in '$NOOBS_OUTPUT_DIR' directory hasn't been updated" fi + # Fix for modular kernel: Force recreation of rootfs image to include modules + rm "$IMAGES_DIR/rootfs.squashfs" + make + else echo "Warning: kernels in '$NOOBS_OUTPUT_DIR' directory haven't been updated" fi diff --git a/buildroot/.config b/buildroot/.config index 8274313c1..158cfdf54 100644 --- a/buildroot/.config +++ b/buildroot/.config @@ -1,34 +1,48 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2015.02-git-dirty Configuration +# Buildroot 2020.08-rc2 Configuration # BR2_HAVE_DOT_CONFIG=y +BR2_HOST_GCC_AT_LEAST_4_9=y +BR2_HOST_GCC_AT_LEAST_5=y +BR2_HOST_GCC_AT_LEAST_6=y +BR2_HOST_GCC_AT_LEAST_7=y +BR2_HOST_GCC_AT_LEAST_8=y +BR2_HOST_GCC_AT_LEAST_9=y +BR2_NEEDS_HOST_UTF8_LOCALE=y # # Target options # +BR2_ARCH_HAS_MMU_OPTIONAL=y # BR2_arcle is not set # BR2_arceb is not set BR2_arm=y # BR2_armeb is not set # BR2_aarch64 is not set -# BR2_bfin is not set +# BR2_aarch64_be is not set +# BR2_csky is not set # BR2_i386 is not set +# BR2_m68k is not set # BR2_microblazeel is not set # BR2_microblazebe is not set # BR2_mips is not set # BR2_mipsel is not set # BR2_mips64 is not set # BR2_mips64el is not set +# BR2_nds32 is not set # BR2_nios2 is not set +# BR2_or1k is not set # BR2_powerpc is not set # BR2_powerpc64 is not set # BR2_powerpc64le is not set +# BR2_riscv is not set # BR2_sh is not set -# BR2_sh64 is not set # BR2_sparc is not set +# BR2_sparc64 is not set # BR2_x86_64 is not set # BR2_xtensa is not set +BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT=y BR2_ARCH="arm" BR2_ENDIAN="LITTLE" BR2_GCC_TARGET_ABI="aapcs-linux" @@ -36,37 +50,100 @@ BR2_GCC_TARGET_CPU="arm1176jzf-s" BR2_GCC_TARGET_FPU="vfp" BR2_GCC_TARGET_FLOAT_ABI="softfp" BR2_GCC_TARGET_MODE="arm" -BR2_ARCH_HAS_ATOMICS=y BR2_BINFMT_SUPPORTS_SHARED=y +BR2_READELF_ARCH_NAME="ARM" BR2_BINFMT_ELF=y +BR2_ARM_CPU_HAS_FPU=y BR2_ARM_CPU_HAS_VFPV2=y +BR2_ARM_CPU_HAS_ARM=y BR2_ARM_CPU_HAS_THUMB=y BR2_ARM_CPU_ARMV6=y + +# +# armv4 cores +# # BR2_arm920t is not set # BR2_arm922t is not set +# BR2_fa526 is not set +# BR2_strongarm is not set + +# +# armv5 cores +# # BR2_arm926t is not set +# BR2_iwmmxt is not set +# BR2_xscale is not set + +# +# armv6 cores +# +# BR2_arm1136j_s is not set # BR2_arm1136jf_s is not set # BR2_arm1176jz_s is not set BR2_arm1176jzf_s=y +# BR2_arm11mpcore is not set + +# +# armv7a cores +# # BR2_cortex_a5 is not set # 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_fa526 is not set +# BR2_cortex_a15_a7 is not set +# BR2_cortex_a17 is not set +# BR2_cortex_a17_a7 is not set # BR2_pj4 is not set -# BR2_strongarm is not set -# BR2_xscale is not set -# BR2_iwmmxt is not set + +# +# armv7m cores +# +# BR2_cortex_m3 is not set +# BR2_cortex_m4 is not set +# BR2_cortex_m7 is not set + +# +# armv8 cores +# +# BR2_cortex_a32 is not set +# BR2_cortex_a35 is not set +# BR2_cortex_a53 is not set +# BR2_cortex_a57 is not set +# BR2_cortex_a57_a53 is not set +# BR2_cortex_a72 is not set +# BR2_cortex_a72_a53 is not set +# BR2_cortex_a73 is not set +# BR2_cortex_a73_a35 is not set +# BR2_cortex_a73_a53 is not set +# BR2_exynos_m1 is not set +# BR2_xgene1 is not set + +# +# armv8.1a cores +# + +# +# armv8.2a cores +# +# BR2_cortex_a76 is not set +# BR2_cortex_a76_a55 is not set +# BR2_neoverse_n1 is not set + +# +# armv8.4a cores +# BR2_ARM_EABI=y # BR2_ARM_EABIHF is not set # BR2_ARM_SOFT_FLOAT is not set BR2_ARM_FPU_VFPV2=y -BR2_ARM_INSTRUCTIONS_ARM_CHOICE=y -# BR2_ARM_INSTRUCTIONS_THUMB is not set BR2_ARM_INSTRUCTIONS_ARM=y +# +# Thumb1 is not compatible with VFP +# + # # Build options # @@ -75,17 +152,17 @@ BR2_ARM_INSTRUCTIONS_ARM=y # Commands # BR2_WGET="wget --passive-ftp -nd -t 3" -BR2_SVN="svn" +BR2_SVN="svn --non-interactive" BR2_BZR="bzr" BR2_GIT="git" BR2_CVS="cvs" BR2_LOCALFILES="cp" BR2_SCP="scp" -BR2_SSH="ssh" BR2_HG="hg" BR2_ZCAT="gzip -d -c" BR2_BZCAT="bzcat" BR2_XZCAT="xzcat" +BR2_LZCAT="lzip -d -c" BR2_TAR_OPTIONS="" BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig" BR2_DL_DIR="$(TOPDIR)/dl" @@ -96,29 +173,27 @@ BR2_HOST_DIR="$(BASE_DIR)/host" # BR2_PRIMARY_SITE="" BR2_BACKUP_SITE="http://sources.buildroot.net" -BR2_KERNEL_MIRROR="https://www.kernel.org/pub" -BR2_GNU_MIRROR="http://ftp.gnu.org/pub/gnu" +BR2_KERNEL_MIRROR="https://cdn.kernel.org/pub" +BR2_GNU_MIRROR="http://ftpmirror.gnu.org" BR2_LUAROCKS_MIRROR="http://rocks.moonscript.org" BR2_CPAN_MIRROR="http://cpan.metacpan.org" BR2_JLEVEL=0 BR2_CCACHE=y BR2_CCACHE_DIR="$(HOME)/.buildroot-ccache" BR2_CCACHE_INITIAL_SETUP="" -# BR2_DEPRECATED is not set +BR2_CCACHE_USE_BASEDIR=y # BR2_ENABLE_DEBUG is not set BR2_STRIP_strip=y -# BR2_STRIP_none is not set BR2_STRIP_EXCLUDE_FILES="" BR2_STRIP_EXCLUDE_DIRS="" # BR2_OPTIMIZE_0 is not set # BR2_OPTIMIZE_1 is not set # BR2_OPTIMIZE_2 is not set # BR2_OPTIMIZE_3 is not set +# BR2_OPTIMIZE_G is not set BR2_OPTIMIZE_S=y - -# -# enabling Stack Smashing Protection requires support in the toolchain -# +# BR2_OPTIMIZE_FAST is not set +# BR2_GOOGLE_BREAKPAD_ENABLE is not set # BR2_STATIC_LIBS is not set BR2_SHARED_LIBS=y # BR2_SHARED_STATIC_LIBS is not set @@ -129,6 +204,25 @@ BR2_GLOBAL_PATCH_DIR="" # Advanced # BR2_COMPILER_PARANOID_UNSAFE_PATH=y +# BR2_FORCE_HOST_BUILD is not set +# BR2_REPRODUCIBLE is not set +# BR2_PER_PACKAGE_DIRECTORIES is not set + +# +# Security Hardening Options +# +# BR2_PIC_PIE is not set + +# +# Stack Smashing Protection needs a toolchain w/ SSP +# +BR2_RELRO_NONE=y +# BR2_RELRO_PARTIAL is not set +# BR2_RELRO_FULL is not set + +# +# Fortify Source needs a glibc toolchain and optimization +# # # Toolchain @@ -137,87 +231,141 @@ BR2_TOOLCHAIN=y BR2_TOOLCHAIN_USES_UCLIBC=y BR2_TOOLCHAIN_BUILDROOT=y # BR2_TOOLCHAIN_EXTERNAL is not set -BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot" # -# Kernel Header Options +# Toolchain Buildroot Options # -# BR2_KERNEL_HEADERS_3_2 is not set -# BR2_KERNEL_HEADERS_3_4 is not set -# BR2_KERNEL_HEADERS_3_10 is not set -# BR2_KERNEL_HEADERS_3_12 is not set -# BR2_KERNEL_HEADERS_3_14 is not set -# BR2_KERNEL_HEADERS_3_17 is not set -BR2_KERNEL_HEADERS_3_18=y -# BR2_KERNEL_HEADERS_VERSION is not set -BR2_DEFAULT_KERNEL_HEADERS="3.18.5" +BR2_TOOLCHAIN_BUILDROOT_VENDOR="buildroot" BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y -# BR2_TOOLCHAIN_BUILDROOT_EGLIBC is not set # BR2_TOOLCHAIN_BUILDROOT_GLIBC is not set # BR2_TOOLCHAIN_BUILDROOT_MUSL is not set BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc" -BR2_PACKAGE_UCLIBC=y + +# +# Kernel Header Options +# +BR2_KERNEL_HEADERS_AS_KERNEL=y +# BR2_KERNEL_HEADERS_4_4 is not set +# BR2_KERNEL_HEADERS_4_9 is not set +# BR2_KERNEL_HEADERS_4_14 is not set +# BR2_KERNEL_HEADERS_4_19 is not set +# BR2_KERNEL_HEADERS_5_4 is not set +# BR2_KERNEL_HEADERS_5_7 is not set +# BR2_KERNEL_HEADERS_VERSION is not set +# BR2_KERNEL_HEADERS_CUSTOM_TARBALL is not set +# BR2_KERNEL_HEADERS_CUSTOM_GIT is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_5 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_2 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20 is not set +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_16 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_12 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_10 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_7 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_2 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0 is not set +# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD is not set +BR2_PACKAGE_LINUX_HEADERS=y # # uClibc Options # -BR2_UCLIBC_VERSION_0_9_33=y -# BR2_UCLIBC_VERSION_SNAPSHOT is not set -BR2_UCLIBC_VERSION_STRING="0.9.33.2" -BR2_UCLIBC_CONFIG="package/uclibc/uClibc-0.9.33.config" -BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y -# BR2_TOOLCHAIN_BUILDROOT_INET_IPV6 is not set -# BR2_TOOLCHAIN_BUILDROOT_INET_RPC is not set +BR2_PACKAGE_UCLIBC=y +BR2_UCLIBC_CONFIG="package/uclibc/uClibc-ng.config" +BR2_UCLIBC_CONFIG_FRAGMENT_FILES="" BR2_TOOLCHAIN_BUILDROOT_WCHAR=y -# BR2_TOOLCHAIN_BUILDROOT_LOCALE is not set -# BR2_PTHREADS_NONE is not set -# BR2_PTHREADS is not set -# BR2_PTHREADS_OLD is not set +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y BR2_PTHREADS_NATIVE=y +# BR2_PTHREADS is not set +# BR2_PTHREADS_NONE is not set # BR2_PTHREAD_DEBUG is not set # BR2_TOOLCHAIN_BUILDROOT_USE_SSP is not set BR2_UCLIBC_INSTALL_UTILS=y -# BR2_UCLIBC_INSTALL_TEST_SUITE is not set BR2_UCLIBC_TARGET_ARCH="arm" -BR2_UCLIBC_ARM_BX=y # # Binutils Options # -# BR2_BINUTILS_VERSION_2_22 is not set -# BR2_BINUTILS_VERSION_2_23_2 is not set -BR2_BINUTILS_VERSION_2_24=y -# BR2_BINUTILS_VERSION_2_25 is not set -BR2_BINUTILS_VERSION="2.24" +BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI=y +# BR2_BINUTILS_VERSION_2_32_X is not set +# BR2_BINUTILS_VERSION_2_33_X is not set +BR2_BINUTILS_VERSION_2_34_X=y +BR2_BINUTILS_VERSION="2.34" BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="" # # GCC Options # -BR2_GCC_NEEDS_MPC=y -BR2_GCC_SUPPORTS_GRAPHITE=y -# BR2_GCC_VERSION_4_5_X is not set -# BR2_GCC_VERSION_4_7_X is not set -BR2_GCC_VERSION_4_8_X=y -# BR2_GCC_VERSION_4_9_X is not set -BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE=y -BR2_GCC_VERSION="4.8.4" +# BR2_GCC_VERSION_7_X is not set +# BR2_GCC_VERSION_8_X is not set +# BR2_GCC_VERSION_9_X is not set +BR2_GCC_VERSION_10_X=y +BR2_GCC_VERSION="10.2.0" BR2_EXTRA_GCC_CONFIG_OPTIONS="" BR2_TOOLCHAIN_BUILDROOT_CXX=y -BR2_GCC_ENABLE_TLS=y +# BR2_TOOLCHAIN_BUILDROOT_FORTRAN is not set +# BR2_GCC_ENABLE_LTO is not set # BR2_GCC_ENABLE_OPENMP is not set -# BR2_GCC_ENABLE_LIBMUDFLAP is not set # BR2_GCC_ENABLE_GRAPHITE is not set +BR2_PACKAGE_HOST_GDB_ARCH_SUPPORTS=y + +# +# Host GDB Options +# # BR2_PACKAGE_HOST_GDB is not set -BR2_LARGEFILE=y + +# +# Toolchain Generic Options +# +BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS=y +BR2_TOOLCHAIN_SUPPORTS_VARIADIC_MI_THUNK=y BR2_USE_WCHAR=y +BR2_ENABLE_LOCALE=y BR2_INSTALL_LIBSTDCPP=y BR2_TOOLCHAIN_HAS_THREADS=y BR2_TOOLCHAIN_HAS_THREADS_NPTL=y -BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS=y -BR2_ENABLE_LOCALE_PURGE=y -BR2_ENABLE_LOCALE_WHITELIST="C" -BR2_NEEDS_GETTEXT=y +BR2_TOOLCHAIN_HAS_UCONTEXT=y +BR2_TOOLCHAIN_SUPPORTS_PIE=y +BR2_TOOLCHAIN_EXTRA_LIBS="" BR2_USE_MMU=y BR2_TARGET_OPTIMIZATION="" BR2_TARGET_LDFLAGS="" @@ -241,158 +389,247 @@ BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15=y BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16=y BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17=y BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18=y -BR2_TOOLCHAIN_HEADERS_AT_LEAST="3.18" +BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_10=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_16=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_17=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_18=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19=y +BR2_TOOLCHAIN_HEADERS_AT_LEAST="4.19" +BR2_TOOLCHAIN_GCC_AT_LEAST_4_3=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_4=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_5=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_6=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_7=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_8=y +BR2_TOOLCHAIN_GCC_AT_LEAST_4_9=y +BR2_TOOLCHAIN_GCC_AT_LEAST_5=y +BR2_TOOLCHAIN_GCC_AT_LEAST_6=y +BR2_TOOLCHAIN_GCC_AT_LEAST_7=y +BR2_TOOLCHAIN_GCC_AT_LEAST_8=y +BR2_TOOLCHAIN_GCC_AT_LEAST_9=y +BR2_TOOLCHAIN_GCC_AT_LEAST_10=y +BR2_TOOLCHAIN_GCC_AT_LEAST="10" +BR2_TOOLCHAIN_HAS_MNAN_OPTION=y +BR2_TOOLCHAIN_HAS_SYNC_1=y +BR2_TOOLCHAIN_HAS_SYNC_2=y +BR2_TOOLCHAIN_HAS_SYNC_4=y +BR2_TOOLCHAIN_HAS_LIBATOMIC=y +BR2_TOOLCHAIN_HAS_ATOMIC=y # # System configuration # +BR2_ROOTFS_SKELETON_DEFAULT=y +# BR2_ROOTFS_SKELETON_CUSTOM is not set BR2_TARGET_GENERIC_HOSTNAME="recovery" -BR2_TARGET_GENERIC_ISSUE="Welcome to the rescue system" -# BR2_TARGET_GENERIC_PASSWD_DES is not set -BR2_TARGET_GENERIC_PASSWD_MD5=y -# BR2_TARGET_GENERIC_PASSWD_SHA256 is not set +BR2_TARGET_GENERIC_ISSUE="Welcome to PINN" +BR2_TARGET_GENERIC_PASSWD_SHA256=y # BR2_TARGET_GENERIC_PASSWD_SHA512 is not set -BR2_TARGET_GENERIC_PASSWD_METHOD="md5" +BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256" BR2_INIT_BUSYBOX=y # BR2_INIT_SYSV is not set +# BR2_INIT_OPENRC is not set # -# systemd needs an (e)glibc toolchain, headers >= 3.7 +# systemd needs a glibc toolchain w/ SSP, headers >= 3.10, host and target gcc >= 5 # # BR2_INIT_NONE is not set # BR2_ROOTFS_DEVICE_CREATION_STATIC is not set -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y +# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS is not set # BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set -# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt" -BR2_ROOTFS_SKELETON_DEFAULT=y -# BR2_ROOTFS_SKELETON_CUSTOM is not set +# BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is not set +# BR2_ROOTFS_MERGED_USR is not set +BR2_TARGET_ENABLE_ROOT_LOGIN=y BR2_TARGET_GENERIC_ROOT_PASSWD="raspberry" BR2_SYSTEM_BIN_SH_BUSYBOX=y # BR2_SYSTEM_BIN_SH_BASH is not set # BR2_SYSTEM_BIN_SH_DASH is not set +# BR2_SYSTEM_BIN_SH_MKSH is not set # BR2_SYSTEM_BIN_SH_ZSH is not set # BR2_SYSTEM_BIN_SH_NONE is not set -BR2_SYSTEM_BIN_SH="/bin/busybox" BR2_TARGET_GENERIC_GETTY=y - -# -# getty options -# -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" -# BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP is not set +BR2_TARGET_GENERIC_GETTY_PORT="console" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP=y # BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 is not set # BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 is not set # BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 is not set # BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 is not set -BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y -BR2_TARGET_GENERIC_GETTY_BAUDRATE="115200" +# BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 is not set +BR2_TARGET_GENERIC_GETTY_BAUDRATE="0" BR2_TARGET_GENERIC_GETTY_TERM="vt100" BR2_TARGET_GENERIC_GETTY_OPTIONS="" BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y +BR2_SYSTEM_DHCP="" +BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" +BR2_ENABLE_LOCALE_PURGE=y +BR2_ENABLE_LOCALE_WHITELIST="C en_US" +BR2_GENERATE_LOCALE="" +# BR2_SYSTEM_ENABLE_NLS is not set # BR2_TARGET_TZ_INFO is not set BR2_ROOTFS_USERS_TABLES="" BR2_ROOTFS_OVERLAY="" -BR2_ROOTFS_POST_BUILD_SCRIPT="package/recovery/cleanup.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="" +BR2_ROOTFS_POST_FAKEROOT_SCRIPT="" BR2_ROOTFS_POST_IMAGE_SCRIPT="" -BR2_ROOTFS_POST_SCRIPT_ARGS="" # # Kernel # BR2_LINUX_KERNEL=y # BR2_LINUX_KERNEL_LATEST_VERSION is not set -# BR2_LINUX_KERNEL_SAME_AS_HEADERS is not set +# BR2_LINUX_KERNEL_LATEST_CIP_VERSION is not set +# BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION is not set # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set # BR2_LINUX_KERNEL_CUSTOM_TARBALL is not set BR2_LINUX_KERNEL_CUSTOM_GIT=y # BR2_LINUX_KERNEL_CUSTOM_HG is not set -# BR2_LINUX_KERNEL_CUSTOM_LOCAL is not set -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="f16e91dad2af9d57aef477cc1f522040353849f5" -BR2_LINUX_KERNEL_VERSION="f16e91dad2af9d57aef477cc1f522040353849f5" +# BR2_LINUX_KERNEL_CUSTOM_SVN is not set +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="cc39f1c9f82f6fe5a437836811d906c709e0661c" +BR2_LINUX_KERNEL_VERSION="cc39f1c9f82f6fe5a437836811d906c709e0661c" BR2_LINUX_KERNEL_PATCH="" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set +# BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is not set BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="kernelconfig-recovery.armv6" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="" +BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH="" # BR2_LINUX_KERNEL_UIMAGE is not set # BR2_LINUX_KERNEL_APPENDED_UIMAGE is not set BR2_LINUX_KERNEL_ZIMAGE=y # BR2_LINUX_KERNEL_APPENDED_ZIMAGE is not set # BR2_LINUX_KERNEL_VMLINUX is not set # BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM is not set +BR2_LINUX_KERNEL_GZIP=y +# BR2_LINUX_KERNEL_LZ4 is not set +# BR2_LINUX_KERNEL_LZMA is not set +# BR2_LINUX_KERNEL_LZO is not set +# BR2_LINUX_KERNEL_XZ is not set BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_USE_INTREE_DTS=y -# BR2_LINUX_KERNEL_USE_CUSTOM_DTS is not set +BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT=y +BR_LINUX_KERNEL_RPI=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="" +# BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME is not set +# BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT is not set # BR2_LINUX_KERNEL_INSTALL_TARGET is not set +# BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL is not set +# BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF is not set # # Linux Kernel Extensions # # BR2_LINUX_KERNEL_EXT_XENOMAI is not set # BR2_LINUX_KERNEL_EXT_RTAI is not set +# BR2_LINUX_KERNEL_EXT_EV3DEV_LINUX_DRIVERS is not set # BR2_LINUX_KERNEL_EXT_FBTFT is not set +# BR2_LINUX_KERNEL_EXT_AUFS is not set + +# +# Linux Kernel Tools +# +# BR2_PACKAGE_LINUX_TOOLS_CPUPOWER is not set +# BR2_PACKAGE_LINUX_TOOLS_GPIO is not set +# BR2_PACKAGE_LINUX_TOOLS_IIO is not set +# BR2_PACKAGE_LINUX_TOOLS_PCI is not set +# BR2_PACKAGE_LINUX_TOOLS_PERF is not set +# BR2_PACKAGE_LINUX_TOOLS_SELFTESTS is not set +# BR2_PACKAGE_LINUX_TOOLS_TMON is not set # # Target packages # BR2_PACKAGE_BUSYBOX=y BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="" BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +# BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES is not set # BR2_PACKAGE_BUSYBOX_WATCHDOG is not set -BR2_PACKAGE_ARORA=y -BR2_PACKAGE_P7ZIP=y -BR2_PACKAGE_PARTCLONE=y -BR2_PACKAGE_RECOVERY=y -BR2_PACKAGE_REBOOTP=y -BR2_PACKAGE_RPI_WIFI_FIRMWARE=y -BR2_PACKAGE_PIGZ=y +BR2_PACKAGE_SKELETON=y +BR2_PACKAGE_HAS_SKELETON=y +BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" +BR2_PACKAGE_SKELETON_INIT_COMMON=y +BR2_PACKAGE_SKELETON_INIT_SYSV=y # # Audio and video applications # # BR2_PACKAGE_ALSA_UTILS is not set +# BR2_PACKAGE_ATEST is not set # BR2_PACKAGE_AUMIX is not set # BR2_PACKAGE_BELLAGIO is not set BR2_PACKAGE_PROVIDES_LIBOPENMAX="rpi-userland" +# BR2_PACKAGE_BLUEZ_ALSA is not set +# BR2_PACKAGE_DVBLAST is not set # BR2_PACKAGE_DVDAUTHOR is not set +# BR2_PACKAGE_DVDRW_TOOLS is not set # BR2_PACKAGE_ESPEAK is not set # BR2_PACKAGE_FAAD2 is not set - -# -# ffmpeg needs a toolchain w/ largefile, IPv6 -# +BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS=y +# BR2_PACKAGE_FFMPEG is not set # BR2_PACKAGE_FLAC is not set # BR2_PACKAGE_FLITE is not set -# BR2_PACKAGE_GSTREAMER is not set +# BR2_PACKAGE_FLUID_SOUNDFONT is not set +# BR2_PACKAGE_FLUIDSYNTH is not set +# BR2_PACKAGE_GMRENDER_RESURRECT is not set # BR2_PACKAGE_GSTREAMER1 is not set +# BR2_PACKAGE_JACK1 is not set # BR2_PACKAGE_JACK2 is not set BR2_PACKAGE_KODI_ARCH_SUPPORTS=y # -# kodi needs a toolchain w/ C++, IPv6, largefile, threads, wchar +# kodi needs python w/ .py modules, a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 4.8 # -BR2_PACKAGE_KODI_EGL_GLES=y +BR2_PACKAGE_KODI_PLATFORM_SUPPORTS=y +BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_RBPI=y # BR2_PACKAGE_LAME is not set -# BR2_PACKAGE_LIBVPX is not set # BR2_PACKAGE_MADPLAY is not set +# BR2_PACKAGE_MIMIC is not set +# BR2_PACKAGE_MINIMODEM is not set + +# +# miraclecast needs systemd and a glibc toolchain w/ threads and wchar +# +# BR2_PACKAGE_MJPEGTOOLS is not set # BR2_PACKAGE_MODPLUGTOOLS is not set +# BR2_PACKAGE_MOTION is not set # BR2_PACKAGE_MPD is not set # BR2_PACKAGE_MPD_MPC is not set # BR2_PACKAGE_MPG123 is not set -# BR2_PACKAGE_MPLAYER is not set +# BR2_PACKAGE_MPV is not set +# BR2_PACKAGE_MULTICAT is not set # BR2_PACKAGE_MUSEPACK is not set # BR2_PACKAGE_NCMPC is not set +# BR2_PACKAGE_OMXPLAYER is not set # BR2_PACKAGE_OPUS_TOOLS is not set +BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC=y # BR2_PACKAGE_PULSEAUDIO is not set # BR2_PACKAGE_SOX is not set +# BR2_PACKAGE_SQUEEZELITE is not set # BR2_PACKAGE_TSTOOLS is not set # BR2_PACKAGE_TWOLAME is not set +# BR2_PACKAGE_UDPXY is not set # BR2_PACKAGE_UPMPDCLI is not set - -# -# vlc needs a uclibc snapshot or (e)glibc toolchain w/ C++, largefile, wchar, threads -# +# BR2_PACKAGE_V4L2GRAB is not set +# BR2_PACKAGE_V4L2LOOPBACK is not set +# BR2_PACKAGE_VLC is not set # BR2_PACKAGE_VORBIS_TOOLS is not set # BR2_PACKAGE_WAVPACK is not set # BR2_PACKAGE_YAVTA is not set @@ -401,168 +638,251 @@ BR2_PACKAGE_KODI_EGL_GLES=y # # Compressors and decompressors # +# BR2_PACKAGE_BROTLI is not set # BR2_PACKAGE_BZIP2 is not set # BR2_PACKAGE_GZIP is not set -# BR2_PACKAGE_INFOZIP is not set -# BR2_PACKAGE_LZ4 is not set +# BR2_PACKAGE_LRZIP is not set # BR2_PACKAGE_LZIP is not set # BR2_PACKAGE_LZOP is not set +BR2_PACKAGE_P7ZIP=y +BR2_PACKAGE_PIGZ=y +# BR2_PACKAGE_PIXZ is not set +# BR2_PACKAGE_UNRAR is not set +# BR2_PACKAGE_UNZIP is not set BR2_PACKAGE_XZ=y +# BR2_PACKAGE_ZIP is not set +# BR2_PACKAGE_ZSTD is not set # # Debugging, profiling and benchmark # +# BR2_PACKAGE_BLKTRACE is not set +# BR2_PACKAGE_BONNIE is not set +# BR2_PACKAGE_CACHE_CALIBRATOR is not set # -# blktrace needs a (e)glibc or musl toolchain +# clinfo needs an OpenCL provider +# + +# +# dacapo needs OpenJDK # -# BR2_PACKAGE_BONNIE is not set -# BR2_PACKAGE_CACHE_CALIBRATOR is not set # BR2_PACKAGE_DHRYSTONE is not set +# BR2_PACKAGE_DIEHARDER is not set # BR2_PACKAGE_DMALLOC is not set # BR2_PACKAGE_DROPWATCH is not set # BR2_PACKAGE_DSTAT is not set +# BR2_PACKAGE_DT is not set # BR2_PACKAGE_DUMA is not set # BR2_PACKAGE_FIO is not set +BR2_PACKAGE_GDB_ARCH_SUPPORTS=y # # gdb/gdbserver needs a toolchain w/ threads, threads debug # BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y - -# -# google-breakpad requires an (e)glibc toolchain w/ C++ enabled -# +# BR2_PACKAGE_GOOGLE_BREAKPAD is not set # BR2_PACKAGE_IOZONE is not set # BR2_PACKAGE_KEXEC is not set # BR2_PACKAGE_KTAP is not set # BR2_PACKAGE_LATENCYTOP is not set # BR2_PACKAGE_LMBENCH is not set # BR2_PACKAGE_LSOF is not set - -# -# ltp-testsuite needs a toolchain w/ IPv6, RPC, largefile, threads -# +BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS=y +# BR2_PACKAGE_LTP_TESTSUITE is not set +BR2_PACKAGE_LTRACE_ARCH_SUPPORTS=y # BR2_PACKAGE_LTRACE is not set - -# -# lttng-babeltrace needs a uclibc snapshot or (e)glib toolchain w/ wchar, threads, largefile -# +# BR2_PACKAGE_LTTNG_BABELTRACE is not set # BR2_PACKAGE_LTTNG_MODULES is not set # BR2_PACKAGE_LTTNG_TOOLS is not set # BR2_PACKAGE_MEMSTAT is not set # BR2_PACKAGE_NETPERF is not set +# BR2_PACKAGE_NETSNIFF_NG is not set + +# +# nmon needs a glibc toolchain +# +BR2_PACKAGE_OPROFILE_ARCH_SUPPORTS=y # BR2_PACKAGE_OPROFILE is not set # BR2_PACKAGE_PAX_UTILS is not set -# BR2_PACKAGE_PERF is not set + +# +# piglit needs glibc or musl +# +BR2_PACKAGE_PTM2HUMAN_ARCH_SUPPORTS=y +# BR2_PACKAGE_PTM2HUMAN is not set # BR2_PACKAGE_PV is not set # BR2_PACKAGE_RAMSMP is not set # BR2_PACKAGE_RAMSPEED is not set -# BR2_PACKAGE_RT_TESTS is not set # BR2_PACKAGE_SPIDEV_TEST is not set # BR2_PACKAGE_STRACE is not set # BR2_PACKAGE_STRESS is not set +# BR2_PACKAGE_STRESS_NG is not set + +# +# sysdig needs a glibc or uclibc toolchain w/ C++, threads, gcc >= 4.8, dynamic library, a Linux kernel, and luajit or lua 5.1 to be built +# +# BR2_PACKAGE_TCF_AGENT is not set +BR2_PACKAGE_TCF_AGENT_ARCH="arm" +BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS=y # BR2_PACKAGE_TINYMEMBENCH is not set # BR2_PACKAGE_TRACE_CMD is not set +BR2_PACKAGE_TRINITY_ARCH_SUPPORTS=y # BR2_PACKAGE_TRINITY is not set +# BR2_PACKAGE_UCLIBC_NG_TEST is not set +# BR2_PACKAGE_VMTOUCH is not set # BR2_PACKAGE_WHETSTONE is not set # # Development tools # # BR2_PACKAGE_BINUTILS is not set +# BR2_PACKAGE_BITWISE is not set # BR2_PACKAGE_BSDIFF is not set # BR2_PACKAGE_BUSTLE is not set +# BR2_PACKAGE_CHECK is not set +BR2_PACKAGE_CMAKE_ARCH_SUPPORTS=y +# BR2_PACKAGE_CMAKE_CTEST is not set # BR2_PACKAGE_CPPUNIT is not set +# BR2_PACKAGE_CUNIT is not set # BR2_PACKAGE_CVS is not set +# BR2_PACKAGE_CXXTEST is not set # BR2_PACKAGE_DIFFUTILS is not set +# BR2_PACKAGE_DOS2UNIX is not set # BR2_PACKAGE_FINDUTILS is not set # BR2_PACKAGE_FLEX is not set # BR2_PACKAGE_GAWK is not set # BR2_PACKAGE_GETTEXT is not set +BR2_PACKAGE_PROVIDES_HOST_GETTEXT="host-gettext-tiny" # BR2_PACKAGE_GIT is not set +# BR2_PACKAGE_GIT_CRYPT is not set # BR2_PACKAGE_GPERF is not set # BR2_PACKAGE_GREP is not set +# BR2_PACKAGE_JO is not set # BR2_PACKAGE_JQ is not set # BR2_PACKAGE_LIBTOOL is not set # BR2_PACKAGE_MAKE is not set # BR2_PACKAGE_PATCH is not set # BR2_PACKAGE_PKGCONF is not set # BR2_PACKAGE_SED is not set -# BR2_PACKAGE_SSTRIP is not set # BR2_PACKAGE_SUBVERSION is not set -# BR2_PACKAGE_TAR is not set # BR2_PACKAGE_TREE is not set # # Filesystem and flash utilities # +# BR2_PACKAGE_ABOOTIMG is not set +# BR2_PACKAGE_AUFS_UTIL is not set +# BR2_PACKAGE_AUTOFS is not set BR2_PACKAGE_BTRFS_PROGS=y # BR2_PACKAGE_CIFS_UTILS is not set BR2_PACKAGE_CPIO=y # BR2_PACKAGE_CRAMFS is not set # BR2_PACKAGE_CURLFTPFS is not set +# BR2_PACKAGE_DAVFS2 is not set BR2_PACKAGE_DOSFSTOOLS=y # BR2_PACKAGE_DOSFSTOOLS_FATLABEL is not set BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y BR2_PACKAGE_E2FSPROGS=y -# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set -# BR2_PACKAGE_E2FSPROGS_CHATTR is not set # BR2_PACKAGE_E2FSPROGS_DEBUGFS is not set -# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set -# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set -BR2_PACKAGE_E2FSPROGS_E2FSCK=y # BR2_PACKAGE_E2FSPROGS_E2IMAGE is not set -BR2_PACKAGE_E2FSPROGS_E2LABEL=y -# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set # -# e4defrag needs an (e)glibc or musl toolchain +# e4defrag needs a glibc or musl toolchain # -# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set -# BR2_PACKAGE_E2FSPROGS_FINDFS is not set BR2_PACKAGE_E2FSPROGS_FSCK=y -# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set -# BR2_PACKAGE_E2FSPROGS_LSATTR is not set -BR2_PACKAGE_E2FSPROGS_MKE2FS=y -# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set -BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y -# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set -# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +# BR2_PACKAGE_E2FSPROGS_FUSE2FS is not set +# BR2_PACKAGE_E2FSPROGS_RESIZE2FS is not set # BR2_PACKAGE_E2TOOLS is not set # BR2_PACKAGE_ECRYPTFS_UTILS is not set +# BR2_PACKAGE_EROFS_UTILS is not set # BR2_PACKAGE_EXFAT is not set # BR2_PACKAGE_EXFAT_UTILS is not set +# BR2_PACKAGE_EXFATPROGS is not set # BR2_PACKAGE_F2FS_TOOLS is not set # BR2_PACKAGE_FLASHBENCH is not set +# BR2_PACKAGE_FSCRYPTCTL is not set +# BR2_PACKAGE_FUSE_OVERLAYFS is not set +# BR2_PACKAGE_FWUP is not set # BR2_PACKAGE_GENEXT2FS is not set # BR2_PACKAGE_GENPART is not set # BR2_PACKAGE_GENROMFS is not set -# BR2_PACKAGE_KOBS_NG is not set -# BR2_PACKAGE_MAKEDEVS is not set +# BR2_PACKAGE_IMX_USB_LOADER is not set # BR2_PACKAGE_MMC_UTILS is not set # BR2_PACKAGE_MTD is not set BR2_PACKAGE_MTOOLS=y # BR2_PACKAGE_NFS_UTILS is not set +# BR2_PACKAGE_NILFS_UTILS is not set BR2_PACKAGE_NTFS_3G=y # BR2_PACKAGE_NTFS_3G_ENCRYPTED is not set BR2_PACKAGE_NTFS_3G_NTFSPROGS=y -# BR2_PACKAGE_SIMICSFS is not set +# BR2_PACKAGE_SP_OOPS_EXTRACT is not set # BR2_PACKAGE_SQUASHFS is not set # BR2_PACKAGE_SSHFS is not set # BR2_PACKAGE_SUNXI_TOOLS is not set +# BR2_PACKAGE_UDFTOOLS is not set # BR2_PACKAGE_UNIONFS is not set # BR2_PACKAGE_XFSPROGS is not set +# +# Fonts, cursors, icons, sounds and themes +# + +# +# Cursors +# +# BR2_PACKAGE_COMIX_CURSORS is not set +# BR2_PACKAGE_OBSIDIAN_CURSORS is not set + +# +# Fonts +# +# BR2_PACKAGE_BITSTREAM_VERA is not set +# BR2_PACKAGE_CANTARELL is not set +# BR2_PACKAGE_DEJAVU is not set +# BR2_PACKAGE_FONT_AWESOME is not set +# BR2_PACKAGE_GHOSTSCRIPT_FONTS is not set +# BR2_PACKAGE_INCONSOLATA is not set +# BR2_PACKAGE_LIBERATION is not set + +# +# Icons +# +# BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS is not set +# BR2_PACKAGE_HICOLOR_ICON_THEME is not set + +# +# Sounds +# +# BR2_PACKAGE_SOUND_THEME_BOREALIS is not set +# BR2_PACKAGE_SOUND_THEME_FREEDESKTOP is not set + +# +# Themes +# + # # Games # +# BR2_PACKAGE_ASCII_INVADERS is not set +# BR2_PACKAGE_CHOCOLATE_DOOM is not set +# BR2_PACKAGE_FLARE_ENGINE is not set # BR2_PACKAGE_GNUCHESS is not set # BR2_PACKAGE_LBREAKOUT2 is not set # BR2_PACKAGE_LTRIS is not set + +# +# minetest needs X11 and an OpenGL provider +# # BR2_PACKAGE_OPENTYRIAN is not set # BR2_PACKAGE_PRBOOM is not set +# BR2_PACKAGE_SL is not set + +# +# solarus needs OpenGL and a toolchain w/ C++, gcc >= 4.8, NPTL, dynamic library, and luajit or lua 5.1 +# +# BR2_PACKAGE_STELLA is not set # # Graphic libraries and applications (graphic/text) @@ -571,197 +891,201 @@ BR2_PACKAGE_NTFS_3G_NTFSPROGS=y # # Graphic applications # -# BR2_PACKAGE_FSWEBCAM is not set # -# glmark2 needs an OpenGL or an openGL ES and EGL backend provided by mesa3d +# cage needs udev, mesa3d w/ EGL and GLES support # # -# glmark2 needs udev /dev management and a toolchain w/ C++, largefile, NPTL +# cog needs wpewebkit and a toolchain w/ threads # +# BR2_PACKAGE_FSWEBCAM is not set +# BR2_PACKAGE_GHOSTSCRIPT is not set +BR2_PACKAGE_GLMARK2_FLAVOR_ANY=y +BR2_PACKAGE_GLMARK2_FLAVOR_DRM_GLESV2=y +BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GLESV2=y +# BR2_PACKAGE_GLMARK2 is not set +# BR2_PACKAGE_GLSLSANDBOX_PLAYER is not set # BR2_PACKAGE_GNUPLOT is not set # BR2_PACKAGE_JHEAD is not set +# BR2_PACKAGE_LIBVA_UTILS is not set # BR2_PACKAGE_MESA3D_DEMOS is not set +BR2_PACKAGE_NETSURF_ARCH_SUPPORTS=y +# BR2_PACKAGE_NETSURF is not set +# BR2_PACKAGE_PNGQUANT is not set +# BR2_PACKAGE_QT5CINEX is not set # BR2_PACKAGE_RRDTOOL is not set +# +# stellarium needs Qt5 and an OpenGL provider +# +# BR2_PACKAGE_TESSERACT_OCR is not set + # # Graphic libraries # -# BR2_PACKAGE_CEGUI06 is not set +# BR2_PACKAGE_CEGUI is not set # BR2_PACKAGE_DIRECTFB is not set +# BR2_PACKAGE_FB_TEST_APP is not set # BR2_PACKAGE_FBDUMP is not set # BR2_PACKAGE_FBGRAB is not set BR2_PACKAGE_FBSET=y -# BR2_PACKAGE_FB_TEST_APP is not set - -# -# fbterm needs a toolchain w/ C++, wchar, locale -# +# BR2_PACKAGE_FBTERM is not set # BR2_PACKAGE_FBV is not set +# BR2_PACKAGE_FREERDP is not set # BR2_PACKAGE_IMAGEMAGICK is not set # BR2_PACKAGE_LINUX_FUSION is not set +# BR2_PACKAGE_MESA3D is not set BR2_PACKAGE_PROVIDES_LIBEGL="rpi-userland" BR2_PACKAGE_PROVIDES_LIBGLES="rpi-userland" +# BR2_PACKAGE_OCRAD is not set # -# mesa3d needs udev /dev management and a toolchain w/ C++, largefile, NPTL +# ogre needs X11 and an OpenGL provider # -# BR2_PACKAGE_OCRAD is not set # BR2_PACKAGE_PSPLASH is not set # BR2_PACKAGE_SDL is not set +# BR2_PACKAGE_SDL2 is not set # # Other GUIs # -# BR2_PACKAGE_EFL is not set -BR2_PACKAGE_QT=y -BR2_PACKAGE_QT_EMBEDDED=y - -# -# Qt standard (X11) not available (need X.org) -# -# BR2_PACKAGE_QT_DEBUG is not set -# BR2_PACKAGE_QT_DEMOS is not set -# BR2_PACKAGE_QT_TRANSLATION_FILES is not set -# BR2_PACKAGE_QT_EXAMPLES is not set -BR2_PACKAGE_QT_SHARED=y -# BR2_PACKAGE_QT_STATIC is not set -BR2_PACKAGE_QT_LICENSE_APPROVED=y -BR2_PACKAGE_QT_CONFIG_FILE="" -# BR2_PACKAGE_QT_QT3SUPPORT is not set -BR2_PACKAGE_QT_GUI_MODULE=y - -# -# Pixel depths -# - -# -# Deselecting each option leads to Qt's default (8,16,32) -# -# BR2_PACKAGE_QT_PIXEL_DEPTH_1 is not set -# BR2_PACKAGE_QT_PIXEL_DEPTH_4 is not set -BR2_PACKAGE_QT_PIXEL_DEPTH_8=y -# BR2_PACKAGE_QT_PIXEL_DEPTH_12 is not set -# BR2_PACKAGE_QT_PIXEL_DEPTH_15 is not set -BR2_PACKAGE_QT_PIXEL_DEPTH_16=y -# BR2_PACKAGE_QT_PIXEL_DEPTH_18 is not set -# BR2_PACKAGE_QT_PIXEL_DEPTH_24 is not set -BR2_PACKAGE_QT_PIXEL_DEPTH_32=y - -# -# Fonts -# -# BR2_PACKAGE_QT_FONT_MICRO is not set -# BR2_PACKAGE_QT_FONT_FIXED is not set -# BR2_PACKAGE_QT_FONT_HELVETICA is not set -# BR2_PACKAGE_QT_FONT_JAPANESE is not set -# BR2_PACKAGE_QT_FONT_UNIFONT is not set -# BR2_PACKAGE_QT_NOFREETYPE is not set -BR2_PACKAGE_QT_QTFREETYPE=y -# BR2_PACKAGE_QT_SYSTEMFREETYPE is not set -BR2_PACKAGE_QT_GIF=y -# BR2_PACKAGE_QT_LIBMNG is not set -# BR2_PACKAGE_QT_NOJPEG is not set -# BR2_PACKAGE_QT_SYSTEMJPEG is not set -BR2_PACKAGE_QT_QTJPEG=y -# BR2_PACKAGE_QT_NOPNG is not set -# BR2_PACKAGE_QT_SYSTEMPNG is not set -BR2_PACKAGE_QT_QTPNG=y -BR2_PACKAGE_QT_NOTIFF=y -# BR2_PACKAGE_QT_SYSTEMTIFF is not set -# BR2_PACKAGE_QT_QTTIFF is not set -# BR2_PACKAGE_QT_QTZLIB is not set -BR2_PACKAGE_QT_SYSTEMZLIB=y -# BR2_PACKAGE_QT_SQL_MODULE is not set +BR2_PACKAGE_QT5_GL_AVAILABLE=y +BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y +BR2_PACKAGE_QT5=y +# BR2_PACKAGE_QT53D is not set +BR2_PACKAGE_QT5BASE=y +BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS="" +BR2_PACKAGE_QT5BASE_CONFIG_FILE="" +# BR2_PACKAGE_QT5BASE_EXAMPLES is not set +BR2_PACKAGE_QT5BASE_NETWORK=y +# BR2_PACKAGE_QT5BASE_CONCURRENT is not set +BR2_PACKAGE_QT5BASE_SQL=y +# BR2_PACKAGE_QT5BASE_MYSQL is not set +# BR2_PACKAGE_QT5BASE_PSQL is not set +BR2_PACKAGE_QT5BASE_SQLITE_NONE=y +# BR2_PACKAGE_QT5BASE_SQLITE_QT is not set +# BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM is not set +BR2_PACKAGE_QT5BASE_TEST=y +BR2_PACKAGE_QT5BASE_XML=y +BR2_PACKAGE_QT5BASE_GUI=y +BR2_PACKAGE_QT5BASE_WIDGETS=y +# BR2_PACKAGE_QT5BASE_OPENGL is not set +BR2_PACKAGE_QT5BASE_LINUXFB=y + +# +# directfb backend available if directfb is enabled +# + +# +# X.org XCB backend available if X.org is enabled +# +# BR2_PACKAGE_QT5BASE_EGLFS is not set +BR2_PACKAGE_QT5BASE_DEFAULT_QPA="wayland" +BR2_PACKAGE_QT5BASE_PRINTSUPPORT=y +# BR2_PACKAGE_QT5BASE_FONTCONFIG is not set +# BR2_PACKAGE_QT5BASE_HARFBUZZ is not set +# BR2_PACKAGE_QT5BASE_GIF is not set +# BR2_PACKAGE_QT5BASE_JPEG is not set +# BR2_PACKAGE_QT5BASE_PNG is not set +BR2_PACKAGE_QT5BASE_DBUS=y +BR2_PACKAGE_QT5BASE_ICU=y +# BR2_PACKAGE_QT5BASE_TSLIB is not set +# BR2_PACKAGE_QT5CHARTS is not set + +# +# qt5connectivity needs neard and/or bluez5_utils +# +# BR2_PACKAGE_QT5DECLARATIVE is not set +# BR2_PACKAGE_QT5ENGINIO is not set +# BR2_PACKAGE_QT5GRAPHICALEFFECTS is not set +# BR2_PACKAGE_QT5IMAGEFORMATS is not set +# BR2_PACKAGE_QT5LOCATION is not set +BR2_PACKAGE_QT5MULTIMEDIA=y +# BR2_PACKAGE_QT5QUICKCONTROLS is not set +# BR2_PACKAGE_QT5QUICKCONTROLS2 is not set +# BR2_PACKAGE_QT5QUICKTIMELINE is not set +BR2_PACKAGE_QT5SCRIPT=y +# BR2_PACKAGE_QT5SCXML is not set +# BR2_PACKAGE_QT5SENSORS is not set +# BR2_PACKAGE_QT5SERIALBUS is not set +# BR2_PACKAGE_QT5SERIALPORT is not set +# BR2_PACKAGE_QT5SVG is not set +BR2_PACKAGE_QT5TOOLS=y +BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS=y +# BR2_PACKAGE_QT5TOOLS_QDOC_TOOL is not set +# BR2_PACKAGE_QT5TOOLS_PIXELTOOL is not set +# BR2_PACKAGE_QT5TOOLS_QTDIAG is not set +# BR2_PACKAGE_QT5TOOLS_QTPATHS is not set +# BR2_PACKAGE_QT5TOOLS_QTPLUGININFO is not set +# BR2_PACKAGE_QT5VIRTUALKEYBOARD is not set +BR2_PACKAGE_QT5WAYLAND=y +# BR2_PACKAGE_QT5WAYLAND_COMPOSITOR is not set +# BR2_PACKAGE_QT5WEBCHANNEL is not set +BR2_PACKAGE_QT5WEBKIT=y +# BR2_PACKAGE_QT5WEBKIT_EXAMPLES is not set +# BR2_PACKAGE_QT5WEBSOCKETS is not set + +# +# qt5webview needs qt5webengine module +# +# BR2_PACKAGE_QT5XMLPATTERNS is not set # -# Graphics drivers +# QT libraries and helper libraries # -BR2_PACKAGE_QT_GFX_LINUXFB=y -# BR2_PACKAGE_QT_GFX_TRANSFORMED is not set -# BR2_PACKAGE_QT_GFX_QVFB is not set -BR2_PACKAGE_QT_GFX_VNC=y -# BR2_PACKAGE_QT_GFX_MULTISCREEN is not set +# BR2_PACKAGE_CUTELYST is not set +# BR2_PACKAGE_GRANTLEE is not set +# BR2_PACKAGE_KF5 is not set +# BR2_PACKAGE_QEXTSERIALPORT is not set +BR2_PACKAGE_QJSON=y +# BR2_PACKAGE_QUAZIP is not set +# BR2_PACKAGE_QWT is not set # -# directfb Qt driver not available (need directfb) +# tekui needs a Lua interpreter and a toolchain w/ threads, dynamic library # +BR2_PACKAGE_WESTON=y +BR2_PACKAGE_WESTON_DEFAULT_FBDEV=y # -# Mouse drivers +# drm backend needs mesa3d w/ EGL driver # -BR2_PACKAGE_QT_MOUSE_PC=y -# BR2_PACKAGE_QT_MOUSE_LINUXTP is not set -BR2_PACKAGE_QT_MOUSE_LINUXINPUT=y -# BR2_PACKAGE_QT_MOUSE_TSLIB is not set -# BR2_PACKAGE_QT_MOUSE_QVFB is not set # -# Mouse Options +# X11 backend needs X.org # -# BR2_PACKAGE_QT_MOUSE_NO_QWS_CURSOR is not set +BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR="fbdev" # -# Keyboard drivers +# DRM compositor needs an OpenGL EGL backend provided by mesa3d # -BR2_PACKAGE_QT_KEYBOARD_TTY=y -# BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT is not set -# BR2_PACKAGE_QT_KEYBOARD_QVFB is not set +BR2_PACKAGE_WESTON_FBDEV=y +# BR2_PACKAGE_WESTON_RDP is not set # -# Phonon module needs gstreamer +# X11 compositor needs X.org enabled # -# BR2_PACKAGE_QT_OPENGL_ES is not set -BR2_PACKAGE_QT_DBUS=y -BR2_PACKAGE_QT_XML=y -# BR2_PACKAGE_QT_XMLPATTERNS is not set -# BR2_PACKAGE_QT_MULTIMEDIA is not set -# BR2_PACKAGE_QT_SVG is not set -BR2_PACKAGE_QT_NETWORK=y -BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT=y -BR2_PACKAGE_QT_WEBKIT=y -# BR2_PACKAGE_QT_STL is not set -BR2_PACKAGE_QT_OPENSSL=y -BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT=y -BR2_PACKAGE_QT_SCRIPT=y -# BR2_PACKAGE_QT_SCRIPTTOOLS is not set -# BR2_PACKAGE_QT_TEST is not set -BR2_PACKAGE_QT5_GL_AVAILABLE=y -BR2_PACKAGE_QT5_JSCORE_AVAILABLE=y # -# QT libraries and helper libraries +# XWayland support needs libepoxy and X.org enabled # -# BR2_PACKAGE_GRANTLEE is not set -# BR2_PACKAGE_QEXTSERIALPORT is not set -BR2_PACKAGE_QJSON=y -# BR2_PACKAGE_QTUIO is not set -# BR2_PACKAGE_QWT is not set # -# weston needs udev and a toolchain w/ threads, dynamic library, headers >= 3.0 +# demo clients needs an OpenGL ES provider, an OpenEGL-capable Wayland backend and a toolchain w/ wchar, threads, C++ # # BR2_PACKAGE_XORG7 is not set +# BR2_PACKAGE_APITRACE is not set # -# X applications -# - -# -# midori needs libgtk2 and a toolchain w/ C++, wchar, threads -# - -# -# X libraries and helper libraries +# midori needs libgtk3 and a glibc toolchain w/ C++, gcc >= 7, host gcc >= 4.9 # -# BR2_PACKAGE_DEJAVU is not set -# BR2_PACKAGE_LIBERATION is not set -# BR2_PACKAGE_XKEYBOARD_CONFIG is not set +# BR2_PACKAGE_QT_WEBKIT_KIOSK is not set # -# X window managers +# vte needs an OpenGL or an OpenGL-EGL/wayland backend # +BR2_PACKAGE_XKEYBOARD_CONFIG=y # # Hardware handling @@ -771,82 +1095,128 @@ BR2_PACKAGE_QJSON=y # Firmware # # BR2_PACKAGE_AM33X_CM3 is not set +# BR2_PACKAGE_ARMBIAN_FIRMWARE is not set # BR2_PACKAGE_B43_FIRMWARE is not set # BR2_PACKAGE_LINUX_FIRMWARE is not set +# BR2_PACKAGE_MURATA_CYW_FW is not set +# BR2_PACKAGE_RPI_BT_FIRMWARE is not set BR2_PACKAGE_RPI_FIRMWARE=y # BR2_PACKAGE_RPI_FIRMWARE_DEFAULT is not set # BR2_PACKAGE_RPI_FIRMWARE_X is not set BR2_PACKAGE_RPI_FIRMWARE_CD=y -BR2_PACKAGE_RPI_FIRMWARE_BOOT="_cd" +BR2_PACKAGE_RPI_FIRMWARE_BOOT="cd" # BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set # -# vcdbg needs an (e)glibc toolchain w/ C++ +# vcdbg needs a glibc toolchain w/ C++ # +BR2_PACKAGE_RPI_WIFI_FIRMWARE=y # BR2_PACKAGE_SUNXI_BOARDS is not set +# BR2_PACKAGE_TS4900_FPGA is not set # BR2_PACKAGE_UX500_FIRMWARE is not set -BR2_PACKAGE_ZD1211_FIRMWARE=y +# BR2_PACKAGE_WILC1000_FIRMWARE is not set +# BR2_PACKAGE_WILINK_BT_FIRMWARE is not set +# BR2_PACKAGE_ZD1211_FIRMWARE is not set +# BR2_PACKAGE_18XX_TI_UTILS is not set # BR2_PACKAGE_A10DISP is not set +# BR2_PACKAGE_ACPICA is not set +# BR2_PACKAGE_ACPID is not set +# BR2_PACKAGE_ACPITOOL is not set +# BR2_PACKAGE_AER_INJECT is not set # BR2_PACKAGE_AM335X_PRU_PACKAGE is not set +# BR2_PACKAGE_APCUPSD is not set # BR2_PACKAGE_AVRDUDE is not set - -# -# bcache-tools needs udev /dev management and a toolchain w/ largefile, wchar -# +# BR2_PACKAGE_BCACHE_TOOLS is not set +# BR2_PACKAGE_BRICKD is not set +# BR2_PACKAGE_BRLTTY is not set +# BR2_PACKAGE_CBOOTIMAGE is not set +# BR2_PACKAGE_CC_TOOL is not set # BR2_PACKAGE_CDRKIT is not set # BR2_PACKAGE_CRYPTSETUP is not set # BR2_PACKAGE_CWIID is not set +# BR2_PACKAGE_DAHDI_LINUX is not set +# BR2_PACKAGE_DAHDI_TOOLS is not set BR2_PACKAGE_DBUS=y # BR2_PACKAGE_DBUS_CPP is not set # BR2_PACKAGE_DBUS_GLIB is not set # BR2_PACKAGE_DBUS_TRIGGERD is not set -# BR2_PACKAGE_DEVMEM2 is not set +# BR2_PACKAGE_DFU_UTIL is not set # BR2_PACKAGE_DMRAID is not set +# BR2_PACKAGE_DT_UTILS is not set # BR2_PACKAGE_DTV_SCAN_TABLES is not set +# BR2_PACKAGE_DUMP1090 is not set # BR2_PACKAGE_DVB_APPS is not set # BR2_PACKAGE_DVBSNOOP is not set -# BR2_PACKAGE_EEPROG is not set +# BR2_PACKAGE_EDID_DECODE is not set # -# eudev needs eudev /dev management +# edid-decode needs a toolchain w/ C++, gcc >= 4.7 # +BR2_PACKAGE_EUDEV=y +BR2_PACKAGE_PROVIDES_UDEV="eudev" +# BR2_PACKAGE_EUDEV_RULES_GEN is not set +BR2_PACKAGE_EUDEV_ENABLE_HWDB=y # BR2_PACKAGE_EVEMU is not set # BR2_PACKAGE_EVTEST is not set # BR2_PACKAGE_FAN_CTRL is not set # BR2_PACKAGE_FCONFIG is not set -# BR2_PACKAGE_FIS is not set +BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS=y +# BR2_PACKAGE_FLASHROM is not set # BR2_PACKAGE_FMTOOLS is not set # BR2_PACKAGE_FREESCALE_IMX is not set BR2_PACKAGE_PROVIDES_LIBOPENVG="rpi-userland" # BR2_PACKAGE_FXLOAD is not set -# BR2_PACKAGE_GADGETFS_TEST is not set + +# +# gcnano-binaries needs a glibc toolchain w/ threads, dynamic library +# # BR2_PACKAGE_GPM is not set # BR2_PACKAGE_GPSD is not set # BR2_PACKAGE_GPTFDISK is not set # BR2_PACKAGE_GVFS is not set + +# +# gvfs needs a toolchain w/ wchar, threads, dynamic library +# # BR2_PACKAGE_HDPARM is not set # BR2_PACKAGE_HWDATA is not set +# BR2_PACKAGE_HWLOC is not set # BR2_PACKAGE_I2C_TOOLS is not set # BR2_PACKAGE_INPUT_EVENT_DAEMON is not set -# BR2_PACKAGE_INPUT_TOOLS is not set # BR2_PACKAGE_IOSTAT is not set # BR2_PACKAGE_IPMITOOL is not set # BR2_PACKAGE_IRDA_UTILS is not set # BR2_PACKAGE_KBD is not set # BR2_PACKAGE_LCDPROC is not set +# BR2_PACKAGE_LIBUBOOTENV is not set +# BR2_PACKAGE_LIBUIO is not set +# BR2_PACKAGE_LINUX_BACKPORTS is not set +# BR2_PACKAGE_LINUX_SERIAL_TEST is not set +# BR2_PACKAGE_LINUXCONSOLETOOLS is not set +# BR2_PACKAGE_LIRC_TOOLS is not set # BR2_PACKAGE_LM_SENSORS is not set # BR2_PACKAGE_LSHW is not set +# BR2_PACKAGE_LSSCSI is not set # BR2_PACKAGE_LSUIO is not set +# BR2_PACKAGE_LUKSMETA is not set # BR2_PACKAGE_LVM2 is not set + +# +# mali-t76x needs a glibc toolchain with armhf enabled +# +# BR2_PACKAGE_MBPFAN is not set # BR2_PACKAGE_MDADM is not set -# BR2_PACKAGE_MEDIA_CTL is not set +# BR2_PACKAGE_MDEVD is not set # BR2_PACKAGE_MEMTESTER is not set +# BR2_PACKAGE_MEMTOOL is not set # BR2_PACKAGE_MINICOM is not set # BR2_PACKAGE_NANOCOM is not set # BR2_PACKAGE_NEARD is not set +# BR2_PACKAGE_NVME is not set # BR2_PACKAGE_OFONO is not set -# BR2_PACKAGE_OLA is not set # BR2_PACKAGE_OPEN2300 is not set +# BR2_PACKAGE_OPENFPGALOADER is not set +# BR2_PACKAGE_OPENIPMI is not set # BR2_PACKAGE_OPENOCD is not set # @@ -854,30 +1224,46 @@ BR2_PACKAGE_PROVIDES_LIBOPENVG="rpi-userland" # BR2_PACKAGE_PARTED=y # BR2_PACKAGE_PCIUTILS is not set +# BR2_PACKAGE_PDBG is not set # BR2_PACKAGE_PICOCOM is not set # BR2_PACKAGE_PIFMRDS is not set +# BR2_PACKAGE_PIGPIO is not set +# BR2_PACKAGE_POWERTOP is not set # BR2_PACKAGE_PPS_TOOLS is not set +# BR2_PACKAGE_PULSEVIEW is not set +# BR2_PACKAGE_RASPI_GPIO is not set # BR2_PACKAGE_READ_EDID is not set # BR2_PACKAGE_RNG_TOOLS is not set BR2_PACKAGE_RPI_USERLAND=y -# BR2_PACKAGE_RPI_USERLAND_START_VCFILED is not set +# BR2_PACKAGE_RPI_USERLAND_HELLO is not set +# BR2_PACKAGE_RS485CONF is not set +# BR2_PACKAGE_RTC_TOOLS is not set +# BR2_PACKAGE_RTL8188EU is not set +# BR2_PACKAGE_RTL8189FS is not set +# BR2_PACKAGE_RTL8723BS is not set +# BR2_PACKAGE_RTL8723BU is not set +# BR2_PACKAGE_RTL8821AU is not set # BR2_PACKAGE_SANE_BACKENDS is not set # BR2_PACKAGE_SDPARM is not set +BR2_PACKAGE_SEDUTIL_ARCH_SUPPORTS=y +# BR2_PACKAGE_SEDUTIL is not set # BR2_PACKAGE_SETSERIAL is not set # BR2_PACKAGE_SG3_UTILS is not set +# BR2_PACKAGE_SIGROK_CLI is not set # BR2_PACKAGE_SISPMCTL is not set # BR2_PACKAGE_SMARTMONTOOLS is not set # BR2_PACKAGE_SMSTOOLS3 is not set -# BR2_PACKAGE_SNOWBALL_HDMISERVICE is not set +# BR2_PACKAGE_SPI_TOOLS is not set # BR2_PACKAGE_SREDIRD is not set # BR2_PACKAGE_STATSERIAL is not set +# BR2_PACKAGE_STM32FLASH is not set # -# sunxi-cedarx needs an (e)glibc toolchain +# sunxi-cedarx needs a glibc toolchain # # -# sunxi-mali needs an (e)glibc toolchain +# sunxi-mali needs an EABIhf glibc toolchain # # BR2_PACKAGE_SYSSTAT is not set @@ -886,65 +1272,67 @@ BR2_PACKAGE_RPI_USERLAND=y # # -# ti-gfx needs an (e)glibc toolchain and a Linux kernel to be built +# ti-gfx needs a glibc toolchain and a Linux kernel to be built # -# BR2_PACKAGE_TI_UIM is not set -# BR2_PACKAGE_TI_UTILS is not set -# BR2_PACKAGE_TRIGGERHAPPY is not set -BR2_PACKAGE_UBOOT_TOOLS=y -BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE=y -# BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE is not set -# BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV is not set +# BR2_PACKAGE_TI_SGX_KM is not set +# BR2_PACKAGE_TI_SGX_LIBGBM is not set # -# udisks needs udev /dev management +# ti-sgx-um needs the ti-sgx-km driver # -# BR2_PACKAGE_USB_MODESWITCH is not set -# BR2_PACKAGE_USB_MODESWITCH_DATA is not set # -# usbmount requires udev to be enabled +# ti-sgx-um needs udev and a glibc toolchain w/ threads # +# BR2_PACKAGE_TI_UIM is not set +# BR2_PACKAGE_TI_UTILS is not set +# BR2_PACKAGE_TIO is not set +# BR2_PACKAGE_TRIGGERHAPPY is not set +# BR2_PACKAGE_UBOOT_TOOLS is not set +# BR2_PACKAGE_UBUS is not set +# BR2_PACKAGE_UCCP420WLAN is not set +BR2_PACKAGE_HAS_UDEV=y # -# usbutils needs udev /dev management and toolchain w/ threads +# udisks needs a glibc or musl toolchain with locale, C++, wchar, dynamic library, NPTL, gcc >= 4.9 # +# BR2_PACKAGE_UHUBCTL is not set +# BR2_PACKAGE_UMTPRD is not set +# BR2_PACKAGE_UPOWER is not set +# BR2_PACKAGE_USB_MODESWITCH is not set +# BR2_PACKAGE_USB_MODESWITCH_DATA is not set +# BR2_PACKAGE_USBMOUNT is not set +# BR2_PACKAGE_USBUTILS is not set # BR2_PACKAGE_W_SCAN is not set # BR2_PACKAGE_WIPE is not set # BR2_PACKAGE_XORRISO is not set +# BR2_PACKAGE_XR819_XRADIO is not set # # Interpreter languages and scripting # +# BR2_PACKAGE_4TH is not set # BR2_PACKAGE_ENSCRIPT is not set -# BR2_PACKAGE_ERLANG is not set +# BR2_PACKAGE_EXECLINE is not set +# BR2_PACKAGE_FICL is not set +BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS=y +# BR2_PACKAGE_GAUCHE is not set # BR2_PACKAGE_GUILE is not set # BR2_PACKAGE_HASERL is not set - -# -# jamvm needs a toolchain w/ IPv6 -# # BR2_PACKAGE_JIMTCL is not set # BR2_PACKAGE_LUA is not set -# BR2_PACKAGE_LUAJIT is not set -BR2_PACKAGE_MONO_ARCH_SUPPORTS=y - -# -# mono needs a toolchain w/ IPv6, threads -# - -# -# nodejs needs a toolchain w/ C++, IPv6, largefile, threads -# +BR2_PACKAGE_PROVIDES_HOST_LUAINTERPRETER="host-lua" +# BR2_PACKAGE_MICROPYTHON is not set +# BR2_PACKAGE_MOARVM is not set +BR2_PACKAGE_NODEJS_ARCH_SUPPORTS=y +# BR2_PACKAGE_NODEJS is not set +BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS=y # BR2_PACKAGE_PERL is not set # BR2_PACKAGE_PHP is not set # BR2_PACKAGE_PYTHON is not set # BR2_PACKAGE_PYTHON3 is not set # BR2_PACKAGE_RUBY is not set - -# -# tcl needs a toolchain w/ ipv6, threads -# +# BR2_PACKAGE_TCL is not set # # Libraries @@ -954,15 +1342,28 @@ BR2_PACKAGE_MONO_ARCH_SUPPORTS=y # Audio/Sound # # BR2_PACKAGE_ALSA_LIB is not set +# BR2_PACKAGE_ALURE is not set +# BR2_PACKAGE_AUBIO is not set # BR2_PACKAGE_AUDIOFILE is not set -# BR2_PACKAGE_CELT051 is not set +# BR2_PACKAGE_BCG729 is not set +# BR2_PACKAGE_CAPS is not set +BR2_PACKAGE_FDK_AAC_ARCH_SUPPORTS=y # BR2_PACKAGE_FDK_AAC is not set # BR2_PACKAGE_LIBAO is not set +# BR2_PACKAGE_LIBASPLIB is not set +# BR2_PACKAGE_LIBBROADVOICE is not set # BR2_PACKAGE_LIBCDAUDIO is not set +# BR2_PACKAGE_LIBCDDB is not set # BR2_PACKAGE_LIBCDIO is not set +# BR2_PACKAGE_LIBCDIO_PARANOIA is not set +# BR2_PACKAGE_LIBCODEC2 is not set # BR2_PACKAGE_LIBCUE is not set # BR2_PACKAGE_LIBCUEFILE is not set +# BR2_PACKAGE_LIBEBUR128 is not set +# BR2_PACKAGE_LIBG7221 is not set +# BR2_PACKAGE_LIBGSM is not set # BR2_PACKAGE_LIBID3TAG is not set +# BR2_PACKAGE_LIBILBC is not set # BR2_PACKAGE_LIBLO is not set # BR2_PACKAGE_LIBMAD is not set # BR2_PACKAGE_LIBMODPLUG is not set @@ -970,18 +1371,28 @@ BR2_PACKAGE_MONO_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBMPDCLIENT is not set # BR2_PACKAGE_LIBREPLAYGAIN is not set # BR2_PACKAGE_LIBSAMPLERATE is not set +# BR2_PACKAGE_LIBSIDPLAY2 is not set +# BR2_PACKAGE_LIBSILK is not set # BR2_PACKAGE_LIBSNDFILE is not set +# BR2_PACKAGE_LIBSOUNDTOUCH is not set # BR2_PACKAGE_LIBSOXR is not set # BR2_PACKAGE_LIBVORBIS is not set # BR2_PACKAGE_MP4V2 is not set +BR2_PACKAGE_OPENAL_ARCH_SUPPORTS=y +# BR2_PACKAGE_OPENAL is not set # BR2_PACKAGE_OPENCORE_AMR is not set # BR2_PACKAGE_OPUS is not set +# BR2_PACKAGE_OPUSFILE is not set # BR2_PACKAGE_PORTAUDIO is not set +# BR2_PACKAGE_SBC is not set +# BR2_PACKAGE_SPANDSP is not set # BR2_PACKAGE_SPEEX is not set +# BR2_PACKAGE_SPEEXDSP is not set # BR2_PACKAGE_TAGLIB is not set # BR2_PACKAGE_TINYALSA is not set # BR2_PACKAGE_TREMOR is not set # BR2_PACKAGE_VO_AACENC is not set +BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS=y # BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING is not set # @@ -990,54 +1401,109 @@ BR2_PACKAGE_MONO_ARCH_SUPPORTS=y BR2_PACKAGE_LIBARCHIVE=y BR2_PACKAGE_LIBARCHIVE_BSDTAR=y # BR2_PACKAGE_LIBARCHIVE_BSDCPIO is not set +# BR2_PACKAGE_LIBARCHIVE_BSDCAT is not set +# BR2_PACKAGE_LIBMSPACK is not set +# BR2_PACKAGE_LIBSQUISH is not set # BR2_PACKAGE_LIBZIP is not set +# BR2_PACKAGE_LZ4 is not set BR2_PACKAGE_LZO=y +# BR2_PACKAGE_MINIZIP is not set # BR2_PACKAGE_SNAPPY is not set # BR2_PACKAGE_SZIP is not set +BR2_PACKAGE_ZLIB_NG_ARCH_SUPPORTS=y BR2_PACKAGE_ZLIB=y +BR2_PACKAGE_LIBZLIB=y +# BR2_PACKAGE_ZLIB_NG is not set +BR2_PACKAGE_HAS_ZLIB=y +BR2_PACKAGE_PROVIDES_ZLIB="libzlib" +BR2_PACKAGE_PROVIDES_HOST_ZLIB="host-libzlib" +# BR2_PACKAGE_ZZIPLIB is not set # # Crypto # +# BR2_PACKAGE_BEARSSL is not set # BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_BOTAN_ARCH_SUPPORTS=y # BR2_PACKAGE_BOTAN is not set BR2_PACKAGE_CA_CERTIFICATES=y # BR2_PACKAGE_CRYPTODEV is not set +# BR2_PACKAGE_GCR is not set # BR2_PACKAGE_GNUTLS is not set +# BR2_PACKAGE_LIBARGON2 is not set # BR2_PACKAGE_LIBASSUAN is not set # BR2_PACKAGE_LIBGCRYPT is not set +BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBGPG_ERROR is not set +BR2_PACKAGE_LIBGPG_ERROR_SYSCFG="arm-unknown-linux-gnueabi" # BR2_PACKAGE_LIBGPGME is not set +# BR2_PACKAGE_LIBKCAPI is not set # BR2_PACKAGE_LIBKSBA is not set # BR2_PACKAGE_LIBMCRYPT is not set # BR2_PACKAGE_LIBMHASH is not set # BR2_PACKAGE_LIBNSS is not set +# BR2_PACKAGE_LIBOLM is not set +# BR2_PACKAGE_LIBP11 is not set +# BR2_PACKAGE_LIBSCRYPT is not set # BR2_PACKAGE_LIBSECRET is not set # BR2_PACKAGE_LIBSHA1 is not set +# BR2_PACKAGE_LIBSODIUM is not set +# BR2_PACKAGE_LIBSSH is not set # BR2_PACKAGE_LIBSSH2 is not set +# BR2_PACKAGE_LIBTOMCRYPT is not set +# BR2_PACKAGE_LIBUECC is not set +# BR2_PACKAGE_MBEDTLS is not set # BR2_PACKAGE_NETTLE is not set +BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL=y BR2_PACKAGE_OPENSSL=y -# BR2_PACKAGE_OPENSSL_BIN is not set -# BR2_PACKAGE_OPENSSL_ENGINES is not set -# BR2_PACKAGE_POLARSSL is not set +BR2_PACKAGE_LIBOPENSSL=y +BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-armv4" +# BR2_PACKAGE_LIBOPENSSL_BIN is not set +# BR2_PACKAGE_LIBOPENSSL_ENGINES is not set +BR2_PACKAGE_HAS_OPENSSL=y +BR2_PACKAGE_PROVIDES_OPENSSL="libopenssl" +BR2_PACKAGE_PROVIDES_HOST_OPENSSL="host-libopenssl" +# BR2_PACKAGE_PKCS11_HELPER is not set +# BR2_PACKAGE_RHASH is not set +# BR2_PACKAGE_TINYDTLS is not set +# BR2_PACKAGE_TPM2_TSS is not set +# BR2_PACKAGE_TROUSERS is not set +# BR2_PACKAGE_USTREAM_SSL is not set +# BR2_PACKAGE_WOLFSSL is not set # # Database # # BR2_PACKAGE_BERKELEYDB is not set +# BR2_PACKAGE_CPPDB is not set # BR2_PACKAGE_GDBM is not set -# BR2_PACKAGE_MYSQL is not set +# BR2_PACKAGE_HIREDIS is not set +# BR2_PACKAGE_KOMPEXSQLITE is not set +BR2_PACKAGE_LEVELDB=y +# BR2_PACKAGE_LIBGIT2 is not set +# BR2_PACKAGE_LIBODB is not set +BR2_PACKAGE_MONGODB_ARCH_SUPPORTS=y # -# postgresql needs a toolchain w/ glibc +# mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 7 # +# BR2_PACKAGE_MYSQL is not set +# BR2_PACKAGE_POSTGRESQL is not set +# BR2_PACKAGE_REDIS is not set +# BR2_PACKAGE_ROCKSDB is not set # -# redis needs a toolchain w/ IPv6, largefile, threads +# sqlcipher conflicts with sqlite # -# BR2_PACKAGE_SQLCIPHER is not set -# BR2_PACKAGE_SQLITE is not set +BR2_PACKAGE_SQLITE=y +# BR2_PACKAGE_SQLITE_STAT4 is not set +# BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA is not set +# BR2_PACKAGE_SQLITE_ENABLE_FTS3 is not set +# BR2_PACKAGE_SQLITE_ENABLE_JSON1 is not set +# BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY is not set +# BR2_PACKAGE_SQLITE_SECURE_DELETE is not set +# BR2_PACKAGE_SQLITE_NO_SYNC is not set +# BR2_PACKAGE_UNIXODBC is not set # # Filesystem @@ -1046,115 +1512,230 @@ BR2_PACKAGE_OPENSSL=y # BR2_PACKAGE_LIBCONFIG is not set # BR2_PACKAGE_LIBCONFUSE is not set # BR2_PACKAGE_LIBFUSE is not set +# BR2_PACKAGE_LIBFUSE3 is not set # BR2_PACKAGE_LIBLOCKFILE is not set - -# -# libnfs needs a toolchain w/ RPC and LARGEFILE -# +# BR2_PACKAGE_LIBNFS is not set # BR2_PACKAGE_LIBSYSFS is not set # BR2_PACKAGE_LOCKDEV is not set +# BR2_PACKAGE_PHYSFS is not set # # Graphics # +# BR2_PACKAGE_ASSIMP is not set + +# +# at-spi2-atk depends on X.org +# + +# +# at-spi2-core depends on X.org +# # BR2_PACKAGE_ATK is not set -# BR2_PACKAGE_CAIRO is not set +# BR2_PACKAGE_ATKMM is not set +# BR2_PACKAGE_BULLET is not set +BR2_PACKAGE_CAIRO=y +# BR2_PACKAGE_CAIRO_PS is not set +# BR2_PACKAGE_CAIRO_PDF is not set +BR2_PACKAGE_CAIRO_PNG=y +# BR2_PACKAGE_CAIRO_SCRIPT is not set +# BR2_PACKAGE_CAIRO_SVG is not set +# BR2_PACKAGE_CAIRO_TEE is not set +# BR2_PACKAGE_CAIRO_XML is not set +# BR2_PACKAGE_CAIROMM is not set + +# +# chipmunk needs an OpenGL backend +# +# BR2_PACKAGE_EXEMPI is not set # BR2_PACKAGE_EXIV2 is not set -# BR2_PACKAGE_FONTCONFIG is not set -# BR2_PACKAGE_FREETYPE is not set +BR2_PACKAGE_FONTCONFIG=y +BR2_PACKAGE_FREETYPE=y # BR2_PACKAGE_GD is not set # BR2_PACKAGE_GDK_PIXBUF is not set # BR2_PACKAGE_GIFLIB is not set + +# +# granite needs libgtk3 and a toolchain w/ wchar, threads +# +# BR2_PACKAGE_GRAPHITE2 is not set + +# +# gtkmm3 needs libgtk3 and a toolchain w/ C++, wchar, threads, gcc >= 4.9 +# # BR2_PACKAGE_HARFBUZZ is not set -# BR2_PACKAGE_HICOLOR_ICON_THEME is not set +# BR2_PACKAGE_IJS is not set # BR2_PACKAGE_IMLIB2 is not set + +# +# irrlicht needs X11 and an OpenGL provider +# # BR2_PACKAGE_JASPER is not set -# BR2_PACKAGE_JPEG is not set +# BR2_PACKAGE_JBIG2DEC is not set +BR2_PACKAGE_JPEG=y +BR2_PACKAGE_LIBJPEG=y +# BR2_PACKAGE_JPEG_TURBO is not set +BR2_PACKAGE_HAS_JPEG=y +BR2_PACKAGE_PROVIDES_JPEG="libjpeg" +# BR2_PACKAGE_KMSXX is not set # BR2_PACKAGE_LCMS2 is not set +# BR2_PACKAGE_LENSFUN is not set +# BR2_PACKAGE_LEPTONICA is not set # BR2_PACKAGE_LIBART is not set # BR2_PACKAGE_LIBDMTX is not set -# BR2_PACKAGE_LIBDRM is not set +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_HAS_ATOMIC=y +# BR2_PACKAGE_LIBDRM_RADEON is not set +# BR2_PACKAGE_LIBDRM_AMDGPU is not set +# BR2_PACKAGE_LIBDRM_NOUVEAU is not set +# BR2_PACKAGE_LIBDRM_OMAP is not set +# BR2_PACKAGE_LIBDRM_ETNAVIV is not set +# BR2_PACKAGE_LIBDRM_EXYNOS is not set +# BR2_PACKAGE_LIBDRM_FREEDRENO is not set +# BR2_PACKAGE_LIBDRM_TEGRA is not set +BR2_PACKAGE_LIBDRM_VC4=y +# BR2_PACKAGE_LIBDRM_INSTALL_TESTS is not set +# BR2_PACKAGE_LIBEPOXY is not set # BR2_PACKAGE_LIBEXIF is not set + +# +# libfm needs X.org and a toolchain w/ wchar, threads, C++, gcc >= 4.8 +# +# BR2_PACKAGE_LIBFM_EXTRA is not set + +# +# libfreeglut depends on X.org and needs an OpenGL backend +# +# BR2_PACKAGE_LIBFREEIMAGE is not set # BR2_PACKAGE_LIBGEOTIFF is not set # # libglew depends on X.org and needs an OpenGL backend # +# +# libglfw depends on X.org and needs an OpenGL backend +# + # # libglu needs an OpenGL backend # -# BR2_PACKAGE_LIBGTK3 is not set -# BR2_PACKAGE_LIBPNG is not set +# BR2_PACKAGE_LIBGTA is not set + +# +# libgtk3 needs an OpenGL or an OpenGL-EGL/wayland backend +# +# BR2_PACKAGE_LIBMEDIAART is not set +# BR2_PACKAGE_LIBMNG is not set +BR2_PACKAGE_LIBPNG=y # BR2_PACKAGE_LIBQRENCODE is not set # BR2_PACKAGE_LIBRAW is not set # BR2_PACKAGE_LIBRSVG is not set + +# +# libsoil needs an OpenGL backend and a toolchain w/ dynamic library +# # BR2_PACKAGE_LIBSVG is not set # BR2_PACKAGE_LIBSVG_CAIRO is not set # BR2_PACKAGE_LIBSVGTINY is not set -# BR2_PACKAGE_LIBUNGIF is not set # BR2_PACKAGE_LIBVA is not set +# BR2_PACKAGE_LIBVIPS is not set +# BR2_PACKAGE_LIBWPE is not set +# BR2_PACKAGE_MENU_CACHE is not set # BR2_PACKAGE_OPENCV is not set +# BR2_PACKAGE_OPENCV3 is not set BR2_PACKAGE_HAS_LIBEGL=y BR2_PACKAGE_HAS_LIBGLES=y BR2_PACKAGE_HAS_LIBOPENVG=y BR2_PACKAGE_HAS_LIBOPENMAX=y +# BR2_PACKAGE_OPENJPEG is not set # BR2_PACKAGE_PANGO is not set -# BR2_PACKAGE_PIXMAN is not set +# BR2_PACKAGE_PANGOMM is not set +# BR2_PACKAGE_PIPEWIRE is not set +BR2_PACKAGE_PIXMAN=y # BR2_PACKAGE_POPPLER is not set # BR2_PACKAGE_TIFF is not set -# BR2_PACKAGE_WAYLAND is not set -BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS=y +BR2_PACKAGE_WAYLAND=y +BR2_PACKAGE_WAYLAND_PROTOCOLS=y # -# webkit needs libgtk2 and a toolchain w/ C++, wchar, threads +# waylandpp needs an OpenGL-EGL/wayland backend, a toolchain w/ gcc >= 4.9, host gcc >= 4.9 +# +BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS=y + +# +# webkitgtk needs libgtk3 and a glibc toolchain w/ C++, gcc >= 7, host gcc >= 4.9 # # BR2_PACKAGE_WEBP is not set -# BR2_PACKAGE_ZXING is not set + +# +# wlroots needs udev, mesa3d w/ EGL and GLES support +# +# BR2_PACKAGE_WOFF2 is not set + +# +# wpebackend-fdo needs a toolchain w/ C++, wchar, threads, dynamic library and an OpenEGL-capable Wayland backend +# +BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS=y + +# +# wpewebkit needs an OpenGL ES w/ EGL-capable Wayland backend +# +# BR2_PACKAGE_ZBAR is not set +# BR2_PACKAGE_ZXING_CPP is not set # # Hardware handling # +# BR2_PACKAGE_ACSCCID is not set +# BR2_PACKAGE_BCM2835 is not set +# BR2_PACKAGE_C_PERIPHERY is not set # BR2_PACKAGE_CCID is not set # BR2_PACKAGE_DTC is not set +BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS=y +# BR2_PACKAGE_GNU_EFI is not set +# BR2_PACKAGE_HACKRF is not set +# BR2_PACKAGE_HIDAPI is not set +# BR2_PACKAGE_JITTERENTROPY_LIBRARY is not set # BR2_PACKAGE_LCDAPI is not set +# BR2_PACKAGE_LET_ME_CREATE is not set # BR2_PACKAGE_LIBAIO is not set - -# -# libatasmart requires udev to be enabled -# +# BR2_PACKAGE_LIBATASMART is not set # BR2_PACKAGE_LIBCEC is not set # BR2_PACKAGE_LIBFREEFARE is not set # BR2_PACKAGE_LIBFTDI is not set +# BR2_PACKAGE_LIBFTDI1 is not set +# BR2_PACKAGE_LIBGPHOTO2 is not set +# BR2_PACKAGE_LIBGPIOD is not set +# BR2_PACKAGE_LIBGUDEV is not set # BR2_PACKAGE_LIBHID is not set # BR2_PACKAGE_LIBIIO is not set - -# -# libinput needs udev /dev management -# +BR2_PACKAGE_LIBINPUT=y # BR2_PACKAGE_LIBIQRF is not set # BR2_PACKAGE_LIBLLCP is not set - -# -# libmbim needs udev /dev management and a toolchain w/ wchar, threads -# +# BR2_PACKAGE_LIBMBIM is not set # BR2_PACKAGE_LIBNFC is not set # BR2_PACKAGE_LIBPCIACCESS is not set # BR2_PACKAGE_LIBPHIDGET is not set +# BR2_PACKAGE_LIBPRI is not set # BR2_PACKAGE_LIBQMI is not set # BR2_PACKAGE_LIBRAW1394 is not set # BR2_PACKAGE_LIBRTLSDR is not set # BR2_PACKAGE_LIBSERIAL is not set +# BR2_PACKAGE_LIBSERIALPORT is not set +# BR2_PACKAGE_LIBSIGROK is not set +# BR2_PACKAGE_LIBSIGROKDECODE is not set # BR2_PACKAGE_LIBSOC is not set +# BR2_PACKAGE_LIBSS7 is not set # BR2_PACKAGE_LIBUSB is not set +# BR2_PACKAGE_LIBUSBGX is not set # BR2_PACKAGE_LIBV4L is not set -# BR2_PACKAGE_LIBXKBCOMMON is not set -# BR2_PACKAGE_MTDEV is not set - -# -# ne10 needs a toolchain w/ neon -# +BR2_PACKAGE_LIBXKBCOMMON=y +BR2_PACKAGE_MRAA_ARCH_SUPPORTS=y +# BR2_PACKAGE_MRAA is not set +BR2_PACKAGE_MTDEV=y # BR2_PACKAGE_NEARDAL is not set +# BR2_PACKAGE_OWFS is not set # BR2_PACKAGE_PCSC_LITE is not set # BR2_PACKAGE_TSLIB is not set # BR2_PACKAGE_URG is not set @@ -1162,17 +1743,23 @@ BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS=y # # Javascript # +# BR2_PACKAGE_ANGULARJS is not set # BR2_PACKAGE_BOOTSTRAP is not set +# BR2_PACKAGE_CHARTJS is not set +# BR2_PACKAGE_DUKTAPE is not set # BR2_PACKAGE_EXPLORERCANVAS is not set # BR2_PACKAGE_FLOT is not set # BR2_PACKAGE_JQUERY is not set -# BR2_PACKAGE_JQUERY_KEYBOARD is not set -# BR2_PACKAGE_JQUERY_MOBILE is not set -# BR2_PACKAGE_JQUERY_SPARKLINE is not set -# BR2_PACKAGE_JQUERY_UI is not set -# BR2_PACKAGE_JQUERY_VALIDATION is not set # BR2_PACKAGE_JSMIN is not set # BR2_PACKAGE_JSON_JAVASCRIPT is not set +# BR2_PACKAGE_OPENLAYERS is not set +BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS=y +BR2_PACKAGE_SPIDERMONKEY_JIT_ARCH_SUPPORTS=y + +# +# spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9 +# +# BR2_PACKAGE_VUEJS is not set # # JSON/XML @@ -1180,170 +1767,231 @@ BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS=y # BR2_PACKAGE_BENEJSON is not set # BR2_PACKAGE_CJSON is not set BR2_PACKAGE_EXPAT=y -# BR2_PACKAGE_EZXML is not set # BR2_PACKAGE_JANSSON is not set +# BR2_PACKAGE_JOSE is not set +# BR2_PACKAGE_JSMN is not set # BR2_PACKAGE_JSON_C is not set +# BR2_PACKAGE_JSON_FOR_MODERN_CPP is not set # BR2_PACKAGE_JSON_GLIB is not set +# BR2_PACKAGE_JSONCPP is not set +# BR2_PACKAGE_LIBBSON is not set +# BR2_PACKAGE_LIBFASTJSON is not set # BR2_PACKAGE_LIBJSON is not set # BR2_PACKAGE_LIBROXML is not set -# BR2_PACKAGE_LIBXML2 is not set +# BR2_PACKAGE_LIBUCL is not set +BR2_PACKAGE_LIBXML2=y # BR2_PACKAGE_LIBXMLPP is not set # BR2_PACKAGE_LIBXMLRPC is not set # BR2_PACKAGE_LIBXSLT is not set # BR2_PACKAGE_LIBYAML is not set # BR2_PACKAGE_MXML is not set +# BR2_PACKAGE_PUGIXML is not set # BR2_PACKAGE_RAPIDJSON is not set +# BR2_PACKAGE_RAPIDXML is not set +# BR2_PACKAGE_RAPTOR is not set # BR2_PACKAGE_TINYXML is not set -# BR2_PACKAGE_XERCES is not set +# BR2_PACKAGE_TINYXML2 is not set +# BR2_PACKAGE_VALIJSON is not set # BR2_PACKAGE_YAJL is not set # BR2_PACKAGE_YAML_CPP is not set # # Logging # +# BR2_PACKAGE_GLOG is not set # BR2_PACKAGE_LIBLOG4C_LOCALTIME is not set # BR2_PACKAGE_LIBLOGGING is not set # BR2_PACKAGE_LOG4CPLUS is not set +# BR2_PACKAGE_LOG4CPP is not set # BR2_PACKAGE_LOG4CXX is not set +# BR2_PACKAGE_OPENTRACING_CPP is not set +# BR2_PACKAGE_SPDLOG is not set # BR2_PACKAGE_ZLOG is not set # # Multimedia # +# BR2_PACKAGE_BITSTREAM is not set +# BR2_PACKAGE_DAV1D is not set +# BR2_PACKAGE_KVAZAAR is not set +# BR2_PACKAGE_LIBAACS is not set # BR2_PACKAGE_LIBASS is not set +# BR2_PACKAGE_LIBBDPLUS is not set # BR2_PACKAGE_LIBBLURAY is not set +# BR2_PACKAGE_LIBCAMERA is not set +# BR2_PACKAGE_LIBDCADEC is not set # BR2_PACKAGE_LIBDVBCSA is not set +# BR2_PACKAGE_LIBDVBPSI is not set # BR2_PACKAGE_LIBDVBSI is not set +# BR2_PACKAGE_LIBDVDCSS is not set # BR2_PACKAGE_LIBDVDNAV is not set # BR2_PACKAGE_LIBDVDREAD is not set # BR2_PACKAGE_LIBEBML is not set +# BR2_PACKAGE_LIBHDHOMERUN is not set # -# libfslcodec needs an (e)glibc toolchain +# libimxvpuapi needs an i.MX platform with VPU support # -# BR2_PACKAGE_LIBFSLPARSER is not set -# BR2_PACKAGE_LIBFSLVPUWRAP is not set # BR2_PACKAGE_LIBMATROSKA is not set # BR2_PACKAGE_LIBMMS is not set # BR2_PACKAGE_LIBMPEG2 is not set # BR2_PACKAGE_LIBOGG is not set -# BR2_PACKAGE_LIBPLAYER is not set +BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBOPENH264 is not set +# BR2_PACKAGE_LIBOPUSENC is not set # BR2_PACKAGE_LIBTHEORA is not set +# BR2_PACKAGE_LIBUDFREAD is not set +# BR2_PACKAGE_LIBVPX is not set +# BR2_PACKAGE_LIBYUV is not set # BR2_PACKAGE_LIVE555 is not set - -# -# mediastreamer needs a toolchain w/ threads, C++, IPv6 -# +# BR2_PACKAGE_MEDIASTREAMER is not set # BR2_PACKAGE_X264 is not set +# BR2_PACKAGE_X265 is not set # # Networking # # BR2_PACKAGE_AGENTPP is not set +# BR2_PACKAGE_AZMQ is not set +# BR2_PACKAGE_AZURE_IOT_SDK_C is not set +# BR2_PACKAGE_BATMAN_ADV is not set +# BR2_PACKAGE_BELLE_SIP is not set # BR2_PACKAGE_C_ARES is not set BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS=y # BR2_PACKAGE_CANFESTIVAL is not set # BR2_PACKAGE_CGIC is not set - -# -# cppzmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# - -# -# czmq needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# - -# -# filemq needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# +# BR2_PACKAGE_CPPZMQ is not set +# BR2_PACKAGE_CURLPP is not set +# BR2_PACKAGE_CZMQ is not set +# BR2_PACKAGE_DAQ is not set +# BR2_PACKAGE_DAVICI is not set +# BR2_PACKAGE_ENET is not set +# BR2_PACKAGE_FILEMQ is not set # BR2_PACKAGE_FLICKCURL is not set # BR2_PACKAGE_FREERADIUS_CLIENT is not set +# BR2_PACKAGE_GENSIO is not set # BR2_PACKAGE_GEOIP is not set # BR2_PACKAGE_GLIB_NETWORKING is not set +# BR2_PACKAGE_GSSDP is not set +# BR2_PACKAGE_GUPNP is not set +# BR2_PACKAGE_GUPNP_AV is not set +# BR2_PACKAGE_GUPNP_DLNA is not set +# BR2_PACKAGE_IBRCOMMON is not set +# BR2_PACKAGE_IBRDTN is not set # BR2_PACKAGE_LIBCGI is not set # BR2_PACKAGE_LIBCGICC is not set +# BR2_PACKAGE_LIBCOAP is not set +# BR2_PACKAGE_LIBCPPRESTSDK is not set # BR2_PACKAGE_LIBCURL is not set # BR2_PACKAGE_LIBDNET is not set # BR2_PACKAGE_LIBEXOSIP2 is not set # BR2_PACKAGE_LIBFCGI is not set # BR2_PACKAGE_LIBGSASL is not set +# BR2_PACKAGE_LIBHTP is not set +# BR2_PACKAGE_LIBHTTPPARSER is not set +# BR2_PACKAGE_LIBHTTPSERVER is not set # BR2_PACKAGE_LIBIDN is not set +# BR2_PACKAGE_LIBIDN2 is not set # BR2_PACKAGE_LIBISCSI is not set +# BR2_PACKAGE_LIBKRB5 is not set +# BR2_PACKAGE_LIBLDNS is not set +# BR2_PACKAGE_LIBMAXMINDDB is not set # BR2_PACKAGE_LIBMBUS is not set # BR2_PACKAGE_LIBMEMCACHED is not set # BR2_PACKAGE_LIBMICROHTTPD is not set +# BR2_PACKAGE_LIBMINIUPNPC is not set # BR2_PACKAGE_LIBMNL is not set # BR2_PACKAGE_LIBMODBUS is not set - -# -# libndp needs a toolchain w/ IPv6 -# -# BR2_PACKAGE_LIBNICE is not set +# BR2_PACKAGE_LIBMODSECURITY is not set +# BR2_PACKAGE_LIBNATPMP is not set +# BR2_PACKAGE_LIBNDP is not set +# BR2_PACKAGE_LIBNET is not set +# BR2_PACKAGE_LIBNETCONF2 is not set # BR2_PACKAGE_LIBNETFILTER_ACCT is not set # BR2_PACKAGE_LIBNETFILTER_CONNTRACK is not set # BR2_PACKAGE_LIBNETFILTER_CTHELPER is not set # BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT is not set # BR2_PACKAGE_LIBNETFILTER_LOG is not set +# BR2_PACKAGE_LIBNETFILTER_QUEUE is not set # BR2_PACKAGE_LIBNFNETLINK is not set - -# -# libnftnl needs a toolchain w/ IPv6, largefile -# +# BR2_PACKAGE_LIBNFTNL is not set +# BR2_PACKAGE_LIBNICE is not set +# BR2_PACKAGE_LIBNIDS is not set BR2_PACKAGE_LIBNL=y # BR2_PACKAGE_LIBNL_TOOLS is not set +# BR2_PACKAGE_LIBNPUPNP is not set # BR2_PACKAGE_LIBOAUTH is not set - -# -# liboping needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_LIBOPING is not set # BR2_PACKAGE_LIBOSIP2 is not set +# BR2_PACKAGE_LIBPAGEKITE is not set # BR2_PACKAGE_LIBPCAP is not set +# BR2_PACKAGE_LIBPJSIP is not set # BR2_PACKAGE_LIBRSYNC is not set - -# -# libshairplay needs a toolchain w/ IPv6, threads, dynamic library -# +# BR2_PACKAGE_LIBSHAIRPLAY is not set # BR2_PACKAGE_LIBSHOUT is not set # BR2_PACKAGE_LIBSOCKETCAN is not set # BR2_PACKAGE_LIBSOUP is not set # BR2_PACKAGE_LIBSRTP is not set # BR2_PACKAGE_LIBSTROPHE is not set +# BR2_PACKAGE_LIBTELNET is not set # BR2_PACKAGE_LIBTIRPC is not set # BR2_PACKAGE_LIBTORRENT is not set +# BR2_PACKAGE_LIBTORRENT_RASTERBAR is not set +# BR2_PACKAGE_LIBUHTTPD is not set # BR2_PACKAGE_LIBUPNP is not set +# BR2_PACKAGE_LIBUPNP18 is not set # BR2_PACKAGE_LIBUPNPP is not set # BR2_PACKAGE_LIBURIPARSER is not set +# BR2_PACKAGE_LIBUWSC is not set # BR2_PACKAGE_LIBVNCSERVER is not set # BR2_PACKAGE_LIBWEBSOCK is not set # BR2_PACKAGE_LIBWEBSOCKETS is not set +# BR2_PACKAGE_LIBYANG is not set +# BR2_PACKAGE_LKSCTP_TOOLS is not set +# BR2_PACKAGE_MBUFFER is not set +# BR2_PACKAGE_MONGOOSE is not set +# BR2_PACKAGE_NANOMSG is not set # BR2_PACKAGE_NEON is not set +# BR2_PACKAGE_NETOPEER2 is not set +# BR2_PACKAGE_NGHTTP2 is not set +# BR2_PACKAGE_NORM is not set + +# +# nss-myhostname needs a glibc toolchain +# + +# +# nss-pam-ldapd needs a glibc toolchain +# # BR2_PACKAGE_OMNIORB is not set # BR2_PACKAGE_OPENLDAP is not set +# BR2_PACKAGE_OPENMPI is not set +# BR2_PACKAGE_OPENPGM is not set +# BR2_PACKAGE_OPENZWAVE is not set +# BR2_PACKAGE_ORTP is not set +# BR2_PACKAGE_PAHO_MQTT_C is not set +# BR2_PACKAGE_PAHO_MQTT_CPP is not set # -# openpgm needs a toolchain w/ wchar, threads, IPv6 +# pistache needs a glibc toolchain w/ C++, gcc >= 4.9, threads, wchar # -# BR2_PACKAGE_ORTP is not set # BR2_PACKAGE_QDECODER is not set +# BR2_PACKAGE_QPID_PROTON is not set +# BR2_PACKAGE_RABBITMQ_C is not set +# BR2_PACKAGE_RESIPROCATE is not set +# BR2_PACKAGE_RESTCLIENT_CPP is not set # BR2_PACKAGE_RTMPDUMP is not set # BR2_PACKAGE_SLIRP is not set # BR2_PACKAGE_SNMPPP is not set # BR2_PACKAGE_SOFIA_SIP is not set +# BR2_PACKAGE_SYSREPO is not set # BR2_PACKAGE_THRIFT is not set # BR2_PACKAGE_USBREDIR is not set -# BR2_PACKAGE_WVSTREAMS is not set - -# -# zeromq needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# - -# -# zmqpp needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# - -# -# zyre needs a toolchain w/ C++, IPv6, largefile, wchar, threads -# +# BR2_PACKAGE_WAMPCC is not set +# BR2_PACKAGE_WEBSOCKETPP is not set +# BR2_PACKAGE_ZEROMQ is not set +# BR2_PACKAGE_ZMQPP is not set +# BR2_PACKAGE_ZYRE is not set # # Other @@ -1352,127 +2000,187 @@ BR2_PACKAGE_LIBNL=y # BR2_PACKAGE_APR_UTIL is not set BR2_PACKAGE_ARGP_STANDALONE=y # BR2_PACKAGE_ARMADILLO is not set -BR2_PACKAGE_BDWGC_ARCH_SUPPORTS=y +# BR2_PACKAGE_ATF is not set +# BR2_PACKAGE_AVRO_C is not set +# BR2_PACKAGE_BCTOOLBOX is not set # BR2_PACKAGE_BDWGC is not set +# BR2_PACKAGE_BELR is not set # BR2_PACKAGE_BOOST is not set +# BR2_PACKAGE_C_CAPNPROTO is not set +# BR2_PACKAGE_CAPNPROTO is not set +# BR2_PACKAGE_CCTZ is not set +# BR2_PACKAGE_CEREAL is not set +# BR2_PACKAGE_CLANG is not set # BR2_PACKAGE_CLAPACK is not set +# BR2_PACKAGE_CMOCKA is not set # BR2_PACKAGE_CPPCMS is not set +# BR2_PACKAGE_CRACKLIB is not set +# BR2_PACKAGE_DAWGDIC is not set # BR2_PACKAGE_DING_LIBS is not set # BR2_PACKAGE_EIGEN is not set # BR2_PACKAGE_ELFUTILS is not set +# BR2_PACKAGE_ELL is not set # BR2_PACKAGE_FFTW is not set # BR2_PACKAGE_FLANN is not set +# BR2_PACKAGE_FLATBUFFERS is not set +# BR2_PACKAGE_FLATCC is not set +# BR2_PACKAGE_GCONF is not set +# BR2_PACKAGE_GFLAGS is not set +# BR2_PACKAGE_GLI is not set # BR2_PACKAGE_GLIBMM is not set # BR2_PACKAGE_GLM is not set # BR2_PACKAGE_GMP is not set + +# +# gobject-introspection needs python3 +# + +# +# gobject-introspection needs a glibc toolchain, gcc >= 4.9 +# # BR2_PACKAGE_GSL is not set # BR2_PACKAGE_GTEST is not set -# BR2_PACKAGE_LIBARGTABLE2 is not set -BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS=y -# BR2_PACKAGE_LIBATOMIC_OPS is not set -BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS=y +BR2_PACKAGE_JEMALLOC_ARCH_SUPPORTS=y +# BR2_PACKAGE_JEMALLOC is not set # -# libbsd needs an (e)glibc toolchain w/ threads +# lapack/blas needs a toolchain w/ fortran # +BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBABSEIL_CPP is not set +# BR2_PACKAGE_LIBARGTABLE2 is not set +BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBATOMIC_OPS is not set +# BR2_PACKAGE_LIBAVL is not set +# BR2_PACKAGE_LIBB64 is not set +BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBBSD is not set # BR2_PACKAGE_LIBCAP is not set # BR2_PACKAGE_LIBCAP_NG is not set # -# libcgroup needs an (e)glibc toolchain w/ C++ +# libcgroup needs a glibc toolchain w/ C++ # +# BR2_PACKAGE_LIBCLC is not set # BR2_PACKAGE_LIBCOFI is not set +# BR2_PACKAGE_LIBCORRECT is not set +# BR2_PACKAGE_LIBCROCO is not set +# BR2_PACKAGE_LIBCROSSGUID is not set +# BR2_PACKAGE_LIBCSV is not set # BR2_PACKAGE_LIBDAEMON is not set # BR2_PACKAGE_LIBEE is not set # BR2_PACKAGE_LIBEV is not set -# BR2_PACKAGE_LIBEVDEV is not set +BR2_PACKAGE_LIBEVDEV=y # BR2_PACKAGE_LIBEVENT is not set -# BR2_PACKAGE_LIBFFI is not set -# BR2_PACKAGE_LIBGC is not set +BR2_PACKAGE_LIBFFI=y +# BR2_PACKAGE_LIBGEE is not set # BR2_PACKAGE_LIBGLIB2 is not set +# BR2_PACKAGE_LIBGLOB is not set # BR2_PACKAGE_LIBICAL is not set +# BR2_PACKAGE_LIBITE is not set # BR2_PACKAGE_LIBLINEAR is not set +# BR2_PACKAGE_LIBLOKI is not set +# BR2_PACKAGE_LIBNPTH is not set BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT=y # BR2_PACKAGE_LIBNSPR is not set # BR2_PACKAGE_LIBPFM4 is not set # BR2_PACKAGE_LIBPLIST is not set -# BR2_PACKAGE_LIBPTHREAD_STUBS is not set +BR2_PACKAGE_LIBPTHREAD_STUBS=y # BR2_PACKAGE_LIBPTHSEM is not set +# BR2_PACKAGE_LIBPWQUALITY is not set +BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBSECCOMP is not set # BR2_PACKAGE_LIBSIGC is not set +BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBSIGSEGV is not set +# BR2_PACKAGE_LIBSPATIALINDEX is not set # BR2_PACKAGE_LIBTASN1 is not set +# BR2_PACKAGE_LIBTOMMATH is not set # BR2_PACKAGE_LIBTPL is not set # BR2_PACKAGE_LIBUBOX is not set # BR2_PACKAGE_LIBUCI is not set - -# -# libunwind needs a uclibc snapshot or (e)glibc toolchain w/ threads -# +BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS=y +# BR2_PACKAGE_LIBUNWIND is not set +BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBURCU is not set - -# -# libuv needs a toolchain w/ IPv6, threads -# +# BR2_PACKAGE_LIBUV is not set # BR2_PACKAGE_LIGHTNING is not set +# BR2_PACKAGE_LINUX_PAM is not set # -# linux-pam needs a toolchain w/ wchar, locale, dynamic library +# liquid-dsp requires a glibc or musl toolchain w/ dynamic library # +BR2_PACKAGE_LLVM_ARCH_SUPPORTS=y +BR2_PACKAGE_LLVM_TARGET_ARCH="ARM" +# BR2_PACKAGE_LLVM is not set # BR2_PACKAGE_LTTNG_LIBUST is not set +# BR2_PACKAGE_MATIO is not set # BR2_PACKAGE_MPC is not set # BR2_PACKAGE_MPDECIMAL is not set # BR2_PACKAGE_MPFR is not set +# BR2_PACKAGE_MPIR is not set # BR2_PACKAGE_MSGPACK is not set -# BR2_PACKAGE_MTDEV2TUIO is not set +# BR2_PACKAGE_MUSL_FTS is not set # BR2_PACKAGE_ORC is not set # BR2_PACKAGE_P11_KIT is not set +BR2_PACKAGE_POCO_ARCH_SUPPORTS=y # BR2_PACKAGE_POCO is not set -# BR2_PACKAGE_PROTOBUF is not set -# BR2_PACKAGE_PROTOBUF_C is not set # BR2_PACKAGE_QHULL is not set # BR2_PACKAGE_QLIBC is not set +# BR2_PACKAGE_SHAPELIB is not set +# BR2_PACKAGE_SKALIBS is not set +# BR2_PACKAGE_SPHINXBASE is not set +# BR2_PACKAGE_TINYCBOR is not set +# BR2_PACKAGE_UVW is not set +# BR2_PACKAGE_XAPIAN is not set # # Security # +# BR2_PACKAGE_LIBAPPARMOR is not set # BR2_PACKAGE_LIBSELINUX is not set # BR2_PACKAGE_LIBSEMANAGE is not set # BR2_PACKAGE_LIBSEPOL is not set +# BR2_PACKAGE_SAFECLIB is not set # # Text and terminal handling # +# BR2_PACKAGE_AUGEAS is not set # BR2_PACKAGE_ENCHANT is not set -# BR2_PACKAGE_ICU is not set +# BR2_PACKAGE_FMT is not set +# BR2_PACKAGE_FSTRCMP is not set +BR2_PACKAGE_ICU=y +BR2_PACKAGE_ICU_CUSTOM_DATA_PATH="" # BR2_PACKAGE_LIBCLI is not set # BR2_PACKAGE_LIBEDIT is not set # BR2_PACKAGE_LIBENCA is not set # BR2_PACKAGE_LIBESTR is not set # BR2_PACKAGE_LIBFRIBIDI is not set -BR2_PACKAGE_LIBICONV=y # BR2_PACKAGE_LIBUNISTRING is not set # BR2_PACKAGE_LINENOISE is not set BR2_PACKAGE_NCURSES=y # BR2_PACKAGE_NCURSES_WCHAR is not set -# BR2_PACKAGE_NCURSES_TARGET_PANEL is not set -# BR2_PACKAGE_NCURSES_TARGET_FORM is not set -# BR2_PACKAGE_NCURSES_TARGET_MENU is not set # BR2_PACKAGE_NCURSES_TARGET_PROGS is not set +BR2_PACKAGE_NCURSES_ADDITIONAL_TERMINFO="" # BR2_PACKAGE_NEWT is not set +# BR2_PACKAGE_ONIGURUMA is not set # BR2_PACKAGE_PCRE is not set +BR2_PACKAGE_PCRE2=y +BR2_PACKAGE_PCRE2_16=y +# BR2_PACKAGE_PCRE2_32 is not set +BR2_PACKAGE_PCRE2_JIT_ARCH_SUPPORTS=y +# BR2_PACKAGE_PCRE2_JIT is not set BR2_PACKAGE_POPT=y # BR2_PACKAGE_READLINE is not set # BR2_PACKAGE_SLANG is not set # BR2_PACKAGE_TCLAP is not set -# BR2_PACKAGE_USTR is not set +# BR2_PACKAGE_UTF8PROC is not set # # Mail # - -# -# dovecot needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_DOVECOT is not set # BR2_PACKAGE_EXIM is not set # BR2_PACKAGE_FETCHMAIL is not set # BR2_PACKAGE_HEIRLOOM_MAILX is not set @@ -1485,249 +2193,271 @@ BR2_PACKAGE_POPT=y # # BR2_PACKAGE_AESPIPE is not set # BR2_PACKAGE_BC is not set +BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS=y +# BR2_PACKAGE_BITCOIN is not set # BR2_PACKAGE_CLAMAV is not set +# BR2_PACKAGE_COLLECTD is not set +# BR2_PACKAGE_COLLECTL is not set # -# collectd needs a toolchain w/ IPv6, threads, dynamic library +# domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 4.8, NPTL, wchar, dynamic library # # BR2_PACKAGE_EMPTY is not set +# BR2_PACKAGE_GNURADIO is not set # BR2_PACKAGE_GOOGLEFONTDIRECTORY is not set + +# +# gqrx needs a toolchain w/ C++, threads, wchar, dynamic library +# +# BR2_PACKAGE_GQRX is not set +# BR2_PACKAGE_GSETTINGS_DESKTOP_SCHEMAS is not set # BR2_PACKAGE_HAVEGED is not set +# BR2_PACKAGE_LINUX_SYSCALL_SUPPORT is not set # BR2_PACKAGE_MCRYPT is not set # BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO is not set +# BR2_PACKAGE_NETDATA is not set +# BR2_PACKAGE_PROJ is not set +BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET=y +# BR2_PACKAGE_QEMU is not set +# BR2_PACKAGE_QPDF is not set # BR2_PACKAGE_SHARED_MIME_INFO is not set -# BR2_PACKAGE_SNOWBALL_INIT is not set -# BR2_PACKAGE_SOUND_THEME_BOREALIS is not set -# BR2_PACKAGE_SOUND_THEME_FREEDESKTOP is not set +# BR2_PACKAGE_SUNWAIT is not set +# BR2_PACKAGE_TASKD is not set +# BR2_PACKAGE_XUTIL_UTIL_MACROS is not set # # Networking applications # - -# -# aiccu needs a toolchain w/ IPv6, wchar, threads -# # BR2_PACKAGE_AIRCRACK_NG is not set - -# -# argus needs a toolchain w/ threads, IPv6 -# +# BR2_PACKAGE_AOETOOLS is not set +# BR2_PACKAGE_APACHE is not set +# BR2_PACKAGE_ARGUS is not set +# BR2_PACKAGE_ARP_SCAN is not set # BR2_PACKAGE_ARPTABLES is not set - -# -# atftp needs a toolchain w/ threads, IPv6 -# +# BR2_PACKAGE_ASTERISK is not set +# BR2_PACKAGE_ATFTP is not set # BR2_PACKAGE_AUTOSSH is not set # BR2_PACKAGE_AVAHI is not set # BR2_PACKAGE_AXEL is not set +# BR2_PACKAGE_BABELD is not set # BR2_PACKAGE_BANDWIDTHD is not set +# BR2_PACKAGE_BATCTL is not set # BR2_PACKAGE_BCUSDK is not set - -# -# bind needs a toolchain w/ largefile, IPv6, dynamic library -# -# BR2_PACKAGE_BLUEZ_UTILS is not set - -# -# bluez5-utils needs a toolchain w/ wchar, threads, IPv6, headers >= 3.4, dynamic library -# +# BR2_PACKAGE_BIND is not set +# BR2_PACKAGE_BIRD is not set +# BR2_PACKAGE_BLUEZ5_UTILS is not set # BR2_PACKAGE_BMON is not set # BR2_PACKAGE_BOA is not set +# BR2_PACKAGE_BOINC is not set +# BR2_PACKAGE_BRCM_PATCHRAM_PLUS is not set # BR2_PACKAGE_BRIDGE_UTILS is not set # BR2_PACKAGE_BWM_NG is not set +# BR2_PACKAGE_C_ICAP is not set # BR2_PACKAGE_CAN_UTILS is not set +# BR2_PACKAGE_CANNELLONI is not set # BR2_PACKAGE_CHRONY is not set # BR2_PACKAGE_CIVETWEB is not set +# BR2_PACKAGE_CONNMAN is not set # -# connman needs a toolchain w/ IPv6, wchar, threads, resolver, dynamic library -# - -# -# conntrack-tools needs a toolchain w/ IPv6, largefile, threads +# connman-gtk needs libgtk3 and a glibc or uClibc toolchain w/ wchar, threads, resolver, dynamic library # +# BR2_PACKAGE_CONNTRACK_TOOLS is not set +# BR2_PACKAGE_CORKSCREW is not set # BR2_PACKAGE_CRDA is not set # BR2_PACKAGE_CTORRENT is not set # BR2_PACKAGE_CUPS is not set +# BR2_PACKAGE_DANTE is not set +# BR2_PACKAGE_DARKHTTPD is not set +# BR2_PACKAGE_DEHYDRATED is not set # BR2_PACKAGE_DHCP is not set BR2_PACKAGE_DHCPCD=y # BR2_PACKAGE_DHCPDUMP is not set # BR2_PACKAGE_DNSMASQ is not set +# BR2_PACKAGE_DRBD_UTILS is not set BR2_PACKAGE_DROPBEAR=y +BR2_PACKAGE_DROPBEAR_CLIENT=y # BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS is not set BR2_PACKAGE_DROPBEAR_SMALL=y # BR2_PACKAGE_DROPBEAR_WTMP is not set # BR2_PACKAGE_DROPBEAR_LASTLOG is not set +# BR2_PACKAGE_DROPBEAR_LEGACY_CRYPTO is not set +BR2_PACKAGE_DROPBEAR_LOCALOPTIONS_FILE="" +# BR2_PACKAGE_EBTABLES is not set # -# ebtables needs a toolchain w/ IPv6 +# ejabberd needs erlang, toolchain w/ C++ # # BR2_PACKAGE_ETHTOOL is not set # BR2_PACKAGE_FAIFA is not set +# BR2_PACKAGE_FASTD is not set +# BR2_PACKAGE_FCGIWRAP is not set # BR2_PACKAGE_FPING is not set +# BR2_PACKAGE_FREESWITCH is not set +# BR2_PACKAGE_GERBERA is not set # BR2_PACKAGE_GESFTPSERVER is not set +# BR2_PACKAGE_GLOOX is not set +# BR2_PACKAGE_GLORYTUN is not set + +# +# gupnp-tools needs libgtk3 +# +# BR2_PACKAGE_HANS is not set +BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS=y +# BR2_PACKAGE_HAPROXY is not set # BR2_PACKAGE_HIAWATHA is not set # BR2_PACKAGE_HOSTAPD is not set # BR2_PACKAGE_HTTPING is not set +# BR2_PACKAGE_I2PD is not set +# BR2_PACKAGE_IBRDTN_TOOLS is not set +# BR2_PACKAGE_IBRDTND is not set +# BR2_PACKAGE_IFENSLAVE is not set +# BR2_PACKAGE_IFMETRIC is not set # BR2_PACKAGE_IFPLUGD is not set - -# -# iftop needs a toolchain w/ IPv6, threads -# - -# -# ifupdown needs an (e)glibc or musl toolchain -# +# BR2_PACKAGE_IFTOP is not set +# BR2_PACKAGE_IFUPDOWN is not set +BR2_PACKAGE_IFUPDOWN_SCRIPTS=y +# BR2_PACKAGE_IGD2_FOR_LINUX is not set # BR2_PACKAGE_IGH_ETHERCAT is not set # BR2_PACKAGE_IGMPPROXY is not set # BR2_PACKAGE_INADYN is not set +# BR2_PACKAGE_IODINE is not set # BR2_PACKAGE_IPERF is not set # BR2_PACKAGE_IPERF3 is not set # BR2_PACKAGE_IPROUTE2 is not set # BR2_PACKAGE_IPSEC_TOOLS is not set # BR2_PACKAGE_IPSET is not set # BR2_PACKAGE_IPTABLES is not set - -# -# iptraf-ng needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_IPTRAF_NG is not set # BR2_PACKAGE_IPUTILS is not set +# BR2_PACKAGE_IRSSI is not set # BR2_PACKAGE_IW is not set +# BR2_PACKAGE_IWD is not set # BR2_PACKAGE_JANUS_GATEWAY is not set +# BR2_PACKAGE_KEEPALIVED is not set # BR2_PACKAGE_KISMET is not set # BR2_PACKAGE_KNOCK is not set # BR2_PACKAGE_LEAFNODE2 is not set +# BR2_PACKAGE_LFT is not set # BR2_PACKAGE_LFTP is not set # BR2_PACKAGE_LIGHTTPD is not set # BR2_PACKAGE_LINKNX is not set # BR2_PACKAGE_LINKS is not set - -# -# linphone needs a toolchain w/ threads, C++, IPv6 -# +# BR2_PACKAGE_LINPHONE is not set # BR2_PACKAGE_LINUX_ZIGBEE is not set +# BR2_PACKAGE_LINUXPTP is not set +# BR2_PACKAGE_LLDPD is not set # BR2_PACKAGE_LRZSZ is not set +# BR2_PACKAGE_LYNX is not set # BR2_PACKAGE_MACCHANGER is not set # BR2_PACKAGE_MEMCACHED is not set # BR2_PACKAGE_MII_DIAG is not set - -# -# minidlna needs a toolchain w/ largefile, IPv6, threads, wchar -# - -# -# modemmanager needs udev /dev management and a toolchain w/ largefile, wchar, threads, IPv6 -# -# BR2_PACKAGE_MONGOOSE is not set - -# -# mongrel2 needs a toolchain w/ C++, IPv6, threads, largefile, wchar -# +# BR2_PACKAGE_MINI_SNMPD is not set +# BR2_PACKAGE_MINIDLNA is not set +# BR2_PACKAGE_MINISSDPD is not set +# BR2_PACKAGE_MJPG_STREAMER is not set +# BR2_PACKAGE_MODEM_MANAGER is not set +BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS=y +# BR2_PACKAGE_MONGREL2 is not set +# BR2_PACKAGE_MONKEY is not set +# BR2_PACKAGE_MOSQUITTO is not set # BR2_PACKAGE_MROUTED is not set # BR2_PACKAGE_MTR is not set # BR2_PACKAGE_NBD is not set # BR2_PACKAGE_NCFTP is not set - -# -# ndisc6 needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_NDISC6 is not set +# BR2_PACKAGE_NET_TOOLS is not set # BR2_PACKAGE_NETATALK is not set # BR2_PACKAGE_NETCAT is not set # -# netcat-openbsd needs an (e)glibc toolchain w/ threads +# netcat-openbsd needs a glibc toolchain w/ threads, headers >= 3.12 # # BR2_PACKAGE_NETPLUG is not set # BR2_PACKAGE_NETSNMP is not set # BR2_PACKAGE_NETSTAT_NAT is not set -# BR2_PACKAGE_NET_TOOLS is not set # -# NetworkManager needs udev /dev management and a toolchain w/ IPv6, largefile, wchar, threads, headers >= 3.7 +# NetworkManager needs udev /dev management and a glibc toolchain w/ headers >= 3.2, dynamic library, wchar, threads # # BR2_PACKAGE_NFACCT is not set - -# -# nftables needs a toolchain w/ IPv6, largefile, wchar, headers >= 3.4 -# +# BR2_PACKAGE_NFTABLES is not set # BR2_PACKAGE_NGINX is not set # BR2_PACKAGE_NGIRCD is not set # BR2_PACKAGE_NGREP is not set - -# -# nmap needs a toolchain w/ C++, IPv6, threads -# +# BR2_PACKAGE_NLOAD is not set +# BR2_PACKAGE_NMAP is not set # BR2_PACKAGE_NOIP is not set # BR2_PACKAGE_NTP is not set # BR2_PACKAGE_NUTTCP is not set +# BR2_PACKAGE_ODHCP6C is not set # BR2_PACKAGE_ODHCPLOC is not set - -# -# olsr needs a toolchain w/ IPv6, threads -# - -# -# openntpd needs a toolchain w/ NPTL, IPv6 -# - -# -# openobex needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_OLSR is not set +# BR2_PACKAGE_OPEN_LLDP is not set +# BR2_PACKAGE_OPEN_PLC_UTILS is not set +# BR2_PACKAGE_OPENNTPD is not set +# BR2_PACKAGE_OPENOBEX is not set +# BR2_PACKAGE_OPENRESOLV is not set # BR2_PACKAGE_OPENSSH is not set # BR2_PACKAGE_OPENSWAN is not set - -# -# openvpn needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_OPENVPN is not set # BR2_PACKAGE_P910ND is not set +# BR2_PACKAGE_PARPROUTED is not set # BR2_PACKAGE_PHIDGETWEBSERVICE is not set - -# -# portmap needs a toolchain w/ RPC -# +# BR2_PACKAGE_PHYTOOL is not set +# BR2_PACKAGE_PIMD is not set +# BR2_PACKAGE_PIXIEWPS is not set +# BR2_PACKAGE_POUND is not set # BR2_PACKAGE_PPPD is not set # BR2_PACKAGE_PPTP_LINUX is not set +# BR2_PACKAGE_PRIVOXY is not set # BR2_PACKAGE_PROFTPD is not set + +# +# prosody needs the lua interpreter, dynamic library +# # BR2_PACKAGE_PROXYCHAINS_NG is not set # BR2_PACKAGE_PTPD is not set # BR2_PACKAGE_PTPD2 is not set # BR2_PACKAGE_PURE_FTPD is not set +# BR2_PACKAGE_PUTTY is not set # BR2_PACKAGE_QUAGGA is not set # -# radvd needs a toolchain w/ IPv6 +# rabbitmq-server needs erlang # +# BR2_PACKAGE_RADVD is not set +# BR2_PACKAGE_REAVER is not set +# BR2_PACKAGE_RP_PPPOE is not set # BR2_PACKAGE_RPCBIND is not set # BR2_PACKAGE_RSH_REDONE is not set -BR2_PACKAGE_RSYNC=y +# BR2_PACKAGE_RSYNC is not set # BR2_PACKAGE_RTORRENT is not set # BR2_PACKAGE_RTPTOOLS is not set -# BR2_PACKAGE_SAMBA is not set - -# -# samba4 needs a toolchain w/ IPv6, wchar, largfile, threads -# +# BR2_PACKAGE_RYGEL is not set +# BR2_PACKAGE_S6_DNS is not set +# BR2_PACKAGE_S6_NETWORKING is not set +# BR2_PACKAGE_SAMBA4 is not set # BR2_PACKAGE_SCONESERVER is not set - -# -# ser2net needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_SER2NET is not set +# BR2_PACKAGE_SHADOWSOCKS_LIBEV is not set # BR2_PACKAGE_SHAIRPORT_SYNC is not set - -# -# smcroute needs a toolchain w/ IPv6 -# +# BR2_PACKAGE_SHELLINABOX is not set +# BR2_PACKAGE_SMCROUTE is not set +# BR2_PACKAGE_SNGREP is not set +# BR2_PACKAGE_SNORT is not set # BR2_PACKAGE_SOCAT is not set # BR2_PACKAGE_SOCKETCAND is not set +# BR2_PACKAGE_SOFTETHER is not set # BR2_PACKAGE_SPAWN_FCGI is not set # BR2_PACKAGE_SPICE_PROTOCOL is not set - -# -# squid needs a toolchain w/ C++, IPv6, headers >= 3.0 -# +# BR2_PACKAGE_SQUID is not set +# BR2_PACKAGE_SSHGUARD is not set # BR2_PACKAGE_SSHPASS is not set +# BR2_PACKAGE_SSLH is not set # BR2_PACKAGE_STRONGSWAN is not set # BR2_PACKAGE_STUNNEL is not set +# BR2_PACKAGE_SURICATA is not set # BR2_PACKAGE_TCPDUMP is not set # BR2_PACKAGE_TCPING is not set # BR2_PACKAGE_TCPREPLAY is not set @@ -1735,44 +2465,53 @@ BR2_PACKAGE_RSYNC=y # BR2_PACKAGE_THTTPD is not set # BR2_PACKAGE_TINC is not set # BR2_PACKAGE_TINYHTTPD is not set -# BR2_PACKAGE_TN5250 is not set - -# -# transmission needs a toolchain w/ IPv6, threads -# - -# -# tvheadend needs a toolchain w/ largefile, IPv6, NPTL, headers >= 3.2 -# +# BR2_PACKAGE_TINYPROXY is not set +# BR2_PACKAGE_TINYSSH is not set +# BR2_PACKAGE_TOR is not set +# BR2_PACKAGE_TRACEROUTE is not set +# BR2_PACKAGE_TRANSMISSION is not set +# BR2_PACKAGE_TUNCTL is not set +# BR2_PACKAGE_TVHEADEND is not set +# BR2_PACKAGE_UACME is not set # BR2_PACKAGE_UDPCAST is not set +# BR2_PACKAGE_UFTP is not set +# BR2_PACKAGE_UHTTPD is not set +# BR2_PACKAGE_ULOGD is not set +# BR2_PACKAGE_UNBOUND is not set # BR2_PACKAGE_USHARE is not set +# BR2_PACKAGE_USSP_PUSH is not set +# BR2_PACKAGE_VDE2 is not set # -# ussp-push needs a toolchain w/ wchar, IPv6, threads, dynamic library +# vdr needs a glibc toolchain w/ C++, dynamic library, NPTL, wchar, headers >= 3.9 # -# BR2_PACKAGE_VDE2 is not set # BR2_PACKAGE_VNSTAT is not set # BR2_PACKAGE_VPNC is not set # BR2_PACKAGE_VSFTPD is not set # BR2_PACKAGE_VTUN is not set +# BR2_PACKAGE_WAVEMON is not set BR2_PACKAGE_WGET=y # BR2_PACKAGE_WHOIS is not set -BR2_PACKAGE_WIRELESS_REGDB=y +# BR2_PACKAGE_WIREGUARD_LINUX_COMPAT is not set +# BR2_PACKAGE_WIREGUARD_TOOLS is not set +# BR2_PACKAGE_WIRELESS_REGDB is not set # BR2_PACKAGE_WIRELESS_TOOLS is not set # BR2_PACKAGE_WIRESHARK is not set BR2_PACKAGE_WPA_SUPPLICANT=y BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y # BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT is not set +# BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN is not set BR2_PACKAGE_WPA_SUPPLICANT_EAP=y # BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT is not set BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG=y BR2_PACKAGE_WPA_SUPPLICANT_WPS=y -BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_WPA_SUPPLICANT_WPA3=y +# BR2_PACKAGE_WPA_SUPPLICANT_CLI is not set +# BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO is not set # BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE is not set -# BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD is not set -BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW=y +BR2_PACKAGE_WPA_SUPPLICANT_DBUS=y # BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION is not set -# BR2_PACKAGE_WVDIAL is not set +# BR2_PACKAGE_WPAN_TOOLS is not set # BR2_PACKAGE_XINETD is not set # BR2_PACKAGE_XL2TP is not set # BR2_PACKAGE_XTABLES_ADDONS is not set @@ -1781,15 +2520,89 @@ BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW=y # # Package managers # -# BR2_PACKAGE_IPKG is not set + +# +# ------------------------------------------------------- +# + +# +# Please note: +# + +# +# - Buildroot does *not* generate binary packages, +# + +# +# - Buildroot does *not* install any package database. +# + +# +# * +# + +# +# It is up to you to provide those by yourself if you +# + +# +# want to use any of those package managers. +# + +# +# * +# + +# +# See the manual: +# + +# +# http://buildroot.org/manual.html#faq-no-binary-packages +# + +# +# ------------------------------------------------------- +# # BR2_PACKAGE_OPKG is not set # BR2_PACKAGE_RPM is not set +# +# PINN packages +# +BR2_PACKAGE_ARORA=y +BR2_PACKAGE_REBOOTP=y +BR2_PACKAGE_RECOVERY=y + # # Real-Time # +BR2_PACKAGE_XENOMAI_COBALT_ARCH_SUPPORTS=y # BR2_PACKAGE_XENOMAI is not set +# +# Security +# +# BR2_PACKAGE_APPARMOR is not set +# BR2_PACKAGE_CHECKPOLICY is not set +# BR2_PACKAGE_IMA_EVM_UTILS is not set +# BR2_PACKAGE_OPTEE_BENCHMARK is not set +# BR2_PACKAGE_OPTEE_CLIENT is not set + +# +# paxtest needs a glibc toolchain +# +# BR2_PACKAGE_POLICYCOREUTILS is not set +# BR2_PACKAGE_REFPOLICY is not set +# BR2_PACKAGE_RESTORECOND is not set +# BR2_PACKAGE_SELINUX_PYTHON is not set +# BR2_PACKAGE_SEMODULE_UTILS is not set + +# +# setools needs python3 +# +BR2_PACKAGE_URANDOM_SCRIPTS=y + # # Shell and utilities # @@ -1799,6 +2612,7 @@ BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW=y # # BR2_PACKAGE_BASH is not set # BR2_PACKAGE_DASH is not set +# BR2_PACKAGE_MKSH is not set # BR2_PACKAGE_ZSH is not set # @@ -1808,6 +2622,7 @@ BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW=y # BR2_PACKAGE_CCRYPT is not set # BR2_PACKAGE_DIALOG is not set # BR2_PACKAGE_DTACH is not set +# BR2_PACKAGE_EASY_RSA is not set # BR2_PACKAGE_FILE is not set # BR2_PACKAGE_GNUPG is not set # BR2_PACKAGE_GNUPG2 is not set @@ -1815,104 +2630,187 @@ BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW=y # BR2_PACKAGE_LOCKFILE_PROGS is not set # BR2_PACKAGE_LOGROTATE is not set # BR2_PACKAGE_LOGSURFER is not set +# BR2_PACKAGE_PDMENU is not set # BR2_PACKAGE_PINENTRY is not set +# BR2_PACKAGE_RANGER is not set +# BR2_PACKAGE_RTTY is not set # BR2_PACKAGE_SCREEN is not set # BR2_PACKAGE_SUDO is not set # BR2_PACKAGE_TIME is not set +# BR2_PACKAGE_TINI is not set # BR2_PACKAGE_TMUX is not set +# BR2_PACKAGE_TTYD is not set # BR2_PACKAGE_WHICH is not set # BR2_PACKAGE_XMLSTARLET is not set +# BR2_PACKAGE_XXHASH is not set +# BR2_PACKAGE_YTREE is not set # # System tools # BR2_PACKAGE_ACL=y +# BR2_PACKAGE_ANDROID_TOOLS is not set +# BR2_PACKAGE_ATOP is not set BR2_PACKAGE_ATTR=y -# BR2_PACKAGE_BOOTUTILS is not set +BR2_PACKAGE_AUDIT_ARCH_SUPPORTS=y +# BR2_PACKAGE_AUDIT is not set +# BR2_PACKAGE_BUBBLEWRAP is not set +# BR2_PACKAGE_CGROUPFS_MOUNT is not set + +# +# circus needs Python 3 and a toolchain w/ C++, threads +# # BR2_PACKAGE_COREUTILS is not set # BR2_PACKAGE_CPULOAD is not set +# BR2_PACKAGE_DAEMON is not set +# BR2_PACKAGE_DC3DD is not set # BR2_PACKAGE_DCRON is not set +# BR2_PACKAGE_DDRESCUE is not set # BR2_PACKAGE_DEBIANUTILS is not set +# BR2_PACKAGE_DOCKER_COMPOSE is not set +# BR2_PACKAGE_EARLYOOM is not set +# BR2_PACKAGE_EFIBOOTMGR is not set +BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS=y +# BR2_PACKAGE_EFIVAR is not set +# BR2_PACKAGE_EMLOG is not set # BR2_PACKAGE_FTOP is not set # BR2_PACKAGE_GETENT is not set # BR2_PACKAGE_HTOP is not set +# BR2_PACKAGE_IBM_SW_TPM2 is not set +BR2_PACKAGE_INITSCRIPTS=y + +# +# iotop depends on python or python3 +# # BR2_PACKAGE_IPRUTILS is not set # BR2_PACKAGE_IRQBALANCE is not set # BR2_PACKAGE_KEYUTILS is not set -# BR2_PACKAGE_KMOD is not set +BR2_PACKAGE_KMOD=y +# BR2_PACKAGE_KMOD_TOOLS is not set # -# lxc needs a toolchain w/ IPv6, threads, largefile, headers >= 3.0 +# kvmtool needs a glibc or musl toolchain w/ dynamic library # +# BR2_PACKAGE_LIBOSTREE is not set +# BR2_PACKAGE_MFOC is not set # BR2_PACKAGE_MONIT is not set # BR2_PACKAGE_NCDU is not set + +# +# netifrc needs openrc as init system +# # BR2_PACKAGE_NUT is not set -# BR2_PACKAGE_POLKIT is not set + +# +# pamtester depends on linux-pam +# + +# +# polkit needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9 +# # BR2_PACKAGE_PROCPS_NG is not set +# BR2_PACKAGE_PROCRANK_LINUX is not set # BR2_PACKAGE_PSMISC is not set # BR2_PACKAGE_PWGEN is not set # BR2_PACKAGE_QUOTA is not set +# BR2_PACKAGE_QUOTATOOL is not set +# BR2_PACKAGE_RAUC is not set # BR2_PACKAGE_RSYSLOG is not set +# BR2_PACKAGE_S6 is not set +# BR2_PACKAGE_S6_LINUX_INIT is not set +# BR2_PACKAGE_S6_LINUX_UTILS is not set +# BR2_PACKAGE_S6_PORTABLE_UTILS is not set +# BR2_PACKAGE_S6_RC is not set +# BR2_PACKAGE_SCRUB is not set +# BR2_PACKAGE_SCRYPT is not set + +# +# sdbusplus needs systemd and a toolchain w/ C++, gcc >= 7 +# # BR2_PACKAGE_SMACK is not set # BR2_PACKAGE_START_STOP_DAEMON is not set # -# supervisor needs the python interpreter +# supervisor needs a python interpreter # +# BR2_PACKAGE_SWUPDATE is not set # BR2_PACKAGE_SYSKLOGD is not set +# BR2_PACKAGE_SYSLOG_NG is not set BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS=y +BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS=y +# BR2_PACKAGE_TAR is not set +# BR2_PACKAGE_TPM_TOOLS is not set +# BR2_PACKAGE_TPM2_ABRMD is not set +# BR2_PACKAGE_TPM2_TOOLS is not set +# BR2_PACKAGE_TPM2_TOTP is not set + +# +# unscd needs a glibc toolchain +# BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y +# BR2_PACKAGE_UTIL_LINUX_LIBFDISK is not set BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS=y BR2_PACKAGE_UTIL_LINUX_LIBUUID=y -BR2_PACKAGE_UTIL_LINUX_BINARIES=y +# BR2_PACKAGE_UTIL_LINUX_BINARIES is not set # BR2_PACKAGE_UTIL_LINUX_AGETTY is not set -# BR2_PACKAGE_UTIL_LINUX_ARCH is not set # BR2_PACKAGE_UTIL_LINUX_BFS is not set - -# -# chfn/chsh needs a toolchain w/ wchar, locale, dynamic library -# +# BR2_PACKAGE_UTIL_LINUX_CAL is not set +# BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH is not set +# BR2_PACKAGE_UTIL_LINUX_CHMEM is not set # BR2_PACKAGE_UTIL_LINUX_CRAMFS is not set -# BR2_PACKAGE_UTIL_LINUX_DDATE is not set # BR2_PACKAGE_UTIL_LINUX_EJECT is not set # BR2_PACKAGE_UTIL_LINUX_FALLOCATE is not set # BR2_PACKAGE_UTIL_LINUX_FDFORMAT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set +# BR2_PACKAGE_UTIL_LINUX_HARDLINK is not set # BR2_PACKAGE_UTIL_LINUX_HWCLOCK is not set +# BR2_PACKAGE_UTIL_LINUX_IPCRM is not set +# BR2_PACKAGE_UTIL_LINUX_IPCS is not set # BR2_PACKAGE_UTIL_LINUX_KILL is not set # BR2_PACKAGE_UTIL_LINUX_LAST is not set - -# -# login utilities needs a toolchain w/ wchar, locale, dynamic library -# +# BR2_PACKAGE_UTIL_LINUX_LINE is not set +# BR2_PACKAGE_UTIL_LINUX_LOGGER is not set +# BR2_PACKAGE_UTIL_LINUX_LOGIN is not set # BR2_PACKAGE_UTIL_LINUX_LOSETUP is not set +# BR2_PACKAGE_UTIL_LINUX_LSLOGINS is not set +# BR2_PACKAGE_UTIL_LINUX_LSMEM is not set # BR2_PACKAGE_UTIL_LINUX_MESG is not set # BR2_PACKAGE_UTIL_LINUX_MINIX is not set -# BR2_PACKAGE_UTIL_LINUX_NSENTER is not set # BR2_PACKAGE_UTIL_LINUX_MORE is not set BR2_PACKAGE_UTIL_LINUX_MOUNT=y # BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT is not set # BR2_PACKAGE_UTIL_LINUX_NEWGRP is not set # BR2_PACKAGE_UTIL_LINUX_NOLOGIN is not set -# BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT is not set +# BR2_PACKAGE_UTIL_LINUX_NSENTER is not set +# BR2_PACKAGE_UTIL_LINUX_PG is not set BR2_PACKAGE_UTIL_LINUX_PARTX=y +# BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT is not set # BR2_PACKAGE_UTIL_LINUX_RAW is not set # BR2_PACKAGE_UTIL_LINUX_RENAME is not set -# BR2_PACKAGE_UTIL_LINUX_RESET is not set +# BR2_PACKAGE_UTIL_LINUX_RFKILL is not set +# BR2_PACKAGE_UTIL_LINUX_RUNUSER is not set # BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS is not set # BR2_PACKAGE_UTIL_LINUX_SETPRIV is not set # BR2_PACKAGE_UTIL_LINUX_SETTERM is not set +# BR2_PACKAGE_UTIL_LINUX_SU is not set +# BR2_PACKAGE_UTIL_LINUX_SULOGIN is not set # BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT is not set +# BR2_PACKAGE_UTIL_LINUX_TUNELP is not set # BR2_PACKAGE_UTIL_LINUX_UL is not set # BR2_PACKAGE_UTIL_LINUX_UNSHARE is not set # BR2_PACKAGE_UTIL_LINUX_UTMPDUMP is not set # BR2_PACKAGE_UTIL_LINUX_UUIDD is not set # BR2_PACKAGE_UTIL_LINUX_VIPW is not set # BR2_PACKAGE_UTIL_LINUX_WALL is not set +# BR2_PACKAGE_UTIL_LINUX_WIPEFS is not set # BR2_PACKAGE_UTIL_LINUX_WDCTL is not set # BR2_PACKAGE_UTIL_LINUX_WRITE is not set +# BR2_PACKAGE_UTIL_LINUX_ZRAMCTL is not set +# BR2_PACKAGE_XDG_DBUS_PROXY is not set +BR2_PACKAGE_XVISOR_ARCH_SUPPORTS=y +# BR2_PACKAGE_XVISOR is not set # # Text editors and viewers @@ -1920,6 +2818,8 @@ BR2_PACKAGE_UTIL_LINUX_PARTX=y # BR2_PACKAGE_ED is not set # BR2_PACKAGE_JOE is not set # BR2_PACKAGE_LESS is not set +# BR2_PACKAGE_MC is not set +# BR2_PACKAGE_MOST is not set BR2_PACKAGE_NANO=y BR2_PACKAGE_NANO_TINY=y # BR2_PACKAGE_UEMACS is not set @@ -1928,231 +2828,657 @@ BR2_PACKAGE_NANO_TINY=y # # Filesystem images # +# BR2_TARGET_ROOTFS_AXFS is not set +# BR2_TARGET_ROOTFS_BTRFS is not set # BR2_TARGET_ROOTFS_CLOOP is not set # BR2_TARGET_ROOTFS_CPIO is not set # BR2_TARGET_ROOTFS_CRAMFS is not set +# BR2_TARGET_ROOTFS_EROFS is not set # BR2_TARGET_ROOTFS_EXT2 is not set +# BR2_TARGET_ROOTFS_F2FS is not set # BR2_TARGET_ROOTFS_INITRAMFS is not set # BR2_TARGET_ROOTFS_JFFS2 is not set # BR2_TARGET_ROOTFS_ROMFS is not set BR2_TARGET_ROOTFS_SQUASHFS=y +BR2_TARGET_ROOTFS_SQUASHFS_PAD=y BR2_TARGET_ROOTFS_SQUASHFS4_GZIP=y # BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 is not set # BR2_TARGET_ROOTFS_SQUASHFS4_LZMA is not set # BR2_TARGET_ROOTFS_SQUASHFS4_LZO is not set # BR2_TARGET_ROOTFS_SQUASHFS4_XZ is not set +# BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD is not set # BR2_TARGET_ROOTFS_TAR is not set +# BR2_TARGET_ROOTFS_UBI is not set # BR2_TARGET_ROOTFS_UBIFS is not set # BR2_TARGET_ROOTFS_YAFFS2 is not set # # Bootloaders # +# BR2_TARGET_AFBOOT_STM32 is not set # BR2_TARGET_BAREBOX is not set +BR2_TARGET_GRUB2_ARCH_SUPPORTS=y +# BR2_TARGET_GRUB2 is not set # BR2_TARGET_MXS_BOOTLETS is not set # BR2_TARGET_UBOOT is not set # # Host utilities # +# BR2_PACKAGE_HOST_AESPIPE is not set +# BR2_PACKAGE_HOST_ANDROID_TOOLS is not set +# BR2_PACKAGE_HOST_BTRFS_PROGS is not set +# BR2_PACKAGE_HOST_CBOOTIMAGE is not set # BR2_PACKAGE_HOST_CHECKPOLICY is not set +# BR2_PACKAGE_HOST_CHECKSEC is not set +# BR2_PACKAGE_HOST_CMAKE is not set # BR2_PACKAGE_HOST_CRAMFS is not set +# BR2_PACKAGE_HOST_CRYPTSETUP is not set +# BR2_PACKAGE_HOST_DBUS_PYTHON is not set # BR2_PACKAGE_HOST_DFU_UTIL is not set # BR2_PACKAGE_HOST_DOS2UNIX is not set # BR2_PACKAGE_HOST_DOSFSTOOLS is not set +# BR2_PACKAGE_HOST_DOXYGEN is not set +# BR2_PACKAGE_HOST_DTC is not set # BR2_PACKAGE_HOST_E2FSPROGS is not set # BR2_PACKAGE_HOST_E2TOOLS is not set +# BR2_PACKAGE_HOST_EROFS_UTILS is not set +BR2_PACKAGE_HOST_EUDEV=y +# BR2_PACKAGE_HOST_EXFATPROGS is not set +# BR2_PACKAGE_HOST_F2FS_TOOLS is not set +# BR2_PACKAGE_HOST_FAKETIME is not set +# BR2_PACKAGE_HOST_FATCAT is not set +# BR2_PACKAGE_HOST_FWUP is not set # BR2_PACKAGE_HOST_GENEXT2FS is not set # BR2_PACKAGE_HOST_GENIMAGE is not set # BR2_PACKAGE_HOST_GENPART is not set +# BR2_PACKAGE_HOST_GNUPG is not set +BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS=y +# BR2_PACKAGE_HOST_GPTFDISK is not set +# BR2_PACKAGE_HOST_IMAGEMAGICK is not set +# BR2_PACKAGE_HOST_IMX_MKIMAGE is not set +# BR2_PACKAGE_HOST_IMX_USB_LOADER is not set +# BR2_PACKAGE_HOST_JQ is not set +# BR2_PACKAGE_HOST_JSMIN is not set +# BR2_PACKAGE_HOST_LIBP11 is not set +# BR2_PACKAGE_HOST_LLD is not set # BR2_PACKAGE_HOST_LPC3250LOADER is not set -# BR2_PACKAGE_HOST_MKE2IMG is not set +# BR2_PACKAGE_HOST_LTTNG_BABELTRACE is not set +# BR2_PACKAGE_HOST_MFGTOOLS is not set +BR2_PACKAGE_HOST_MKPASSWD=y # BR2_PACKAGE_HOST_MTD is not set # BR2_PACKAGE_HOST_MTOOLS is not set +# BR2_PACKAGE_HOST_MXSLDR is not set +# BR2_PACKAGE_HOST_ODB is not set # BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS is not set # BR2_PACKAGE_HOST_OPENOCD is not set +# BR2_PACKAGE_HOST_OPKG_UTILS is not set # BR2_PACKAGE_HOST_PARTED is not set -# BR2_PACKAGE_HOST_PATCHELF is not set +BR2_PACKAGE_HOST_PATCHELF=y +# BR2_PACKAGE_HOST_PIGZ is not set +# BR2_PACKAGE_HOST_PKGCONF is not set # BR2_PACKAGE_HOST_PWGEN is not set +# BR2_PACKAGE_HOST_PYTHON is not set +# BR2_PACKAGE_HOST_PYTHON_CYTHON is not set +# BR2_PACKAGE_HOST_PYTHON_LXML is not set +# BR2_PACKAGE_HOST_PYTHON_SIX is not set +# BR2_PACKAGE_HOST_PYTHON_XLRD is not set +# BR2_PACKAGE_HOST_PYTHON3 is not set +BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS=y +BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS=y # BR2_PACKAGE_HOST_QEMU is not set -# BR2_PACKAGE_HOST_SAM_BA is not set +# BR2_PACKAGE_HOST_RASPBERRYPI_USBBOOT is not set +# BR2_PACKAGE_HOST_RAUC is not set +# BR2_PACKAGE_HOST_RCW is not set +BR2_PACKAGE_HOST_RUSTC_ARCH="arm" +BR2_PACKAGE_HOST_RUSTC_ABI="eabi" +# BR2_PACKAGE_HOST_SDBUSPLUS is not set # BR2_PACKAGE_HOST_SQUASHFS is not set # BR2_PACKAGE_HOST_SUNXI_TOOLS is not set +# BR2_PACKAGE_HOST_SWIG is not set +# BR2_PACKAGE_HOST_TEGRARCM is not set # BR2_PACKAGE_HOST_UBOOT_TOOLS is not set # BR2_PACKAGE_HOST_UTIL_LINUX is not set +# BR2_PACKAGE_HOST_UTP_COM is not set +# BR2_PACKAGE_HOST_VBOOT_UTILS is not set +# BR2_PACKAGE_HOST_XORRISO is not set +# BR2_PACKAGE_HOST_ZIP is not set +# BR2_PACKAGE_HOST_ZSTD is not set # # Legacy config options # # -# Legacy options removed in 2015.02 -# -# BR2_PACKAGE_M4 is not set -# BR2_PACKAGE_FLEX_BINARY is not set -# BR2_PACKAGE_BISON is not set -# BR2_PACKAGE_GOB2 is not set -# BR2_PACKAGE_DISTCC is not set -# BR2_PACKAGE_HASERL_VERSION_0_8_X is not set -# BR2_PACKAGE_STRONGSWAN_TOOLS is not set -# BR2_PACKAGE_XBMC_ADDON_XVDR is not set -# BR2_PACKAGE_XBMC_PVR_ADDONS is not set -# BR2_PACKAGE_XBMC is not set -# BR2_PACKAGE_XBMC_ALSA_LIB is not set -# BR2_PACKAGE_XBMC_AVAHI is not set -# BR2_PACKAGE_XBMC_DBUS is not set -# BR2_PACKAGE_XBMC_LIBBLURAY is not set -# BR2_PACKAGE_XBMC_GOOM is not set -# BR2_PACKAGE_XBMC_RSXS is not set -# BR2_PACKAGE_XBMC_LIBCEC is not set -# BR2_PACKAGE_XBMC_LIBMICROHTTPD is not set -# BR2_PACKAGE_XBMC_LIBNFS is not set -# BR2_PACKAGE_XBMC_RTMPDUMP is not set -# BR2_PACKAGE_XBMC_LIBSHAIRPLAY is not set -# BR2_PACKAGE_XBMC_LIBSMBCLIENT is not set -# BR2_PACKAGE_XBMC_LIBTHEORA is not set -# BR2_PACKAGE_XBMC_LIBUSB is not set -# BR2_PACKAGE_XBMC_LIBVA is not set -# BR2_PACKAGE_XBMC_WAVPACK is not set -# BR2_PREFER_STATIC_LIB is not set - -# -# Legacy options removed in 2014.11 -# -# BR2_x86_generic is not set -# BR2_GCC_VERSION_4_4_X is not set -# BR2_sparc_sparchfleon is not set -# BR2_sparc_sparchfleonv8 is not set -# BR2_sparc_sparcsfleon is not set -# BR2_sparc_sparcsfleonv8 is not set -# BR2_PACKAGE_LINUX_FIRMWARE_XC5000 is not set -# BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 is not set -# BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 is not set -# BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 is not set - -# -# Legacy options removed in 2014.08 -# -# BR2_PACKAGE_LIBELF is not set -# BR2_KERNEL_HEADERS_3_8 is not set -# BR2_PACKAGE_GETTEXT_TOOLS is not set -# BR2_PACKAGE_PROCPS is not set -# BR2_BINUTILS_VERSION_2_20_1 is not set -# BR2_BINUTILS_VERSION_2_21 is not set -# BR2_BINUTILS_VERSION_2_23_1 is not set -# BR2_UCLIBC_VERSION_0_9_32 is not set -# BR2_GCC_VERSION_4_3_X is not set -# BR2_GCC_VERSION_4_6_X is not set -# BR2_GDB_VERSION_7_4 is not set -# BR2_GDB_VERSION_7_5 is not set -# BR2_BUSYBOX_VERSION_1_19_X is not set -# BR2_BUSYBOX_VERSION_1_20_X is not set -# BR2_BUSYBOX_VERSION_1_21_X is not set -# BR2_PACKAGE_LIBV4L_DECODE_TM6000 is not set -# BR2_PACKAGE_LIBV4L_IR_KEYTABLE is not set -# BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE is not set -# BR2_PACKAGE_LIBV4L_V4L2_CTL is not set -# BR2_PACKAGE_LIBV4L_V4L2_DBG is not set - -# -# Legacy options removed in 2014.05 -# -# BR2_PACKAGE_EVTEST_CAPTURE is not set -# BR2_KERNEL_HEADERS_3_6 is not set -# BR2_KERNEL_HEADERS_3_7 is not set -# BR2_PACKAGE_VALA is not set -BR2_PACKAGE_TZDATA_ZONELIST="" -# BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE is not set -# BR2_PACKAGE_LUA_INTERPRETER_READLINE is not set -# BR2_PACKAGE_LUA_INTERPRETER_LINENOISE is not set -# BR2_PACKAGE_DVB_APPS_UTILS is not set -# BR2_KERNEL_HEADERS_SNAP is not set -# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV is not set -# BR2_PACKAGE_UDEV is not set -# BR2_PACKAGE_UDEV_RULES_GEN is not set -# BR2_PACKAGE_UDEV_ALL_EXTRAS is not set - -# -# Legacy options removed in 2014.02 -# -# BR2_sh2 is not set -# BR2_sh3 is not set -# BR2_sh3eb is not set -# BR2_KERNEL_HEADERS_3_1 is not set -# BR2_KERNEL_HEADERS_3_3 is not set -# BR2_KERNEL_HEADERS_3_5 is not set -# BR2_GDB_VERSION_7_2 is not set -# BR2_GDB_VERSION_7_3 is not set -# BR2_PACKAGE_CCACHE is not set -# BR2_HAVE_DOCUMENTATION is not set -# BR2_PACKAGE_AUTOMAKE is not set -# BR2_PACKAGE_AUTOCONF is not set -# BR2_PACKAGE_XSTROKE is not set -# BR2_PACKAGE_LZMA is not set -# BR2_PACKAGE_TTCP is not set -# BR2_PACKAGE_LIBNFC_LLCP is not set -# BR2_PACKAGE_MYSQL_CLIENT is not set -# BR2_PACKAGE_SQUASHFS3 is not set -# BR2_TARGET_ROOTFS_SQUASHFS3 is not set -# BR2_PACKAGE_NETKITBASE is not set -# BR2_PACKAGE_NETKITTELNET is not set -# BR2_PACKAGE_LUASQL is not set -# BR2_PACKAGE_LUACJSON is not set - -# -# Legacy options removed in 2013.11 -# -# BR2_PACKAGE_LVM2_DMSETUP_ONLY is not set -# BR2_PACKAGE_QT_JAVASCRIPTCORE is not set -# BR2_PACKAGE_MODULE_INIT_TOOLS is not set -BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL="" -BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION="" -BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="" -BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="" - -# -# Legacy options removed in 2013.08 -# -# BR2_ARM_OABI is not set -# BR2_PACKAGE_DOSFSTOOLS_DOSFSCK is not set -# BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL is not set -# BR2_PACKAGE_DOSFSTOOLS_MKDOSFS is not set -# BR2_ELF2FLT is not set -# BR2_VFP_FLOAT is not set -# BR2_PACKAGE_GCC_TARGET is not set -# BR2_HAVE_DEVFILES is not set - -# -# Legacy options removed in 2013.05 -# -# BR2_PACKAGE_LINUX_FIRMWARE_RTL_8192 is not set -# BR2_PACKAGE_LINUX_FIRMWARE_RTL_8712 is not set - -# -# Legacy options removed in 2013.02 -# -# BR2_sa110 is not set -# BR2_sa1100 is not set -# BR2_PACKAGE_GDISK is not set -# BR2_PACKAGE_GDISK_GDISK is not set -# BR2_PACKAGE_GDISK_SGDISK is not set -# BR2_PACKAGE_GDB_HOST is not set -# BR2_PACKAGE_DIRECTB_DITHER_RGB16 is not set -# BR2_PACKAGE_DIRECTB_TESTS is not set - -# -# Legacy options removed in 2012.11 -# -# BR2_PACKAGE_CUSTOMIZE is not set -# BR2_PACKAGE_XSERVER_xorg is not set -# BR2_PACKAGE_XSERVER_tinyx is not set -# BR2_PACKAGE_PTHREAD_STUBS is not set - -# -# Legacy options removed in 2012.08 -# -# BR2_PACKAGE_GETTEXT_STATIC is not set -# BR2_PACKAGE_LIBINTL is not set -# BR2_PACKAGE_INPUT_TOOLS_EVTEST is not set -# BR2_BFIN_FDPIC is not set -# BR2_BFIN_FLAT is not set +# Legacy options removed in 2020.08 +# +# BR2_PACKAGE_PHP_EXT_HASH is not set +# BR2_PACKAGE_EFL_GIF is not set +# BR2_PACKAGE_EFL_PNG is not set +# BR2_PACKAGE_EFL_ELPUT is not set +# BR2_KERNEL_HEADERS_5_6 is not set +# BR2_KERNEL_HEADERS_5_5 is not set +# BR2_BINUTILS_VERSION_2_31_X is not set +# BR2_PACKAGE_KODI_PERIPHERAL_STEAMCONTROLLER is not set + +# +# Legacy options removed in 2020.05 +# +# BR2_PACKAGE_WIRINGPI is not set +# BR2_PACKAGE_PYTHON_PYCRYPTO is not set +# BR2_PACKAGE_MTDEV2TUIO is not set +# BR2_PACKAGE_EZXML is not set +# BR2_PACKAGE_COLLECTD_LVM is not set +# BR2_PACKAGE_PYTHON_PYASN is not set +# BR2_PACKAGE_PYTHON_PYASN_MODULES is not set +# BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_10K_QCA6174 is not set +# BR2_PACKAGE_QT5CANVAS3D is not set +# BR2_PACKAGE_KODI_LIBTHEORA is not set +# BR2_PACKAGE_CEGUI06 is not set +# BR2_GCC_VERSION_5_X is not set + +# +# Legacy options removed in 2020.02 +# +# BR2_PACKAGE_JAMVM is not set +# BR2_PACKAGE_CLASSPATH is not set +# BR2_PACKAGE_QT5_VERSION_5_6 is not set +# BR2_PACKAGE_CURL is not set +# BR2_PACKAGE_GSTREAMER is not set +# BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS is not set +# BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS is not set +# BR2_PACKAGE_FREERDP_GSTREAMER is not set +# BR2_PACKAGE_OPENCV3_WITH_GSTREAMER is not set +# BR2_PACKAGE_OPENCV_WITH_GSTREAMER is not set +# BR2_PACKAGE_LIBPLAYER is not set +# BR2_GCC_VERSION_OR1K is not set +# BR2_PACKAGE_BLUEZ_UTILS is not set +# BR2_PACKAGE_GADGETFS_TEST is not set +# BR2_PACKAGE_FIS is not set +BR2_PACKAGE_REFPOLICY_POLICY_VERSION="" +# BR2_PACKAGE_CELT051 is not set +# BR2_PACKAGE_WIREGUARD is not set +# BR2_PACKAGE_PERL_NET_PING is not set +# BR2_PACKAGE_PERL_MIME_BASE64 is not set +# BR2_PACKAGE_PERL_DIGEST_MD5 is not set +# BR2_PACKAGE_ERLANG_P1_ICONV is not set +# BR2_KERNEL_HEADERS_5_3 is not set +# BR2_PACKAGE_PYTHON_SCAPY3K is not set +# BR2_BINUTILS_VERSION_2_30_X is not set +# BR2_PACKAGE_RPI_USERLAND_START_VCFILED is not set + +# +# Legacy options removed in 2019.11 +# +# BR2_PACKAGE_OPENVMTOOLS_PROCPS is not set +# BR2_PACKAGE_ALLJOYN is not set +# BR2_PACKAGE_ALLJOYN_BASE is not set +# BR2_PACKAGE_ALLJOYN_BASE_CONTROLPANEL is not set +# BR2_PACKAGE_ALLJOYN_BASE_NOTIFICATION is not set +# BR2_PACKAGE_ALLJOYN_BASE_ONBOARDING is not set +# BR2_PACKAGE_ALLJOYN_TCL_BASE is not set +# BR2_PACKAGE_ALLJOYN_TCL is not set +BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS="" +# BR2_PACKAGE_PYTHON_PYSNMP_APPS is not set +# BR2_KERNEL_HEADERS_5_2 is not set +# BR2_TARGET_RISCV_PK is not set +# BR2_PACKAGE_SQLITE_STAT3 is not set +# BR2_KERNEL_HEADERS_5_1 is not set +# BR2_PACKAGE_DEVMEM2 is not set +# BR2_PACKAGE_USTR is not set +# BR2_PACKAGE_KODI_SCREENSAVER_PLANESTATE is not set +# BR2_PACKAGE_KODI_VISUALISATION_WAVEFORHUE is not set +# BR2_PACKAGE_KODI_AUDIODECODER_OPUS is not set +# BR2_PACKAGE_MESA3D_OSMESA is not set +# BR2_PACKAGE_HOSTAPD_DRIVER_RTW is not set +# BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW is not set +# BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD is not set + +# +# Legacy options removed in 2019.08 +# +# BR2_TARGET_TS4800_MBRBOOT is not set +# BR2_PACKAGE_LIBAMCODEC is not set +# BR2_PACKAGE_ODROID_SCRIPTS is not set +# BR2_PACKAGE_ODROID_MALI is not set +# BR2_PACKAGE_KODI_PLATFORM_AML is not set +# BR2_GCC_VERSION_6_X is not set +# BR2_GCC_VERSION_4_9_X is not set +# BR2_GDB_VERSION_7_12 is not set +# BR2_PACKAGE_XAPP_MKFONTDIR is not set +# BR2_GDB_VERSION_8_0 is not set +# BR2_KERNEL_HEADERS_4_20 is not set +# BR2_KERNEL_HEADERS_5_0 is not set + +# +# Legacy options removed in 2019.05 +# +# BR2_CSKY_DSP is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COMPOSITOR is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IQA is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD is not set +# BR2_PACKAGE_LUNIT is not set +# BR2_PACKAGE_FFMPEG_FFSERVER is not set +# BR2_PACKAGE_LIBUMP is not set +# BR2_PACKAGE_SUNXI_MALI is not set +# BR2_BINUTILS_VERSION_2_29_X is not set +# BR2_BINUTILS_VERSION_2_28_X is not set +# BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK is not set + +# +# Legacy options removed in 2019.02 +# +# BR2_PACKAGE_QT is not set +# BR2_PACKAGE_QTUIO is not set +# BR2_PACKAGE_PINENTRY_QT4 is not set +# BR2_PACKAGE_POPPLER_QT is not set +# BR2_PACKAGE_OPENCV3_WITH_QT is not set +# BR2_PACKAGE_OPENCV_WITH_QT is not set +# BR2_PACKAGE_AMD_CATALYST_CCCLE is not set +# BR2_PACKAGE_SDL_QTOPIA is not set +# BR2_PACKAGE_PYTHON_PYQT is not set +# BR2_PACKAGE_LUACRYPTO is not set +# BR2_PACKAGE_TN5250 is not set +# BR2_PACKAGE_BOOST_SIGNALS is not set +# BR2_PACKAGE_FFTW_PRECISION_SINGLE is not set +# BR2_PACKAGE_FFTW_PRECISION_DOUBLE is not set +# BR2_PACKAGE_LUA_5_2 is not set +# BR2_TARGET_GENERIC_PASSWD_MD5 is not set + +# +# Legacy options removed in 2018.11 +# +# BR2_TARGET_XLOADER is not set +# BR2_PACKAGE_TIDSP_BINARIES is not set +# BR2_PACKAGE_DSP_TOOLS is not set +# BR2_PACKAGE_GST_DSP is not set +# BR2_PACKAGE_BOOTUTILS is not set +# BR2_PACKAGE_EXPEDITE is not set +# BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT is not set +# BR2_KERNEL_HEADERS_4_10 is not set +# BR2_KERNEL_HEADERS_4_11 is not set +# BR2_KERNEL_HEADERS_4_12 is not set +# BR2_KERNEL_HEADERS_4_13 is not set +# BR2_KERNEL_HEADERS_4_15 is not set +# BR2_KERNEL_HEADERS_4_17 is not set +# BR2_PACKAGE_LIBNFTNL_XML is not set +# BR2_KERNEL_HEADERS_3_2 is not set +# BR2_KERNEL_HEADERS_4_1 is not set +# BR2_KERNEL_HEADERS_4_16 is not set +# BR2_KERNEL_HEADERS_4_18 is not set + +# +# Legacy options removed in 2018.08 +# +# BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT is not set +# BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_19 is not set +# BR2_PACKAGE_XPROTO_APPLEWMPROTO is not set +# BR2_PACKAGE_XPROTO_BIGREQSPROTO is not set +# BR2_PACKAGE_XPROTO_COMPOSITEPROTO is not set +# BR2_PACKAGE_XPROTO_DAMAGEPROTO is not set +# BR2_PACKAGE_XPROTO_DMXPROTO is not set +# BR2_PACKAGE_XPROTO_DRI2PROTO is not set +# BR2_PACKAGE_XPROTO_DRI3PROTO is not set +# BR2_PACKAGE_XPROTO_FIXESPROTO is not set +# BR2_PACKAGE_XPROTO_FONTCACHEPROTO is not set +# BR2_PACKAGE_XPROTO_FONTSPROTO is not set +# BR2_PACKAGE_XPROTO_GLPROTO is not set +# BR2_PACKAGE_XPROTO_INPUTPROTO is not set +# BR2_PACKAGE_XPROTO_KBPROTO is not set +# BR2_PACKAGE_XPROTO_PRESENTPROTO is not set +# BR2_PACKAGE_XPROTO_RANDRPROTO is not set +# BR2_PACKAGE_XPROTO_RECORDPROTO is not set +# BR2_PACKAGE_XPROTO_RENDERPROTO is not set +# BR2_PACKAGE_XPROTO_RESOURCEPROTO is not set +# BR2_PACKAGE_XPROTO_SCRNSAVERPROTO is not set +# BR2_PACKAGE_XPROTO_VIDEOPROTO is not set +# BR2_PACKAGE_XPROTO_WINDOWSWMPROTO is not set +# BR2_PACKAGE_XPROTO_XCMISCPROTO is not set +# BR2_PACKAGE_XPROTO_XEXTPROTO is not set +# BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO is not set +# BR2_PACKAGE_XPROTO_XF86DGAPROTO is not set +# BR2_PACKAGE_XPROTO_XF86DRIPROTO is not set +# BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO is not set +# BR2_PACKAGE_XPROTO_XINERAMAPROTO is not set +# BR2_PACKAGE_XPROTO_XPROTO is not set +# BR2_PACKAGE_XPROTO_XPROXYMANAGEMENTPROTOCOL is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLES2 is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLX is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_X11 is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_DISPMANX is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOMIXER is not set +# BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME is not set +# BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPG123 is not set +# BR2_GDB_VERSION_7_11 is not set +# BR2_GDB_VERSION_7_10 is not set + +# +# Legacy options removed in 2018.05 +# +# BR2_PACKAGE_MEDIAART_BACKEND_NONE is not set +# BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF is not set +# BR2_PACKAGE_TI_SGX_AM335X is not set +# BR2_PACKAGE_TI_SGX_AM437X is not set +# BR2_PACKAGE_TI_SGX_AM4430 is not set +# BR2_PACKAGE_TI_SGX_AM5430 is not set +# BR2_PACKAGE_JANUS_AUDIO_BRIDGE is not set +# BR2_PACKAGE_JANUS_ECHO_TEST is not set +# BR2_PACKAGE_JANUS_RECORDPLAY is not set +# BR2_PACKAGE_JANUS_SIP_GATEWAY is not set +# BR2_PACKAGE_JANUS_STREAMING is not set +# BR2_PACKAGE_JANUS_TEXT_ROOM is not set +# BR2_PACKAGE_JANUS_VIDEO_CALL is not set +# BR2_PACKAGE_JANUS_VIDEO_ROOM is not set +# BR2_PACKAGE_JANUS_MQTT is not set +# BR2_PACKAGE_JANUS_RABBITMQ is not set +# BR2_PACKAGE_JANUS_REST is not set +# BR2_PACKAGE_JANUS_UNIX_SOCKETS is not set +# BR2_PACKAGE_JANUS_WEBSOCKETS is not set +# BR2_PACKAGE_IPSEC_SECCTX_DISABLE is not set +# BR2_PACKAGE_IPSEC_SECCTX_ENABLE is not set +# BR2_PACKAGE_IPSEC_SECCTX_KERNEL is not set +# BR2_PACKAGE_LIBTFDI_CPP is not set +# BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE is not set +# BR2_PACKAGE_JQUERY_UI_THEME_BLITZER is not set +# BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO is not set +# BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE is not set +# BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV is not set +# BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT is not set +# BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE is not set +# BR2_PACKAGE_JQUERY_UI_THEME_FLICK is not set +# BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS is not set +# BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY is not set +# BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG is not set +# BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC is not set +# BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST is not set +# BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER is not set +# BR2_PACKAGE_JQUERY_UI_THEME_REDMOND is not set +# BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS is not set +# BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET is not set +# BR2_PACKAGE_JQUERY_UI_THEME_START is not set +# BR2_PACKAGE_JQUERY_UI_THEME_SUNNY is not set +# BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE is not set +# BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC is not set +# BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS is not set +# BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS is not set +# BR2_PACKAGE_JQUERY_UI_THEME_VADER is not set +# BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH is not set +# BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI is not set +# BR2_PACKAGE_BLUEZ5_PLUGINS_NFC is not set +# BR2_PACKAGE_BLUEZ5_PLUGINS_SAP is not set +# BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS is not set +# BR2_PACKAGE_TRANSMISSION_REMOTE is not set +# BR2_PACKAGE_LIBKCAPI_APPS is not set +# BR2_PACKAGE_MPLAYER is not set +# BR2_PACKAGE_MPLAYER_MPLAYER is not set +# BR2_PACKAGE_MPLAYER_MENCODER is not set +# BR2_PACKAGE_LIBPLAYER_MPLAYER is not set +# BR2_PACKAGE_IQVLINUX is not set +# BR2_BINFMT_FLAT_SEP_DATA is not set +# BR2_bfin is not set +# BR2_PACKAGE_KODI_ADSP_BASIC is not set +# BR2_PACKAGE_KODI_ADSP_FREESURROUND is not set + +# +# Legacy options removed in 2018.02 +# +# BR2_KERNEL_HEADERS_3_4 is not set +# BR2_KERNEL_HEADERS_3_10 is not set +# BR2_KERNEL_HEADERS_3_12 is not set +# BR2_BINUTILS_VERSION_2_27_X is not set +# BR2_PACKAGE_EEPROG is not set +# BR2_PACKAGE_GNUPG2_GPGV2 is not set +# BR2_PACKAGE_IMX_GPU_VIV_APITRACE is not set +# BR2_PACKAGE_IMX_GPU_VIV_G2D is not set + +# +# Legacy options removed in 2017.11 +# +# BR2_PACKAGE_RFKILL is not set +# BR2_PACKAGE_UTIL_LINUX_RESET is not set +# BR2_PACKAGE_POLICYCOREUTILS_AUDIT2ALLOW is not set +# BR2_PACKAGE_POLICYCOREUTILS_RESTORECOND is not set +# BR2_PACKAGE_SEPOLGEN is not set +# BR2_PACKAGE_OPENOBEX_BLUEZ is not set +# BR2_PACKAGE_OPENOBEX_LIBUSB is not set +# BR2_PACKAGE_OPENOBEX_APPS is not set +# BR2_PACKAGE_OPENOBEX_SYSLOG is not set +# BR2_PACKAGE_OPENOBEX_DUMP is not set +# BR2_PACKAGE_AICCU is not set +# BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS is not set + +# +# Legacy options removed in 2017.08 +# +# BR2_TARGET_GRUB is not set +# BR2_PACKAGE_SIMICSFS is not set +# BR2_BINUTILS_VERSION_2_26_X is not set +BR2_XTENSA_OVERLAY_DIR="" +BR2_XTENSA_CUSTOM_NAME="" +# BR2_PACKAGE_HOST_MKE2IMG is not set +BR2_TARGET_ROOTFS_EXT2_BLOCKS=0 +BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES=0 +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL is not set +# BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD is not set +# BR2_STRIP_none is not set +# BR2_PACKAGE_BEECRYPT_CPP is not set +# BR2_PACKAGE_SPICE_CLIENT is not set +# BR2_PACKAGE_SPICE_GUI is not set +# BR2_PACKAGE_SPICE_TUNNEL is not set +# BR2_PACKAGE_INPUT_TOOLS is not set +# BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH is not set +# BR2_PACKAGE_INPUT_TOOLS_JSCAL is not set +# BR2_PACKAGE_INPUT_TOOLS_JSTEST is not set +# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH is not set +# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86 is not set +# BR2_GCC_VERSION_4_8_X is not set + +# +# Legacy options removed in 2017.05 +# +# BR2_PACKAGE_SUNXI_MALI_R2P4 is not set +# BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT is not set +# BR2_PACKAGE_NODEJS_MODULES_EXPRESS is not set +# BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL is not set +# BR2_PACKAGE_OPENOCD_FT2XXX is not set +# BR2_PACKAGE_KODI_RTMPDUMP is not set +# BR2_PACKAGE_KODI_VISUALISATION_FOUNTAIN is not set +# BR2_PACKAGE_PORTMAP is not set +# BR2_BINUTILS_VERSION_2_25_X is not set +# BR2_TOOLCHAIN_BUILDROOT_INET_RPC is not set +BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS=0 +# BR2_PACKAGE_SYSTEMD_KDBUS is not set +# BR2_PACKAGE_POLARSSL is not set +# BR2_NBD_CLIENT is not set +# BR2_NBD_SERVER is not set +# BR2_PACKAGE_GMOCK is not set +# BR2_KERNEL_HEADERS_4_8 is not set +# BR2_KERNEL_HEADERS_3_18 is not set +# BR2_GLIBC_VERSION_2_22 is not set + +# +# Legacy options removed in 2017.02 +# +# BR2_PACKAGE_PERL_DB_FILE is not set +# BR2_KERNEL_HEADERS_4_7 is not set +# BR2_KERNEL_HEADERS_4_6 is not set +# BR2_KERNEL_HEADERS_4_5 is not set +# BR2_KERNEL_HEADERS_3_14 is not set +# BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS is not set +# BR2_UCLIBC_INSTALL_TEST_SUITE is not set +# BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX is not set +# BR2_PACKAGE_MAKEDEVS is not set +# BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A is not set +# BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE is not set +# BR2_PACKAGE_SNOWBALL_HDMISERVICE is not set +# BR2_PACKAGE_SNOWBALL_INIT is not set +# BR2_GDB_VERSION_7_9 is not set + +# +# Legacy options removed in 2016.11 +# +# BR2_PACKAGE_PHP_SAPI_CLI_CGI is not set +# BR2_PACKAGE_PHP_SAPI_CLI_FPM is not set +# BR2_PACKAGE_WVSTREAMS is not set +# BR2_PACKAGE_WVDIAL is not set +# BR2_PACKAGE_WEBKITGTK24 is not set +# BR2_PACKAGE_TORSMO is not set +# BR2_PACKAGE_SSTRIP is not set +# BR2_KERNEL_HEADERS_4_3 is not set +# BR2_KERNEL_HEADERS_4_2 is not set +# BR2_PACKAGE_KODI_ADDON_XVDR is not set +# BR2_PACKAGE_IPKG is not set +# BR2_GCC_VERSION_4_7_X is not set +# BR2_BINUTILS_VERSION_2_24_X is not set +# BR2_PACKAGE_WESTON_RPI is not set +# BR2_LINUX_KERNEL_TOOL_CPUPOWER is not set +# BR2_LINUX_KERNEL_TOOL_PERF is not set +# BR2_LINUX_KERNEL_TOOL_SELFTESTS is not set +# BR2_GCC_VERSION_4_8_ARC is not set +# BR2_KERNEL_HEADERS_4_0 is not set +# BR2_KERNEL_HEADERS_3_19 is not set +# BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS is not set +# BR2_PACKAGE_ELEMENTARY is not set +# BR2_LINUX_KERNEL_CUSTOM_LOCAL is not set + +# +# Legacy options removed in 2016.08 +# +# BR2_PACKAGE_EFL_JP2K is not set +# BR2_PACKAGE_SYSTEMD_COMPAT is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER is not set +# BR2_PACKAGE_LIBFSLVPUWRAP is not set +# BR2_PACKAGE_LIBFSLPARSER is not set +# BR2_PACKAGE_LIBFSLCODEC is not set +# BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT is not set +# BR2_PTHREADS_OLD is not set +# BR2_BINUTILS_VERSION_2_23_X is not set +# BR2_TOOLCHAIN_BUILDROOT_EGLIBC is not set +# BR2_GDB_VERSION_7_8 is not set + +# +# Legacy options removed in 2016.05 +# +# BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL is not set +# BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTP is not set +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123 is not set +# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC is not set +# BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2 is not set +# BR2_x86_i386 is not set +# BR2_PACKAGE_QT5QUICK1 is not set +BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="" +# BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID is not set +# BR2_KERNEL_HEADERS_3_17 is not set +# BR2_GDB_VERSION_7_7 is not set +# BR2_PACKAGE_FOOMATIC_FILTERS is not set +# BR2_PACKAGE_SAMBA is not set +# BR2_PACKAGE_KODI_WAVPACK is not set +# BR2_PACKAGE_KODI_RSXS is not set +# BR2_PACKAGE_KODI_GOOM is not set +# BR2_PACKAGE_SYSTEMD_ALL_EXTRAS is not set +# BR2_GCC_VERSION_4_5_X is not set +# BR2_PACKAGE_SQLITE_READLINE is not set + +# +# Legacy options removed in 2016.02 +# +# BR2_PACKAGE_DOVECOT_BZIP2 is not set +# BR2_PACKAGE_DOVECOT_ZLIB is not set +# BR2_PACKAGE_E2FSPROGS_FINDFS is not set +# BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL is not set +# BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE is not set +# BR2_PACKAGE_OPENPOWERLINK_LIBPCAP is not set +# BR2_LINUX_KERNEL_SAME_AS_HEADERS is not set +# BR2_PACKAGE_CUPS_PDFTOPS is not set +# BR2_KERNEL_HEADERS_3_16 is not set +# BR2_PACKAGE_PYTHON_PYXML is not set +# BR2_ENABLE_SSP is not set +# BR2_PACKAGE_DIRECTFB_CLE266 is not set +# BR2_PACKAGE_DIRECTFB_UNICHROME is not set +# BR2_PACKAGE_LIBELEMENTARY is not set +# BR2_PACKAGE_LIBEINA is not set +# BR2_PACKAGE_LIBEET is not set +# BR2_PACKAGE_LIBEVAS is not set +# BR2_PACKAGE_LIBECORE is not set +# BR2_PACKAGE_LIBEDBUS is not set +# BR2_PACKAGE_LIBEFREET is not set +# BR2_PACKAGE_LIBEIO is not set +# BR2_PACKAGE_LIBEMBRYO is not set +# BR2_PACKAGE_LIBEDJE is not set +# BR2_PACKAGE_LIBETHUMB is not set +# BR2_PACKAGE_INFOZIP is not set +# BR2_BR2_PACKAGE_NODEJS_0_10_X is not set +# BR2_BR2_PACKAGE_NODEJS_0_12_X is not set +# BR2_BR2_PACKAGE_NODEJS_4_X is not set + +# +# Legacy options removed in 2015.11 +# +# BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL is not set +# BR2_PACKAGE_MEDIA_CTL is not set +# BR2_PACKAGE_SCHIFRA is not set +# BR2_PACKAGE_ZXING is not set +# BR2_PACKAGE_BLACKBOX is not set +# BR2_KERNEL_HEADERS_3_0 is not set +# BR2_KERNEL_HEADERS_3_11 is not set +# BR2_KERNEL_HEADERS_3_13 is not set +# BR2_KERNEL_HEADERS_3_15 is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE is not set +# BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW is not set +# BR2_PACKAGE_KOBS_NG is not set +# BR2_PACKAGE_SAWMAN is not set +# BR2_PACKAGE_DIVINE is not set + +# +# Legacy options removed in 2015.08 +# +# BR2_PACKAGE_KODI_PVR_ADDONS is not set +# BR2_BINUTILS_VERSION_2_23_2 is not set +# BR2_BINUTILS_VERSION_2_24 is not set +# BR2_BINUTILS_VERSION_2_25 is not set +# BR2_PACKAGE_PERF is not set +# BR2_BINUTILS_VERSION_2_22 is not set +# BR2_PACKAGE_GPU_VIV_BIN_MX6Q is not set +# BR2_TARGET_UBOOT_NETWORK is not set diff --git a/buildroot/.defconfig b/buildroot/.defconfig new file mode 100644 index 000000000..7ab0c3fbf --- /dev/null +++ b/buildroot/.defconfig @@ -0,0 +1,51 @@ +# +# Automatically generated make config: don't edit +# Mon Feb 18 09:11:56 2008 +# +BR2_HAVE_DOT_CONFIG=y +# BR2_alpha is not set +# BR2_arm is not set +# BR2_armeb is not set +# BR2_cris is not set +# BR2_ia64 is not set +BR2_i386=y +# BR2_m68k is not set +# BR2_mips is not set +# BR2_mipsel is not set +# BR2_nios2 is not set +# BR2_powerpc is not set +# BR2_sh is not set +# BR2_sparc is not set +# BR2_sparc64 is not set +# BR2_x86_64 is not set +# BR2_x86_i486 is not set +# BR2_x86_i586 is not set +BR2_x86_i686=y +# BR2_x86_pentiumpro is not set +# BR2_x86_pentium_mmx is not set +# BR2_x86_pentium_m is not set +# BR2_x86_pentium2 is not set +# BR2_x86_pentium3 is not set +# BR2_x86_pentium4 is not set +# BR2_x86_prescott is not set +# BR2_x86_nocona is not set +# BR2_x86_core2 is not set +# BR2_x86_k6 is not set +# BR2_x86_k6_2 is not set +# BR2_x86_athlon is not set +# BR2_x86_athlon_4 is not set +# BR2_x86_opteron is not set +# BR2_x86_opteron_sse3 is not set +# BR2_x86_barcelona is not set +# BR2_x86_geode is not set +# BR2_x86_c3 is not set +# BR2_x86_winchip_c6 is not set +# BR2_x86_winchip2 is not set +BR2_ARCH="i686" +BR2_ENDIAN="LITTLE" +BR2_GCC_TARGET_TUNE="i686" +BR2_GCC_TARGET_ARCH="i686" + +# +# Target options +# diff --git a/buildroot/.flake8 b/buildroot/.flake8 new file mode 100644 index 000000000..ee3d5035a --- /dev/null +++ b/buildroot/.flake8 @@ -0,0 +1,5 @@ +[flake8] +exclude= + # copied from the kernel sources + utils/diffconfig +max-line-length=80 diff --git a/buildroot/.git-upstreambranch b/buildroot/.git-upstreambranch deleted file mode 100644 index 1f7391f92..000000000 --- a/buildroot/.git-upstreambranch +++ /dev/null @@ -1 +0,0 @@ -master diff --git a/buildroot/.git-upstreamversion b/buildroot/.git-upstreamversion deleted file mode 100644 index 845bdf989..000000000 --- a/buildroot/.git-upstreamversion +++ /dev/null @@ -1 +0,0 @@ -083f853801afab95aee8e4e9a30c57c69f7f379a diff --git a/buildroot/.gitignore b/buildroot/.gitignore index 317e2daae..bb02d9f57 100644 --- a/buildroot/.gitignore +++ b/buildroot/.gitignore @@ -7,6 +7,8 @@ /.config *.depend *.o +/*.patch +/*.diff *.orig *.rej *~ diff --git a/buildroot/.gitlab-ci.yml b/buildroot/.gitlab-ci.yml new file mode 100644 index 000000000..e85ac3203 --- /dev/null +++ b/buildroot/.gitlab-ci.yml @@ -0,0 +1,23 @@ +# Configuration for Gitlab-CI. +# Builds appear on https://gitlab.com/buildroot.org/buildroot/pipelines + +image: buildroot/base:20200814.2228 + +stages: + - generate-gitlab-ci + - build + +generate-gitlab-ci-yml: + stage: generate-gitlab-ci + script: ./support/scripts/generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml + artifacts: + paths: + - generated-gitlab-ci.yml + +buildroot-pipeline: + stage: build + trigger: + include: + - artifact: generated-gitlab-ci.yml + job: generate-gitlab-ci-yml + strategy: depend diff --git a/buildroot/CHANGES b/buildroot/CHANGES index 22668dcaa..91d68fded 100644 --- a/buildroot/CHANGES +++ b/buildroot/CHANGES @@ -1,3 +1,6209 @@ +2020.08-rc2, released August 24th, 2020 + + Fixes all over the tree, including a number of fixes for + compilation with GCC-10. + + Toolchain: Disallow building uClibc-ng for RISC-V 64-bit, + because of issues with a missing __riscv_flush_icache() + implementation. + + Defconfigs: CI20: Use mainline Linux and U-boot. Update + Microchip sama5d27_wlsom1_ek_mmc_dev to use bluez5-utils + instead of (the removed) legacy bluez-utils + + Updated/fixed packages: 18xx-ti-utils, aircrack-ng, apache, + atest, bandwidthd, bellagio, bind, bird, bluez-alsa, boost, + c-periphery, capnproto, chrony, collectd, cpio, cvs, + dieharder, domoticz, dovecot, dovecot-pigeonhole, drbd-utils, + dump1090, efl, elixir, f2fs-tools, feh, fluidsynth, fping, + gdbm, gdk-pixbuf, ghostscript, gst1-plugins-bad, + gstreamer1-editing-services, htop, ibm-sw-tpm2, ifplugd, + iftop, igd2-for-linux, ima-evm-utils, iprutils, iputils, + keepalived, kmsxx, libabseil-cpp, libcamera, libcurl, + libfuse3, libnss, librtlsdr, libubox, libunwind, live555, + lttng-tools, luabitop, mender-artifact, minizip, + mjpg-streamer, mpd, mpv, mtd, ncftp, open-lldp, openal, + opencv, opencv3, openfpgaloader, optee-os, owfs, php, + pistache, prosody, pulseview, python-decorator, + python-gunicorn, python-rpi-gpio, python-spidev, + python3-decorator, python3-mako, python3-pyselftools, qt5, + qt5webengine, rauc, redis, ripgrep, rtl8188eu, rtl8821au, + setools, smstools3, supertux, tftpd, tpm2-abrmd, + wpa_supplicant, xen, xlib_libX11, xserver_xorg-server + + New packages: python3-cython, python3-pycryptodomex + + Issues resolved (http://bugs.uclibc.org): + + #12876: nodejs fails to build when host-icu has been built before + #13111: python-gunicorn: missing dependency on python-setuptools + #12121: wpa_supplicant fails to build without libopenssl enabled + #13146: raspberrypi3_defconfig: "Inappropriate ioctl for device".. + #13156: package live555 new license + #13166: python-rpi-gpio: does not work against aarch64, unint.. + +2020.08-rc1, released August 6th, 2020 + + Toolchain: + + - GCC 10.x added, GCC 9.x is the default + - binutils 2.34 added, binutils 2.33 is the default, binutils + 2.31 removed + - glibc updated to 2.31 + - ARC toolchain components updated to 2020.03-release. + - Enable uClibc-ng usage for RISC-V 64-bit + + Infrastructure: + + - qmake-package was fixed to be compatible with + BR2_PER_PACKAGE_DIRECTORIES + - complete rewrite of the Gitlab CI Yaml configuration file, + now generated directly by the Gitlab CI pipeline itselfs + + Misc: + + - cargo and cargo-bin packages removed, as cargo is now part + of Rust itself + + Filesystem: ubinize configuration files can now use + BINARIES_DIR to refer to the $(O)/images directory. + + New packages: bitwise, earlyoom, fuse-overlayfs, gloox, + kodi-pvr-octonet, kodi-pvr-zattoo, libabseil-cpp, libcutl, + libnids, libnpupnp, libodb, libodb-boost, libodb-mysql, + libodb-pgsql, mbpfan, netopeer2, odb, parprouted, + python-colorzero, python-gpiozero, python-pybind, python-yatl, + python3-decorator, qt5quicktimeline, resiprocate, ttyd, + unclutter-xfixes, urandom-scripts, + + New defconfigs: bananapi_m2_zero, freescale_imx8mnevk, + globalscale_espressobin, imx6ullevk, + microchip_sama5d27_wlsom1_ek, rock_pi_4, rock_pi_n10 + + Removed packages: cargo, cargo-bin, + kodi-peripheral-steamcontroller + + Issues resolved (http://bugs.uclibc.org): + + #12941: Python GObject fails to build when using BR2_PER_PACKAGE_DIRECTORIES + #12946: Grub: Decompressor is too big. + #12986: Mtools: Error converting to codepage 850 + #13001: openjdk-bin replaces libfreetype.so from host-freetype + #13011: Incorrect selection of gcc version + #13021: Minor code error when building granite-0.4.1 + #13026: rpi-firmware: must not rename start files + #13046: Optimize for fast -Ofast is not compliant + #13081: host-e2fsprogs attempts to create udev rules.d on build host if not exists + #13101: BR audit2allow support + +2020.05.1, released July 25th, 2020 + + Important / security related fixes. + + Toolchain: + - Make external toolchain version check also work for + toolchains configured with --with-gcc-major-version-only + + - Do not handle SOURCE_DATE_EPOCH in toolchain wrapper if the + compiler supports it, fixing an issue with precompiled + headers + + - Ensure debug libs from external toolchains are not installed + into target if debugging is disabled + + Download: + - Correct reproducibility issue in handling of git submodules + for older git versions. + + - Fix file locking over NFS + + fs: Ensure cpio archive element order is reproducible + + Br2-external: Fix error reporting for invalid br2-external trees + + Per-package: + - Fix an issue with python3 sysconfig data not getting + correctly expanded + + - Fix per-package building for packages using the qmake + infrastructure + + Updated/fixed packages: a10disp, asterisk, bind, brltty, + cdrkit, clamav, cryptodev-linux, dbus, docker-cli, + docker-engine, dvb-apps, e2fsprogs, exim, exiv2, freerdp, gdb, + gdk-pixbuf, gerbera, gnutls, go, granite, grub2, gssdp, + gst1-plugins-good, gst1-plugins-ugly, gupnp, intel-microcode, + iproute2, irrlicht, iwd, jq, kodi, libcamera, libcec, + libconfuse, libcurl, libevdev, libhttpserver, libmicrohttpd, + libnss, libressl, libvncserver, libxml2, libxmlrpc, lxc, + mbedtls, mediastreamer, mesa3d, meson, minizip, mongodb, + mtools, mutt, nano, network-manager, nghttp2, ngircd, nodejs, + ntp, open-plc-utils, open2300, openjdk-bin, openssh, + oracle-mysql, paho-mqtt-c, pango, php, poco, prosody, putty, + python-greenlet, python-urllib3, python-validators, python3, + readline, redis, rpi-firmware, rtl8821au, samba4, sdl2, + sqlite, squid, strace, sunxi-mali-mainline-driver, syslog-ng, + systemd, tcpreplay, tinydtls, upmpdcli, upx, vlc, webkitgtk, + wireguard-linux-compat, wireshark, wpebackend-fdo, wpewebkit, + x11vnc, znc, zstd + + Issues resolved (http://bugs.uclibc.org): + + #12941: Python GObject fails to build when using BR2_PER_PACKAGE_.. + #12946: Grub: Decompressor is too big. + #12986: Mtools: Error converting to codepage 850 + #13001: openjdk-bin replaces libfreetype.so from host-freetype + #13011: Incorrect selection of gcc version + #13021: Minor code error when building granite-0.4.1 + #13026: rpi-firmware: must not rename start files + #13031: nodejs: RangeError at new ArrayBuffer() + #13046: Optimize for fast -Ofast is not compliant + +2020.05, released June 1st, 2020 + + Various fixes. + + Updated/fixed packages: arm-trusted-firmware, gcc, mp4v2, fmc, + fmlib, glib-networking, libusb-compat, linux, qt5webengine, + sysrepo, wampcc, xen + +2020.05-rc3, released May 29th, 2020 + + Fixes all over the tree. + + Infrastructure: Support checking download hashes for packages + coming from Subversion. + + Defconfigs: Increase boot partition size to 64MB for Freescale + boards to allow space for bigger kernels. + + Updated/fixed packages: audit, bind, dovecot, efl, erlang, + ffmpeg, fio, gerbera, gnupg, leveldb, lrzip, ltrace, matio, + mesa3d, mp4v2, prosody, qemu, qt5declarative, speexdsp, + systemd, tremor, uboot-tools, unbound, wireshark + + Removed packages: wiringpi + + Issues resolved (http://bugs.uclibc.org): + + #12361: Init system (systemd) kills login on Raspberry Pi Zero + #12686: recipe for target 'install_dev' failed (libcrypto.so..) + +2020.05-rc2, released May 22nd 2020 + + Fixes all over the tree. + + U-Boot: Support building with Python 3.x instead of Python + 2.x. Since U-Boot 2020.01, various U-Boot build scripts use + Python 3.x instead of Python 2.x, so add an option to pull in + host-python3 rather than host-python. Also fix a number of + defconfigs to use this new option. + + Updated/fixed packages: apparmor, binutils, bison, brltty, + c-icap, cegui, checkpolicy, clamav, crda, cvs, docker-cli, + docker-engine, domoticz, elf2flt, exfatprogs, fakeroot, + ffmpeg, freerdp, gcc, glibc, gnuconfig, irrlicht, kmod, + libexif, libpam-tacplus, libssh2, libv4l, libvncserver, + localedef, lrzip, mariadb, matchbox, mbuffer, mesa3d, + mesa3d-headers, meson, netsniff-ng, openldap, openocd, + optee-os, p7zip, paho-mqtt-c, php, piglit, pigz, + python-argon2-cffi, python-attrs, python-future, + python-markdown, python-pycryptodomex, python-pyqt5, qt5base, + rpi-firmware, rustc, squashfs, squid, stella, suricata, + systemd, uacme, uclibc, util-linux, vboot-utils + + New packages: python3-pyelftools + + Removed packages: ezxml, mtdev2tuio, python-pycrypto + + Issues resolved (http://bugs.uclibc.org): + + #10551: PowerPC SPE and Musl + #12256: package tar is outdated (1.29 is 3 years old) + #12271: python-iptables runtime dependencies + #12321: host-generic-package: PKG_DL_OPTS not used for host package + #12391: CMake-based host package fails to include output/host/include + #12431: ethernet no detected on nanopi neo 2 + #12521: RISCV RV32IA selected, RV64GC output + #12586: avahi failure + #12596: host-e2fsprogs: tune2fs incompatibility on older glibc.. + #12611: ntp hash is not matching with upstream 4.2.8p13 + #12626: PHP missing header files within 2020.02 + #12631: glibc support Power-PC SPE + #12656: bison fails to relocate with relocate-sdk.sh + #12661: cups problems in buildroot + #12686: recipe for target 'install_dev' failed (libcrypto.so:.. + #12691: host-rust build fails + #12761: Buildroot fails when building GCNano binaries for the STM.. + #12786: Systemd spawns two getty processes when the getty port.. + #12806: There are multiple issues in buildroot that faults cups.. + #12826: nodejs-12.16.1: error: 'uv_sleep' was not declared in.. + #12831: RPI-firmware package: DTB-overlay dependency + #12836: libunwind: package does not show up in menuconfig for.. + #12841: util-linux/sfdisk 2.35.1 fails on sector-size header + #12866: should we be disabling bash executable path caching? + #12886: GMP built in wrong order (?) + #12891: QEMU, libvirt-bin, qemu-kvm Package Support required + #12901: GStreamer doesn't build on 2020-05 rc1 with GObject.. + #12906: qt PrefixPath is wrong on 2020.05-rc1 + #12921: nodejs-12.16.1: error: overriding 'virtual icu_65::.. + +2020.05-rc1, released May 7th 2020 + + Addition of support for gobject-introspection: both the + gobject-introspection package itself, but also introspection + support was enabled in a number of other packages. + + Support for Qt 5.6 was dropped as its support was dropped + upstream, only one version of Qt is supported at the moment: + Qt 5.14.2. + + Addition of support for the apparmor Linux security module, by + adding the necessary user-space packages. + + Addition of a qmake package infrastructure, now used by most + Qt-related packages. + + The Luarocks package infrastructure has been extended to + support build host packages. + + The package infrastructure was improved to allow each package + to indicate the Linux kernel configuration options it needs. + + Addition of support for generating filesystem images using the + EROFS filesystem. + + The logic that calculates the list of files installed by each + package was reworked to be compatible with the top-level + parallel build functionality. + + Addition of a package for a pre-compiled ARM32 bare-metal + toolchain, which can be used to build ARM32 code in ARM64 + configurations, such as firmware/bootloader code. + + The Qemu defconfigs are now boot-tested in Qemu as part of the + Gitlab continuous integration. + + Toolchain: gcc 9.x bumped to 9.3.0, gcc 8.x bumped to 8.4.0, + gdb bumped to 8.3.1. + + New packages: apcupsd, apparmor, arm-gnu-a-toolchain, bearssl, + belle-sip, belr, cage, chartjs, erofs-utils, exfatprogs, + gobject-introspection, ibm-sw-tpm2, imx-seco, jbig2dec, + libapparmor, libiberty, libfuse3, libtextstyle, libudfread, + libuhttpd, libuwsc, lua-lyaml, matio, mbuffer, netdata, + openfpgaloader, perl-i18n, perl-locale-maketext-lexicon, + perl-lwp-protocol-https, + perl-mojolicious-plugin-authorization, + perl-mojolicious-plugin-cspheader, + perl-mojolicious-plugin-i18n, + perl-mojolicious-plugin-securityheader, perl-mozilla-ca, + perl-path-class, pistache, pkcs11-helper, prelink-cross, + python-argon2-cffi, python-canopen, python-cbor2, + python-filelock, python-flatbuffers, python-greenlet, + python-modbus-tk, python-pyalsa, python-pysftp, python-regex, + python-snappy, rtty, tinyproxy, udev-gentoo-scripts, unbound, + vuejs, wlroots. + + New defconfigs: freescale_imx6ullevk, freescale_imx8qmmek, + nanopi_neo4, nanopi_r1, nitrogen8mm, nitrogen8mn, olpc_xo1, + olpc_xo175, roc_rk3399_pc, stm32mp157a_dk1, zynq_qmtech + + Issues resolved (http://bugs.uclibc.org): + + #10386: Add an option to put all compiled executables that + show up on target/ in staging/ as well + #11866: iniramfs file system fails to boot using Grub on EFI x86_64 + #12666: Doesn't pick up a custom bash profile + #12696: Uboot 2020.01 Problem loading Linux kernel on Nano PI NEO + #12701: [patch] wpa_supplicant must depend on openssl + #12711: host-localedef 2.30-20 fails to compile on fedora 32 (gcc 10.0.1) + #12716: bio.h not found + #12726: systemctl preset-all failed for ctrl-alt-del.target + #12731: rtl8188eu not buildung for banana pi M1 (glib, systemd, 4.18.12) + #12746: "sysdig" package description points to + http://sysdig.org, which bounces to malware site + #12751: OpenJdk package installation issues on target + #12796: Update OpenSSL to Version 1.1.1g to patch CVE-2020-1967 + #12811: bootstrap stuck and no login prompt + +2020.02.4, released July 26th, 2020 + + Important / security related fixes. + + Toolchain: + - Make external toolchain version check also work for + toolchains configured with --with-gcc-major-version-only + + - Do not handle SOURCE_DATE_EPOCH in toolchain wrapper if the + compiler supports it, fixing an issue with precompiled + headers + + - Ensure debug libs from external toolchains are not installed + into target if debugging is disabled + + Download: + - Correct reproducibility issue in handling of git submodules + for older git versions. + + - Fix file locking over NFS + + fs: Ensure cpio archive element order is reproducible + + Br2-external: Fix error reporting for invalid br2-external trees + + Per-package: + - Fix an issue with python3 sysconfig data not getting + correctly expanded + + - Fix per-package building for packages using the qmake + infrastructure + + Updated/fixed packages: a10disp, asterisk, bind, cdrkit, + checkpolicy, clamav, dbus, docker-cli, docker-engine, + dvb-apps, e2fsprogs, exim, exiv2, freerdp, gnutls, go, grub2, + gssdp, gst1-plugins-good, gst1-plugins-ugly, gupnp, + intel-microcode, iproute2, irrlicht, iwd, jq, kodi, libcamera, + libconfuse, libcurl, libglib2, libhttpserver, libmicrohttpd, + libopenssl, libvncserver, libxml2, libxmlrpc, lxc, mbedtls, + mesa3d, meson, mongodb, mtools, mutt, nghttp2, ngircd, nodejs, + ntp, open-plc-utils, open2300, openjdk-bin, openssh, + oracle-mysql, paho-mqtt-c, pcre, php, poco, prosody, putty, + python-twisted, python-urllib3, python-validators, python3, + qt5xmlpatterns, redis, rpi-firmware, rtl8821au, samba4, sdl2, + sqlite, squid, syslog-ng, systemd, tcpreplay, tinydtls, + upmpdcli, upx, vlc, webkitgtk, wireguard-linux-compat, + wireshark, wpebackend-fdo, wpewebkit, zstd + + Issues resolved (http://bugs.uclibc.org): + + #12941: Python GObject fails to build when using BR2_PER_PACKAGE_.. + #12946: Grub: Decompressor is too big. + #12986: Mtools: Error converting to codepage 850 + #13001: openjdk-bin replaces libfreetype.so from host-freetype + #13011: Incorrect selection of gcc version + #13026: rpi-firmware: must not rename start files + #13031: nodejs: RangeError at new ArrayBuffer() + #13046: Optimize for fast -Ofast is not compliant + +2020.02.3, released June 3rd, 2020 + + Important / security related fixes. + + Fix various build issues of host packages on hosts using GCC + 10. + + Updated/fixed packages: arm-trusted-firmware, audit, bind, + binutils, bison, clamav, crda, dovecot, dtc, efl, elf2flt, + erlang, fakeroot, ffmpeg, fmc, fmlib, freerdp, gcc, git, + glib-networking, gnupg, leveldb, libexif, libssh2, + libusb-compat, linux-headers, lrzip, ltrace, mariadb, mesa3d, + mp4v2, openldap, openocd, perl, php, prosody, + python-pycryptodomex, python-pyqt5, qemu, rpi-firmware, rustc, + speexdsp, sysrepo, systemd, tremor, vboot-utils, wireshark, + xen + + Removed packages: python-pycrypto + + Issues resolved (http://bugs.uclibc.org): + + #12361: Init system (systemd) kills login on Raspberry Pi Zero + #12656: bison fails to relocate with relocate-sdk.sh + #12671: leveldb won't detect that snappy is present (static.. + #12691: host-rust build fails + #12831: RPI-firmware package: DTB-overlay dependency + +2020.02.2, released May 12th, 2020 + + Important / security related fixes. + + Musl: Disallow on PPC64 cores without AltiVec support + (E.G. e5500). + + fs/cpio: Correctly handle booting with 'console=' + + release: Ensure temporary .br2-external.* files are not + included in the release tarball + + Defconfigs: Fix various mistyped config options, or config + options where the dependencies were no longer met. + + Updated/fixed packages: apache, azure-iot-sdk-c, binutils, + boinc, c-ares, cvs, docker-cli, docker-containerd, + docker-engine, domoticz, e2fsprogs, efl, evtest, exim, ffmpeg, + freerdp, gcc, gflags, glibc, gnuconfig, haproxy, imx-gpu-2d, + irrlicht, jpeg kodi-pvr-vuplus, libarchive, libcoap, + libfpm-extra, libglib2, libhtp, libid3tag, libinput, libmad, + libopenssl, libsepol, libssh, libv4l, libvncserver, libwpe, + localedef, mariadb, matchbox, mbedtls, mc, mesa3d-headers, + meson, midori, msgpack, netsnmp, nginx, ogre, openjdk, + openldap, openvpn, p7zip, paho-mqtt-c, php, polkit, python, + python-attrs, python-crossbar, python-dpkt, python-flask, + python-future, python-iptables, python-jedi, python-markdown2, + python3, qemu, qpdf, qt5, samba4, squashfs, squid, strongswan, + suricata, tzdata, util-linux, vlc, wget, webkitgtk, + wireguard-linux-compat, wireshark, wpebackend-fdo, wpewebkit, + zic + + Issues resolved (http://bugs.uclibc.org): + + #11866: initramfs file system fails to boot using Grub on EFI x86_64 + #12271: python-iptables runtime dependencies + #12726: systemctl preset-all failed for ctrl-alt-del.target + #12751: OpenJdk package installation issues on target + #12796: Update OpenSSL to Version 1.1.1g to patch CVE-2020-1967 + #12811: bootstrap stuck and no login prompt + #12841: util-linux/sfdisk 2.35.1 fails on sector-size header + +2020.02.1, released April 10th, 2020 + + Important / security related fixes. + + core: Also fixup /lib references in libtool .la files, similar + to how it is done for /usr/*. + + Various fixes for builds with per-package target/host + directories. + + toolchain: Fix kernel headers validation check for external + toolchains. Fix make 4.3+ compatibility in external toolchain + logic. + + fs/initramfs: fix show-info so it also shows the usual + rootfs-related variables. + + Updated/fixed packages: arm-trusted-firmware, barebox-aux, + bluez5_utils, bubblewrap, busybox, civetweb, cog, collectd, + ffmpeg, gcc, gnutls, gssdp, gvfs, haproxy, hiredis, hostapd, + kmscube, kodi-screensaver-rsxs, libical, libinput, libexif, + libopenssl, libsndfile, linux, linux-tools, llvm, localedef, + mcrypt, mesa3d, meson, monit, nftables, ntp, opencv3, + oprofile, php, pinentry, polkit, pure-ftpd, python-pyyaml, + qt5, quagga, radvd, rcw, redis, rocksdb, samba4, screen, + sdbusplus, swupdate, sysdig, sysklogd, syslinux, syslog-ng, + tor, tslib, uacme, util-linux, vala, vlc, + wireguard-linux-compat, wireguard-tools, wireshark, + wpa_supplicant, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #12711: host-localedef 2.30-20 fails to compile on fedora 32 + #12746: "sysdig" package description points to http://sysdig.org, .. + +2020.02, released March 8th, 2020 + + Various fixes. + + br2-external: Fix compatibility with make 4.3+ + + Updated/fixed packages: bash, bcm2835, binutils, cups, + erlang-p1-acme, fbgrab, gr-osmosdr, gst1-plugins-base, + gst1-validate, gstreamer1, guile, jhead, libdrm, libevdev, + libinput, libnss, libsndfile, libvncserver, linux-firmware, + mesa3d, nodejs, openjdk-bin, openvmtools, optee-test, patch, + php, piglit, pppd, python-django, qemu, qt5base, ruby, + ser2net, swupdate, thrift, zziplib + + Removed packages: classpath, jamvm + + Issues resolved (http://bugs.uclibc.org): + + #12606: fbgrab location has changed + +2020.02-rc3, released March 2nd, 2020 + + Fixes all over the tree. + + Infrastructure: Rework file list handling to fix race + conditions when building with per-package target and host + directories and top-level parallel builds. + + Updated/fixed packages: aufs, binutils, blktrace, brltty, + cairo, dnsmasq, docker-compose, elf2flt, exim, exiv2, git, + kodi-inputstream-adaptive, libarchive, libcgroup, libgdiplus, + libssh2, libvncserver, libvorbis, linknx, linux-firmware, lxc, + lz4, mosquitto, openjpeg, openrc, poco, proftpd, pure-ftpd, + python3, python-multidict, python-setuptools-scm-git-archive, + qpdf, qt5tools, rdesktop, rocksdb, shellinabox, squid, + suricata, swig, systemd, taglib, util-linux, wireshark, zsh + + Issues resolved (http://bugs.uclibc.org): + + #12571: ltp-testsuite : Build failure + #12576: 2020.02-RC1: error while loading shared libraries: ... + #12581: 2020.02-rc1 glibc failing to build on fedora 31 + +2020.02-rc2, released February 26th, 2020 + + Fixes all over the tree. + + Toolchain: Ensure strong SSP can only be enabled if the + (external) toolchain supports it. + + Fix a race condition related to creating the output/staging + symlink on systems with coreutils < 8.27. + + Drop support for the (end of life) Qt 5.6 variant. + + Updated/fixed packages: at, armadillo, audiofile, bash, + busybox, erlang, fail2ban, fluidsynth, ipsec-tools, jpeg-turbo, + kvm-unit-tests, libftdi1, libinput, libsvgtiny, libtomcrypt, + libupnpp, libxml2, linux-tools, luv, mbedtls, mesa3d, minicom, + openvmtools, php, qt5, qt5webengine, qwt, radvd, rcw, + sdbusplus, systemd, tpm2-tss, vorbis-tools + + Issues resolved (http://bugs.uclibc.org): + + #12581: 2020.02-rc1 glibc failing to build on fedora 31 + +2020.02-rc1, released February 18th, 2020 + + Fixes all over the tree and new features. + + Add experimental support for building with a per-package + target and host directory. This still has some rough edges, + but brings a number of advantages: + + - Packages will only be able to access the explicitly listed + dependencies and not any other packages that happen to be + built before, ensuring correct dependency information in + Buildroot. + + - Possibility for top-level parallel builds, speeding up + builds on multicore machines. + + Core: Ensure package-file-lists data is correct after + incremental builds as well. + + Architecture: Add support for ARC-HS38 with 64bit multiplier + variant, allow building glibc for big endian ARC, handle 16KB + MMU page size for ARC in toolchain wrapper. + + Toolchain: Add binutils 2.33.1, GCC 7.5.0, Arm 9.2-2019.12 + toolchains, ARC 2019.09 toolchain. Allow using custom kernel + headers newer than what is known by Buildroot. + + pkg-stats: Support for CVE vulnerability reporting by + comparing to NVD database. + + Reproducible builds: The go -trimpath option is now used to + get rid of absolute build paths, __FILE__ and __BASE_FILE__ + defines are now handled in the toolchain wrapper. + + Systemd: Build host variant and use systemctl to automatically + enable unit files rather than manually managing symlinks. + + Util-linux: Ensure that hwclock is built without GPLv3 + code. Notice that builds with hwclock has contained + GPLv3-licensed code since util-linux 2.30 (Buildroot 2017.08+) + + New defconfigs: Beelink GS1, Raspberrypi4 64bit + + New packages: alura, avro-c, bubblewrap, cctz, cereal, + cpuburn-arm, elixir, erlang-base64url, erlang-idna, + erlang-jose, erlang-p1-acme, erlang-p1-mqtree, + erlang-p1-yconf, fluid-soundfont, fluidsynth, gcnano-binaries, + gensio, glslsandbox-player, libargon2, libmodsecurity, + libpam-nfc, libtelnet, lua-codegen, lua-livr, lua-livr-extra, + lua-rotas, lua-silva, mfoc, network-manager-openvpn, + nginx-modsecurity, perl-crypt-openssl-aes, + perl-math-prime-util, pipewire, ptm2human, python-aenum, + python-aiohttp-debugtoolbar, python-aiohttp-mako, + python-aiologstash, python-aiosignal, python-aiozipkin, + python-async-lru, python-avro, python-bunch, python-crontab, + python-dnspython, python-entrypoints, python-esptool, + python-frozenlist, python-future, python-gitdb, python-janus, + python-lockfile, python-logstash, python-nested-dict, + python-pbr, python-pyaes, python-pydantic, python-smmap2, + python-sockjs, python-zc-lockfile, raspi-gpio, rocksdb, + sdbusplus, spidermonkey, thermald, ti-sgx-libgbm, tinyssh, + tio, umtprd, weston-imx, wireguard-linux-compat, + wireguard-tools, xdg-dbus-proxy + + Removed packages: bluez_utils, celt051, erlang-p1-iconv, fis, + gadgetfs-test, libplayer, gstreamer, gst-ffmpeg, + gst-fsl-plugins, gst-omapfb, gst-plugins-bad, + gst-plugins-base, gst-plugins-good, gst-plugins-ugly, + perl-digest-md5, perl-mime-base64, perl-net-ping, + python-scapy3k, wireguard + + Issues resolved (http://bugs.uclibc.org): + + #11906: the new version of mesa3d cannot support etnaviv when.. + #11996: opencv3 SIGILL on Cortex-A5 with VFPv4-D16 + #12121: PyQt5.QtSerialPort and other modules not being built + #12256: package tar is outdated (1.29 is 3 years old + #12286: Can't import gobject in python 3.8 + #12376: python-scapy3k is deprecated + #12386: carriage return issue when "make menuconfig" + #12441: qt5webengine build error: asm/errno.h: No such file or.. + #12446: Buildroot fails to finish installing packages + #12456: qtvirtualkeyboard: No such file or directory + #12461: libglib2 build files with deep directory structure + #12481: minicom fails when output directory path contains "m4" + #12501: libnss-3.49.1: ld error: multiple definition of `gcm_.. + #12526: host-nodejs 12.14.1: configure fail: AttributeError: .. + #12536: Linux-Headers extracting failure + #12546: Ninja 1.10 build Error + +2019.11.3, released April 10th, 2020 + + Important / security related fixes. + + core: Fix compatibility with make 4.3+. Also fixup /lib + references in libtool .la files, similar to how it is done for + /usr/*. + + toolchain: Fix kernel headers validation check for external + toolchains. + + fs/initramfs: fix show-info so it also shows the usual + rootfs-related variables. + + Updated/fixed packages: barebox-aux, bluez5_utils, busybox, + civetweb, cog, collectd, ffmpeg, gcc, gnutls, gssdp, gvfs, haproxy, + hiredis, hostapd, kmscube, libical, libopenssl, libsndfile, + linux-tools, llvm, monit, ntp, php, pure-ftpd, radvd, redis, + samba4, screen, sysdig, syslinux, syslog-ng, tor, uacme, + util-linux, vala, vlc, wpa_supplicant, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #12746: "sysdig" package description points to http://sysdig.org, .. + +2019.11.2, released March 16th, 2020 + + Important / security related fixes. + + Core: Ensure package-file-lists data is correct after + incremental builds as well. + + Fix a race condition related to creating the output/staging + symlink on systems with coreutils < 8.27. + + Toolchain: ARC tools bumped to arc-2019.09. + + Br2-external: Fix patch handling when external linux-extension + packages are used. Fix compatibility with make 4.3+ + + Util-linux: Ensure that hwclock is built without GPLv3 + code. Notice that builds with hwclock has contained + GPLv3-licensed code since util-linux 2.30 (Buildroot 2017.08+) + + Updated/fixed packages: armadillo, at, bcm2835, binutils, + blktrace, bluez-alsa, bootstrap, brltty, busybox, cairo, + clamav, cog, cups, czmq, dnsmasq, docker-containerd, dovecot, + dovecot-pigeonhole, e2fsprogs, elf2flt, eudev, exim, exiv2, + fbgrab, gettext-tiny, glibc, go, grep, gst1-validate, guile, + imagemagick, jhead, jpeg-turbo, kvm-unit-tests, lapack, + libarchive, libcgroup, libdrm, libevent, libexif, libftdi1, + libgdiplus, libjpeg, libsigrok, libsndfile, libssh2, + libsvgtiny, libvncserver, libvorbis, libxml2, libxslt, linknx, + lxc, lz4, mariadb, mbedtls, meson, mongoose, mosquitto, musl, + ncurses, nodejs, ntfs-3g, ogre, opencv3, openjdk, openjpeg, + openrc, openswan, openvmtools, optee-test, patch, php, piglet, + postgresql, pppd, proftpd, pure-ftpd, python-django, + python-pyqt5, python-setuptools-scm-git-archive, python3, + qemu, qt5base, qt5tools, qt5virtualkeyboard, qt5webengine, + qwt, rdesktop, ruby, runc, samba4, shellinabox, + skeleton-init-openrc, smartmontools, spdlog, sqlcipher, squid, + suricata, swig, swupdate, sysklogd, taglib, thrift, + ti-cgt-pru, uclibc, util-linux, vorbis-tools, webkitgtk, + wireshark, wpebackend-fdo, wpewebkit, xen, + xserver_xorg-server, zeromq, zsh, zziplib + + Issues resolved (http://bugs.uclibc.org): + + #11996: opencv3 SIGILL on Cortex-A5 with VFPv4-D16 + #12331: meson issue + #12456: qtvirtualkeyboard: No such file or directory + #12461: libglib2 build files with deep directory structure + #12481: minicom fails when output directory path contains "m4" + #12606: fbgrab location has changed + +2019.11.1, released January 12th, 2020 + + Important / security related fixes. + + Infrastructure: kconfig: Fix reconfigure logic, python: Ensure + correct compiler and linker flags are used for compiled code + + utils/scanpypi: Remind users to update DEVELOPERS + + Defconfigs: imx6-sabresd: Fix the Qt5 display names, + imx8: Drop extra copy of U-Boot DTB + + Updated/fixed packages: acsccid, bitcoin, boost, busybox, + cc-tool, cmocka, cpio, cups, dante, dialog, dillo, docker-cli, + docker-containerd, docker-engine, easy-rsa, ebtables, + ecryptfs-utils, efl, ffmpeg, gdb, git, glibc, gnupg2, go, + gpsd, grpc, gst1-plugins-bad, iputils, jasper, + kf5-kcoreaddons, leveldb, libarchive, libfribi, libgit2, + libkrb5, libp11, librsvg, libssh, libtomcrypt, libuio, libv4l, + lirc-tools, log4cplus, lrzip, lvm2, mali-t76x, + matchbox-desktop, mender-grubenv, mmc-utils, mosquitto, + nodejs, ntp, openipmi, opencv3, openpowerlink, openrc, pango, + perl-sys-cpu, pimd, postgresql, pulseaudio, python-brotli, + python-coherence, python-crc16, python-django, python-dpkt, + python-gobject, python-pyasn-modules, python-pypcap, + python-pyqt5, python-subprocess32, python3, qpdf, + qt-webkit-kiosk, qt5virtualkeyboard, qt5webengine, quota, + rabbitmq-c, rauc, rpcbind, rtl8821au, runc, rygel, samba4, + sdl2, setserial, snort, spidev_test, + sunxi-mali-mainline-driver, syslog-ng, sysrepo, tcllib, tftpd, + usbmount, w_scan, wavpack, wsapi, wsapi-fcgi, wsapi-xavante, + x265, xserver_xorg-server, ytree, zip + + Issues resolved (http://bugs.uclibc.org): + + #12121: PyQt5.QtSerialPort and other modules not being built + #12286: Can't import gobject in python 3.8 + +2019.11, released December 1st, 2019 + + Various fixes. + + Infrastructure: Make HOST__DL_OPTS inherit from + _DL_OPTS by default, just like it is done for a number of + other package variables. + + Add _KEEP_PY_FILES to exclude specific python .py files + from the removal done by BR2_PACKAGE_PYTHON{,3}_PYC_ONLY for + the (rare) case where the .py files are needed at runtime + rather than .pyc. + + Updated/fixed packages: am33x-cm3, bind, collectd, go, gob2, + gst1-plugins-bad, haproxy, jasper, jpeg-turbo, libdrm, + libftdi, libftdi1, libnss, libselinux, libstrophe, lzma, + minicom, network-manager, nodejs, oniguruma, opencv3, + openvmtools, perl-gdgraph, perl-gdtextutil, prosody, + python-cchardet, systemd, tiff, wolfssl, + + Issues resolved (http://bugs.uclibc.org): + + #11416: check-uniq-files staging issue + #12146: Oprofile runtime issue + #12166: Compiling nodejs for SAMA5D3 always crash with illegal inst.. + #12171: Python-opencv needs config.py and config-3.7.py to run.. + #12196: duma package + #12211: host-nodejs 10.15.3 package fail to build + #12316: tzdata fails to install with empty "default local time" + #12326: network-manager build fails with missing glib error + #12366: Gstreamer1 gst1-plugins-bad do not compile with RPI-Userland + +2019.11-rc3, released November 24th, 2019 + + Fixes all over the tree. + + Updated/fixed packages: asterisk, clamav, domoticz, faifa, + gerbera, kmod, kvm-unit-tests, libupnp18, linux-serial-test, + lsof, ltp-testsuite, lxc, mesa3d, mesa3d-headers, perl, php, + postgresql, qemu, rauc, redis, rpcbind, spice, spice-protocol, + systemd, tftpd, waylandpp, webkitgtk, zip + +2019.11-rc2, released November 16th, 2019 + + Fixes all over the tree. + + Toolchain: ARC tools bumped to arc-2019.09-rc1, ensure + external toolchain kernel headers version check correctly stop + the build on mismatch + + Meson: Fix generation of global cross-compilation.conf + + Download: Also use the package download method for extra + downloads from the same site, so it does not get confused by + URLs containing '+' + + Defconfigs: Fix boot issue for beaglebone + + Updated/fixed packages: bird, chrony, connman, dhcp, domoticz, + dropwatch, dtc, elf2flt, gettext-tiny, glog, intel-microcode, + ipsec-tools, jailhouse, kodi, libfribi, libmbim, libressl, + libsigrokdecode, libsvgtiny, linux-serial-test, ltp-testsuite, + lvm2, lxc, mariadb, mesa3d, minizip, ndisc6, neardal, ninja, + ofono, openvmtools, oracle-mysql, qt5wayland, safeclib, socat, + sudo, systemd, wpewebkit, xserver_xorg-server + +2019.11-rc1, released November 5th, 2019 + + Fixes all over the tree and new features. + + Dependencies: Gcc/g++ 4.8 or newer is now required on the + build host. + Ensure host has JSON::PP perl module installed if + webkitgtk/wpewebkit packages are enabled as it is needed + during their build process. + + Toolchain: Add support for the D programming language (GCC + 9.x, Glibc). + GCC 9.x updated to 9.2.0, Glibc updated to 2.30, Musl updated + to 1.1.24, uClibc-ng updated to 1.0.32, ARC toolchain updated + to arc-2019.09-eng002. + Musl: Add a patch to add support for + sched_{get,set}scheduler() and sched_{get,set}param() for + compatibility. + Generate check-headers program under BUILD_DIR rather than + /tmp to fix issues with distributions mounting /tmp noexec. + Also copy libssp.so for external toolchains if SSP + to handle toolchains providing SSP support in libssp rather + than in the C library + + New defconfigs: Beaglebone AI, FriendlyARM Nanopi NEO Plus2, + Libre Computer "La Frite", QEMU Armv7-A with trustzone/OP-TEE, + STM32MP157 Discovery Kit + + Arch: RISC-V: Default to a sensible floating point ABI based + on the selected ISA extensions rather than always defaulting + to ILP32/64 + + Graph-size: Package sizes are now shown in human readable form + (Kib/Mib/Gib) rather than always in Kib. Binary (KB/MB/GB) + format can be selected using the --binary option. The cut-off + limit for classifying packages as "other" is now configurable + using the --size-limit option. + + Br2-external: Linux kernel extensions can now also be provided + in an external tree by adding packages under + linux/linux-ext-*.mk. See the manual for details. + + Fakeroot now works correctly under Microsoft Windows 10 + Services for Linux, which does not provide SYSV IPC support + + The check-uniq-files logic which would complain if multiple + packages would touch the same files has been removed as it + causes issues in certain situations (when packages are + rebuilt) and the issue is no longer considered a problem for + toplevel parallel builds as those will use a per-package + staging/target directory. + With this removed, Python is no longer required for a basic + build (only for optional scripts). + + support/scripts/genimage.sh will no longer make a copy of + TARGET_DIR, speeding up post-build/image scripts. + + The runtime test logic now uses Python 3.x. + + A 'v' prefix has been dropped from the _SOURCE variable + for a number of packages to match the version numbers used by + https://release-monitoring.org + + New packages: caps, collectl, dav1d, fstrcmp, ima-evm-utils, + jitterentropy-library, kodi-vfs-rar, kodi-vfs-sftp, libavl, + libhttpserver, libmspack, libnetconf2, libolm, libyang, + linux-serial-test, lrzip, mdevd, minimodem, musl-fts, netifrc, + ogre, openlayers, python-aioredis, python-asgiref, + python-backports-functools-lru-cache, python-bluezero, + python-brotli, python-channels, python-channels-redis, + python-colorlog, python-daphne, python-django-enumfields, + python-jaraco-functools, python-kiwisolver, python-msgfy, + python-rpi-ws281x, python-setuptools-scm-git-archive, + python-simplelogging, python-soupsieve, python-sqliteschema, + python-sqlparse, python-tqdm, python-webencodings, qt5webview, + restclient-cpp, ripgrep, snmpclitools, sunwait, sysrepo, + uacme, utf8proc, uvw, ytree + + Removed packages: alljoyn, alljoyn-base, alljoyn-tcl-base, + devmem2, eventlog, kodi-audiodecoder-opus, + kodi-screensaver-planestate, kodi-visualisation-waveforhue, + python-pysnmp-apps, riscv-pk, ustr + + Issues resolved (http://bugs.uclibc.org): + + #9881: systemd-resolved not setting resolv.conf link + #10171: devmem2 w (word) is 8 bytes in x86 64 systems + #10586: musl gcc has ifunc enabled when musl doesn't support it + #10806: Allow nfs-utils to use ipv6 + #11366: [2018.08] SysV IPC not available for fakeroot on WSL + #11411: check-uniq-files target issue + #11766: Console (getty) issues with systemd + #11781: mariadb build error + #12031: Build of cups-filters fails while linking, apparently due.. + #12116: console prompt does not appear after login + #12141: eudev package is missing "render" and "kvm" groups + #12181: dropbear: norootlogin (-w) no longer works when PAM is enabled + #12186: Raspberry Pi Zero-W build fails on newer kernel versions + #12191: cmake BUILDDIR + #12241: Permission denied while running "make" + #12261: sudo versions prior to 1.8.28 are affected. + #12276: make clean/distclean does not remove BR2_DL_DIR and BR2_HOST_DIR + #12281: Custom configuration fails to build (based on raspberrypi3_.. + +2019.08.3, released December 7th, 2019 + + Important / security related fixes. + + Infrastructure: Make HOST__DL_OPTS inherit from + _DL_OPTS by default, just like it is done for a number of + other package variables + + Add _KEEP_PY_FILES to exclude specific python .py files + from the removal done by BR2_PACKAGE_PYTHON{,3}_PYC_ONLY for + the (rare) case where the .py files are needed at runtime + rather than .pyc. + + Fix -reconfigure handling for packages using the kconfig + infrastructure. + + Toolchain: ensure external toolchain kernel headers version + check correctly stop the build on mismatch + + Deconfigs: beaglebone: fix boot issue + + Updated/fixed packages: am33x-cm3, asterisk, bind, chrony, + clamav, cmocka, collectd, connman, dhcp, dropwatch, faifa, + gettext-tiny, gob2, haproxy, intel-microcode, ipsec-tools, + jailhouse, jasper, jpeg-turbo, kodi, kvm-unit-tests, libftdi, + libftdi1, libnss, libressl, libstrophe, libsvgtiny, lvm2, + lzma, mariadb, minicom, mosquitto, neardal, ninja, nodejs, + oniguruma, openvmtools, oracle-mysql, perl-gdgraph, + perl-gdtextutil, php, postgresql, prosody, python-cchardet, + python-django, qt5wayland, rabbitmq, rauc, redis, rpcbind, + socat, spice, spice-protocol, tftpd, tiff, webkitgtk + + New packages: libmspack + + Issues resolved (http://bugs.uclibc.org): + + #12166: Compiling nodejs for SAMA5D3 always crash with illegal inst.. + #12171: Python-opencv needs config.py and config-3.7.py to run.. + #12211: host-nodejs 10.15.3 package fail to build + #12316: tzdata fails to install with empty "default local time" + +2019.08.2, released November 9th, 2019 + + Important / security related fixes. + + Toolchain: Also copy libssp.so for external toolchains if SSP + to handle toolchains providing SSP support in libssp rather + than in the C library + + Download: Also use the package download method for extra + downloads from the same site, so it does not get confused by + URLs containing '+' + + Fakeroot now works correctly under Microsoft Windows 10 + Services for Linux, which does not provide SYSV IPC support + + utils/test-pkg: ensure to exit with an error upon failure + + Updated/fixed packages: asterisk, azmq, binutils, + cups-filters, domoticz, dtc, duma, elf2flt, eudev, exfat, + exfat-utils, fakeroot, fdk-aac, file, freerdp, gcc, gd, + ghostscript, go, gpsd, grpc, gst1-plugins-base, gvfs, icu, + intel-microcode, kvm-unit-tests, libfribidi, libnspr, libnss, + libopenssl, libpcap, libpciaccess, librsvg, libseccomp, + libsigrok, libtorrent, libunwind, libva, linux-tools, + lua-sdl2, lxc, minizip, mjpegtools, mongoose, mono, nbd, + nfs-utils, php, piglit, python, python-autobahn, + python-pysnmp-apps, python-tornado, python3, qemu, qt5base, + ruby, safeclib, samba4, sdl_mixer, sox, sudo, suricata, + systemd, tcpdump, unscd, util-linux, vdr-plugin-vnsiserver, + vtun, wireshark, xvisor, yaffs2utils + + Issues resolved (http://bugs.uclibc.org): + + #11366: [2018.08] SysV IPC not available for fakeroot on WSL + #12261: sudo versions prior to 1.8.28 are affected + +2019.08.1, released October 3rd, 2019 + + Important / security related fixes. + + Defconfigs: AArch64-efi: Fix grub configuration, Beaglebone: + Use default console settings + + Dependencies: Ensure host has JSON::PP perl module installed + if webkitgtk/wpewebkit packages are enabled as it is needed + during their build process. + + Toolchain: Generate check-headers program under BUILD_DIR + rather than /tmp to fix issues with distributions mounting + /tmp noexec. + + Updated/fixed packages: asterisk, augeas, axel, bind, bwm-ng, + cups, cups-filters, docker-cli, docker-engine, docker-proxy, + e2fsprogs, eudev, exim, expat, gcc, go, haveged, ifplugd, joe, + kf5-extra-cmake-modules, kf5-modemmanager-qt, + kf5-networkmanager-qt, libcamera, libcurl, libgcrypt, + libglib2, libgpg-error, libnspr, libnss, libopenssl, + logrotate, luksmeta, mariadb, mbedtls, mongodb, mosquitto, + ncurses, nfs-utils, nghttp2, nodejs, openvmtools, php, + protobuf, putty, qemu, samba4, snort, swupdate, + systemd-bootchart, thttpd, uclibc, unzip, util-linux, + wireshark + + Issues resolved (http://bugs.uclibc.org): + + #10806: Allow nfs-utils to use ipv6 + #11781: mariadb build error + #12031: Build of cups-filters fails while linking, apparently due.. + #12141: eudev package is missing "render" and "kvm" groups + #12241: Permission denied while running "make" + +2019.08, released September 1st, 2019 + + Various fixes. + + Defconfigs: Removed nanopc t4, nanopi m4 and neo4, pine64 + rockpro64 and raxda rock pi4 as they rely on a ARM32 toolchain + on the build host to build ATF. These defconfigs will be added + back once a package providing such toolchain is + available. Also dropped ts4800 defconfig as it does not build + with GCC >= 8.x. + + Updated/fixed packages: libxcb, php, python-numpy, webkitgtk, + wpewebkit, xfont_font-util + + Issues resolved (http://bugs.uclibc.org): + + #12156: buildroot-2019.08-rc3 does not build for Pi Zero W + +2019.08-rc3, released August 28th, 2019 + + Fixes all over the tree. + + Updated/fixed packages: clamav, dovecot, dovecot-pigeonhole, + gcc, intel-microcode, libmicrohttpd, libmodplug, mpg123, + nginx, openldap, python, qemu, samba4, squid, strace, vlc + + Issues resolved (http://bugs.uclibc.org): + + #11686: fbdev_drv.so: undefined symbol: shadowUpdatePackedWeak,.. + +2019.08-rc2, released August 20th, 2019 + + Fixes all over the tree. + + Compile fixes for a number of defconfigs. + + Updated/fixed packages: apache, autofs, batctl, batman-adv, + bind, collectd, cwiid, dahdi-linux, dahdi-tools, daq, + dehydrated, dhcp, dtc, efl, enlightenment, evtest, giflib, + gnutls, go, gst-plugins-bad, gst-plugins-base, + gst1-plugins-bad, gst1-plugins-base, gst1-rtsp-server, gtkmm3, + gupnp, harfbuzz, imagemagick, lftp, libbsd, libcpprestsdk, + libdnet, libfm, libgit2, libgtk2, libgtk3, libpri, librsvg, + libss7, libssh2, libwpe, lua-cqueues, metacity, micropython, + mpd, mpg123, musl, mpv, openblas, openbox, opencv, pango, + pcmanfm, piglit, pigpio, pinentry, postgresql, qemu, qt5base, + qt5enginio, qt5multimedia, qt5serialbus, quagga, quazip, + rrdtool, rygel, samba4, stellarium, tcpreplay, ti-gfx, vte, + wampcc, wilink-bt-firmware, wireless-regdb, wpebackend-fdo, + xscreensaver + + Removed packages: libamcodec, odroid-mali, odroid-scripts + + Issues resolved (http://bugs.uclibc.org): + + #9481: NetworkManager/Ping unable to resolve domains + #10566: php.mk is missing option --with-pgsql + #10861: Package batman_adv Makefile is missing include header direct.. + #11641: linux kernel .config timestamp always out of date fixed with.. + #11671: russian locale ru_RU:145: LC_TIME: syntax error + #11701: recuuring of usr and in bin shortcuts are created + #11741: pigpio does not build host-pigpio + #11876: automount using host mount/umount + #11881: Build breaks with lftp package enabled and libexpat1-dev inst.. + #11921: dahdi fails to build + #11936: libcpprestsdk should install to staging + #11946: wilink-bt-firmware: moved from github to http://git.ti.com/ti-bt + #11961: libpri build failure + #12086: dhcp shared libraries not installed to target + #12096: tcpreplay: build fails if libdumbnet-dev is installed in the.. + #12106: daq: build fails if libdumbnet-dev is installed in the host + #12126: vc4 has neon as hard dependency + +2019.08-rc1, released August 9th, 2019 + + Fixes all over the tree and new features. + + toolchain: ARC toolchain updated to 2019.03 (binutils 2.32.51 + / GCC 8.3.1 / glibc 2.29), ARM AAarch64/ARM toolchains updated + to 2019.03. Add GCC 9.1.0, remove GCC 4.9 and 6.5, add GDB + 8.3, remove GDB 7.12 and 8.0.1, default to GDB 8.2, GCC + 8.3.0. Musl updated to 1.1.23, bringing support for RISC-V 64. + + Architectures: Internal toolchain support for C-SKY, support + for ARC HS48 v3.1 and HS38 with Quad MAC & FPU, support for + ARM A76, A76/A55 big.LITTLE, emag, neoverse-N1, phecda and + tsv110. + + Filesystems: Pass extra pax options to tar for binary + reproducibility. Build host-cpio for the --reproducible option + support when BR2_REPRODUCIBLE is enabled. Genimage updated to + version 11, bringing GPT support. + + Br2-external: Add support for injecting additional options to + the list of preconfigured external toolchains and libjpeg and + openssl providers using files under provides/. See the manual + for details. + + Ensure custom _OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS are + passed before the standard exclusions so they are not ignored + by rsync when using override-srcdir. + + Gnuconfig updated to 2019-05-28, adding C-SKY support. + + test-pkg: Correct long option handling and clean output dir + after a successful build to save disk space. + + support/testing: Emulate a machine with 256MB RAM to fix + issues with certain tests running out of memory, use + virtio-rng to provide needed entrophy. + + pkg-stats: support outputting in JSON format with --json for + easier post processing. The classic HTML output is still + available with --html. Parallelize access to + release-monitoring.org to speed up runtime. + + Drop non-conventional version prefix/suffix/separators for + packages for better compatibility with release-monitoring.org + + Packages: + Init systems: Add basic openrc support and + _INSTALL_INIT_OPENRC variable in the infrastructure to + install openrc service scripts if enabled. + + busybox: Build each applet as a separate binary when SELinux + is enabled for more finegrained policy control. Use daemon + mode for mdev rather than legacy hotplug. + + linux: Workaround -Werror related build failure on powerpc, + by forcing CONFIG_PPC_DISABLE_WERROR on. + + Defconfigs: QEMU: use 'rootwait' kernel option to ensure root + partition is available before mounting. + + New defconfigs: HiFive Unleashed, I.MX8MM EVK and Pico, Nanopi + m4 and neo4, Nanopc t4, Olimex A33 olinuxino, Pine64 + Rockpro64, PowerPC mac99, QEMU C-SKY 610/807/810/860 virt, + Raspberry Pi 4, Raxda rock pi4, Solidrun Clearfog GT-8K + + Removed defconfigs: Odroid C2 + + New packages: bitcoin, c-capnproto, fatcat, ifmetric, jack1, + jailhouse, libubootenv, luasyslog, mender-grubenv, + murata-cyw-fw, openrc, piglit, python-colorama, python-cycler, + python-hiredis, python-ifaddr, python-inflection, + python-iptables, python-matplotlib, python-periphery, + python-pycairo, python-redis, python-termcolor, + python-tinyrpc, python-txdbus, skeleton-init-openrc, spdlog, + sshguard, stellarium, zziplib + + Removed packages: xapp_mkfontdir + + Issues resolved (http://bugs.uclibc.org): + + #11096: Upgrade from glibc 2.26 to 2.27 broke some locales... + #11271: utils/check-package fails with exception depending on.. + #11991: [numpy] segfault when compiling for RPi3 64bits + #12016: Grub fails to boot bzImage after upgrade to 2019.05 + #12046: Can’t login as root user after upgrading to buildroot.. + #12051: package/dhcp installs libtool wrapper scripts on tar... + #12076: Patchelf can link against an incompatible libc++ ver... + +2019.05.3, Released October 3rd, 2019 + + Important / security related fixes. + + Defconfigs: AArch64-efi: Fix grub configuration, Beaglebone: + Use default console settings + + Dependencies: Ensure host has JSON::PP perl module installed + if webkitgtk/wpewebkit packages are enabled as it is needed + during their build process. + + Toolchain: Generate check-headers program under BUILD_DIR + rather than /tmp to fix issues with distributions mounting + /tmp noexec. + + Updated/fixed packages: asterisk, augeas, bind, bwm-ng, cups, + cups-filters, docker-cli, docker-engine, docker-proxy, + e2fsprogs, eudev, exim, expat, gcc, go, haveged, ifplugd, + iptables, joe, kf5-extra-cmake-modules, kf5-modemmanager-qt, + kf5-networkmanager-qtlibcamera, libcurl, libgcrypt, + libgpg-error, libnftl, libnspr, libnss, libopenssl, + libtorrent-rasterbar, luksmeta, mariadb, mbedtls, mongodb, + mosquitto, ncurses, nfs-utils, nghttp2, nodejs, openvmtools, + php, protobuf, putty, qemu, samba4, swupdate, + systemd-bootchart, thttpd, uclibc, unzip, util-linux, + wireshark + + Issues resolved (http://bugs.uclibc.org): + + #10806: Allow nfs-utils to use ipv6 + #11781: mariadb build error + #12031: Build of cups-filters fails while linking, apparently due.. + #12141: eudev package is missing "render" and "kvm" groups + #12241: Permission denied while running "make" + +2019.05.2, Released September 3rd, 2019 + + Important / security related fixes. + + Filesystems: Pass extra pax options to tar for binary + reproducibility. + + Updated/fixed packages: apache, arm-trusted-firmware, + asterisk, atk, autofs, batctl, batman-adv, berkeleydb, + busybox, bzip2, clamav, cloop, cmake, collectd, connman-gtk, + dahdi-linux, dahdi-tools, daq, dehydrated, dhcp, dovecot, + dovecot-pigeonhole,, elfutils, evtest, exim, expect, giflib, + git, glib-networking, glibc, gnupg2, gnutls, go, + gst1-rtsp-server, gtkperf, gupnp-tools, gvfs, imagemagick, + imx-uuc, intel-microcode, json-glib, lftp, libbsd, libcurl, + libgit2, libgtk2, libgtk3, libmodplug, libnss, libpri, + libshout, libss7, libssh2, libvips, libxcb, linux-headers, + mdadm, mesa3d, metacity, mpg123, mosquitto, musl, nginx, + oniguruma, openblas, opencv3, openjdk, openjdk-bin, openldap, + openvmtools, pcmanfm, php, pigpio, postgresql, prboom, + proftpd, proj, python, python-django, python-idna, + python-numpy, python-urllib3, python3, qemu, qt5, qt5base, + qt5enginio, quagga, rygel, squid, subversion, tcpreplay, + unzip, vlc, vte, webkitgtk, wireless-regdb, xen, + xfont_font-util, xlib_libICE, xlib_libXfont, xlib_libXfont2, + yad, zeromq + + Issues resolved (http://bugs.uclibc.org): + + #11741: pigpio does not build host-pigpio + #11876: automount using host mount/umount + #11881: Build breaks with lftp package enabled and libexpat1-dev inst.. + #11921: dahdi fails to build + #11961: libpri build failure + #12086: (dhcpd-missing-libs) - dhcp shared libraries not installed to.. + #12096: tcpreplay: build fails if libdumbnet-dev is installed in the.. + #12106: daq: build fails if libdumbnet-dev is installed in the host + #12126: vc4 has neon as hard dependency + +2019.05.1, Released July 7th, 2019 + + Important / security related fixes. + + arch: x86: Fix typo breaking 'core-avx2' variant + + linux: Workaround -Werror related build failure on powerpc, + by forcing CONFIG_PPC_DISABLE_WERROR on. + + support/testing: Emulate a machine with 256MB RAM to fix + issues with certain tests running out of memory. + + test-pkg: Correct long option handling and clean output dir + after a successful build to save disk space. + + Defconfigs: QEMU: use 'rootwait' kernel option to ensure root + partition is available before mounting. + + Updated/fixed packages: barebox, busybox, bzip2, davfs2, + dialog, docker-cli, docker-engine, exim, expat, faad2, + haveged, irssi, libcamera, libcdaudio, libcurl, libglib2, + libressl, libsecret, lmbench, meson, monit, php, postgresql, + psplash, python-django, qt5base, tvheadend, webkitgtk, + xserver_xorg-server, znc + +2019.05, released June 2nd, 2019 + + Various fixes. + + Toolchain: Ensure pre-built Andes toolchains can only be + selected when x86 32bit support is available on the host. + Disallow PowerPC SPE ABI for GCC >= 8.x, as it is no longer + supported. + + Infra: pkg-config: Use a dedicated timestamp file rather than + .config as that gets touched by linux-4.19+, causing repeated + builds. + + Add C-SKY support to our config.sub (gnuconfig) + + Updated/fixed packages: dosfstools, botan, brotli, dropbear, + flare-engine, gst1-plugins-bad, libhtp, libnss, libopenssl, + linuxptp, matchbox-panel, mender, mutt, netsurf, + network-manager, opencv3, openjdk, openmpi, php, + python-cython, qt5multimedia, qtwayland, qt5webkit-examples, + supertux, suricata, tpm2-totp, v4l2loopback, wireshark, + wpewebkit + +2019.05-rc3, released May 25th, 2019 + + Fixes all over the tree. + + check-bin-arch: Ignore /usr/lib/grub, similar to how /lib/grub + is ignored. + + check-package: Warn about utf-8 characters in .mk files + + Linux: Default to 5.1.x series + + Updated/fixed packages: assimp, atop, chocolate-doom, cjson, + ddrescue, dhcp, ffmpeg, gerbera, glibmm, gpsd, gst-ffmpeg, + intel-microcode, jasper, keepalived, kismet, libcpprestsdk, + libcurl, libssh2, libupnp18, luarocks, mono-gtksharp3, opus, + postgresql, pcsc-lite, python, tslib, webkitgtk, + wpebackend-fdo, wpewebkit + +2019.05-rc2, released May 15th, 2019 + + Fixes all over the tree. + + Updated/fixed packages: bind, bullet, ca-certificates, + collectd, cracklib, dhcp, gdb, libinput, libtorrent-rasterbar, + linknx, lynx, mono, netsurf, optee-os, postgresql, qt5enginio, + qt5multimedia, rpm, samba4, sqlite, strace, uclibc, woff2 + + Issues resolved (http://bugs.uclibc.org): + + #11841: grub-efi.cfg not used when building EFI disk image + +2019.05-rc1, Released May 8th, 2019 + + Fixes all over the tree and new features. + + Architecture: Andes 32-bit (nds32) support added. + + Only build host-lzip / host-xz when really needed by packages, + not just when not available on the build host. + + Toolchain: Glibc bumped to 2.29, musl bumped to 1.1.22, + binutils 2.32 added, 2.28/2.29 removed, default changed to + 2.31.1. + + fs: Set FAKEROOTDONTTRYCHOWN environment variable to not + forward {f,l,}chown calls to libc when running under fakeroot + to fix issues when building in restricted environments + (E.G. user namespace with bubblewrap). + + Linux: Also build default make target to ensure extra files + like the gdb scripts enabled by CONFIG_GDB_SCRIPTS are also + built. Notice: This may mean that extra host utilities like + uboot-mkimage are needed. + + Infrastructure: show-info and -show-info make targets + added to output package metadata in JSON format for external + use. + + pkg-generic: Only tweak .la files needing it to ensure they + are not included in subsequent package file lists. + + test-pkg: Generate a basic package config if none is + specified. + + Gettext-tiny package added as an lightweight replacement for + GNU gettext for situations where NLS support is not needed. + + New defconfigs: Andes AE3XX, Freescale imx8mpico / imx8qxpmek + / T2080 QDS RDB, Licheepi zero, Orangepi R1 + + Removed defconfigs: Olimx A20 Olinuxino Lime legacy + + New packages: bats-core, bayer2rgb-neon, brickd, cog, dacapo, + enet, gettext-tiny, gli, gst1-plugins-bayer2rgb-neon, + imx-sc-firmware, intel-mediadriver, intel-mediasdk, libcamera, + libhtp, libp11, libwpe, lua-binaryheap, lua-gd, lua-lunitx, + mender-artifact, most, oniguruma, openjdk, openjdk-bin, + opensbi, optee-benchmark, optee-client, optee-examples, + optee-os, optee-test, paho-mqtt-cpp, python-aioblescan, + python-aioconsole, python-aiohttp-cors, python-aiomonitor, + python-backcall, python-jedi, python-parso, python-pyjwt, + python-terminaltables, suricata, tpm2-totp, uftp, + wpebackend-fdo, wpewebkit + + Removed packages: libump, lunit, sunxi-mali + + Issues resolved (http://bugs.uclibc.org): + + #11716: Typo on website, saying latest release is 2018.2.11 + #11756: package/syslinux: MBR's don't fit because of binutils.. + #11761: Building custom kernel 5.1-rc3 or later breaks on objtool + #11816: Only selected coreutils binaries are installed + +2019.02.11, released April 9th, 2020 + + Important / security related fixes. + + core: Fix compatibility with make 4.3+. Also fixup /lib + references in libtool .la files, similar to how it is done for + /usr/*. + + toolchain: Fix kernel headers validation check for external + toolchains. + + Updated/fixed packages: barebox-aux, bluez5_utils, busybox, + civetweb, collectd, ffmpeg, gcc, gnutls, gvfs, haproxy, + hiredis, kmscube, libical, libopenssl, libsndfile, + linux-tools, ntp, php, pure-ftpd, screen, sysdig, tor, + util-linux, vala, vlc, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #12746: "sysdig" package description points to http://sysdig.org, .. + +2019.02.10, released March 16th, 2020 + + Important / security related fixes. + + Core: Ensure package-file-lists data is correct after + incremental builds as well. + + Fix a race condition related to creating the output/staging + symlink on systems with coreutils < 8.27. + + Br2-external: Fix compatibility with make 4.3+ + + Util-linux: Ensure that hwclock is built without GPLv3 + code. Notice that builds with hwclock has contained + GPLv3-licensed code since util-linux 2.30 (Buildroot 2017.08+) + + Updated/fixed packages: armadillo, at, binutils, blktrace, + bootstrap, busybox, cairo, cups, czmq, dnsmasq, + docker-containerd, dovecot, dovecot-pigeonhole, e2fsprogs, + eudev, exim, exiv2, fbgrab, grep, gst1-validate, guile, + imagemagick, jhead, kvm-unit-tests, lapack, libcgroup, + libftdi1, libjpeg, libsigrok, libsndfile, libssh2, libsvgtiny, + libvncserver, libvorbis, libxml2, libxslt, linux, lz4, + mariadb, mbedtls, meson, mfgtools, mongoose, ncurses, ntfs-3g, + opencv3, openjpeg, openswan, openvmtools, patch, php, + postgresql, pppd, proftpd, pure-ftpd, python-django, + python-pyqt5, python3, qemu, qt5base, qt5webengine, qwt, + rdesktop, ruby, runc, samba4, shellinabox, smartmontools, + sqlcipher, squid, swupdate, sysklogd, taglib, thrift, + ti-cgt-pru, uboot, util-linux, vorbis-tools, webkitgtk, + wireshark, xen, xserver_xorg-server, zeromq, zsh + + Issues resolved (http://bugs.uclibc.org): + + #11996: opencv3 SIGILL on Cortex-A5 with VFPv4-D16 + #12331: meson issue + #12461: libglib2 build files with deep directory structure + #12606: fbgrab location has changed + +2019.02.9, released January 12th, 2020 + + Important / security related fixes. + + pkg-python infrastructure: Ensure correct compiler and linker + flags are used for compiled code + + utils/scanpypi: Remind users to update DEVELOPERS + + Updated/fixed packages: busybox, cc-tool, cpio, cups, dante, + dillo, docker-cli, docker-containerd, docker-engine, easy-rsa, + ecryptfs-utils, efl, git, glibc, gnupg2, gst1-plugins-bad, + kf5-kcoreaddons, libarchive, libgit2, libkrb5, librsvg, + libssh, libtomcrypt, libuio, lirc-tools, lvm2, + matchbox-desktop, nodejs, ntp, opencv3, openpowerlink, + python-django, python-ecdsa, python-pyasn-modules, + python-pyqt5, python-subprocess32, python3, qpdf, runc, rygel, + samba4, sdl2, wavpack, xserver_xorg-server, zip + + Issues resolved (http://bugs.uclibc.org): + + #12121: PyQt5.QtSerialPort and other modules not being built + +2019.02.8, released December 7th, 2019 + + Important / security related fixes. + + Infrastructure: Make HOST__DL_OPTS inherit from + _DL_OPTS by default, just like it is done for a number of + other package variables + + Add _KEEP_PY_FILES to exclude specific python .py files + from the removal done by BR2_PACKAGE_PYTHON{,3}_PYC_ONLY for + the (rare) case where the .py files are needed at runtime + rather than .pyc. + + Fix -reconfigure handling for packages using the kconfig + infrastructure. + + Toolchain: ensure external toolchain kernel headers version + check correctly stop the build on mismatch + + Deconfigs: beaglebone: fix boot issue + + Updated/fixed packages: am33x-cm3, asterisk, bind, chrony, + clamav, collectd, connman, faifa, gob2, haproxy, + intel-microcode, ipsec-tools, jasper, jpeg-turbo, kodi, + kvm-unit-tests, libftdi, libftdi1, libnss, libstrophe, + libsvgtiny, lvm2, lzma, mariadb, minicom, neardal, nodejs, + opencv3, openvmtools, oracle-mysql, perl-gdgraph, + perl-gdtextutil, php, postgresql, prosody, python-django, + rabbitmq-c, rauc, redis, rpcbind, socat, spice, + spice-protocol, tftpd, tiff, webkitgtk + + New packages: libmspack + + Issues resolved (http://bugs.uclibc.org): + + #12166: Compiling nodejs for SAMA5D3 always crash with illegal inst.. + #12171: Python-opencv needs config.py and config-3.7.py to run.. + #12211: host-nodejs 10.15.3 package fail to build + #12316: tzdata fails to install with empty "default local time" + +2019.02.7, Released November 10th, 2019 + + Important / security related fixes. + + support/testing: use a kernel with HW_RANDOM_VIRTIO to work + around issues with lack of entrophy + + Toolchain: Also copy libssp.so for external toolchains if SSP + is enabled to handle toolchains providing SSP support in + libssp rather than in the C library + + Download: Also use the package download method for extra + downloads from the same site, so it does not get confused by + URLs containing '+' + + Fakeroot now works correctly under Microsoft Windows 10 + Services for Linux, which does not provide SYSV IPC support + + utils/test-pkg: ensure to exit with an error upon failure + + Updated/fixed packages: asterisk, azmq, cups-filters, + domoticz, duma, elf2flt, eudev, exfat, exfat-utils, fakeroot, + file, freerdp, gd, ghostscript, go, gvfs, intel-microcode, + kvm-unit-tests, libarchive, libnspr, libnss, libopenssl, + libpcap, libpciaccess, librsvg, libseccomp, libsigrok, + libtorrent, libunwind, linux-tools, lua-sdl2, lxc, minizip, + mjpegtools, mongoose, php, python, python-pysnmp-apps, + python3, qemu, qt5base, ruby, safeclib, samba4, sdl_mixer, + sox, sudo, systemd, tcpdump, unscd, util-lkinux, vtun, xvisor, + yaffs2utils + + Issues resolved (http://bugs.uclibc.org): + + #11366: [2018.08] SysV IPC not available for fakeroot on WSL + #12261: sudo versions prior to 1.8.28 are affected + +2019.02.6, Released October 3rd, 2019 + + Important / security related fixes. + + Defconfigs: AArch64-efi: Fix grub configuration, Beaglebone: + Use default console settings + + Dependencies: Ensure host has JSON::PP perl module installed + if webkitgtk/wpewebkit packages are enabled as it is needed + during their build process. + + Toolchain: Generate check-headers program under BUILD_DIR + rather than /tmp to fix issues with distributions mounting + /tmp noexec. + + Updated/fixed packages: asterisk, augeas, bind, bwm-ng, cups, + cups-filters, docker-cli, docker-engine, docker-proxy, + dropbear, e2fsprogs, eudev, exim, expat, gcc, go, ifplugd, + haveged, iptables, joe, kf5-extra-cmake-modules, + kf5-modemmanager-qt, kf5-networkmanager-qt, libcurl, + libgcrypt, libgpg-error, libnftl, libnspr, libnss, libopenssl, + luksmeta, mariadb, mbedtls, mongodb, mosquitto, ncurses, + nfs-utils, nghttp2, nodejs, openvmtools, php, protobuf, putty, + qemu, qt5base, samba4, swupdate, systemd-bootchart, thttpd, + uclibc, unzip, util-linux, wireshark + + Issues resolved (http://bugs.uclibc.org): + + #10806: Allow nfs-utils to use ipv6 + #11781: mariadb build error + #12031: Build of cups-filters fails while linking, apparently due.. + #12141: eudev package is missing "render" and "kvm" groups + #12181: dropbear: norootlogin (-w) no longer works when PAM is enabled + #12241: Permission denied while running "make" + +2019.02.5, Released September 2nd, 2019 + + Important / security related fixes. + + Filesystems: Pass extra pax options to tar for binary + reproducibility. + + Updated/fixed packages: apache, arm-trusted-firmware, + asterisk, atk, autofs, batctl, batman-adv, berkeleydb, brotli, + busybox, bzip2, clamav, cloop, cmake, collectd, connman-gtk, + cryptopp, dahdi-linux, dahdi-tools, daq, dehydrated, dovecot, + dovecot-pigeonhole,, elfutils, evtest, exim, expect, giflib, + git, glib-networking, glibc, gnupg2, gnutls, go, + gst1-rtsp-server, gtkperf, gupnp-tools, gvfs, imagemagick, + imx-uuc, intel-microcode, json-glib, lftp, libbsd, libcurl, + libgit2, libgtk3, libmodplug, libnss, libpri, libshout, + libss7, libssh2, libvips, libxcb, linux-headers, mdadm, + mesa3d, metacity, mpg123, mosquitto, musl, nginx, openblas, + opencv3, openldap, openvmtools, pcmanfm, php, pigpio, + postgresql, prboom, proftpd, proj, python, python-django, + python-idna, python-numpy, python-urllib3, python3, qemu, qt5, + qt5base, qt5enginio, quagga, rygel, squid, subversion, + tcpreplay, unzip, vlc, vte, webkitgtk, weston, wireless-regdb, + xen, xfont_font-util, xlib_libICE, xlib_libXfont, + xlib_libXfont2, yad, zeromq + + Issues resolved (http://bugs.uclibc.org): + + #11741: pigpio does not build host-pigpio + #11876: automount using host mount/umount + #11881: Build breaks with lftp package enabled and libexpat1-dev inst.. + #11921: dahdi fails to build + #11961: libpri build failure + #12096: tcpreplay: build fails if libdumbnet-dev is installed in the.. + #12106: daq: build fails if libdumbnet-dev is installed in the host + #12126: vc4 has neon as hard dependency + +2019.02.4, Released July 10th, 2019 + + Important / security related fixes. + + arch: x86: Fix typo breaking 'core-avx2' variant, add Westmere + variant. + + linux: Workaround -Werror related build failure on powerpc, + by forcing CONFIG_PPC_DISABLE_WERROR on. + + support/testing: Emulate a machine with 256MB RAM to fix + issues with certain tests running out of memory. + + test-pkg: Correct long option handling and clean output dir + after a successful build to save disk space. + + Ensure custom _OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS are + passed before the standard exclusions so they are not ignored + by rsync when using override-srcdir. + + Defconfigs: QEMU: use 'rootwait' kernel option to ensure root + partition is available before mounting. + + Updated/fixed packages: barebox, bzip2, davfs2, dbus, dialog, + docker-cli, docker-engine, expat, faad2, ffmpeg, freeswitch, + gerbera, haveged, irssi, libcdadio, libgit2, libglib2, + libsecret, libvncserver, lmbench, logrotate, mariadb, meson, + mongoose, monit, mpd, openblas, php, postgresql, psplash, + python, python-django, python3, qt5base, samba4, taglib, + tvheadend, vlc, webkitgtk, xserver_xorg-server, znc + +2019.02.3, Released June 7th, 2019 + + Important / security related fixes. + + Infra: pkg-config: Use a dedicated timestamp file rather than + .config as that gets touched by linux-4.19+, causing repeated + builds. + + check-bin-arch: Also ignore /usr/lib/grub to support merged + /usr setups, similar to how /lib/grub is ignored. + + gnuconfig/config.sub: Add C-SKY architecture support. + + Updated/fixed packages: assimp, atftp, atop, botan, busybox, + ca-certificates, chocolate-doom, cjson, coreutils, cracklib, + ddrescue, dhcp, docker-cli, docker-containerd, docker-engine, + dosfstools, dovecot, dovecot-pigeonhole, dropbear, exim, + ffmpeg, flare-engine, gcc, gdb, gerbera, glibmm, go, gpsd, + gst-ffmpeg, gst1-plugins-bad, gst1-plugins-base, imagemagick, + intel-microcode, jasper, kf5-kcoreaddons, kismet, libcurl, + libglib2, libnss, libopenssl, libsigrok, libssh2, libupnp18, + linuxptp, luajit, lynx, matchbox-panel, mender, + netcat-openbsd, netsurf, nfs-utils, opus, orc, owfs, + pcsc-lite, php, popt, postgresql, python, python-cython, + python-django, python-ply, qt5enginio, rpm, runc, samba4, + sqlite, subversion, supertux, systemd, tslib, uclibc, + v4l2loopback, webkitgtk, woff2 + + Issues resolved (http://bugs.uclibc.org): + + #11816: Only selected coreutils binaries are installed + #11841: grub-efi.cfg not used when building EFI disk image + #11911: systemd v240 memory leak in systemd-journald + +2019.02.2, Released April 29th, 2019 + + Important / security related fixes. + + Only build host-lzip / host-xz when really needed by packages, + not just when not available on the build host. + + fs: Set FAKEROOTDONTTRYCHOWN environment variable to not + forward {f,l,}chown calls to libc when running under fakeroot + to fix issues when building in restricted environments + (E.G. user namespace with bubblewrap). + + Linux: Also build default make target to ensure extra files + like the gdb scripts enabled by CONFIG_GDB_SCRIPTS are also + built. Notice: This may mean that extra host utilities like + uboot-mkimage are needed. + + Defconfigs: ASUS tinker and Amarula vyasa rk3822: Support + larger kernel images, Atmel SAM5D27, SAM5D2,3,4 xplained: + Increase rootfs size to fit utilities, Raspberry Pi 64bit: + Include overlays in sdcard image + + Updated/fixed packages: android-tools, apache, bind, binutils, + busybox, civetweb, cjson, copas, davfs2, docker-cli, + docker-containerd, docker-engine, dovecot, dovecot-pigeonhole, + freerdp, gerbera, ghostscript, git, gnutls, go, gst-omx, + gst1-plugins-base, gst1-plugins-ugly, haproxy, hostapd, + ipsec-tools, libfreefare, libfuse, libkrb5, libpng, libxml2, + libxslt, linknx, linux, linux-firmware, linux-tools, live555, + lldp, lrzsz, lynx, madplay, make, minicom, mongodb, msmtp, + musl, mutt, neon, netsnmp, numactl, opus, perl, php, + postgresql, pure-ftpd, python-urllib3, python3, qt5base, + rapidxml, rpm, rsyslog, ruby, runc, samba4, sane-backends, + softether, stunnel, sysklogd, syslinux, syslog-ng, + systemd-bootchart, thttpd, thrift, tiff, tor, tpm2-tools, + tpm2-tss, webkitgtk, yaffs2utils, wget, wpa_supplicant, wsapi, + xapp_xfd, xapp_xload, xlib_libXpm, xserver_xorg-server, xz, + znc + + Issues resolved (http://bugs.uclibc.org): + + #11756: package/syslinux: MBR's don't fit because of binutils.. + #11761: Building custom kernel 5.1-rc3 or later breaks on objtool + +2019.02.1, Released March 29th, 2019 + + Important / security related fixes. + + pkg-generic: Only tweak .la files needing it to ensure they + are not included in subsequent package file lists. + + test-pkg: Generate a basic package config if none is + specified. + + Updated/fixed packages: asterisk, avahi, bash, beecrypt, + binutils, busybox, clamav, cups, efl, eigen, fetchmail, file, + flashrom, fltk, gerbera, git, glibc, gnuradio, go, + gst-plugins-bad, intel-gmmlib, jq, kexec, kf5-modemmanager-qt, + leveldb, libcurl, libdrm, libftdi1, libglib2, libiio, libpcap, + libseccomp, libssh2, log4cplus, lvm2, mariadb, mender, + mongodb, mosquitto, musl, nodejs, ntp, openjpeg, owfs, php, + pure-ftpd, putty, python-aiojobs, qt5webkit, rdesktop, samba4, + sunxi-tools, supertux, swupdate, tpm2-abrmd, tpm2-tss, + wavemon, wireshark, vsftpd, xapp_xdm, xen, + xdriver_xf86-video-fbdev, xlib_libXdmcp + + Issues resolved (http://bugs.uclibc.org): + + #11716: Typo on website, saying latest release is 2018.2.11 + +2019.02, released March 4th, 2019 + + Minor fixes. + + Libressl support added for Qt 5.6 as a replacement for + openssl, as 5.6 is not compatible with openssl 1.1.x. + + Updated/fixed packages: cutelyst, devmem2, gqrx, + gst-plugins-bad, libraw, libsoxr, qt5base, runc, systemd, tor + +2019.02-rc3, released March 1st, 2019 + + Fixes all over the tree. + + Openssl support dropped from Qt 5.6, as it isn't compatible + with openssl 1.1.x. + + Toolchain: GCC 8.x updated to 8.3.0, fixing a number of + issues. + + Dependencies: Require CMake 3.8 or newer to fix compilation + issue with certain packages. If not available, host-cmake will + instead be built. + + Printvars: Fix performance regression since 2018.02 + + Scanypi: Correctly handle underscores in python package names. + + Updated/fixed packages: botan, clamav, cryptopp, i2pd, + ibrcommon, iproute2, libcpprestsdk, libssh, lua-curl, + luaexpat, qt5base, runc, stress-ng, syslinux, systemd, + upmpdcli, zbar + + Issues resolved (http://bugs.uclibc.org): + + #9966: util-linux-2.30/.stamp_built' failed + #11696: possible typo in board/pc/post-build.sh + +2019.02-rc2, released February 23th, 2019 + + Fixes all over the tree. + + Removed zynq_zybo defconfig, as it hasn't seen any update + since it was added in 2016, and uses a U-Boot version not + compatible with openssl-1.1.x. + + Linux: Ignore user supplied downloadable hashes, as no hash + checksums are available for those. + + Updated/fixed packages: bind, cryptopp, docker-containerd, + dtc, efivar, gdb, imagemagick, ipmiutil, libcpprestsdk, + libcurl, libgpiod, libid3tag, libv4l, log4cplus, luvi, + madplay, mender, mosquitto, poco, postgresql, proftpd, + pulseaudio, python-django, qemu, qt5base, qwt, rabbitmq-c, + reaver, safeclip, stress-ng, swupdate, syslog-ng, systemd, + tor, unzip, xenomai + + Issues resolved (http://bugs.uclibc.org): + + #11501: compile sdl2 with enable wayland + #11681: .. unable to initialize decompress status for section.. + +2019.02-rc1, released February 13th, 2019 + + Fixes all over the tree and new features. + + + Dependencies: + + Require Python >= 2.7 as it is needed for E.G. building + libglib2. + + Ensure GNU gzip is used for reproducible tarballs (instead of + pigz) + + + Infrastucture: + + Ensure the PLATFORM and OS environment variables are not set, + as they cause build issues for some packages. + + The package list infrastructure now correctly handles packages + installing files with old mtime. + + Add a config option to force all optional host utilities to be + built, even if suitable versions are available on the build + machine. + + graph-build-time: Also show time spent downloading + + Download: fixes for SSH/SCP support + + Ensure user provided permissions override permissions from + packages. + + SDK: Fix handling of relative symlinks (targets starting with + '.' or '..') + + BR2_SYSTEM_DEFAULT_PATH setting to customize the default path + for processes. + + The custom skeleton logic will now populate the needed /bin, + /lib, /sbin directories/symlinks if not present. Merged /usr + can now be used with a custom skeleton. + + Rootfs overlays can now override symbolic links from + packages. This was disabled to ensure the correct symbolic + links are present when merged /usr is used. Instead validate + that the rootfs overlays do not include invalid /bin, /sbin + and /lib entries. + + The waf infrastructure now support the _SUBDIR variable, + similar to the other package types. + + cmake: Also set CMAKE_SYSTEM_VERSION in toolchainfile.cmake + + Various improvements to the meson infrastructure. + + Luarocks: A Buildroot addon has been added to automate + creating a Buildroot package from luarocks, similar to + scancpan and scanpypi. + + scanpypi: protect against zip-slip vulnerability in zip/tar + handling + + check-package: fix Python 3 support + + get-developers: Fix behaviour when called from elsewhere than + the toplevel directory. + + pkg-stats: Show latest upstream version of each package, based + on data from release-monitoring.org + + kconfig: Fix for make linux-menuconfig / uboot-menuconfig from + a clean tree when ccache is enabled. + + Default to sha256 password encoding, drop md5 support. + + + Architecture: + + Support for RISC-V 32bit architecture, ARM A55, 75 and Saphira + variants, MIPS support for mips32r3, mips64r3 and Marvell + Octeon II/III variants. + + + Toolchain: + + ARC toolchain 2018.09, ARM 8.2-2018.11, Codescape IMG/MTI MIPS + 2018.09-02, MUSL 1.1.21, GCC 6.5.0 / 7.4.0, GDB 8.2.1 + + + Packages: + + openssl: Bump to 1.1.1x series, bringing TLSv1.3 support and + long term support. + + fftw: Split into fftw-{single,double,long-double,quad} + packages for the different data precision options. + + libcurl: Now has explicit TLS backend selection options. + + linux: Support building device tree blobs with the -@ option + for device tree overlays. + + weston: The weston-imx i.MX variant is now used when + imx-gpu-viv is enabled + + pkgconf: Update to 1.5.3, which brings support for + --define-prefix (used by GStreamer) + + Add host-python3-setuptools package to handle host python + packages needing python3 with setuptools support. + + + New defconfigs: Aarch64 EFI, Orangepi one plus, Orangepi lite + 2, QEMU RISC-V 32bit virt, Rock64 + + + New packages: brcm-patchram-plus, clinfo, cunit, docker-cli, + erlang-p1-eimp, exempi, fail2ban, fftw-double, + fftw-double-long, fftw-quad, fftw-single, gerbera, grpc, + gst1-shark, intel-gmmlib, iwd, kf5-kcoreaddons, libeastl, + libpackagekite, libtorrent-rasterbar, lua-std-debug, + lua-std-normalize, mini-snmpd, netsurf, pamtester, pcm-tools, + python-aiodns, python-aiohttp, python-aiohttp-jinja2, + python-aiohttp-remotes, python-aiohttp-security, + python-aiohttp-session, python-aiohttpd-sse, python-aiojobs, + python-cchardet, python-pycares, python-sentry-sdk, + python-wtforms, python3-setuptools, rcw, rtc-tools, shim, + utp_com, vmtouch, websocketpp + + Removed packages: fftw, lua 5.2.x, luacrypto, perl-time-hires, + python-pyqt, qt, qtuio, tn5250 + + Issues resolved (http://bugs.uclibc.org): + + #10851: Patch to handle numpad Enter key properly + #11066: x11r7 X11 S40xorg leads to a black screen on QEMU x86.. + #11126: Bash Shell Programming using Buildroot + #11426: pps-tools bash dependency + #11476: stdio2.h error invalid use of __builtin_va_arg_pack + #11536: dt-utils building fails with glibc 2.28 + #11546: open-vm-tools with glibc 2.28 + #11566: Fix init script + #11576: Unable to start apache with event MPM on raspberry pi 3 + #11591: [pkgconf 1.5.3] xserver OpenGL support is missing + #11606: libjpeg has no Config.in + #11616: 2018.02.09 fails to build libzlib with full RELRO.. + #11656: Custom device tree and u-boot boot.scr not integrated.. + #11666: Touchscreen with (Py)Qt5 should use tslib instead of evdev + +2018.11.4, Released March 28th, 2019 + + Important / security related fixes. + + Updated/fixed packages: avahi, beecrypt, binutils, botan, + busybox, clamav, cups, devmem2, efl, fetchmail, file, fltk, + gcc, gdb, git, go, gst-plugins-bad, iproute2, jq, + kf5-modemmanager-qt, leveldb, libopenssl, libraw, libseccomp, + libsoxr, libssh2, mariadb, mosquitto, nodejs, ntp, openjpeg, + perl, php, putty, qt5webkit, rdesktop, runc, samba4, swupdate, + systemd, tor, vsftpd, wireshark, xapp_xdm, xen, xlib_libXdmcp + +2018.11.3, Released February 23th, 2019 + + Important / security related fixes. + + Ensure the PLATFORM and OS environment variables are not set, + as they cause build issues for some packages. + + The package list infrastructure now correctly handles packages + installing files with old mtime. + + Linux: Skip hash checks for user supplied downloadable + patches, as no hash checksums are available for those. + + scanpypi: protect against zip-slip vulnerability in zip/tar + handling + + Download: fixes for SSH/SCP support + + SDK: Fix handling of relative symlinks (targets starting with + '.' or '..') + + Updated/fixed packages: bind, dhcpcd, docker-compose, + docker-containerd, docker-engine, dovecot, dovecot-pigeonhole, + dtc, efivar, ghostscript, gnuradio, imagemagick, jpeg-turbo, + libarchive, libb64, libcurl, libgeotiff, libgpiod, libid3tag, + libupnp18, log4cplus, madplay, meson, mosquitto, openssh, php, + poco, postgresql, proftpd, pulseaudio, python, python-django, + python3, qt5base, reaver, runc, sg3_utils, sqlcipher, + swupdate, systemd, unzip, webkitgtk, xenomai + +2018.11.2, Released January 30th, 2019 + + Important / security related fixes. + + Defconfigs: Fixes for imx6slevk, imx7dsabresd, imx8mqevk, Lego + EV3, QEMU AArch64-virt + + Download: Fix scp download handling + + check-package: fix Python 3 support + + get-developers: Fix behaviour when called from elsewhere than + the toplevel directory. + + kconfig: Fix for make linux-menuconfig / uboot-menuconfig from + a clean tree when ccache is enabled. + + cmake: Also set CMAKE_SYSTEM_VERSION in toolchainfile.cmake + + Updated/fixed packages: acpica, apache, apr, avrdude, cargo, + cc-tool, dash, dhcpdump, dmalloc, docker-containerd, efivar, + fwts, glibc, gnuchess, gnupg2, go, leveldb, libarchive, + libassuan, libftdi1, libgpg-error, libhttpparser, libkcapi, + libmad, libsndfile, libsquish, liburiparser, libwebsock, + libxml2, lighttpd, llvm, lm-sensors, lua-msgpack-native, lxc, + mariadb, mbedtls, meson, mosquitto, netatalk, nodejs, odhcp6c, + openresolv, openssh, pango, patchelf, php, python-django, + python-numpy, python-pyyaml, rauc, rp-pppoe, s6-networking, + samba4, sdl_sound, shairport-sync, sqlite, subversion, + sunxi-cedarx, swupdate, systemd, tcpreplay, tekui, tmp2-abrmd, + tpm2-tools, tpm2-tss, udisks, unixodbc, usb_modeswitch, + webkitgtk, wireshark, wolfssl, xapp_rgb, xenomai, xerces + + Issues resolved (http://bugs.uclibc.org): + + #11576: Unable to start apache with event MPM on raspberry pi 3 + +2018.11.1, Released December 20th, 2018 + + Important / security related fixes. + + defconfigs: Fixes for bananapi m2 ultra, ci20 + + Download wrapper: Fix for urlencode handling + + Updated/fixed packages: asterisk, docker-compose, + docker-engine, dt-utils, gnutls, go, grub, libbsd, libcurl, + libpgpme, libiscsi, liblo, libmpd, libopenssl, liboping, + libpam-tacplus, libpjsip, linux-firmware, liquid-dsp, + lua-cqueue, luvi, lxc, lynx, nginx, nodejs, openzwave, php, + pps-tools, proftpd, prosody, sdl2_net, squashfs, swupdate, + uclibc, vtu, webkitgtk, wine, xen + + New packages: docker-cli + + Issues resolved (http://bugs.uclibc.org): + + #11426: pps-tools bash dependency + #11536: dt-utils building fails with glibc 2.28 + +2018.11, Released December 1st, 2018 + + Minor fixes. + + Updated/fixed packages: c-ares, quagga, squid + +2018.11-rc3, released November 30th, 2018 + + Fixes all over the tree. + + Defconfigs: Fixes for Armadeus APF27, imx6sabre, Olimex A20 + olinuxino lime legacy, Orangepi zero plus 2, PC, Riotboard. + + graph-depends: Fix for package names starting with a non-alpha + character. + + Updated/fixed packages: alsa-utils, botan, dante, domoticz, + dtc, freetype, gauche, gcc, gdb, ghostscript, glibc, + imx-usb-loader, libbsd, libid3tag, libkrb5, libmicrohttpd, + libopenssl, libsoxr, linux, motion, msgpack, mtd, + perl-net-ssleay, php, popt, python-numpy, qt5declarative, + samba4, shadowsocks-libev, stress-ng, systemd, usb_modeswitch, + webkitgtk, valgrind, weston, xfsprogs + +2018.11-rc2, released November 21th, 2018 + + Fixes all over the tree. + + fs: Drop intermediate tarball from the filesystem handling to + fix an issue with xattrs handling related to fakeroot. Ensure + tarball target includes xattrs. + + download: Fix confusion in git submodule handling if dl/ is a + symlink. + + genrandconfig: Fix missing newline in BR2_WGET handling, + causing the following line to be ignored. This would affect + BR2_ENABLE_DEBUG, BR2_INIT_BUSYBOX, BR2_INIT_SYSTEMD, + BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, BR2_STATIC_LIBS or + BR2_PACKAGE_PYTHON_PY_ONLY depending on the randomization. + + show-build-order: Also include the dependencies of + rootfs-common. + + Fix a number of build issues in packages for the recently + merged RISC-V architecture support. + + Updated/fixed packages: dt-utils, easydbus, elfutils, + flare-engine, flatcc, glibc, gstreamer, gstreamer1, imx-uuc, + libassuan, libcorrect, libiscsi, libkrb5, libmicrohttpd, + libnftnl, libnspr, libnss, libsemanage, libsigsegv, libv4l, + ltp-testsuite, luv, luvi, make, ncmpc, netplug, openocd, + prosody, qemu, rpm, sconeserver, shadowsocks-libev, + supertuxcart, syslinux, systemd, trace-cmd, uclibc, + uclibc-ng-test, vtun, webkitgtk, weston, wireshark, xen, + xlib_libfontenc + + Issues resolved (http://bugs.uclibc.org): + + #11086: download/git submodule breaks on symlinked dl folder + #11216: Capabilities not applied to filesystem + +2018.11-rc1, released November 9th, 2018 + + Fixes all over the tree and new features. + + Architecture: RISC-V support (64bit) added. + + Toolchain: Glibc bumped to 2.28. Fortran support for external + toolchains. ARM (Linaro) toolchains updated to 8.2-2018.08. + + Hardening flags (RELRO) are now handled by the toolchain + wrapper instead of explicitly through CFLAGS/LDFLAGS, fixing a + number of issues. + + Filesystems: Support for creating btrfs and f2fs filesystems + added. + + Add a number of patches to fix build errors for host utilities + on modern distributions using glibc-2.28. + + mkusers: Ensure existing group members are preserved when a + group is reprocessed. + + printvars: Fix issue with exceeding shell command line length + limits for certain setups. + + Workaround added for incompatibility issues between host-dtc + and older U-Boot and Linux kernel versions. + + Detect and reject build paths containing '@', as this confuses + a number of packages, including GCC. + + utils/diffconfig: Make it work for (non-Buildroot) config + files not using the BR2_ prefix. + + New defconfigs: Amarula a64-relic, Bananapi m2 ultra, Embest + riotboard, Hardkernel Odroid XU-4, QEMU riscv64-virt. + olimex_a20_olinuxion_lime_mali is renamed to _legacy. + + OpenCL infrastructure support added, similar to how OpenGL is + handled. + + Linux-headers: Support for kernel headers from a custom + tarball / git repo added. + + New packages: bird, bluez5_utils-headers, btrfs-progs, + checksec, davici, duktape, ell, haproxy, libclc, libcorrect, + libopencl, libopenresolv, nss-myhostname, + perl-apache-logformat-compiler, perl-appconfig, + perl-astro-suntime, perl-class-inspector, perl-class-load, + perl-class-method-modifiers, perl-class-std, + perl-class-std-fast, perl-cookie-baker, perl-data-dump, + perl-data-optlist, perl-data-uuid, perl-data-manip, + perl-dbd-mysql, perl-dbi, perl-devel-globaldestruction, + perl-devel-stacktrace, perl-devel-stacktrace-ashtml, + perl-device-serialport, perl-dist-checkconflicts, + perl-exporter-tiny, perl-file-sharedir, perl-file-slurp, + perl-filesys-notify-simple, perl-hash-multivalue, + perl-http-entity-parser, perl-http-headers-fast, + perl-http-multipartparser, perl-io-interface, + perl-io-socket-multicast, perl-json-maybexs, perl-mime-tools, + perl-module-implementation, perl-module-runtime, perl-moo, + perl-number-bytes-human, perl-package-stash, perl-params-util, + perl-plack, perl-posix-strftime-compiler, perl-role-tiny, + perl-streams-buffered, perl-sub-exporter-progressive, + perl-sub-install, perl-sub-quote, perl-sys-cpu, + perl-sys-meminfo, perl-sys-mmap, perl-time-parsedate, + perl-type-tiny, perl-www-form-urlencoded, perl-x10, pigpio, + python-async-timeout, python-falcon, python-fire, + python-mimeparse, python-multidict, python-passlib, + python-pigpio, python-pip, python-ply, python-py, + python-pyasn1, python-pyasn1-modules, python-pycryptodomex, + python-pyhamcrest, python-pysmi, python-scapy, python-semver, + python-serial-asyncio, python-typing, python-uvloop, + pythonwrapt, python-yarl, python-zeroconf, riscv-pk, sedutil, + spandsp, tini, waffle, xapian + + Removed packages: bootutils, dsp-tools, expedite, gst-dsp, + xloader + + Issues resolved (http://bugs.uclibc.org): + + #11116: Buildroot should set PYTHON_EGG_CACHE instead of writing .. + #11156: In python3 module 'socket' has no attribute 'AF_BLUETOOTH' + #11166: Erlang bad argument on valid uint64 when crosscompiled on.. + #11206: zlib: fails to build with Linaro toolchain, BR2_RELRO_FULL.. + #11241: ACPID shouldn't depend on BR2_x86_64 || BR2_i386 + #11251: Util scanpypi failes when package change - to _ in tar file + #11266: qt5base-5.11.1 does not compile with musl, complains about.. + #11286: python-rpi-gpio only should depend on BR2_arm || BR2_aarch64 + #11321: Latest master fails to build readline with RELRO FULL + #11326: sysvinit fails to build in latest GIT master + #11331: Internal application no longer builds with latest GIT master + #11336: nfs-utils fails to build in latest GIT master + #11351: build root-2018-08, linaro aarch64 compile error + #11376: mdmon binary missing + #11391: Valgind availability on ARM + #11396: uboot environment image checksum invalid if target is big endian + #11421: GCC error message for ARM Cortex-A9/ARM.V7 + #11451: Can't find libmpfr.so.4 when using external toolchain on ubuntu.. + #11481: Docs: Is external.desc required? + +2018.08.4, Released December 20th, 2018 + + Important / security related fixes. + + Defconfigs: Fixes for ci20, orangepi zero plus 2 + + Download wrapper: Fix for urlencode handling + + Updated/fixed packages: c-ares, dante, docker-compose, + domoticz, freetype, ghostscript, gnutls, libcurl, libgpgme, + libid3tag, libiscsi, libmpd, libopenssl, liboping, libpjsip, + linux-firmware, liquid-dsp, luvi, lynx, msgpack, nginx, + nodejs, php, popt, pps-tools, prosody, python-numpy, + python-requests, samba4, sdl2_net, squashfs, swupdate, + systemd, uclibc, vte, webkitgtk, wine, xfsprogs + + Issues resolved (http://bugs.uclibc.org): + + #11426: pps-tools bash dependency + +2018.08.3, Released November 26th, 2018 + + Important / security related fixes. + + fs: Drop intermediate tarball from the filesystem handling to + fix an issue with xattrs handling related to fakeroot. Ensure + tarball target includes xattrs. + + download: Fix confusion in git submodule handling if dl/ is a + symlink. + + toolchain: Only allow enabling stack protection on + architectures with control flow integrity (CFI) support. Only + allow FORTIFY_SOURCE support on gcc >= 6. + + genrandconfig: Fix missing newline in BR2_WGET handling, + causing the following line to be ignored. This would affect + BR2_ENABLE_DEBUG, BR2_INIT_BUSYBOX, BR2_INIT_SYSTEMD, + BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, BR2_STATIC_LIBS or + BR2_PACKAGE_PYTHON_PY_ONLY depending on the randomization. + + show-build-order: Also include the dependencies of + rootfs-common. + + Defconfigs: Fixes for Armadeus APF27, imx6sabre, Olimex A20 + olinuxino lime legacy, Orangepi zero plus 2. + + graph-depends: Fix for package names starting with a non-alpha + character. + + Updated/fixed packages: attr, audit, bind, brotli, busybox, + dtc, easydbus, elfutils, flare-engine, flatcc, gauche, gcc, + giflib, gpsd, lcdproc, libcurl, libiscsi, libkcapi, libnfs, + libnspr, libnss, libsemanage, liburiparser, lighttpd, + lua-curl, mariadb, mmc, mosquitto, mysql, ncmpc, neardal, + netplug, network-manager, nfs-utils, nginx, openocd, openswan, + p11-kit, postgresql, prosody, qemu, qt, rpm, ruby, samba4, + squid, supertuxkart, systemd, tar, trace-cmd, traceroute, + twolame, uclibc, usb_modeswitch, vtun, webkitgtk, weston, + xdriver_xf86-video-geode, xlib_libfontenc, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #11086: download/git submodule breaks on symlinked dl folder + #11481: Docs: Is external.desc required? + +2018.08.2, Released October 25th, 2018 + + Important / security related fixes. + + Workaround added for incompatibility issues between host-dtc + and older U-Boot and Linux kernel versions. + + Detect and reject build paths containing '@', as this confuses + a number of packages, including GCC. + + utils/get-developers: Add -e option for use with git + send-email. + + utils/diffconfig: Make it work for (non-Buildroot) config + files not using the BR2_ prefix. + + u-boot: Fix for environment image handling on big endian + systems. + + Updated/fixed packages: binutils, ca-certificates, + cups-filters, dtc, erlang, file, freetype, gcc, git, gvfs, + jasper, leveldb, libarchive, libssh, live555, ljlinenoise, + mariadb, mongoose, netsnmp, nmap, nodejs, ntp, open-plc-utils, + poco, psmisc, ptpd2, python-enum34, qemu, qt, qt5base, + setools, spice, spice-protocol, tinc, ustr, wireshark, + + Issues resolved (http://bugs.uclibc.org): + + #11396: uboot environment image checksum invalid if target is big endian + +2018.08.1, Released October 7th, 2018 + + Important / security related fixes. + + Add a number of patches to fix build errors for host utilities + on modern distributions using glibc-2.28. + + mkusers: Ensure existing group members are preserved when a + group is reprocessed. + + printvars: Fix issue with exceeding shell command line length + limits for certain setups. + + Updated/fixed packages: acpid, android-tools, apache, + arp-scan, bandwidthd, bind, brltty, clamav, connman, cppcms, + domoticz, dtc, fio, gcc, gdb, ghostscript, gnupg, httpping, + igmpproxy, imlib2, ipsec-tools, libesmtp, libnfs, libxslt, + links, lua, mosquitto, nilfs-utils, ocrad, parted, php, + python-django, screen, shairport-sync, strongswan, + vboot-utils, webkitgtk, wireguard, x265 xen, xlib_libXdmcp, + xlib_libXfont, xlib_libXft, xlib_libxshmfence, + xutil_makedepend, zeromq + +2018.08, Released September 6th, 2018 + + Minor fixes. + + Known issues: + + - Glibc 2.28 on the build host breaks compilation of a number + of host packages. 2018.08 contains fixes for some of these + packages, but not all. Consider building on hosts (or in + containers) using older Glibc versions. + + - host-dtc 1.4.7 breaks compilation of older U-Boot and Linux + kernel configurations using FDT/DTC. Consider updating the + Linux kernel to >= 4.17 and U-Boot to >= 2018.07 or + backporting commit 9130ba8846 (scripts/dtc: Update to + upstream version v1.4.6-9-gaadd0b65c987) for the Linux + kernel / commit db405d1980 for U-Boot. + Alternatively revert commit 7b929ddcf0 (dtc: bump version to + 1.4.7) and ensure your build host does not have the libfdt + development headers installed. + + Updated/fixed packages: busybox, chipmunk, cutelyst, + domoticz, gcc, imagemagick, lcms2, libcurl, mediastreamer, + moarvm, php, qt, qt5virtualkeyboard, qt5webengine, screen, + sdl2, squashfs, uboot, xen + + Issues resolved (http://bugs.uclibc.org): + + #11261: ccache using wrong cached objects + #11276: Understanding the patch for kernel-4.9 and other.. + +2018.08-rc3, Released August 31th, 2018 + + Fixes all over the tree. + + linux: additional improvements to the flex / bison dependency + handling, use system provided variant if available. Ensure + toolchain is available when configuring for 4.18+ support. + + Download: Fix handling of primary sites using file:// + + Toolchain: Correct external toolchain musl detection for + static toolchains. + + Updated/fixed packages: aircrack-ng, bison, brltty, busybox, + cutelyst, dropbear, gr-osmosdr, i2c-tools, json-c, libconfuse, + libkcapi, libsoup, libssh, liburiparser, mbedtls, mender, + mesa3d, minicom, mjpegtools, mutt, openpowerlink, openssh, + oracle-mysql, php, postgresql, pv, qt5base, qt5quickcontrols, + rauc, shairport-sync, systemd, xlib_libX11, zeromq, + + Issues resolved (http://bugs.uclibc.org): + + #11091: BR2_PRIMARY_SITE doesn't work (wget is selected... + #11141: WF111 package no longer available + #11211: Internal compiler error: Killed (program cc1plus).. + #11236: util-linux fails to build on Travis CI when python.. + #11246: Glibc 2.28 - fails to build host-bison and host-m4 + #11256: Add python-falcon and python-mimeparse packages + +2018.08-rc2, Released August 20th, 2018 + + Fixes all over the tree. + + pkg-kconfig: Support dependencies needed to run the + configurator, E.G. recent Linux kernel versions needing flex + and bison. + + Defconfigs: ARM Juno: Bump ATF to fix a build + issue. Raspberrypi2: Bump rootfs size. Snps_archs38_vdk: + Correct /etc/inittab. Technologic ts7680: Correct genimage + configuration. Orange PI PC / Zero, Sheevaplug: Bump U-boot to + 2018.07 to fix build issue. Ensure host-openssl is pulled in + for kernel builds where needed. + + Updated/fixed packages: aircrack-ng, bind, boost, + boot-wrapper-aarch64, bzip2, busybox, chrony, cryptsetup, + dahdi-tools, dbus, domoticz, eigen, ipsec-tools, libarchive, + libfuse, libgit2, libopenssl, libselinux, lighttpd, lvm2, m4, + makedevs, mariadb, mesa3d-headers, mono, ncmpc, ncurses, + nodejs, php, python-django, python-pyqt5, qt5base, + qt5serialbus, ruby, samba4, uboot-tools, uclibc, vlc, + waylandpp, wireless_tools, wireshark, wpa_supplicant, mtd, + xdriver_xf86-video-ati, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #10781: cryptsetup luksOpen container_file container causes.. + #10996: bogus musl ARM toolchain + #11191: xattr and check-package issue + +2018.08-rc1, Released August 5th, 2018 + + Toolchain: + + - add support for gcc 8.x, switch to gcc 7.x as the default + version + - add support for gdb 8.1, switch to gdb 8.0 as the default + and remove gdb 7.10/7.11 + - add support for binutils 2.31 + - NIOSII CodeSourcery toolchain updated + - Linaro AArch64 BE toolchain added, and other Linaro + toolchains updated + - Synopsys ARC pre-built toolchain updated + + Architecture: add support for ARM Cortex-M7 + + Major updates: + + - systemd bumped to 239 + - Qt5 bumped to 5.11.1 + - Rust bumped to 1.27 + - GStreamer stack bumped to 1.14.2 + - X.org server bumped to 1.20, and all X.org proto packages + replaced by the single xorgproto package + - i.MX6 support packages bumped to 6.2.4 + - i.MX Vivante graphics version bumped to 6.2.4.p1.2, + adding support for Wayland and i.MX8MQ platforms + + Linux: bumped to 4.17 by default. + + Infrastructure: new package infrastructure added for packages + using the Meson build system + + New packages: at-spi2-atk, at-spi2-core, capnproto, cmocka, + corkscrew, cutelyst, davfs2, flatcc, libidn2, libgit2, + libopusenc, mender, nghttp2, perl-convert-asn1, perl-crypt-blowfish, + perl-crypt-cbc, perl-digest-md5, perl-mime-base64-urlsafe, + perl-mojolicious-plugin-authentication, perl-net-ping, + perl-net-snmp, perl-net-ssh2, perl-net-telnet, pigz, + python-reentry, python-request-id, python-validators, + python-webob, shadowsocks-libev, speexdsp, xorgproto, wampcc + + New defconfigs: NXP i.MX7D SDB, Boundary Devices Nitrogen 8M, + Olimex A10 OLinuxino, ZynqMP ZCU106 + + Removed packages: all xproto_* have been removed and replaced + by xorgproto + + Issues resolved (http://bugs.uclibc.org): + + #9411: MUSL build with RT Error relocating /lib/libgcc_s.so.1: + __cpu_indicator_init: symbol not found + #9921: lockfile module within python-daemon not available + #10341: gdb install of py files when using buildroot toolchain + includes build path + #10661: /etc/init.d/S29netplug starts multiple instances of netplugd + #10751: Missing dependency in pulseaudio package + #10811: kodi-17.6-Krypton does not compile for freescale_* devices + #10856: openblas on qemu_x86_64_defconfig fails with + "sgemm_kernel.o: No such file or directory" + #11056: Compiling a file that uses libdrm headers fails with: + fatal error: drm.h: No such file or directory + #11061: support/download: git version=master broken + #11071: Building postgresql package on Debian 9.4 x64 for armel target fails + #11076: Docker containerd installed to incorrect path + #11101: host-patchelf Endian Issue with relative RPATH + #11111: raspberry pi 3 b+: missing BSP for 64-bit kernel + #11121: statfs call corrupts memory struct statfs too small + #11181: Switching toolchain does not work + +2018.05.3, Released October 6th, 2018 + + Important / security related fixes. + + Add a number of patches to fix build errors for host utilities + on modern distributions using glibc-2.28. + + mkusers: Ensure existing group members are preserved when a + group is reprocessed. + + printvars: Fix issue with exceeding shell command line length + limits for certain setups. + + Updated/fixed packages: acpid, android-tools, apache, + arp-scan, bandwidthd, bind, bison, brltty, chipmunk, connman, + cppcms, fio, gcc, ghostscript, gnupg, httping, igmpproxy, + imagemagick, imlib2, ipsec-tools, lcm2, libcurl, libesmtp, + libnfs, libssh, libxslt, links, mediastreamer, minicom, + moarvm, nilfs-utils, ocrad, parted, php, postgresql, pv, + python-django, qt, qt5quickcontrols, qt5webengine, screen, + sdl2, shairport-sync, squashfs, strongswan, vboot-utils, + webkitgtk, wireguard, x265, xen, xlib_libXfont, xlib_libXft, + xlib_libxshmfence, zeromq + +2018.05.2, Released August 28th, 2018 + + Important / security related fixes. + + Defconfigs: Raspberrypi2: Bump rootfs size, T7680: Fix + genimage.cfg issue, ARM Juno: Bump ATF to v1.3 to fix build + issue. + + Updated/fixed packages: acl, attr, apache, bind, + boot-wrapper-aarch64, brltty, bzip2, chrony, crda, cryptsetup, + dahdi-tools, dmidecode, dropbear, eigen, ffmpeg, gawk, gcc, + ghostscript, gnutls, imx-gpu-viv, ipsec-tools, libarchive, + libfuse, libglib2, libopenssl, libselinux, libsoup, lighttpd, + linuxptp, lttng-modules, lttng-tools, lua-flu, lvm2, m4, + makedevs, mariadb, mbedtls, mesa3d-heders, mtd, ncurses, + nodejs, openssh, php, python-django, rauc, ruby, samba4, + stress-ng, ti-utils, uboot-tools, uclibc, vim, waylandpp, + wireless_tools, wireless-regdb, wireshark, wpa_supplicant, + xorriso, znc + + Issues resolved (http://bugs.uclibc.org): + + #10781: cryptsetup luksOpen container_file container causes.. + #10986: Installing package attr when already supplied by.. + #11191: xattr and check-package issue + +2018.05.1, Released July 20th, 2018 + + Important / security related fixes. + + U-Boot: Ensure host version of ncurses is picked up and not + host-ncurses built by buildroot, as that otherwise causes + widechar/non-widechar conflicts and corrupted menuconfig + menus. + + Linux: Enable CONFIG_PERF_EVENTS when perf is enabled. + + Toolchain: ARC tools updated to arc-2018.03. + + pkg-stats: Fix python 3.x compatibility. + + dl-wrapper: Fix support for URIs containing '+', fix + no-check-hash for inferred site method. + + Defconfigs: Raspberrypi3: Bump rootfs size, Minnowboard-max: + Support ethernet on Turbot variant. + + Updated/fixed packages: audit, bind, btrfs-progs, cifs-utils, + clamav, collectd, coreutils, docker-containerd, dos2unix, + edid-decode, file, gcc, gdb, gnupg, gnupg2, heimdal, hidapi, + imagemagick, libcurl, libgcrypt, libglib2, liblogging, + libostree, libressl, libsoup, libv4l, libvncserver, libvorbis, + libwebsockets, libxslt, lm-sensors, mariadb, mpg123, ncurses, + network-manager, nodejs, patchelf, perl, php-amqp, pinentry, + pixiewps, qpdf, qt53d, qt5base, qt5charts, qt5script, redis, + systemd, triggerhappy, uboot, wireguard, wireless-regdb, + wireshark + +2018.05, Released June 1st, 2018 + + Minor fixes. + + Download: Work around for hanging connections for packages + from CVS, by adding a 10 minute max timeout. + + Updated/fixed packages: binutils, clang, dash, expect, git, + glibc, jpeg-turbo, libjpeg, log4cplus, openvmtools, xen, + + Issues resolved (http://bugs.uclibc.org): + + #11051: runtime issue on STM32 with usage of binutils 2.29.x + +2018.05-rc3, Released May 28th, 2018 + + Fixes all over the tree. + + Toolchain: ARC tools updated to arc-2018.03-rc2. + + Fs: Ensure hard links in TARGET_DIR are correctly copied for + filesystem input. With the recent changes to the file system + generation logic, hard links were "expanded" in file system + images leading to bloated rootfs images for setups with hard + links. + + Infrastructure: Error out for packages using the 'local' + method but forgetting to specify _SITE. + + Build rpcgen for the host when needed to support distributions + no longer shipping rpcgen with glibc (E.G. recent Fedora). + + Updated/fixed packages: autofs, bash-completion, binutils, + busybox, cjson, elf2flt, libcoap, libcurl, libtirpc, lrzsz, + poppler, procps-ng, qt-webkit-kiosk, quota, samba4, xfsprogs + + Issues resolved (http://bugs.uclibc.org): + + #11031: ld-elf2flt: host/bin/ld.real': execvp: No such file.. + #11036: C compiler cannot create executables + #11046: Git package binaries are ~180MB (compared to ~20MB in.. + +2018.05-rc2, Released May 22nd, 2018 + + Fixes all over the tree. + + Dependencies: Check that the current working directory (.) + isn't listed in PATH as that causes various build issues. + + Manual: Clarify that git branch names may not be used as + version identifiers. This has never been supported, but was + kind of working (with some limitations) before the git + download rework - Now it does not work at all. + + Linux: Ensure host version of ncurses is picked up and not + host-ncurses built by buildroot, as that otherwise causes + widechar/non-widechar conflicts and corrupted menuconfig + menus. + + Packages: Renamed a number of package options not prefixed + with BR2_PACKAGE_ for consstency. + + Download infrastructure: Fix file:// protocol handling after + download rework. + + Updated/fixed packages: acl, apr-util, asterisk, attr, + bluez5_utils, cifs-utils, clamav, clang, cups-filters, + dahdi-linux, exim, faketime, gdb, go, gst1-plugins-bad, + imx-mkimage, ipsec-tools, jamvm, janus-gateway, + jquery-ui-themes, libcap, libcurl, libftdi, libkcapi, libkrb5, + libmediaart, libmodbus, libmodplug, libmpd, + libnetfilter_cthelper, libnetfilter_cttimeout, libnfc, + libnfnetlink, libnss, liboauth, libogg, libosip2, + libpam-radius-auth, libpcap, libpciaccess, llvm, log4cplus, + ltrace, lynx, mbedtls, modem-manager, nfs-utils, + python-cython, python-websockets, qt5cinex, qt5wayland, rauc, + snort, strace, ti-sgx-km, transmission, wavpack, wget, woff2, + xen, zmqpp, znc, zstd + + Issues resolved (http://bugs.uclibc.org): + + #10986: Installing package attr when already supplied by... + #11011: BUildroot for Raspberry Pi 2 + #11016: Wrong compiler used for external user host packages + +2018.05-rc1, Released May 9th, 2018 + + Toolchain: glibc bumped to 2.27, musl bumped to 1.1.19, + uClibc-ng 1.0.30, Linux kernel headers bumped to 4.16.x. + + Architecture: support for the Blackfin architecture has been + removed, as it was removed from Linux upstream, poorly + maintained in binutils/gdb, and abandoned by Analog Devices. + + Numerous packages updated to have hashes for their license + files. + + Systemd can now be built with uClibc toolchains. + + Linux: addition of BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF and + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL to support building Linux + kernel configurations that need libelf on the host or openssl + on the host. + + Coding style: + - all Python scripts are now verified with flake8 + - check-package extended to check all Config.in and .mk files + in tree, not only the ones in package/ + + Infrastructure: + + - The download infrastructure has seen a major overhaul, with + the main visible new feature being Git caching: a package + fetched from Git no longer needs to be re-cloned entirely + everytime its version is changed. Anoter visible change is + that the download folder now has subfolders per package. See + http://lists.busybox.net/pipermail/buildroot/2018-April/217923.html + for more details about those changes. + + - The logic that generates the root filesystem images has been + reworked, with the main goal of allowing several filesystem + images to be produced in parallel, also a requirement for + top-level parallel build. Now, a .tar filesystem image is + always created, and re-extracted in a private directory to + create each format-specific filesystem image. + + - A new package infrastructure was introduced for Go-based + packages: golang-package. + + - Dependencies on extraction tools are now handled as proper + per-package dependencies, using + _EXTRACT_DEPENDENCIES. Beyond a cleanup, this is also a + preparation step for top-level parallel build support. + + - When a file being downloaded is part of a package with a + .hash file, but there is no hash listed for this file, the + file is now preserved in the download directory rather than + removed. This helps when updating a package, as it gives the + ability to easily calculate the hash of the file. + + - Addition of '-show-recursive-depends' and + '-show-recursive-rdepends' make targets, to + respectively display the recursive list of dependencies and + the recursive list of reverse dependencies of a given + package. + + - The /etc/shells file is now automatically generated with the + list of shell programs installed on the system. + + - Addition of -Ofast optimization level as an available + option. + + Major updates: Go updated to 1.10, Erlang bumped to 20.3, Qt5 + bumped to 5.10.1. + + New packages: 18xx-ti-utils, abootimg, bluez-alsa, brotli, + chipmunk, clang, docker-compose, docker-proxy, flare-engine, + flare-game, gst1-interpipe, gstreamer1-editing-services, + hackrf, i2pd, imx-alsa-plugins, imx-mkimage, libcdio-paranoia, + libkrb5, llvm, pixiewps, python-backports-ssl-match-hostname, + python-cached-property, python-cython, python-docker, + python-dockerpty, python-docker-pycreds, + python-flask-sqlalchemy, python-functools32, python-influxdb, + python-json-models, python-libusb1, python-networkx, + python-psycopg2, python-pymodbus, python-sqlalchemy, + python-subprocess32, python-texttable, + python-websocket-client, python-yieldfrom, quotatool, reaver, + snort, sunxi-mali-mainline, sunxi-mali-mainline-driver, tk, + tpm2-abrmd, tpm2-tools, tpm2-tss, udftools, vte, woff2. + + New defconfigs: ARC HS Development Kit, Arcturus ucls1012a, + Freescale i.MX6UL EVK (with vendor kernel), Freescale i.MX6 + SoloLite EVK (with vendor kernel), Freescale i.MX31 3Stack, + Freescale i.MX8Q EVK Freescale p1025twr, Freescale t1040d4rdb, + Qemu PPC64 E5500, SolidRun ClearFog Base, Tinker RK3288, Vyasa + RK3288, + + Removed packages: iqvlinux, kodi-adsp-*, mplayer + + Removed defconfigs: ci40, firefly_rk3288, + freescale_p1010rdb_pa, freescale_mpc8315erdb, riotboard, + teliv_evk_pro3 + + Issues resolved (http://bugs.uclibc.org): + + #10151: toolchain eclipse register : fails with a custom + BR2_HOST_DIR + #10511: Packages get downloaded uncompressed with wget + #10531: QtWebengine doesn't build if the host hasn't a 32 bits + C++ compiler working + #10846: error in compiling gnutls + #10886: openssl-1.0.2n fails to build + #10896: /bin/sh not in /etc/shells + #10961: Grub2 fails to build for x86_64 when BR2_SSP_ALL is + enabled + +2018.02.12, Released March 29th, 2019 + + Important / security related fixes. + + Updated/fixed packages: avahi, beecrypt, busybox, clamav, + cups, devmem2, fetchmail, file, fltk, gcc, gdb, git, jq, + leveldb, libopenssl, libraw, libseccomp, libssh2, + libunistring, mariadb, mosquitto, nodejs, ntp, openjpeg, perl, + php, putty, qt5webkit, rdesktop, systemd, wireshark, vsftpd, + xapp_xdm, xlib_libXdmcp + +2018.02.11, Released February 23th, 2019 + + Important / security related fixes. + + Ensure the PLATFORM and OS environment variables are not set, + as they cause build issues for some packages. + + The package list infrastructure now correctly handles packages + installing files with old mtime. + + Linux: Skip hash checks for user supplied downloadable + patches, as no hash checksums are available for those. + + scanpypi: protect against zip-slip vulnerability in zip/tar + handling + + Updated/fixed packages: bind, dhcpcd, dovecot, ghostscript, + gnuradio, imagemagick, jpeg-turbo, libarchive, libb64, + libcurl, libid3tag, madplay, mosquitto, openssh, php, + postgresql, proftpd, python, python-django, python3, qt5base, + sqlcipher, swupdate, systemd, unzip, webkitgtk + +2018.02.10, Released January 31th, 2019 + + Important / security related fixes. + + Defconfigs: Fixes for Lego EV3, QEMU AArch64-virt + + check-package: fix Python 3 support + + get-developers: Fix behaviour when called from elsewhere than + the toplevel directory. + + cmake: Also set CMAKE_SYSTEM_VERSION in toolchainfile.cmake + + Updated/fixed packages: acpica, apache, apr, asterisk, + avrdude, cargo, cc-tool, dash, dhcpdump, dmalloc, gnuchess, + gnupg2, leveldb, libarchive, libassuan, libftdi1, + libgpg-error, libhttpparser, libmad, libsndfile, libsquish, + liburiparser, libwebsock, libxml2, lighttpd, lm-sensors, + lua-msgpack-native, mbedtls, mosquitto, netatalk, nodejs, + openssh, pango, patchelf, php, python-django, python-pyyaml, + rauc, rp-pppoe, s6-networking, samba4, sdl_sound, + shairport-sync, sqlite, subversion, sunxi-cedarx, tcpreplay, + tekui, usb_modeswitch, webkitgtk, wireshark, wolfssl, + xapp_rgb, xenomai, xerces + + Issues resolved (http://bugs.uclibc.org): + + #11576: Unable to start apache with event MPM on raspberry pi 3 + +2018.02.9, Released December 20th, 2018 + + Important / security related fixes. + + defconfigs: Fixes for ci20 + + Updated/fixed packages: c-ares, dante, freetype, ghostscript, + glibc, gnutls, go, libcurl, libgpgme, libid3tag, libiscsi, + libmpd, libopenssl, libpjsip, linux, liquid-dsp, luvi, lynx, + msgpack, nginx, nodejs, php, popt, pps-tools, python-numpy, + python-requests, samba4, sdl2_net, squashfs, swupdate, uclibc, + wine, webkitgtk, xfsprogs + + Issues resolved (http://bugs.uclibc.org): + + #11426: pps-tools bash dependency + +2018.02.8, Released November 26th, 2018 + + Important / security related fixes. + + fs: Drop intermediate tarball from the filesystem handling to + fix an issue with xattrs handling related to fakeroot. Ensure + tarball target includes xattrs. + + download: Fix confusion in git submodule handling if dl/ is a + symlink. + + toolchain: Only allow enabling stack protection on + architectures with control flow integrity (CFI) support. Only + allow FORTIFY_SOURCE support on gcc >= 6. + + genrandconfig: Fix missing newline in BR2_WGET handling, + causing the following line to be ignored. This would affect + BR2_ENABLE_DEBUG, BR2_INIT_BUSYBOX, BR2_INIT_SYSTEMD, + BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, BR2_STATIC_LIBS or + BR2_PACKAGE_PYTHON_PY_ONLY depending on the randomization. + + show-build-order: Also include the dependencies of + rootfs-common. + + Defconfigs: Fixes for Armadeus APF27, imx6sabre. + + graph-depends: Fix for package names starting with a non-alpha + character. + + Updated/fixed packages: attr, audit, bind, brotli, easydbus, + elfutils, gauche, gcc, giflib, gpsd, lcdproc, libcurl, + libiscsi, libnfs, libnspr, libnss, libkcapi, libsemanage, + liburiparser, lighttpd, linux, lua-curl, mariadb, mmc-utils, + mosquitto, mysql, neardal, netplug, network-manager, + nfs-utils, nginx, openocd, openswan, p11-kit, postgresql, + prosody, qemu, qt, rpm, ruby, samba4, squid, supertuxkart, + systemd, tar, trace-cmd, traceroute, twolame, uclibc, + usb_modeswitch, vtun, webkitgtk, xdriver_xf86-video-geode, + xlib_libfontenc, xproto_inputproto, xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #11086: download/git submodule breaks on symlinked dl folder + #11251: Util scanpypi failes when package change - to _ in.. + #11476: stdio2.h error invalid use of __builtin_va_arg_pack + #11481: Docs: Is external.desc required? + +2018.02.7, Released October 25th, 2018 + + Important / security related fixes. + + Detect and reject build paths containing '@', as this confuses + a number of packages, including GCC. + + utils/get-developers: Add -e option for use with git + send-email. + + utils/diffconfig: Make it work for (non-Buildroot) config + files not using the BR2_ prefix. + + u-boot: Fix for environment image handling on big endian + systems. + + Updated/fixed packages: binutils, ca-certificates, + cups-filters, erlang, file, freetype, gcc, git, gvfs, leveldb, + libarchive, libcurl, libssh, live555, ljlinenoise, mariadb, + mongoose, netsnmp, nmap, nodejs, ntp, open-plc-utils, poco, + psmisc, ptpd2, python-enum34, qemu, qt, qt5base, setools, + spice, spice-protocol, tinc, ustr, wireshark + + Issues resolved (http://bugs.uclibc.org): + + #11396: uboot environment image checksum invalid if target is big endian + +2018.02.6, Released October 7th, 2018 + + Important / security related fixes. + + Add a number of patches to fix build errors for host utilities + on modern distributions using glibc-2.28. + + mkusers: Ensure existing group members are preserved when a + group is reprocessed. + + printvars: Fix issue with exceeding shell command line length + limits for certain setups. + + Updated/fixes packages: acpid, android-tools, apache, + arp-scan, bandwidthd, bind, bison, clamav, connman, cppcms, + cramfs, fio, gcc, ghostscript, glibc, gnupg, httping, + igmpproxy, imagemagick, imlib2, ipsec-tools, lcms2, libcurl, + libesmtp, libnfs, libssh, libxslt, links, linuxptp, + mediastreamer, minicom, moarvm, nilfs-utils, ocrad, parted, + php, pv, python-django, qt, qt5quickcontrols, qt5webengine, + screen, sdl2, shairport-sync, squashfs, strongswan, + vboot-utils, webkitgtk, wireguard, x265, xen, xlib_libXfont, + xlib_libXft + + New packages: brotli, woff2 + +2018.02.5, Released August 29th, 2018 + + Important / security related fixes. + + Defconfigs: Raspberrypi2: Bump rootfs size, T7680: Fix + genimage.cfg issue, ARM Juno: Bump ATF to v1.3 to fix build + issue. + + Updated/fixed packages: acl, apache, attr, bind, + boot-wrapper-aarch64, brltty, bzip2, chrony, crda, cryptsetup, + dahdi-tools, dmidecode, dropbear, eigen, erlang, ffmpeg, gawk, + gcc, ghostscript, gnutls, ipsec-tools, libarchive, libfuse, + libopenssl, libselinux, libsoup, lighttpd, linuxptp, + lttng-modules, lttng-tools, lua-flu, lvm2, m4, makedevs, + mariadb, mbedtls, mesa3d-headers, mtd, ncurses, nodejs, + openssh, php, postgresql, python-django, qt5xmlpatterns, ruby, + samba4, shairport-sync, stress-ng, ti-utils, uboot-tools, vim, + waylandpp, wireless_tools, wireshark, wpa_supplicant, xorriso, + znc + + Issues resolved (http://bugs.uclibc.org): + + #10781: cryptsetup luksOpen container_file container causes.. + #10986: Installing package attr when already supplied by.. + #11191: xattr and check-package issue + +2018.02.4, Released July 21th, 2018 + + Important / security related fixes. + + U-Boot: Ensure host version of ncurses is picked up and not + host-ncurses built by buildroot, as that otherwise causes + widechar/non-widechar conflicts and corrupted menuconfig + menus. + + Linux: Enable CONFIG_PERF_EVENTS when perf is enabled. + + Defconfigs: Raspberrypi3: Bump rootfs size, Minnowboard-max: + Support ethernet on Turbot variant. + + Updated/fixed packages: bind, clamav, collectd, dos2unix, + edid-decode, gcc, gdb, heimdal, hidapi, imx-gpu-viv, libcurl, + libglib2, liblogging, libostree, libsoup, libv4l, lm-sensors, + ncurses, network-manager, patchelf, pinentry, procps-ng, qpdf, + qt5, qt53d, qt5base, qt5charts, qt5script, qt5serialport, + systemd, wireguard, wireless-regdb + + Issues resolved (http://bugs.uclibc.org): + + #11101: host-patchelf Endian Issue with relative RPATH + +2018.02.3, Released June 18th, 2018 + + Important / security related fixes. + + Various fixes for building on modern distributions (GCC 8.x, + no rpcgen utility). + + ARM: Default to binutils 2.28 and warn about newer binutils + versions, which are known to cause boot failures for Linux + kernels built in thumb mode. + + Busybox/mdev: Fix module autoloading. + + Busybox/sysvinit: inittab: Add /dev/{stdin,stdout,stderr} + symlinks, call swapon -a to activate any configured swap + devices. + + Dependencies: Check that PATH does not contain current working + directory, which triggers a number of build failures. + + Infrastructure: Error out for packages erroneously using the + 'local' site method but not defining a _SITE. + + Linux: Fix cuImage. / simpleImage. handling. Ensure + kconfig uses ncurses from the host to fix a ncurses/ncursesw + mixup, causing menuconfig display corruption. + + Toolchain: Workarounds for fix-rpath issues with binutils and + elf2flt. + + Util-linux: Fix blocking on getrandom() issue with recent + kernels. + + Remove broken freescale_imx31_3stack, + freescale_imx6sololiteevk and freescale_imx6ulevk defconfigs. + + Updated/fixed packages: apr-util, asterisk, attr, audit, + autofs, binutils, busybox, cifs-utils, cups-filters, dash, + ebtables, exim, expect, f2fs-tools, faketime, file, gdb, git, + glibc, gnupg, gnupg2, gst1-plugins-bad, imagemagick, jamvm, + jpeg-turbo, libcap, libcoap, libcurl, libgcrypt, libjpeg, + libnss, libressl, libtirpc, libvncserver, libvorbis, libxslt, + log4cplus, lrzsz, ltrace, lynx, mariadb, mbedtls, mpg123, + nasm, netplug, network-manager, nfs-utils, nodejs, + openvmtools, patch, perl, php-amqp, poppler, procps-ng, + python, python-websockets, quota, redis, samba4, sysvinit, + transmission, triggerhappy, util-linux, wavpack, wget, + wireshark, xen, zmqpp + + Issues resolved (http://bugs.uclibc.org): + + #10986: Installing package attr when already supplied by busybox.. + #11031: ld-elf2flt: host/bin/ld.real': execvp: No such file or.. + +2018.02.2, Released May 4th, 2018 + + Important / security related fixes. + + Tweak package size/file instrumentation to better handle + package rebuilds. + + Revert /etc/shells creation when bash is enabled. + + Exclude /lib/firmware from the rpath fixup logic, as it may + contain non-native ELF files. + + Scanpypi: Support the new PyPi infrastructure. + + Handle GCC 8.x on the host. + + Ensure timestamp of /usr is updated to support the systemd + ConditionNeedsUpdate option. + + Updated/fixed packages: bluez5_utils, flann, gdb, gnupg2, + grub2, libcec, libcgi, libglib2, libgpg-error, libgpgme, + libtomcrypt, mbedtls, mkpasswd, php, python, python-requests, + python-watchdog, qt53d, qt5websockets, sdl2, sdl2_image, + syslog-ng, systemd, tcl, tcllib, uclibc, usb_modeswitch, + wireguard, wmctrl + + Issues resolved (http://bugs.uclibc.org): + + #10896: /bin/sh not in /etc/shells + #10961: Grub2 fails to build for x86_64 when BR2_SSP_ALL is enabled + +2018.02.1, Released April 9th, 2018 + + Important / security related fixes. + + Removed unmaintained defconfigs: Creator Ci40, Firefly rk3288, + Freescale mpc8315erdb / p1010rdb_pa, Riotboard, Teliv EVK + Pro3. + + Infrastructure: Speed up instrumentation for package size by + comparing timestamps instead of md5 checksums, as doing + checksums could lead to up to 25% longer build time for big + configurations. + + Rename the internal _BASE_NAME variable to _NASENAME + to avoid name clashes with packages ending on '-base'. + + Add a better fix for build issues for autotools based packages + checking for C++ support on toolchains without C++ support. + + Build host-tar if tar is older than 1.27 on the build machine + to work around reproducibility issues with git archives + containing long paths. + + check-unique-files: Fix for filenames not representable in the + users' locale. + + Check-bin-arch: Add support for per-package ignore paths + (_BIN_ARCH_EXCLUDE). + + Toolchain: Fix SSP support detection for external toolchains. + + linux: Add _NEEDS_HOST_OPENSSL / LIBELF options to ensure + these dependencies are available for Linux configurations + needed these dependencies, similar to how it is done for + U-Boot. + + Support custom (not in tree) device tree files in addition to + in-tree ones. + + U-Boot / uboot-tools: Fix header conflict with libfdt-devel + installed on host. + + Updated/fixed packages: apache, busybox, c-ares, cmake, + docker-engine, enlightenment, eudev, fbgrab, freescale-imx, + gtest, imagemagick, intel-microcode, irssi, jimtcl, kmod, + kodi, ktap, libcoap, libcurl, libfcgi, libhttpparser, + libminiupnpc, libopenssl, libpjsip, libss7, libssh2, libupnp + libupnpp, libuv, libvorbis, memcached, motion, musl, nodejs, + ntp, openblas, opencv3, openocd, opus-tools, patch, php, + pkgconf, postgresql, powerpc-utils, python-jsonschema, + python-webpy, qemu, qt5bsae, qt5script, qt5webkit, rapidjson, + rauc, sam-ba, samba4, sngrep, systemd, tremor, uboot-tools, + uclibc-ng-test, upmpdcli, wireshark, xerces, xterm, zstd + + New packages: docker-proxy, python-functools32 + + Issues resolved (http://bugs.uclibc.org): + + #10766: upmpdcli: Segmentation fault + #10776: ktap fails to build + #10846: error in compiling gnutls + #10856: openblas on qemu_x86_64_defconfig fails with "sgemm_.. + +2018.02, Released March 4th, 2018 + + Fixes all over the tree. + + Issues with systemd with a readonly rootfs and DBus fixed. + + Instructure: + - check-uniq-files: fix Python 2.6 compatibility. + - dependencies.sh: check for external argparse module for + Python 2.6. + - Add infrastructure to detect and use a UTF-8 locale on the + host, needed by systemd. + + Update/fixed packages: clamav, dash, dhcp, dovecot, efl, + ffmpeg, libv4l, mono, mosquitto, php, postgresql, qt, + scanpypi, sdl2, systemd, tor, tvheadend, uboot, wavpack + + Issues resolved (http://bugs.uclibc.org): + + #10831: qemu_x86_64_defconfig build fails on linux-headers.. + +2018.02-rc3, Released February 27th, 2018 + + Fixes all over the tree. + + check-bin-arch: skip /lib/modules to allow 32-bit userland + with 64bit kernel. + + dependencies: Blacklist tar 1.30+ and build our own host-tar + if needed as tar 1.30+ changed the --numeric-owner output for + long path names. Build host-tar before other host-dependencies + as they need it to extract their source tarballs. + + Update/fixed packages: asterisk, azmq, bluez5_utils, domoticz, + e2fsprogs, erlang, exim, glibc, gpsd, jq, libglib2, libvorbis, + mariadb, mbedtls, mesa3d, mesa3d-headers, mpv, patch, pcre2, + php, qt5, qt5multimedia, qt5wayland, qt5webengine, qt5webkit, + systemd, quagga, rustc, uboot, wireguard, zic, zlib-ng + + Issues resolved (http://bugs.uclibc.org): + + #10726: Current libglib2.mk creates broken libglib2 binary... + #10786: Linux fails to build unless make linux-menuconfig... + #10796: Cannot generate cpio image without selecting CON... + +2018.02-rc2, Released February 15th, 2018 + + Fixes all over the tree. + + Dependencies: Ensure C++ support is available like for C + support for packages needing 32bit host support. + + utils/genrandconfig: Check host dependencies for config. + + Updated/fixed packages: busybox, dnsmasq, dropbear, ffmpeg, + glibc, keepalived, libcpprestsdk, libgpiod, libmaxminddb, + librsvg, libtasn1, libv4l, libxml2, lightning, ltp-testsuite, + mesa3d, mesa3d-demos, mesa3d-headers, nftables, open-lldp, + php, postgresql, python-crossbar, qt5, qt53d, qt5enginio, + qt5tools, qt5webengine, qt5webkit, rsync, rust-bin, rustc, + systemd + + Issues resolved (http://bugs.uclibc.org): + + #9781: ti-sgx-km build on kernel >4.1 + #10141: Squashfs extended attribute failures + +2018.02-rc1, Released February 5th, 2018 + + The global source-check and per-package -source-check + targets have been removed. + + Architecture: Add x86 Silvermont variant. Add several new ARM + variants, rework MIPS NaN logic. Support mainline binutils/gcc + for ARC. + + Toolchains: Linaro toolchains upgraded to 2017.11 release, ARC + external toolchains upgraded to arc-2017.09. Libatomic is now + also copied for external musl based toolchains. + Add binutils 2.30.x and switch to binutils 2.29.x by default. + + Added hardening options to build with RELRO and FORTITY. + + New defconfigs: Bananapi M64, FriendlyARM Nanopi A64 & NEO2, + imx6slevk, imx6sx-sdb, imx6ulevk, Olimex A64-OLinuXino, + Orangepi lite / pc plus / pc / prime / win / win plus / zero + plus2, Pine64, Solidrun MacchiatoBin. Sopine. + + Add utils/diffconfig, a simple utility for comparing + configuration files - Adapted from the version in the + Linux kernel. + + Infrastructure: Check that the same file is not touched by + multiple packages, as a preparation for toplevel parallel + builds. + + Hashes for the license files for a large number of packages + have been added, ensuring that license changes will not be + missed when packages are bumped. + + Fix build issue for autotools based packages checking for C++ + support on toolchains without C++ support and on a distro + lacking /lib/cpp (E.G. Arch Linux). + + Support for the meson build system. + + Pie charts generated by 'graph-build' or 'graph-size' are now + sorted according to the size of each piece. + + System: Only show getty options when busybox init or sysvinit + are used. + + ARM-trusted-firmware: Support ATF bundled in U-Boot as + well as U-Boot bundled in ATF. + + Zlib is now a virtual package, provided by either libzlib or + zlib-ng, similar to openssl. + + Support for the Rust programming language. + + New packages: aoetools, armbian-firmware, binaries-marvell, + brltty, cargo, cargo-bin, cups-filters, curlpp, daq, + flatbuffers, gconf, glorytun, gstreamer1-mm, imx-m4fwloader, + imx-gpu-g2d, json-for-modern-cpp, libcpprestsdk, libgta, + libostree, libupnp18, luadbi, luadbi-sqlite3, lua-utf8, lynx, + meson, mv-ddr-marvell, nilfs-utils, opentracing-cpp, + open-lldp, pimd, proj, python-flask-cors, + python-jaraco-classes, python-more-itertools, python-oauthlib, + python-raven, python-remi, python-requests-oauthlib, + python-schedule, python-secretstorage, python-see, + python-tabledata, python-txtorcon, python-xlib, qt5charts, + rtl8189fs, rtl8723bu, rust, rustc, rust-bin, rygel, safeclib, + solatus, tcf-agent, traceroute, waylandpp, wolfssl, + zisofs-tools, zlib-ng + + Removed packages: eeprog + +2017.11.2, Released January 21st, 2018 + + Important / security related fixes. + + External toolchain: libatomic is now also copied for musl + based toolchains. + + nconfig: Fix for ncurses/ncursesw linking issue causing crashes. + + System: Only show getty options when busybox init or sysvinit + are used. + + Infrastructure: Fix build issue for autotools based packages + checking for C++ support on toolchains without C++ support and + on a distro lacking /lib/cpp (E.G. Arch Linux). + + Pie charts generated by 'graph-build' or 'graph-size' are now + sorted according to the size of each piece. + + Updated/fixed packages: asterisk, avahi, bind, busybox, + coreutils, eeprog, intel-microcode, iputils, irssi, kmsxx, + libiio, linux-firmware, lz4, mariadb, matchbox-lib, mcookie, + ntp, php, pound, rpcbind, tar, ti-cgt-pru, webkitgtk, xen, + xlib_libXpm + + Issues resolved (http://bugs.buildroot.org): + + #9996: lz4 package does not install lz4 binaries in target + #10176: Rsyslog's S01logging is deleted by Busybox.mk from... + #10216: package/x11r7/mcookie/mcookie.c:207: bad size ? + #10301: systemd/getty unused options + #10331: kmsxx, host installation fails with BR2_SHARED_... + #10556: Building ntp package with SSL library libressl... + #10641: avahi-autoipd not starting when using systemd-tmpfiles + +2017.11.1, Released December 31th, 2017 + + Important / security related fixes. + + Updated/fixed packages: asterisk, checkpolicy, dhcp, flann, + gdb, glibc, heimdal, kodi-pvr-mediaportal-tvserver, + kodi-pvr-stalker, libcue, libopenssl, libpqxx, libsoxr, + linknx, linux-tools, lldpd, ltp-testsuite, mariadb, mfgtools, + nodejs, nut, pulseaudio, python-cffi, qemu, rsync, tor, uboot, + uboot-tools, vlc, webkitgtk, weston, wireguard, wireshark, + xenomai, xfsprogs + +2017.11, Released November 30, 2017 + + Fixes all over the tree. + + Toolchain: Use github mirror for Glibc. + + Defconfigs: Correct boot.cmd for bananapi-m1. + + Makefiles: Workaround include order issues for certain make + versions by explicitly sorting the result of wildcard where it + matters. + + Download: Ensure subversion runs in non-interactive mode. + + Updated/fixed packages: asterisk, boost, chrony, dovecot, + dvb-apps, exim, feh, freerdp, fwup, google-breakpad, jose, + kvm-unit-test, lftp, libcurl, libevent, libfastjson, libpjsip, + libupnp, linphone, localedef, lttng-tools, mp4v2, mtools, + ndisc6, oracle-mysql, parted, pdbg, qt, qt5connectivity, + qt5declarative, qt5webkit, rauc, runc, samba4, shairport-sync, + systemd-bootchart, webkitgtk, wireguard, xlib_libXcursor, + xlib_libXfont, xlib_libXfont2, + + Issues resolved (http://bugs.buildroot.org): + + 10501: host-localedef fails to compile on Ubuntu 17.10 + 10506: Changed kernel image type (e.g. zImage to uImage)... + +2017.11-rc2, Released November 13th, 2017 + + Fixes all over the tree. + + Updated/fixed packages: collectd, ffmpeg, freerdp, + go-bootstrap, imagemagick, jimtcl, libpjsip, libplist, libuv, + mesa3d, nodejs, ntp, openjpeg, postgresql, python-numpy, ruby, + snmp++, usb_modeswitch, util-linux, vboot-utils, webkitgtk, + wireshark, wpa_supplicant, xapp_xdriinfo + + Issues resolved (http://bugs.buildroot.org): + + #10326: mesa3d package fails to build when BR2_SHARED_STATIC_LIBS=y + #10491: Cannot output security warning when compiled with buildroot.. + +2017.11-rc1, Released November 6th, 2017 + + Fixes all over the tree and new features. + + Openssl is now a virtual package, which may be provided by + OpenSSL (now renamed to libopenssl) or LibreSSL. + + libssh2: there is now an explicit choice of the backend to use + (mbedtls, gnutls or openssl). Previously, the choice was implicit + based on the TLS library that was selected. Now, it is possible to + choose the backend, which is important if several TLS libraries are + selected. + + netsnmp: all MIB files are now installed, making the target filesystem a + bit bigger than before. To remove unneeded MIBS, you should use a + post-build script. + + Toolchain: Linaro toolchains updated to 2017.08, ARC toolchain + updated to 2017.09, Glibc updated to 2.26, Glibc support for + ARCv2. The toolchain wrapper now handles SOURCE_DATE_EPOCH for + older (pre-gcc7.x) toolchains for BR2_REPRODUCIBLE. + + New defconfigs: Atmel SAM45D27, Bananapi M1 and M2 Plus, + Engicam i.CoreM6 Qt5 configuration, i.MX6 sabreauto (mainline + kernel/u-boot), i.MX6Q sabresd Qt5 configuration, i.MX7d-pico, + QEMU ppc64le, Raspberry pi3 Qt5 webengine configuration, + Technologic TS-7680. + + New packages: asterisk, azmq, bcg729, boinc, dahdi-linux, + dahdi-tools, freeswitch-mod-bcg729, fscryptctl, libb64, + libpri, libss7, lua-basexx, lua-compat53, lua-cqueues, + lua-curl, lua-datafile, lua-fifo, lua-httpd, + lua-lpeg-patterns, lua-markdown, lua-sailor, lua-value, + luksmeta, minetest, minetest-game, pdmenu, prosody, + python-aiocoap, python-automat, python-ibmiotf, + python-iso8601, python-m2r, python-simplesqlite, + python-websockets, python-xmltodict, qt5wayland, qt5webengine, + restorecond, selinux-python, semodule-utils, uhubctl, + wireguard, wsapi-fcgi, wsapi-xavante + + Removed packages: aiccu, rfkill, sepolgen + + Issues resolved (http://bugs.buildroot.org): + + #10281: lsblk does not compile for util-linux + #10336: lttng compilation fails : linking error + #10351: glibc missing in rootfs + #10356: nfs-utils missing header + #10361: python3 python-config script generates invalid includes + #10366: dropbear download url has changed + #10391: WiringPi retrieves wrong (old) version + #10406: Beaglebone black: Buggy SGX driver version, swapped... + #10426: uboot-tools' fw_setenv does not update the redundant... + #10451: libpcap 1.8.x and 1.7x does not compile on PPC + +2017.08.2, Released November 28th, 2017 + + Important / security related fixes. + + Qt: 5.6 version updated to 5.6.3. + + Reproducible: Do not override SOURCE_DATE_EPOCH if already set + in the environment. + + Makefiles: Workaround include order issues for certain make + versions by explicitly sorting the result of wildcard where it + matters. + + Updated/fixed packages: apr, apr-util, arqp-standalone, + azure-iot-sdk-c, collectd, dvb-apps, ffmpeg, go-bootstrap, + google-breakpad, gstreamer, imagemagick, irssi, jimtcl, + kvm-unit-test, libcurl, libfastjson, libglib2, libidn, + libpjsip, libplist, localedef, lttng-tools, luajit, mesa3d, + moarvm, mp4v2, openssh, openssl, oracle-mysql, postgresql, + python3, python-pyqt5, qt, qt5base, qt5canvas3d, + qt5connectivity, qt5declarative, qt5engineio, + qt5graphicaleffects, qt5imageformats, qt5location, + qt5multimedia, qt5quickcontrols, qt5quickcontrols2, qt5script, + qt5sensors, qt5serialbus, qt5serialport, qt5svg, qt5tools, + qt5webchannel, qt5webkit, qt5websockets, qt5x11extras, + qt5xmlpatterns, quagga, redis, ruby, samba4, sdl2, snmppp, + swupdate, ti-gfx, uboot-tools, usb_modeswitch, vboot-utils, + webkitgtk, wget, wireshark, xapp_xdriinfo. + + Issues resolved (http://bugs.buildroot.org): + + 10326: mesa3d package fails to build when BR2_SHARED_STATIC_LIBS=y + 10361: python3 python-config script generates invalid includes + 10501: host-localedef fails to compile on Ubuntu 17.10 + +2017.08.1, Released October 23rd, 2017 + + Important / security related fixes. + + Webkitgtk bumped to the 2.18.x series, fixing a large number + of security issues. + + Defconfigs: galileo: fix ext4 related kernel config, bump + kernel for gcc 6.x compatibility, enable wchar support for + grub2. wandboard: correct rootfs offset + + support: Ensure gzip compression level 6 is used for git + tarballs. check-bin-arch: Correctly handle (ignore) symbolic + links. check-rpath: Also handle PIE binaries + + External toolchain: Correctly handle glibc Buildroot + toolchains built with merged /usr + + musl: fix ARMv4 build with binutils 2.27.51+, fix for + CVE-2017-15650 + + Updated/fixed packages: apache, augeas, bind, bluez5_utils, + busybox, bzip2, cmake, dnsmasq, ejabberd, gcc, git, go, ffmpeg, file, + flashrom, gd, gdk-pixbug, gnupg2, hostapd, ifupdown-scripts, + imagemagick, iucode-tool, kernel-module-imx-gpu-viv, lame, + libarchive, libcurl, libffi, libidn, libmbim, libnspr, libnss, + libressl, librsync, libsoup, libxml2, libzip, mbedtls, musl, + netplug, nginx, openvpn, pkgconf, poppler, proxychains-ng, + qemu, qt, rpi-userland, syslog, ruby, samba4, softether, + sqlite, strongswan, subversion, supertuxkart, supervisor, tcpdump, + tor, unrar, urq, vboot-utils, webkitgtk, wpa_supplicant, xen, + xmlstarlet, xlib_libXfont, xlib_libXfont2, + xserver_xorg-server, zsh + +2017.08, Released September 1st, 2017 + + Minor fixes. + + Toolchain: Don't allow internal toolchain builds for MIPS + M6201/P6600, as support for these are not yet in mainline GCC. + + Updated/fixed packages: bcusdk, connman, dialog, dnsmasq, + gnupg, grub2, iostat, iucode-tool, libgcrypt, libkcapi, + libphidget, libv4l, linux-tools, mediastreamer, minidlna, + nss-pam-ldapd, nvidia-driver, qt-webkit-kiosk, rpcbind, squid, + transmission, vde2, vim + + Updated/fixed defconfigs: + + Removed packages: simicfs. + + Issues resolved (http://bugs.buildroot.org): + + #10261: Grub2 fails to build for x86_64 + +2017.08-rc3, Released August 23rd, 2017 + + Fixes all over the tree. + + Updated/fixed packages: alsa-lib, alsa-utils, cc-tool, + dbus-cpp, e2fsprogs, elf2flt, faad2, fakeroot, gcc, git, gpsd, + gst1-validate, kvmtool, libconfuse, libepoxy, librsync, + libspatialindex, libunwind, linux, linux-headers, lua, + mariadb, mesa3d, mtd, openocd, python3, syslinux, sysvinit, + whois, xen, zmqpp. + + Updated/fixed defconfigs: ci20, socrates_cyclone5, + toradex_apalis_imx6. + + Removed defconfig: Armadeus APF9328. + + skeleton-* packages introduced in -rc1 have been renamed to + skeleton-init-* instead. + + Issues resolved (http://bugs.buildroot.org): + + #10141: Squashfs extended attribute failures + +2017.08-rc2, Released August 11th, 2017 + + Fixes all over the tree. + + Updated/fixed packages: bind, dbus, erlang-p1-xml, faad2, + ficl, gcc, gdb, glibc, jack2, libcurl, linux, linux-headers, + lua, mutt, nvme, qt5base, skeleton-common, snappy, stella, + swupdate, uclibc, valgrind, webkitgtk. + + Updated/fixed defconfigs: beaglebone_qt5, minnowboard_max, + nanopi_m1{, _plus}, olimex_a20_olinuxino_lime, qemu_sparc, + qemu_sparc64. + + The cmake-package infrastructure for host packages has been + fixed to not incorrectly detect target packages through + pkg-config. + + Issues resolved (http://bugs.buildroot.org): + + #9926: systemd-resolved.service: Failed at step NAMESPACE (systemd 233) + #10021: libqeglfs-viv-integration.so file is missing for qt5 on armv7 + #10026: lua-5.3.4: fix lua linker error in swupdate + #10146: package/skeleton-common fix recursive variable + #10156: glibc compilation fails for X86 32bits (i386) + #10201: toolchain-wrapper.c:192: (error) Memory leak: + #10221: Buildroot Support + +2017.08-rc1, Released August 2nd, 2017 + + Infrastructure: + + - The skeleton package has been split into multiple packages: + skeleton-sysv (when Busybox or SysV init are used), + skeleton-systemd (when systemd is used), skeleton-none (when + no init system is used) and skeleton-custom (when a custom + skeleton is used). Those packages, except skeleton-custom, + share common logic and data in a new package called + skeleton-common. The skeleton package becomes a virtual + package. This change allows to generate a filesystem that is + compliant with systemd expectations. + + - Support for using a read-only filesystem with systemd has + been fixed. + + - Major revamp of the gettext handling, with user-visible + effect: + + - prior to this revamp, when BR2_ENABLE_LOCALE=y, each + package could decide to enable or not NLS support. When + BR2_ENABLE_LOCALE was disabled, NLS support was forced off + by passing --disable-nls to packages. + + - after this revamp, a new BR2_SYSTEM_ENABLE_NLS option + controls whether NLS support should be enabled or not in + packages. This option defaults to disabled, which means + that now, NLS support is by default disabled in all + packages. + + Therefore, if you need NLS support in packages, you must now + explicitly enable the BR2_SYSTEM_ENABLE_NLS option. + + - The host directory no longer has a usr/ component. This + makes it much more natural to use that directory as an + externally used toolchain. For compatibility with existing + scripts, a usr -> . link is still added. + + - Hashes are now checked on tarballs by Buildroot when a + package is sourced from a Git repository. + + - Patches are no longer being downloaded from Github, since + auto-generated patches could change over time, and break + hashes. All patches that were downloaded from Github are now + stored in their respective package directories. + + - Hash files in packages can now contain hashes for the + license files contained in the package source code. This + allows to detect changes in such license files. + + - Binaries in $(TARGET_DIR) are now cleaned up from invalid + RPATHs at the end of the build. + + - A new "make sdk" target prepares $(HOST_DIR) to be + relocatable: turns RPATHs in host binaries into relocatable + ones, removes bogus RPATHs from staging binaries/libraries, + and provides a relocate-sdk script that can be executed to + relocate the SDK after installation. + + - Addition of utils/genrandconfig which generates a random + configuration based on a set of pre-defined toolchain + configurations (support/config-fragments/autobuild/) and a + random selection of packages. It is now used by the + autobuilders to generate the random configurations. + + Filesystems: + + - ext2/3/4 filesystems are now generated using mkfs.ext from + e2fsprogs instead of using genext2fs. + + Architecture: + + - Addition of support for ARM big.LITTLE variants + - Improved MIPS support, with options to select NaN encoding + and FP32 mode. + + Toolchain: + + - Switch to gcc 6.x as the default gcc version, add support + for gcc 7.x, remove support for gcc 4.8 + - Switch to binutils 2.28 as the default binutils version, add + support for binutils 2.29, remove support for binutils 2.26 + - Support added for gdb 8.0 + - uClibc-ng bumped to 1.0.26 + - CodeSourcery toolchains for x86 and SuperH have been + removed, they were using a too old glibc version + (2.17). External toolchains with glibc 2.17 or earlier are + no longer supported. + - The version selection in the glibc package has been + removed. Like musl and uClibc-ng, we now use the latest + glibc version. + - Improved support for Xtensa toolchain overlays, which can + now be downloaded. + + Tools: + + - Numerous improvements to the runtime test infrastructure + - Tests are now executed by Gitlab CI on a regular basis + - Tools that are directly useful to the user have been moved + from support/scripts/ to utils/: brmake, check-package, + get-developers, scancpan, scanpipy, size-stats-compare, + test-pkg. + + New defconfigs: A13 Olinuxino, Engicam platforms (i.CoreM6 + Solo/Dual/DualLite/Quad, RQS SOM, GEAM6UL SOM, Is.IoT MX6UL + SOM), Nano Pi M1 (Plus), OrangePi Zero and Plus. + + New packages: azure-iot-sdk-c, cracklib, dt-utils, easy-rsa, + erlang-jiffy, erlang-p1-oauth2, erlang-p1-xmpp, + ifupdown-scripts, irrlicht, kodi-inputstream-adaptive, + kodi-inputstream-rtmp, kvazaar, let-me-create, libloki, + libpwquality, libressl, libspatialindex, libva-utils, + linuxconsoletools, linuxptp, luaossl, lua-sdl2, lua-stdlib, + lsscsi, paxtest, pcre2, pixz, python-asn1crypto, + python-backports-shutil-get-terminal-size, python-bcrypt, + python-cheroot, python-h2, python-hpack, python-hyperframe, + python-hyperlink, python-ipython-genutils, python-pathlib2, + python-pickleshare, python-priority, python-portend, + python-scandir, python-systemd, python-tempora, + python-traitlets, python-typepy, qt5virtualkeyboard, + ratpoison, rauc, refpolicy, rhash, sdl2_mixer, sdl2_net, + xr819-xradio, zstd + + Removed packages: cloog, input-tools, mke2img + + Issues resolved (http://bugs.buildroot.org): + + #7892: systemd-journald is broken + #9341: avahi-utils does not compile with uClibc + libglib2 + #9441: Link BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY to + BR2_ENABLE_DEBUG + #9746: ext4 image generated by Buildroot is not working + properly with U-Boot + #9886: Build fails with "unexpected EOF while looking for + matching `"'" if PATH contains a newline + #9891: parted 3.1 => 3.2? + #9911: qt5 does not build on sparc + #9916: qt5 does not build on + arm-buildroot-linux-uclibcgnueabihf for ARMv8 cores + #9936: Host QEMU does not build with SDL support because of + pkg-config + #9941: nodejs option disappears for arm + #9951: SCANCPAN failure + #9966: util-linux-2.30/.stamp_built' failed + #9976: License file for package 'rtl8821au' incorrect + #9991: SGX Error implicit declaration of function + ‘dmac_map_area’ + #10011: wget does not work from Buildroot + #10036: Buildroot builds Raspbian Jessie headless image + presenting incorrect prompt + #10051: make: *** No rule to make target + 'raspberrpi3_defconfig'. Stop reported with Buildroot + v2017.05.1 + #10056: No .config file was produced in /buildroot folder + #10061: gcc5.4 buildroot toolchain for powerpc libsanitizer + failure + #10071: fakeroot: replace hard-coded paths in post install + #10076: Makefile:4113: recipe for target 'all-gcc' failed + #10091: gcc7.1 does not build with graphite support due to old + isl + #10121: webkit without the multimedia option causes build + error + +2017.05.2, Released July 27th, 2017 + + Important / security related fixes. + + Webkitgtk bumped to the 2.16.x series, fixing a large number + of security issues. + + host-aespipe compile fix for Debian/Gentoo/Ubuntu toolchains + which default to PIE mode. + + Updated/fixed packages: aespipe, apache, bind, binutils, + busybox, ccache, collectd, dieharder, efibootmgr, efivar, + expat, ffmpeg, gcc, heimdal, iproute2, irssi, libglib2, + libmemcached, libosip2, libtirpc, libxml-parser-perl, + linux-fusion, linux-zigbee, mpg123, orc, pcre, php, protobuf, + pulseaudio, python-setproctitle, qt5base, rpi-firmware, + samba4, syslinux, systemd, spice, tcpdump, tiff, uboot-tools, + webkitgtk, x265, xserver_xorg-server, xvisor + + Issues resolved (http://bugs.buildroot.org): + + #10061: gcc5.4 buildroot toolchain for powerpc libsanitizer... + +2017.05.1, Released July 4th, 2017 + + Important / security related fixes. + + Update support/scripts/scancpan to use METACPAN v1 API as v0 + has been shutdown. + + Update support/scripts/mkusers to handle setups where + /etc/shadow is a symlink. + + External toolchain: Don't create musl dynamic loader symlink + for static builds. + + Setlocalversion: Correct detection of mercurial revisions for + non-tagged versions. + + Defconfigs: at91sam9x5ek_mmc: workaround boot rom issue. + + Updated/fixed packages: apache, automake, bind, botan, c-ares, + dhcp, expat, fcgiwrap, gcc, gdb, gesftpserver, glibc, glmark2, + gnutls, gst1-plugins-bad, imagemagick, imx-uuc, intltool, + iperf, ipsec-tools, irssi, kmod, libcurl, libgcrypt, libmad, + libnl, lugaro, mosquitto, mpg123, ncurses, nodejs, ntp, + openssh, openvpn, pngquant, python-simplegeneric, qt5base, + qt5multimedia, rtl8821au, socat, spice, systemd, tor, trinity, + tslib, vlc, x264, xen, xlib_libxshmfenc, xserver_xorg-server + + Issues resolved (http://bugs.buildroot.org): + + #9976: License file for package 'rtl8821au' incorrect + +2017.05, Released May 31st, 2017 + + Minor fixes. + + External toolchain: musl dynamic linker symlink for mips-sf + corrected. + + Updated/fixed packages: agentpp, bash, exim, hans, madplay, + qpid-proton, rtl8188eu, snmppp, stm32flash, strongswan, sudo, + xen + + Issues resolved (http://bugs.buildroot.org): + + #9906: genimage: Disk full + +2017.05-rc3, Released May 30th, 2017 + + Fixes all over the tree. + + ARC toolchain bumped to 2017.03 + + Runtime testing improvements and cleanups. + + Updated/fixed packages: acpica, armadillo, audiofile, c-icap, + cppcms, dhcp, docker-engine, dropbear, elfutils, erlang, + fbgrab, ffmpeg, flashrom, ftop, gnutls, google-breakpad, + keepalived, kodi, libcdio, libepoxy, libev, libminiupnpc, + libqmi, libtasn1, libv4l, mariadb, mono, mosh, mosquitto, + mxml, ntp, opencv, openpowerlink, oracle-mysql, popt, + pulseview, python-enum34, rabbitmq-c, redis, samba4, stella, + xen + + Removed packages: firejail, ola + + Issues resolved (http://bugs.buildroot.org): + + #9871: fbgrab 1.3 won't build with BR2_REPRODUCIBLE set + #9876: aarch64 support with gcc 4.8 toolchain + #9896: host-gcc-initial error downloading because incorrect URL + +2017.05-rc2, Released May 17th, 2017 + + Fixes all over the tree. + + ARC toolchain bumped to 2017.03-rc2 + + Updated/fixed packages: bluez_utils, boost, clamav, daemon, + efibootmgr, efl, espeak, expedite, faketime, ffmpeg, fxload, + git, gpsd, kvm-unit-tests, libcdio, libv4l, lua, mke2img, + mpir, mpv, odroid-scripts, openblas, opencv3, openvpn, php, + postgresql, protobuf, qt5declarative, qwt, radvd, rpcbind, + rtmpdump, strongswan, sudo, ltp-testsuite, uclibc-ng-test, + vlc, x11vnc, xfsprogs + + Issues resolved (http://bugs.buildroot.org): + + #9796: source-check broken for Git downloads + #9866: BASE_DIR usage + +2017.05-rc1, Released May 8th, 2017 + + Fixes all over the tree and new features. + + Infrastructure: + + - Installed binaries are now checked for correct architecture + to catch natively built binaries or binaries built for other + architecture variants. + + - Luarocks infrastructure improvements to extraction handling, + support for upstream name != Buildroot package name. + + - 'make printvars' output format has changed to make it easier + to use in scripts. It now has options to quote the variables + and to show the expanded/unexpanded values. + + - Automatic ext2 rootfs size calculation has been removed. The + logic was not working working reliable in all setups as it + depends on the host filesystem behaviour, so instead now the + size has to be specified explicitly (defaults to 60MB). + + - The git download infrastructure now ensures that GNU format + tar files are created. + + - Fixed a variable clashing issue in the mkusers script with + internal bash variables. + + - Fakeroot now links against libacl to fix issues on + distributions using acls. + + - Correct permissions for /dev/pts/ptmx when systemd is used + with recent glibc versions. + + - br2-external: Improve error reporting. + + - A wrapper script for genimage has been added in + support/scripts/genimage.sh for easy use of genimage from + post-image scripts. + + - A script to check for common style issues in new packages + before submitting has been added in support/scripts/check-package + + - Defconfigs are now tested by gitlab-CI instead of Travis: + https://gitlab.com/buildroot.org/buildroot + + - Infrastructure for runtime testing has been added to + support/testing + + Toolchain: + + - External linaro toolchains updated to 2017.02, ARC toolchain + updated to 2017.03-rc1, NIOSII CodeSourcery to 2017.05 + + - A number of fixes and improvements to the external toolchain + handling, including C library detection, multilib and ld.so + handling + + - Glibc 2.25 and uClibc-ng 1.0.24 added, wordexp support enabled + for uClibc-ng + + - Binutils 2.28 added and default changed to 2.27 + + + Architectures: + + - Support for the C-SKY architecture has been added. + + + License handling: + + - The package license markings for legal info now uses the + SPDX short identifiers for the license string where possible. + + - License info has been improved / added for a number of packages. + + + Misc: + + - Cmake 3.7.x installed on the host is no longer ignored as a + workaround for the RPATH issues has been implemented. + + - Docker-engine can now be built statically on an otherwise + dynamic linked build for docker-in-docker setups. + + - U-Boot now supports out-of-tree device trees, similar to + Linux + + - Nodejs 0.10.x support (and with it, support for -source-check fixed for packages from git. + + External toolchain: musl dynamic linker symlink for mips-sf + corrected. + + Updated/fixed packages: armadillo, audiofile, bash, + bluez_utils, cppcms, dbus, dhcp, dropbear, efibootmgr, efl, + elfutils, faketime, fbgrab, flashrom, ftop, gdb, git, + google-breakpad, gpsd, hans, kvm-unit-tests, kyua, libev, + libmicrohttpd, libminiupnpc, libtasn1, libubox, ltp-testsuite, + lua, madplay, mariadb, mono, mosquitto, mxml, ntp, + nvidia-driver, openblas, openvpn, oracle-mysql, picocom, popt, + postgresql, pulseview, qt5base, qwt, rabbitmq-c, redis, + rpcbind, rtmpdump, samba4, strongswan, sudo, vlc + + Issues resolved (http://bugs.buildroot.org): + + #9796: source-check broken for Git downloads + #9871: fbgrab 1.3 won't build with BR2_REPRODUCIBLE set + +2017.02.2, Released May 1st, 2017 + + Important / security related fixes. + + Use HTTPS for the Codesourcery external toolchains as the HTTP + URLs no longer work. + + Updated/fixed packages: bind, busybox, dovecot, freetype, + ghostscript, glibc, granite, hiredis, icu, imagemagick, + gst-plugins-base, gst1-plugins-base, libcroco, libcurl, libnl, + libnspr, libnss, libsamplerate, libsndfile, libunwind, + minicom, mplayer, mpv, nodejs, python-django, python-pyyaml, + python-web2py, samba4, syslinux, systemd, tiff, trinity, + uboot, wireshark, xen + + Issues resolved (http://bugs.buildroot.org): + + #9791: Python searches for packages in the user site directory + +2017.02.1, Released April 4th, 2017 + + Important / security related fixes. + + Fix a variable clashing issue in the mkusers script with + internal bash variables. + + Improve external toolchain version detection. + + Correct permissions for /dev/pts/ptmx when systemd is used + with recent glibc versions. + + Fix python module name clash for graph-depends. + + Fakeroot now links against libacl to fix issues on + distributions using acls. + + Ensure that the git download infrastructure creates GNU format + tar files. + + br2-external: Improve error reporting. + + Updated/fixed packages: acl, apr, audiofile, busybox, cairo, + dbus-cpp, dbus-glib, dbus-triggerd, domoticz, elfutils, + fakeroot, filemq, fmc, gdb, git, gnutls, gst-ffmpeg, + gst1-plygins-bad, harfbuzz, htop, imagemagick, jasper, libcec, + libiio, libplatform, librsvg, libselinux, libsidplay2, libsoc, + libwebsockets, libxkbcommon, linux-firmware, logrotate, + lpt-testsuite, lttng-libust, mariadb, mbedtls, memcached, + mesa3d, mpd, mplayer, nbd, ncftp, ntp, openssh, opentyrian, + pcre, perl-gd, python, qt5base, rpi-userland, rpm, samba4, + skalibs, slang, sngrep, squashfs, syslog-ng, taglib, + tcpreplay, tor, upmpdcli, wget, wireshark, + xdriver_xf86-video-vmware, xlib_libXv, zmqpp + + Issues resolved (http://bugs.buildroot.org): + + #9456: mkusers script bash errors + +2017.02, Released February 28th, 2017 + + Minor fixes, mainly fixing autobuilder issues. + + Don't use cmake 3.7.x from the build host as it is also + affected by the RPATH handling issues, and instead build our + own if needed. + + Updated/fixed packages: assimp, classpath, genimage, mplayer, + mpv, openocd, python-libconfig, qt5base, qt5quickcontrols, + vlc, xterm + +2017.02-rc3, Released February 26th, 2017 + + Fixes all over the tree. + + Cmake reverted to version 3.6.3 to workaround regressions + related to RPATH handling. + + Updated/fixed packages: bctoolbox, berkeleydb, binutils, + btrfs-progs, classpath, directfb, glibc, gstreamer1, + gst1-plugins-{base,good,bad,ugly}, gst1-libav, + gst1-rtsp-server, gst1-validate, gst-omx, htop, libcurl, + libepoxy, libimxvpuapi, libpcap, libuv, ncurses, openssh, + oracle-mysql, poco, python, qt5base, qt5webkit, sslh, synergy, + trousers, uclibc-ng-test, util-linux, vlc, xfsprogs + + Issues resolved (http://bugs.buildroot.org): + + #9251: Shared C++ libraries for Microblaze results in Segmentation... + #9456: mkusers script bash errors + #9506: Collectd 5.7.0 fails to build with libcrypt + #9581: VagrantFile provisioning step fails due to issue with grub-pc + #9586: usbmount: usbmount slows down the system... to a state of... + #9616: CMake host packages cannot provide CONF_ENV + #9641: Need raptor package installed in staging + #9671: stunnel build error + +2017.02-rc2, Released February 20th, 2017 + + Fixes all over the tree. + + Support for SOURCE_DATE_EPOCH in the toolchain wrapper for + older gcc versions for reproducible builds has been + (temporarily) reverted because of licensing compatiblity + concerns. + + Defconfigs: SD card generation fix for the Udoo Neo board + + Infrastructure to handle .lz compressed tarballs added, and + affected packages updated to use it. + + Updated/fixed packages: bctoolbox, bind, canelloni, + cbootimage, ccache, classpath, cups, dbus, ddrescue, directfb, + ed, erlang, gcc, gdb, glmark2, gstreamer, gstreamer1, hiredis, + kmod, kmsxx, lcdapi, libasplib, libgpiod, libnss, libraw, + libv4l, mesa3d-headers, mosquitto, mpd, mpv, musl, ntfs-3g, + ocrad, openswan, postgresql, qt5base, qt5quickcontrols, redis, + riemann-c-client, samba4, sunxi-mali, tcping, trousers, + uclibc, util-linux, vim, wavpack, wget, wiringpi, xfsprogs, + xserver_xorg-server + + Issues resolved (http://bugs.buildroot.org): + + #8941: Valgrind fails to build with stack protection turned on + #9291: perl: SysV message queues not configured, even if available + #9651: libxcb-1.12 built Error + #9656: util-linux: schedutils doesn't build on target w/o enabl... + #9666: qt5quickcontrols install fails + +2017.02-rc1, Released February 11th, 2017 + + Fixes all over the tree and new features. + + Infrastructure: + + - numerous improvements to support reproducible builds + + - new waf-package package infrastructure to support packages + that use the Waf build system. 6 packages converted to + this infrastructure. + + - add option _PREFER_INSTALLER to the perl package + infrastructure + + Architecture: + + - add support for the OpenRISC CPU architecture + + - merge description of the ARM and ARM64 options, and add + support for selecting a specific ARM64 core + + Toolchain: + + - major rework of the external toolchain support. It is now + split into several packages, one per external toolchain, + and a common infrastructure. + + - important fix for musl to prevent a conflict between musl + and kernel headers (fixes the build of numerous packages + with musl) + + - uClibc-ng bumped to 1.0.22, and therefore enable uClibc + for ARM64, mips32r6 and mips64r6 + + - add gdb 7.12.1, and switch to gdb 7.11 as the default + + - Linaro toolchains updated to 2016.11, ARC toolchain + components updated to arc-2016.09, MIPS Codescape + toolchains bumped to 2016.05-06, CodeSourcery AMD64 and + NIOS2 toolchains bumped + + - remove Analog Devices toolchain for the Blackfin + architecture, remove pre-built musl toolchains from + musl.codu.org + + New defconfigs: Freescale i.MX23EVK, Qemu OpenRISC emulation, + Qemu NIOS2 emulation, Grinn chiliBoard, Freescale i.MX6Q + SabreSD, BeagleBoard X15, OrangePi One, ARC HS38 HAPS + + New packages: angular-websocket, aubio, bctoolbox, darkhttpd, + ddrescue, easydbus, fakedate, git-crypt, hiredis, ifenslave, + jsmn, libgpiod, libgsm, linux-syscall-support, mariadb, mimic, + nginx-dav-ext, nmon, opkg-utils, policycoreutils, + pru-software-support, python-arrow, python-attrs, + python-babel, python-bitstring, python-chardet, + python-constantly, python-flask-babel, python-gunicorn, + python-incremental, python-jsonschema, python-logbook, + python-markdown2, python-mbstrdecoder, python-mutagen, + python-pathpy, python-pudb, python-pyqrcode, + python-pytablereader, python-setuptools-scm, python-sh, + python-toml, python-vcversioner, python-whoosh, + raspberrypi-usbboot, riemann-c-client, rtl8723bs, skalibs, + sslh, sngrep, ti-cgt-pru, uclibc-ng-test, udpxy, uhttpd, + upower, ustream-ssl, waf, xlib_libXfont2 + + Removed packages: perl-db-file, snowball-hdmiservice, + snowball-init + + Tooling: addition of a test-pkg script to help contributors + build test their package. + + Issues resolved (http://bugs.buildroot.org): + + #8946: Valgrind fails to build with stack protection turned on + #9461: odroidc2 - toolchain Linaro AArch64 2016.11 compile error + #9466: VIM_REMOVE_DOCS removes rgb.txt + #9486: xorg-server 1.19 fails to compile for glibc with systemd init (x86_64) + #9501: eudev fails to build with older kernel headers + #9526: Embedded NPM fails to start with "no such file or directory" error + #9541: Platform drivers autoloading from info in device tree does not work + #9546: seems BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS do nothing + #9551: Coreutils fails to build target src/src_libsinglebin_pinky_a-pinky.o + #9566: [kmod] Compilation fails with uclibc + #9571: buildroot fails while building opencv for arm64 platform + #9576: External tree with BR 2016.11 does not work anymore + #9606: xorg-server cannot build for ARM target + +2016.11.3, Released March 9th, 2017 + + Important / security related fixes. + + Updated/fixed packages: bind, dbus, gnutls, imagemagick, + lcms2, libcurl, ntfs-3g, ntp, openssl, php, quagga, redis, + squid, stunnel, tcpdump, vim, wavpack, wireshark, xlib_libXpm + +2016.11.2, Released January 25th, 2017 + + Important / security related fixes. + + A fix for BR2_EXTERNAL trees referenced using relative paths, + which broke in 2016.11. + + Updated/fixed packages: bind, docker-engine, gd, gnutls, go, + imagemagick, irssi, libpng, libvncserver, musl, opus, php, + php-imagick, rabbitmq-server, runc, wireshark, + + Issues resolved (http://bugs.buildroot.org): + + #9576: External tree with BR 2016.11 does not work anymore + +2016.11.1, Released December 29th, 2016 + + Important / security related fixes. + + Updated/fixed packages: apache, cryptopp, docker-engine, + dovecot, exim, gdk-pixbuf, libcurl, libupnp, links, monit, + nodejs, openssh, php, python, python-bottle, samba4, squid, + uboot, vim, wireshark, xorg-server uboot + + Issues resolved (http://bugs.buildroot.org): + + #9466: VIM_REMOVE_DOCS removes rgb.txt + +2016.11, Released November 30th, 2016 + + Minor fixes. + + Updated/fixed packages: bzip2, gcc, jasper, sane-backends, + uboot, uclibc + + Issues resolved (http://bugs.buildroot.org): + + #9451: packages/postgresql/postgresql.mk contains wrong POST... + +2016.11-rc3, Released November 28th, 2016 + + Fixes all over the tree, including a number of security fixes. + + The move from fakeroot to pseudo unfortunately brought a + number of issues. The SELinux issue described in #9386 which + triggered the move to pseudo has been investigated further and + a workaround implemented and the pseudo changes reverted. + + Linux kernel: update default to 4.8.11. + + Defconfigs: Updates/fixes for imx28ek, mx6udoo, imx6ulpico, + olimex a20 olinuxino lime mali, roseapplepi, synopsis aarch64 + vdk, axs101, axs103 and hs38 smd vdk. + + Updated/fixed packages: autossh, chrony, dosfstools, + dtv-scan-tables, e2fsprogs, gcc, gdb, gnuchess, gnuradio, + gpsd, gst1-plugins-bad, gst1-plugins-good, imagemagick, + kvm-unit-tests, libfribi, libuv, mesa3d, mpfr, mplayer, mpv, + ntp, ola, olsr, openblas, openjpeg, openssh, postgresql, + ptpd2python3, qemu, qextserialport, qt5base, quagga, xqwt, + taskd, tiff, tremor, trousers, udisks, uclibc, wireshark, + xapp_xload, xenomai, xmlstarlet + + Issues resolved (http://bugs.buildroot.org): + + #9386: ubinize fails with or without custom config + #9431: A misspelling + #9446: make raspberrypi3_defconfig compilation failure + +2016.11-rc2, Released November 13th, 2016 + + Fixes all over the tree. + + Architecture: add support for MIPS XBurst cores; remove MIPS + support for M5100 cores. + + Updated/fixed packages: mesa3d, lttng-babeltrace, tinyalsa, pseudo, + czmq, libxml2, makedevs, binutils, kvm-unit-tests, libnss, privoxy, + qemu, ser2net, net-tools, ffmpeg, assimp, libmpeg2, ccache, mpv, + libxslt, python, python3, php, valgrind, guile, domoticz, efl, + jasper, kvmtool, go, wget, sane-backends, weston, tinymembench, + strace, openjpeg, lcms2, quota. + + Linux kernel: update default to 4.8.7. + + CMake support: fix cmake wrapper to properly pass NDEBUG flag. + + Filesystems: use a wrapper to pseudo, to better mimick the behaviour + of fakeroot; makedevs no longer breaks of the destination already + exists and is of the correct type/major/minor. + + Defconfigs: a few legacy and broken defconfigs have been removed + because they now fail to build: kb9202_defconfig, mini2440_defconfig, + freescale_p2020ds, qmx6, calao*, atmel_sama5d4ek. Other defconfigs + have been updated: nanopi-neo, olimex_a20_olinuxino_lime_mali, + armadeus_apf51, armadeus_apf28, freescale_imx31_3stack, ci20, + olimex_a20_olinuxino_lime2, atmel_at91sam9260eknf, + atmel_at91sam9rlek, atmel_at91sam9g20dfc, atmel_at91sam9g45m10ek, + atmel_sama5d3xek. + +2016.11-rc1, Released November 3rd, 2016 + + Fixes all over the tree and new features. + + It is now possible to specify multiple BR2_EXTERNAL + directories. The required files in a BR2_EXTERNAL directory + have changed to accomodate this feature. Refer to the + documentation for details of how to update them. External + trees now have a name and a description. Also, it is possible + to override a defconfig in the external tree. + + The default skeleton now uses UID 65534 for the "nobody" + user instead of UID 99, like most distros do. See + https://lwn.net/Articles/695478/ for a complete discussion. + Programs and configuration files that explicitly refer to UID + 99 will have to be updated. + + When the build environment already has a suitable cmake version + (3.1 or later), that one will be used instead of building + host-cmake. This can speed up the build significantly. + + The ExtUtils::MakeMaker perl module is now required in the + build environment. + + An additional check is done during the build that files are + not installed in the output directory within the output + directory. This happens e.g. when the target directory is + contained both in --prefix and in DESTDIR. The build will + terminate with an error message that specifies which package + and which file caused the failure. + + The concept of "deprecated packages" and the BR2_DEPRECATED + option have been removed. Instead, packages are removed + immediately. Packages are only removed when they don't work + for some reason. If you still need a removed package and + you have a solution for the problem(s) that caused the + removal, please contribute it. + + Architecture: support for sh64 removed, improved support for + MIPS core selection. + + Toolchain: support for musl powerpc64le, mips64 and mipsr6 + toolchains, ARC toolchain components updates, gcc 6.x series + bumped to 6.2.0, default binutils version switched to 2.26, + default gcc version switched to gcc 5.x, Linaro toolchains + updated, uclibc-ng bumped to 1.0.19. GCC is now always built + with TLS support. Checking of unsafe compiler options (that + point to host directories) has been extended with -isystem, + -idirafter and -iquote. + + Package infrastructure: new variable $(PKG)_DL_OPTS, addition + of -show-rdepends to list reverse dependencies, and + -graph-rdepends to graph reverse dependencies. Linux tools + are now in a separate linux-tools package instead of in the + kernel build. Fakeroot has been replaced by pseudo. + + CMake support: the toolchainfile.cmake file now provides a + definition of the CMAKE_BUILD_TYPE variable. The + toolchainfile.cmake also no longer forces the compiler/linker + flags defined by Buildroot. + + New defconfigs: WaRP7, Solidrun's MX6 Cubox/Hummingboard, + TS-4900, Grinn's liteBoard, Udoo MX6Q/DL, Qemu ARM noMMU, + BeagleBone Qt5 demo, Digilent Zybo, FriendlyARM Nanopi NEO. + + New packages: arm-trusted-firmware, amd-catalyst, atop, aufs, + aufs-util, fwts, gst1-rtsp-server, libglob, libite, mfgtools, + mksh, motion, paho-mqtt-c, php-amqp, pseudo, python-couchdb, + python-crcmod, python-cssutils, python-docutils, + python-futures, python-mwclient, python-mwscrape, + python-mwscrape2slob, python-pyelftools, python-pyicu, + python-pylru, python-pyqt5, python-requests-toolbelt, + python-simpleaudio, python-slob, rabbitmq-server, shapelib, + vdr, vdr-plugin-vnsiserver, vexpress-firmware, xvisor, iio and + gpio linux tools. + + Removed packages: binutils 2.24, fakeroot, gcc 4.7, ipkg, + kodi-addon-xvdr, libgail, sstrip, torsmo, webkit, webkitgtk24, + wvdial, wvstreams. + + Documentation: the list of packages that was present in the + Buildroot manual has been removed. + + Legal info: the "licenses.txt" file that concatenates all + license texts is no longer generated - it was not considered + useful. The manifest.csv contains an empty cell instead of + "not saved" when no license file is available. + + Other: addition of a DEVELOPERS file listing developers taking + care of packages or architectures. + + Issues resolved (http://bugs.buildroot.org): + + #7802: host-python build hangs compiling getbuildinfo.o + #8206: mplayer uses host xorg development files + #8516: mkcubiecard.sh uses outdated sfdisk switch -D + #8536: Building sudo with PAM results in unusable sudo + #8646: check-host-rpath script returns false positives when rpath + contains symlink + #8696: xdriver_xf86-input-mouse install header files in target + directory + #8811: rp-pppoe - generated scripts commands use HOST pathnames, + not necessarily TARGET + #8846: Orphaned/missing toolchain borks eclipse plugin + #8856: python tornado runtime wasn't met on buildroot 2016.02 + #8901: gcc failes to build if fortran is enabled + #8916: LDFLAGS pass to openssh + #8941: "ls" of an NFSv4 share only works when pumped through strace + #8946: Valgrind fails to build with stack protection turned on + #9021: Kodi - Broken: Illegal instruction (core dumped) + #9096: rootfs.ubi not created + #9111: glibc 2.23: libmvec.so not copied + #9176: minnowboard : USB not mounted + #9196: raspberry pi 3 default build seem broken + #9201: Permission denied make: *** [core-dependencies] Error 126 in + Buildroot-2015.08.1 + #9216: log4cpp package build fails to build within install + #9221: Kodi needs "Python .py and .pyc support" otherwise it crashes when + pressing buttons. + #9229: Firefly boot fails with: "failed to find part:boot" + #9256: [Config file] New device: Odroid-U2/U3 + #9296: Buildroot Fails on applying patches + #9301: U-boot fails to build with default zynq_zed_defconfig configuration + #9316: U-boot fails to build if libssl-dev is not installed + #9321: Vanilla libcrypt++ v5.6.3 doesn't allow to work Nvidia Tegra's + flash utility (tegrarcm) + #9326: Odroid-C2 build results in non-bootable image + #9336: Improve iconv support for external toolchain based builds + #9356: gdb package + #9366: no link rootfs.ext4 -> rootfs.ext2 + #9371: openssl: download failes with "Only allow downloads from primary + download site" + local server + #9381: check-host-rpath issues + #9386: ubinize fails with or without custom config + +2016.08, Released September 1st, 2016 + + Minor fixes. + + Toolchain: ARC tools updated to arc-2016.09-eng010. + + Updated/fixed packages: libshout, luajit, mpd, mplayer + + Issues resolved (http://bugs.buildroot.org): + + #7520: CodeSourcery toolchain ARM: C++11 std::exception_ptr.. + #8341: Getting EGL Error: Could not create the egl surface:.. + #9121: gst1-imx for i.MX6 compile failed, cannot find PXP, .. + +2016.08-rc3, Released August 29th, 2016 + + Fixes all over the tree. + + Toolchain: C++ support for the internal blackfin toolchain + re-enabled. + + Architecture: Default to bf532 CPU variant for blackfin, + Fix flat one memory region support for m68k and disable flat + seperate data support because of compatibility issues. + + Defconfigs: Minnowboard and Raspberrypi: Fix errors with + post-build scripts when systemd is used. + Zynq microzed/zc706/zed: Fix u-booot configuration. + + netbsd-queue package extended and renamed to + musl-compat-headers. With this, a number of musl compatibility + patches are no longer needed. + + Updated/fixed packages: aircrack-ng, android-tools, babeld, + bcusdk, binutils, boa, busybox, connman, cpupower, + docker-engine, domoticz, elf2flt, ffmpeg, fwup, gcc, + glib-networking, gnupg, hplip, igd2-for-linux, imagemagick, + imx-uuc, iputils, jack2, kismet, kmsxx, libaio, libamcodec, + libconfuse, libffi, libfreeimage, libgcrypt, libgpg-error, + libiio, libraw, libsepol, libserialport, libxmlrpc, linknx, + linux-pam, lirc-tools, lldpd, logrotate, lshw, musl, ncurses, + neon, nettle, norm, ntfs-3g, openblas, openmpi, openswan, + pinentry, pixman, protobuf, python-meld3, qlibc, qt, qt5base, + quagga, rpcbind, rt-tests, runc, sane-backends, sconeserver, + squeezelite, stella, tftpd, tinycbor, tinydtls, trace-cmd, + trousers, tstools, uboot-tools, uclibc, ulogd, ustr, vlc, + webkitgtk, wireshark, xdriver_xf86-video-intel + + Issues resolved (http://bugs.buildroot.org): + + #9101: Error on support/download/git with system git older than 1.8.4 + #9181: Compiling linux kernel fails if BR2_LINUX_KERNEL_TOOL_CPU.. + +2016.08-rc2, Released August 17th, 2016 + + Fixes all over the tree. + + Toolchain: disable broken C++ support for internal blackfin + toolchains, ARC toolchain bumped to arc-2016.09-eng008 (GCC 6) + to fix various issues. + + System: Zoneinfo is available for the musl C library as well. + + Updated/fixed packages: am33x-cm3, axel, barebox, bdwgc, + blktrace, cairo, dante, enlightenment, fbterm, ffmpeg, flex, + fontconfig, gcc, gmp, gnuplot, gnuradio, gst1-imx, hidapi, + inotify_tools, iproute2, kmsxx, lftp, libaio, libcofi, + libical, libpjsip, libsidplay2, libunwindow, libxml2, + linux-zigbee, lttng-libust, mpv, mtd, ncdu, netplug, ntp, + openblas, openipmi, owfs, php, poco, procps, qt, quota, + sg3_utils, spidev_test, systemd-bootchart, thrift, + uboot-tools, uclibc, webrtc-audio-processing, wayland, weston, + xdriver_xf86-video-savage, xserver_xorg-server, xen + + Issues resolved (http://bugs.buildroot.org): + + #9136: make graph-size fails with "ValueError: too many values to.. + #9151: qt: fix build with ALSA >= 1.1.x + #9156: qt: Fix missing runtime Qt3Support dependency + #9161: modsetting patch not applied to xserver 1.18.4 + #9166: Missing overlays directory in VFAT image for raspberry pi 3 + +2016.08-rc1, Released August 6th, 2016 + + Fixes all over the tree and new features. + + Toolchain: Fortran support added. eglibc support removed, musl + support no longer experimental. Blackfin and Microblaze + support for internal uClibc-ng toolchain, m68k/coldfire + improvements. The check for unsafe (build host) directories + access (/usr/include and /usr/lib) is now enabled by default. + Unused locales are now purged by default to save space (and + the default list of locales shrunk). The option to control + this has now moved from the toolchain menu to system + configuration. + + Legal info improvements: sources are now hardlinked instead of + copied if possible to save space. Patches and extra downloads + are also saved. + + An experimental configuration knob (BR2_REPRODUCIBLE) has been + added to make the builds more reproducible (E.G. less + differences in the binary output between builds of the same + configuration). This is still work in progress. + + An option to execute a custom script inside the fakeroot + environment used to the generate the filesystem (E.G. to tweak + permissions or similar) has been added. + + Git support now supports git submodules if + _GIT_SUBMODULES is enabled. + + Hash files for integritry validation have been added for all + packages. + + Scanpypi utility to help creating packages from the Python + package index (pypi) has been added. + + The makedevs utility now has support for adding file + capabilities using extended attributes. + + New defconfigs: Arcturus uCP1020, Atmel sama5d{2,3,4} xplained + development configs, Blackfin GDB simulator, Linksprite + pcDuino, Minnow Board Max graphical demo, NXP i.MX25 PDK, + i.MX51 EVK, i.MX6UL Pico, i.MX7 sabresd, QEMU MIPS32r6{,el} and + MIPS64r6{,el} malta, Roseapple Pi, Samsung Snow chromebook, + Toradex Apalis i.MX6 COM, TS-4800, x86-64 PC BIOS and EFI + demos. A number of defconfigs have been updated and extended + to generate SD card images. Synopsys HS38 VDK defconfig removed. + + New packages: 4th, acpica, acpitool, alljoyn, alljoyn-base, + alljoyn-tcl, alljoyn-tcl-base, argparse, babeld, batman-adv, + circus, dante, docker-containerd, docker-engine, domoticz, + efibootmgr, efivar, ficl, fwup, gsettings-desktop-schemas, + gtksourceview, gupnp-dlna, gupnp-tools, igd2-for-linux, + jemalloc, kmsxx, lapack, lft, libaacs, libamcodec, libbdplus, + libcoap, libdvdcss, libebur128, libfastjson, libminiupnpc, + libnatpmp, libpqxx, libuio, libvdpau, log4cpp, minissdpd, + mxsldr, nginx-nasxi, nginx-upload, ninja, nodm, odroid-mali, + odroid-scripts, omxplayer, openblas, openmpi, openzwave, + p7zip, pdbg, python-argh, python-dataproperty, + python-dateutil, python-dialog3, python-dicttoxml, + python-dominate, python-engineio, python-flask-jsonrpc, + python-flask-login, python-humanize, python-pathtools, + python-pathvalidate, python-pillow, python-prompt-toolkit, + python-pytablewriter, python-pytz, python-scapy3k, + python-sdnotify, python-socketio, python-tomako, + python-ubjson, python-u-msgpack, python-watchdog, + python-wcwidth, python-xlrd, python-xlsxwriter, + python-xlutils, python-xlwt, rs485conf, runc, sdl2_gfx, + sdl2_image, sdl2_ttf, shellinabox, sphinxbase, stella, + supertuxkart, systemd-bootchart, tekui, terminology, tinycbor, + tinydtls, ti-sgx-demos, ti-sgx-km, ti-sgx-um, tunctl, wavemon, + wiringpi, xen + + Deprecated packages: ipkg, sstrip + + Removed packages: sunxi-mali-prop + + Issues resolved (http://bugs.buildroot.org): + + #8931: segment fault when compile argp-help.c using aarch64-bu... + #8966: eglfs error. buildroot don't compile the library libeglfs.so + #8971: build for beaglebone fails + #8986: qt5imageformats fails to build on AArch64 + #8991: grub2 fails to compile + #9001: Nodejs option not available + #9006: gcc with c++ support v4 and v5 fail to compile on fedora 24 + #9016: arceb-buildroot-linux-uclibc ld uses incorrect default format + #9066: 8139TOO - faulty behaviour + #9086: Syntax Error (missing ")" in boot/uboot/uboot.mk on line 203) + #9091: U-Boot fails to boot with large ramdisk + +2016.05, Released May 31st, 2016 + + Minor fixes. + + External toolchain: Fix for symlink handling when copying + links to target. + + Updated/fixed packages: gcc, grantlee, gst-ffmpeg, + ipsec-tools, iptraf-ng, libcurl, libdrm, libsigsegv, ltris, + lttng-babeltrace, mbedtls, mesa3d, moarvm, mplayer, mtools, + net-tools, openpowerlink, pulseview, rpm, tinyalsa, + xdriver_xf86-video-fbturbo, xserver_xorg-server + +2016.05-rc3, Released May 26th, 2016 + + Fixes all over the tree. + + Tweaks for SSP handling for external toolchains. + + Updated/fixed packages: aircrack-ng, bluez5_utils, connman, + cups, erlang-p1-stringprep, expat, ffmpeg, flann, flannel, go, + gst1-libav, hidapi, hplip, iptraf-ng, jamvm, kodi, + kodi-screensaver-matrixtrails, libcurl, libepoxy, libgpgme, + libsemanage, libxslt, liquid-dsp, ltris, lxc, mesa3d, midori, + mpg123, mtr, openpgm, openpowerlink, oprofile, php, + postgresql, putty, python-service-identity, python-treq, + qlibc, qt5serialbus, ruby, stress-ng, strongswan, time, tinc, + ustr, valgrind, webkitgtk, libxml2, xorriso, + xserver_xorg-server + + Issues resolved (http://bugs.uclibc.org): + + #8936: Aircrack-ng - Alot of missing dependencies + +2016.05-rc2, Released May 17th, 2016 + + Fixes all over the tree. + + Rootfs overlay handling now refuses to overwrite + /{usr,bin,sbin,lib} symlinks from BR2_ROOTFS_MERGED_USR option + even if these directories are present in the overlay. + + External toolchain: Unbreak user provided libraries deployment + (BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS) handling after refactoring. + + QEMU coldfire: Fix for signal handling kernel issue, enable + networking support. + + Updated/fixed packages: android-tools, assimp, boost, gcc, + glibc, glmark2, gmrender-resurrect, go, go-bootstrap, iputils, + jack2, kodi-screensaver-asterwave, kodi-screensaver-rsxs, + kodi-visualisation-shadertoy, libarchive, libinput, libpjsip, + mali-t76x, mtr, nginx, opencv, openvpn, python-coherence, + qt5multimeda, quagga, samba4, sg3-utils, stress-ng, turbolua + +2016.05-rc1, Released May 10th, 2016 + + Fixes all over the tree and new features. + + Architectures: new ARM variants: Cortex A17 and M4, improved + nonmmu (cortex-M) support, m68k has been re-enabled with + support for ColdFire. For x86, support for the i386 variant + has been dropped. + + Toolchain: Add GCC 6 support, remove GCC 4.5, mark GCC 4.7 as + deprecated. Go programming language support, Add Binutils 2.26 + support. Old Sourcery PowerPC external toolchains removed, + Sourcery MIPS 2016.06-8, AMD64 2015.11-139, NiosII 2015.11-130 + added, Linaro ARM/ARMeb/Aarch64 toolchains updated. + + New defconfigs: Firefly RK3288, Boundary Devices i.MX7 Nitrogen7, + STM32F429 and STM32F469 Discovery boards, Hardkernel ODROID-C2, + Raspberry Pi Zero and Raspberry Pi 3. Some Qemu defconfigs were + added for m68k, eXtensa-nommu and ColdFire. + + Linux: use zImage by default on ARM, subversion repository + support (for u-boot as well). + + New packages: aer-inject, android-tools, cannelloni, + cbootimage, cgroupfs-mount, connman-gtk, crudini, dt, + gmrender-resurrect, flannel, font-awesome, freeswitch, go, + go-bootstrap, gr-osmosdr, granite, i7z, imx-uuc, + kodi-adsp-basic, kodi-adsp-freesurround, + kodi-audiodecoder-opus, kodi-pvr-hdhomerun, + kodi-screensaver-asterwave, kodi-screensaver-cpblobs, + kodi-screensaver-matrixtrails, kodi-screensaver-planestate, + kodi-screensaver-rsxs, kodi-visualisation-fishbmc, + kodi-visualisation-fountain, kodi-visualisation-goom, libgee, + libimxvpuapi, libpjsip, libtomcrypt, libtommath, libusbgx, + lksctp-tools, mali-t76x, mkpimage, mpv, msr-tools, nload, + norm, nvme, owfs, pound, privoxy, procrank_linux, putty, + python-autobahn, python-characteristic, python-crossbar, + python-cryptography, python-iniparse, python-iowait, + python-lmdb, python-pexpect, python-ptyprocess, + python-pyasn-modules, python-pygments, python-pymysql, + python-pynacl, python-pyopenssl, python-pysocks, + python-pytrie, python-rpi-gpio, python-service-identity, + python-setproctitle, python-shutilwhich, python-treq, + python-txaio, python-ujson, python-wsaccel, qt5canvas3d, + qt5location, qt5quickcontrols2, qt5serialbus, qt5tools, + raptor, scrub, taskd, tegrarcm, turbolua, valijson, + wayland-protocols, webkitgtk, wilc1000-firmware, wpan-tools, + xdriver_xf86-video-amdgpu + + Removed packages: foomatic-filters, python-m2crypto, + qt5quick1, qt5webkit-examples, samba, xdriver_xf86-input-void + + Issues resolved (http://bugs.buildroot.org): + + #6830: Qt5: no fonts are installed + #7562: musl buildroot-toolchain and BR2_MIPS_SOFT_FLOAT break + #7580: Invalid filesystem in Pandaboard defconfig + #8346: wf111 package removes all kernel module dependencies + #8436: xserver_xorg-server Segmentation fault + #8736: IPV6 forced on in busybox + #8746: At startup system stops with 'cannot set terminal proces.. + #8751: make fail [fio does not build on sh] + #8766: Compiling host-gcc-final-4.9.3 broken on i386 + #8771: make savedefconfig modifies sources + #8781: Unable to build uboot for imx28evk + #8786: gdb fails to build with xz and expat support at the same + #8801: Compilation of Buildroot 2016.2 for Raspberry Pi with... + #8806: Buildroot 2016.2 for Raspberry Pi requires that ext4... + #8836: Can't select Vim in menuconfig + #8851: Make sure fio can compile with libaio support if it... + #8861: With buildroot 2016.02 trying to build for corei7-avx + fails while trying to build host-binutils + #8866: Making an USB flash bootable with extlinux build with + buildroot does not work + +2016.02, Released March 1st, 2016 + + Minor fixes, mostly security related. + + Circular dependency issue with same-as-kernel linux-headers + option fixed. + + Updated/fixed packages: bluez5_utils, heirloom-mailx, + imx-gpu-viv, kodi-pvr-argustv, kodi-pvr-mediaportal-tvserver, + kodi-pvr-nextpvr, libfcgi, openssl, pifmrds, powerpc-utils, + python-m2crypto, slang, sox, squid, tn5250, xerces, zsh + +2016.02-rc3, Released February 27th, 2016 + + Fixes all over the tree. + + Defconfigs: Ensure EABIhf is correctly enabled for ARM cores + where VFP is optional (but present on the specific hw). Fix + ARM variant selection for freescale_imx31_3stack_defconfig. + + Ensure tarballs of downloaded git trees do not contain a + timestamp. + + Clarify license of patches in COPYING. + + Updated/fixed package: avahi, binutils, cairo, can-festival, + chrony, cifs-utils, dnsmasq, dvdauthor, e2fsprogs, efl, + erlang-rebar, eudev, fbterm, gawk, gnupg2, gnuradio, gpm, + gst1-plugins-good, hostapd, imagemagick, iproute2, iputils, + jack2, kexec, kismet, lftp, libarchive, libeXosip2, libfm, + libglib2, libsoil, libssh, libssh2, libuci, links, lshw, lxc, + mediastreamer, mono, mraa, mutt, nfs-utils, numactl, ofono, + omniorb, openipmi, openobex, patch, pax-utils, perf, + pulseaudio, pure-ftp, qhull, qt, quagga, quota, sdl_sound, + shairport-sync, spice, sysklogd, syslog-ng, trace-cmd, + trousers, tvheadend, util-linux, vim, webkitgtk24, wireshark, + wpa_supplicant, xerces, zsh + + Issues resolved (http://bugs.uclibc.org): + + #8651: libMonoPosixHelper.so wrong link reference in buildroot.. + +2016.02-rc2, Released February 18th, 2016 + + Fixes all over the tree. + + Toolchain: PR19405 backport to binutils 2.25.1 to fix NIOS ld + crash, backport of Xtensa .init/.fini literals handling. + glibc security patches for CVE-2014-8121, CVE-2015-1781 + and CVE-2015-7547. + + Defconfigs for Acmesystems Arietta g25 added. + + Updated/fixed packages: binutils, boost, chrony, dovecot, + e2fsprogs, fio, gdb, glibc, graphite2, icu, kbd, libbsd, + libcue, libgcrypt, libraw, links, mc, mosquitto, nodejs, + postgresql, pptp-linux, pulseaudio, samba4, spice, squid, + sysklogd, systemd, tiff, uclibc, ulogd, util-linux, valgrind. + + Issues resolved (http://bugs.uclibc.org): + + #8576: Building embedded Linux for Atmel SAMA5D4_Xplained... + #8606: Problem compiling on Arch Linux + #8681: kbd 2.0.3 does not build on rpi + +2016.02-rc1, Released February 10th, 2016 + + Fixes all over the tree and new features. + + Toolchain: Support for GCC 5.3.x. ARC toolchain updated to + arc-2015.12. Support for legacy uClibc dropped, default to + uClibc-ng instead. Added sys/queue.h implementation for MUSL + for compatibility. Updated versions of Code sourcery and + Linaro toolchains. MIPS Codescape toolchains added. Version + selection for preconfigured external toolchains removed. + + New Defconfigs: ARM Juno r0/r1 development boards, Freescale + i.MX6UL Evaluation Kit, Intel Galileo Gen 2, Orange Pi PC. + A number of defconfigs have been extended to generate complete + system images using genimage. + + Linux: Automatically patch timeconst.pl for <3.9 kernels, + which isn't compatible with modern perl versions, breaking the + build when building on recent (Fedora 23, Debian + Testing/Unstable, ..) distributions. + + Makedevs utility now accepts textual (non-numerical) user and + group names. + + Vagrant file to easily setup a working development environment + in a VM has been added. + + Size-stats-compare script to compare rootfs sizes between + builds has been added. + + Infozip package renamed to zip. EFL packages restructured. + + Updated/fixed packages: aespipe, aiccu, alsa-lib, alsa-utils, + angularjs, apache, apr, argp-standalone, armadillo, arptables, + at, atk, audiofile, aumix, autoconf-archive, avahi, bash, bc, + bcache-tools, bdwgc, beecrypt, bind, binutils, bluez5_utils, + bluez_utils, bonnie, boost, busybox, cairo, cdrkit, chrony, + clamav, cmake, collectd, connman, coreutils, cppcms, crda, + cryptodev-linux, cryptsetup, cups, cwiid, cxxtest, dbus, + dbus-cpp, dbus-glib, debianutils, dhcp, dhcpcd, dhrystone, + dillo, directfb, directfb-examples, dmraid, dnsmasq, doom-wad, + dovecot, dovecot-pigeonhole, dropbear, dtv-scan-tables, + dvb-apps, dvbsnoop, ecryptfs-utils, eigen, ejabberd, + elementary, elfutils, enlightenment, erlang, espeak, eudev, + eventlog, exfat, exfat-utils, exiv2, expedite, faifa, + fakeroot, fastd, fbgrab, fetchmail, ffmpeg, findutils, fio, + firmware-imx, flann, flashrom, flite, flot, fmlib, freerdp, + freescale-imx, freetype, gauche, gawk, gcc, gcc-final, gcr, + gdb, gdk-pixbuf, geoip, gesftpserver, gettext, giflib, git, + glibc, glibmm, glog, gmp, gnupg, gnupg2, gnutls, gob2, gpsd, + gptfdisk, grep, gst1-libav, gst1-plugins-{bad,base,good,ugly}, + gst-ffmpeg, gst-plugins-{bad,base,good,ugly}, gstreamer, + gstreamer1, guile, gvfs, gzip, harfbuzz, haserl, hiawatha, + hostapd, hplip, icu, ifupdown, imagemagick, imx-gpu-viv, + imx-kobs, imx-lib, input-tools, intel-microcode, iperf3, + ipmitool, iproute2, iprutils, ipsec-tools, ipset, iptables, + iputils, irda-utils, irssi, iucode-tool, jack2, janus-gateway, + jpeg-turbo, jquery-datetimepicker, jquery-keyboard, + jquery-sparkline, jquery-ui, jquery-ui-themes, + jquery-validation, json-c, kbd, kernel-module-imx-gpu-viv, + keyutils, kmod, knock, kodi, lcdproc, lcms2, leafnode2, + leafpad, libass, libatomic_ops, libbroadvoice, libbsd, + libcap-ng, libcdaudio, libcue, libcurl, libdrm, libecore, + libedbus, libedit, libedje, libeet, libefreet, libeina, + libeio, libelementary, libembryo, libepoxy, libethumb, libev, + libevas, libevas-generic-loaders, libevdev, libevent, libffi, + libfm, libfribidi, libfslcodec, libfslparser, libfslvpuwrap, + libftdi, libfuse, libgail, libglew, libglib2, libgtk2, + libgtk3, libgudev, libhttpparser, libidn, libinput, libiscsi, + libjpeg, liblinear, libmbim, libmicrohttpd, libndp, libnspr, + libnss, liboauth, liboping, libpciaccess, libplist, libpng, + libraw, libraw1394, librsvg, libseccomp, libsecret, + libserialport, libsigc, libsigrok, libsigrokdecode, + libsndfile, libsoc, libsodium, libsoup, libssh2, libsvg, + libsvg-cairo, libtasn1, libtirpc, libtorrent, libungif, + libunwind, libupnpp, liburcu, libuv, libv4l, libva, + libva-intel-driver, libvips, libvncserver, libxml2, libxmlpp, + lightning, lighttpd, linknx, linux-firmware, linux-fusion, + linux-headers, liquid-dsp, lirc-tools, live555, lm-sensors, + lockdev, lshw, ltp-testsuite, ltrace, lttng-babeltrace, + lttng-libust, lttng-modules, lttng-tools, lua, luabitop, + luarocks, luv, lvm2, lxc, makedevs, mc, memcached, memtest86, + mesa3d, mesa3d-demos, mesa3d-headers, micropython, + micropython-lib, minicom, minidlna, mjpg-streamer, mke2img, + moarvm, modem-manager, mongoose, mongrel2, monkey, mono, + monolite, mosh, mosquitto, mpd, mplayer, msgpack, mtdev2tuio, + musepack, musl, mysql, nano, nasm, nbd, neard, netatalk, + netsnmp, nettle, net-tools, network-manager, nfs-utils, nginx, + nmap, nodejs, ntfs-3g, ntp, numactl, nut, nvidia-driver, + odhcp6c, ofono, ola, olsr, omniorb, opencv, opencv3, openipmi, + openldap, openntpd, openobex, openocd, openpgm, + open-plc-utils, openpowerlink, openssh, openssl, openswan, + openvpn, opkg, oprofile, opus, opusfile, p11-kit, package, + pango, pax-utils, pciutils, pcmanfm, perl, perl-db-file, + perl-io-socket-ssl, perl-libwww-perl, perl-net-dns, perl-uri, + perl-xml-libxml, php, php-ssh2, picocom, pinentry, pixman, + polarssl, popt, portaudio, pppd, procps-ng, proftpd, protobuf, + psmisc, ptpd2, pulseaudio, pulseview, pv, python, python3, + python-alsaaudio, python-can, python-cffi, python-cherrypy, + python-httplib2, python-jinja2, python-lxml, python-m2crypto, + python-mako, python-msgpack, python-psutil, python-pyasn, + python-pycparser, python-pydal, python-pyftpdlib, + python-pyroute2, python-pyxml, python-pyzmq, python-requests, + python-serial, python-setuptools, python-six, python-spidev, + python-tornado, python-twisted, python-web2py, python-webpy, + python-werkzeug, python-zope-interface, qemu, qhull, qpdf, qt, + qt5, qt5base, qt5connectivity, qt5declarative, qt5enginio, + qt5graphicaleffects, qt5imageformats, qt5multimedia, + qt5quick1, qt5quickcontrols, qt5script, qt5sensors, + qt5serialport, qt5svg, qt5webchannel, qt5webkit, + qt5webkit-examples, qt5websockets, qt5x11extras, + qt5xmlpatterns, qt-webkit-kiosk, racehound, radvd, read-edid, + readline, redis, rpcbind, rpi-firmware, rpi-userland, rrdtool, + rsync, rsyslog, rtai, rtorrent, rt-tests, rubix, ruby, samba4, + sconeserver, setools, shairport-sync, sigrok-cli, skeleton, + smack, snowball-init, socat, sp-oops-extract, sqlite, + squashfs, squeezelite, squid, sredird, sshfs, + start-stop-daemon, strace, strongswan, stunnel, subversion, + sunxi-tools, swig, sysdig, syslog-ng, sysstat, systemd, + sysvinit, taglib, tcl, tcpreplay, thrift, ti-gfx, tinyalsa, + tor, torsmo, trace-cmd, transmission, tremor, triggerhappy, + trinity, tvheadend, tzdata, uboot-tools, uclibc, udisks, + udpcast, unionfs, upmpdcli, usb_modeswitch, + usb_modeswitch_data, ustr, util-linux, vala, valgrind, + vboot-utils, vde2, vlc, vnstat, webkit, webkitgtk24, weston, + wget, whetstone, whois, wine, wipe, wireless-regdb, wireshark, + wpa_supplicant, w_scan, x11r7, xapp_xbacklight, xapp_xcompmgr, + xapp_xinput, xapp_xkbcomp, xdriver_xf86-input-evdev, + xdriver_xf86-input-libinput, xdriver_xf86-input-synaptics, + xdriver_xf86-video-ati, xdriver_xf86-video-fbturbo, + xdriver_xf86-video-imx-viv, xdriver_xf86-video-intel, + xfont_encodings, xfont_font-adobe-100dpi, + xfont_font-adobe-75dpi, xfont_font-adobe-utopia-100dpi, + xfont_font-adobe-utopia-75dpi, xfont_font-adobe-utopia-type1, + xfont_font-alias, xfont_font-arabic-misc, + xfont_font-bh-100dpi, xfont_font-bh-75dpi, + xfont_font-bh-lucidatypewriter-100dpi, + xfont_font-bh-lucidatypewriter-75dpi, xfont_font-bh-ttf, + xfont_font-bh-type1, xfont_font-bitstream-100dpi, + xfont_font-bitstream-75dpi, xfont_font-bitstream-type1, + xfont_font-cronyx-cyrillic, xfont_font-cursor-misc, + xfont_font-daewoo-misc, xfont_font-dec-misc, + xfont_font-ibm-type1, xfont_font-isas-misc, + xfont_font-jis-misc, xfont_font-micro-misc, + xfont_font-misc-cyrillic, xfont_font-misc-ethiopic, + xfont_font-misc-meltho, xfont_font-misc-misc, + xfont_font-mutt-misc, xfont_font-schumacher-misc, + xfont_font-screen-cyrillic, xfont_font-sony-misc, + xfont_font-sun-misc, xfont_font-winitzki-cyrillic, + xfont_font-xfree86-type1, xfsprogs, xkeyboard-config, xl2tp, + xlib_libfontenc, xlib_libXi, xmlstarlet, xscreensaver, + xserver_xorg-server, xtables-addons, xvkbd, xz, yad, yasm, + ympd, zeromq, zic, znc, zsh, + + New packages: acsccid, assimp, atkmm, autofs, bcm2835, + cairomm, cantarell, chocolate-doom, comix-cursors, cxxtest, + edid-decode, emlog, gcr, gtkmm3, hidapi, jquery-sidebar, + kernel-module-imx-gpu-viv, libasplib, libcroco, libdvbpsi, + libfreeglut, libgdiplus, libglfw, libhdhomerun, libnet, + libsoil, lldpd, luvi, mbedtls, minizip, miraclecast, mongodb, + mraa, netbsd-queue, netsniff-ng, nss-pam-ldapd, + obsidian-cursors, openal, openbox, pangomm, + python-backports-abc, python-beautifulsoup4, python-cbor, + python-click, python-cssselect, python-ecdsa, python-html5lib, + python-idna, python-ipaddress, python-mistune, python-netaddr, + python-paho-mqtt, python-paramiko, python-pyparted, + python-pysmb, python-pyudev, python-singledispatch, + python-smbus-cffi, python-urllib3, qt53d, rabbitmq-c, rfkill, + sbc, spi-tools, tpm-tools, trousers, ubus, unrar, unscd, + unzip, v4l2grab, xdriver_xf86-video-nouveau, xdotool, zbar + + Removed packages: libungif, python-pyxml, + + Issues resolved (http://bugs.uclibc.org): + + #7886: gettext: link failure with locally-installed libxml2 + #7892: systemd-journald is broken + #8066: nodejs crashes when built with gcc 4.9 + #8296: nodejs 0.12.7 - npm crashes (seg core dump) + #8501: gunzip fails to uncompress files + #8541: fail to build host-fakeroot-1.20.2 + #8546: build instructions for raspberry pi don't work + #8571: strace for ARC compile error + #8581: pciutils.mk PCIUTILS_MAKE_OPTS typo + #8616: Fail to build for raspberrypi_defconfig with big endian + #8621: sqlite package, properly enable readline + +2015.11, Released November 30th, 2015 + + Minor fixes. + + Merged/seperate /usr handling is now also performed for + staging so cross-gdb / gdbserver can find the libraries. + + Updated/fixed packages: autossh, conntrack-tools, dcron, + espeak, gcc, glmark2, gpsd, gstreamer1, libglib2, libsigsegv, + libsoc, libv4l, minidlna, mongrel2, opencv, polarssl, + rpi-userland, rubix, skeleton, tovid, uemacs, valgrind, yad, + zmqpp + + Issues resolved (http://bugs.uclibc.org): + + #8441: Invalid directory for X11 fonts in target (RPi2) + #8491: libglib2 2.46.1 not Building for armv5 on 2015.11-rc3 + +2015.11-rc3, Released November 26th, 2015 + + Fixes all over the tree. + + We have a new modern website! + + Updated/fixed packages: apitrace, audiofile, autossh, bullet, + c-ares, collectd, conntrack-tools, cryptodev-linux, dropbear, + fastd, gmp, gpsd, gst-plugins-bad, gst-plugins-base, + gst-plugins-good, gst-plugins-ugly, gstreamer, gstreamer1, + guile, iodine, iproute2, jimtcl, kompexsqlite, libethumb, + libfreeimage, libgsasl, libgtk3, libxml2, localedef, + lttng-tools, macchanger, mongrel2, mpd, openntpd, openssl, + oprofile, pcre, qt5base, quagga, rpi-userland, sconeserver, + sdl, spidev_test, sqlite, strongswan, ustr, xapp_sessreg, + yajl, zmqpp + + Issues resolved (http://bugs.uclibc.org): + + #6872: gpsd: disabled on microblaze + #8321: invalid opcode error with minidlna and ffmpeg + #8336: Default systemd configuration fails to boot correctly in 2015-08 + #8446: rpi-userland failed to build with glibc 2.22 + +2015.11-rc2, Released November 19th, 2015 + + Fixes all over the tree. + + LD_LIBRARY_PATH is no longer used to ensure host binaries find + their libraries, fixing issues on recent Fedora. + + Toolchain fixes for powerpc e5500 / e6500. Fix for an issue + with ${TARGET}-cc after the move to use a toolchain wrapper + for the internal toolchain. + + Appy-patches.sh now correctly applies all files listed in + series files. + + Fixes for merged /usr handling when a custom skeleton is used. + + Updated/fixed packages: axfsutils, boost, busybox, dhcp, + directfb, dropbear, ebtables, fastd, ffmpeg, gauche, gcc, + gettext, gst1-plugins-bad, hostapd, ibrdtnd, libcurl, + libecore, libgudev, libnss, libpng, libserial, libssh2, + libuecc, libxml2, linux-headers, liquid-dsp, ltris, + lua-periphery, minidlna, mongrel2, mpd, mpg123, mplayer, + mysql, opencv, opencv3, package, perl-file-util, php-ssh2, + polarssl, pulseaudio, python-protobuf, qemu, qt5base, ranger, + ruby, skeleton, slang, squeezelite, strongswan, tovid, uclibc, + ushare, wine, wpa_supplicant, x265, + xdriver_xf86-video-siliconmotion, zxing-cpp + + Issues resolved (http://bugs.uclibc.org): + + #4790: Running udhcpc on a system with NFS root kills NFS + #8456: Building host-pkgconf on Fedora 23 fails due to.. + +2015.11-rc1, Released November, 7th 2015 + + Fixes all over the tree and new features. + + Architectures: + + - Support for sparc64 added (internal toolchain with glibc + only). + + - Support for mips32r6 and mips64r6 added. + + - Support for Intel Quark X1000 CPU. + + - Switch to EABIhf by default on ARM when a VFP is available. + + Toolchains: + + - glibc 2.22, gdb 7.10, use gdb 7.9 by default, musl 1.1.12, + uclibc-ng 1.0.8, host-gdb enabled on AArch64. + + - The toolchain wrapper which was used only for external + toolchains is now also used for Buildroot internal + toolchains. This allowed to fix the ccache support, prepare + the way for top-level parallel build support and remove gcc + patches used to detect header/library path poisoning. + + - Remove Analog Devices Blackfin toolchain 2012R2. + + - Fix several Xtensa build failures by switching from + text-section-literals to auto-litpools. + + - Enable MIPS64 support in uClibc-ng, use uClibc on ARC + rather than a specific fork. + + - Linaro toolchains for ARM, ARMeb and AArch64 updated to + 2015.08. 2014.09 version is kept since 2015.08 only runs on + x86_64 hosts. + + Bootloaders: + + - Fix ARM64 support in U-Boot. + + Defconfigs: + + - Added: ARC HS38 VDK virtual boards, Avnet Microzed, Boundary + Devices Nitrogen SoloX, Freescale i.MX6 SoloX Sabre SD, + OLinuxino A20 Lime2, Qemu Sparc64, Qemu SuperH 4 big endian, + Synopsys AArch64 VDK virtual platform. + + - Updated: calao_qil_a9260, calao_usb_a9g20_lpw, ci20, + cubieboad, freescale_imx6_*, imx53loco, imx6_vab820, + mpc8315erdb, qmx6, p1010rdb, qemu, raspberrypi, + raspberrypi2, riotboard, snps_axs10*, wandboard. + + - Removed: at91rm9200df, at91sam9260dfc, at91sam9263ek, + calao_snowball_defconfig, gnublin, integrator926_defconfig. + + Infrastructure: + + - Support for fetching from Mercurial tags fixed. + + - Introduce LINUX_NEEDS_MODULES, which allows to enforce + module support to be enabled in the kernel when a package + builds out-of-tree kernel modules (through the + pkg-kernel-module infrastructure or on its own). + + - Improve the perl package infrastructure to automatically add + the dependency to the perl interpreter to target perl module + packages. + + - Remove trailing slashes in _SITE and addition of a + check to ensure such trailing slashes are no longer added. + + - Extend the legal infrastructure to allow packages to declare + their actual source code. This is useful for packages for + which _SOURCE points to pre-built binaries (as is the + case for external toolchains). The new _ACTUAL_SOURCE + variable allows to point to the source code in such cases. + + - Improved ccache support, thanks to the usage of a toolchain + wrapper for internal toolchain. Now a single cache directory + can be shared between different Buildroot builds. + + - Addition of a 'graph-size' make targets, which generates a + PDF graph of per-package size of the root filesystem. + + - Addition of _EXCLUDES so that packages can request + certain parts of the source code tarball to not be + extracted. This feature is currently used by gcc and + toolchain-external. + + - Packages can now use the _PKGDIR variable, provided by + the package infrastructure, to reference their package + directory, instead of explicitly using package//. + + Filesystems: + + - Add high lz4 compression to squashfs. + + - Simplification of shell profile files in the default + skeleton. + + - Remove ftp user and /home/ftp from the skeleton, and let ftp + server packages create these when needed. + + - Add support for /bin, /sbin and /lib to be symlinks to their + corresponding directories in /usr. This is enforced for + systemd configurations, and optional for other + configurations. + + - Support for AXFS filesystem image generation added. + + - New options to add extra space/inodes to ext2/3/4 images. + + Updated/fixed packages: + + adwaita-icon-theme, apache, apitrace, atk, audit, avahi, + barebox, bash, batctl, bind, binutils, bluez_utils, boost, + bridge-utils, cairo, ccache, chrony, clapack, cloog, cmake, + collectd, connman, conntrack-tools, coreutils, cpio, + cryptsetup, dbus, dbus-cpp, devmem2, dhcp, dhcpcd, dhcpdump, + dhrystone, dillo, directfb, directfb-examples, dmraid, + dos2unix, dovecot, dovecot-pigeonhole, drbd-utils, dropbear, + dropwatch, dtc, e2fsprogs, ebtables, efl, eigen, ejabberd, + elf2flt, elfutils, erlang, ethtool, eudev, evemu, exfat, + exfat-utils, expat, faifa, fbterm, fdk-aac, feh, ffmpeg, file, + flashrom, fping, freerdp, freescale-imx, freetype, gdk-pixbuf, + genimage, gettext, git, glib-networking, glmark2, gnupg2, + gnuradio, gnutls, gpsd, grep, grub2, gst1-imx, gst1-libav, + gst1-plugins-bad, gst1-plugins-base, gst1-plugins-good, + gst1-plugins-ugly, gst1-validate, gst-fsl-plugins, + gst-plugins-bad, gstreamer1, guile, gvfs, harfbuzz, haveged, + hostapd, icu, imagemagick, impiutil, imx-gpu-viv, imx-vpu, + inadyn, intltool, iostat, iperf3, ipmiutil, iproute2, + iptables, iw, jpeg-turbo, jq, jsoncpp, kexec-lite, kmod, kodi, + kodi-audioencoder-flac, kodi-pvr-argustv, kodi-pvr-filmon, + kodi-pvr-hts, kodi-pvr-mythtv, kodi-pvr-pctv, + kodi-pvr-stalker, kodi-pvr-vbox, + kodi-visualisation-waveforhue, less, lftp, libbluray, + libcgroup, libconfuse, libcurl, libdcadec, libdrm, libevdev, + libffi, libfribidi, libfslcodec, libfslparser, libfslvpuwrap, + libgcrypt, libglew, libglib2, libgtk3, libidn, liblinear, + liblockfile, libmicrohttpd, libnetfilter_conntrack, libnfs, + libnftnl, libnl, libnspr, libnss, libpcap, libpfm4, libpng, + libselinux, libserial, libsoup, libsoxr, libstrophe, libtasn1, + libtirpc, libtorrent, libupnpp, liburcu, libusb-compat, libuv, + libv4l, libva, libva-intel-driver, libxcb, lighttpd, links, + linux, linux-firmware, linux-fusion, linux-headers, + lirc-tools, localedef, lpeg, lsof, ltp-testsuite, + lttng-libust, lttng-tools, lua-periphery, luaposix, lvm2, lxc, + lz4, mdadm, mesa3d, mesa3d-headers, minicom, minidlna, moarvm, + modem-manager, mosquitto, mpd, mpdecimal, mpg123, mplayer, + mrouted, msmtp, mtd, mutt, nettle, network-manager, nfs-utils, + nftables, nginx, nodejs, noip, ntp, ofono, opencv3, openpgm, + openssl, openswan, openvpn, pango, parted, perl, perl-cross, + perl-crypt-openssl-random, perl-http-message, + perl-io-socket-ssl, perl-module-build, perl-mojolicious, + perl-netaddr-ip, perl-net-dns, perl-net-http, perl-net-ssleay, + perl-uri, perl-xml-libxml, php, picocom, pixman, pkgconf, + poco, polarssl, portaudio, portmap, postgresql, proftpd, + protobuf, protobuf-c, pulseaudio, python-configshell-fb, + python-networkmanager, python-numpy, python-pyparsing, + python-pypcap, python-rtslib-fb, python-spidev, python-urwid, + python-web2py, qemu, qt5base, redis, rngtools, rng-tools, + rpi-firmware, rpi-userland, rtmpdump, rtorrent, ruby, samba, + samba4, sane-backends, sconeserver, sdl, sed, setools, + shairport-sync, shared-mime-info, sland, smartmontools, + softether, spice-protocol, sqlcipher, sqlite, squid, + strongswan, stunnel, subversion, sudo, sunxi-tools, + supervisor, systemd, tar, targetcli-fb, tcpdump, tiff, tor, + tvheadend, tzdata, uboot-tools, udisks, unionfs, upmpdcli, + util-linux, vala, valgrind, vim, vlc, vorbis-tools, vsftpd, + vtun, wavpack, webkitgtk24, weston, whois, wireless-regdb, + wireshark, wpa_supplicant, xdriver_xf86-input-vmmouse, + xdriver_xf86-video-imx-viv, xdriver_xf86-video-intel, + xdriver_xf86-video-sis, xlib_libXi, xorg-server, + xtables-addons, xterm, xz, zic, znc, zsh + + New packages: + + axfsutils, bitstream, check, dvblast, eventlog, fastd, gauche, + gmock, graphite2, gssdp, gupnp, gupnp-av, ibrcommon, ibrdtn, + ibrdtnd, ibrdtn-tools, imx-kobs, iqvlinux, irssi, + kompexsqlite, libbroadvoice, libcddb, libcodec2, libcrossguid, + libg7221, libhttpparser, libilbc, libldns, libmng, + libopenh264, libpam-radius-auth, libpam-tacplus, libsilk, + libsoundtouch, libssh, libuecc, libyuv, liquid-dsp, luv, + micropython, micropython-libs, python-pyratemp, + python-pyroute2, python-ranger, rapidxml, scrypt, sdl2, + sp-oops-extract, squeezelite, stress-ng, swupdate, syslog-ng, + x265, xdriver_xf86-video-fbturbo, xxhash, yad, zxing-cpp + + Removed packages: + + blackbox (was deprecated), divine (merged in directfb), + kobs-ng (replaced by imx-kobs), mediactl (merged in libv4l), + sawman (merged in directfb), schifra (marked broken since a + long time), texinfo (host variant only, no longer used), zxing + (replaced by zxing-cpp), + + Issues resolved (http://bugs.uclibc.org): + + #4099: cut utility from GNU coreutils works incorrect + #7772: libxml-parser-perl build failure: missing dependency + ExtUtils/MakeMaker + #7931: Default configuration for Cubieboard v1 is outdated + #8116: 2015.05-rc2 raspberrypi2_defconfig network interface + not coming up + #8246: X.org DRI2 build issue + #8256: pointing to /usr/bin/objcopy old version (x86) instead + of the generated one + #8266: mplayer build issue + #8281: pyrexc fails to run when path is too long + #8316: lttng-tools and lttng-babeltrace executables contain + bad RPATH pointing to host machine + #8331: kexec wants shutdown in /sbin, but systemd installs it + in /usr/sbin + #8361: Buildroot 2015.08.1 skeleton inittab overwritten by + busybox's version + #8366: libevent does not build + #8386: build failed with external toolchain + #8391: Node.js 0.12.7 fails to build on raspberry_pi defconfig + #8396: CCACHE initialization + #8401: gpsd 3.15 NMEA support + #8416: cups depends on BR2_DEPRECATED_SINCE_2015_05 + #8421: util-linux installs systemd files in output/target/home/ + +2015.08, Released August 31st, 2015 + + Minor fixes. + + OpenCV 3.x package renamed to opencv3. OpenCV 2.4.x + reintroduced as opencv. + + Updated/fixed packages: bootutils, canfestival, cppcms, + curlftpfs, dhcpdump, dropbear, erlang-p1-tls, exfat, gnuradio, + ipkg, libgudev, libmbim, libwebsock, linux-pam, lm-sensors, + ltrace, midori, network-manager, openssh, perl-file-listing, + perl-http-cookies, perl-http-daemon, perl-http-negotiate, + perl-www-robotrules, python-can, qt5base, qt5multimedia, + setools, sysvinit, tinyalsa, tn5250, tvheadend, uboot, vlc, + x264, xserver_xorg-server, zyre + +2015.08-rc2, Released August, 24th 2015 + + Fixes all over the tree. + + Toolchain: fix gcc build on NIOS-II. + + Infrastructure: add _POST_GEN_HOOKS mechanism to fix + hybrid ISO image generation. + + Architectures: add arm1136j-s variant. + + Updated/fixed packages: apitrace, audit, bcusdk, bdwgc, + beecrypt, boost, bwm-ng, cdrkit, c-icap, cifs-utils, clapack, + c-periphery, cpio, cramfs, czmq, dawgdic, dnsmasq, dosfstools, + dropbear, elfutils, empty, eudev, fan-ctrl, filemq, gnutls, + guile, haveged, imlib2, libcec, libepoxy, libev, libgpgme, + libiio, libnetfilter_queue, libnfnetlink, libpfm4, libpthsem, + librtas, libselinux, libsigsegv, libsodium, libv4l, lightning, + linux, lirc-tools, lrzsz, mono, mosh, mpd, msmtp, nbd, + netatalk, nodejs, ola, opencv, oprofile, php, poco, + postgresql, powertop, protobuf, protobuf-c, qt5base, + qt5quickcontrols, rapidjson, rng-tools, squid, sysdig, + sysstat, tftpd, tinc, tz, util-linux, webkitgtk24, weston, + wireshark, wvstreams, xdriver_xf86-input-synaptics, zyre. + + Issues resolved (http://bugs.uclibc.org): + + #8276: package/dropbear: symlink resolution incorrect + #8286: Error with buildroot + #8301: ldconfig parameter in Makefile + +2015.08-rc1, Released August, 5th 2015 + + Fixes all over the tree and new features. + + Architectures: + + - Refactor how the availability of an MMU is described. + - Minimal support for Cortex-M3 + - Minimal support for AArch64 big-endian + + Toolchains: + + - Add CodeSourcery MIPS 2015.05, remove MIPS 2013.11 + - Use uClibc-ng as the default uClibc version, instead of the + official uClibc, which hasn't done any release since 3+ + years + - eglibc is now marked as deprecated + - GCC: gcc 4.9.x is now the default and was updated to 4.9.3, + support for gcc 5.x added. + - Binutils: use Binutils 2.24 as the default, 2.25.x series + bumped to 2.25.1, remove old Binutils 2.22. + - Update ARC toolchain components to 2015.06 + - Add support for Fortran when building gcc + + Bootloaders: + + - Support for using the kconfig configuration system in + U-Boot + + New Defconfigs: + + - VIA VAB-820/AMOS-820 + - OLimex OLinuxino A20 Lime + - Many new defconfigs for Atmel evaluation boards: + at91sam9rlek, at91sam9x5ek, sama5d3xek, sama5d4ek, sama5d4 + Xplained Ultra, sama5d3 Xplained. + - ACME Systems Aria G25 + - WarPboard + - Altera Cyclone 5 Development Board + - Xilinx zc706 + - ARC AXS101 and AXS103 Software Development Platforms + - Significant updates to Raspberry Pi / Raspberry Pi 2 + + Infrastructure: + + - Buildroot takes better care now of generating predictable + permissions in the target filesystem. However, existing + permissions on a custom skeleton or rootfs overlay will no + longer be preserved. Therefore, it is necessary to add a + permission table (BR2_ROOTFS_DEVICE_TABLE) to set the + required permissions. + - Add support for kconfig fragments. + - No longer pass --{enable,disable}-debug to autotools + packages depending on the value of + BR2_ENABLE_DEBUG. BR2_ENABLE_DEBUG now only controls + whether we build with -g or not. + - Support for extracting archives in .lzma in the generic + package infrastructure. + - Remove random-seed file from the default skeleton, since + seeding the entropy pool with a known seed makes more harm + than good. + - In the CVS download helper, add support to use a date as + the version. + - Add support for a per-package _STRIP_COMPONENTS + variable, which packages can use to specify how many path + components should be stripped when extracting the tarball. + - Addition of a 'kernel-module' package infrastructure, which + simplifies the packaging of external kernel modules. Many + existing packages are converted to use it. + - Allow bootloaders to be implemented in $(BR2_EXTERNAL) + - Remove /etc/securetty from the default skeleton. + - Migration of sysV initscripts from the default skeleton to + a package called 'initscripts', installed only when Busbox + init or sysvinit are used. + - Migration of the skeleton logic to a proper 'skeleton' + package. + - Addition of a 'linux-tools' infrastructure in the 'linux' + package, to support building user-space tools bundled + within the Linux kernel sources, such as perf and cpupower. + - Usage of backticks instead of make $(shell ...) to execute + shell commands. This allows to delay the evaluation of such + commands when actually needed, and not when expanding the + variables. It is useful to make 'make printvars' less + noisy, and as a preparation to support top-level parallel + build. + - Libtool .la files are not mungled for all package types, + instead of being handled only for packages using the + autotools-package infrastructure. + - Add mechanism to allow packages to express a dependency on + gcc versions. This is needed for packages that use C++11 or + C11 support for example. + + Important package updates: + + - Complete rework of the matchbox packaging + - Lots of fixes in packages for compatibility with musl and + gcc 5. + - Hash files added to a large number of packages. + - Update a significant number of packages to use a new + hosting, after the announcement of Google Code and + Gitorious closing. + - Major packages needed for SELinux support have been merged, + but the support is not complete yet. + - Significant update of OpenCV to version 3.0, and addition + of lots of eatures. + - Significant update of all packages supporting the GPU and + VPU of i.MX ARM processors. + - Addition of systemd support in a significant number of + packages. + - Qt5 updated to 5.5.0 + - Use modular X.org server by default instead of KDrive + + Filesystems: + + - Complete overhaul of the iso9660 support. Now allows to use + directly IS9660 as the root filesystem format and not only + an initrd, and supports Grub 2 and isolinux in addition to + Grub. + + Updated packages: a10disp, agentpp, apache, at91bootstrap3, + audit, barebox, bc, bind, bmon, boost, btrfs-progs, + ca-certificates, can-utils, ccache, cloog, collectd, connman, + coreutils, c-periphery, cryptsetup, dado, dbus, dejavu, + dhcpcd, dnsmasq, dosfstools, dovecot, dovecot-pigeonhole, + e2fsprogs, ejabberd, erlang-p1-cache-tab, erlang-p1-sip, + erlang-p1-stringprep, erlang-p1-stun, erlang-p1-tls, + erlang-p1-utils, erlang-p1-xml, erlang-p1-yaml, ethtool, + eudev, evtest, exim, expect, explorercanvas, feh, ffmpeg, + file, flashrom, freescale-imx, freetype, gawk, gcc, gdb, + gettext, git, glib-networking, gnupg2, gnutls, gpsd, gptfdisk, + gpu-viv-bin-mx6q, gst-fsl-plugins, harfbuzz, hdparm, heimdal, + i2c-tools, imagemagick, imx-vpu, iproute2, ipset, isl, iw, + kodi, kodi-addon-xvdr, kodi-audioencoder-flac, + kodi-audioencoder-lame, kodi-audioencoder-vorbis, + kodi-audioencoder-wav, lftp, libass, libassuan, libcec, + libconfi, libcurl, libdrm, libevdev, libfreefare, libfslcodec, + libfslparser, libfslvpuwrap, libfuse, libglib2, libgpgme, + libgtk2, libgtk3, libical, libidn, libiio, libinput, libiscsi, + libllcp, libmicrohttpd, libnfc, libnss, libpcap, libpciaccess, + libpng, libserialport, libsigrok, libsoc, libtirpc, libubox, + libunistring, libupnp, libuv, libv4l, libva, + libva-intel-driver, libXrandr, lighttpd, linenoise, linux, + linux-firmware, linux-headers, live555, ltrace, lua, + lua-csnappy, lua-ev, luajit, lua-messagepack, luaperiphery, + lvm2, lxc, lzo, mesa3d, mesa3d-headers, midori, mmc-utils, + modem-manager, mono, mosquitto, mpd, mpd-mpc, mpfr, mpg123, + mtd, musl, nano, netperf, network-manager, nfs-utils, nginx, + nodejs, ntp, ola, opencv, openldap, openssh, openssl, + openswan, openvmtools, openvpn, opkg, orbit, orc, pcmanfm, + perl-cross, perl-encode-locale, perl-io-socket-ssl, + perl-mojolicious, perl-net-ssleay, perl-path-tiny, perl-uri, + perl-xml-libxml, php, pinentry, polarssl, postgresql, + pulseview, pure-ftpd, python, python-dpkt, python-lxml, + python-networkmanager, python-pyinotify, python-pypcap, + python-tornado, qextserialport, qt, qt5, rapidjson, redis, + rpcbind, rpi-firmware, rpi-userland, samba4, shairport-sync, + snmpp, sqlite, squid, strongswan, stunnel, sudo, sunxi-boards, + sunxi-mali, sysdig, sysstat, systemd, tcpdump, tiff, tmux, + tor, txheadend, tzdata, uboot, uclibc, ulogd, upmpdcli, + usb_modeswitch, usb_modeswitch_data, vala, vsftpd, wayland, + weston, whois, wireless-regdb, wireshark, x264, xapp_xvinfo, + xdriver_xf86-input-libinput, xdriver_xf86-input-vmmouse, + xdriver_xf86-video-cirrus, xdriver_xf86-video-geode, + xdriver_xf86-video-imx-viv, xdriver_xf86-video-mach64, + xdriver_xf86-video-neomagic, xdriver_xf86-video-r128, + xdriver_xf86-video-savage, xdriver_xf86-video-siliconmotion, + xdriver_xf86-video-vesa, xkeyboard-config, xlib_libfontenc, + xlib_libFS, xlib_libXaw, xlib_libxkbfile, xlib_libXrender, + xlib_libXt, xproto_kbproto, xproto_xproto, xproto_xrandrproto, + xscreensaver, xserver_xorg-server, xtables-addons, yaml-cpp, + zic. + + New packages: angularjs, atf, audit, c-icap, c-icap-modules, + cpio, dawgdic, faketime, fcgiwrap, gflags, glog, initscripts, + jquery-datetimepicker, kodi-audioencoder-modplug, + kodi-audioencoder-nosefar, kodi-audioencoder-sidplay, + kodi-audioencoder-snesapu, kodi-audioencoder-stsound, + kodi-audioencoder-timidity, kodi-audioencoder-vgmstream, + kodi-platform, kodi-pvr-argustv, kodi-pvr-dvblink, + kodi-pvr-dvbviewer, kodi-pvr-filmon, kodi-pvr-hts, + kodi-pvr-iptvsimple, kodi-pvr-mediaportal-tvserver, + kodi-pvr-mythtv, kodi-pvr-nextpvr, kodi-pvr-njoy, + kodi-pvr-pctv, kodi-pvr-stalker, kodi-pvr-vbox, + kodi-pvr-vdr-vnsi, kodi-pvr-vuplus, kodi-pvr-wmc, + kodi-screensaver-asteroids, kodi-screensaver-biogenesis, + kodi-screensaver-crystalmorph, kodi-screensaver-greynetic, + kodi-screensaver-pingpong, kodi-screensaver-pyro, + kodi-screensaver-stars, kodi-visualisation-shadertoy, + kodi-visualisation-spectrum, kodi-visualisation-waveforhue, + kodi-visualisation-waveform, kvmtool, kyua, libfm, + libfm-extra, libplatform, librtas, libsodium, libsquish, + libucl, libump, linux-backports, lua-iconv, lutok, menu-cache, + moarvm, monkey, mono-gtksharp3, mosh, openipmi, python-can, + python-pycli, python-pydal, python-pyyaml, python-web2py, + qpid-proton, qt5webchannel, quazip, racehound, rtl8188eu, + rtl8821au, sepolgen, setools, skeleton, stm32flash, + webkitgtk24, xdriver_xf86-video-qxl, zynq-boot-bin. + + Deprecated packages: webkitgtk, libgail, eglibc support in + glibc package. + + Issues resolved (http://bugs.uclibc.org): + + #4291: Segmentation fault with all binaries that use threads + when compiled with gcc 4.6 + #6944: building toolchain for sh4 fails + #7592: Buildroot GCC: -lto requires plugin support in ranlib + #7628: Python SSL does not get built for Raspberry Pi + #7682: Missing dependencies for NFS + #7742: dhcp lacks important features when BR2_ENABLE_DEBUG + #7754: make: *** [/..../buildroot-2014.11/output/build/host-gcc-initial-4.8.3/.stamp_built] Error 2 + #7946: libglib2-2.42.2 fails to build for sparc-buildroot-linux-gnu + #7956: glibc 2.20 and 2.21 fail to build for sh64-buildroot-linux-gnu + #7971: python-flask, python-werkzeug. No module named zlib + #7981: Target file system skeleton permissions hazard + #8006: rpcdebug in nfs-utils built for the host + #8036: alsa-lib headers problem that prevents to compile alsa + dependent projects + #8081: systemd init system: /tmp is not mode 1777 + #8121: php opcache extension doesn't get installed + #8151: x86-64 make fails with ncurses 5.9 + #8156: pkg-kconfig infra broken for *-update-{config, defconfig} + #8161: default /bin/sh symlink to busybox is full path and not relative + #8171: glamor missing + #8191: Request update support for the cubieboard series + #8201: Important security upgrades for node.js + +2015.05, Released May 31st, 2015 + + Minor fixes. + + Updated/fixed packages: conntrack-tools, directfb, fio, flite, + gptfdisk, ipmiutil, iproute2, janus-gateway, keyutils, knock, + libelementary, libgcrypt, libgsasl, libjpeg, libstrophe, + lttng-libust, nbd, ncurses, nmap, php, postgresql, python, + python3, sconeserver, udpcast, upmpdcli + +2015.05-rc3, Released May 22nd, 2015 + + Several fixes, mainly related to static linking. + + Updated/fixed packages: acl, alsa-utils, apr, armadillo, attr, + autoconf-archive, binutils, boost, czmq, dhcpcd, duma, + enlightenment, exim, fbterm, freerdp, gcc, gdk-pixbuf, + google-breakpad, gpsd, heirloom-mailx, hwloc, ipmiutil, + iproute2, jack2, jasper, kmod, lcdproc, leafnode2, libcap-ng, + libftdi1, libmatroska, libmemcached, libmodbus, libnftnl, + libsigrok, libupnpp, libuv, libxml-parser-perl, linux, + linux-headers, lirc-tools, lua-periphery, lxc, mongoose, mono, + mpg123, mosquitto, neardal, newt, ntp, ola, openldap, opencv, + php, postgresql, protobuf, pulseaudio, python-pyqt, qemu, qt, + qt5base, rpi-userland, rsyslog, snmppp, sqlite, tiff, + tinyxml2, uboot-tools, unionfs, ux5000-firmware, usbredir, + ushare, vpnc, vsftpd, wavpack, wireless_tools, wsapi, + wvstreams, xmlstarlet, zeromq, zmqpp + + New packages: c-periphery + + Issues resolved (http://bugs.uclibc.org): + + #8106: mkfs.jffs2 uses the --pagesize parameter incorrectly + #8111: 2015.05.rc2 LIBFOO_CONF_OPTS not working + #8126: exim lacks plaintext and cram-md5 auth + +2015.05-rc2, Released May 11th, 2015 + + Minor fixes. + + Toolchain: PR56780 backport to GCC 4.8.4 to fix GDB linking + issues. Context functions enabled for uClibc snapshot / + uClibc-NG. + + Architectures: Endian handling symbol for Xtensa, binutils + fixes. + + Infrastructure: Fix for kernel module stripping when + localversion contains spaces. + + Updated/fixed packages: at, autoconf-archive, binutils, + cc-tool, cryptsetup, dstat, expedite, freerdp, giflib, + gnuchess, guile, ipmiutil, iproute2, mono, monolite, neard, + ola, poppler, postgresql, python-qt, qt, sqlite, valgrind, + xlib_libXfont + + Issues resolved (http://bugs.uclibc.org): + + #8086: Cannot select systemd as init with Linaro 2014.09... + +2015.05-rc1, Released May 4th, 2015 + + Fixes all over the tree and new features. + + Architectures: Removed AVR32 support, deprecate SH64, added + support for steamroller, corei7-avx and core-avx2 x86 + variants. + + Toolchains: IPv6 and Largefile support now enforced for + uClibc. Corresponding Kconfig symbols removed. + + External CodeSourcery AMD64 2014.05, MUSL-cross 1.1.6 added, + CS sh2, Xilinx microblaze v2/14.3 removed. Distro-class + external toolchains are now detected and blacklisted. + + Internal toolchain support for Nios2 added, Blackfin + removed. Aarch64 and sh musl support. uClibc-ng support added. + + Libatomic is now handled for internal and external + toolchains. Link time optimization (LTO) support. + + New Defconfigs: Freescale i.MX28 EVK, i.MX31 PDK and SABRE + Auto, Raspberry Pi 2, RIoTboard, + + Infrastructure: Hashes for a large number of packages have + been added. Missing hashes now stop the build unless + explicitly disabled. + + Spaces and colons (:) are now supported in package + versions. Dependencies can now be listed for the patch step + (_PATCH_DEPENDENCIES). Kconfig and Linux kernel + extensions infrastructure has been added. + + Makedevs now has a recursive (r) option. + + The variable containing the list of packages to build has been + renamed from TARGETS to PACKAGES. + + Make external-deps / legal-info / source / source-check have + been reimplemented using the package infrastructure, so their + output/behaviour may differ from earlier (some packages were + not included in the past). + + The old insecure DES password encoding is no longer supported. + + U-Boot patch option now support direct references to patch + files and URLs in addition to directories of patches. The + i.MX28 SD format (u-boot.sd) is now supported. + + Updated/fixed packages: agentpp, aircrack-ng, alsa-lib, + alsa-utils, apr-util, apr, atk, autossh, avahi, avrdude, + bcusdk, bdwgc, bind, binutils, bmon, boost, botan, + btrfs-progs, busybox, ca-certificates, cairo, can-utils, + canfestival, ccache, chrony, civetweb, clamav, cmake, + collectd, connman, copas, crda, cryptodev-linux, cryptsetup, + cups, czmq, dbus-cpp, dbus-glib, dbus-python, dbus, dfu-util, + dhcp, dhcpcd, dialog, dillo, dmraid, dnsmasq, dos2unix, + dosfstools, dovecot-pigeonhole, dovecot, dropbear, dropwatch, + dtv-scan-tables, dvdauthor, e2fsprogs, ecryptfs-utils, + libevas, elfutils, enscript, erlang, espeak, eudev, evemu, + exfat-utils, exim, f2fs-tools, feh, ffmpeg, fftw, flickcurl, + fltk, fluxbox, fmlib, fmtools, freeradius-client, freerdp, + gamin, gawk, gcc-final, gcc, gd, gdb, gengetopt, geoip, git, + glib-networking, gnu-efi, gnuchess, gnutls, gpsd, gptfdisk, + gpu-viv-bin-mx6q, gst-plugin-bad, gstreamer, gstreamer1, + gtest, gvfs, harfbuzz, haserl, haveged, hiawatha, + hicolor-icon-theme, hostapd, hplip, httping, i2c-tools, icu, + ifplugd, imagemagick, imlib2, iozone, iproute2, iptables, + iputils, irqbalance, iw, jack2, jhead, jimtcl, json-c, kexec, + kismet, kmod, kodi-audioencoder-flac, + kodi-audioencoder-vorbis, kodi-pvr-addons, kodi, ktap, lcms2, + libass, libatomic_ops, libbluray, libcap, libcgroup, libcurl, + libdrm, libdvbsi, libebml, libecore, libedit, liberation, + libev, libevas, libevdev, libftdi, libgcrypt, libglib2, + libgpgme, libgtk2, libgtk3, libiconv, libidn, libiio, + libinput, libiscsi, libksba, liblinear, libmatroska, + libmicrohttpd, libmodbus, libmpdclient, libnice, libnl, + libnspr, libnss, libpcap, libpciaccess, libphidget, libplayer, + libpthsem, libqmi, librsvg, libseccomp, libsigrok, libsoup, + libsrtp, libssh2, libtasn1, libtool, libunistring, liburcu, + libusb, libuv, libva-intel-driver, libva, libvncserver, + libvorbis, libvpx, libwebsockets, libxml2, libzip, lightning, + lighttpd, linknx, linphone, linux-firmware, linux-headers, + linux-pam, live555, ljsyscall, lmbench, lockdev, logrotate, + lpc3250loader, lpeg, lsof, lttng-libust, lttng-modules, + lttng-tools, lua, luacrypto, luafilesystem, luajit, luaposix, + luarocks, lvm2, lxc, make, + matchbox-{common,desktop,fakekey,keyboard,lib,startup-monitor,vm}, + matchbox, mcelog, memcached, memstat, memtest86, mesa3d, + minidlna, mjpegtools, mjpg-streamer, modem-manager, mongoose, + monit, mono, monolite, mp4v2, mpc, mpd, mpdecimal, mpg123, + mplayer, musl, nano, nbd, ncftp, ncmpc, ncurses, ne10, neard, + neardal, net-tools, netatalk, netsnmp, network-manager, nginx, + nodejs, ntfs-3g, ntp, numactl, odhcp6c, ofono, open2300, + opencv, openldap, openntpd, openocd, openssh, openssl, + openswan, opentyrian, openvmtools, openvpn, oprofile, p11-kit, + pango, patch, patchelf, pciutils, pcre, perf, perl-gdgraph, + perl-io-socket-ssl, perl-json-tiny, perl-module-build, + perl-mojolicious, perl-net-ssleay, perl-path-tiny, + perl-xml-libxml, perl, phidgetwebservice, php-gnupg, php, + pkgconf, polarssl, poppler, popt, postgresql, powerpc-utils, + pppd, prboom, procps-ng, proftpd, psplash, ptpd2, + python-{cheetah,coherence,django,markdown,netifaces,pam,six}, + python-tornado, python-twisted, python-zope-interface, python, + python3, qemu, qt, qt5, qt5base, qt5multimedia, + qt5xmlpatterns, qt5cinex, quagga, qwt, radvd, readline, + rng-tools, rpcbind, rpi-firmware, rpi-userland, rsync, + rsyslog, rtai, rtmpdump, ruby, sam-ba, samba, samba4, + sane-backends, sconeserver, shairport-sync, sigrok-cli, slang, + smcroute, snmppp, socat, socketcand, sofia-sip, sox, + spawn-fcgi, speex, sqlcipher, sqlite, squid, strace, + strongswan, stunnel, sudo, sunxi-boards, swig, sysstat, + systemd, tcpdump, tftpd, thrift, thttpd, ti-gfx, ti-utils, + tiff, tinyalsa, tn5250, transmission, trinity, tslib, + tvheadend, tzdata, uboot-tools, uclibc, ulogd, usb_modeswitch, + usbutils, ustr, util-linux, vala, valgrind, vlc, wayland, + webp, weston, wget, which, whois, wireless-regdb, + wireless_tools, wireshark, wpa_supplicant, wvstreams, + xapp_{bdftopcf,bitmap,fonttosfnt,fslsfonts}, + xapp_{fstobdf,iceauth,mkfontscale,oclock,rgb,sessreg,setxkbmap}, + xapp_{showfont,smproxy,twm,x11perf,xcalc,xclipboard,xcmsdb}, + xapp_{xdbedizzy,xditview,xdpyinfo,xdriinfo,xedit,xev,xeyes}, + xapp_{xf86dga,xfsinfo,xgamma,xgc,xhost,xinit,xinput,xkbcomp}, + xapp_{xkbevd,xkbprint,xlsatoms,xlsfonts,xmag,xman,xmh,xmodmap}, + xapp_xmore, xcb-util-image, xcb-util-keysyms, + xdata_xcursor-themes, + xdriver_xf86-input-{evdev,keyboard,synaptics,void}, + xdriver_xf86-video-{ati,cirrus,geode,mach64,mga,neomagic}, + xdriver_xf86-video-{r128,savage,siliconmotion,sis,tdfx}, + xdriver_xf86-video-{trident,vmware,voodoo}, xenomai, + xfont_font-util, xkeyboard-config, + xlib_lib{ICE,X11,Xdmcp,Xfont,Xpm,XvMC}, + xlib_lib{Xxf86vm,xshmfence,xtrans}, xproto_randrproto, + xproto_xproto, xserver_xorg-server, x11vnc, x264, xerces, + xorriso, xterm, xz, yaml-cpp, zeromq, zic, zmqpp + + New packages: apache, autoconf-archive, batctl, + bitstream-vera, bullet, cc-tool, doxygen, drbd-utils, + dvdrw-tools, gnuradio, gst1-imx, hans, hwloc, ijs, + imx-usb-loader, inconsolata, iodine, iotop, ipmiutil, jsoncpp, + leveldb, libdcadec, libdri2, libfreeimage, libftdi1, + libsidplay2, lirc-tools, lua-periphery, mc, mesa3d-headers, + mosquitto, nvidia-driver, nvidia-tegra23{,-binaries,-codecs}, + openjpeg, opusfile, perl-crypt-openssl-{random,rsa}, + perl-db-file, perl-digest-{hmac,sha1}, + perl-encode-{detect,locale}, perl-file-{listing,util}, + perl-html-{parser,tagset}, perl-http-cookies, + perl-http-{daemon,date,message,negotiate}, perl-io-html, + perl-libwww-perl, perl-lwp-mediatypes, perl-mail-dkim, + perl-mailtools, perl-mime-base64, perl-net-{dns,http}, + perl-netaddr-ip, perl-time-hires, perl-timedate, perl-uri, + perl-www-robotrules, powertop, pulseview, + python-{cherrypy,lxml,mako,pyqt,pyxml,sip,spidev,ws4py}, qpdf, + qt-webkit-kiosk, sl, softether, sysdig, tinyxml2, tor, tovid, + unixodbc, wf111, wine, libepoxy, xapp_xcompmgr, + xapp_xfindproxy, xcb-util-cursor, xcb-util-renderutil, + xdriver_xf86-input-libinput, xdriver_xf86-video-imx{,-viv}, + xproto_xproxymanagementprotocol + + Removed packages: gtk2-theme-hicolor + + Deprecated packages: samba + + Issues resolved (http://bugs.uclibc.org): + + #7478: Multiple chosen python modules are not built due to... + #7508: Use of BR2_EXTERNAL and dependencies to existing packages + #7676: Package procps-ng installs binaries to nonsensical folder + #7724: Startx is not installed in the target + #7760: botan: wrong prefix in botan-1.10.pc + #7826: Building of cdparanoia + #7844: Lua with hard-float on MIPS by buildroot doesn't work + #7874: X.org configure error + #7941: glibc-2.20 fails to build for sparc-buildroot-linux-gnu + #7951: gcc 4.9.2 fails to build for sparc-buildroot-linux-gnu + #7961: Qt5 fails to build for xtensa-buildroot-linux-uclibc + #7976: mkuser script fails with: user already exists with... + #8011: When building only busybox and strace, strace fails... + #8016: collectd fails to build, network.c:171:19: error:... + #8041: error on building libcurl7.42.0 + +2015.02, Released March 1st, 2015 + + Minor fixes. + + Updated/fixed packages: civetweb, ding-libs, + directfb-examples, glibc, gnupg, gnupg2, gpm, + gst-plugins-good, gst1-plugins-good, freetype, libao, libevas, + libevent, libfribidi, libgcrypt, libgtk2, libshout, libsrtp, + libtheora, libupnpp, libxmlrpc, linux, make, opus, pinentry, + rpi-firmware, shared-mime-info, vlc, vorbis-tools, + xcb-util-keysyms + + Removed packages: libgc + +2015.02-rc3, Released February 24th, 2015 + + Minor fixes. + + Cmake and rebar (erlang) infrastructure fixes. + + Updated/fixed packages: bind, btrfs-progs, busybox, e2fsprogs, + evtest, ffmpeg, fltk, gnutls, i2c-tools, imagemagick, libxcb, + make, mjpg-streamer, netsnmp, opentyrian, php, polarssl, + qt5base, samba, samba4, sudo, util-linux, xserver_xorg-server + +2015.02-rc2, Released February 15th, 2015 + + Minor fixes. + + raspberrypi: fix kernel sha1 for DT variant. + + Updated/fixed packages: dbus, dvdauthor, git, libsemanage, + libsepol, libssh2, mplayer, ntp, openvmtools, python3, + qt5base, qt5connectivity, xserver_xorg-server + +2015.02-rc1, Released February 8th, 2015 + + Fixes all over the tree and new features. + + Static/shared library handling reworked. This is now a + tristate (shared only / shared and static / static + only). Default is now shared only to speed up the + build. BR2_PREFER_STATIC_LIB is now called BR2_STATIC_LIBS. + + The toolchain (internal and external) will now warn when an + unsafe library or header path is used (such as /usr/include or + /usr/lib). If BR2_COMPILER_PARANOID_UNSAFE_PATH is enabled + under build options this instead becomes an error. + + A installation path issue with the internal musl toolchain + support has been fixed so it is now possible to reuse it as an + external toolchain. + + Architectures: Freescale E5500 and E6500 PowerPC support + added, deprecated MIPS 1/2/3/4 support removed. + + New defconfigs: Freescale p2020ds, MIPS creator CI20, + Raspberrypi with DT, UDOO Quad. + + 'make _defconfig' now saves the path to the defconfig in + the .config, so a 'make savedefconfig' automatically updates + it. + + Infrastructure for packages using the Erland rebar tool has + been added. + + Hashes for a large number of packages have been added. Hashes + are now checked for both target and host packages. + + The system menu now has an option to automatically configure a + network interface through DHCP at bootup. + + The default filesystem skeleton now uses a separate tmpfs for + /run instead of a symlink to /tmp/ for security reasons / to + protect against conflicts with user generated temporary files. + + BR2_EXTERNAL is now exported to post-build and post-image + scripts. + + New packages: bdwgc, benejson, blktrace, bootstrap, cgic, + ding-libs, dvdauthor, ejabberd, erlang-goldrush, erlang-lager, + erlang-p1-cache-tab, erlang-p1-iconv, erlang-p1-sip, + erlang-p1-stringprep, erlang-p1-stun, erlang-p1-tls, + erlang-p1-utils, erlang-p1-xml, erlang-p1-yaml, + erlang-p1-zlib, exiv2, freeradius-client, gengetopt, glmark2, + gpu-amd-bin-mx51, guile, host-qemu, ifupdown, iperf3, + janus-gateway, kodi, kodi-audioencoder-flac, + kodi-audioencoder-lame, kodi-audioencoder-vorbis, + kodi-audioencoder-wav, libcli, libiio, liblinear, libnice, + libselinux, libsemanage, libserialport, libsigro, + libsigrokdecode, libsrtp, liburiparser, libvips, libwebsock, + libz160, libzip, lightning, mcelog, memtest86, mjpegtools, + mjpg-streamer, mke2img, mpd-mpc, netsurf-buildsystem, odhcp6c, + openldap, python-alsaaudio, python-certifi, python-cheetah, + python-coherence, python-django, python-docopt, python-enum, + python-enum34, python-flask, python-gobject, python-httplib2, + python-ipaddr, python-itsdangerous, python-jinja, + python-markdown, python-markupsafe, python-networkmanager, + python-pam, python-psutil, python-pyftpdlib, python-pyinotify, + python-pysendfile, python-pyxb, python-requests, python-six, + python-twisted, python-webpy, python-werkzeug, + python-zope-interface, qt5cinex, sigrok-cli, sofia-sip, + start-stop-daemon, szip, triggerhappy, ustr, vnstat, xorriso, + xtables-addons + + Removed packages (target): bison, distcc, gob2, m4 + + Issues resolved (http://bugs.uclibc.org): + + #7556: make interactive CLI optional for nftables + #7730: Error while connecting Qt Cretaor to device + #7766: logrotate default gzip path is usually wrong + #7790: Invalid ext4 image generated by Buildroot + 2014.11, Released December 1st, 2014 Minor fixes. diff --git a/buildroot/COPYING b/buildroot/COPYING index d511905c1..0c018b039 100644 --- a/buildroot/COPYING +++ b/buildroot/COPYING @@ -1,3 +1,19 @@ +With the exceptions below, Buildroot is distributed under the terms of +the GNU General Public License, reproduced below; either version 2 of +the License, or (at your option) any later version. + +Some files in Buildroot contain a different license statement. Those +files are licensed under the license contained in the file itself. + +Buildroot also bundles patch files, which are applied to the sources +of the various packages. Those patches are not covered by the license +of Buildroot. Instead, they are covered by the license of the software +to which the patches are applied. When said software is available +under multiple licenses, the Buildroot patches are only provided under +the publicly accessible licenses. + +----------------------------------------------------------------- + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 diff --git a/buildroot/Config.in b/buildroot/Config.in index f5b6c7346..e35a78fb7 100644 --- a/buildroot/Config.in +++ b/buildroot/Config.in @@ -14,23 +14,53 @@ config BR2_HOSTARCH string option env="HOSTARCH" -config BR2_EXTERNAL +config BR2_BASE_DIR string - option env="BR2_EXTERNAL" + option env="BASE_DIR" -# Hidden boolean selected by packages in need of Java in order to build -# (example: xbmc) -config BR2_NEEDS_HOST_JAVA +# br2-external paths definitions +source "$BR2_BASE_DIR/.br2-external.in.paths" + +# Hidden config symbols for packages to check system gcc version +config BR2_HOST_GCC_VERSION + string + option env="HOST_GCC_VERSION" + +config BR2_HOST_GCC_AT_LEAST_4_9 + bool + default y if BR2_HOST_GCC_VERSION = "4 9" + +config BR2_HOST_GCC_AT_LEAST_5 + bool + default y if BR2_HOST_GCC_VERSION = "5" + select BR2_HOST_GCC_AT_LEAST_4_9 + +config BR2_HOST_GCC_AT_LEAST_6 bool + default y if BR2_HOST_GCC_VERSION = "6" + select BR2_HOST_GCC_AT_LEAST_5 -# Hidden boolean selected by packages in need of javac in order to build -# (example: classpath) -config BR2_NEEDS_HOST_JAVAC +config BR2_HOST_GCC_AT_LEAST_7 bool + default y if BR2_HOST_GCC_VERSION = "7" + select BR2_HOST_GCC_AT_LEAST_6 -# Hidden boolean selected by packages in need of jar in order to build -# (example: classpath) -config BR2_NEEDS_HOST_JAR +config BR2_HOST_GCC_AT_LEAST_8 + bool + default y if BR2_HOST_GCC_VERSION = "8" + select BR2_HOST_GCC_AT_LEAST_7 + +config BR2_HOST_GCC_AT_LEAST_9 + bool + default y if BR2_HOST_GCC_VERSION = "9" + select BR2_HOST_GCC_AT_LEAST_8 + +# When adding new entries above, be sure to update +# the HOSTCC_MAX_VERSION variable in the Makefile. + +# Hidden boolean selected by packages in need of Java in order to build +# (example: kodi) +config BR2_NEEDS_HOST_JAVA bool # Hidden boolean selected by pre-built packages for x86, when they @@ -45,6 +75,16 @@ config BR2_HOSTARCH_NEEDS_IA32_LIBS config BR2_HOSTARCH_NEEDS_IA32_COMPILER bool +# Hidden boolean selected by packages that need the host to have an +# UTF8 locale. +config BR2_NEEDS_HOST_UTF8_LOCALE + bool + +# Hidden boolean selected by packages that need the host to have +# support for building gcc plugins +config BR2_NEEDS_HOST_GCC_PLUGIN_SUPPORT + bool + source "arch/Config.in" menu "Build options" @@ -57,7 +97,7 @@ config BR2_WGET config BR2_SVN string "Subversion (svn) command" - default "svn" + default "svn --non-interactive" config BR2_BZR string "Bazaar (bzr) command" @@ -79,10 +119,6 @@ config BR2_SCP string "Secure copy (scp) command" default "scp" -config BR2_SSH - string "Secure shell (ssh) command" - default "ssh" - config BR2_HG string "Mercurial (hg) command" default "hg" @@ -91,9 +127,9 @@ config BR2_ZCAT string "zcat command" default "gzip -d -c" help - Command to be used to extract a gzip'ed file to stdout. - zcat is identical to gunzip -c except that the former may - not be available on your system. + Command to be used to extract a gzip'ed file to stdout. zcat + is identical to gunzip -c except that the former may not be + available on your system. Default is "gzip -d -c" Other possible values include "gunzip -c" or "zcat". @@ -114,13 +150,20 @@ config BR2_XZCAT Command to be used to extract a xz'ed file to stdout. Default is "xzcat" +config BR2_LZCAT + string "lzcat command" + default "lzip -d -c" + help + Command to be used to extract a lzip'ed file to stdout. + Default is "lzip -d -c" + config BR2_TAR_OPTIONS string "Tar options" default "" help Options to pass to tar when extracting the sources. - E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files - and to be verbose. + E.g. " -v --exclude='*.svn*'" to exclude all .svn internal + files and to be verbose. endmenu @@ -133,8 +176,8 @@ config BR2_DEFCONFIG default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" default "$(CONFIG_DIR)/defconfig" help - When running 'make savedefconfig', the defconfig file will be saved - in this location. + When running 'make savedefconfig', the defconfig file will be + saved in this location. config BR2_DL_DIR string "Download dir" @@ -142,7 +185,11 @@ config BR2_DL_DIR help Directory to store all the source files that we need to fetch. If the Linux shell environment has defined the BR2_DL_DIR - environment variable, then this overrides this configuration item. + environment variable, then this overrides this configuration + item. + The directory is organized with a subdirectory for each + package. Each package has its own $(LIBFOO_DL_DIR) variable + that can be used to find the correct path. The default is $(TOPDIR)/dl @@ -150,9 +197,9 @@ config BR2_HOST_DIR string "Host dir" default "$(BASE_DIR)/host" help - Directory to store all the binary files that are built for the host. - This includes the cross compilation toolchain when building the - internal buildroot toolchain. + Directory to store all the binary files that are built for the + host. This includes the cross compilation toolchain when + building the internal buildroot toolchain. The default is $(BASE_DIR)/host @@ -162,13 +209,13 @@ config BR2_PRIMARY_SITE string "Primary download site" default "" help - Primary site to download from. If this option is set then buildroot - will try to download package source first from this site and try the - default if the file is not found. - Valid URIs are URIs recognized by $(WGET) and scp URIs of the form - scp://[user@]host:path. - NOTE: This works for all packages using the central package - infrastructure (generic, autotools, cmake, ...) + Primary site to download from. If this option is set then + buildroot will try to download package source first from this + site and try the default if the file is not found. + Valid URIs are: + - URIs recognized by $(WGET) + - local URIs of the form file://absolutepath + - scp URIs of the form scp://[user@]host:path. config BR2_PRIMARY_SITE_ONLY bool "Only allow downloads from primary download site" @@ -177,11 +224,11 @@ config BR2_PRIMARY_SITE_ONLY If this option is enabled, downloads will only be attempted from the primary download site. Other locations, like the package's official download location or the backup download - site, will not be considered. Therefore, if the package is - not present on the primary site, the download fails. + site, will not be considered. Therefore, if the package is not + present on the primary site, the download fails. - This is useful for project developers who want to ensure - that the project can be built even if the upstream tarball + This is useful for project developers who want to ensure that + the project can be built even if the upstream tarball locations disappear. if !BR2_PRIMARY_SITE_ONLY @@ -190,38 +237,40 @@ config BR2_BACKUP_SITE string "Backup download site" default "http://sources.buildroot.net" help - Backup site to download from. If this option is set then buildroot - will fall back to download package sources from here if the - normal location fails. + Backup site to download from. If this option is set then + buildroot will fall back to download package sources from here + if the normal location fails. config BR2_KERNEL_MIRROR string "Kernel.org mirror" - default "https://www.kernel.org/pub" + default "https://cdn.kernel.org/pub" help - kernel.org is mirrored on a number of servers around the world. - The following allows you to select your preferred mirror. + kernel.org is mirrored on a number of servers around the + world. The following allows you to select your preferred + mirror. By default, a CDN is used, which automatically + redirects to a mirror geographically close to you. - Have a look on the kernel.org site for a list of mirrors, then enter - the URL to the base directory. Examples: + Have a look on the kernel.org site for a list of mirrors, then + enter the URL to the base directory. Examples: http://www.XX.kernel.org/pub (XX = country code) http://mirror.aarnet.edu.au/pub/ftp.kernel.org config BR2_GNU_MIRROR string "GNU Software mirror" - default "http://ftp.gnu.org/pub/gnu" + default "http://ftpmirror.gnu.org" help - GNU has multiple software mirrors scattered around the world. - The following allows you to select your preferred mirror. + GNU has multiple software mirrors scattered around the + world. The following allows you to select your preferred + mirror. By default, a generic address is used, which + automatically selects an up-to-date and local mirror. - Have a look on the gnu.org site for a list of mirrors, then enter - the URL to the base directory. Examples: + Have a look on the gnu.org site for a list of mirrors, then + enter the URL to the base directory. Examples: http://ftp.gnu.org/pub/gnu http://mirror.aarnet.edu.au/pub/gnu -endif - config BR2_LUAROCKS_MIRROR string "LuaRocks mirror" default "http://rocks.moonscript.org" @@ -234,37 +283,37 @@ config BR2_CPAN_MIRROR string "CPAN mirror (Perl packages)" default "http://cpan.metacpan.org" help - CPAN (Comprehensive Perl Archive Network) is a repository - of Perl packages. It has multiple software mirrors scattered + CPAN (Comprehensive Perl Archive Network) is a repository of + Perl packages. It has multiple software mirrors scattered around the world. This option allows you to select a mirror. The list of mirrors is available at: http://search.cpan.org/mirror +endif + endmenu config BR2_JLEVEL int "Number of jobs to run simultaneously (0 for auto)" default "0" help - Number of jobs to run simultaneously. If 0, determine - automatically according to number of CPUs on the host - system. + Number of jobs to run simultaneously. If 0, determine + automatically according to number of CPUs on the host system. config BR2_CCACHE bool "Enable compiler cache" help - This option will enable the use of ccache, a compiler - cache. It will cache the result of previous builds to speed - up future builds. By default, the cache is stored in + This option will enable the use of ccache, a compiler cache. + It will cache the result of previous builds to speed up future + builds. By default, the cache is stored in $HOME/.buildroot-ccache. Note that Buildroot does not try to invalidate the cache - contents when the compiler changes in an incompatible - way. Therefore, if you make a change to the compiler version - and/or configuration, you are responsible for purging the - ccache cache by removing the $HOME/.buildroot-ccache - directory. + contents when the compiler changes in an incompatible way. + Therefore, if you make a change to the compiler version and/or + configuration, you are responsible for purging the ccache + cache by removing the $HOME/.buildroot-ccache directory. if BR2_CCACHE @@ -273,46 +322,53 @@ config BR2_CCACHE_DIR default "$(HOME)/.buildroot-ccache" help Where ccache should store cached files. + If the Linux shell environment has defined the BR2_CCACHE_DIR + environment variable, then this overrides this configuration + item. config BR2_CCACHE_INITIAL_SETUP string "Compiler cache initial setup" help - Initial ccache settings to apply, such as --max-files or --max-size. - - For example, if your project is known to require more space than the - default max cache size, then you might want to increase the cache size - to a suitable amount using the -M (--max-size) option. + Initial ccache settings to apply, such as --max-files or + --max-size. - The string you specify here is passed verbatim to ccache. Refer to - ccache documentation for more details. + For example, if your project is known to require more space + than the default max cache size, then you might want to + increase the cache size to a suitable amount using the -M + (--max-size) option. - These initial settings are applied after ccache has been compiled. + The string you specify here is passed verbatim to ccache. + Refer to ccache documentation for more details. -endif - -config BR2_DEPRECATED - bool "Show options and packages that are deprecated or obsolete" - help - This option shows outdated/obsolete versions of packages and - options that are otherwise hidden. + These initial settings are applied after ccache has been + compiled. -if BR2_DEPRECATED - -config BR2_DEPRECATED_SINCE_2014_02 - bool - default y - -config BR2_DEPRECATED_SINCE_2014_05 - bool - default y - -config BR2_DEPRECATED_SINCE_2014_08 - bool - default y - -config BR2_DEPRECATED_SINCE_2015_02 - bool +config BR2_CCACHE_USE_BASEDIR + bool "Use relative paths" default y + help + Allow ccache to convert absolute paths within the output + directory into relative paths. + + During the build, many -I include directives are given with an + absolute path. These absolute paths end up in the hashes that + are computed by ccache. Therefore, when you build from a + different directory, the hash will be different and the cached + object will not be used. + + To improve cache performance, set this option to y. This + allows ccache to rewrite absolute paths within the output + directory into relative paths. Note that only paths within the + output directory will be rewritten; therefore, if you change + BR2_HOST_DIR to point outside the output directory and + subsequently move it to a different location, this will lead + to cache misses. + + This option has as a result that the debug information in the + object files also has only relative paths. Therefore, make + sure you cd to the build directory before starting gdb. See + the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache + manual for more information. endif @@ -336,11 +392,11 @@ choice config BR2_DEBUG_1 bool "debug level 1" help - Debug level 1 produces minimal information, enough - for making backtraces in parts of the program that - you don't plan to debug. This includes descriptions - of functions and external variables, but no information - about local variables and no line numbers. + Debug level 1 produces minimal information, enough for making + backtraces in parts of the program that you don't plan to + debug. This includes descriptions of functions and external + variables, but no information about local variables and no + line numbers. config BR2_DEBUG_2 bool "debug level 2" @@ -350,64 +406,41 @@ config BR2_DEBUG_2 config BR2_DEBUG_3 bool "debug level 3" help - Level 3 includes extra information, such as all the - macro definitions present in the program. Some debuggers - support macro expansion when you use -g3. + Level 3 includes extra information, such as all the macro + definitions present in the program. Some debuggers support + macro expansion when you use -g3. endchoice endif -choice - prompt "strip command for binaries on target" - default BR2_STRIP_strip - config BR2_STRIP_strip - bool "strip" - depends on !BR2_PACKAGE_HOST_ELF2FLT - help - Binaries and libraries in the target filesystem will be - stripped using the normal 'strip' command. This allows to - save space, mainly by removing debugging symbols. Debugging - symbols on the target are needed for native debugging, but - not when remote debugging is used. - -config BR2_STRIP_sstrip - bool "sstrip" - select BR2_PACKAGE_SSTRIP_HOST + bool "strip target binaries" + default y depends on !BR2_PACKAGE_HOST_ELF2FLT - depends on BR2_DEPRECATED_SINCE_2014_05 help Binaries and libraries in the target filesystem will be - stripped using the 'sstrip' command, which strips a little - bit more than the traditional 'strip' command. This allows to - save space, mainly by removing debugging symbols. Debugging - symbols on the target are needed for native debugging, but - not when remote debugging is used. - -config BR2_STRIP_none - bool "none" - help - Do not strip binaries and libraries in the target - filesystem. -endchoice + stripped using the normal 'strip' command. This allows to save + space, mainly by removing debugging symbols. Debugging symbols + on the target are needed for native debugging, but not when + remote debugging is used. config BR2_STRIP_EXCLUDE_FILES string "executables that should not be stripped" - depends on !BR2_STRIP_none default "" + depends on BR2_STRIP_strip help - You may specify a space-separated list of binaries and libraries - here that should not be stripped on the target. + You may specify a space-separated list of binaries and + libraries here that should not be stripped on the target. config BR2_STRIP_EXCLUDE_DIRS string "directories that should be skipped when stripping" - depends on !BR2_STRIP_none default "" + depends on BR2_STRIP_strip help - You may specify a space-separated list of directories that should - be skipped when stripping. Binaries and libraries in these - directories will not be touched. - The directories should be specified relative to the target directory, - without leading slash. + You may specify a space-separated list of directories that + should be skipped when stripping. Binaries and libraries in + these directories will not be touched. The directories should + be specified relative to the target directory, without leading + slash. choice prompt "gcc optimization level" @@ -418,77 +451,107 @@ choice config BR2_OPTIMIZE_0 bool "optimization level 0" help - Do not optimize. This is the default. + Do not optimize. config BR2_OPTIMIZE_1 bool "optimization level 1" help - Optimize. Optimizing compilation takes somewhat more time, - and a lot more memory for a large function. With -O, the - compiler tries to reduce code size and execution time, - without performing any optimizations that take a great deal - of compilation time. -O turns on the following optimization + Optimize. Optimizing compilation takes somewhat more time, and + a lot more memory for a large function. With -O, the compiler + tries to reduce code size and execution time, without + performing any optimizations that take a great deal of + compilation time. -O turns on the following optimization flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename - -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants - -O also turns on -fomit-frame-pointer on machines where doing - so does not interfere with debugging. + -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O + also turns on -fomit-frame-pointer on machines where doing so + does not interfere with debugging. config BR2_OPTIMIZE_2 bool "optimization level 2" help - Optimize even more. GCC performs nearly all supported optimizations - that do not involve a space-speed tradeoff. The compiler does not - perform loop unrolling or function inlining when you specify -O2. - As compared to -O, this option increases both compilation time and - the performance of the generated code. -O2 turns on all optimization - flags specified by -O. It also turns on the following optimization - flags: -fthread-jumps -fcrossjumping -foptimize-sibling-calls + Optimize even more. GCC performs nearly all supported + optimizations that do not involve a space-speed tradeoff. The + compiler does not perform loop unrolling or function inlining + when you specify -O2. As compared to -O, this option increases + both compilation time and the performance of the generated + code. -O2 turns on all optimization flags specified by -O. It + also turns on the following optimization flags: + -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm - -fexpensive-optimizations -fstrength-reduce -frerun-cse-after-loop - -frerun-loop-opt -fcaller-saves -fpeephole2 -fschedule-insns - -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove - -fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks - -freorder-functions -falign-functions -falign-jumps -falign-loops - -falign-labels -ftree-vrp -ftree-pre - Please note the warning under -fgcse about invoking -O2 on programs + -fexpensive-optimizations -fstrength-reduce + -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves + -fpeephole2 -fschedule-insns -fschedule-insns2 + -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing + -fdelete-null-pointer-checks -freorder-blocks + -freorder-functions -falign-functions -falign-jumps + -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please + note the warning under -fgcse about invoking -O2 on programs that use computed gotos. config BR2_OPTIMIZE_3 bool "optimization level 3" help - Optimize yet more. -O3 turns on all optimizations specified by -O2 - and also turns on the -finline-functions, -funswitch-loops and - -fgcse-after-reload options. + Optimize yet more. -O3 turns on all optimizations specified by + -O2 and also turns on the -finline-functions, -funswitch-loops + and -fgcse-after-reload options. + +config BR2_OPTIMIZE_G + bool "optimize for debugging" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Optimize for debugging. This enables optimizations that do not + interfere with debugging. It should be the optimization level + of choice for the standard edit-compile-debug cycle, offering + a reasonable level of optimization while maintaining fast + compilation and a good debugging experience. config BR2_OPTIMIZE_S bool "optimize for size" help - Optimize for size. -Os enables all -O2 optimizations that do not - typically increase code size. It also performs further optimizations - designed to reduce code size. -Os disables the following optimization - flags: -falign-functions -falign-jumps -falign-loops -falign-labels - -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays + Optimize for size. -Os enables all -O2 optimizations that do + not typically increase code size. It also performs further + optimizations designed to reduce code size. -Os disables the + following optimization flags: -falign-functions -falign-jumps + -falign-loops -falign-labels -freorder-blocks + -freorder-blocks-and-partition -fprefetch-loop-arrays -ftree-vect-loop-version + This is the default. + +config BR2_OPTIMIZE_FAST + bool "optimize for fast (may break packages!)" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + Optimize for fast. Disregard strict standards + compliance. -Ofast enables all -O3 optimizations. It also + enables optimizations that are not valid for all + standard-compliant programs, so be careful, as it may break + some packages. It turns on -ffast-math and the + Fortran-specific -fstack-arrays, unless -fmax-stack-var-size + is specified, and -fno-protect-parens. endchoice config BR2_GOOGLE_BREAKPAD_ENABLE bool "Enable google-breakpad support" - select BR2_PACKAGE_GOOGLE_BREAKPAD depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC) depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GOOGLE_BREAKPAD_ARCH_SUPPORTS + select BR2_PACKAGE_GOOGLE_BREAKPAD help - This option will enable the use of google breakpad, a - library and tool suite that allows you to distribute an - application to users with compiler-provided debugging - information removed, record crashes in compact "minidump" - files, send them back to your server and produce C and C++ - stack traces from these minidumps. Breakpad can also write - minidumps on request for programs that have not crashed. + This option will enable the use of google breakpad, a library + and tool suite that allows you to distribute an application to + users with compiler-provided debugging information removed, + record crashes in compact "minidump" files, send them back to + your server and produce C and C++ stack traces from these + minidumps. Breakpad can also write minidumps on request for + programs that have not crashed. if BR2_GOOGLE_BREAKPAD_ENABLE @@ -508,23 +571,6 @@ config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES endif -config BR2_ENABLE_SSP - bool "build code with Stack Smashing Protection" - depends on BR2_TOOLCHAIN_HAS_SSP - help - Enable stack smashing protection support using GCCs - -fstack-protector-all option. - - See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt - for details. - - Note that this requires the toolchain to have SSP - support. This is always the case for glibc and eglibc - toolchain, but is optional in uClibc toolchains. - -comment "enabling Stack Smashing Protection requires support in the toolchain" - depends on !BR2_TOOLCHAIN_HAS_SSP - choice bool "libraries" default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED @@ -532,20 +578,19 @@ choice help Select the type of libraries you want to use on the target. - The default is to build dynamic libraries and use those on - the target filesystem, except when the architecture and/or - the selected binary format does not support shared - libraries. + The default is to build dynamic libraries and use those on the + target filesystem, except when the architecture and/or the + selected binary format does not support shared libraries. config BR2_STATIC_LIBS bool "static only" help - Build and use only static libraries. No shared libraries - will be instaled on the target. This potentially increases - your code size and should only be used if you know what you - are doing. Note that some packages may not be available when - this option is enabled, due to their need for dynamic - library support. + Build and use only static libraries. No shared libraries will + be installed on the target. This potentially increases your + code size and should only be used if you know what you are + doing. Note that some packages may not be available when this + option is enabled, due to their need for dynamic library + support. config BR2_SHARED_LIBS bool "shared only" @@ -565,56 +610,262 @@ config BR2_SHARED_STATIC_LIBS endchoice - config BR2_PACKAGE_OVERRIDE_FILE string "location of a package override file" default "$(CONFIG_DIR)/local.mk" help A package override file is a short makefile that contains - variable definitions of the form _OVERRIDE_SRCDIR, - which allows to tell Buildroot to use an existing directory - as the source directory for a particular package. See the - Buildroot documentation for more details on this feature. + variable definitions of the form _OVERRIDE_SRCDIR, which + allows to tell Buildroot to use an existing directory as the + source directory for a particular package. See the Buildroot + documentation for more details on this feature. config BR2_GLOBAL_PATCH_DIR string "global patch directories" help - You may specify a space separated list of one or more directories - containing global package patches. For a specific version - of a specific package , patches are - applied as follows: + You may specify a space separated list of one or more + directories containing global package patches. For a specific + version of a specific package , + patches are applied as follows: - First, the default Buildroot patch set for the package is applied - from the package's directory in Buildroot. + First, the default Buildroot patch set for the package is + applied from the package's directory in Buildroot. Then for every directory - - that exists in BR2_GLOBAL_PATCH_DIR, if the directory - /// exists, then all - *.patch files in this directory will be applied. + /// exists, + then all *.patch files in this directory will be applied. - Otherwise, if the directory / exists, - then all *.patch files in the directory will be applied. + Otherwise, if the directory / + exists, then all *.patch files in the directory will be + applied. menu "Advanced" config BR2_COMPILER_PARANOID_UNSAFE_PATH bool "paranoid check of library/header paths" + default y help By default, when this option is disabled, when the Buildroot - cross-compiler will encounter an unsafe library or header - path (such as /usr/include, or /usr/lib), the compiler will - display a warning. + cross-compiler will encounter an unsafe library or header path + (such as /usr/include, or /usr/lib), the compiler will display + a warning. - By enabling this option, this warning is turned into an - error, which will completely abort the build when such - unsafe paths are encountered. + By enabling this option, this warning is turned into an error, + which will completely abort the build when such unsafe paths + are encountered. Note that this mechanism is available for both the internal - toolchain (through gcc and binutils patches) and external - toolchain backends (through the external toolchain wrapper). + toolchain (through the toolchain wrapper and binutils patches) + and external toolchain backends (through the toolchain + wrapper). + +config BR2_FORCE_HOST_BUILD + bool "Force the building of host dependencies" + help + Build all available host dependencies, even if they are + already installed on the system. + + This option can be used to ensure that the download cache of + source archives for packages remain consistent between + different build hosts. + + This option will increase build time. + +config BR2_REPRODUCIBLE + bool "Make the build reproducible (experimental)" + # SOURCE_DATE_EPOCH support in toolchain-wrapper requires GCC 4.4 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + help + This option will remove all sources of non-reproducibility + from the build process. For a given Buildroot configuration, + this allows to generate exactly identical binaries from one + build to the other, including on different machines. + + The current implementation is restricted to builds with the + same output directory. Many (absolute) paths are recorded in + intermediary files, and it is very likely that some of these + paths leak into the target rootfs. If you build with the + same O=... path, however, the result is identical. + + This is labeled as an experimental feature, as not all + packages behave properly to ensure reproducibility. + +config BR2_PER_PACKAGE_DIRECTORIES + bool "Use per-package directories (experimental)" + help + This option will change the build process of Buildroot + package to use per-package target and host directories. + + This is useful for two related purposes: + + - Cleanly isolate the build of each package, so that a + given package only "sees" the dependencies it has + explicitly expressed, and not other packages that may + have by chance been built before. + + - Enable top-level parallel build. + + This is labeled as an experimental feature, as not all + packages behave properly with per-package directories. endmenu +comment "Security Hardening Options" + +config BR2_PIC_PIE + bool "Build code with PIC/PIE" + depends on BR2_SHARED_LIBS + depends on BR2_TOOLCHAIN_SUPPORTS_PIE + help + Generate Position-Independent Code (PIC) and link + Position-Independent Executables (PIE). + +comment "PIC/PIE needs a toolchain w/ PIE" + depends on BR2_SHARED_LIBS + depends on !BR2_TOOLCHAIN_SUPPORTS_PIE + +choice + bool "Stack Smashing Protection" + default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy + depends on BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCC's + -fstack-protector option family. + + See + http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + + Note that this requires the toolchain to have SSP support. + This is always the case for glibc and eglibc toolchain, but is + optional in uClibc toolchains. + +config BR2_SSP_NONE + bool "None" + help + Disable stack-smashing protection. + +config BR2_SSP_REGULAR + bool "-fstack-protector" + help + Emit extra code to check for buffer overflows, such as stack + smashing attacks. This is done by adding a guard variable to + functions with vulnerable objects. This includes functions + that call alloca, and functions with buffers larger than 8 + bytes. The guards are initialized when a function is entered + and then checked when the function exits. If a guard check + fails, an error message is printed and the program exits. + +config BR2_SSP_STRONG + bool "-fstack-protector-strong" + depends on BR2_TOOLCHAIN_HAS_SSP_STRONG + help + Like -fstack-protector but includes additional functions to be + protected - those that have local array definitions, or have + references to local frame addresses. + + -fstack-protector-strong officially appeared in gcc 4.9, but + some vendors have backported -fstack-protector-strong to older + versions of gcc. + +config BR2_SSP_ALL + bool "-fstack-protector-all" + help + Like -fstack-protector except that all functions are + protected. This option might have a significant performance + impact on the compiled binaries. + +endchoice + +config BR2_SSP_OPTION + string + default "-fstack-protector" if BR2_SSP_REGULAR + default "-fstack-protector-strong" if BR2_SSP_STRONG + default "-fstack-protector-all" if BR2_SSP_ALL + +comment "Stack Smashing Protection needs a toolchain w/ SSP" + depends on !BR2_TOOLCHAIN_HAS_SSP + +choice + bool "RELRO Protection" + depends on BR2_SHARED_LIBS + help + Enable a link-time protection know as RELRO (RELocation Read + Only) which helps to protect from certain type of exploitation + techniques altering the content of some ELF sections. + +config BR2_RELRO_NONE + bool "None" + help + Disables Relocation link-time protections. + +config BR2_RELRO_PARTIAL + bool "Partial" + help + This option makes the dynamic section not writeable after + initialization (with almost no performance penalty). + +config BR2_RELRO_FULL + bool "Full" + depends on BR2_TOOLCHAIN_SUPPORTS_PIE + select BR2_PIC_PIE + help + This option includes the partial configuration, but also marks + the GOT as read-only at the cost of initialization time during + program loading, i.e every time an executable is started. + +comment "RELRO Full needs a toolchain w/ PIE" + depends on !BR2_TOOLCHAIN_SUPPORTS_PIE + +endchoice + +comment "RELocation Read Only (RELRO) needs shared libraries" + depends on !BR2_SHARED_LIBS + +choice + bool "Buffer-overflow Detection (FORTIFY_SOURCE)" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_OPTIMIZE_0 + help + Enable the _FORTIFY_SOURCE macro which introduces additional + checks to detect buffer-overflows in the following standard + library functions: memcpy, mempcpy, memmove, memset, strcpy, + stpcpy, strncpy, strcat, strncat, sprintf, vsprintf, snprintf, + vsnprintf, gets. + + NOTE: This feature requires an optimization level of s/1/2/3/g + + Support for this feature has been present since GCC 4.x. + +config BR2_FORTIFY_SOURCE_NONE + bool "None" + help + Disables additional checks to detect buffer-overflows. + +config BR2_FORTIFY_SOURCE_1 + bool "Conservative" + # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 + depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 + help + This option sets _FORTIFY_SOURCE to 1 and only introduces + checks that shouldn't change the behavior of conforming + programs. Adds checks at compile-time only. + +config BR2_FORTIFY_SOURCE_2 + bool "Aggressive" + # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61164 + depends on !BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_GCC_AT_LEAST_6 + help + This option sets _FORTIFY_SOURCES to 2 and some more + checking is added, but some conforming programs might fail. + Also adds checks at run-time (detected buffer overflow + terminates the program) + +endchoice + +comment "Fortify Source needs a glibc toolchain and optimization" + depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0) endmenu source "toolchain/Config.in" @@ -633,9 +884,5 @@ source "package/Config.in.host" source "Config.in.legacy" -menu "User-provided options" - depends on BR2_EXTERNAL != "support/dummy-external" - -source "$BR2_EXTERNAL/Config.in" - -endmenu +# br2-external menus definitions +source "$BR2_BASE_DIR/.br2-external.in.menus" diff --git a/buildroot/Config.in.legacy b/buildroot/Config.in.legacy index a8c5dabef..957cbb8b3 100644 --- a/buildroot/Config.in.legacy +++ b/buildroot/Config.in.legacy @@ -16,50 +16,94 @@ # is informed at build-time about selected legacy options. # If there is an equivalent (set of) new symbols, these should be select'ed by # the old symbol for backwards compatibility. +# It is not possible to select an option that is part of a choice. In that +# case, the new option should use the old symbol as default. This requires a +# change outside of Config.in.legacy, and this should be clearly marked as such +# in a comment, so that removal of legacy options also include the removal of +# these external references. +# +# [Example: renaming a bool option that is part of a choice from FOO to BAR] +# original choice: +# choice +# prompt "Choose foobar" +# config BR2_FOO_1 +# bool "foobar 1" +# config BR2_FOO_2 +# bool "foobar 2" +# endchoice +# +# becomes: +# choice +# prompt "Choose foobar" +# default BR2_BAR_1 if BR2_FOO_1 # legacy +# default BR2_BAR_2 if BR2_FOO_2 # legacy +# config BR2_BAR_1 +# bool "foobar 1" +# config BR2_BAR_2 +# bool "foobar 2" +# endchoice +# +# and in Config.in.legacy: +# config BR2_FOO_1 +# bool "foobar 1 has been renamed" +# help +# +# # Note: BR2_FOO_1 is still referenced from package/foo/Config.in +# config BR2_FOO_2 +# bool "foobar 2 has been renamed" +# help +# +# # Note: BR2_FOO_2 is still referenced from package/foo/Config.in +# +# [End of example] # # For string options, it is not possible to directly select another symbol. In # this case, a hidden wrap bool option has to be added, that defaults to y if # the old string is not set at its default value. The wrap symbol should select # BR2_LEGACY. # If the original symbol has been renamed, the new symbol should use the value -# of the old symbol as default. This requires a change outside of -# Config.in.legacy, and this should be clearly marked as such below, so that -# removal of legacy options also include the removal of these external -# references. +# of the old symbol as default. Like for choice options, a comment should be +# added to flag that the symbol is still used in another file. # # [Example: renaming a string option from FOO to BAR] # original symbol: -# config BR2_FOO_STRING -# string "Some foo string" +# config BR2_FOO_STRING +# string "Some foo string" # # becomes: -# config BR2_BAR_STRING -# string "Some bar string" -# default BR2_FOO_STRING if BR2_FOO_STRING != "" # legacy +# config BR2_BAR_STRING +# string "Some bar string" +# default BR2_FOO_STRING if BR2_FOO_STRING != "" # legacy # # and in Config.in.legacy: -# config BR2_FOO_STRING -# string "The foo string has been renamed" -# help -# +# config BR2_FOO_STRING +# string "The foo string has been renamed" +# help +# # -# config BR2_FOO_STRING_WRAP -# bool -# default y if BR2_FOO_STRING != "" -# select BR2_LEGACY +# config BR2_FOO_STRING_WRAP +# bool +# default y if BR2_FOO_STRING != "" +# select BR2_LEGACY # -# # Note: BR2_FOO_STRING is still referenced from package/foo/Config.in +# # Note: BR2_FOO_STRING is still referenced from package/foo/Config.in # # [End of example] +config BR2_SKIP_LEGACY + bool + option env="SKIP_LEGACY" + +if !BR2_SKIP_LEGACY + config BR2_LEGACY bool help - This option is selected automatically when your old .config uses an - option that no longer exists in current buildroot. In that case, the - build will fail. Look for config options which are selected in the - menu below: they no longer exist and should be replaced by something - else. + This option is selected automatically when your old .config + uses an option that no longer exists in current buildroot. In + that case, the build will fail. Look for config options which + are selected in the menu below: they no longer exist and + should be replaced by something else. # This comment fits exactly in a 80-column display comment "Legacy detected: check the content of the menu below" @@ -91,1145 +135,3666 @@ comment "legacy options in the menu below. Once you have " comment "disabled all legacy options, this text will " comment "disappear and you will be able to start the build. " comment "* " -comment "Note: at some point in the future, the oldest legacy" -comment "options will be removed, and configuration files " -comment "that still have those options set, will fail to " -comment "build, or run, in unpredictable ways. " +comment "Note: legacy options older than 5 years have been " +comment "removed, and configuration files that still have " +comment "those options set, will fail to build, or run in " +comment "unpredictable ways. " comment "----------------------------------------------------" endif ############################################################################### -comment "Legacy options removed in 2015.02" +comment "Legacy options removed in 2020.08" -config BR2_PACKAGE_M4 - bool "m4 target package removed" +config BR2_PACKAGE_PHP_EXT_HASH + bool "php hash extension is mandatory" select BR2_LEGACY help - The m4 target package has been removed, it's been - deprecated for some time now. + Since php 7.4.0, hash extension can't be disabled. -config BR2_PACKAGE_FLEX_BINARY - bool "flex binary in target option removed" +config BR2_PACKAGE_EFL_GIF + bool "efl evas gif loader is mandatory" select BR2_LEGACY help - The flex binary in the target option has been removed. - It's been deprecated for some time now and is essentially a - development tool which isn't very useful in the target. + Since efl 1.23.x, the evas gif loader can't be disabled. -config BR2_PACKAGE_BISON - bool "bison target package removed" +config BR2_PACKAGE_EFL_PNG + bool "efl evas png loader is mandatory" select BR2_LEGACY help - The bison target package has been removed, it's been - deprecated for some time now and is essentially a development - tool which isn't very useful in the target. + Since efl 1.23.x, the evas png loader can't be disabled. -config BR2_PACKAGE_GOB2 - bool "gob2 target package removed" +config BR2_PACKAGE_EFL_ELPUT + bool "efl elput is enabled by efl drm option" select BR2_LEGACY help - The gob2 target package has been removed, it's been - deprecated for some time now and was essentially useless - without a target toolchain. + Since efl 1.23.x, the drm option enable the elput library. -config BR2_PACKAGE_DISTCC - bool "distcc target package removed" +config BR2_KERNEL_HEADERS_5_6 + bool "kernel headers version 5.6.x are no longer supported" select BR2_LEGACY help - The distcc target package has been removed, it's been - deprecated for some time now and was essentially useless - without a target toolchain. + Version 5.6.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_HASERL_VERSION_0_8_X - bool "haserl 0.8.x version removed" +config BR2_KERNEL_HEADERS_5_5 + bool "kernel headers version 5.5.x are no longer supported" select BR2_LEGACY help - The 0.8.x version option for haserl has been removed since it - has been deprecated for some time now. - You should be able to use the 0.9.x version without issues. + Version 5.5.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_STRONGSWAN_TOOLS - bool "strongswan option has been removed" +config BR2_BINUTILS_VERSION_2_31_X + bool "binutils version 2.31.1 support removed" select BR2_LEGACY - select BR2_PACKAGE_STRONGSWAN_PKI - select BR2_PACKAGE_STRONGSWAN_SCEP help - The tools option has been removed upstream and the different tools - have been split between the pki and scep options, with others - deprecated. + Support for binutils version 2.31.1 has been removed. The + current default version (2.33.1 or later) has been selected + instead. -config BR2_PACKAGE_XBMC_ADDON_XVDR - bool "xbmc options have been renamed" +config BR2_PACKAGE_KODI_PERIPHERAL_STEAMCONTROLLER + bool "kodi-peripheral-steamcontroller package was removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_ADDON_XVDR help - The XBMC media center project was renamed to Kodi entertainment center + This package is broken. + +comment "Legacy options removed in 2020.05" -config BR2_PACKAGE_XBMC_PVR_ADDONS - bool "xbmc options have been renamed" +config BR2_PACKAGE_WIRINGPI + bool "wiringpi package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_PVR_ADDONS help - The XBMC media center project was renamed to Kodi entertainment center + The author of wiringpi has deprecated the package, and + completely removed the git tree that was serving the + sources, with this message: + Please look for alternatives for wiringPi -config BR2_PACKAGE_XBMC - bool "xbmc options have been renamed" +config BR2_PACKAGE_PYTHON_PYCRYPTO + bool "python-pycrypto package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI help - The XBMC media center project was renamed to Kodi entertainment center + This package has been removed, use python-pycryptodomex + instead. -config BR2_PACKAGE_XBMC_ALSA_LIB - bool "xbmc options have been renamed" +config BR2_PACKAGE_MTDEV2TUIO + bool "mtdev2tuio package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_ALSA_LIB help - The XBMC media center project was renamed to Kodi entertainment center + The mtdev2tuio package was removed as it breaks the builds + every now and then and is not maintained upstream. -config BR2_PACKAGE_XBMC_AVAHI - bool "xbmc options have been renamed" +config BR2_PACKAGE_EZXML + bool "ezxml package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_AVAHI help - The XBMC media center project was renamed to Kodi entertainment center + The ezXML package was removed as it is affected by several + CVEs and is not maintained anymore (no release since 2006). -config BR2_PACKAGE_XBMC_DBUS - bool "xbmc options have been renamed" +config BR2_PACKAGE_COLLECTD_LVM + bool "lvm support in collectd was removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_DBUS help - The XBMC media center project was renamed to Kodi entertainment center + collectd removed LVM plugin, liblvm2app has been deprecated -config BR2_PACKAGE_XBMC_LIBBLURAY - bool "xbmc options have been renamed" +config BR2_PACKAGE_PYTHON_PYASN + bool "duplicate python-pyasn1 package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBBLURAY + select BR2_PACKAGE_PYTHON_PYASN1 help - The XBMC media center project was renamed to Kodi entertainment center + This package was a duplicate of python-pyasn1. -config BR2_PACKAGE_XBMC_GOOM - bool "xbmc options have been renamed" +config BR2_PACKAGE_PYTHON_PYASN_MODULES + bool "duplicate python-pyasn1-modules package removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_GOOM + select BR2_PACKAGE_PYTHON_PYASN1_MODULES help - The XBMC media center project was renamed to Kodi entertainment center + This package was a duplicate of python-pyasn1-modules. -config BR2_PACKAGE_XBMC_RSXS - bool "xbmc options have been renamed" +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_10K_QCA6174 + bool "duplicate QCA6174 firmware symbol removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_RSXS + select BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174 help - The XBMC media center project was renamed to Kodi entertainment center + This config symbol duplicates existing symbol for QCA6174 + firmware. -config BR2_PACKAGE_XBMC_LIBCEC - bool "xbmc options have been renamed" +config BR2_PACKAGE_QT5CANVAS3D + bool "qt5canvas3d was removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBCEC help - The XBMC media center project was renamed to Kodi entertainment center + This Qt5 module was removed by the upstream Qt project since + Qt 5.13, so the corresponding Buildroot package was removed + as well. -config BR2_PACKAGE_XBMC_LIBMICROHTTPD - bool "xbmc options have been renamed" +config BR2_PACKAGE_KODI_LIBTHEORA + bool "libtheora support in Kodi was removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBMICROHTTPD help - The XBMC media center project was renamed to Kodi entertainment center + Kodi does not need libtheora -config BR2_PACKAGE_XBMC_LIBNFS - bool "xbmc options have been renamed" +config BR2_PACKAGE_CEGUI06 + bool "BR2_PACKAGE_CEGUI06 was renamed" + select BR2_PACKAGE_CEGUI select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBNFS help - The XBMC media center project was renamed to Kodi entertainment center + The BR2_PACKAGE_CEGUI06 config symbol was renamed to + BR2_PACKAGE_CEGUI. -config BR2_PACKAGE_XBMC_RTMPDUMP - bool "xbmc options have been renamed" +config BR2_GCC_VERSION_5_X + bool "gcc 5.x support removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_RTMPDUMP help - The XBMC media center project was renamed to Kodi entertainment center + Support for gcc version 5.x has been removed. The current + default version (8.x or later) has been selected instead. + +comment "Legacy options removed in 2020.02" -config BR2_PACKAGE_XBMC_LIBSHAIRPLAY - bool "xbmc options have been renamed" +config BR2_PACKAGE_JAMVM + bool "jamvm removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBSHAIRPLAY help - The XBMC media center project was renamed to Kodi entertainment center + JamVM has not had a release since 2014 and is unmaintained. -config BR2_PACKAGE_XBMC_LIBSMBCLIENT - bool "xbmc options have been renamed" +config BR2_PACKAGE_CLASSPATH + bool "classpath removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBSMBCLIENT help - The XBMC media center project was renamed to Kodi entertainment center + GNU Classpath package was removed. The last upstream + release was in 2012 and there hasn't been a commit + since 2016. -config BR2_PACKAGE_XBMC_LIBTHEORA - bool "xbmc options have been renamed" +config BR2_PACKAGE_QT5_VERSION_5_6 + bool "qt 5.6 support removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBTHEORA help - The XBMC media center project was renamed to Kodi entertainment center + Support for Qt 5.6 is EOL and has been removed. The current + version (5.12 or later) has been selected instead. -config BR2_PACKAGE_XBMC_LIBUSB - bool "xbmc options have been renamed" +config BR2_PACKAGE_CURL + bool "BR2_PACKAGE_CURL was renamed" + select BR2_PACKAGE_LIBCURL_CURL select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBUSB help - The XBMC media center project was renamed to Kodi entertainment center + The BR2_PACKAGE_CURL config symbol was renamed to + BR2_PACKAGE_LIBCURL_CURL. -config BR2_PACKAGE_XBMC_LIBVA - bool "xbmc options have been renamed" +config BR2_PACKAGE_GSTREAMER + bool "gstreamer-0.10 removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_LIBVA help - The XBMC media center project was renamed to Kodi entertainment center + Gstreamer-0.10 package was removed. It has been deprecated + upstream since 2012, and is missing a lot of features and + fixes compared to gstreamer-1.x. -config BR2_PACKAGE_XBMC_WAVPACK - bool "xbmc options have been renamed" +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS + bool "nvidia-tegra23 binaries gstreamer 0.10.x support removed" select BR2_LEGACY - select BR2_PACKAGE_KODI_WAVPACK help - The XBMC media center project was renamed to Kodi entertainment center + Gstreamer 0.10.x is no longer available in Buildroot, so + neither is the support in nvidia-tegra23 binaries. -config BR2_PREFER_STATIC_LIB - bool "static library option renamed" +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS + bool "nvidia-tegra23 binaries sample apps removed" select BR2_LEGACY help - The BR2_PREFER_STATIC_LIB was renamed to BR2_STATIC_LIBS. It - highlights the fact that the option no longer "prefers" - static libraries, but "enforces" static libraries (i.e - shared libraries are completely unused). + Gstreamer 0.10.x is no longer available in Buildroot, so + neither is the support in nvidia-tegra23 binaries. - Take care of updating the type of libraries you want under the - "Build options" menu. +config BR2_PACKAGE_FREERDP_GSTREAMER + bool "freerdp gstreamer 0.10.x support removed" + select BR2_LEGACY + help + Gstreamer 0.10.x is no longer available in Buildroot, so + neither is the support in freerdp. -############################################################################### -comment "Legacy options removed in 2014.11" +config BR2_PACKAGE_OPENCV3_WITH_GSTREAMER + bool "opencv3 gstreamer 0.10.x support removed" + select BR2_LEGACY + help + Gstreamer 0.10.x is no longer available in Buildroot, so + neither is the support in opencv3. -config BR2_x86_generic - bool "x86 generic variant has been removed" +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER + bool "opencv gstreamer 0.10.x support removed" select BR2_LEGACY help - The generic x86 CPU variant has been removed. Use another - CPU variant instead. + Gstreamer 0.10.x is no longer available in Buildroot, so + neither is the support in opencv. -config BR2_GCC_VERSION_4_4_X - bool "gcc 4.4.x has been removed" +config BR2_PACKAGE_LIBPLAYER + bool "libplayer package was removed" select BR2_LEGACY help - The 4.4.x version of gcc has been removed. Use a newer - version instead. + The libplayer package was removed. The latest release is + from 2010 and none of the backends are available in + Buildroot any more. -config BR2_sparc_sparchfleon - bool "sparchfleon CPU has been removed" +config BR2_GCC_VERSION_OR1K + bool "gcc 5.x fork for or1k has been removed" select BR2_LEGACY help - The sparchfleon CPU was only supported in a patched gcc 4.4 - version. Its support has been removed in favor of the leon3 - CPU starting from gcc 4.8.x. + Support for gcc 5.x for or1k has been removed. The current + default version (9.x or later) has been selected instead. -config BR2_sparc_sparchfleonv8 - bool "sparchfleonv8 CPU has been removed" +config BR2_PACKAGE_BLUEZ_UTILS + bool "bluez-utils was removed" select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 \ + && BR2_TOOLCHAIN_HAS_SYNC_4 help - The sparchfleonv8 CPU was only supported in a patched gcc - 4.4 version. Its support has been removed in favor of the - leon3 CPU starting from gcc 4.8.x. + The bluez-utils (BlueZ 4.x) package was removed as it is + deprecated since a long time. As an alternative, the + bluez5-utils (BlueZ 5.x) has been automatically selected in + your configuration. -config BR2_sparc_sparcsfleon - bool "sparcsfleon CPU has been removed" +config BR2_PACKAGE_GADGETFS_TEST + bool "gadgetfs-test was removed" select BR2_LEGACY help - The sparcsfleon CPU was only supported in a patched gcc 4.4 - version. Its support has been removed in favor of the leon3 - CPU starting from gcc 4.8.x. + The gadgetfs-test package was removed. Gadgetfs has been + deprecated in favour of functionfs. Consider using + gadget-tool (gt) instead. -config BR2_sparc_sparcsfleonv8 - bool "sparcsfleonv8 CPU has been removed" +config BR2_PACKAGE_FIS + bool "fis was removed" select BR2_LEGACY help - The sparcsfleonv8 CPU was only supported in a patched gcc - 4.4 version. Its support has been removed in favor of the - leon3 CPU starting from gcc 4.8.x. + The fis package was removed. + +config BR2_PACKAGE_REFPOLICY_POLICY_VERSION + string "refpolicy policy version" + help + The refpolicy policy version option has been moved to the + libsepol package. + +config BR2_PACKAGE_REFPOLICY_POLICY_VERSION_WRAP + bool + default y if BR2_PACKAGE_REFPOLICY_POLICY_VERSION != "" + select BR2_LEGACY -config BR2_PACKAGE_XLIB_LIBPCIACCESS - bool "xlib-libpciaccess option has been renamed" - depends on BR2_PACKAGE_XORG7 +config BR2_PACKAGE_CELT051 + bool "celt051 package was removed" select BR2_LEGACY - select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_OPUS help - libpciaccess neither depends on X11 nor Xlib. Thus the - package has been renamed BR2_PACKAGE_LIBPCIACCESS + The celt051 package was removed as it is now obsolete since + the CELT codec has been merged into the IETF Opus codec. As + a result, the opus package has been automatically selected + in your configuration. -config BR2_PACKAGE_LINUX_FIRMWARE_XC5000 - bool "Xceive xc5000 option has been renamed" - select BR2_PACKAGE_LINUX_FIRMWARE_XCx000 +config BR2_PACKAGE_WIREGUARD + bool "wireguard package renamed" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + select BR2_LEGACY + select BR2_PACKAGE_WIREGUARD_LINUX_COMPAT if BR2_LINUX_KERNEL + select BR2_PACKAGE_WIREGUARD_TOOLS help - The Xceive xc5000 option now also handles older firmwares from - Xceive (the xc4000 series), as well as new firmwares (the xc5000c) - from Cresta, who bought Xceive. + The wireguard package has been renamed to wireguard-tools + for the userspace tooling and wireguard-linux-compat for the + kernel side for legacy (<5.6) kernels to match upstream. -config BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 - bool "Chelsio T4 option has been renamed" - select BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 +config BR2_PACKAGE_PERL_NET_PING + bool "perl-net-ping was removed" + select BR2_LEGACY help - The Chelsio T4 option BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 - has been renamed to BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 - to better account for the fact that a T5 variant exists. + Net::Ping is a Perl core module (ie. bundled with perl). -config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 - bool "BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 has been renamed" +config BR2_PACKAGE_PERL_MIME_BASE64 + bool "perl-mime-base64 was removed" + select BR2_LEGACY help - The option BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 was - renamed to BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_7. You must - select it in: - Target packages -> Hardware handling -> - Firmware -> linux-firmware -> WiFi firmware -> - iwlwifi 3160/726x revision to use (revision 7) + MIME::Base64 is a Perl core module (ie. bundled with perl). -config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 - bool "BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 has been renamed" +config BR2_PACKAGE_PERL_DIGEST_MD5 + bool "perl-digest-md5 was removed" + select BR2_LEGACY help - The option BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 was - renamed to BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_8. You must - select it in: - Target packages -> Hardware handling -> - Firmware -> linux-firmware -> WiFi firmware -> - iwlwifi 3160/726x revision to use (revision 8) + Digest::MD5 is a Perl core module (ie. bundled with perl). -############################################################################### -comment "Legacy options removed in 2014.08" +config BR2_PACKAGE_ERLANG_P1_ICONV + bool "erlang-p1-iconv has been removed" + select BR2_LEGACY + help + The erlang-p1-iconv package was no longer used by ejabberd, + and was no longer maintained upstream, so it was removed. -config BR2_PACKAGE_LIBELF - bool "libelf has been removed" - select BR2_PACKAGE_ELFUTILS +config BR2_KERNEL_HEADERS_5_3 + bool "kernel headers version 5.3.x are no longer supported" select BR2_LEGACY help - The libelf package provided an old version of the libelf library - and is deprecated. The libelf library is now provided by the - elfutils package. + Version 5.3.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_KERNEL_HEADERS_3_8 - bool "kernel headers version 3.8.x are no longer supported" - select BR2_KERNEL_HEADERS_3_9 +config BR2_PACKAGE_PYTHON_SCAPY3K + bool "python-scapy3k is replaced by python-scapy" select BR2_LEGACY + select BR2_PACKAGE_PYTHON_SCAPY help - Version 3.8.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.9.x of the headers have been - automatically selected in your configuration. + python-scapy3k has been deprecated, since python-scapy has + gained Python 3 support. Use BR2_PACKAGE_PYTHON_SCAPY + instead. -config BR2_PACKAGE_GETTEXT_TOOLS - bool "support for gettext-tools on target has been removed" +config BR2_BINUTILS_VERSION_2_30_X + bool "binutils version 2.30 support removed" select BR2_LEGACY help - The option to install the gettext utilities on the target - has been removed. This is not necessary as Buildroot is not - designed to provide a full development environment on the - target. gettext tools should be used on the build machine + Support for binutils version 2.30 has been removed. The + current default version (2.31 or later) has been selected instead. -config BR2_PACKAGE_PROCPS - bool "procps has been replaced by procps-ng" - select BR2_PACKAGE_PROCPS_NG +config BR2_PACKAGE_RPI_USERLAND_START_VCFILED + bool "rpi-userland start vcfiled was removed" select BR2_LEGACY help - The procps package has been replaced by the equivalent procps-ng. + The vcfiled support was removed upstream. -config BR2_BINUTILS_VERSION_2_20_1 - bool "binutils 2.20.1 has been removed" +comment "Legacy options removed in 2019.11" + +config BR2_PACKAGE_OPENVMTOOLS_PROCPS + bool "openvmtools' procps support was removed" select BR2_LEGACY help - The 2.20.1 version of binutils has been removed. Use a newer - version instead. + Upstream stopped supporting this option a while ago. -config BR2_BINUTILS_VERSION_2_21 - bool "binutils 2.21 has been removed" +config BR2_PACKAGE_ALLJOYN + bool "alljoyn was removed" select BR2_LEGACY help - The 2.21 version of binutils has been removed. Use a newer - version instead. + The alljoyn framework is dead -config BR2_BINUTILS_VERSION_2_23_1 - bool "binutils 2.23.1 has been removed" +config BR2_PACKAGE_ALLJOYN_BASE + bool "alljoyn-base was removed" select BR2_LEGACY help - The 2.23.1 version of binutils has been removed. Use a newer - version instead. + The alljoyn framework is dead -config BR2_UCLIBC_VERSION_0_9_32 - bool "uclibc 0.9.32 has been removed" +config BR2_PACKAGE_ALLJOYN_BASE_CONTROLPANEL + bool "alljoyn-base control panel was removed" select BR2_LEGACY help - The 0.9.32 version of uClibc has been removed. Use a newer - version instead. + The alljoyn framework is dead + +config BR2_PACKAGE_ALLJOYN_BASE_NOTIFICATION + bool "alljoyn-base notification was removed" + select BR2_LEGACY + help + The alljoyn framework is dead + +config BR2_PACKAGE_ALLJOYN_BASE_ONBOARDING + bool "alljoyn-base onboarding was removed" + select BR2_LEGACY + help + The alljoyn framework is dead + +config BR2_PACKAGE_ALLJOYN_TCL_BASE + bool "alljoyn-tcl-base was removed" + select BR2_LEGACY + help + The alljoyn framework is dead + +config BR2_PACKAGE_ALLJOYN_TCL + bool "alljoyn-tcl was removed" + select BR2_LEGACY + help + The alljoyn framework is dead + +config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS + string "toolchain-external extra libs option has been renamed" + help + The option BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS has + been renamed to BR2_TOOLCHAIN_EXTRA_LIBS. + +config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS_WRAP + bool + default y if BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS != "" + select BR2_LEGACY + +config BR2_PACKAGE_PYTHON_PYSNMP_APPS + bool "python-pysnmp-apps was removed" + select BR2_LEGACY + select BR2_PACKAGE_SNMPCLITOOLS + help + Following upstream changes, the python-pysnmp-apps package + has been removed, and snmpclitools should be used as a + replacement. + +config BR2_KERNEL_HEADERS_5_2 + bool "kernel headers version 5.2.x are no longer supported" + select BR2_LEGACY + help + Version 5.2.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_TARGET_RISCV_PK + bool "riscv-pk was removed" + select BR2_LEGACY + help + The RISC-V Proxy Kernel (pk) and Berkley Boot Loader (BBL) + have been replaced with OpenSBI. + +config BR2_PACKAGE_SQLITE_STAT3 + bool "sqlite stat3 support was removed" + select BR2_LEGACY + help + Upstream removed the support for stat3. + +config BR2_KERNEL_HEADERS_5_1 + bool "kernel headers version 5.1.x are no longer supported" + select BR2_LEGACY + help + Version 5.1.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_PACKAGE_DEVMEM2 + bool "devmem2 package was removed" + select BR2_LEGACY + help + Use the the Busybox devmem utility, instead, which provides + the same functionality. + +config BR2_PACKAGE_USTR + bool "ustr package removed" + select BR2_LEGACY + help + The 'ustr' package was only used by SELinux libsemanage, but + since SELinux 2.7, ustr is no longer used. Therefore, we + removed this package from Buildroot. + +config BR2_PACKAGE_KODI_SCREENSAVER_PLANESTATE + bool "kodi-screensaver-planestate package was removed" + select BR2_LEGACY + help + This package is incompatible with Kodi 18.x. + +config BR2_PACKAGE_KODI_VISUALISATION_WAVEFORHUE + bool "kodi-visualisation-waveforhue package was removed" + select BR2_LEGACY + help + This package is incompatible with Kodi 18.x. + +config BR2_PACKAGE_KODI_AUDIODECODER_OPUS + bool "kodi-audiodecoder-opus package was removed" + select BR2_LEGACY + help + This package is incompatible with Kodi 18.x. + +config BR2_PACKAGE_MESA3D_OSMESA + bool "mesa OSMesa option renamed" + select BR2_PACKAGE_MESA3D_OSMESA_CLASSIC if BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + select BR2_LEGACY + help + The option was renamed in order to match the naming used + by the meson buildsystem. + +config BR2_PACKAGE_HOSTAPD_DRIVER_RTW + bool "hostapd rtl871xdrv driver removed" + select BR2_LEGACY + help + Since the update of hostapd to 2.9, the patch provided for + the rtl871xdrv no longer works, although it + applies. Moreover, AP support for Realtek chips is broken + anyway in kernels > 4.9. Therefore, this option has been + removed. + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + bool "new dbus support option in wpa_supplicant was renamed" + select BR2_PACKAGE_WPA_SUPPLICANT_DBUS if BR2_TOOLCHAIN_HAS_THREADS + select BR2_LEGACY + help + The new dbus support option was renamed. + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD + bool "old dbus support in wpa_supplicant was removed" + select BR2_LEGACY + help + The old dbus support was removed. + +comment "Legacy options removed in 2019.08" + +config BR2_TARGET_TS4800_MBRBOOT + bool "ts4800-mbrboot package was removed" + select BR2_LEGACY + help + The defconfig for the TS4800 platform has been removed, so + the ts4800-mbrboot package, containing the boot code for + this specific platform has been removed as welL. + +config BR2_PACKAGE_LIBAMCODEC + bool "liamcodec package was removed" + select BR2_LEGACY + help + Support for odroidc2 based systems was removed, making the + libamcodec package useless. + +config BR2_PACKAGE_ODROID_SCRIPTS + bool "odroid-scripts package was removed" + select BR2_LEGACY + help + Support for odroidc2 based systems was removed, making the + odroid-scripts package useless. + +config BR2_PACKAGE_ODROID_MALI + bool "odroid-mali package was removed" + select BR2_LEGACY + help + Support for odroidc2 based systems was removed, making the + odroid-mali package useless. + +config BR2_PACKAGE_KODI_PLATFORM_AML + bool "Kodi AMLogic support was removed" + select BR2_LEGACY + help + Support for AMLogic was removed due to the removal of the + odroidc2 defconfig. + +config BR2_GCC_VERSION_6_X + bool "gcc 6.x support removed" + select BR2_LEGACY + help + Support for gcc version 6.x has been removed. The current + default version (8.x or later) has been selected instead. + +config BR2_GCC_VERSION_4_9_X + bool "gcc 4.9.x support removed" + select BR2_LEGACY + help + Support for gcc version 4.9.x has been removed. The current + default version (8.x or later) has been selected instead. -config BR2_GCC_VERSION_4_3_X - bool "gcc 4.3.x has been removed" +config BR2_GDB_VERSION_7_12 + bool "gdb 7.12.x has been removed" select BR2_LEGACY help - The 4.3.x version of gcc has been removed. Use a newer + The 7.12.x version of gdb has been removed. Use a newer version instead. -config BR2_GCC_VERSION_4_6_X - bool "gcc 4.6.x has been removed" +config BR2_PACKAGE_XAPP_MKFONTDIR + bool "mkfontdir is now included in xapp_mkfontscale" + select BR2_PACKAGE_XAPP_MKFONTSCALE select BR2_LEGACY help - The 4.6.x version of gcc has been removed. Use a newer + xapp_mkfontscale now includes the mkfontdir script previously + distributed separately for compatibility with older X11 + versions. + +config BR2_GDB_VERSION_8_0 + bool "gdb 8.0.x has been removed" + select BR2_LEGACY + help + The 8.0.x version of gdb has been removed. Use a newer version instead. -config BR2_GDB_VERSION_7_4 - bool "gdb 7.4 has been removed" +config BR2_KERNEL_HEADERS_4_20 + bool "kernel headers version 4.20.x are no longer supported" select BR2_LEGACY help - The 7.4 version of gdb has been removed. Use a newer version - instead. + Version 4.20.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_GDB_VERSION_7_5 - bool "gdb 7.5 has been removed" +config BR2_KERNEL_HEADERS_5_0 + bool "kernel headers version 5.0.x are no longer supported" select BR2_LEGACY help - The 7.5 version of gdb has been removed. Use a newer version - instead. + Version 5.0.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +comment "Legacy options removed in 2019.05" -config BR2_BUSYBOX_VERSION_1_19_X - bool "busybox version selection has been removed" +config BR2_CSKY_DSP + bool "C-SKY DSP support removed" select BR2_LEGACY help - The possibility of selecting the Busybox version has been - removed. Use the latest version provided by the Busybox - package instead. + C-SKY DSP instruction support for ck810 / ck807 was removed, + as it was no longer supported in C-SKY gcc. Perhaps the VDSP + instructions should be used instead, using the BR2_CSKY_VDSP + option. -config BR2_BUSYBOX_VERSION_1_20_X - bool "busybox version selection has been removed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COMPOSITOR + bool "compositor moved to gst1-plugins-base" + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_COMPOSITOR select BR2_LEGACY help - The possibility of selecting the Busybox version has been - removed. Use the latest version provided by the Busybox - package instead. + The gst1-plugins-bad compositor plugin has moved + to gst1-plugins-base. -config BR2_BUSYBOX_VERSION_1_21_X - bool "busybox version selection has been removed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IQA + bool "gst-plugins-bad IQA option was removed" select BR2_LEGACY help - The possibility of selecting the Busybox version has been - removed. Use the latest version provided by the Busybox - package instead. + The gst1-plugins-bad IQA option was removed. -config BR2_PACKAGE_LIBV4L_DECODE_TM6000 - bool "decode_tm6000" - select BR2_PACKAGE_LIBV4L_UTILS +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV + bool "gst-plugins-bad opencv option was removed" select BR2_LEGACY help - This libv4l option has been deprecated and replaced by a single - option to build all the libv4l utilities. + The gst1-plugins-bad opencv option was removed because + buildroot does not have the opencv_contrib package which + is required for the bgsegm module which gst1-plugins-bad + now requires along with opencv3. -config BR2_PACKAGE_LIBV4L_IR_KEYTABLE - bool "ir-keytable" - select BR2_PACKAGE_LIBV4L_UTILS +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO + bool "stereo was merged into audiofx in gst1-plugins-good" select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX help - This libv4l option has been deprecated and replaced by a single - option to build all the libv4l utilities. + The gst1-plugins-bad stereo plugin has merged with the + gst1-plugins-base audiofx plugin. -config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE - bool "v4l2-compliance" - select BR2_PACKAGE_LIBV4L_UTILS +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD + bool "gst-plugins-bad vcd plugin was removed." select BR2_LEGACY help - This libv4l option has been deprecated and replaced by a single - option to build all the libv4l utilities. + The gst1-plugins-bad vcd plugin was removed. -config BR2_PACKAGE_LIBV4L_V4L2_CTL - bool "v4l2-ctl" - select BR2_PACKAGE_LIBV4L_UTILS +config BR2_PACKAGE_LUNIT + bool "lunit package removed" select BR2_LEGACY + select BR2_PACKAGE_LUA_LUNITX help - This libv4l option has been deprecated and replaced by a single - option to build all the libv4l utilities. + The lunit package was removed in favor of its fork lunitx, + which supports all versions of Lua. -config BR2_PACKAGE_LIBV4L_V4L2_DBG - bool "v4l2-dbg" - select BR2_PACKAGE_LIBV4L_UTILS +config BR2_PACKAGE_FFMPEG_FFSERVER + bool "ffmpeg ffserver removed" select BR2_LEGACY help - This libv4l option has been deprecated and replaced by a single - option to build all the libv4l utilities. + On July 10th, 2016, ffserver program has been dropped. -############################################################################### -comment "Legacy options removed in 2014.05" +config BR2_PACKAGE_LIBUMP + bool "libump package removed" + select BR2_LEGACY + help + The libump package was removed, it was only used as a + dependency of sunxi-mali, which itself was removed. + +config BR2_PACKAGE_SUNXI_MALI + bool "sunxi-mali package removed" + select BR2_LEGACY + select BR2_PACKAGE_SUNXI_MALI_MAINLINE + help + The sunxi-mali package was removed, as the + sunxi-mali-mainline package replaces it for mainline + kernels on Allwinner platforms. -config BR2_PACKAGE_EVTEST_CAPTURE - bool "evtest-capture support removed (dropped since evtest 1.31)" +config BR2_BINUTILS_VERSION_2_29_X + bool "binutils version 2.29 support removed" select BR2_LEGACY help - Support for evtest-capture has been removed (dropped from - evtest package since version 1.31), use evemu package + Support for binutils version 2.29 has been removed. The + current default version (2.31 or later) has been selected instead. -config BR2_KERNEL_HEADERS_3_6 - bool "kernel headers version 3.6.x are no longer supported" - select BR2_KERNEL_HEADERS_3_9 +config BR2_BINUTILS_VERSION_2_28_X + bool "binutils version 2.28 support removed" select BR2_LEGACY help - Version 3.6.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.8.x of the headers have been - automatically selected in your configuration. + Support for binutils version 2.28 has been removed. The + current default version (2.31 or later) has been selected + instead. -config BR2_KERNEL_HEADERS_3_7 - bool "kernel headers version 3.7.x are no longer supported" - select BR2_KERNEL_HEADERS_3_9 +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK + bool "gst-plugins-bad apexsink option removed" select BR2_LEGACY help - Version 3.7.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.8.x of the headers have been - automatically selected in your configuration. + The gst-plugins-bad apexsink option was removed. -config BR2_PACKAGE_VALA - bool "vala target package has been removed" +comment "Legacy options removed in 2019.02" + +config BR2_PACKAGE_QT + bool "qt package removed" select BR2_LEGACY help - The 'vala' target package has been removed since it has been - deprecated for more than four buildroot releases. - Note: the host vala package still exists. + The qt package was removed. -config BR2_TARGET_TZ_ZONELIST - default BR2_PACKAGE_TZDATA_ZONELIST if BR2_PACKAGE_TZDATA_ZONELIST != "" +config BR2_PACKAGE_QTUIO + bool "qtuio package removed" + select BR2_LEGACY + help + The qtuio package was removed. -config BR2_PACKAGE_TZDATA_ZONELIST - string "tzdata: the timezone list option has been renamed" +config BR2_PACKAGE_PINENTRY_QT4 + bool "pinentry-qt4 option removed" + select BR2_LEGACY help - The option BR2_PACKAGE_TZDATA_ZONELIST has been renamed to - BR2_TARGET_TZ_ZONELIST, and moved to the "System configuration" - menu. You'll need to select BR2_TARGET_TZ_INFO. + The pinentry-qt4 option was removed. -config BR2_PACKAGE_TZDATA_ZONELIST_WRAP - bool - default y if BR2_PACKAGE_TZDATA_ZONELIST != "" +config BR2_PACKAGE_POPPLER_QT + bool "poppler qt option removed" select BR2_LEGACY + help + The poppler qt option was removed. -config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE - bool "Lua command-line editing none has been renamed" +config BR2_PACKAGE_OPENCV3_WITH_QT + bool "opencv3 qt backend option removed" select BR2_LEGACY help - The BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE option has been - renamed to BR2_PACKAGE_LUA_EDITING_NONE. You will have to select - it in the corresponding choice. + The opencv3 qt backend option was removed. -config BR2_PACKAGE_LUA_INTERPRETER_READLINE - bool "Lua command-line editing using readline has been renamed" +config BR2_PACKAGE_OPENCV_WITH_QT + bool "opencv qt backend option removed" select BR2_LEGACY help - The BR2_PACKAGE_LUA_INTERPRETER_READLINE option has been - renamed to BR2_PACKAGE_LUA_READLINE. You will have to select - it in the corresponding choice. + The opencv qt backend option was removed. -config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE - bool "Lua command-line editing using linenoise has been renamed" +config BR2_PACKAGE_AMD_CATALYST_CCCLE + bool "catalyst control center option removed" select BR2_LEGACY help - The BR2_PACKAGE_LUA_INTERPRETER_LINENOISE option has been - renamed to BR2_PACKAGE_LUA_LINENOISE. You will have to select - it in the corresponding choice. + The AMD Catalyst Control Center option was removed. -config BR2_PACKAGE_DVB_APPS_UTILS - bool "dvb-apps utilities now built by default" +config BR2_PACKAGE_SDL_QTOPIA + bool "sdl qtopia video driver option removed" select BR2_LEGACY help - The dvb-apps utilities are now always built when the dvb-apps - package is selected. + The SDL QTopia video driver option was removed. -config BR2_KERNEL_HEADERS_SNAP - bool "Local Linux snapshot support removed" +config BR2_PACKAGE_PYTHON_PYQT + bool "python-pyqt package removed" select BR2_LEGACY help - Support for using a custom snapshot to install the Linux - kernel headers has been removed. + The python-pyqt package was removed. Consider python-pyqt5 + instead. -config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV - bool "/dev management by udev removed" +config BR2_PACKAGE_LUACRYPTO + bool "luacrypto package removed" select BR2_LEGACY help - The 'udev' package has been converted to a virtual package. - The providers for this feature are: 'eudev', 'systemd'. + The luacrypto package was removed. Consider luaossl instead. - Therefore, if you are not using 'systemd' as init system, you - must choose 'Dynamic using eudev' in the '/dev management' - menu to get the same behaviour as in your old configuration. +config BR2_PACKAGE_TN5250 + bool "tn5250 package removed" + select BR2_LEGACY + help + The tn5250 package was removed. - If you are using 'systemd', its internal implementation of - 'udev' will be used automatically. +config BR2_PACKAGE_BOOST_SIGNALS + bool "Boost signals removed" + select BR2_LEGACY + help + Its removal was announced in boost 1.68 and its deprecation + was announced in 1.54. Users are encouraged to use Signals2 + instead. - You must also check the packages depending on 'udev' are still - selected. +config BR2_PACKAGE_FFTW_PRECISION_SINGLE + bool "single" + select BR2_LEGACY + select BR2_PACKAGE_FFTW_SINGLE + help + This option has been removed in favor of + BR2_PACKAGE_FFTW_SINGLE. -config BR2_PACKAGE_UDEV - bool "udev is now a virtual package" +config BR2_PACKAGE_FFTW_PRECISION_DOUBLE + bool "double" select BR2_LEGACY - select BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_FFTW_DOUBLE help - The 'udev' package has been converted to a virtual package. - The providers for this feature are: 'eudev', 'systemd'. + This option has been removed in favor of + BR2_PACKAGE_FFTW_DOUBLE. - Your old configuration refers to packages depending on 'udev', - either for build or at runtime. +config BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE + bool "long double" + depends on !(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && \ + (BR2_arm || BR2_mips || BR2_mipsel)) + select BR2_LEGACY + select BR2_PACKAGE_FFTW_LONG_DOUBLE + help + This option has been removed in favor of + BR2_PACKAGE_FFTW_LONG_DOUBLE. - Check that a 'udev' provider is selected. If you are not using - 'systemd' as init system, 'eudev' should be selected, which is - the case if '/dev management' is set to 'Dynamic using eudev'. +config BR2_PACKAGE_FFTW_PRECISION_QUAD + bool "quad" + depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR + select BR2_LEGACY + select BR2_PACKAGE_FFTW_QUAD + help + This option has been removed in favor of + BR2_PACKAGE_FFTW_QUAD. - If you are using 'systemd', its internal implementation of 'udev' - is used. +config BR2_PACKAGE_LUA_5_2 + bool "Lua 5.2.x version removed" + select BR2_LEGACY + select BR2_PACKAGE_LUA_5_3 + help + The Lua 5.2.x version was removed. -config BR2_PACKAGE_UDEV_RULES_GEN - bool "udev rules generation handled by provider" +config BR2_TARGET_GENERIC_PASSWD_MD5 + bool "target passwd md5 format support has been removed" select BR2_LEGACY - select BR2_PACKAGE_EUDEV if !BR2_INIT_SYSTEMD - select BR2_PACKAGE_EUDEV_RULES_GEN if !BR2_INIT_SYSTEMD help - The 'udev' package has been converted to a virtual package. - The providers for this feature are: 'eudev', 'systemd'. + The default has been moved to SHA256 and all C libraries + now support that method by default - If you are not using 'systemd' as init system, udev rules - generation will be handled by 'eudev'. Check that - '/dev management' is set to 'Dynamic using eudev' to get - the same behaviour as in your old configuration. +comment "Legacy options removed in 2018.11" - If you are using 'systemd', it internal implementation of 'udev' - will generate the rules. +config BR2_TARGET_XLOADER + bool "xloader has been removed" + select BR2_LEGACY + help + The package has been removed as u-boot SPL provides + similar functionality -config BR2_PACKAGE_UDEV_ALL_EXTRAS - bool "udev extras removed" +config BR2_PACKAGE_TIDSP_BINARIES + bool "tidsp-binaries package removed" select BR2_LEGACY help - The 'udev' package has been converted to a virtual package. - The providers for this feature are: 'eudev', 'systemd'. + The tidsp-binaries package was removed. - The option to enable the extra features of 'udev' (gudev, ...) - has been removed. These features are automatically enabled in - the 'udev' providers if the dependencies are selected. For - example, selecting 'libglib2' will trigger the build of gudev. +config BR2_PACKAGE_DSP_TOOLS + bool "dsp-tools package removed" + select BR2_LEGACY + help + The dsp-tools package was removed. -config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS - bool "xlib-libpthread-stubs option has been renamed" - depends on BR2_PACKAGE_XORG7 +config BR2_PACKAGE_GST_DSP + bool "gst-dsp package removed" select BR2_LEGACY - select BR2_PACKAGE_LIBPTHREAD_STUBS help - The pthread stubs neither depend on X11 nor Xlib. Thus the - package has been renamed BR2_PACKAGE_LIBPTHREAD_STUBS + The gst-dsp package was removed. -############################################################################### -comment "Legacy options removed in 2014.02" +config BR2_PACKAGE_BOOTUTILS + bool "bootutils package removed" + select BR2_LEGACY + help + The bootutils package was removed. -config BR2_sh2 - bool "sh2 support removed" +config BR2_PACKAGE_EXPEDITE + bool "expedite package has been removed" + select BR2_LEGACY help - Due to an inexistent user base and generally poor Linux - support, the support for the SH2 architecture was removed. + expedite is not actively maintained anymore. + https://sourceforge.net/p/enlightenment/mailman/message/36428571 -config BR2_sh3 - bool "sh3 support removed" +config BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT + bool "mesa3d opengl texture float option removed" + select BR2_LEGACY help - Due to an inexistent user base and generally poor Linux - support, the support for the SH3 architecture was removed. + mesa3d now unconditionally enables floating-point textures, + as the corresponding patent has expired. -config BR2_sh3eb - bool "sh3eb support removed" +config BR2_KERNEL_HEADERS_4_10 + bool "kernel headers version 4.10.x are no longer supported" + select BR2_LEGACY help - Due to an inexistent user base and generally poor Linux - support, the support for the SH3eb architecture was removed. + Version 4.10.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_KERNEL_HEADERS_3_1 - bool "kernel headers version 3.1.x are no longer supported" - select BR2_KERNEL_HEADERS_3_2 +config BR2_KERNEL_HEADERS_4_11 + bool "kernel headers version 4.11.x are no longer supported" select BR2_LEGACY help - Version 3.1.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.2.x of the headers have been - automatically selected in your configuration. + Version 4.11.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_KERNEL_HEADERS_3_3 - bool "kernel headers version 3.3.x are no longer supported" - select BR2_KERNEL_HEADERS_3_4 +config BR2_KERNEL_HEADERS_4_12 + bool "kernel headers version 4.12.x are no longer supported" select BR2_LEGACY help - Version 3.3.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.4.x of the headers have been - automatically selected in your configuration. + Version 4.12.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_KERNEL_HEADERS_3_5 - bool "kernel headers version 3.5.x are no longer supported" - select BR2_KERNEL_HEADERS_3_9 +config BR2_KERNEL_HEADERS_4_13 + bool "kernel headers version 4.13.x are no longer supported" select BR2_LEGACY help - Version 3.5.x of the Linux kernel headers have been deprecated - for more than four buildroot releases and are now removed. - As an alternative, version 3.8.x of the headers have been - automatically selected in your configuration. + Version 4.13.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_GDB_VERSION_7_2 - bool "gdb 7.2.x is no longer supported" - select BR2_GDB_VERSION_7_6 +config BR2_KERNEL_HEADERS_4_15 + bool "kernel headers version 4.15.x are no longer supported" select BR2_LEGACY help - Version 7.2.x of gdb has been deprecated for more than four - buildroot releases and is now removed. As an alternative, gdb - 7.5.x has been automatically selected in your configuration. + Version 4.15.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_GDB_VERSION_7_3 - bool "gdb 7.3.x is no longer supported" - select BR2_GDB_VERSION_7_6 +config BR2_KERNEL_HEADERS_4_17 + bool "kernel headers version 4.17.x are no longer supported" select BR2_LEGACY help - Version 7.3.x of gdb has been deprecated for more than four - buildroot releases and is now removed. As an alternative, gdb - 7.5.x has been automatically selected in your configuration. + Version 4.17.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_CCACHE - bool "ccache target package has been removed" +config BR2_PACKAGE_LIBNFTNL_XML + bool "libnftl no longer supports XML output" select BR2_LEGACY help - The 'ccache' target package has been removed since it has been - deprecated for more than four buildroot releases. - Note: using ccache for speeding up builds is still supported. + libnftnl removed integration with libmxml. -config BR2_HAVE_DOCUMENTATION - bool "support for documentation on target has been removed" +config BR2_KERNEL_HEADERS_3_2 + bool "kernel headers version 3.2.x are no longer supported" select BR2_LEGACY help - Support for documentation on target has been removed since it has - been deprecated for more than four buildroot releases. + Version 3.2.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_AUTOMAKE - bool "automake target package has been removed" +config BR2_KERNEL_HEADERS_4_1 + bool "kernel headers version 4.1.x are no longer supported" select BR2_LEGACY help - The 'automake' target package has been removed since it has been - deprecated for more than four buildroot releases. - Note: the host automake still exists. + Version 4.1.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_AUTOCONF - bool "autoconf target package has been removed" +config BR2_KERNEL_HEADERS_4_16 + bool "kernel headers version 4.16.x are no longer supported" select BR2_LEGACY help - The 'autoconf' target package has been removed since it has been - deprecated for more than four buildroot releases. - Note: the host autoconf still exists. + Version 4.16.x of the Linux kernel headers are no longer + maintained upstream and are now removed. -config BR2_PACKAGE_XSTROKE - bool "xstroke has been removed" +config BR2_KERNEL_HEADERS_4_18 + bool "kernel headers version 4.18.x are no longer supported" select BR2_LEGACY help - The 'xstroke' package has been removed since it has been - deprecated for more than four buildroot releases. + Version 4.18.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +############################################################################### +comment "Legacy options removed in 2018.08" -config BR2_PACKAGE_LZMA - bool "lzma target package has been removed" +config BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT + bool "docker-engine static client option renamed" select BR2_LEGACY + select BR2_PACKAGE_DOCKER_CLI_STATIC help - The 'lzma' target package has been removed since it has been - deprecated for more than four buildroot releases. - Note: generating lzma-compressed rootfs images is still supported. + BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT has been renamed to + BR2_PACKAGE_DOCKER_CLI_STATIC, following the package split of + docker-engine and docker-cli. -config BR2_PACKAGE_TTCP - bool "ttcp has been removed" +config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_19 + bool "Modular X.org server was updated to version 1.20.0" select BR2_LEGACY + select BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_20 help - The 'ttcp' package has been removed since it has been - deprecated for more than four buildroot releases. + Modular X.org server was updated to version 1.20.0 -config BR2_PACKAGE_LIBNFC_LLCP - bool "libnfc-llcp has been replaced by libllcp" +config BR2_PACKAGE_XPROTO_APPLEWMPROTO + bool "xproto-applewmproto package replaced by xorgproto" select BR2_LEGACY - select BR2_PACKAGE_LIBLLCP + select BR2_PACKAGE_XORGPROTO help - The 'libnfc-llcp' package has been removed since upstream renamed - to 'libllcp'. We have added a new package for 'libllcp' and bumped - the version at the same time. + The xproto-applewmproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_MYSQL_CLIENT - bool "MySQL client renamed to MySQL" +config BR2_PACKAGE_XPROTO_BIGREQSPROTO + bool "xproto-bigreqsproto package replaced by xorgproto" select BR2_LEGACY - select BR2_PACKAGE_MYSQL + select BR2_PACKAGE_XORGPROTO help - The option has been renamed BR2_PACKAGE_MYSQL + The xproto-bigreqsproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_SQUASHFS3 - bool "squashfs3 has been removed" +config BR2_PACKAGE_XPROTO_COMPOSITEPROTO + bool "xproto-compositeproto package replaced by xorgproto" select BR2_LEGACY - select BR2_PACKAGE_SQUASHFS + select BR2_PACKAGE_XORGPROTO help - The 'squashfs3' package has been removed since it has been - deprecated for more than four buildroot releases. Package - 'squashfs' (4) has been selected automatically as replacement. + The xproto-compositeproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_TARGET_ROOTFS_SQUASHFS3 - bool "squashfs3 rootfs support has been removed" +config BR2_PACKAGE_XPROTO_DAMAGEPROTO + bool "xproto-dameproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - Together with the removal of the squashfs3 package, support - for squashfs3 root filesystems has been removed too. Squashfs - root filesystems will automatically use squashfs4 now. + The xproto-dameproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_NETKITBASE - bool "netkitbase has been removed" +config BR2_PACKAGE_XPROTO_DMXPROTO + bool "xproto-dmxproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The 'netkitbase' package has been removed since it has been - deprecated since 2012.11. This package provided 'inetd' - which is replaced by 'xinet' and 'ping' which is replaced by - 'busybox' or 'fping'. + The xproto-dmxproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_NETKITTELNET - bool "netkittelnet has been removed" +config BR2_PACKAGE_XPROTO_DRI2PROTO + bool "xproto-dri2proto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The 'netkittelnet' package has been removed since it has - been deprecated since 2012.11. 'busybox' provides a telnet - client and should be used instead. + The xproto-dri2proto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_LUASQL - bool "luasql has been replaced by luasql-sqlite3" - select BR2_PACKAGE_LUASQL_SQLITE3 +config BR2_PACKAGE_XPROTO_DRI3PROTO + bool "xproto-dri3proto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option has been renamed BR2_PACKAGE_LUASQL_SQLITE3. + The xproto-dri3proto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_LUACJSON - bool "luacjson has been replaced by lua-cjson" - select BR2_PACKAGE_LUA_CJSON +config BR2_PACKAGE_XPROTO_FIXESPROTO + bool "xproto-fixesproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option has been renamed BR2_PACKAGE_LUA_CJSON. + The xproto-fixesproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -############################################################################### -comment "Legacy options removed in 2013.11" +config BR2_PACKAGE_XPROTO_FONTCACHEPROTO + bool "xproto-fontcacheproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-fontcacheproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_LVM2_DMSETUP_ONLY - bool "lvm2's 'dmsetup only' option removed" +config BR2_PACKAGE_XPROTO_FONTSPROTO + bool "xproto-fontsproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The BR2_PACKAGE_LVM2_DMSETUP_ONLY was a negative option, which - led to problems with other packages that need the full lvm2 - suite. Therefore, the option has been replaced with the positive - BR2_PACKAGE_LVM2_STANDARD_INSTALL option. + The xproto-fontsproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -# Note: BR2_PACKAGE_LVM2_DMSETUP_ONLY is still referenced in package/lvm2/Config.in -# in order to automatically propagate old configs +config BR2_PACKAGE_XPROTO_GLPROTO + bool "xproto-glproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-glproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_QT_JAVASCRIPTCORE - bool "qt javascriptcore option removed" +config BR2_PACKAGE_XPROTO_INPUTPROTO + bool "xproto-inputproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The BR2_PACKAGE_QT_JAVASCRIPTCORE option was available to - force the activation or disabling of the JIT compiler in the - Qt Javascript interpreter. However, the JIT compiler is not - available for all architectures, so forcing its activation - does not always work. Moreover, Qt knows by itself for which - architectures JIT support is possible, and will - automatically enable it if possible. + The xproto-inputproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. - Therefore, this option was in fact useless, and causing - build problems when enabled on architectures for which the - JIT support was not available. It has been removed, and - there is no replacement: Qt will enable JIT at compile time - when possible. +config BR2_PACKAGE_XPROTO_KBPROTO + bool "xproto-kbproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-kbproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_PACKAGE_MODULE_INIT_TOOLS - bool "module-init-tools replaced by kmod" - select BR2_PACKAGE_KMOD - select BR2_PACKAGE_KMOD_TOOLS +config BR2_PACKAGE_XPROTO_PRESENTPROTO + bool "xproto-presentproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The 'module-init-tools' package has been removed, since it - has been depracated upstream and replaced by 'kmod'. + The xproto-presentproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL - string "u-boot: the git repository URL option has been renamed" +config BR2_PACKAGE_XPROTO_RANDRPROTO + bool "xproto-randrproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL has - been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_URL. + The xproto-randrproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL_WRAP - bool - default y if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" +config BR2_PACKAGE_XPROTO_RECORDPROTO + bool "xproto-recordproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-recordproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL is still referenced from -# boot/uboot/Config.in +config BR2_PACKAGE_XPROTO_RENDERPROTO + bool "xproto-renderproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-renderproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION - string "u-boot: the git repository version option has been renamed" +config BR2_PACKAGE_XPROTO_RESOURCEPROTO + bool "xproto-resourceproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION has - been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION. + The xproto-resourceproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION_WRAP - bool - default y if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" +config BR2_PACKAGE_XPROTO_SCRNSAVERPROTO + bool "xproto-scrnsaverprot package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-scrnsaverprot package has been replaced by the + xorgproto package, which combines all xproto_* packages. + +config BR2_PACKAGE_XPROTO_VIDEOPROTO + bool "xproto-videoproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-videoproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION is still referenced from -# boot/uboot/Config.in +config BR2_PACKAGE_XPROTO_WINDOWSWMPROTO + bool "xproto-windowswmproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-windowswmproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL - string "linux: the git repository URL option has been renamed" +config BR2_PACKAGE_XPROTO_XCMISCPROTO + bool "xproto-xcmiscproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL has - been renamed to - BR2_LINUX_KERNEL_CUSTOM_REPO_URL. + The xproto-xcmiscproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL_WRAP - bool - default y if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" +config BR2_PACKAGE_XPROTO_XEXTPROTO + bool "xproto-xextproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xextproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. + +config BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO + bool "xproto-xf86bigfontproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xf86bigfontproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL is still referenced from -# linux/Config.in +config BR2_PACKAGE_XPROTO_XF86DGAPROTO + bool "xproto-xf86dgaproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xf86dgaproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION - string "linux: the git repository version option has been renamed" +config BR2_PACKAGE_XPROTO_XF86DRIPROTO + bool "xproto-xf86driproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The option BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION has - been renamed to - BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION. + The xproto-xf86driproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP - bool - default y if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" +config BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO + bool "xproto-xf86vidmodeproto package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xf86vidmodeproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from -# linux/Config.in +config BR2_PACKAGE_XPROTO_XINERAMAPROTO + bool "xproto-xineramaproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xineramaproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -############################################################################### -comment "Legacy options removed in 2013.08" +config BR2_PACKAGE_XPROTO_XPROTO + bool "xproto-xproto package replaced by xorgproto" + select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO + help + The xproto-xproto package has been replaced by the + xorgproto package, which combines all xproto_* packages. -config BR2_ARM_OABI - bool "ARM OABI support has been removed" +config BR2_PACKAGE_XPROTO_XPROXYMANAGEMENTPROTOCOL + bool "xproto-xproxymanagementprotocol package replaced by xorgproto" select BR2_LEGACY + select BR2_PACKAGE_XORGPROTO help - The support for the ARM OABI was deprecated since a while, - and has been removed completely from Buildroot. It is also - deprecated in upstream gcc, since gcc 4.7. People should - switch to EABI instead, which should not be a problem as - long as you don't have pre-built OABI binaries in your - system that you can't recompile. + The xproto-xproxymanagementprotocol package has been + replaced by the xorgproto package, which combines all + xproto_* packages. -config BR2_PACKAGE_DOSFSTOOLS_DOSFSCK - bool "dosfstools dosfsck renamed to fsck.fat" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL + bool "gst1-plugins-bad opengl option moved to gst1-plugins-base" select BR2_LEGACY - select BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL help - dosfsck was renamed upstream to fsck.fat for consistency. + The opengl option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL - bool "dosfstools dosfslabel renamed to fatlabel" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLES2 + bool "gst1-plugins-bad gles2 option moved to gst1-plugins-base" select BR2_LEGACY - select BR2_PACKAGE_DOSFSTOOLS_FATLABEL + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2 help - doslabel was renamed upstream to fatlabel for consistency. + The gles2 option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_PACKAGE_DOSFSTOOLS_MKDOSFS - bool "dosfstools mkdosfs renamed to mkfs.fat" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLX + bool "gst1-plugins-bad glx option moved to gst1-plugins-base" select BR2_LEGACY - select BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLX help - mkdosfs was renamed upstream to mkfs.fat for consistency. + The glx option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_ELF2FLT - bool "the elf2flt option has been renamed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL + bool "gst1-plugins-bad egl option moved to gst1-plugins-base" select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_EGL help - The BR2_ELF2FLT option has been renamed to - BR2_PACKAGE_HOST_ELF2FLT due to the conversion of elf2flt to - the package infrastructure. + The egl option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_VFP_FLOAT - bool "the ARM VFP floating point option has been renamed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_X11 + bool "gst1-plugins-bad x11 option moved to gst1-plugins-base" select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_X11 help - Due to a major refactoring of the floating-point handling of - the ARM architecture support, the BR2_VFP_FLOAT option has - been replaced with a choice of options that allows to select - between various VFP versions/capabilities. + The x11 option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_PACKAGE_GCC_TARGET - bool "gcc on the target filesystem has been removed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND + bool "gst1-plugins-bad wayland option moved to gst1-plugins-base" select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_WAYLAND help - The support for gcc in the target filesystem was deprecated - since a while, and has been removed completely from Buildroot. - See Buildroot's documentation for more explanations. + The wayland option has been moved from gst1-plugins-bad to + gst1-plugins-base. -config BR2_HAVE_DEVFILES - bool "development files in target filesystem has been removed" +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_DISPMANX + bool "gst1-plugins-bad dispmanx option moved to gst1-plugins-base" select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_DISPMANX help - The installation of the development files in the target - filesystem was deprecated since a while, and has been removed - completely from Buildroot. - See Buildroot's documentation for more explanations. + The dispmanx option has been moved from gst1-plugins-mad to + gst1-plugins-base. -############################################################################### -comment "Legacy options removed in 2013.05" +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOMIXER + bool "gst1-plugins-bad audiomixer option moved to gst1-plugins-base" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOMIXER + help + The audiomixer option has been moved from gst1-plugins-bad to + gst1-plugins-base. + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME + bool "gst1-plugins-ugly lame option moved to gst1-plugins-good" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LAME + help + The lame option has been moved from gst1-plugins-ugly to + gst1-plugins-good. -config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8192 - bool "Realtek 8192 replaced by Realtek 81xx" +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPG123 + bool "gst1-plugins-ugly mpg123 option moved to gst1-plugins-good" select BR2_LEGACY - select BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MPG123 help - Now covers the whole Realtek 81xx familly: 8188/8192. + The mpg123 option has been moved from gst1-plugins-ugly to + gst1-plugins-good. + +config BR2_GDB_VERSION_7_11 + bool "gdb 7.11 has been removed" + select BR2_LEGACY + help + The 7.11 version of gdb has been removed. Use a newer version + instead. -config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8712 - bool "Realtek 8712 replaced by Realtek 87xx" +config BR2_GDB_VERSION_7_10 + bool "gdb 7.10 has been removed" select BR2_LEGACY - select BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX help - Now covers the whole Realtek 87xx familly: 8712/8723. + The 7.10 version of gdb has been removed. Use a newer version + instead. ############################################################################### -comment "Legacy options removed in 2013.02" +comment "Legacy options removed in 2018.05" -config BR2_sa110 - bool "sa110 ARM target switched to strongarm" +config BR2_PACKAGE_MEDIAART_BACKEND_NONE + bool "libmediaart none backend option renamed" select BR2_LEGACY - select BR2_strongarm help - The SA110 is the same as a generic StrongARM, it just differs - in speed, peripherals and cache. + For consistency reasons, the option + BR2_PACKAGE_MEDIAART_BACKEND_NONE has been renamed to + BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE -config BR2_sa1100 - bool "sa1100 ARM target switched to strongarm" +config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF + bool "libmediaart gdk-pixbuf backend option renamed" select BR2_LEGACY - select BR2_strongarm help - The SA1100 is the same as a generic StrongARM, it just differs - in speed, peripherals and cache. + For consistency reasons, the option + BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF has been renamed to + BR2_PACKAGE_LIBMEDIAART_BACKEND_GDK_PIXBUF -config BR2_PACKAGE_GDISK - bool "gdisk has been replaced by gptfdisk" +config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF + bool "libmediaart qt backend option renamed" select BR2_LEGACY - select BR2_PACKAGE_GPTFDISK help - The option has been renamed BR2_PACKAGE_GPTFDISK. + For consistency reasons, the option + BR2_PACKAGE_MEDIAART_BACKEND_QT has been renamed to + BR2_PACKAGE_LIBMEDIAART_BACKEND_QT -config BR2_PACKAGE_GDISK_GDISK - bool "gdisk tool from gdisk has been replaced by gdisk in gptfdisk" +# Note: BR2_PACKAGE_TI_SGX_AM335X is still referenced from +# package/ti-sgx-km/Config.in +config BR2_PACKAGE_TI_SGX_AM335X + bool "ti-sgx-km AM335X option renamed" select BR2_LEGACY - select BR2_PACKAGE_GPTFDISK - select BR2_PACKAGE_GPTFDISK_GDISK help - The option has been renamed BR2_PACKAGE_GPTFDISK_GDISK. + For consistency reasons, the option + BR2_PACKAGE_TI_SGX_AM335X has been renamed to + BR2_PACKAGE_TI_SGX_KM_AM335X. -config BR2_PACKAGE_GDISK_SGDISK - bool "sgdisk tool from gdisk has been replaced by sgdisk in gptfdisk" +# Note: BR2_PACKAGE_TI_SGX_AM437X is still referenced from +# package/ti-sgx-km/Config.in +config BR2_PACKAGE_TI_SGX_AM437X + bool "ti-sgx-km AM437X option renamed" select BR2_LEGACY - select BR2_PACKAGE_GPTFDISK - select BR2_PACKAGE_GPTFDISK_SGDISK help - The option has been renamed BR2_PACKAGE_GPTFDISK_SGDISK. + For consistency reasons, the option + BR2_PACKAGE_TI_SGX_AM437X has been renamed to + BR2_PACKAGE_TI_SGX_KM_AM437X. -config BR2_PACKAGE_GDB_HOST - bool "gdb for the host option has been renamed" - select BR2_PACKAGE_HOST_GDB +# Note: BR2_PACKAGE_TI_SGX_AM4430 is still referenced from +# package/ti-sgx-km/Config.in +config BR2_PACKAGE_TI_SGX_AM4430 + bool "ti-sgx-km AM4430 option renamed" select BR2_LEGACY help - Due to the conversion of gdb to the package infrastructure, - the BR2_PACKAGE_GDB_HOST option has been renamed - BR2_PACKAGE_HOST_GDB. + For consistency reasons, the option + BR2_PACKAGE_TI_SGX_AM4430 has been renamed to + BR2_PACKAGE_TI_SGX_KM_AM4430. -config BR2_PACKAGE_DIRECTB_DITHER_RGB16 - bool "DirectFB RGB16 dithering option has been renamed" - select BR2_PACKAGE_DIRECTFB_DITHER_RGB16 +# Note: BR2_PACKAGE_TI_SGX_AM5430 is still referenced from +# package/ti-sgx-km/Config.in +config BR2_PACKAGE_TI_SGX_AM5430 + bool "ti-sgx-km AM5430 option renamed" select BR2_LEGACY help - The option has been renamed - BR2_PACKAGE_DIRECTFB_DITHER_RGB16. + For consistency reasons, the option + BR2_PACKAGE_TI_SGX_AM5430 has been renamed to + BR2_PACKAGE_TI_SGX_KM_AM5430. -config BR2_PACKAGE_DIRECTB_TESTS - bool "DirectFB Tests option has been renamed" - select BR2_PACKAGE_DIRECTFB_TESTS +config BR2_PACKAGE_JANUS_AUDIO_BRIDGE + bool "janus-gateway audio-bridge option renamed" select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_AUDIO_BRIDGE help - The option has been renamed - BR2_PACKAGE_DIRECTFB_TESTS. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_AUDIO_BRIDGE has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_AUDIO_BRIDGE. -############################################################################### -comment "Legacy options removed in 2012.11" +config BR2_PACKAGE_JANUS_ECHO_TEST + bool "janus-gateway echo-test option renamed" + select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_ECHO_TEST + help + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_ECHO_TEST has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_ECHO_TEST. -config BR2_PACKAGE_CUSTOMIZE - bool "customize package has been removed" +config BR2_PACKAGE_JANUS_RECORDPLAY + bool "janus-gateway recordplay option renamed" select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_RECORDPLAY help - The 'customize' special package has been removed. Instead, - we recommend to create either your own packages, or use a - post-build script to customize your root filesystem. See - Buildroot's documentation for more details. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_RECORDPLAY has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_RECORDPLAY. -config BR2_PACKAGE_XSERVER_xorg - bool "X.org modular server" +config BR2_PACKAGE_JANUS_SIP_GATEWAY + bool "janus-gateway sip-gateway option renamed" select BR2_LEGACY - select BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + select BR2_PACKAGE_JANUS_GATEWAY_SIP_GATEWAY help - The option has been renamed - BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_SIP_GATEWAY has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_SIP_GATEWAY. -config BR2_PACKAGE_XSERVER_tinyx - bool "KDrive / TinyX server" +config BR2_PACKAGE_JANUS_STREAMING + bool "janus-gateway streaming option renamed" select BR2_LEGACY - select BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + select BR2_PACKAGE_JANUS_GATEWAY_STREAMING help - The option has been renamed - BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_STREAMING has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_STREAMING. -config BR2_PACKAGE_PTHREAD_STUBS - bool "pthread-stubs option has been renamed" +config BR2_PACKAGE_JANUS_TEXT_ROOM + bool "janus-gateway text-room option renamed" select BR2_LEGACY - select BR2_PACKAGE_LIBPTHREAD_STUBS + select BR2_PACKAGE_JANUS_GATEWAY_TEXT_ROOM help - For consistency reason, the pthread-stubs package has been - renamed to libpthread-stubs. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_TEXT_ROOM has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_TEXT_ROOM. -############################################################################### -comment "Legacy options removed in 2012.08" +config BR2_PACKAGE_JANUS_VIDEO_CALL + bool "janus-gateway video-call option renamed" + select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_VIDEO_CALL + help + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_VIDEO_CALL has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_VIDEO_CALL. + +config BR2_PACKAGE_JANUS_VIDEO_ROOM + bool "janus-gateway video-room option renamed" + select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_VIDEO_ROOM + help + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_VIDEO_ROOM has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_VIDEO_ROOM. -config BR2_PACKAGE_GETTEXT_STATIC - bool "libgettext.a is now selected by BR2_PREFER_STATIC_LIB" +config BR2_PACKAGE_JANUS_MQTT + bool "janus-gateway mqtt option renamed" select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_MQTT help - To build a static gettext library, select BR2_PREFER_STATIC_LIB. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_MQTT has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_MQTT. +config BR2_PACKAGE_JANUS_RABBITMQ + bool "janus-gateway rabbitmq option renamed" + select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_RABBITMQ + help + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_RABBITMQ has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_RABBITMQ. -config BR2_PACKAGE_LIBINTL - bool "libintl" +config BR2_PACKAGE_JANUS_REST + bool "janus-gateway rest option renamed" select BR2_LEGACY - select BR2_PACKAGE_GETTEXT + select BR2_PACKAGE_JANUS_GATEWAY_REST help - libintl is now installed by selecting BR2_PACKAGE_GETTEXT. This now - only installs the library, not the executables. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_REST has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_REST. -config BR2_PACKAGE_INPUT_TOOLS_EVTEST - bool "input-tools evtest is now a separate package evtest" +config BR2_PACKAGE_JANUS_UNIX_SOCKETS + bool "janus-gateway unix-sockets option renamed" select BR2_LEGACY - select BR2_PACKAGE_EVTEST + select BR2_PACKAGE_JANUS_GATEWAY_UNIX_SOCKETS help - The evtest program from input-tools is now a separate package. + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_UNIX_SOCKETS has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_UNIX_SOCKETS. -config BR2_BFIN_FDPIC - bool "BR2_BFIN_FDPIC is now BR2_BINFMT_FDPIC" - select BR2_BINFMT_FDPIC +config BR2_PACKAGE_JANUS_WEBSOCKETS + bool "janus-gateway websockets option renamed" select BR2_LEGACY + select BR2_PACKAGE_JANUS_GATEWAY_WEBSOCKETS + help + For consistency reasons, the janus-gateway option + BR2_PACKAGE_JANUS_WEBSOCKETS has been renamed to + BR2_PACKAGE_JANUS_GATEWAY_WEBSOCKETS. -config BR2_BFIN_FLAT - bool "BR2_BFIN_FLAT is now BR2_BINFMT_FLAT" - select BR2_BINFMT_FLAT +config BR2_PACKAGE_IPSEC_SECCTX_DISABLE + bool "ipsec-tools security context disable option renamed" select BR2_LEGACY + help + For consistency reasons, the option + BR2_PACKAGE_IPSEC_SECCTX_DISABLE was renamed to + BR2_PACKAGE_IPSEC_TOOLS_SECCTX_DISABLE. -endmenu +config BR2_PACKAGE_IPSEC_SECCTX_ENABLE + bool "ipsec-tools SELinux security context enable option renamed" + select BR2_LEGACY + help + For consistency reasons, the option + BR2_PACKAGE_IPSEC_SECCTX_ENABLE was renamed to + BR2_PACKAGE_IPSEC_TOOLS_SECCTX_ENABLE. + +config BR2_PACKAGE_IPSEC_SECCTX_KERNEL + bool "ipsec-tools kernel security context enable option renamed" + select BR2_LEGACY + help + For consistency reasons, the option + BR2_PACKAGE_IPSEC_SECCTX_KERNEL was renamed to + BR2_PACKAGE_IPSEC_TOOLS_SECCTX_KERNEL. + +config BR2_PACKAGE_LIBTFDI_CPP + bool "libftdi C++ bindings option renamed" + select BR2_LEGACY + select BR2_PACKAGE_LIBFTDI_CPP + help + The option BR2_PACKAGE_LIBTFDI_CPP was renamed to + BR2_PACKAGE_LIBFTDI_CPP in order to fix a typo in the option + name. + +config BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE + bool "jquery-ui-themes option black-tie renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + black-tie theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE to + BR2_PACKAGE_JQUERY_UI_THEMES_BLACK_TIE. + +config BR2_PACKAGE_JQUERY_UI_THEME_BLITZER + bool "jquery-ui-themes option blitzer renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + blitzer theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_BLITZER to + BR2_PACKAGE_JQUERY_UI_THEMES_BLITZER. + +config BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO + bool "jquery-ui-themes option cupertino renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + cupertino theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO to + BR2_PACKAGE_JQUERY_UI_THEMES_CUPERTINO. + +config BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE + bool "jquery-ui-themes option dark-hive renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + dark-hive theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE to + BR2_PACKAGE_JQUERY_UI_THEMES_DARK_HIVE. + +config BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV + bool "jquery-ui-themes option dot-luv renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + dot-luv theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV to + BR2_PACKAGE_JQUERY_UI_THEMES_DOT_LUV. + +config BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT + bool "jquery-ui-themes option eggplant renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + eggplant theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT to + BR2_PACKAGE_JQUERY_UI_THEMES_EGGPLANT. + +config BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE + bool "jquery-ui-themes option excite-bike renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + excite-bike theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE to + BR2_PACKAGE_JQUERY_UI_THEMES_EXCITE_BIKE. + +config BR2_PACKAGE_JQUERY_UI_THEME_FLICK + bool "jquery-ui-themes option flick renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + flick theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_FLICK to + BR2_PACKAGE_JQUERY_UI_THEMES_FLICK. + +config BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS + bool "jquery-ui-themes option hot-sneaks renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + hot-sneaks theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS to + BR2_PACKAGE_JQUERY_UI_THEMES_HOT_SNEAKS. + +config BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY + bool "jquery-ui-themes option humanity renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + humanity theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY to + BR2_PACKAGE_JQUERY_UI_THEMES_HUMANITY. + +config BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG + bool "jquery-ui-themes option le-frog renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + le-frog theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG to + BR2_PACKAGE_JQUERY_UI_THEMES_LE_FROG. + +config BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC + bool "jquery-ui-themes option mint-choc renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + mint-choc theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC to + BR2_PACKAGE_JQUERY_UI_THEMES_MINT_CHOC. + +config BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST + bool "jquery-ui-themes option overcast renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + overcast theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST to + BR2_PACKAGE_JQUERY_UI_THEMES_OVERCAST. + +config BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER + bool "jquery-ui-themes option pepper-grinder renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + pepper-grinder theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER to + BR2_PACKAGE_JQUERY_UI_THEMES_PEPPER_GRINDER. + +config BR2_PACKAGE_JQUERY_UI_THEME_REDMOND + bool "jquery-ui-themes option redmond renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + redmond theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_REDMOND to + BR2_PACKAGE_JQUERY_UI_THEMES_REDMOND. + +config BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS + bool "jquery-ui-themes option smoothness renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + smoothness theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS to + BR2_PACKAGE_JQUERY_UI_THEMES_SMOOTHNESS. + +config BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET + bool "jquery-ui-themes option south-street renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + south-street theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET to + BR2_PACKAGE_JQUERY_UI_THEMES_SOUTH_STREET. + +config BR2_PACKAGE_JQUERY_UI_THEME_START + bool "jquery-ui-themes option start renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + start theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_START to + BR2_PACKAGE_JQUERY_UI_THEMES_START. + +config BR2_PACKAGE_JQUERY_UI_THEME_SUNNY + bool "jquery-ui-themes option sunny renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + sunny theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_SUNNY to + BR2_PACKAGE_JQUERY_UI_THEMES_SUNNY. + +config BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE + bool "jquery-ui-themes option swanky-purse renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + swanky-purse theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE to + BR2_PACKAGE_JQUERY_UI_THEMES_SWANKY_PURSE. + +config BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC + bool "jquery-ui-themes option trontastic renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + trontastic theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC to + BR2_PACKAGE_JQUERY_UI_THEMES_TRONTASTIC. + +config BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS + bool "jquery-ui-themes option ui-darkness renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + ui-darkness theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS to + BR2_PACKAGE_JQUERY_UI_THEMES_UI_DARKNESS. + +config BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS + bool "jquery-ui-themes option ui-lightness renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + ui-lightness theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS to + BR2_PACKAGE_JQUERY_UI_THEMES_UI_LIGHTNESS. + +config BR2_PACKAGE_JQUERY_UI_THEME_VADER + bool "jquery-ui-themes option vader renamed" + select BR2_LEGACY + help + For consistency reasons, the jquery-ui-themes option for the + vader theme has been renamed from + BR2_PACKAGE_JQUERY_UI_THEME_VADER to + BR2_PACKAGE_JQUERY_UI_THEMES_VADER. + +config BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH + bool "bluez5-utils health plugin option renamed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH + help + For consistency reasons, the option + BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH has been renamed to + BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH. + +config BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI + bool "bluez5-utils midi plugin option renamed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI + help + For consistency reasons, the option + BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI has been renamed to + BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI. + +config BR2_PACKAGE_BLUEZ5_PLUGINS_NFC + bool "bluez5-utils nfc plugin option renamed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC + help + For consistency reasons, the option + BR2_PACKAGE_BLUEZ5_PLUGINS_NFC has been renamed to + BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC. + +config BR2_PACKAGE_BLUEZ5_PLUGINS_SAP + bool "bluez5-utils sap plugin option renamed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP + help + For consistency reasons, the option + BR2_PACKAGE_BLUEZ5_PLUGINS_SAP has been renamed to + BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP. + +config BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS + bool "bluez5-utils sixaxis plugin option renamed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SIXAXIS + help + For consistency reasons, the option + BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS has been renamed to + BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SIXAXIS. + +config BR2_PACKAGE_TRANSMISSION_REMOTE + bool "transmission remote tool option removed" + select BR2_LEGACY + select BR2_PACKAGE_TRANSMISSION_DAEMON + help + Upstream does not provide a separate configure option for + the tool transmission-remote, it is built when the + transmission daemon has been enabled. Therefore, Buildroot + has automatically enabled BR2_PACKAGE_TRANSMISSION_DAEMON + for you. + +config BR2_PACKAGE_LIBKCAPI_APPS + bool "libkcapi test applications removed" + select BR2_LEGACY + select BR2_PACKAGE_LIBKCAPI_HASHER if !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBKCAPI_RNGAPP + select BR2_PACKAGE_LIBKCAPI_SPEED + select BR2_PACKAGE_LIBKCAPI_TEST + help + Test applications (hasher, rng read, speed-test, test) now + have their own configuration options in the libkcapi menu. + +config BR2_PACKAGE_MPLAYER + bool "mplayer package removed" + select BR2_LEGACY + help + The mplayer package was removed. + +config BR2_PACKAGE_MPLAYER_MPLAYER + bool "mplayer package removed" + select BR2_LEGACY + help + The mplayer package was removed. + +config BR2_PACKAGE_MPLAYER_MENCODER + bool "mplayer package removed" + select BR2_LEGACY + help + The mplayer package was removed. + +config BR2_PACKAGE_LIBPLAYER_MPLAYER + bool "mplayer support in libplayer removed" + select BR2_LEGACY + help + The mplayer package was removed. + +config BR2_PACKAGE_IQVLINUX + bool "iqvlinux package removed" + select BR2_LEGACY + help + This package contained a kernel module from Intel, which + could only be used together with Intel userspace tools + provided under NDA, which also come with the same kernel + module. The copy of the kernel module available on + SourceForge is provided only to comply with the GPLv2 + requirement. Intel engineers were even surprised it even + built and were not willing to make any effort to fix their + tarball naming to contain a version number. Therefore, it + does not make sense for Buildroot to provide such a package. + + See https://sourceforge.net/p/e1000/bugs/589/ for the + discussion. + +config BR2_BINFMT_FLAT_SEP_DATA + bool "binfmt FLAT with separate code and data removed" + select BR2_LEGACY + help + This FLAT binary format was only used on Blackfin, which has + been removed. + +config BR2_bfin + bool "Blackfin architecture support removed" + select BR2_LEGACY + help + Following the removal of Blackfin support for the upstream + Linux kernel, Buildroot has removed support for this CPU + architecture. + +config BR2_PACKAGE_KODI_ADSP_BASIC + bool "kodi-adsp-basic package removed" + select BR2_LEGACY + help + kodi-adsp-basic is unmaintained + +config BR2_PACKAGE_KODI_ADSP_FREESURROUND + bool "kodi-adsp-freesurround package removed" + select BR2_LEGACY + help + kodi-adsp-freesurround is unmaintained + +############################################################################### +comment "Legacy options removed in 2018.02" + +config BR2_KERNEL_HEADERS_3_4 + bool "kernel headers version 3.4.x are no longer supported" + select BR2_LEGACY + help + Version 3.4.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_3_10 + bool "kernel headers version 3.10.x are no longer supported" + select BR2_LEGACY + help + Version 3.10.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_3_12 + bool "kernel headers version 3.12.x are no longer supported" + select BR2_LEGACY + help + Version 3.12.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_BINUTILS_VERSION_2_27_X + bool "binutils version 2.27 support removed" + select BR2_LEGACY + help + Support for binutils version 2.27 has been removed. The + current default version (2.29 or later) has been selected + instead. + +config BR2_PACKAGE_EEPROG + bool "eeprog package removed" + select BR2_LEGACY + select BR2_PACKAGE_I2C_TOOLS + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + The eeprog program is now provided by the i2c-tools package. + +config BR2_PACKAGE_GNUPG2_GPGV2 + bool "gnupg2 gpgv2 option removed" + select BR2_LEGACY + select BR2_PACKAGE_GNUPG2_GPGV + help + The gpgv2 executable is now named gpgv. The config option + has been renamed accordingly. + +config BR2_PACKAGE_IMX_GPU_VIV_APITRACE + bool "Vivante apitrace tool option removed" + select BR2_LEGACY + help + The apitrace tool for Vivante is not provided by the + imx-gpu-viv package any longer. + +config BR2_PACKAGE_IMX_GPU_VIV_G2D + bool "Vivante G2D libraries from imx-gpu-viv removed" + select BR2_LEGACY + select BR2_PACKAGE_IMX_GPU_G2D + help + The G2D libraries are now provided by the imx-gpu-g2d package. + +############################################################################### +comment "Legacy options removed in 2017.11" + +config BR2_PACKAGE_RFKILL + bool "rfkill package removed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_RFKILL + help + The rfkill program is now provided by the util-linux package. + +config BR2_PACKAGE_UTIL_LINUX_RESET + bool "util-linux reset option removed" + select BR2_LEGACY + help + The util-linux package no longer offers a "reset" command. Use + either the reset command provided by BusyBox or select ncurses + programs, which will install a symlink from "tset" to reset. + +config BR2_PACKAGE_POLICYCOREUTILS_AUDIT2ALLOW + bool "policycoreutils audit2allow option removed" + select BR2_LEGACY + select BR2_PACKAGE_SELINUX_PYTHON + select BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW + help + The policycoreutils package no longer offers audit2allow + as a option. This package has been moved into the + selinux-python package by the SELinux maintainers. + +config BR2_PACKAGE_POLICYCOREUTILS_RESTORECOND + bool "policycoreutils restorecond option removed" + select BR2_LEGACY + select BR2_PACKAGE_RESTORECOND + help + The policycoreutils package no longer offers restorecond + as a option. This package has been moved into a seperate + package maintained by the SELinux maintainers. + +config BR2_PACKAGE_SEPOLGEN + bool "sepolgen package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_SELINUX_PYTHON + select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN + help + Sepolgen is no longer a individual package, but instead has + been moved into the selinux-python package by the SELinux + maintainers. + +config BR2_PACKAGE_OPENOBEX_BLUEZ + bool "openobex bluez option removed" + select BR2_LEGACY + select BR2_PACKAGE_BLUEZ_UTILS + help + The OpenOBEX package no longer offers an option to enable or + disable BlueZ support. Instead, BlueZ support is always + included when the bluez5_utils or bluez_utils package is + selected. + +config BR2_PACKAGE_OPENOBEX_LIBUSB + bool "openobex libusb option removed" + select BR2_LEGACY + select BR2_PACKAGE_LIBUSB + help + The OpenOBEX package no longer offers an option to enable or + disable libusb support. Instead, USB support is always + included when the libusb package is selected. + +config BR2_PACKAGE_OPENOBEX_APPS + bool "openobex apps option removed" + select BR2_LEGACY + help + The OpenOBEX package no longer offers an option to enable or + disable apps support. + +config BR2_PACKAGE_OPENOBEX_SYSLOG + bool "openobex syslog option removed" + select BR2_LEGACY + help + The OpenOBEX package no longer offers an option to enable or + disable syslog support. + +config BR2_PACKAGE_OPENOBEX_DUMP + bool "openobex dump option removed" + select BR2_LEGACY + help + The OpenOBEX package no longer offers an option to enable or + disable dump support. + +config BR2_PACKAGE_AICCU + bool "aiccu utility removed" + select BR2_LEGACY + help + As the SixXS project has ceased its operation on 2017-06-06, + the AICCU utility has no use anymore and has been removed. + + https://www.sixxs.net/sunset/ + +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "util-linux login utilities option removed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own configuration options in the util-linux menu. + +############################################################################### +comment "Legacy options removed in 2017.08" + +config BR2_TARGET_GRUB + bool "grub (aka grub-legacy) has been removed" + select BR2_LEGACY + help + grub-legacy is no longer maintained, and no longer builds with + recent binutils versions. + + Use grub2 or syslinux instead. + +config BR2_PACKAGE_SIMICSFS + bool "simicsfs support removed" + select BR2_LEGACY + help + Support for simicsfs kernel driver that provides access to a + host computer's local filesystem when the target is + executing within a SIMICS simulation has been removed. + + Simics is now moving away from the simicsfs kernel module, + as the kernel module has required too much maintenance + work. Users should move to the user mode Simics agent + instead. + +config BR2_BINUTILS_VERSION_2_26_X + bool "binutils version 2.26 support removed" + select BR2_LEGACY + help + Support for binutils version 2.26 has been removed. The + current default version (2.28 or later) has been selected + instead. + +config BR2_XTENSA_OVERLAY_DIR + string "The BR2_XTENSA_OVERLAY_DIR option has been removed" + help + The BR2_XTENSA_OVERLAY_DIR has been removed in favour of + BR2_XTENSA_OVERLAY_FILE. You must now pass the complete + path to the overlay file, not to the directory containing + it. + +config BR2_XTENSA_OVERLAY_DIR_WRAP + bool + default y if BR2_XTENSA_OVERLAY_DIR != "" + select BR2_LEGACY + +config BR2_XTENSA_CUSTOM_NAME + string "The BR2_XTENSA_CUSTOM_NAME option has been removed" + help + The BR2_XTENSA_CUSTOM_NAME option has been removed. + +config BR2_XTENSA_CUSTOM_NAME_WRAP + bool + default y if BR2_XTENSA_CUSTOM_NAME != "" + select BR2_LEGACY + +config BR2_PACKAGE_HOST_MKE2IMG + bool "host mke2img has been removed" + select BR2_LEGACY + help + We now call mkfs directly to generate ext2/3/4 filesystem + image, so mke2img is no longer necessary. + +config BR2_TARGET_ROOTFS_EXT2_BLOCKS + int "exact size in blocks has been removed" + default 0 + help + This option has been removed in favor of + BR2_TARGET_ROOTFS_EXT2_SIZE. It has been set automatically + to the value you had before. Set to 0 here to remove the + warning. + +config BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP + bool + default y if BR2_TARGET_ROOTFS_EXT2_BLOCKS != 0 && \ + BR2_TARGET_ROOTFS_EXT2_BLOCKS != 61440 # deprecated default value + select BR2_LEGACY + +# Note: BR2_TARGET_ROOTFS_EXT2_BLOCKS_WRAP still referenced in fs/ext2/Config.in + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES + int "ext2 extra inodes has been removed" if BR2_TARGET_ROOTFS_EXT2_INODES = 0 + default 0 + help + Buildroot now uses mkfs.ext2/3/4 to generate ext2/3/4 + images. It now automatically selects the number of inodes + based on the image size. The extra number of inodes can no + longer be provided; instead, provide the total number of + inodes needed in BR2_TARGET_ROOTFS_EXT2_INODES. + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES_WRAP + bool + default y if BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES != 0 + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE + bool "cdxaparse removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC + bool "dataurisrc moved to gstreamer1" + select BR2_LEGACY + help + Dataurisrc has moved to gstreamer core and is always built. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP + bool "dccp removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE + bool "hdvparse removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE + bool "mve removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX + bool "nuvdemux removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT + bool "patchdetect removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI + bool "sdi removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA + bool "tta removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE + bool "videomeasure removed" + select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IQA + select BR2_LEGACY + help + videomeasure plugin has been removed and has been replaced by + iqa, which has automatically been enabled. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK + bool "apexsink removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL + bool "sdl removed" + select BR2_LEGACY + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD + bool "mad (*.mp3 audio) removed" + select BR2_LEGACY + +config BR2_STRIP_none + bool "Strip command 'none' has been removed" + select BR2_LEGACY + help + The strip command choice has been changed into a single + boolean option. Please check that the new setting is + correct (in the "Build options" sub-menu) + +config BR2_PACKAGE_BEECRYPT_CPP + bool "C++ support removed in beecrypt" + select BR2_LEGACY + help + Support for C++ depends on icu. The beecrypt package is + incompatible with icu 59+. + +config BR2_PACKAGE_SPICE_CLIENT + bool "spice client support removed" + select BR2_LEGACY + help + Spice client support has been removed upstream. The + functionality now lives in the spice-gtk widget and + virt-viewer. + +config BR2_PACKAGE_SPICE_GUI + bool "spice gui support removed" + select BR2_LEGACY + help + Spice gui support has been removed upstream. The + functionality now lives in the spice-gtk widget and + virt-viewer. + +config BR2_PACKAGE_SPICE_TUNNEL + bool "spice network redirection removed" + select BR2_LEGACY + help + Spice network redirection, aka tunnelling has been removed + upstream. + +config BR2_PACKAGE_INPUT_TOOLS + bool "input-tools removed" + select BR2_LEGACY + select BR2_PACKAGE_LINUXCONSOLETOOLS + help + input-tools has been removed, it is replaced by + linuxconsoletools, which has automatically been enabled. + +config BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH + bool "inputattach moved to linuxconsoletools" + select BR2_LEGACY + select BR2_PACKAGE_LINUXCONSOLETOOLS + select BR2_PACKAGE_LINUXCONSOLETOOLS_INPUTATTACH + help + input-tools has been removed, inputattach is now part + of linuxconsoletools, which has automatically been + enabled. + +config BR2_PACKAGE_INPUT_TOOLS_JSCAL + bool "jscal moved to linuxconsoletools" + select BR2_LEGACY + select BR2_PACKAGE_LINUXCONSOLETOOLS + select BR2_PACKAGE_LINUXCONSOLETOOLS_JOYSTICK + help + input-tools has been removed, jscal is now part + of linuxconsoletools, which has automatically been + enabled. + +config BR2_PACKAGE_INPUT_TOOLS_JSTEST + bool "jstest moved to linuxconsoletools" + select BR2_LEGACY + select BR2_PACKAGE_LINUXCONSOLETOOLS + select BR2_PACKAGE_LINUXCONSOLETOOLS_JOYSTICK + help + input-tools has been removed, jstest is now part + of linuxconsoletools, which has automatically been + enabled. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + bool "SH Sourcery toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the sh architecture has + been removed, since it uses glibc older than 2.17 that + requires -lrt to link executables using clock_* system calls. + This makes this toolchain difficult to maintain over time. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86 + bool "x86 Sourcery toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the x86 architecture has + been removed, since it uses glibc older than 2.17 that + requires -lrt to link executables using clock_* system calls. + This makes this toolchain difficult to maintain over time. + +config BR2_GCC_VERSION_4_8_X + bool "gcc 4.8.x support removed" + select BR2_LEGACY + help + Support for gcc version 4.8.x has been removed. The current + default version (5.x or later) has been selected instead. + +############################################################################### +comment "Legacy options removed in 2017.05" + +config BR2_PACKAGE_SUNXI_MALI_R2P4 + bool "sunxi-mali r2p4 removed" + select BR2_LEGACY + help + sunxi-mali libMali for r2p4 Mali kernel module has been + removed since the libump package only provides libUMP.so.3. + libMali for r2p4 Mali kernel module requires libUMP.so.2. + +config BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT + bool "CoffeeScript option has been removed" + select BR2_LEGACY + help + The option to enable NodeJS CoffeeScript has been removed. + To continue using it, add "coffee-script" to + BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL. + +config BR2_PACKAGE_NODEJS_MODULES_EXPRESS + bool "Express web application framework option has been removed" + select BR2_LEGACY + help + The option to enable the NodeJS Express web application + framework has been removed. To continue using it, add + "express" to BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL. + +config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL + bool "bluez5_utils gatttool install option removed" + select BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED + help + The option to install gatttool specifically has been removed. + Since version 5.44 gatttool is in the list of deprecated + tools. The option to build and install deprecated tools has + been automatically enabled. + +config BR2_PACKAGE_OPENOCD_FT2XXX + bool "openocd ft2232 support has been removed" + select BR2_PACKAGE_OPENOCD_FTDI + select BR2_LEGACY + help + FT2232 support in OpenOCD has been removed, it's replaced by + FDTI support, which has automatically been enabled. + +config BR2_PACKAGE_KODI_RTMPDUMP + bool "kodi rtmp has been removed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_INPUTSTREAM_RTMP + help + Internal rtmp support was removed from Kodi. + +config BR2_PACKAGE_KODI_VISUALISATION_FOUNTAIN + bool "kodi-visualisation-fountain has been removed" + select BR2_LEGACY + help + According to upstream 'the visualization is not currently + in a working shape.' + +config BR2_PACKAGE_PORTMAP + bool "portmap has been removed" + select BR2_LEGACY + select BR2_PACKAGE_RPCBIND + help + The portmap upstream tarball is removed, no releases since + ten years and latest change in upstream git in 2014. + You should better use rpcbind as a RPC portmapper. + +config BR2_BINUTILS_VERSION_2_25_X + bool "binutils version 2.25 support removed" + select BR2_LEGACY + help + Support for binutils version 2.25 has been removed. The + current default version (2.27 or later) has been selected + instead. + +config BR2_TOOLCHAIN_BUILDROOT_INET_RPC + bool "uclibc RPC support has been removed" + select BR2_LEGACY + help + uClibc-ng removed internal RPC implementation in 1.0.23. You + should use libtirpc instead. + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS + int "extra size in blocks has been removed" + default 0 + help + Since the support for auto calculation of the filesystem size + has been removed, this option is now useless and must be 0. + You may want to check that BR2_TARGET_ROOTFS_EXT2_BLOCKS + matchs your needs. + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS_WRAP + bool + default y if BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS != 0 + select BR2_LEGACY + +config BR2_PACKAGE_SYSTEMD_KDBUS + bool "systemd-kdbus has been removed" + select BR2_LEGACY + help + --enable/disable-kdbus configure option has been removed since + systemd-231. + +config BR2_PACKAGE_POLARSSL + bool "polarssl has been removed" + select BR2_LEGACY + help + The polarssl crypto library has been removed since the 1.2.x + release branch is no longer maintained. Newer upstream + branches/releases (mbedtls) have API changes so they're not + drop-in replacements. + +config BR2_NBD_CLIENT + bool "nbd client option was renamed" + select BR2_LEGACY + select BR2_PACKAGE_NBD_CLIENT + help + The nbd client option has been renamed to + BR2_PACKAGE_NBD_CLIENT. + +config BR2_NBD_SERVER + bool "nbd server option was renamed" + select BR2_LEGACY + select BR2_PACKAGE_NBD_SERVER + help + The nbd server option has been renamed to + BR2_PACKAGE_NBD_SERVER. + +config BR2_PACKAGE_GMOCK + bool "gmock merged into gtest package" + select BR2_LEGACY + select BR2_PACKAGE_GTEST + select BR2_PACKAGE_GTEST_GMOCK + help + GMock is now a suboption of the GTest package. + +config BR2_KERNEL_HEADERS_4_8 + bool "kernel headers version 4.8.x are no longer supported" + select BR2_LEGACY + help + Version 4.8.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_3_18 + bool "kernel headers version 3.18.x are no longer supported" + select BR2_LEGACY + help + Version 3.18.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_GLIBC_VERSION_2_22 + bool "glibc 2.22 removed" + select BR2_LEGACY + help + Support for glibc version 2.22 has been removed. The current + default version has been selected instead. + +############################################################################### +comment "Legacy options removed in 2017.02" + +config BR2_PACKAGE_PERL_DB_FILE + bool "perl-db-file removed" + select BR2_LEGACY + select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_PERL + help + DB_File can be built as a core Perl module, so the separate + perl-db-file package has been removed. + +config BR2_KERNEL_HEADERS_4_7 + bool "kernel headers version 4.7.x are no longer supported" + select BR2_LEGACY + help + Version 4.7.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_4_6 + bool "kernel headers version 4.6.x are no longer supported" + select BR2_LEGACY + help + Version 4.6.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_4_5 + bool "kernel headers version 4.5.x are no longer supported" + select BR2_LEGACY + help + Version 4.5.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_3_14 + bool "kernel headers version 3.14.x are no longer supported" + select BR2_LEGACY + help + Version 3.14.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS + bool "musl-cross 1.1.12 toolchain removed" + select BR2_LEGACY + help + The support for the prebuilt toolchain based on the Musl C + library provided by the musl-cross project has been removed. + Upstream doesn't provide any prebuilt toolchain anymore, use + the Buildroot toolchain instead. + +config BR2_UCLIBC_INSTALL_TEST_SUITE + bool "uClibc tests now in uclibc-ng-test" + select BR2_LEGACY + select BR2_PACKAGE_UCLIBC_NG_TEST + help + The test suite of the uClibc C library has been moved into a + separate package, uclibc-ng-test. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX + bool "Blackfin.uclinux.org 2014R1 toolchain removed" + select BR2_LEGACY + help + The ADI Blackfin toolchain has many bugs which are fixed in + more recent gcc and uClibc-ng releases. Use the Buildroot + toolchain instead. + +config BR2_PACKAGE_MAKEDEVS + bool "makedevs removed" + select BR2_LEGACY + help + The makedevs tool is part of busybox. The Buildroot fork + should not be used outside of the Buildroot infrastructure. + +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A + bool "Arago ARMv7 2011.09 removed" + select BR2_LEGACY + help + The Arago toolchains are every old and not updated anymore. + +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE + bool "Arago ARMv5 2011.09 removed" + select BR2_LEGACY + help + The Arago toolchains are every old and not updated anymore. + +config BR2_PACKAGE_SNOWBALL_HDMISERVICE + bool "snowball-hdmiservice removed" + select BR2_LEGACY + help + We no longer have support for the Snowball platform in + Buildroot, so this package was no longer useful. + +config BR2_PACKAGE_SNOWBALL_INIT + bool "snowball-init removed" + select BR2_LEGACY + help + We no longer have support for the Snowball platform in + Buildroot, so this package was no longer useful. + +config BR2_GDB_VERSION_7_9 + bool "gdb 7.9 has been removed" + select BR2_LEGACY + help + The 7.9 version of gdb has been removed. Use a newer version + instead. + +############################################################################### +comment "Legacy options removed in 2016.11" + +config BR2_PACKAGE_PHP_SAPI_CLI_CGI + bool "PHP CGI and CLI options are now seperate" + select BR2_PACKAGE_PHP_SAPI_CLI + select BR2_PACKAGE_PHP_SAPI_CGI + select BR2_LEGACY + help + The PHP Interface options have been split up into a + separate option for each interface. + +config BR2_PACKAGE_PHP_SAPI_CLI_FPM + bool "PHP CLI and FPM options are now separate" + select BR2_PACKAGE_PHP_SAPI_CLI + select BR2_PACKAGE_PHP_SAPI_FPM + select BR2_LEGACY + help + The PHP Interface options have been split up into a + separate option for each interface. + +config BR2_PACKAGE_WVSTREAMS + bool "wvstreams removed" + select BR2_LEGACY + help + wvstreams is not maintained anymore since about 2009. It also + doesn't build anymore with recent compilers (GCC 5+). + +config BR2_PACKAGE_WVDIAL + bool "wvdial removed" + select BR2_LEGACY + help + wvdial is not maintained anymore since about 2009. It also + doesn't build anymore with recent compilers (GCC 5+). + +config BR2_PACKAGE_WEBKITGTK24 + bool "webkitgtk 2.4.x removed" + select BR2_LEGACY + help + This legacy package only existed because some other packages + depended on that specific version of webkitgtk. However, the + other packages have been fixed. webkitgtk 2.4 is full of + security issues so it needs to be removed. + +config BR2_PACKAGE_TORSMO + bool "torsmo removed" + select BR2_LEGACY + help + torsmo has been unmaintained for a long time, and nobody + seems to be interested in it. + +config BR2_PACKAGE_SSTRIP + bool "sstrip removed" + select BR2_LEGACY + help + sstrip is unmaintained and potentially harmful. It doesn't + save so much compared to normal binutils strip, and there is + a big risk of binaries that don't work. Use normal strip + instead. + +config BR2_KERNEL_HEADERS_4_3 + bool "kernel headers version 4.3.x are no longer supported" + select BR2_LEGACY + help + Version 4.3.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_KERNEL_HEADERS_4_2 + bool "kernel headers version 4.2.x are no longer supported" + select BR2_LEGACY + help + Version 4.2.x of the Linux kernel headers are no longer + maintained upstream and are now removed. + +config BR2_PACKAGE_KODI_ADDON_XVDR + bool "kodi-addon-xvdr removed" + select BR2_LEGACY + help + According to the github project page: + https://github.com/pipelka/xbmc-addon-xvdr + this package is discontinued. + +config BR2_PACKAGE_IPKG + bool "ipkg removed" + select BR2_LEGACY + help + ipkg dates back to the early 2000s when Compaq started the + handhelds.org project and it hasn't seen development since + 2006. Use opkg as a replacement. + +config BR2_GCC_VERSION_4_7_X + bool "gcc 4.7.x support removed" + select BR2_LEGACY + help + Support for gcc version 4.7.x has been removed. The current + default version (4.9.x or later) has been selected instead. + +config BR2_BINUTILS_VERSION_2_24_X + bool "binutils version 2.24 support removed" + select BR2_LEGACY + help + Support for binutils version 2.24 has been removed. The + current default version (2.26 or later) has been selected + instead. + +config BR2_PACKAGE_WESTON_RPI + bool "Weston propietary RPI support is gone" + select BR2_LEGACY + help + Upstream decided the propietary (rpi-userland) weston composer + support wasn't worth the effort so it was removed. Switch to + the open VC4 support. + +config BR2_LINUX_KERNEL_TOOL_CPUPOWER + bool "linux-tool cpupower" + depends on BR2_LINUX_KERNEL + select BR2_LEGACY + select BR2_PACKAGE_LINUX_TOOLS_CPUPOWER + help + Linux tool cpupower option was renamed. + +config BR2_LINUX_KERNEL_TOOL_PERF + bool "linux-tool perf" + depends on BR2_LINUX_KERNEL + select BR2_LEGACY + select BR2_PACKAGE_LINUX_TOOLS_PERF + help + Linux tool perf option was renamed. + +config BR2_LINUX_KERNEL_TOOL_SELFTESTS + bool "linux-tool selftests" + depends on BR2_LINUX_KERNEL + select BR2_LEGACY + select BR2_PACKAGE_LINUX_TOOLS_SELFTESTS + help + Linux tool selftests option was renamed. + +config BR2_GCC_VERSION_4_8_ARC + bool "gcc arc option renamed" + select BR2_LEGACY + select BR2_GCC_VERSION_ARC + help + The option that selects the gcc version for the ARC + architecture has been renamed to BR2_GCC_VERSION_ARC. + +config BR2_KERNEL_HEADERS_4_0 + bool "kernel headers version 4.0.x are no longer supported" + select BR2_LEGACY + help + Version 4.0.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + +config BR2_KERNEL_HEADERS_3_19 + bool "kernel headers version 3.19.x are no longer supported" + select BR2_LEGACY + help + Version 3.19.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + bool "libevas-generic-loaders package removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.18, libevas-generic-loaders is now provided by the + efl package. + +config BR2_PACKAGE_ELEMENTARY + bool "elementary package removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.18, elementary is now provided by the efl package. + +config BR2_LINUX_KERNEL_CUSTOM_LOCAL + bool "Linux kernel local directory option removed" + help + The option to select a local directory as the source of the + Linux kernel has been removed. It hurts reproducibility of + builds. + + In case you were using this option during development of your + Linux kernel, use the override mechanism instead. + +############################################################################### +comment "Legacy options removed in 2016.08" + +config BR2_PACKAGE_EFL_JP2K + bool "libevas jp2k loader has been removed" + select BR2_LEGACY + help + JP2K support in EFL requires openjpeg 1.x (libopenjpeg1.pc) + while Buildroot only packages openjpeg 2.x. Therefore, the + JP2K loader has been removed from EFL. + +config BR2_PACKAGE_SYSTEMD_COMPAT + bool "systemd compatibility libraries have been removed" + select BR2_LEGACY + help + The systemd option to enable the compatibility libraries has + been removed. Theses libraries have been useless since a few + version, and have been fully dropped from the source since + v230. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER + bool "gst1-plugins-bad liveadder plugin removed" + select BR2_LEGACY + select BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOMIXER + help + The functionality of the liveadder plugin of the + gst1-plugins-bad package has been merged into audiomixer. + +config BR2_PACKAGE_LIBFSLVPUWRAP + bool "libfslvpuwrap has been renamed to imx-vpuwrap" + select BR2_LEGACY + select BR2_PACKAGE_IMX_VPUWRAP + help + The libfslvpuwrap has been renamed to match the renamed + package. + +config BR2_PACKAGE_LIBFSLPARSER + bool "libfslparser has been renamed to imx-parser" + select BR2_LEGACY + select BR2_PACKAGE_IMX_PARSER + help + The libfslparser has been renamed to match the renamed + package. + +config BR2_PACKAGE_LIBFSLCODEC + bool "libfslcodec has been renamed to imx-codec" + select BR2_LEGACY + select BR2_PACKAGE_IMX_CODEC + help + The libfslcodec has been renamed to match the renamed package. + +config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT + bool "FIT support in uboot-tools has been refactored" + select BR2_LEGACY + select BR2_PACKAGE_DTC + select BR2_PACKAGE_DTC_PROGRAMS + select BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT + select BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT + select BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + help + This option has been removed in favor of a more fine-grained + configuration, which is recommended. Selecting this option + enables FIT and FIT signature support for the target packages. + It will also select the dtc and openssl packages. + +config BR2_PTHREADS_OLD + bool "linuxthreads (stable/old)" + select BR2_LEGACY + help + Linuxthreads have been reworked, BR2_PTHREADS_OLD is now + BR2_PTHREADS and the old BR2_PTHREADS - LT.new got removed. + +config BR2_BINUTILS_VERSION_2_23_X + bool "binutils 2.23 removed" + select BR2_LEGACY + help + Binutils 2.23 has been removed, using a newer version is + recommended. + +config BR2_TOOLCHAIN_BUILDROOT_EGLIBC + bool "eglibc support has been removed" + select BR2_LEGACY + help + The eglibc project no longer exists, as it has been merged + back into the glibc project. Therefore, support for eglibc + has been removed, and glibc should be used instead. + +config BR2_GDB_VERSION_7_8 + bool "gdb 7.8 has been removed" + select BR2_LEGACY + help + The 7.8 version of gdb has been removed. Use a newer version + instead. + +############################################################################### +comment "Legacy options removed in 2016.05" + +config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL + bool "openvpn polarssl crypto backend removed" + select BR2_LEGACY + help + The OpenVPN polarssl crypto backend option has been removed. + Version from 2.3.10 onwards need polarssl >= 1.3.8 but aren't + compatible with mbedtls (polarssl) series 2.x which is the + version provided in buildroot. And both can't coexist. + It now uses OpenSSL as the only option. + +config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE + bool "nginx http spdy module removed" + select BR2_LEGACY + select BR2_PACKAGE_NGINX_HTTP_V2_MODULE + help + The ngx_http_spdy_module has been superseded by the + ngx_http_v2_module since nginx v1.9.5. The + ngx_http_v2_module modules has been automatically selected + in your configuration. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTP + bool "gst1-plugins-bad rtp plugin moved to good" + select BR2_LEGACY + help + The rtp plugin has been moved from gst1-plugins-base to + gst1-plugins-good. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123 + bool "gst1-plugins-bad mpg123 plugin moved to ugly" + select BR2_LEGACY + help + The mpg123 plugin has been moved from gst1-plugins-bad to + gst1-plugins-ugly. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC + bool "PowerPC Sourcery toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the PowerPC + architecture has been removed, as it was very old, not + maintained, and causing numerous build failures with modern + userspace packages. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2 + bool "PowerPC Sourcery E500v2 toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the PowerPC E500v2 + architecture has been removed, as it was very old, not + maintained, and causing numerous build failures with modern + userspace packages. + +config BR2_x86_i386 + bool "x86 i386 support removed" + select BR2_LEGACY + help + The support for the i386 processors of the x86 architecture + has been removed. + +config BR2_PACKAGE_QT5QUICK1 + bool "qt5quick1 package removed" + select BR2_LEGACY + help + The qt5quick1 package has been removed, since it was removed + from upstream starting from Qt 5.6. + +config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR + string "uboot custom patch dir has been removed" + help + The uboot custom patch directory option has been removed. Use + the improved BR2_TARGET_UBOOT_PATCH option instead. + +config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR_WRAP + bool + default y if BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR != "" + select BR2_LEGACY + +# Note: BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR is still referenced from +# boot/uboot/Config.in + +config BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID + bool "xf86-input-void removed" + select BR2_LEGACY + help + The xf86-input-void package has been removed, there's no need + for it in any modern (post-2007) xorg server. + +config BR2_KERNEL_HEADERS_3_17 + bool "kernel headers version 3.17.x are no longer supported" + select BR2_LEGACY + help + Version 3.17.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_GDB_VERSION_7_7 + bool "gdb 7.7 has been removed" + select BR2_LEGACY + help + The 7.7 version of gdb has been removed. Use a newer version + instead. + +config BR2_PACKAGE_FOOMATIC_FILTERS + bool "foomatic-filters" + select BR2_LEGACY + help + The foomatic-filters package was removed. + +config BR2_PACKAGE_SAMBA + bool "samba" + select BR2_LEGACY + help + The samba package was removed in favour of samba4 since the + 3.x series isn't supported by upstream any longer. + +config BR2_PACKAGE_KODI_WAVPACK + bool "wavpack" + select BR2_LEGACY + help + wavpack support was removed in favour of ffmpeg: + https://github.com/xbmc/xbmc/commit/7916902c9e6f7a523265594f3ad7f921f93f1cd4 + +config BR2_PACKAGE_KODI_RSXS + bool "rsxs support in Kodi was moved to an addon" + select BR2_LEGACY + select BR2_PACKAGE_KODI_SCREENSAVER_RSXS + help + rsxs support in Kodi was moved to an addon + +config BR2_PACKAGE_KODI_GOOM + bool "Goom support in Kodi was moved to an addon" + select BR2_LEGACY + select BR2_PACKAGE_KODI_VISUALISATION_GOOM + help + Goom support in Kodi was moved to an addon + +config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS + bool "systemd all extras option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_XZ + select BR2_PACKAGE_LIBGCRYPT + help + The systemd option to enable "all extras" has been + removed. To get the same features, the libgcrypt and xz + package should now be enabled. + +config BR2_GCC_VERSION_4_5_X + bool "gcc 4.5.x has been removed" + select BR2_LEGACY + help + The 4.5.x version of gcc has been removed. Use a newer + version instead. + +config BR2_PACKAGE_SQLITE_READLINE + bool "sqlite command-line editing support was updated" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + select BR2_LEGACY + help + This option was removed in favour of the sqlite package + deciding itself depending on the enabled packages whether + command-line editing should be enabled, it also also takes + libedit into account. + +############################################################################### +comment "Legacy options removed in 2016.02" + +config BR2_PACKAGE_DOVECOT_BZIP2 + bool "bzip2 support option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_BZIP2 + help + Bzip2 support is built if the bzip2 package is selected. + +config BR2_PACKAGE_DOVECOT_ZLIB + bool "zlib support option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_ZLIB + help + Zlib support is built if the zlib package is selected. + +config BR2_PACKAGE_E2FSPROGS_FINDFS + bool "e2fsprogs findfs option has been removed" + select BR2_LEGACY + help + This option attempted to enable findfs capabilities from + e2fsprogs but has not worked since July 2015 (due to + packaging changes). One can use BusyBox's findfs support or + enable the BR2_PACKAGE_UTIL_LINUX_BINARIES option. + +config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL + bool "openpowerlink debug option has been removed" + select BR2_LEGACY + help + This option depends on BR2_ENABLE_DEBUG which should not be + used by packages anymore. + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + bool "openpowerlink package has been updated" + select BR2_LEGACY + select BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB + help + openpowerlink kernel modules are built if the + kernel stack library is selected. + +config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP + bool "openpowerlink package has been updated" + select BR2_LEGACY + select BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB + help + The user space support has been split in two part: + - a monolitic user space library + - a user spae deamon driver + +config BR2_LINUX_KERNEL_SAME_AS_HEADERS + bool "using the linux headers version for the kernel has been removed" + select BR2_LEGACY + help + The option to use the version of the kernel headers for the + kernel to build has been removed. + + There is now the converse, better-suited and more versatile + option to use the kernel version for the linux headers. + +config BR2_PACKAGE_CUPS_PDFTOPS + bool "Pdftops support has been removed from Cups" + select BR2_PACKAGE_CUPS_FILTERS + select BR2_LEGACY + help + Pdftops support has been removed from the cups package + It is now part of the cups-filters package. + +config BR2_KERNEL_HEADERS_3_16 + bool "kernel headers version 3.16.x are no longer supported" + select BR2_LEGACY + help + Version 3.16.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_PACKAGE_PYTHON_PYXML + bool "python-pyxml package has been removed" + select BR2_LEGACY + help + PyXML is obsolete and its functionality is covered either via + native Python XML support or python-lxml package. + +# BR2_ENABLE_SSP is still referenced in Config.in (default in choice) +config BR2_ENABLE_SSP + bool "Stack Smashing protection now has different levels" + help + The protection offered by SSP can now be selected from + different protection levels. Be sure to review the SSP level + in the build options menu. + +config BR2_PACKAGE_DIRECTFB_CLE266 + bool "cle266 driver for directfb removed" + select BR2_LEGACY + help + The cle266 directfb driver support has been removed. + It doesn't build in the latest version and it's unlikely + anyone has any use for it. + +config BR2_PACKAGE_DIRECTFB_UNICHROME + bool "unichrome driver for directfb removed" + select BR2_LEGACY + help + The unichrome directfb driver support has been removed. + It doesn't build in the latest version and it's unlikely + anyone has any use for it. + +config BR2_PACKAGE_LIBELEMENTARY + bool "libelementary has been renamed to elementary" + select BR2_LEGACY + select BR2_PACKAGE_ELEMENTARY + help + The libelementary package has been renamed to match the + upstream name. + +config BR2_PACKAGE_LIBEINA + bool "libeina package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeina is now provided by the efl package. + +config BR2_PACKAGE_LIBEET + bool "libeet package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeet is now provided by the efl package. + +config BR2_PACKAGE_LIBEVAS + bool "libevas package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libevas is now provided by the efl package. + +config BR2_PACKAGE_LIBECORE + bool "libecore package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libecore is now provided by the efl package. + +config BR2_PACKAGE_LIBEDBUS + bool "libedbus package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libedbus is now provided by the efl package. + +config BR2_PACKAGE_LIBEFREET + bool "libefreet package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libefreet is now provided by the efl package. + +config BR2_PACKAGE_LIBEIO + bool "libeio package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeio is now provided by the efl package. + +config BR2_PACKAGE_LIBEMBRYO + bool "libembryo package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libembryo is now provided by the efl package. + +config BR2_PACKAGE_LIBEDJE + bool "libedje package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libedje is now provided by the efl package. + +config BR2_PACKAGE_LIBETHUMB + bool "libethumb package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libethumb is now provided by the efl package. + +config BR2_PACKAGE_INFOZIP + bool "infozip option has been renamed to zip" + select BR2_LEGACY + select BR2_PACKAGE_ZIP + help + Info-Zip's Zip package has been renamed from infozip to zip, + to avoid ambiguities with Info-Zip's UnZip which has been + added in the unzip package. + +config BR2_BR2_PACKAGE_NODEJS_0_10_X + bool "nodejs 0.10.x option removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs 0.10.x option has been removed. 0.10.x is now + automatically chosen for ARMv5 architectures only and the + latest nodejs for all other supported architectures. The + correct nodejs version has been automatically selected in your + configuration. + +config BR2_BR2_PACKAGE_NODEJS_0_12_X + bool "nodejs version 0.12.x has been removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs version 0.12.x has been removed. As an alternative, + the latest nodejs version has been automatically selected in + your configuration. + +config BR2_BR2_PACKAGE_NODEJS_4_X + bool "nodejs version 4.x has been removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs version 4.x has been removed. As an alternative, + the latest nodejs version has been automatically selected in + your configuration. + +############################################################################### +comment "Legacy options removed in 2015.11" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL + bool "gst1-plugins-bad real plugin has been removed" + select BR2_LEGACY + help + The real plugin from GStreamer 1 bad plugins has been + removed. + +config BR2_PACKAGE_MEDIA_CTL + bool "media-ctl package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_LIBV4L + select BR2_PACKAGE_LIBV4L_UTILS + help + media-ctl source and developement have been moved to v4l-utils + since June 2014. For an up-to-date media-ctl version select + BR2_PACKAGE_LIBV4L and BR2_PACKAGE_LIBV4L_UTILS. + +config BR2_PACKAGE_SCHIFRA + bool "schifra package has been removed" + select BR2_LEGACY + help + Schifra package has been maked broken since 2014.11 release + and haven't been fixed since then. + +config BR2_PACKAGE_ZXING + bool "zxing option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_ZXING_CPP + help + ZXing no longer provides the cpp bindings, it has been renamed + to BR2_PACKAGE_ZXING_CPP which uses a new upstream. + +# Since FreeRDP has new dependencies, protect this legacy to avoid the +# infamous "unmet direct dependencies" kconfig error. +config BR2_PACKAGE_FREERDP_CLIENT + bool "freerdp client option renamed" + depends on BR2_PACKAGE_FREERDP + select BR2_LEGACY + select BR2_PACKAGE_FREERDP_CLIENT_X11 + +config BR2_PACKAGE_BLACKBOX + bool "blackbox package has been removed" + select BR2_LEGACY + help + Upstream is dead and the package has been deprecated for + some time. There are other alternative maintained WMs. + +config BR2_KERNEL_HEADERS_3_0 + bool "kernel headers version 3.0.x are no longer supported" + select BR2_LEGACY + help + Version 3.0.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + +config BR2_KERNEL_HEADERS_3_11 + bool "kernel headers version 3.11.x are no longer supported" + select BR2_LEGACY + help + Version 3.11.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_KERNEL_HEADERS_3_13 + bool "kernel headers version 3.13.x are no longer supported" + select BR2_LEGACY + help + Version 3.13.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_KERNEL_HEADERS_3_15 + bool "kernel headers version 3.15.x are no longer supported" + select BR2_LEGACY + help + Version 3.15.x of the Linux kernel headers have been + deprecated for more than four buildroot releases and are now + removed. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI + bool "DirectFB example df_andi has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD + bool "DirectFB example df_bltload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD + bool "DirectFB example df_cpuload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER + bool "DirectFB example df_databuffer has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD + bool "DirectFB example df_dioload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK + bool "DirectFB example df_dok has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST + bool "DirectFB example df_drivertest has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE + bool "DirectFB example df_fire has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP + bool "DirectFB example df_flip has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS + bool "DirectFB example df_fonts has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT + bool "DirectFB example df_input has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK + bool "DirectFB example df_joystick has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES + bool "DirectFB example df_knuckles has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER + bool "DirectFB example df_layer has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX + bool "DirectFB example df_matrix has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER + bool "DirectFB example df_matrix_water has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO + bool "DirectFB example df_neo has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD + bool "DirectFB example df_netload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE + bool "DirectFB example df_palette has been removed" + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE + bool "DirectFB example df_particle has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER + bool "DirectFB example df_porter has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS + bool "DirectFB example df_stress has been removed" + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE + bool "DirectFB example df_texture has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO + bool "DirectFB example df_video has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE + bool "DirectFB example df_video_particle has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW + bool "DirectFB example df_window has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_KOBS_NG + bool "kobs-ng was replaced by imx-kobs" + select BR2_LEGACY + select BR2_PACKAGE_IMX_KOBS + help + The outdated kobs-ng has been replaced by the Freescale- + maintained imx-kobs package. + +config BR2_PACKAGE_SAWMAN + bool "sawman package removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_SAWMAN + help + This option has been removed because the sawman package no + longer exists: it was merged inside DirectFB itself. This + feature can now be enabled using the + BR2_PACKAGE_DIRECTFB_SAWMAN option. + +config BR2_PACKAGE_DIVINE + bool "divine package removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_DIVINE + help + This option has been removed because the divine package no + longer exists: it was merged inside DirectFB itself. This + feature can now be enabled using the + BR2_PACKAGE_DIRECTFB_DIVINE option. + +############################################################################### +comment "Legacy options removed in 2015.08" + +config BR2_PACKAGE_KODI_PVR_ADDONS + bool "Kodi PVR addon was split" + select BR2_LEGACY + select BR2_PACKAGE_KODI_PVR_ARGUSTV + select BR2_PACKAGE_KODI_PVR_DVBLINK + select BR2_PACKAGE_KODI_PVR_DVBVIEWER + select BR2_PACKAGE_KODI_PVR_FILMON + select BR2_PACKAGE_KODI_PVR_HTS + select BR2_PACKAGE_KODI_PVR_IPTVSIMPLE + select BR2_PACKAGE_KODI_PVR_MEDIAPORTAL_TVSERVER + select BR2_PACKAGE_KODI_PVR_MYTHTV + select BR2_PACKAGE_KODI_PVR_NEXTPVR + select BR2_PACKAGE_KODI_PVR_NJOY + select BR2_PACKAGE_KODI_PVR_PCTV + select BR2_PACKAGE_KODI_PVR_STALKER + select BR2_PACKAGE_KODI_PVR_VBOX + select BR2_PACKAGE_KODI_PVR_VDR_VNSI + select BR2_PACKAGE_KODI_PVR_VUPLUS + select BR2_PACKAGE_KODI_PVR_WMC + help + Kodi PVR addon was split into seperate modules + +config BR2_BINUTILS_VERSION_2_23_2 + bool "binutils 2.23 option renamed" + select BR2_LEGACY + help + Binutils 2.23.2 has been removed, using a newer version is + recommended. + +config BR2_BINUTILS_VERSION_2_24 + bool "binutils 2.24 option renamed" + select BR2_LEGACY + select BR2_BINUTILS_VERSION_2_24_X + help + The binutils version option has been renamed to match the + same patchlevel logic used by gcc. The new option is now + BR2_BINUTILS_VERSION_2_24_X. + +config BR2_BINUTILS_VERSION_2_25 + bool "binutils 2.25 option renamed" + select BR2_LEGACY + select BR2_BINUTILS_VERSION_2_25_X + help + The binutils version option has been renamed to match the + same patchlevel logic used by gcc. The new option is now + BR2_BINUTILS_VERSION_2_25_X. + +config BR2_PACKAGE_PERF + bool "perf option has been renamed" + select BR2_LEGACY + select BR2_LINUX_KERNEL_TOOL_PERF + help + The perf package has been moved as a Linux tools package, + and the option to enable it is now + BR2_LINUX_KERNEL_TOOL_PERF. + +config BR2_BINUTILS_VERSION_2_22 + bool "binutils 2.22 removed" + select BR2_LEGACY + help + Binutils 2.22 has been removed, using a newer version is + recommended. + +config BR2_PACKAGE_GPU_VIV_BIN_MX6Q + bool "gpu-viv-bin-mx6q" + select BR2_LEGACY + select BR2_PACKAGE_IMX_GPU_VIV + help + Vivante graphics libraries have been renamed to + BR2_PACKAGE_IMX_GPU_VIV to be aligned with upstream package + name. + +config BR2_PACKAGE_LIBSEMANAGE_PYTHON_BINDINGS + bool "libsemanage python bindings removed" + depends on BR2_PACKAGE_PYTHON + select BR2_LEGACY + help + This option has been removed, since the libsemanage Python + bindings on the target were not useful. + +config BR2_TARGET_UBOOT_NETWORK + bool "U-Boot custom network settings removed" + select BR2_LEGACY + help + U-Boot's custom network settings options have been removed. + +endmenu + +endif # !SKIP_LEGACY diff --git a/buildroot/DEVELOPERS b/buildroot/DEVELOPERS new file mode 100644 index 000000000..bba3fd602 --- /dev/null +++ b/buildroot/DEVELOPERS @@ -0,0 +1,2759 @@ +# Syntax: +# +# N: Firstname Lastname +# F: file pattern or directory +# F: file pattern or directory +# +# The "F" entries can be: +# +# - A directory, in which case all patches touching any file in this +# directory or its subdirectories will be CC'ed to the developer. +# - A pattern, in which case the pattern will be expanded, and then +# all files/directories (and their subdirectories) will be +# considered when matching against a patch +# +# Notes: +# +# - When a developer adds an "arch/Config.in." file to its list +# of files, he is considered a developer of this architecture. He +# will receive e-mail notifications about build failures occuring on +# this architecture. Not more than one e-mail per day is sent. +# - When a developer adds a directory that contains one or several +# packages, this developer will be notified when build failures +# occur. Not more than one e-mail per day is sent. +# - When a developer adds an "package/pkg-.mk" file to its list +# of files, he is considered interested by this package +# infrastructure, and will be CC'ed on all patches that add or +# modify packages that use this infrastructure. + +N: Adam Duskett +F: package/audit/ +F: package/busybox/ +F: package/checkpolicy/ +F: package/cppdb/ +F: package/gobject-introspection/ +F: package/gstreamer1/gstreamer1/ +F: package/gstreamer1/gstreamer1-mm/ +F: package/gstreamer1/gst1-plugins-bad/ +F: package/gstreamer1/gst1-plugins-base/ +F: package/gstreamer1/gst1-plugins-good/ +F: package/gstreamer1/gst1-plugins-ugly/ +F: package/gstreamer1/gst1-python/ +F: package/gstreamer1/gst1-vaapi/ +F: package/imx-usb-loader/ +F: package/janus-gateway/ +F: package/json-for-modern-cpp/ +F: package/libabseil-cpp/ +F: package/libcpprestsdk/ +F: package/libcutl/ +F: package/libodb/ +F: package/libodb-pgsql/ +F: package/libressl/ +F: package/libselinux/ +F: package/libsemanage/ +F: package/libsepol/ +F: package/libtextstyle/ +F: package/libwebsockets/ +F: package/mender-grubenv/ +F: package/nginx-naxsi/ +F: package/odb/ +F: package/openjdk/ +F: package/openjdk-bin/ +F: package/php/ +F: package/pkcs11-helper/ +F: package/policycoreutils/ +F: package/prelink-cross/ +F: package/polkit/ +F: package/python3/ +F: package/python-aioredis/ +F: package/python-asgiref/ +F: package/python-channels/ +F: package/python-channels-redis/ +F: package/python-daphne/ +F: package/python-django-enumfields/ +F: package/python-flask-sqlalchemy/ +F: package/python-gitdb2/ +F: package/python-gobject/ +F: package/python-lockfile/ +F: package/python-mutagen/ +F: package/python-nested-dict/ +F: package/python-pbr/ +F: package/python-pip/ +F: package/python-psycopg2/ +F: package/python-smmap2/ +F: package/python-sqlalchemy/ +F: package/python-sqlparse/ +F: package/python-visitor/ +F: package/restorecond/ +F: package/refpolicy/ +F: package/selinux-python/ +F: package/semodule-utils/ +F: package/setools/ +F: package/sngrep/ +F: package/spidermonkey/ +F: package/systemd/ +F: support/testing/tests/package/test_gst1_python.py +F: support/testing/tests/package/test_python_gobject.py + +N: Adam Heinrich +F: package/jack1/ + +N: Adrian Perez de Castro +F: package/brotli/ +F: package/bubblewrap/ +F: package/cage/ +F: package/cog/ +F: package/libepoxy/ +F: package/libwpe/ +F: package/webkitgtk/ +F: package/wlroots/ +F: package/woff2/ +F: package/wpebackend-fdo/ +F: package/wpewebkit/ +F: package/xdg-dbus-proxy/ + +N: Adrien Gallouët +F: package/bird/ +F: package/glorytun/ + +N: Aleksander Morgado +F: package/libmbim/ +F: package/libqmi/ +F: package/modem-manager/ + +N: Alex Michel +F: package/network-manager-openvpn/ + +N: Alex Suykov +F: board/chromebook/snow/ +F: configs/chromebook_snow_defconfig +F: package/vboot-utils/ + +N: Alexander Clouter +F: package/odhcp6c/ + +N: Alexander Dahl +F: package/fastd/ +F: package/libuecc/ +F: package/putty/ + +N: Alexander Kurz +F: package/minimodem/ + +N: Alexander Lukichev +F: package/openpgm/ + +N: Alexander Mukhin +F: package/tinyproxy/ + +N: Alexander Sverdlin +F: package/mini-snmpd/ + +N: Alexander Varnin +F: package/liblog4c-localtime/ + +N: Alexandre Belloni +F: package/tz/ + +N: Alexandre Esse +F: package/kvazaar/ +F: package/v4l2loopback/ + +N: Alexey Brodkin +F: board/cubietech/cubieboard2/ +F: configs/cubieboard2_defconfig + +N: Alistair Francis +F: board/sifive/ +F: boot/opensbi/ +F: configs/hifive_unleashed_defconfig +F: package/xen/ + +N: Alvaro G. M +F: package/dcron/ +F: package/libxmlrpc/ +F: package/python-docopt/ + +N: Anders Darander +F: package/ktap/ + +N: André Hentschel +F: board/freescale/imx8qxpmek/ +F: configs/freescale_imx8qxpmek_defconfig +F: package/freescale-imx/imx-sc-firmware/ +F: package/libkrb5/ +F: package/openal/ +F: package/p7zip/ +F: package/wine/ + +N: Andrey Smirnov +F: package/python-backports-shutil-get-terminal-size/ +F: package/python-decorator/ +F: package/python-ipython-genutils/ +F: package/python-pathlib2/ +F: package/python-pickleshare/ +F: package/python-scandir/ +F: package/python-simplegeneric/ +F: package/python-systemd/ +F: package/python-traitlets/ +F: package/zstd/ + +N: Andrey Yurovsky +F: package/rauc/ + +N: Angelo Compagnucci +F: package/apparmor/ +F: package/corkscrew/ +F: package/cups/ +F: package/cups-filters/ +F: package/fail2ban/ +F: package/grep/ +F: package/i2c-tools/ +F: package/jq/ +F: package/libapparmor/ +F: package/libb64/ +F: package/mender/ +F: package/mender-artifact/ +F: package/mono/ +F: package/mono-gtksharp3/ +F: package/monolite/ +F: package/openjpeg/ +F: package/python-can/ +F: package/python-pillow/ +F: package/python-pydal/ +F: package/python-spidev/ +F: package/python-web2py/ +F: package/sam-ba/ +F: package/sshguard/ +F: package/sunwait/ +F: package/sysdig/ + +N: Anisse Astier +F: package/go/ +F: package/nghttp2/ +F: package/pkg-golang.mk + +N: Anthony Viallard +F: package/gnuplot/ + +N: Antoine Ténart +F: package/wf111/ + +N: Antony Pavlov +F: package/lsscsi/ + +N: ARC Maintainers +F: arch/Config.in.arc +F: board/synopsys/ +F: configs/snps_arc700_axs101_defconfig +F: configs/snps_archs38_axs103_defconfig +F: configs/snps_archs38_haps_defconfig +F: configs/snps_archs38_hsdk_defconfig +F: configs/snps_archs38_vdk_defconfig + +N: Ariel D'Alessandro +F: package/axfsutils/ +F: package/mali-t76x/ + +N: Arnaud Aujon +F: package/espeak/ + +N: Arnout Vandecappelle +F: package/arp-scan/ +F: package/dehydrated/ +F: package/freescale-imx/firmware-imx/ +F: package/freescale-imx/imx-lib/ +F: package/libpagekite/ +F: package/lua-bit32/ +F: package/owfs/ +F: package/python-bottle/ +F: package/sqlcipher/ +F: package/stress/ + +N: Arthur Courtel +F: board/raspberrypi/genimage-raspberrypi4-64.cfg +F: configs/raspberrypi4_64_defconfig + +N: Asaf Kahlon +F: package/collectd/ +F: package/libfuse3/ +F: package/libuv/ +F: package/python* +F: package/snmpclitools/ +F: package/spdlog/ +F: package/uftp/ +F: package/uvw/ +F: package/zeromq/ + +N: Ash Charles +F: package/pru-software-support/ +F: package/ti-cgt-pru/ + +N: Assaf Inbal +F: package/lbase64/ +F: package/luabitop/ +F: package/luaexpatutils/ +F: package/luaposix/ +F: package/luasec/ +F: package/lua-ev/ +F: package/orbit/ + +N: Attila Wagner +F: package/python-canopen/ + +N: Bartosz Bilas +F: board/stmicroelectronics/stm32mp157a-dk1/ +F: configs/stm32mp157a_dk1_defconfig +F: package/python-esptool/ +F: package/python-pyaes/ +F: package/ttyd/ +F: package/qt5/qt5scxml/ +F: package/qt5/qt5webview/ + +N: Bartosz Golaszewski +F: package/autoconf-archive/ +F: package/doxygen/ +F: package/libgpiod/ +F: package/libserialport/ +F: package/libsigrok/ +F: package/libsigrokdecode/ +F: package/libzip/ +F: package/pulseview/ +F: package/sigrok-cli/ + +N: Baruch Siach +F: board/solidrun/clearfog_gt_8k/ +F: configs/solidrun_clearfog_gt_8k_defconfig +F: package/18xx-ti-utils/ +F: package/cpuburn-arm/ +F: package/daemon/ +F: package/dropbear/ +F: package/ebtables/ +F: package/i2c-tools/ +F: package/libcurl/ +F: package/libpcap/ +F: package/openipmi/ +F: package/socat/ +F: package/strace/ +F: package/tcpdump/ +F: package/ti-uim/ +F: package/uhubctl/ + +N: Ben Boeckel +F: package/taskd/ + +N: Benjamin Kamath +F: package/lapack/ + +N: Bernd Kuhls +F: package/alsa-lib/ +F: package/alsa-utils/ +F: package/apache/ +F: package/apr/ +F: package/apr-util/ +F: package/bcg729/ +F: package/bluez-tools/ +F: package/boinc/ +F: package/clamav/ +F: package/dav1d/ +F: package/dovecot/ +F: package/dovecot-pigeonhole/ +F: package/dtv-scan-tables/ +F: package/eudev/ +F: package/exim/ +F: package/fetchmail/ +F: package/ffmpeg/ +F: package/flac/ +F: package/freeswitch/ +F: package/freeswitch-mod-bcg729/ +F: package/freetype/ +F: package/fstrcmp/ +F: package/ghostscript/ +F: package/giflib/ +F: package/gli/ +F: package/glmark2/ +F: package/gpsd/ +F: package/hdparm/ +F: package/jsoncpp/ +F: package/kodi* +F: package/lame/ +F: package/leafnode2/ +F: package/libaacs/ +F: package/libasplib/ +F: package/libass/ +F: package/libbdplus/ +F: package/libbluray/ +F: package/libbroadvoice/ +F: package/libcdio/ +F: package/libcec/ +F: package/libcodec2/ +F: package/libcrossguid/ +F: package/libdcadec/ +F: package/libdrm/ +F: package/libdvbcsa/ +F: package/libdvdcss/ +F: package/libdvdnav/ +F: package/libdvdread/ +F: package/libebur128/ +F: package/libfreeglut/ +F: package/libg7221/ +F: package/libglew/ +F: package/libglfw/ +F: package/libglu/ +F: package/libhdhomerun/ +F: package/libilbc/ +F: package/libldns/ +F: package/libmicrohttpd/ +F: package/libminiupnpc/ +F: package/libmspack/ +F: package/libnatpmp/ +F: package/libnpth/ +F: package/libogg/ +F: package/libopenh264/ +F: package/libpciaccess/ +F: package/libplatform/ +F: package/libpng/ +F: package/libsidplay2/ +F: package/libsilk/ +F: package/libsndfile/ +F: package/libsoil/ +F: package/libsoundtouch/ +F: package/libsquish/ +F: package/libudfread/ +F: package/liburiparser/ +F: package/libva/ +F: package/libva-intel-driver/ +F: package/libva-utils/ +F: package/libvorbis/ +F: package/libvpx/ +F: package/libyuv/ +F: package/mesa3d/ +F: package/minidlna/ +F: package/mjpg-streamer/ +F: package/perl-crypt-openssl-guess/ +F: package/perl-crypt-openssl-random/ +F: package/perl-crypt-openssl-rsa/ +F: package/perl-digest-sha1/ +F: package/perl-encode-detect/ +F: package/perl-encode-locale/ +F: package/perl-file-listing/ +F: package/perl-html-parser/ +F: package/perl-html-tagset/ +F: package/perl-http-cookies/ +F: package/perl-http-daemon/ +F: package/perl-http-date/ +F: package/perl-http-message/ +F: package/perl-http-negotiate/ +F: package/perl-io-html/ +F: package/perl-lwp-mediatypes/ +F: package/perl-mail-dkim/ +F: package/perl-mailtools/ +F: package/perl-net-dns/ +F: package/perl-net-http/ +F: package/perl-netaddr-ip/ +F: package/perl-timedate/ +F: package/perl-uri/ +F: package/perl-www-robotrules/ +F: package/pixman/ +F: package/pngquant/ +F: package/pound/ +F: package/pulseaudio/ +F: package/pure-ftpd/ +F: package/python-couchdb/ +F: package/python-cssutils/ +F: package/python-futures/ +F: package/python-mwclient/ +F: package/python-mwscrape/ +F: package/python-mwscrape2slob/ +F: package/python-mako/ +F: package/python-oauthlib/ +F: package/python-pyicu/ +F: package/python-pylru/ +F: package/python-requests-oauthlib/ +F: package/python-slob/ +F: package/rtmpdump/ +F: package/samba4/ +F: package/softether/ +F: package/spandsp/ +F: package/sqlite/ +F: package/stellarium/ +F: package/taglib/ +F: package/tinyxml2/ +F: package/tor/ +F: package/transmission/ +F: package/tvheadend/ +F: package/unixodbc/ +F: package/utf8proc/ +F: package/vdr/ +F: package/vdr-plugin-vnsiserver/ +F: package/vlc/ +F: package/vnstat/ +F: package/waylandpp/ +F: package/x11r7/ +F: package/x264/ +F: package/x265/ +F: package/ytree/ +F: package/znc/ +F: support/testing/tests/package/test_perl_html_parser.py + +N: Biagio Montaruli +F: board/acmesystems/ +F: configs/acmesystems_* + +N: Bogdan Radulescu +F: package/iftop/ +F: package/ncdu/ + +N: Brandon Maier +F: package/vmtouch/ + +N: Brock Williams +F: package/pdmenu/ + +N: Carlo Caione +F: package/jailhouse/ +F: package/sunxi-boards/ + +N: Carsten Schoenert +F: package/dvbsnoop/ +F: package/libdvbsi/ +F: package/libsvg/ +F: package/libsvg-cairo/ + +N: Cédric Chépied +F: package/znc/ + +N: Chakra Divi +F: board/friendlyarm/nanopi-m1 +F: board/friendlyarm/nanopi-m1-plus +F: board/olimex/a13_olinuxino +F: board/orangepi/orangepi-plus +F: configs/nanopi_m1_defconfig +F: configs/nanopi_m1_plus_defconfig +F: configs/olimex_a13_olinuxino_defconfig +F: configs/orangepi_plus_defconfig + +N: Chris Packham +F: package/gstreamer1/gst1-shark/ +F: package/micropython/ +F: package/micropython-lib/ +F: package/syslog-ng/ + +N: Christian Kellermann +F: package/python-pylibftdi/ + +N: Christian Stewart +F: linux/linux-ext-aufs.mk +F: package/aufs/ +F: package/aufs-util/ +F: package/batman-adv/ +F: package/docker-cli/ +F: package/docker-containerd/ +F: package/docker-engine/ +F: package/docker-proxy/ +F: package/fuse-overlayfs/ +F: package/go/ +F: package/mbpfan/ +F: package/mosh/ +F: package/pkg-golang.mk +F: package/rtl8821au/ +F: package/runc/ +F: package/tini/ + +N: Christophe Priouzeau +F: board/stmicroelectronics/stm32f429-disco/ +F: board/stmicroelectronics/stm32f469-disco/ +F: configs/stm32f429_disco_defconfig +F: configs/stm32f469_disco_defconfig + +N: Christophe Vu-Brugier +F: package/drbd-utils/ +F: package/iotop/ +F: package/python-configshell-fb/ +F: package/python-rtslib-fb/ +F: package/python-urwid/ +F: package/targetcli-fb/ + +N: Christopher McCrory +F: package/perl-appconfig/ +F: package/perl-astro-suntime/ +F: package/perl-class-load/ +F: package/perl-class-std/ +F: package/perl-class-std-fast/ +F: package/perl-data-dump/ +F: package/perl-data-optlist/ +F: package/perl-data-uuid/ +F: package/perl-date-manip/ +F: package/perl-dbd-mysql/ +F: package/perl-dbi/ +F: package/perl-device-serialport/ +F: package/perl-dist-checkconflicts/ +F: package/perl-file-slurp/ +F: package/perl-io-interface/ +F: package/perl-io-socket-multicast/ +F: package/perl-json-maybexs/ +F: package/perl-mime-tools/ +F: package/perl-module-implementation/ +F: package/perl-module-runtime/ +F: package/perl-number-bytes-human/ +F: package/perl-package-stash/ +F: package/perl-params-util/ +F: package/perl-sub-install/ +F: package/perl-sys-cpu/ +F: package/perl-sys-meminfo/ +F: package/perl-sys-mmap/ +F: package/perl-time-parsedate/ +F: package/perl-x10/ + +N: Clayton Shotwell +F: package/audit/ +F: package/checkpolicy/ +F: package/cpio/ +F: package/libcgroup/ +F: package/libee/ +F: package/libestr/ +F: package/liblogging/ +F: package/libselinux/ +F: package/libsemanage/ +F: package/libsepol/ +F: package/policycoreutils/ + +N: Clément Péron +F: board/beelink/gs1/ +F: configs/beelink_gs1_defconfig + +N: Corentin Guillevic +F: package/libloki/ + +N: Cyril Bur +F: arch/Config.in.powerpc +F: package/kvm-unit-tests + +N: Daniel J. Leach +F: package/dacapo/ + +N: Damien Lanson +F: package/libvdpau/ +F: package/log4cpp/ + +N: Daniel Nicoletti +F: package/cutelyst/ + +N: Daniel Price +F: package/nodejs/ +F: package/redis/ + +N: Daniel Sangue +F: package/libftdi1/ + +N: Danomi Manchego +F: package/cjson/ +F: package/jq/ +F: package/libwebsockets/ +F: package/ljsyscall/ +F: package/lua-cjson/ +F: package/luaexpat/ +F: package/xinetd/ + +N: David Bachelart +F: package/ccrypt/ +F: package/dos2unix/ +F: package/ipmiutil/ +F: package/jsmn/ +F: package/python-daemon/ +F: package/sslh/ +F: package/udpxy/ + +N: David Bender +F: package/benejson/ +F: package/cgic/ +F: package/freeradius-client/ +F: package/openldap/ + +N: David du Colombier <0intro@gmail.com> +F: package/x264/ + +N: David Lechner +F: board/lego/ev3/ +F: configs/lego_ev3_defconfig +F: linux/linux-ext-ev3dev-linux-drivers.mk +F: package/brickd/ +F: package/ev3dev-linux-drivers/ + +N: Davide Viti +F: board/friendlyarm/nanopi-r1/ +F: configs/nanopi_r1_defconfig +F: package/flann/ +F: package/python-paho-mqtt/ +F: package/qhull/ +F: package/tcllib/ + +N: Denis Bodor +F: package/libstrophe/ + +N: Dimitrios Siganos +F: package/wireless-regdb/ + +N: Dominik Faessler +F: package/logsurfer/ +F: package/python-id3/ + +N: Doug Kehn +F: package/nss-pam-ldapd/ +F: package/sp-oops-extract/ +F: package/unscd/ + +N: Dushara Jayasinghe +F: package/prosody/ + +N: Eloi Bail +F: package/bayer2rgb-neon/ +F: package/gstreamer1/gst1-plugins-bayer2rgb-neon/ + +N: Eric Le Bihan +F: docs/manual/adding-packages-meson.txt +F: package/adwaita-icon-theme/ +F: package/darkhttpd/ +F: package/eudev/ +F: package/execline/ +F: package/hicolor-icon-theme/ +F: package/jemalloc/ +F: package/mdevd/ +F: package/meson/ +F: package/ninja/ +F: package/pkg-meson.mk +F: package/rust-bin/ +F: package/rust/ +F: package/s6/ +F: package/s6-dns/ +F: package/s6-linux-init/ +F: package/s6-linux-utils/ +F: package/s6-networking/ +F: package/s6-portable-utils/ +F: package/s6-rc/ +F: package/skalibs/ +F: package/smack/ +F: package/xvisor/ + +N: Eric Limpens +F: package/pifmrds/ +F: package/ympd/ + +N: Erico Nunes +F: board/aarch64-efi/ +F: configs/aarch64_efi_defconfig +F: package/acpica/ +F: package/acpitool/ +F: package/efibootmgr/ +F: package/efivar/ +F: package/fwts/ +F: package/spi-tools/ +F: package/xdotool/ +F: configs/pc_x86_64_* + +N: Erik Larsson +F: package/imx-mkimage/ + +N: Erik Stromdahl +F: package/mxsldr/ + +N: Ernesto L. Williams Jr +F: package/szip/ + +N: Esben Haabendal +F: boot/gummiboot/ +F: package/python-kiwisolver/ + +N: Etienne Carriere +F: boot/optee-os/ +F: package/optee-benchmark/ +F: package/optee-client/ +F: package/optee-examples/ +F: package/optee-test/ + +N: Eugene Tarassov +F: package/tcf-agent/ + +N: Evan Zelkowitz +F: package/sdl_gfx/ + +N: Ezequiel Garcia +F: board/ci20/ +F: configs/ci20_defconfig +F: arch/Config.in.nios2 +F: package/fio/ +F: package/iptraf-ng/ +F: package/jimtcl/ +F: package/mimic/ +F: package/nodm/ +F: package/openbox/ +F: package/rtl8723bs/ +F: package/supertuxkart/ + +N: Fabio Estevam +F: board/freescale/warpboard/ +F: board/warp7/ +F: configs/freescale_imx* +F: configs/imx23evk_defconfig +F: configs/imx6-sabre* +F: configs/imx6slevk_defconfig +F: configs/imx6sx-sdb_defconfig +F: configs/imx6ulevk_defconfig +F: configs/imx6ullevk_defconfig +F: configs/imx6ulpico_defconfig +F: configs/imx7d-sdb_defconfig +F: configs/imx7dpico_defconfig +F: configs/mx25pdk_defconfig +F: configs/mx51evk_defconfig +F: configs/mx53loco_defconfig +F: configs/mx6cubox_defconfig +F: configs/mx6sx_udoo_neo_defconfig +F: configs/mx6udoo_defconfig +F: configs/wandboard_defconfig +F: configs/warp7_defconfig +F: configs/warpboard_defconfig +F: package/atest/ +F: package/kmscube/ + +N: Fabio Porcedda +F: package/netsurf-buildsystem/ + +N: Fabio Urquiza +F: package/bitcoin/ + +N: Fabrice Fontaine +F: package/domoticz/ +F: package/libmediaart/ +F: package/libmaxminddb/ +F: package/openzwave/ + +N: Fabrice Fontaine +F: package/bearssl/ +F: package/belle-sip/ +F: package/belr/ +F: package/boinc/ +F: package/cairo/ +F: package/duktape/ +F: package/expat/ +F: package/flatbuffers/ +F: package/gerbera/ +F: package/gtksourceview/ +F: package/gssdp/ +F: package/gupnp/ +F: package/gupnp-dlna/ +F: package/gupnp-tools/ +F: package/haproxy/ +F: package/hiredis/ +F: package/i2pd/ +F: package/igd2-for-linux/ +F: package/json-c/ +F: package/lcms2/ +F: package/lftp/ +F: package/libcap-ng/ +F: package/libcdio-paranoia/ +F: package/libcgicc/ +F: package/libconfig/ +F: package/libcue/ +F: package/libebml/ +F: package/libgee/ +F: package/libglib2/ +F: package/libgtk2/ +F: package/libgtk3/ +F: package/libhtp/ +F: package/libidn/ +F: package/libidn2/ +F: package/libjpeg/ +F: package/liblockfile/ +F: package/libmatroska/ +F: package/libmpdclient/ +F: package/libnetfilter_conntrack/ +F: package/libnetfilter_queue/ +F: package/libnpupnp/ +F: package/liboping/ +F: package/libpfm4/ +F: package/libraw/ +F: package/libraw1394/ +F: package/libroxml/ +F: package/librsvg/ +F: package/librsync/ +F: package/libsoup/ +F: package/libsoxr/ +F: package/libupnp/ +F: package/libupnp18/ +F: package/libv4l/ +F: package/libxslt/ +F: package/mbedtls/ +F: package/minissdpd/ +F: package/minizip/ +F: package/mongodb/ +F: package/motion/ +F: package/mutt/ +F: package/ncmpc/ +F: package/oniguruma/ +F: package/oprofile/ +F: package/pcmanfm/ +F: package/python-backcall/ +F: package/python-jedi/ +F: package/python-parso/ +F: package/python-yatl/ +F: package/rocksdb/ +F: package/rygel/ +F: package/safeclib/ +F: package/suricata/ +F: package/tinycbor/ +F: package/tinydtls/ +F: package/tinymembench/ +F: package/whois/ + +N: Fabrice Goucem +F: board/freescale/imx6ullevk/ +F: configs/freescale_imx6ullevk_defconfig + +N: Falco Hyfing +F: package/python-pymodbus/ + +N: Floris Bos +F: package/ipmitool/ +F: package/odhcploc/ + +N: Francisco Gonzalez +F: package/ser2net/ + +N: Francois Perrad +F: board/olimex/a20_olinuxino +F: board/olimex/imx233_olinuxino/ +F: configs/olimex_a20_olinuxino_* +F: configs/olimex_imx233_olinuxino_defconfig +F: package/4th/ +F: package/cgilua/ +F: package/chipmunk/ +F: package/cog/ +F: package/collectl/ +F: package/copas/ +F: package/coxpcall/ +F: package/dado/ +F: package/ficl/ +F: package/libtomcrypt/ +F: package/libtommath/ +F: package/libwpe/ +F: package/linenoise/ +F: package/ljlinenoise/ +F: package/lpeg/ +F: package/lpty/ +F: package/lrandom/ +F: package/lsqlite3/ +F: package/lua* +F: package/lzlib/ +F: package/moarvm/ +F: package/netsurf/ +F: package/perl* +F: package/pkg-perl.mk +F: package/pkg-luarocks.mk +F: package/rings/ +F: package/tekui/ +F: package/wpebackend-fdo/ +F: package/wpewebkit/ +F: package/wsapi/ +F: package/wsapi-fcgi/ +F: package/wsapi-xavante/ +F: package/xavante/ +F: utils/scancpan + +N: Frank Hunleth +F: package/am335x-pru-package/ +F: package/libconfuse/ +F: package/libdmtx/ +F: package/libsodium/ +F: package/php-amqp/ +F: package/python-cherrypy/ +F: package/rabbitmq-server/ +F: package/sane-backends/ +F: package/ucl/ +F: package/upx/ +F: package/zxing-cpp/ + +N: Frank Vanbever +F: package/elixir/ +F: package/libmodsecurity/ +F: package/nginx-modsecurity/ + +N: Gaël Portay +F: package/qt5/qt5virtualkeyboard/ +F: package/qt5/qt5webengine/ +F: package/qt5/qt5webkit/ +F: package/qt5/qt5webkit-examples/ + +N: Gao Xiang +F: package/erofs-utils/ + +N: Gary Bisson +F: board/boundarydevices/ +F: configs/nitrogen* +F: package/freescale-imx/ +F: package/gstreamer1/gst1-imx/ +F: package/libimxvpuapi/ +F: package/mfgtools/ +F: package/sshpass/ +F: package/x11r7/xdriver_xf86-video-imx-viv/ + +N: Geoff Levand +F: package/flannel/ + +N: Geoffrey Ragot +F: package/python-pycli/ +F: package/python-pyyaml/ + +N: Gerome Burlats +F: board/qemu/ +F: configs/qemu_* + +N: Gilles Talis +F: board/freescale/imx8mmevk/ +F: configs/freescale_imx8mmevk_defconfig +F: package/cctz/ +F: package/fdk-aac/ +F: package/httping/ +F: package/iozone/ +F: package/leptonica/ +F: package/libeXosip2/ +F: package/libolm/ +F: package/libosip2/ +F: package/ocrad/ +F: package/restclient-cpp/ +F: package/tesseract-ocr/ +F: package/webp/ +F: package/xapian/ + +N: Giulio Benetti +F: package/at/ +F: package/libnspr/ +F: package/libnss/ +F: package/minicom/ +F: package/nfs-utils/ +F: package/sunxi-mali-mainline/ +F: package/sunxi-mali-mainline-driver/ + +N: Gregory Dymarek +F: package/ding-libs/ +F: package/gengetopt/ +F: package/janus-gateway/ +F: package/libnice/ +F: package/libsrtp/ +F: package/libwebsock/ +F: package/sofia-sip/ + +N: Grzegorz Blach +F: fs/f2fs/ +F: package/bluez5_utils-headers/ +F: package/f2fs-tools/ +F: package/pigpio/ +F: package/python-aioblescan/ +F: package/python-bluezero/ +F: package/python-crontab/ +F: package/python-falcon/ +F: package/python-ifaddr/ +F: package/python-hiredis/ +F: package/python-mimeparse/ +F: package/python-pigpio/ +F: package/python-pyjwt/ +F: package/python-redis/ +F: package/python-rpi-ws281x/ +F: package/python-wtforms/ + +N: Guillaume Gardet +F: package/c-icap/ +F: package/c-icap-modules/ +F: package/sdl2/ + +N: Guillaume William Brs +F: package/libnids/ +F: package/liquid-dsp/ +F: package/pixiewps/ +F: package/python-pybind/ +F: package/reaver/ + +N: Guo Ren +F: arch/Config.in.csky +F: board/csky/ +F: board/qemu/csky +F: configs/csky_* +F: configs/qemu_csky* + +N: Gustavo Pimentel +F: configs/arm_juno_defconfig +F: board/arm/juno/ + +N: Gwenhael Goavec-Merou +F: package/gnuradio/ +F: package/gqrx/ +F: package/gr-osmosdr/ +F: package/librtlsdr/ +F: package/libusbgx/ +F: package/matio/ +F: package/python-cheetah/ +F: package/python-markdown/ +F: package/python-remi/ +F: package/python-sip/ + +N: Heiko Thiery +F: package/libnetconf2/ +F: package/libyang/ +F: package/netopeer2/ +F: package/sysrepo/ + +N: Henrique Camargo +F: package/json-glib/ + +N: Hiroshi Kawashima +F: package/gauche/ +F: package/gmrender-resurrect/ +F: package/squeezelite/ + +N: Ian Haylock +F: package/python-rpi-gpio/ + +N: Ignacy Gawędzki +F: package/angularjs/ + +N: Ilias Apalodimas +F: package/keepalived/ + +N: Ilya Averyanov +F: package/exempi/ + +N: Ismael Luceno +F: package/axel/ + +N: Jagan Teki +F: board/amarula/ +F: board/asus/ +F: board/bananapi/ +F: board/engicam/ +F: board/friendlyarm/nanopi-a64/ +F: board/friendlyarm/nanopi-neo2/ +F: board/olimex/a33_olinuxino/ +F: board/olimex/a64-olinuxino/ +F: board/orangepi/orangepi-lite2/ +F: board/orangepi/orangepi-one-plus +F: board/orangepi/orangepi-pc2/ +F: board/orangepi/orangepi-prime/ +F: board/orangepi/orangepi-win/ +F: board/orangepi/orangepi-zero-plus2/ +F: board/pine64/ +F: configs/amarula_a64_relic_defconfig +F: configs/amarula_vyasa_rk3288_defconfig +F: configs/asus_tinker_rk3288_defconfig +F: configs/bananapi_m1_defconfig +F: configs/bananapi_m64_defconfig +F: configs/engicam_imx6qdl_icore_defconfig +F: configs/engicam_imx6qdl_icore_qt5_defconfig +F: configs/engicam_imx6qdl_icore_rqs_defconfig +F: configs/engicam_imx6ul_geam_defconfig +F: configs/engicam_imx6ul_isiot_defconfig +F: configs/friendlyarm_nanopi_a64_defconfig +F: configs/friendlyarm_nanopi_neo2_defconfig +F: configs/olimex_a33_olinuxino_defconfig +F: configs/olimex_a64_olinuxino_defconfig +F: configs/orangepi_lite2_defconfig +F: configs/orangepi_one_plus_defconfig +F: configs/orangepi_pc2_defconfig +F: configs/orangepi_prime_defconfig +F: configs/orangepi_win_defconfig +F: configs/orangepi_zero_plus2_defconfig +F: configs/pine64_defconfig +F: configs/pine64_sopine_defconfig + +N: James Hilliard +F: package/apcupsd/ +F: package/exfatprogs/ +F: package/gensio/ +F: package/lua-std-debug/ +F: package/lua-std-normalize/ +F: package/pipewire/ +F: package/python-aioconsole/ +F: package/python-aiodns/ +F: package/python-aiohttp/ +F: package/python-aiohttp-cors/ +F: package/python-aiohttp-debugtoolbar/ +F: package/python-aiohttp-jinja2/ +F: package/python-aiohttp-mako/ +F: package/python-aiohttp-remotes/ +F: package/python-aiohttp-security/ +F: package/python-aiohttp-session/ +F: package/python-aiohttp-sse/ +F: package/python-aiologstash/ +F: package/python-aiomonitor/ +F: package/python-aiojobs/ +F: package/python-aiorwlock/ +F: package/python-aiosignal/ +F: package/python-aiozipkin/ +F: package/python-argon2-cffi/ +F: package/python-async-lru/ +F: package/python-async-timeout/ +F: package/python-brotli/ +F: package/python-cbor2/ +F: package/python-cchardet/ +F: package/python-flatbuffers/ +F: package/python-frozenlist/ +F: package/python-greenlet/ +F: package/python-janus/ +F: package/python-logstash/ +F: package/python-multidict/ +F: package/python-pycares/ +F: package/python-snappy/ +F: package/python-sockjs/ +F: package/python-terminaltables/ +F: package/python-yarl/ + +N: James Knight +F: package/atkmm/ +F: package/cairomm/ +F: package/google-material-design-icons/ +F: package/glibmm/ +F: package/gtkmm3/ +F: package/libpqxx/ +F: package/pangomm/ +F: package/rpm/ +F: package/yad/ + +N: Jan Heylen +F: package/opentracing-cpp/ + +N: Jan Kraval +F: board/orangepi/orangepi-lite +F: configs/orangepi_lite_defconfig + +N: Jan Kundrát +F: configs/solidrun_clearfog_defconfig +F: board/solidrun/clearfog/ +F: package/libnetconf2/ +F: package/libyang/ +F: package/sysrepo/ + +N: Jan Pedersen +F: package/zip/ + +N: Jan Viktorin +F: package/python-pexpect/ +F: package/python-ptyprocess/ +F: package/zynq-boot-bin/ + +N: Jarkko Sakkinen +F: package/quota/ + +N: Jason Pruitt +F: package/librtlsdr/ + +N: Jean Burgat +F: package/openfpgaloader/ + +N: Jens Kleintje +F: package/gcnano-binaries/ + +N: Jens Rosenboom +F: package/sl/ + +N: Jens Zettelmeyer +F: package/batctl/ + +N: Jeremy Rosen +F: package/fxload/ + +N: Jérôme Oufella +F: package/libdri2/ +F: package/qt-webkit-kiosk/ + +N: Jérôme Pouiller +F: package/apitrace/ +F: package/freescale-imx/gpu-amd-bin-mx51/ +F: package/freescale-imx/libz160/ +F: package/lxc/ +F: package/strongswan/ +F: package/wmctrl/ +F: package/x11r7/xdriver_xf86-video-imx/ +F: package/x11r7/xdriver_xf86-video-imx-viv/ + +N: Jianhui Zhao +F: package/libuhttpd/ +F: package/libuwsc/ +F: package/rtty/ + +N: Joachim Nilsson +F: configs/globalscale_espressobin_defconfig +F: board/globalscale/espressobin/ + +N: Joao Pinto +F: board/synopsys/vdk/ +F: configs/snps_aarch64_vdk_defconfig + +N: Joel Carlson +F: package/c-capnproto/ +F: package/capnproto/ +F: package/cmocka/ +F: package/flatcc/ +F: package/libcorrect/ + +N: Joel Stanley +F: package/pdbg/ +F: board/qemu/ppc64le-pseries/ +F: configs/qemu_ppc64le_pseries_defconfig +F: board/qemu/ppc-mac99/ +F: configs/qemu_ppc_mac99_defconfig + +N: Johan Derycke +F: package/python-libconfig/ + +N: Johan Oudinet +F: package/ejabberd/ +F: package/erlang-base64url/ +F: package/erlang-eimp/ +F: package/erlang-goldrush/ +F: package/erlang-idna/ +F: package/erlang-jiffy/ +F: package/erlang-jose/ +F: package/erlang-lager/ +F: package/erlang-p1-acme/ +F: package/erlang-p1-cache-tab/ +F: package/erlang-p1-mqtree/ +F: package/erlang-p1-oauth2/ +F: package/erlang-p1-pkix/ +F: package/erlang-p1-sip/ +F: package/erlang-p1-stringprep/ +F: package/erlang-p1-stun/ +F: package/erlang-p1-tls/ +F: package/erlang-p1-utils/ +F: package/erlang-p1-xml/ +F: package/erlang-p1-xmpp/ +F: package/erlang-p1-yaml/ +F: package/erlang-p1-yconf/ +F: package/erlang-p1-zlib/ +F: package/nginx-dav-ext/ +F: package/vuejs/ + +N: John Stile +F: package/dhcpcd/ + +N: John Faith +F: package/python-inflection/ +F: package/sdbusplus/ + +N: Jonathan Ben Avraham +F: arch/Config.in.xtensa +F: package/autofs/ +F: package/dawgdic/ +F: package/libphidget/ +F: package/phidgetwebservice/ +F: package/rapidxml/ +F: package/sphinxbase/ + +N: Joris Offouga +F: package/python-colorlog/ +F: package/python-simplelogging/ + +N: Jörg Krause +F: board/lemaker/bananapro/ +F: configs/bananapro_defconfig +F: package/augeas/ +F: package/bluez-alsa/ +F: package/caps/ +F: package/freescale-imx/imx-alsa-plugins/ +F: package/libopusenc/ +F: package/libupnpp/ +F: package/luv/ +F: package/luvi/ +F: package/mpd/ +F: package/shairport-sync/ +F: package/swupdate/ +F: package/upmpdcli/ +F: package/wavemon/ + +N: Joris Lijssens +F: package/emlog/ +F: package/libcoap/ +F: package/libnet/ +F: package/libuio/ +F: package/netsniff-ng/ +F: package/rabbitmq-c/ + +N: Joseph Kogut +F: package/at-spi2-atk/ +F: package/at-spi2-core/ +F: package/clang/ +F: package/earlyoom/ +F: package/gconf/ +F: package/libnss/ +F: package/lld/ +F: package/llvm/ +F: package/python-cython/ +F: package/python-raven/ +F: package/python-schedule/ +F: package/python-sentry-sdk/ +F: package/python-websockets/ +F: package/python-xlib/ +F: package/unclutter-xfixes/ + +N: Joshua Henderson +F: package/qt5/qt5wayland/ + +N: Jugurtha BELKALEM +F: package/python-cycler/ +F: package/python-matplotlib/ + +N: Juha Rantanen +F: package/acsccid/ + +N: Julian Scheel +F: package/bitstream/ +F: package/cbootimage/ +F: package/cryptopp/ +F: package/dvblast/ +F: package/tegrarcm/ + +N: Julien Boibessot +F: board/armadeus/ +F: configs/armadeus* +F: package/abootimg/ +F: package/gpm/ +F: package/lbreakout2/ +F: package/libcddb/ +F: package/libmodbus/ +F: package/ltris/ +F: package/opentyrian/ +F: package/python-pygame/ + +N: Julien Corjon +F: package/qt5/ + +N: Julien Grossholtz +F: board/technologic/ts7680/ +F: configs/ts7680_defconfig +F: package/paho-mqtt-c + +N: Julien Olivain +F: board/qmtech/zynq/ +F: board/technexion/imx8mmpico/ +F: board/technexion/imx8mpico/ +F: configs/imx8mmpico_defconfig +F: configs/imx8mpico_defconfig +F: configs/zynq_qmtech_defconfig +F: package/fluid-soundfont/ +F: package/fluidsynth/ +F: package/glslsandbox-player/ +F: package/ptm2human/ +F: package/python-pyalsa/ + +N: Julien Viard de Galbert +F: package/dieharder/ +F: package/easy-rsa/ + +N: Justin Maggard +F: package/dtach/ + +N: Kamel Bouhara +F: package/libodb-boost/ +F: package/libodb-mysql/ + +N: Karoly Kasza +F: package/irqbalance/ +F: package/openvmtools/ + +N: Kelvin Cheung +F: package/cpuload/ +F: package/bwm-ng/ +F: package/ramsmp/ + +N: Kieran Bingham +F: package/libcamera/ + +N: Koen Martens +F: package/capnproto/ +F: package/linuxconsoletools/ + +N: Kurt Van Dijck +F: package/bcusdk/ +F: package/libpthsem/ +F: package/nilfs-utils/ + +N: Laurent Cans +F: package/aircrack-ng/ + +N: Laurent Charpentier +F: package/open-lldp/ + +N: Lee Jones +F: boot/afboot-stm32/ + +N: Leon Anavi +F: board/olimex/a10_olinuxino +F: configs/olimex_a10_olinuxino_lime_defconfig + +N: Lionel Flandrin +F: package/python-babel/ +F: package/python-daemonize/ +F: package/python-flask/ +F: package/python-flask-babel/ +F: package/python-gunicorn/ + +N: Lionel Orry +F: package/mongrel2/ + +N: Lothar Felten +F: board/bananapi/bananapi-m2-ultra/ +F: board/beaglebone/ +F: configs/bananapi_m2_ultra_defconfig +F: configs/beaglebone_defconfig +F: configs/beaglebone_qt5_defconfig +F: package/ti-sgx-demos/ +F: package/ti-sgx-libgbm/ +F: package/ti-sgx-km/ +F: package/ti-sgx-um/ + +N: Louis Aussedat +F: board/friendlyarm/nanopi-neo-plus2/ +F: configs/friendlyarm_nanopi_neo_plus2_defconfig +F: package/mfoc +F: package/libpam-nfc +F: package/python-dnspython/ +F: package/python-future/ +F: package/python-huepy/ +F: package/python-tqdm/ + +N: Louis-Paul Cordier +F: package/intel-gmmlib/ +F: package/intel-mediadriver/ +F: package/intel-mediasdk/ + +N: Luca Ceresoli +F: board/olimex/a20_olinuxino/ +F: board/zynq/ +F: board/zynqmp/ +F: configs/olimex_a20_olinuxino_* +F: configs/zynq_microzed_defconfig +F: configs/zynq_zed_defconfig +F: configs/zynq_zc706_defconfig +F: configs/zynqmp_zcu106_defconfig +F: package/agentpp/ +F: package/exim/ +F: package/libpjsip/ +F: package/qpid-proton/ +F: package/rtl8188eu/ +F: package/snmppp/ +F: package/stm32flash/ +F: package/unzip/ +F: support/legal-info/ + +N: Lucas De Marchi +F: package/fswebcam/ + +N: Lubomir Rintel +F: board/olpc/ +F: configs/olpc_xo1_defconfig +F: configs/olpc_xo175_defconfig + +N: Ludovic Desroches +F: board/atmel/ +F: configs/at91* +F: configs/atmel_* +F: configs/microchip_* +F: package/fb-test-app/ +F: package/python-json-schema-validator/ +F: package/python-keyring/ +F: package/python-simplejson/ +F: package/python-versiontools/ +F: package/wilc1000-firmware/ + +N: Maeva Manuel +F: board/freescale/imx8qmmek/ +F: configs/freescale_imx8qmmek_defconfig +F: package/freescale-imx/imx-seco/ + +N: Mahyar Koshkouei +F: package/ffmpeg/ +F: package/mpv/ +F: package/rpi-firmware/ +F: package/rpi-userland/ + +N: Mamatha Inamdar +F: package/nvme/ + +N: Manuel Vögele +F: package/python-pyqt5/ +F: package/python-requests-toolbelt/ + +N: Marcin Bis +F: package/bluez5_utils/ +F: package/cc-tool/ +F: package/ecryptfs-utils/ + +N: Marcin Niestroj +F: board/grinn/ +F: configs/grinn_* +F: package/argparse/ +F: package/dt-utils/ +F: package/easydbus/ +F: package/lua-flu/ +F: package/lua-stdlib/ +F: package/luaossl/ +F: package/murata-cyw-fw/ +F: package/netdata/ +F: package/rs485conf/ +F: package/turbolua/ +F: support/testing/tests/package/test_netdata.py + +N: Marcus Folkesson +F: package/libostree/ +F: package/libselinux/ +F: package/libsemanage/ +F: package/libsepol/ +F: package/selinux-python/ +F: utils/config +F: utils/diffconfig + +N: Marek Belisko +F: board/friendlyarm/nanopi-neo4/ +F: configs/nanopi_neo4_defconfig +F: package/libatasmart/ +F: package/polkit/ +F: package/sg3_utils/ +F: package/udisks/ + +N: Mario Lang +F: package/brltty/ +F: package/lynx/ + +N: Mario Rugiero +F: package/ratpoison/ + +N: Mark Corbin +F: arch/arch.mk.riscv +F: arch/Config.in.riscv +F: board/qemu/riscv32-virt/ +F: board/qemu/riscv64-virt/ +F: configs/qemu_riscv32_virt_defconfig +F: configs/qemu_riscv64_virt_defconfig + +N: Martin Bark +F: board/raspberrypi/ +F: configs/raspberrypi3_defconfig +F: package/ca-certificates/ +F: package/connman/ +F: package/nodejs/ +F: package/rpi-bt-firmware/ +F: package/rpi-firmware/ +F: package/rpi-wifi-firmware/ +F: package/tzdata/ +F: package/zic/ + +N: Martin Hicks +F: package/cryptsetup/ + +N: Martin Kepplinger +F: package/tslib/ +F: package/x11r7/xdriver_xf86-input-tslib/ +F: package/x11vnc/ + +N: Masahiro Yamada +F: board/arm/foundation-v8/ +F: configs/arm_foundationv8_defconfig + +N: Mathieu Audat +F: board/technologic/ts4900/ +F: configs/ts4900_defconfig +F: package/ts4900-fpga/ + +N: Matt Weber +F: board/freescale/p* +F: board/freescale/t* +F: board/qemu/ppc64-e5500/ +F: configs/freescale_p* +F: configs/freescale_t* +F: configs/qemu_ppc64_e5500_defconfig +F: package/argp-standalone/ +F: package/aufs/ +F: package/aufs-util/ +F: package/bc/ +F: package/bridge-utils/ +F: package/checkpolicy/ +F: package/checksec/ +F: package/cgroupfs-mount/ +F: package/crda/ +F: package/cunit/ +F: package/dacapo/ +F: package/davici/ +F: package/dnsmasq/ +F: package/dosfstools/ +F: package/eigen/ +F: package/ethtool/ +F: package/flashbench/ +F: package/fmc/ +F: package/fmlib/ +F: package/git/ +F: package/gnutls/ +F: package/hostapd/ +F: package/i2c-tools/ +F: package/ifplugd/ +F: package/igmpproxy/ +F: package/iperf/ +F: package/iperf3/ +F: package/iputils/ +F: package/iw/ +F: package/jitterentropy-library/ +F: package/kvm-unit-tests/ +F: package/kvmtool/ +F: package/libcsv/ +F: package/libcurl/ +F: package/libeastl/ +F: package/libfcgi/ +F: package/libopenssl/ +F: package/libselinux/ +F: package/libsemanage/ +F: package/libsepol/ +F: package/libssh2/ +F: package/libqmi/ +F: package/lighttpd/ +F: package/logrotate/ +F: package/makedevs/ +F: package/memtester/ +F: package/mii-diag/ +F: package/mrouted/ +F: package/mtd/ +F: package/mtools/ +F: package/nginx-upload/ +F: package/omniorb/ +F: package/openresolv/ +F: package/paxtest/ +F: package/picocom/ +F: package/policycoreutils/ +F: package/proftpd/ +F: package/protobuf-c/ +F: package/protobuf/ +F: package/python-bunch/ +F: package/python-colorama/ +F: package/python-filelock/ +F: package/python-flask-cors/ +F: package/python-iptables/ +F: package/python-ipy/ +F: package/python-posix-ipc/ +F: package/python-pycairo/ +F: package/python-pypcap/ +F: package/python-pyrex/ +F: package/python-pysftp/ +F: package/python-tinyrpc/ +F: package/python-txdbus/ +F: package/raptor/ +F: package/rcw/ +F: package/rng-tools/ +F: package/rsyslog/ +F: package/setools/ +F: package/smcroute/ +F: package/tclap/ +F: package/tini/ +F: package/uboot-tools/ +F: package/unionfs/ +F: package/valijson/ +F: package/wpa_supplicant/ +F: package/wireless_tools/ +F: package/xen/ +F: support/testing/tests/package/br2-external/openjdk/ +F: support/testing/tests/package/test_openjdk.py +F: support/testing/tests/package/test_opkg/ +F: support/testing/tests/package/test_opkg.py + +N: Mauro Condarelli +F: package/mc/ +F: package/python-autobahn/ +F: package/python-cbor/ +F: package/python-characteristic/ +F: package/python-click/ +F: package/python-crossbar/ +F: package/python-lmdb/ +F: package/python-mistune/ +F: package/python-netaddr/ +F: package/python-pygments/ +F: package/python-pynacl/ +F: package/python-pytrie/ +F: package/python-service-identity/ +F: package/python-setproctitle/ +F: package/python-shutilwhich/ +F: package/python-treq/ +F: package/python-txaio/ +F: package/python-ujson/ +F: package/python-wsaccel/ + +N: Max Filippov +F: arch/Config.in.xtensa + +N: Maxime Hadjinlian +F: package/babeld/ +F: package/dante/ +F: package/faifa/ +F: package/initscripts/ +F: package/intel-microcode/ +F: package/iucode-tool/ +F: package/jasper/ +F: package/kodi/ +F: package/libass/ +F: package/libbluray/ +F: package/libcdio/ +F: package/libcofi/ +F: package/libenca/ +F: package/libmodplug/ +F: package/libnfs/ +F: package/libplist/ +F: package/libshairplay/ +F: package/linux-zigbee/ +F: package/netcat-openbsd/ +F: package/open-plc-utils/ +F: package/rpi-firmware/ +F: package/rpi-userland/ +F: package/rtmpdump/ +F: package/skeleton/ +F: package/systemd/ +F: package/systemd-bootchart/ +F: package/tinyalsa/ +F: package/tinyxml/ + +N: Michael Durrant +F: board/arcturus/ +F: configs/arcturus_ucp1020_defconfig +F: configs/arcturus_ucls1012a_defconfig + +N: Michael Fischer +F: package/gnuplot/ +F: package/sdl2/ + +N: Michael Rommel +F: package/knock/ +F: package/python-crc16/ +F: package/python-pyzmq/ + +N: Michael Trimarchi +F: package/python-spidev/ + +N: Michael Vetter +F: package/jasper/ +F: package/libstrophe/ + +N: Michael Walle +F: package/libavl/ + +N: Michał Łyszczek +F: board/altera/socrates_cyclone5/ +F: board/pine64/rock64 +F: configs/rock64_defconfig +F: configs/socrates_cyclone5_defconfig +F: package/netifrc/ +F: package/openrc/ +F: package/skeleton-init-openrc/ + +N: Michel Stempin +F: board/licheepi/ +F: configs/licheepi_zero_defconfig + +N: Mike Harmony +F: board/sinovoip/m2-plus/ +F: configs/bananapi_m2_plus_defconfig + +N: Mikhail Boiko +F: package/libfribidi/ + +N: Min Xu +F: package/shadowsocks-libev/ + +N: Mircea Gliga +F: package/mbuffer/ + +N: Mirza Krak +F: package/mender/ +F: package/mender-artifact/ + +N: Murat Demirten +F: package/jpeg-turbo/ +F: package/libgeotiff/ + +N: Mylène Josserand +F: package/rtl8723bu/ + +N: Nathaniel Roach +F: package/bandwidthd/ +F: package/libgudev/ + +N: Naumann Andreas +F: package/evemu/ +F: package/libevdev/ +F: package/pkg-qmake.mk + +N: Nicola Di Lieto +F: package/uacme/ + +N: Nicholas Sielicki +F: board/intel/galileo/ +F: configs/galileo_defconfig + +N: Nicolas Cavallari +F: package/libgit2/ + +N: Nicolas Serafini +F: package/exiv2/ +F: package/nvidia-tegra23/nvidia-tegra23-binaries/ +F: package/nvidia-tegra23/nvidia-tegra23-codecs/ +F: package/ofono/ + +N: Nikolay Dimitrov +F: board/embest/riotboard/ +F: configs/riotboard_defconfig + +N: Nimai Mahajan +F: package/libucl/ + +N: Noé Rubinstein +F: package/tpm-tools/ +F: package/trousers/ + +N: Norbert Lange +F: package/tcf-agent/ + +N: Nylon Chen +F: arch/Config.in.nds32 +F: board/andes +F: configs/andes_ae3xx_defconfig +F: toolchain/toolchain-external/toolchain-external-andes-nds32/ + +N: Olaf Rempel +F: package/ctorrent/ + +N: Oleksandr Zhadan +F: board/arcturus/ +F: configs/arcturus_ucp1020_defconfig +F: configs/arcturus_ucls1012a_defconfig + +N: Oli Vogt +F: package/python-django/ +F: package/python-flup/ + +N: Olivier Matz +F: package/python-pyelftools/ + +N: Olivier Schonken +F: package/cups/ +F: package/cups-filters/ +F: package/ijs/ +F: package/poppler/ +F: package/qpdf/ +F: package/openjpeg/ + +N: Olivier Singla +F: package/shellinabox/ + +N: Owen Walpole +F: package/parprouted/ + +N: Parnell Springmeyer +F: package/scrypt/ + +N: Pascal de Bruijn +F: package/libargon2/ +F: package/linux-tools/S10hyperv +F: package/linux-tools/hyperv*.service +F: package/linux-tools/linux-tool-hv.mk.in + +N: Pascal Huerst +F: package/google-breakpad/ + +N: Patrick Gerber +F: package/yavta/ + +N: Patrick Havelange +F: support/testing/tests/package/test_lxc.py +F: support/testing/tests/package/test_lxc/ + +N: Paul Cercueil +F: package/libiio/ +F: package/lightning/ +F: package/umtprd/ + +N: Pedro Aguilar +F: package/libunistring/ + +N: Peter Korsgaard +F: board/beagleboneai/ +F: board/minnowboard/ +F: board/librecomputer/lafrite/ +F: board/nexbox/a95x/ +F: board/openblocks/a6/ +F: board/orangepi/ +F: board/pandaboard/ +F: board/roseapplepi/ +F: boot/shim/ +F: configs/beagleboneai_defconfig +F: configs/lafrite_defconfig +F: configs/minnowboard_max-graphical_defconfig +F: configs/minnowboard_max_defconfig +F: configs/nexbox_a95x_defconfig +F: configs/openblocks_a6_defconfig +F: configs/orangepi_pc_defconfig +F: configs/orangepi_r1_defconfig +F: configs/pandaboard_defconfig +F: configs/roseapplepi_defconfig +F: configs/sheevaplug_defconfig +F: package/bats-core/ +F: package/docker-compose/ +F: package/dump1090/ +F: package/fatcat/ +F: package/flickcurl/ +F: package/fscryptctl/ +F: package/ifmetric/ +F: package/jo/ +F: package/jose/ +F: package/libfastjson/ +F: package/luksmeta/ +F: package/lzop/ +F: package/memtool/ +F: package/mosquitto/ +F: package/python-alsaaudio/ +F: package/python-backports-ssl-match-hostname/ +F: package/python-cached-property/ +F: package/python-docker/ +F: package/python-dockerpty/ +F: package/python-docker-pycreds/ +F: package/python-enum/ +F: package/python-enum34/ +F: package/python-functools32/ +F: package/python-ipaddr/ +F: package/python-pam/ +F: package/python-psutil/ +F: package/python-request-id/ +F: package/python-semver/ +F: package/python-texttable/ +F: package/python-validators/ +F: package/python-webob/ +F: package/python-websocket-client/ +F: package/sedutil/ +F: package/tpm2-totp/ +F: package/triggerhappy/ +F: package/wireguard-linux-compat/ +F: package/wireguard-tools/ +F: support/testing/tests/package/test_docker_compose.py + +N: Peter Seiderer +F: board/raspberrypi/ +F: configs/raspberrypi*_defconfig +F: package/assimp/ +F: package/bcm2835/ +F: package/ddrescue/ +F: package/dejavu/ +F: package/dillo/ +F: package/edid-decode/ +F: package/ell/ +F: package/ghostscript-fonts/ +F: package/gstreamer1/gst1-interpipe/ +F: package/gstreamer1/gst1-validate/ +F: package/gstreamer1/gstreamer1-editing-services/ +F: package/iwd/ +F: package/libevdev/ +F: package/log4cplus/ +F: package/postgresql/ +F: package/python-colorzero/ +F: package/python-gpiozero/ +F: package/qt5/ +F: package/quotatool/ +F: package/racehound/ + +N: Peter Thompson +F: package/sdl2_gfx/ +F: package/sdl2_image/ +F: package/sdl2_ttf/ + +N: Petr Kulhavy +F: package/linuxptp/ + +N: Petr Vorel +F: package/ima-evm-utils/ +F: package/iproute2/ +F: package/iputils/ +F: package/libtirpc/ +F: package/linux-backports/ +F: package/ltp-testsuite/ +F: package/nfs-utils/ +F: support/kconfig/ + +N: Phil Eichinger +F: package/libqrencode/ +F: package/psplash/ +F: package/sispmctl/ +F: package/zsh/ + +N: Philipp Richter +F: package/libtorrent-rasterbar/ + +N: Philippe Proulx +F: package/lttng-babeltrace/ +F: package/lttng-libust/ +F: package/lttng-modules/ +F: package/lttng-tools/ +F: package/python-ipython/ +F: package/liburcu/ + +N: Philippe Reynes +F: package/ibm-sw-tpm2/ + +N: Pierre Crokaert +F: board/hardkernel/odroidxu4/ +F: configs/odroidxu4_defconfig + +N: Pierre Ducroquet +F: package/kf5/ + +N: Pierre Floury +F: package/trace-cmd/ + +N: Pierre-Jean Texier +F: package/fping/ +F: package/genimage/ +F: package/haveged/ +F: package/ipset/ +F: package/libarchive/ +F: package/libevent/ +F: package/libubootenv/ +F: package/libxml2/ +F: package/mongoose/ +F: package/mxml/ +F: package/numactl/ +F: package/python-modbus-tk/ +F: package/python-periphery/ +F: package/raspi-gpio/ +F: package/sbc/ +F: package/stunnel/ +F: package/tree/ + +N: Pieter De Gendt +F: package/libvips/ + +N: Pieterjan Camerlynck +F: package/libdvbpsi/ +F: package/mraa/ +F: package/synergy/ + +N: Rafal Susz +F: board/avnet/s6lx9_microboard/ +F: configs/s6lx9_microboard_defconfig + +N: Rahul Bedarkar +F: package/cxxtest/ +F: package/gflags/ +F: package/glog/ +F: package/gssdp/ +F: package/gupnp/ +F: package/gupnp-av/ +F: package/let-me-create/ +F: package/nanomsg/ + +N: Rahul Jain +F: package/uhttpd/ +F: package/ustream-ssl/ + +N: Refik Tuzakli +F: package/freescale-imx/ +F: package/paho-mqtt-cpp/ + +N: Ramon Fried +F: package/bitwise/ + +N: Raphaël Mélotte +F: package/jbig2dec/ + +N: Rémi Rérolle +F: package/libfreeimage/ + +N: Renaud Aubin +F: package/libhttpparser/ + +N: Ricardo Martincoski +F: package/atop/ +F: package/thermald/ + +N: Ricardo Martincoski +F: support/testing/infra/ +F: support/testing/run-tests +F: support/testing/tests/core/test_file_capabilities.py +F: support/testing/tests/download/ +F: support/testing/tests/package/*_python*.py +F: support/testing/tests/package/test_atop.py +F: support/testing/tests/package/test_syslog_ng.py +F: support/testing/tests/package/test_tmux.py +F: support/testing/tests/utils/test_check_package.py +F: utils/check-package +F: utils/checkpackagelib/ + +N: Richard Braun +F: package/curlftpfs/ +F: package/tzdata/ + +N: RJ Ascani +F: package/azmq/ + +N: Robert Rose +F: package/grpc/ + +N: Rodrigo Rebello +F: package/chocolate-doom/ +F: package/irssi/ +F: package/vnstat/ + +N: Romain Naour +F: board/qemu/ +F: configs/qemu_* +F: package/alure/ +F: package/aubio/ +F: package/binutils/ +F: package/bullet/ +F: package/clang/ +F: package/clinfo/ +F: package/efl/ +F: package/enet/ +F: package/enlightenment/ +F: package/flare-engine/ +F: package/flare-game/ +F: package/gcc/ +F: package/glibc/ +F: package/irrlicht/ +F: package/liblinear/ +F: package/lensfun/ +F: package/libclc/ +F: package/libgta/ +F: package/libspatialindex/ +F: package/linux-syscall-support/ +F: package/llvm/ +F: package/lugaru/ +F: package/mcelog/ +F: package/mesa3d/ +F: package/minetest/ +F: package/minetest-game/ +F: package/ogre/ +F: package/openpowerlink/ +F: package/physfs/ +F: package/piglit/ +F: package/solarus/ +F: package/stress-ng/ +F: package/supertux/ +F: package/supertuxkart/ +F: package/terminology/ +F: package/tk/ +F: package/upower/ +F: package/waffle/ +F: package/xenomai/ +F: package/zziplib/ +F: support/testing/tests/package/test_glxinfo.py +F: support/testing/tests/package/test_openssh.py +F: toolchain/ + +N: Roman Gorbenkov +F: package/davfs2/ + +N: Ryan Barnett +F: package/atftp/ +F: package/miraclecast/ +F: package/python-pysnmp/ +F: package/python-pysnmp-mibs/ +F: package/python-tornado/ +F: package/resiprocate/ +F: package/websocketpp/ + +N: Ryan Coe +F: package/inadyn/ +F: package/libite/ +F: package/mariadb/ + +N: Ryan Wilkins +F: package/biosdevname/ + +N: Sam Lancia +F: package/lrzip/ + +N: Samuel Martin +F: package/armadillo/ +F: package/canfestival/ +F: package/clapack/ +F: package/cwiid/ +F: package/flite/ +F: package/nginx/ +F: package/opencv/ +F: package/opencv3/ +F: package/openobex/ +F: package/pkg-cmake.mk +F: package/python-numpy/ +F: package/scrub/ +F: package/urg/ +F: package/ussp-push/ +F: support/misc/toolchainfile.cmake.in + +N: Sam Voss +F: package/ripgrep/ + +N: Santosh Multhalli +F: package/valijson/ + +N: Scott Fan +F: package/libssh/ +F: package/x11r7/xdriver_xf86-video-fbturbo/ + +N: Sébastien Szymanski +F: package/mmc-utils/ +F: package/python-flask-jsonrpc/ +F: package/python-flask-login/ +F: package/qt5/qt5charts/ + +N: Semyon Kolganov +F: package/fmt/ +F: package/libbson/ +F: package/lua-resty-http/ +F: package/mpir/ + +N: Sergey Matyukevich +F: boot/arm-trusted-firmware/ +F: boot/binaries-marvell/ +F: boot/mv-ddr-marvell/ +F: board/linksprite/pcduino +F: board/orangepi/orangepi-zero +F: board/orangepi/orangepi-one +F: board/orangepi/orangepi-pc-plus/ +F: board/solidrun/macchiatobin +F: configs/linksprite_pcduino_defconfig +F: configs/orangepi_one_defconfig +F: configs/orangepi_pc_plus_defconfig +F: configs/orangepi_zero_defconfig +F: configs/solidrun_macchiatobin_defconfig +F: package/armbian-firmware/ +F: package/hostapd/ +F: package/rtl8189fs/ +F: package/wpa_supplicant/ +F: package/xr819-xradio/ + +N: Sergio Prado +F: board/toradex/apalis-imx6/ +F: configs/toradex_apalis_imx6_defconfig +F: package/aoetools/ +F: package/azure-iot-sdk-c/ +F: package/curlpp/ +F: package/daq/ +F: package/libgdiplus/ +F: package/pimd/ +F: package/snort/ +F: package/stella/ +F: package/tio/ +F: package/traceroute/ +F: package/tunctl/ +F: package/ubus/ +F: package/wolfssl/ + +N: Simon Dawson +F: boot/at91bootstrap3/ +F: package/cppzmq/ +F: package/czmq/ +F: package/filemq/ +F: package/googlefontdirectory/ +F: package/jansson/ +F: package/jquery-ui/ +F: package/jquery-ui-themes/ +F: package/json-javascript/ +F: package/lcdapi/ +F: package/libfreefare/ +F: package/libjson/ +F: package/libnfc/ +F: package/libnfc/ +F: package/libserial/ +F: package/libsigsegv/ +F: package/macchanger/ +F: package/minicom/ +F: package/minidlna/ +F: package/msgpack/ +F: package/nanocom/ +F: package/neard/ +F: package/neardal/ +F: package/owl-linux/ +F: package/python-nfc/ +F: package/rapidjson/ +F: package/sconeserver/ +F: package/sound-theme-borealis/ +F: package/sound-theme-freedesktop/ +F: package/vlc/ +F: package/xscreensaver/ +F: package/zmqpp/ +F: package/zyre/ + +N: Spenser Gilliland +F: arch/Config.in.microblaze +F: package/a10disp/ +F: package/glmark2/ +F: package/libvpx/ +F: package/mesa3d-demos/ +F: package/ti-gfx/ + +N: Stefan Ott +F: package/unbound/ + +N: Stefan Sørensen +F: package/cracklib/ +F: package/libpwquality/ +F: package/libscrypt/ + +N: Stephan Hoffmann +F: package/cache-calibrator/ +F: package/gtest/ +F: package/libhttpserver/ +F: package/mtdev/ + +N: Stephane Viau +F: board/freescale/imx8mnevk/ +F: configs/freescale_imx8mnevk_defconfig + +N: Steve Calfee +F: package/python-pymysql/ +F: package/python-pyratemp/ + +N: Steve James +F: package/leveldb/ +F: package/libcli/ + +N: Steve Kenton +F: package/dvdauthor/ +F: package/dvdrw-tools/ +F: package/memtest86/ +F: package/mjpegtools/ +F: package/tovid/ +F: package/udftools/ +F: package/xorriso/ + +N: Steven Noonan +F: package/hwloc/ +F: package/powertop/ + +N: Suniel Mahesh +F: board/firefly/ +F: board/radxa/rockpi-4 +F: board/radxa/rockpi-n10 +F: configs/roc_pc_rk3399_defconfig +F: configs/rock_pi_4_defconfig +F: configs/rock_pi_n10_defconfig +F: package/arm-gnu-a-toolchain/ + +N: Sven Haardiek +F: package/lcdproc/ +F: package/python-influxdb/ + +N: Sven Oliver Moll +F: package/most/ + +N: Theo Debrouwere +F: board/beagleboardx15/ +F: configs/beagleboardx15_defconfig +F: package/pugixml/ + +N: Thierry Bultel +F: package/mpd-mpc/ + +N: Thijs Vermeir +F: package/ranger/ +F: package/x265/ + +N: Thomas Claveirole +F: package/fcgiwrap/ +F: package/openlayers/ + +N: Thomas Davis +F: package/civetweb/ + +N: Thomas De Schampheleire +F: docs/manual/ +F: package/cereal/ +F: package/chartjs/ +F: package/libtelnet/ +F: package/opkg-utils/ +F: package/perl-convert-asn1/ +F: package/perl-crypt-blowfish/ +F: package/perl-crypt-cbc/ +F: package/perl-crypt-openssl-aes/ +F: package/perl-i18n/ +F: package/perl-locale-maketext-lexicon/ +F: package/perl-lwp-protocol-https/ +F: package/perl-math-prime-util/ +F: package/perl-mime-base64-urlsafe/ +F: package/perl-mojolicious-plugin-authentication/ +F: package/perl-mojolicious-plugin-authorization/ +F: package/perl-mojolicious-plugin-cspheader/ +F: package/perl-mojolicious-plugin-i18n/ +F: package/perl-mojolicious-plugin-securityheader/ +F: package/perl-mozilla-ca/ +F: package/perl-net-snmp/ +F: package/perl-net-ssh2/ +F: package/perl-net-telnet/ +F: package/perl-path-class/ +F: package/pigz/ +F: package/xenomai/ +F: support/scripts/size-stats +F: support/testing/tests/package/test_perl_lwp_protocol_https.py +F: utils/size-stats-compare +F: toolchain/ + +N: Thomas Huth +F: package/ascii-invaders/ + +N: Thomas Petazzoni +F: arch/Config.in.arm +F: board/stmicroelectronics/stm32mp157c-dk2/ +F: boot/boot-wrapper-aarch64/ +F: boot/grub2/ +F: boot/gummiboot/ +F: configs/stm32mp157c_dk2_defconfig +F: package/android-tools/ +F: package/b43-firmware/ +F: package/b43-fwcutter/ +F: package/c-periphery/ +F: package/cdrkit/ +F: package/cifs-utils/ +F: package/cloop/ +F: package/cmake/ +F: package/cramfs/ +F: package/dmidecode/ +F: package/flashrom/ +F: package/gcc/ +F: package/genext2fs/ +F: package/genromfs/ +F: package/getent/ +F: package/gnu-efi/ +F: package/heirloom-mailx/ +F: package/hiawatha/ +F: package/igh-ethercat/ +F: package/intltool/ +F: package/libcap/ +F: package/libffi/ +F: package/libsha1/ +F: package/libtirpc/ +F: package/libxkbcommon/ +F: package/libxml-parser-perl/ +F: package/localedef/ +F: package/log4cxx/ +F: package/monit/ +F: package/mpdecimal/ +F: package/msmtp/ +F: package/musl/ +F: package/musl-fts/ +F: package/ne10/ +F: package/pkg-python.mk +F: package/pkg-autotools.mk +F: package/pkg-generic.mk +F: package/python/ +F: package/python3/ +F: package/python-mad/ +F: package/python-serial/ +F: package/qextserialport/ +F: package/rpcbind/ +F: package/rt-tests/ +F: package/rtc-tools/ +F: package/sam-ba/ +F: package/scons/ +F: package/squashfs/ +F: package/wayland/ +F: package/weston/ +F: support/testing/tests/boot/test_syslinux.py +F: toolchain/ + +N: Timo Ketola +F: package/fbgrab/ + +N: Titouan Christophe +F: package/avro-c/ +F: package/mosquitto/ +F: package/python-avro/ +F: package/redis/ +F: package/waf/ +F: support/testing/tests/package/test_crudini.py +F: support/testing/tests/package/test_redis.py + +N: Trent Piepho +F: package/libp11/ + +N: Tudor Holton +F: package/openjdk/ + +N: Tzu-Jung Lee +F: package/dropwatch/ +F: package/tstools/ + +N: Vadim Kochan +F: package/brcm-patchram-plus/ +F: package/gettext-tiny/ +F: package/tinyssh/ + +N: Valentin Korenblit +F: package/clang/ +F: package/clinfo/ +F: package/libclc/ +F: package/llvm/ + +N: Vanya Sergeev +F: package/lua-periphery/ + +N: Victor Huesca +F: support/testing/tests/core/test_root_password.py + +N: Vincent Prince +F: package/nss-myhostname/ +F: package/utp_com/ + +N: Vincent Stehlé +F: board/bananapi/bananapi-m2-zero/ +F: configs/bananapi_m2_zero_defconfig +F: package/i7z/ +F: package/msr-tools/ +F: package/pixz/ + +N: Vinicius Tinti +F: package/python-thrift/ + +N: Vivien Didelot +F: board/technologic/ts5500/ +F: configs/ts5500_defconfig + +N: Volkov Viacheslav +F: package/v4l2grab/ +F: package/zbar/ + +N: Wade Berrier +F: package/ngrep/ + +N: Waldemar Brodkorb +F: package/uclibc/ +F: package/uclibc-ng-test/ + +N: Will Newton +F: package/enchant/ +F: package/erlang/ +F: package/libmicrohttpd/ +F: package/sysprof/ +F: package/time/ + +N: Will Wagner +F: package/yaffs2utils/ + +N: Wojciech M. Zabolotny +F: package/avrdude/ +F: package/jack2/ +F: package/python-msgpack/ +F: package/python-pyusb/ + +N: Wojciech Niziński +F: package/fwup/ + +N: Yair Ben Avraham +F: package/gloox/ + +N: Yann E. MORIN +F: board/friendlyarm/nanopi-neo/ +F: configs/nanopi_neo_defconfig +F: fs/squashfs/ +F: package/asterisk/ +F: package/cegui/ +F: package/dahdi-linux/ +F: package/dahdi-tools/ +F: package/dtc/ +F: package/dtv-scan-tables/ +F: package/dvb-apps/ +F: package/freerdp/ +F: package/keyutils/ +F: package/libbsd/ +F: package/libedit/ +F: package/libgsm/ +F: package/libiberty/ +F: package/libinput/ +F: package/libiscsi/ +F: package/libpri/ +F: package/libseccomp/ +F: package/libss7/ +F: package/linux-firmware/ +F: package/linux-tools/ +F: package/matchbox* +F: package/mesa3d-headers/ +F: package/nbd/ +F: package/nut/ +F: package/nvidia-driver/ +F: package/omxplayer/ +F: package/python-pyparsing/ +F: package/pkg-download.mk +F: package/pkg-waf.mk +F: package/slirp/ +F: package/snappy/ +F: package/spice/ +F: package/spice-protocol/ +F: package/systemd/ +F: package/systemd-bootchart/ +F: package/tmux/ +F: package/tvheadend/ +F: package/usbredir/ +F: package/vde2/ +F: package/w_scan/ +F: package/wayland/ +F: package/weston/ +F: package/zisofs-tools/ +F: support/download/ + +N: Yegor Yefremov +F: configs/beaglebone_defconfig +F: configs/beaglebone_qt5_defconfig +F: package/acl/ +F: package/attr/ +F: package/boost/ +F: package/bootstrap/ +F: package/cannelloni/ +F: package/can-utils/ +F: package/circus/ +F: package/dhcpcd/ +F: package/feh/ +F: package/giblib/ +F: package/imlib2/ +F: package/jquery-datetimepicker/ +F: package/jquery-sidebar/ +F: package/kmod/ +F: package/libftdi1/ +F: package/libical/ +F: package/libmbim/ +F: package/libndp/ +F: package/libnftnl/ +F: package/libsoc/ +F: package/libsocketcan/ +F: package/libubox/ +F: package/libuci/ +F: package/linux-firmware/ +F: package/linux-serial-test/ +F: package/modem-manager/ +F: package/nftables/ +F: package/nuttcp/ +F: package/parted/ +F: package/phytool/ +F: package/poco/ +F: package/python* +F: package/ser2net/ +F: package/socketcand/ +F: package/swig/ +F: package/qt5/qt5serialbus/ +F: package/sdparm/ +F: package/ti-utils/ +F: package/x11r7/xapp_xconsole/ +F: package/x11r7/xapp_xinput-calibrator/ +F: package/zlog/ +F: support/testing/tests/package/test_libftdi1.py +F: support/testing/tests/package/test_python_can.py +F: utils/scanpypi + +N: Zoltan Gyarmati +F: package/crudini/ +F: package/grantlee/ +F: package/libusb/ +F: package/libusb-compat/ +F: package/proj/ +F: package/python-configobj/ +F: package/python-iniparse/ +F: package/qjson/ +F: package/quazip/ +F: package/shapelib/ +F: package/tinc/ diff --git a/buildroot/Makefile b/buildroot/Makefile index 6cee02796..894dcb104 100644 --- a/buildroot/Makefile +++ b/buildroot/Makefile @@ -2,7 +2,7 @@ # # Copyright (C) 1999-2005 by Erik Andersen # Copyright (C) 2006-2014 by the Buildroot developers -# Copyright (C) 2014 by the Buildroot developers +# Copyright (C) 2014-2020 by the Buildroot developers # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,132 +24,182 @@ # You shouldn't need to mess with anything beyond this point... #-------------------------------------------------------------- +# Delete default rules. We don't use them. This saves a bit of time. +.SUFFIXES: + +# we want bash as shell +SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi; fi) + +# Set O variable if not already done on the command line; +# or avoid confusing packages that can use the O= syntax for out-of-tree +# build by preventing it from being forwarded to sub-make calls. +ifneq ("$(origin O)", "command line") +O := $(CURDIR)/output +endif + +# Check if the current Buildroot execution meets all the pre-requisites. +# If they are not met, Buildroot will actually do its job in a sub-make meeting +# its pre-requisites, which are: +# 1- Permissive enough umask: +# Wrong or too restrictive umask will prevent Buildroot and packages from +# creating files and directories. +# 2- Absolute canonical CWD (i.e. $(CURDIR)): +# Otherwise, some packages will use CWD as-is, others will compute its +# absolute canonical path. This makes harder tracking and fixing host +# machine path leaks. +# 3- Absolute canonical output location (i.e. $(O)): +# For the same reason as the one for CWD. + +# Remove the trailing '/.' from $(O) as it can be added by the makefile wrapper +# installed in the $(O) directory. +# Also remove the trailing '/' the user can set when on the command line. +override O := $(patsubst %/,%,$(patsubst %.,%,$(O))) +# Make sure $(O) actually exists before calling realpath on it; this is to +# avoid empty CANONICAL_O in case on non-existing entry. +CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O)) + +# gcc fails to build when the srcdir contains a '@' +ifneq ($(findstring @,$(CANONICAL_O)),) +$(error The build directory can not contain a '@') +endif + +CANONICAL_CURDIR = $(realpath $(CURDIR)) + +REQ_UMASK = 0022 + +# Make sure O= is passed (with its absolute canonical path) everywhere the +# toplevel makefile is called back. +EXTRAMAKEARGS := O=$(CANONICAL_O) + +# Check Buildroot execution pre-requisites here. +ifneq ($(shell umask):$(CURDIR):$(O),$(REQ_UMASK):$(CANONICAL_CURDIR):$(CANONICAL_O)) +.PHONY: _all $(MAKECMDGOALS) + +$(MAKECMDGOALS): _all + @: + +_all: + @umask $(REQ_UMASK) && \ + $(MAKE) -C $(CANONICAL_CURDIR) --no-print-directory \ + $(MAKECMDGOALS) $(EXTRAMAKEARGS) + +else # umask / $(CURDIR) / $(O) + # This is our default rule, so must come first all: +.PHONY: all # Set and export the version string -export BR2_VERSION := 2015.02-git +export BR2_VERSION := 2020.08-rc2 +# Actual time the release is cut (for reproducible builds) +BR2_VERSION_EPOCH = 1598278000 + +# Save running make version since it's clobbered by the make package +RUNNING_MAKE_VERSION := $(MAKE_VERSION) # Check for minimal make version (note: this check will break at make 10.x) MIN_MAKE_VERSION = 3.81 -ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION)) -$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required) -endif - -export HOSTARCH := $(shell uname -m | \ - sed -e s/i.86/x86/ \ - -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ \ - -e s/sa110/arm/ \ - -e s/ppc64/powerpc64/ \ - -e s/ppc/powerpc/ \ - -e s/macppc/powerpc/\ - -e s/sh.*/sh/) - -# Parallel execution of this Makefile is disabled because it changes -# the packages building order, that can be a problem for two reasons: -# - If a package has an unspecified optional dependency and that -# dependency is present when the package is built, it is used, -# otherwise it isn't (but compilation happily proceeds) so the end -# result will differ if the order is swapped due to parallel -# building. -# - Also changing the building order can be a problem if two packages -# manipulate the same file in the target directory. -# -# Taking into account the above considerations, if you still want to execute -# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and -# build using the following command: -# make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1)) -.NOTPARALLEL: +ifneq ($(firstword $(sort $(RUNNING_MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION)) +$(error You have make '$(RUNNING_MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required) +endif # absolute path -TOPDIR := $(shell pwd) +TOPDIR := $(CURDIR) CONFIG_CONFIG_IN = Config.in CONFIG = support/kconfig DATE := $(shell date +%Y%m%d) # Compute the full local version string so packages can use it as-is # Need to export it, so it can be got from environment in children (eg. mconf) -export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion) +export BR2_VERSION_FULL := $(BR2_VERSION) + +# List of targets and target patterns for which .config doesn't need to be read in noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \ - defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \ + defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \ randpackageconfig allyespackageconfig allnopackageconfig \ - source-check print-version olddefconfig + print-version olddefconfig distclean manual manual-% check-package -# Strip quotes and then whitespaces -qstrip = $(strip $(subst ",,$(1))) -#")) +# Some global targets do not trigger a build, but are used to collect +# metadata, or do various checks. When such targets are triggered, +# some packages should not do their configuration sanity +# checks. Provide them a BR_BUILDING variable set to 'y' when we're +# actually building and they should do their sanity checks. +# +# We're building in two situations: when MAKECMDGOALS is empty +# (default target is to build), or when MAKECMDGOALS contains +# something else than one of the nobuild_targets. +nobuild_targets := source %-source \ + legal-info %-legal-info external-deps _external-deps \ + clean distclean help show-targets graph-depends \ + %-graph-depends %-show-depends %-show-version \ + graph-build graph-size list-defconfigs \ + savedefconfig update-defconfig printvars +ifeq ($(MAKECMDGOALS),) +BR_BUILDING = y +else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),) +BR_BUILDING = y +endif -# Variables for use in Make constructs -comma := , -empty := -space := $(empty) $(empty) +# We call make recursively to build packages. The command-line overrides that +# are passed to Buildroot don't apply to those package build systems. In +# particular, we don't want to pass down the O= option for out-of-tree +# builds, because the value specified on the command line will not be correct +# for packages. +MAKEOVERRIDES := -ifneq ("$(origin O)", "command line") -O := output -CONFIG_DIR := $(TOPDIR) +# Include some helper macros and variables +include support/misc/utils.mk + +# Set variables related to in-tree or out-of-tree build. +# Here, both $(O) and $(CURDIR) are absolute canonical paths. +ifeq ($(O),$(CURDIR)/output) +CONFIG_DIR := $(CURDIR) NEED_WRAPPER = else -# other packages might also support Linux-style out of tree builds -# with the O= syntax (E.G. BusyBox does). As make automatically -# forwards command line variable definitions those packages get very -# confused. Fix this by telling make to not do so -MAKEOVERRIDES = -# strangely enough O is still passed to submakes with MAKEOVERRIDES -# (with make 3.81 atleast), the only thing that changes is the output -# of the origin function (command line -> environment). -# Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+) -# To really make O go away, we have to override it. -override O := $(O) CONFIG_DIR := $(O) -# we need to pass O= everywhere we call back into the toplevel makefile -EXTRAMAKEARGS = O=$(O) NEED_WRAPPER = y endif # bash prints the name of the directory on 'cd ' if CDPATH is # set, so unset it here to not cause problems. Notice that the export -# line doesn't affect the environment of $(shell ..) calls, so -# explictly throw away any output from 'cd' here. +# line doesn't affect the environment of $(shell ..) calls. export CDPATH := -BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd) + +BASE_DIR := $(CANONICAL_O) $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist)) # Handling of BR2_EXTERNAL. # # The value of BR2_EXTERNAL is stored in .br-external in the output directory. -# On subsequent invocations of make, it is read in. It can still be overridden -# on the command line, therefore the file is re-created every time make is run. -# -# When BR2_EXTERNAL is set to an empty value (e.g. explicitly in command -# line), the .br-external file is removed and we point to -# support/dummy-external. This makes sure we can unconditionally include the -# Config.in and external.mk from the BR2_EXTERNAL directory. In this case, -# override is necessary so the user can clear BR2_EXTERNAL from the command -# line, but the dummy path is still used internally. - -BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external +# The location of the external.mk makefile fragments is computed in that file. +# On subsequent invocations of make, this file is read in. BR2_EXTERNAL can +# still be overridden on the command line, therefore the file is re-created +# every time make is run. + +BR2_EXTERNAL_FILE = $(BASE_DIR)/.br2-external.mk -include $(BR2_EXTERNAL_FILE) -ifeq ($(BR2_EXTERNAL),) - override BR2_EXTERNAL = support/dummy-external - $(shell rm -f $(BR2_EXTERNAL_FILE)) -else - _BR2_EXTERNAL = $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd) - ifeq ($(_BR2_EXTERNAL),) - $(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist, relative to $(TOPDIR)) - endif - override BR2_EXTERNAL := $(_BR2_EXTERNAL) - $(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE)) +$(shell support/scripts/br2-external -d '$(BASE_DIR)' $(BR2_EXTERNAL)) +BR2_EXTERNAL_ERROR = +include $(BR2_EXTERNAL_FILE) +ifneq ($(BR2_EXTERNAL_ERROR),) +$(error $(BR2_EXTERNAL_ERROR)) endif -# To make sure the the environment variable overrides the .config option, +# Workaround bug in make-4.3: https://savannah.gnu.org/bugs/?57676 +$(BASE_DIR)/.br2-external.mk:; + +# To make sure that the environment variable overrides the .config option, # set this before including .config. ifneq ($(BR2_DL_DIR),) DL_DIR := $(BR2_DL_DIR) endif - +ifneq ($(BR2_CCACHE_DIR),) +BR_CACHE_DIR := $(BR2_CCACHE_DIR) +endif # Need that early, before we scan packages # Avoids doing the $(or...) everytime @@ -157,10 +207,12 @@ BR_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf) BUILD_DIR := $(BASE_DIR)/build BINARIES_DIR := $(BASE_DIR)/images -TARGET_DIR := $(BASE_DIR)/target +BASE_TARGET_DIR := $(BASE_DIR)/target +PER_PACKAGE_DIR := $(BASE_DIR)/per-package # initial definition so that 'make clean' works for most users, even without # .config. HOST_DIR will be overwritten later when .config is included. HOST_DIR := $(BASE_DIR)/host +GRAPHS_DIR := $(BASE_DIR)/graphs LEGAL_INFO_DIR = $(BASE_DIR)/legal-info REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources @@ -169,8 +221,6 @@ LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv -LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt -LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings LEGAL_REPORT = $(LEGAL_INFO_DIR)/README @@ -181,37 +231,43 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(BR2_CONFIG) endif +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),) +# Disable top-level parallel build if per-package directories is not +# used. Indeed, per-package directories is necessary to guarantee +# determinism and reproducibility with top-level parallel build. +.NOTPARALLEL: +endif + +# timezone and locale may affect build output +ifeq ($(BR2_REPRODUCIBLE),y) +export TZ = UTC +export LANG = C +export LC_ALL = C +endif + # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands -ifdef V - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE = $(V) - endif +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) endif ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif ifeq ($(KBUILD_VERBOSE),1) - quiet = Q = ifndef VERBOSE VERBOSE = 1 endif +export VERBOSE else - quiet = quiet_ Q = @ endif -# we want bash as shell -SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ - else if [ -x /bin/bash ]; then echo /bin/bash; \ - else echo sh; fi; fi) - # kconfig uses CONFIG_SHELL CONFIG_SHELL := $(SHELL) -export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE +export SHELL CONFIG_SHELL Q KBUILD_VERBOSE ifndef HOSTAR HOSTAR := ar @@ -229,9 +285,6 @@ HOSTCXX := g++ HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) endif HOSTCXX_NOCCACHE := $(HOSTCXX) -ifndef HOSTFC -HOSTFC := gfortran -endif ifndef HOSTCPP HOSTCPP := cpp endif @@ -252,17 +305,73 @@ HOSTRANLIB := ranlib endif HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar) HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as) -HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran) HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp) HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld) HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln) HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm) HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy) HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib) +SED := $(shell which sed || type -p sed) -i -e -export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD +export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE +# Determine the userland we are running on. +# +# Note that, despite its name, we are not interested in the actual +# architecture name. This is mostly used to determine whether some +# of the binary tools (e.g. pre-built external toolchains) can run +# on the current host. So we need to know if the userland we're +# running on can actually run those toolchains. +# +# For example, a 64-bit prebuilt toolchain will not run on a 64-bit +# kernel if the userland is 32-bit (e.g. in a chroot for example). +# +# So, we extract the first part of the tuple the host gcc was +# configured to generate code for; we assume this is our userland. +# +export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 2>&1 | \ + sed -e '/^Target: \([^-]*\).*/!d' \ + -e 's//\1/' \ + -e 's/i.86/x86/' \ + -e 's/sun4u/sparc64/' \ + -e 's/arm.*/arm/' \ + -e 's/sa110/arm/' \ + -e 's/ppc64/powerpc64/' \ + -e 's/ppc/powerpc/' \ + -e 's/macppc/powerpc/' \ + -e 's/sh.*/sh/' ) + +# When adding a new host gcc version in Config.in, +# update the HOSTCC_MAX_VERSION variable: +HOSTCC_MAX_VERSION := 9 + +HOSTCC_VERSION := $(shell V=$$($(HOSTCC_NOCCACHE) --version | \ + sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p'); \ + [ "$${V%% *}" -le $(HOSTCC_MAX_VERSION) ] || V=$(HOSTCC_MAX_VERSION); \ + printf "%s" "$${V}") + +# For gcc >= 5.x, we only need the major version. +ifneq ($(firstword $(HOSTCC_VERSION)),4) +HOSTCC_VERSION := $(firstword $(HOSTCC_VERSION)) +endif + +ifeq ($(BR2_NEEDS_HOST_UTF8_LOCALE),y) +# First, we try to use the user's configured locale (as that's the +# language they'd expect messages to be displayed), then we favour +# a non language-specific locale like C.UTF-8 if one is available, +# so we sort with the C locale to get it at the top. +# This is guaranteed to not be empty, because of the check in +# support/dependencies/dependencies.sh +HOST_UTF8_LOCALE := $(shell \ + ( echo $${LC_ALL:-$${LC_MESSAGES:-$${LANG}}}; \ + locale -a 2>/dev/null | LC_ALL=C sort \ + ) \ + | grep -i -E 'utf-?8$$' \ + | head -n 1) +HOST_UTF8_LOCALE_ENV := LC_ALL=$(HOST_UTF8_LOCALE) +endif + # Make sure pkg-config doesn't look outside the buildroot tree HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH) unexport PKG_CONFIG_PATH @@ -289,8 +398,11 @@ ifeq ($(BR2_HAVE_DOT_CONFIG),y) unexport CROSS_COMPILE unexport ARCH unexport CC +unexport LD +unexport AR unexport CXX unexport CPP +unexport RANLIB unexport CFLAGS unexport CXXFLAGS unexport GREP_OPTIONS @@ -299,10 +411,15 @@ unexport CONFIG_SITE unexport QMAKESPEC unexport TERMINFO unexport MACHINE +unexport O +unexport GCC_COLORS +unexport PLATFORM +unexport OS GNU_HOST_NAME := $(shell support/gnuconfig/config.guess) -TARGETS := +PACKAGES := +PACKAGES_ALL := # silent mode requested? QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q) @@ -315,42 +432,61 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \ -e s/arcle/arc/ \ -e s/arceb/arc/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/aarch64/arm64/ \ - -e s/bfin/blackfin/ \ + -e s/aarch64.*/arm64/ \ + -e s/nds32.*/nds32/ \ + -e s/or1k/openrisc/ \ -e s/parisc64/parisc/ \ -e s/powerpc64.*/powerpc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/riscv.*/riscv/ \ -e s/sh.*/sh/ \ -e s/microblazeel/microblaze/) ZCAT := $(call qstrip,$(BR2_ZCAT)) BZCAT := $(call qstrip,$(BR2_BZCAT)) XZCAT := $(call qstrip,$(BR2_XZCAT)) +LZCAT := $(call qstrip,$(BR2_LZCAT)) TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf -# packages compiled for the host go here +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) +HOST_DIR = $(if $(PKG),$(PER_PACKAGE_DIR)/$($(PKG)_NAME)/host,$(call qstrip,$(BR2_HOST_DIR))) +TARGET_DIR = $(if $(ROOTFS),$(ROOTFS_$(ROOTFS)_TARGET_DIR),$(if $(PKG),$(PER_PACKAGE_DIR)/$($(PKG)_NAME)/target,$(BASE_TARGET_DIR))) +else HOST_DIR := $(call qstrip,$(BR2_HOST_DIR)) +TARGET_DIR = $(if $(ROOTFS),$(ROOTFS_$(ROOTFS)_TARGET_DIR),$(BASE_TARGET_DIR)) +endif -# Quotes are needed for spaces and all in the original PATH content. -BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" +ifneq ($(HOST_DIR),$(BASE_DIR)/host) +HOST_DIR_SYMLINK = $(BASE_DIR)/host +$(HOST_DIR_SYMLINK): | $(BASE_DIR) + ln -snf $(HOST_DIR) $(HOST_DIR_SYMLINK) +endif -TARGET_SKELETON = $(TOPDIR)/system/skeleton +STAGING_DIR_SYMLINK = $(BASE_DIR)/staging +$(STAGING_DIR_SYMLINK): | $(BASE_DIR) + ln -snf $(STAGING_DIR) $(STAGING_DIR_SYMLINK) + +# Quotes are needed for spaces and all in the original PATH content. +BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(PATH)" # Location of a file giving a big fat warning that output/target # should not be used as the root filesystem. TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM ifeq ($(BR2_CCACHE),y) -CCACHE := $(HOST_DIR)/usr/bin/ccache -BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR)) +CCACHE = $(HOST_DIR)/bin/ccache +BR_CACHE_DIR ?= $(call qstrip,$(BR2_CCACHE_DIR)) export BR_CACHE_DIR -HOSTCC := $(CCACHE) $(HOSTCC) -HOSTCXX := $(CCACHE) $(HOSTCXX) +HOSTCC = $(CCACHE) $(HOSTCC_NOCCACHE) +HOSTCXX = $(CCACHE) $(HOSTCXX_NOCCACHE) +else +export BR_NO_CCACHE endif # Scripts in support/ or post-build scripts may need to reference # these locations, so export them so it is easier to use export BR2_CONFIG +export BR2_REPRODUCIBLE export TARGET_DIR export STAGING_DIR export HOST_DIR @@ -368,18 +504,25 @@ all: world # Include legacy before the other things, because package .mk files # may rely on it. -ifneq ($(BR2_DEPRECATED),y) include Makefile.legacy -endif +include system/system.mk include package/Makefile.in +# arch/arch.mk must be after package/Makefile.in because it may need to +# complement variables defined therein, like BR_NO_CHECK_HASH_FOR. +include arch/arch.mk include support/dependencies/dependencies.mk -# We also need the various per-package makefiles, which also add -# each selected package to TARGETS if that package was selected -# in the .config file. -include toolchain/*.mk -include toolchain/*/*.mk +include $(sort $(wildcard toolchain/*.mk)) +include $(sort $(wildcard toolchain/*/*.mk)) + +ifeq ($(BR2_REPRODUCIBLE),y) +# If SOURCE_DATE_EPOCH has not been set then use the commit date, or the last +# release date if the source tree is not within a Git repository. +# See: https://reproducible-builds.org/specs/source-date-epoch/ +BR2_VERSION_GIT_EPOCH := $(shell $(GIT) log -1 --format=%at 2> /dev/null) +export SOURCE_DATE_EPOCH ?= $(or $(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH)) +endif # Include the package override file if one has been provided in the # configuration. @@ -392,115 +535,117 @@ include $(sort $(wildcard package/*/*.mk)) include boot/common.mk include linux/linux.mk -include system/system.mk include fs/common.mk -include $(BR2_EXTERNAL)/external.mk - -TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS)) -TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS)) - -# host-* dependencies have to be handled specially, as those aren't -# visible in Kconfig and hence not added to a variable like TARGETS. -# instead, find all the host-* targets listed in each _DEPENDENCIES -# variable for each enabled target. -# Notice: this only works for newstyle gentargets/autotargets packages -TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\ - $(addsuffix _DEPENDENCIES,\ - $(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\ - $($(dep))))) -# Host packages can in turn have their own dependencies. Likewise find -# all the package names listed in the HOST__DEPENDENCIES for each -# host package found above. Ideally this should be done recursively until -# no more packages are found, but that's hard to do in make, so limit to -# 1 level for now. -HOST_DEPS = $(sort $(foreach dep,\ - $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\ - $($(dep)))) -HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS))) - -TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\ - $(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS)) - -dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(HOST_DIR) $(BINARIES_DIR) +# If using a br2-external tree, the BR2_EXTERNAL_$(NAME)_PATH variables +# are also present in the .config file. Since .config is included after +# we defined them in the Makefile, the values for those variables are +# quoted. We just include the generated Makefile fragment .br2-external.mk +# a third time, which will set those variables to the un-quoted values. +include $(BR2_EXTERNAL_FILE) -$(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) - $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig - -prepare: $(BUILD_DIR)/buildroot-config/auto.conf +# Nothing to include if no BR2_EXTERNAL tree in use +include $(BR2_EXTERNAL_MKS) -world: target-post-image - -.PHONY: all world toolchain dirs clean distclean source outputmakefile \ - legal-info legal-info-prepare legal-info-clean printvars \ - target-finalize target-post-image \ - $(TARGETS) $(TARGETS_ROOTFS) \ - $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \ - $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(HOST_DIR) $(BINARIES_DIR) - -################################################################################ +# Now we are sure we have all the packages scanned and defined. We now +# check for each package in the list of enabled packages, that all its +# dependencies are indeed enabled. # -# staging and target directories do NOT list these as -# dependencies anywhere else +# Only trigger the check for default builds. If the user forces building +# a package, even if not enabled in the configuration, we want to accept +# it. However; we also want to be able to force checking the dependencies +# if the user so desires. Forcing a dependency check is useful in the case +# of test-pkg, as we want to make sure during testing, that a package has +# all the dependencies selected in the config file. # -################################################################################ -$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST): - @mkdir -p $@ +ifeq ($(MAKECMDGOALS),) +BR_FORCE_CHECK_DEPENDENCIES = YES +endif -# We make a symlink lib32->lib or lib64->lib as appropriate -# MIPS64/n32 requires lib32 even though it's a 64-bit arch. -ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y) -LIB_SYMLINK = lib64 -else -LIB_SYMLINK = lib32 +ifeq ($(BR_FORCE_CHECK_DEPENDENCIES),YES) + +define CHECK_ONE_DEPENDENCY +ifeq ($$($(2)_TYPE),target) +ifeq ($$($(2)_IS_VIRTUAL),) +ifneq ($$($$($(2)_KCONFIG_VAR)),y) +$$(error $$($(2)_NAME) is in the dependency chain of $$($(1)_NAME) that \ +has added it to its _DEPENDENCIES variable without selecting it or \ +depending on it from Config.in) +endif +endif endif +endef -$(STAGING_DIR): - @mkdir -p $(STAGING_DIR)/bin - @mkdir -p $(STAGING_DIR)/lib - @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK) - @mkdir -p $(STAGING_DIR)/usr/lib - @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK) - @mkdir -p $(STAGING_DIR)/usr/include - @mkdir -p $(STAGING_DIR)/usr/bin - @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging +$(foreach pkg,$(call UPPERCASE,$(PACKAGES)),\ + $(foreach dep,$(call UPPERCASE,$($(pkg)_FINAL_ALL_DEPENDENCIES)),\ + $(eval $(call CHECK_ONE_DEPENDENCY,$(pkg),$(dep))$(sep)))) -ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y) -TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH) endif +$(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) + $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" syncconfig + +.PHONY: prepare +prepare: $(BUILD_DIR)/buildroot-config/auto.conf + +.PHONY: world +world: target-post-image + +.PHONY: prepare-sdk +prepare-sdk: world + @$(call MESSAGE,"Rendering the SDK relocatable") + PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath host + PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath staging + $(INSTALL) -m 755 $(TOPDIR)/support/misc/relocate-sdk.sh $(HOST_DIR)/relocate-sdk.sh + mkdir -p $(HOST_DIR)/share/buildroot + echo $(HOST_DIR) > $(HOST_DIR)/share/buildroot/sdk-location + +BR2_SDK_PREFIX ?= $(GNU_TARGET_NAME)_sdk-buildroot +.PHONY: sdk +sdk: prepare-sdk $(BR2_TAR_HOST_DEPENDENCY) + @$(call MESSAGE,"Generating SDK tarball") + $(if $(BR2_SDK_PREFIX),,$(error BR2_SDK_PREFIX can not be empty)) + $(Q)mkdir -p $(BINARIES_DIR) + $(TAR) czf "$(BINARIES_DIR)/$(BR2_SDK_PREFIX).tar.gz" \ + --owner=0 --group=0 --numeric-owner \ + --transform='s#^$(patsubst /%,%,$(HOST_DIR))#$(BR2_SDK_PREFIX)#' \ + -C / $(patsubst /%,%,$(HOST_DIR)) + RSYNC_VCS_EXCLUSIONS = \ --exclude .svn --exclude .git --exclude .hg --exclude .bzr \ --exclude CVS -$(BUILD_DIR)/.root: - mkdir -p $(TARGET_DIR) - rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ - --chmod=Du+w --exclude .empty --exclude '*~' \ - $(TARGET_SKELETON)/ $(TARGET_DIR)/ - $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE) - @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK) - @mkdir -p $(TARGET_DIR)/usr - @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK) - touch $@ - -$(TARGET_DIR): $(BUILD_DIR)/.root - -STRIP_FIND_CMD = find $(TARGET_DIR) -ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) -STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o -endif -STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \) -# file exclusions: +# When stripping, obey to BR2_STRIP_EXCLUDE_DIRS and +# BR2_STRIP_EXCLUDE_FILES +STRIP_FIND_COMMON_CMD = \ + find $(TARGET_DIR) \ + $(if $(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)), \ + \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) \ + -prune -o \ + ) \ + $(if $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES)), \ + -not \( $(call findfileclauses,$(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) ) + +# Regular stripping for everything, except libpthread, ld-*.so and +# kernel modules: # - libpthread.so: a non-stripped libpthread shared library is needed for # proper debugging of pthread programs using gdb. +# - ld.so: a non-stripped dynamic linker library is needed for valgrind # - kernel modules (*.ko): do not function properly when stripped like normal # applications and libraries. Normally kernel modules are already excluded -# by the executable permission check above, so the explicit exclusion is only +# by the executable permission check, so the explicit exclusion is only # done for kernel modules with incorrect permissions. -STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* *.ko $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print +STRIP_FIND_CMD = \ + $(STRIP_FIND_COMMON_CMD) \ + -type f \( -perm /111 -o -name '*.so*' \) \ + -not \( $(call findfileclauses,libpthread*.so* ld-*.so* *.ko) \) \ + -print0 + +# Special stripping (only debugging symbols) for libpthread and ld-*.so. +STRIP_FIND_SPECIAL_LIBS_CMD = \ + $(STRIP_FIND_COMMON_CMD) \ + \( -name 'ld-*.so*' -o -name 'libpthread*.so*' \) \ + -print0 ifeq ($(BR2_ECLIPSE_REGISTER),y) define TOOLCHAIN_ECLIPSE_REGISTER @@ -518,7 +663,7 @@ endif ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE)) ifneq ($(GLIBC_GENERATE_LOCALES),) -TARGETS += host-localedef +PACKAGES += host-localedef define GENERATE_GLIBC_LOCALES $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/ @@ -530,7 +675,7 @@ define GENERATE_GLIBC_LOCALES fi ; \ echo "Generating locale $${inputfile}.$${charmap}" ; \ I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \ - $(HOST_DIR)/usr/bin/localedef \ + $(HOST_DIR)/bin/localedef \ --prefix=$(TARGET_DIR) \ --$(call LOWERCASE,$(BR2_ENDIAN))-endian \ -i $${inputfile} -f $${charmap} \ @@ -545,143 +690,257 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST)) +# This piece of junk does the following: +# First collect the whitelist in a file. +# Then go over all the locale dirs and for each subdir, check if it exists +# in the whitelist file. If it doesn't, kill it. +# Finally, specifically for X11, regenerate locale.dir from the whitelist. define PURGE_LOCALES - rm -f $(LOCALE_WHITELIST) - for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done + printf '%s\n' $(LOCALE_NOPURGE) locale-archive > $(LOCALE_WHITELIST) - for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man /usr/lib/locale)); \ + for dir in $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale); \ do \ - for lang in $$(cd $$dir; ls .|grep -v man); \ + if [ ! -d $$dir ]; then continue; fi; \ + for langdir in $$dir/*; \ do \ - grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \ + if [ -e "$${langdir}" ]; \ + then \ + grep -qx "$${langdir##*/}" $(LOCALE_WHITELIST) || rm -rf $$langdir; \ + fi \ done; \ done + if [ -d $(TARGET_DIR)/usr/share/X11/locale ]; \ + then \ + for lang in $(LOCALE_NOPURGE); \ + do \ + if [ -f $(TARGET_DIR)/usr/share/X11/locale/$$lang/XLC_LOCALE ]; \ + then \ + echo "$$lang/XLC_LOCALE: $$lang"; \ + fi \ + done > $(TARGET_DIR)/usr/share/X11/locale/locale.dir; \ + fi endef TARGET_FINALIZE_HOOKS += PURGE_LOCALES endif $(TARGETS_ROOTFS): target-finalize -target-finalize: $(TARGETS) +# Avoid the rootfs name leaking down the dependency chain +target-finalize: ROOTFS= + +TARGET_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list.txt)) +HOST_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-host.txt)) +STAGING_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-staging.txt)) + +.PHONY: host-finalize +host-finalize: $(PACKAGES) $(HOST_DIR) $(HOST_DIR_SYMLINK) + @$(call MESSAGE,"Finalizing host directory") + $(call per-package-rsync,$(sort $(PACKAGES)),host,$(HOST_DIR)) + +.PHONY: staging-finalize +staging-finalize: $(STAGING_DIR_SYMLINK) + +.PHONY: target-finalize +target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize @$(call MESSAGE,"Finalizing target directory") + $(call per-package-rsync,$(sort $(PACKAGES)),target,$(TARGET_DIR)) $(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep)) rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ - $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake + $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake \ + $(TARGET_DIR)/usr/doc find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f - find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f - find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f + find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \ + \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f ifneq ($(BR2_PACKAGE_GDB),y) rm -rf $(TARGET_DIR)/usr/share/gdb +endif +ifneq ($(BR2_PACKAGE_BASH),y) + rm -rf $(TARGET_DIR)/usr/share/bash-completion + rm -rf $(TARGET_DIR)/etc/bash_completion.d +endif +ifneq ($(BR2_PACKAGE_ZSH),y) + rm -rf $(TARGET_DIR)/usr/share/zsh endif rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc rm -rf $(TARGET_DIR)/usr/share/gtk-doc - -rmdir $(TARGET_DIR)/usr/share 2>/dev/null - $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true - if test -d $(TARGET_DIR)/lib/modules; then \ - find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ - xargs -r $(KSTRIPCMD); fi - -# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads -# besides the one in which crash occurred; or SIGTRAP kills my program when -# I set a breakpoint" -ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) - find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \ - xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) + rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true +ifneq ($(BR2_ENABLE_DEBUG):$(BR2_STRIP_strip),y:) + rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug endif + $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true + $(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true + test -f $(TARGET_DIR)/etc/ld.so.conf && \ + { echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true + test -d $(TARGET_DIR)/etc/ld.so.conf.d && \ + { echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true mkdir -p $(TARGET_DIR)/etc - # Mandatory configuration file and auxilliary cache directory - # for recent versions of ldconfig - touch $(TARGET_DIR)/etc/ld.so.conf - mkdir -p $(TARGET_DIR)/var/cache/ldconfig - if [ -x "$(TARGET_CROSS)ldconfig" ]; \ - then \ - $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \ - else \ - /sbin/ldconfig -r $(TARGET_DIR); \ - fi ( \ echo "NAME=Buildroot"; \ echo "VERSION=$(BR2_VERSION_FULL)"; \ echo "ID=buildroot"; \ echo "VERSION_ID=$(BR2_VERSION)"; \ echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \ - ) > $(TARGET_DIR)/etc/os-release + ) > $(TARGET_DIR)/usr/lib/os-release + ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc + + @$(call MESSAGE,"Sanitizing RPATH in target tree") + PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath target + +# For a merged /usr, ensure that /lib, /bin and /sbin and their /usr +# counterparts are appropriately setup as symlinks ones to the others. +ifeq ($(BR2_ROOTFS_MERGED_USR),y) + + @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \ + $(call MESSAGE,"Sanity check in overlay $(d)"); \ + not_merged_dirs="$$(support/scripts/check-merged-usr.sh $(d))"; \ + test -n "$$not_merged_dirs" && { \ + echo "ERROR: The overlay in $(d) is not" \ + "using a merged /usr for the following directories:" \ + $$not_merged_dirs; \ + exit 1; \ + } || true$(sep)) + +endif # merged /usr @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \ $(call MESSAGE,"Copying overlay $(d)"); \ - rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ - --chmod=Du+w --exclude .empty --exclude '*~' \ - $(d)/ $(TARGET_DIR)$(sep)) + $(call SYSTEM_RSYNC,$(d),$(TARGET_DIR))$(sep)) + + $(if $(TARGET_DIR_FILES_LISTS), \ + cat $(TARGET_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list.txt + $(if $(HOST_DIR_FILES_LISTS), \ + cat $(HOST_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-host.txt + $(if $(STAGING_DIR_FILES_LISTS), \ + cat $(STAGING_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-staging.txt @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ $(call MESSAGE,"Executing post-build script $(s)"); \ $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) -target-post-image: $(TARGETS_ROOTFS) target-finalize + touch $(TARGET_DIR)/usr + +.PHONY: target-post-image +target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize + @rm -f $(ROOTFS_COMMON_TAR) + $(Q)mkdir -p $(BINARIES_DIR) @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ $(call MESSAGE,"Executing post-image script $(s)"); \ $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) -source: $(TARGETS_SOURCE) $(HOST_SOURCE) +.PHONY: source +source: $(foreach p,$(PACKAGES),$(p)-all-source) +.PHONY: _external-deps external-deps +_external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps) external-deps: - @$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u + @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u +.PHONY: legal-info-clean legal-info-clean: @rm -fr $(LEGAL_INFO_DIR) +.PHONY: legal-info-prepare legal-info-prepare: $(LEGAL_INFO_DIR) - @$(call MESSAGE,"Collecting legal info") - @$(call legal-license-file,buildroot,COPYING,COPYING,HOST) - @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET) - @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST) - @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,not saved,HOST) + @$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info") + @$(call legal-license-file,buildroot,buildroot,support/legal-info/buildroot.hash,COPYING,COPYING,HOST) + @$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES) + @$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES) + @$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved) @$(call legal-warning,the Buildroot source code has not been saved) - @$(call legal-warning,the toolchain has not been saved) @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config -legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \ +.PHONY: legal-info +legal-info: legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \ $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) @cat support/legal-info/README.header >>$(LEGAL_REPORT) @if [ -r $(LEGAL_WARNINGS) ]; then \ cat support/legal-info/README.warnings-header \ $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \ cat $(LEGAL_WARNINGS); fi - @echo "Legal info produced in $(LEGAL_INFO_DIR)" @rm -f $(LEGAL_WARNINGS) + @(cd $(LEGAL_INFO_DIR); \ + find * -type f -exec sha256sum {} + | LC_ALL=C sort -k2 \ + >.legal-info.sha256; \ + mv .legal-info.sha256 legal-info.sha256) + @echo "Legal info produced in $(LEGAL_INFO_DIR)" +.PHONY: show-targets show-targets: - @echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS) + @echo $(sort $(PACKAGES)) $(sort $(TARGETS_ROOTFS)) + +.PHONY: show-build-order +show-build-order: $(patsubst %,%-show-build-order,$(PACKAGES)) +.PHONY: graph-build graph-build: $(O)/build/build-time.log - @install -d $(O)/graphs + @install -d $(GRAPHS_DIR) $(foreach o,name build duration,./support/scripts/graph-build-time \ --type=histogram --order=$(o) --input=$(<) \ - --output=$(O)/graphs/build.hist-$(o).$(BR_GRAPH_OUT) \ + --output=$(GRAPHS_DIR)/build.hist-$(o).$(BR_GRAPH_OUT) \ $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep)) $(foreach t,packages steps,./support/scripts/graph-build-time \ --type=pie-$(t) --input=$(<) \ - --output=$(O)/graphs/build.pie-$(t).$(BR_GRAPH_OUT) \ + --output=$(GRAPHS_DIR)/build.pie-$(t).$(BR_GRAPH_OUT) \ $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep)) +.PHONY: graph-depends-requirements graph-depends-requirements: @dot -? >/dev/null 2>&1 || \ { echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1; } +.PHONY: graph-depends graph-depends: graph-depends-requirements - @$(INSTALL) -d $(O)/graphs + @$(INSTALL) -d $(GRAPHS_DIR) @cd "$(CONFIG_DIR)"; \ $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ - |tee $(BASE_DIR)/graphs/$(@).dot \ - |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) + --direct -o $(GRAPHS_DIR)/$(@).dot + dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) \ + -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT) \ + $(GRAPHS_DIR)/$(@).dot + +.PHONY: graph-size +graph-size: + $(Q)mkdir -p $(GRAPHS_DIR) + $(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \ + --graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \ + --file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \ + --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv \ + $(BR2_GRAPH_SIZE_OPTS) + +.PHONY: check-dependencies +check-dependencies: + @cd "$(CONFIG_DIR)"; \ + $(TOPDIR)/support/scripts/graph-depends -C + +.PHONY: show-info +show-info: + @: + $(info $(call clean-json, \ + { $(foreach p, \ + $(sort $(foreach i,$(PACKAGES) $(TARGETS_ROOTFS), \ + $(i) \ + $($(call UPPERCASE,$(i))_FINAL_RECURSIVE_DEPENDENCIES) \ + ) \ + ), \ + $(call json-info,$(call UPPERCASE,$(p)))$(comma) \ + ) } \ + ) \ + ) else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) -all: menuconfig +# Some subdirectories are also package names. To avoid that "make linux" +# on an unconfigured tree produces "Nothing to be done", add an explicit +# rule for it. +# Also for 'all' we error out and ask the user to configure first. +.PHONY: linux toolchain +linux toolchain all: outputmakefile + $(error Please configure Buildroot first (e.g. "make menuconfig")) + @exit 1 endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) @@ -706,105 +965,65 @@ COMMON_CONFIG_ENV = \ KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \ KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ BR2_CONFIG=$(BR2_CONFIG) \ - BR2_EXTERNAL=$(BR2_EXTERNAL) + HOST_GCC_VERSION="$(HOSTCC_VERSION)" \ + BASE_DIR=$(BASE_DIR) \ + SKIP_LEGACY= xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN) menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) config: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) -oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN) - -randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN) - -allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN) - -allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN) - -randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg - @grep '^config BR2_PACKAGE_' Config.in.legacy | \ - while read config pkg; do \ - echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done - @$(COMMON_CONFIG_ENV) \ - KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ - $< --randconfig $(CONFIG_CONFIG_IN) - @rm -f $(CONFIG_DIR)/.config.nopkg +# For the config targets that automatically select options, we pass +# SKIP_LEGACY=y to disable the legacy options. However, in that case +# no values are set for the legacy options so a subsequent oldconfig +# will query them. Therefore, run an additional olddefconfig. -allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg - @grep '^config BR2_PACKAGE_' Config.in.legacy | \ - while read config pkg; do \ - echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done - @$(COMMON_CONFIG_ENV) \ - KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ - $< --allyesconfig $(CONFIG_CONFIG_IN) - @rm -f $(CONFIG_DIR)/.config.nopkg +randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --$@ $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null -allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config +randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg - @$(COMMON_CONFIG_ENV) \ + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \ KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ - $< --allnoconfig $(CONFIG_CONFIG_IN) + $< --$(subst package,,$@) $(CONFIG_CONFIG_IN) @rm -f $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null -silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN) - -olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) +oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN) defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN) -%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN) +define percent_defconfig +# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile + @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \ + $$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN) +endef +$(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent_defconfig,$(d))$(sep))) -%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN) +update-defconfig: savedefconfig savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile - @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< \ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ $(CONFIG_CONFIG_IN) + @$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) -# check if download URLs are outdated -source-check: - $(MAKE1) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source - -.PHONY: defconfig savedefconfig +.PHONY: defconfig savedefconfig update-defconfig ################################################################################ # @@ -812,36 +1031,51 @@ source-check: # ################################################################################ +# staging and target directories do NOT list these as +# dependencies anywhere else +$(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) $(PER_PACKAGE_DIR): + @mkdir -p $@ + # outputmakefile generates a Makefile in the output directory, if using a # separate output directory. This allows convenient use of make in the # output directory. +.PHONY: outputmakefile outputmakefile: ifeq ($(NEED_WRAPPER),y) $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O) endif -# printvars prints all the variables currently defined in our Makefiles +# printvars prints all the variables currently defined in our +# Makefiles. Alternatively, if a non-empty VARS variable is passed, +# only the variables matching the make pattern passed in VARS are +# displayed. +.PHONY: printvars printvars: - @$(foreach V, \ - $(sort $(.VARIABLES)), \ + @: + $(foreach V, \ + $(sort $(filter $(VARS),$(.VARIABLES))), \ $(if $(filter-out environment% default automatic, \ $(origin $V)), \ - $(info $V=$($V) ($(value $V))))) + $(if $(QUOTED_VARS),\ + $(info $V='$(subst ','\'',$(if $(RAW_VARS),$(value $V),$($V)))'), \ + $(info $V=$(if $(RAW_VARS),$(value $V),$($V)))))) +# ' Syntax colouring... +.PHONY: clean clean: - rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ + rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) $(HOST_DIR_SYMLINK) \ $(BUILD_DIR) $(BASE_DIR)/staging \ - $(LEGAL_INFO_DIR) + $(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR) +.PHONY: distclean distclean: clean -ifeq ($(DL_DIR),$(TOPDIR)/dl) - rm -rf $(DL_DIR) -endif -ifeq ($(O),output) +ifeq ($(O),$(CURDIR)/output) rm -rf $(O) endif - rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps + rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \ + $(CONFIG_DIR)/.auto.deps $(BASE_DIR)/.br2-external.* +.PHONY: help help: @echo 'Cleaning:' @echo ' clean - delete all files created by build' @@ -850,6 +1084,7 @@ help: @echo 'Build:' @echo ' all - make world' @echo ' toolchain - build toolchain' + @echo ' sdk - build relocatable SDK' @echo @echo 'Configuration:' @echo ' menuconfig - interactive curses-based configurator' @@ -857,31 +1092,44 @@ help: @echo ' xconfig - interactive Qt-based configurator' @echo ' gconfig - interactive GTK-based configurator' @echo ' oldconfig - resolve any unresolved symbols in .config' - @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' - @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' + @echo ' syncconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' olddefconfig - Same as syncconfig but sets new symbols to their default value' @echo ' randconfig - New config with random answer to all options' - @echo ' defconfig - New config with default answer to all options' - @echo ' BR2_DEFCONFIG, if set, is used as input' - @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' + @echo ' defconfig - New config with default answer to all options;' + @echo ' BR2_DEFCONFIG, if set on the command line, is used as input' + @echo ' savedefconfig - Save current config to BR2_DEFCONFIG (minimal config)' + @echo ' update-defconfig - Same as savedefconfig' @echo ' allyesconfig - New config where all options are accepted with yes' @echo ' allnoconfig - New config where all options are answered with no' + @echo ' alldefconfig - New config where all options are set to default' @echo ' randpackageconfig - New config with random answer to package options' @echo ' allyespackageconfig - New config where pkg options are accepted with yes' @echo ' allnopackageconfig - New config where package options are answered with no' -ifeq ($(BR2_PACKAGE_BUSYBOX),y) - @echo ' busybox-menuconfig - Run BusyBox menuconfig' -endif -ifeq ($(BR2_LINUX_KERNEL),y) - @echo ' linux-menuconfig - Run Linux kernel menuconfig' - @echo ' linux-savedefconfig - Run Linux kernel savedefconfig' -endif -ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) - @echo ' uclibc-menuconfig - Run uClibc menuconfig' -endif -ifeq ($(BR2_TARGET_BAREBOX),y) - @echo ' barebox-menuconfig - Run barebox menuconfig' - @echo ' barebox-savedefconfig - Run barebox savedefconfig' -endif + @echo + @echo 'Package-specific:' + @echo ' - Build and install and all its dependencies' + @echo ' -source - Only download the source files for ' + @echo ' -extract - Extract sources' + @echo ' -patch - Apply patches to ' + @echo ' -depends - Build '\''s dependencies' + @echo ' -configure - Build up to the configure step' + @echo ' -build - Build up to the build step' + @echo ' -show-info - generate info about , as a JSON blurb' + @echo ' -show-depends - List packages on which depends' + @echo ' -show-rdepends - List packages which have as a dependency' + @echo ' -show-recursive-depends' + @echo ' - Recursively list packages on which depends' + @echo ' -show-recursive-rdepends' + @echo ' - Recursively list packages which have as a dependency' + @echo ' -graph-depends - Generate a graph of '\''s dependencies' + @echo ' -graph-rdepends - Generate a graph of '\''s reverse dependencies' + @echo ' -dirclean - Remove build directory' + @echo ' -reconfigure - Restart the build from the configure step' + @echo ' -rebuild - Restart the build from the build step' + $(foreach p,$(HELP_PACKAGES), \ + @echo $(sep) \ + @echo '$($(p)_NAME):' $(sep) \ + $($(p)_HELP_CMDS)$(sep)) @echo @echo 'Documentation:' @echo ' manual - build manual in all formats' @@ -892,30 +1140,53 @@ endif @echo ' manual-epub - build manual in ePub' @echo ' graph-build - generate graphs of the build times' @echo ' graph-depends - generate graph of the dependency tree' + @echo ' graph-size - generate stats of the filesystem size' + @echo ' list-defconfigs - list all defconfigs (pre-configured minimal systems)' @echo @echo 'Miscellaneous:' @echo ' source - download all sources needed for offline-build' - @echo ' source-check - check selected packages for valid download URLs' @echo ' external-deps - list external packages used' @echo ' legal-info - generate info about license compliance' + @echo ' show-info - generate info about packages, as a JSON blurb' + @echo ' printvars - dump internal variables selected with VARS=...' @echo @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir - Locate all output files in "dir", including .config' - @echo - @echo 'Built-in configs:' - @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \ - printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) -ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),) - @echo - @echo 'User-provided configs:' - @$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \ - printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) -endif @echo @echo 'For further details, see README, generate the Buildroot manual, or consult' @echo 'it on-line at http://buildroot.org/docs.html' @echo +# List the defconfig files +# $(1): base directory +# $(2): br2-external name, empty for bundled +define list-defconfigs + @first=true; \ + for defconfig in $(1)/configs/*_defconfig; do \ + [ -f "$${defconfig}" ] || continue; \ + if $${first}; then \ + if [ "$(2)" ]; then \ + printf 'External configs in "$(call qstrip,$(2))":\n'; \ + else \ + printf "Built-in configs:\n"; \ + fi; \ + first=false; \ + fi; \ + defconfig="$${defconfig##*/}"; \ + printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \ + done; \ + $${first} || printf "\n" +endef + +# We iterate over BR2_EXTERNAL_NAMES rather than BR2_EXTERNAL_DIRS, +# because we want to display the name of the br2-external tree. +.PHONY: list-defconfigs +list-defconfigs: + $(call list-defconfigs,$(TOPDIR)) + $(foreach name,$(BR2_EXTERNAL_NAMES),\ + $(call list-defconfigs,$(BR2_EXTERNAL_$(name)_PATH),\ + $(BR2_EXTERNAL_$(name)_DESC))$(sep)) + release: OUT = buildroot-$(BR2_VERSION) # Create release tarballs. We need to fiddle a bit to add the generated @@ -923,6 +1194,7 @@ release: OUT = buildroot-$(BR2_VERSION) release: git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar $(MAKE) O=$(OUT) manual-html manual-text manual-pdf + $(MAKE) O=$(OUT) distclean tar rf $(OUT).tar $(OUT) gzip -9 -c < $(OUT).tar > $(OUT).tar.gz bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2 @@ -931,7 +1203,13 @@ release: print-version: @echo $(BR2_VERSION_FULL) +check-package: + find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \ + -exec ./utils/check-package {} + + include docs/manual/manual.mk --include $(BR2_EXTERNAL)/docs/*/*.mk +-include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk))) .PHONY: $(noconfig_targets) + +endif #umask / $(CURDIR) / $(O) diff --git a/buildroot/Makefile.legacy b/buildroot/Makefile.legacy index 764cfcd11..800c08926 100644 --- a/buildroot/Makefile.legacy +++ b/buildroot/Makefile.legacy @@ -4,9 +4,6 @@ # This file contains placeholders to detect backward-compatibility problems. # When a buildroot "API" feature is being deprecated, a rule should be added # here that issues an error when the old feature is used. -# -# This file is not included if BR2_DEPRECATED is selected, so it is possible -# to bypass the errors (although that's usually a bad idea). ifeq ($(BR2_LEGACY),y) $(error "You have legacy configuration in your .config! Please check your configuration.") diff --git a/buildroot/README b/buildroot/README index 944347dd6..c6172524d 100644 --- a/buildroot/README +++ b/buildroot/README @@ -1,59 +1,26 @@ +Buildroot is a simple, efficient and easy-to-use tool to generate embedded +Linux systems through cross-compilation. + +The documentation can be found in docs/manual. You can generate a text +document with 'make manual-text' and read output/docs/manual/manual.text. +Online documentation can be found at http://buildroot.org/docs.html + To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' -2) select the packages you wish to compile +2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles -5) Use your shiny new root filesystem. Depending on which sort of - root filesystem you selected, you may want to loop mount it, - chroot into it, nfs mount it on your target device, burn it - to flash, or whatever is appropriate for your target system. +5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! -Offline build: -============== - -In order to do an offline-build (not connected to the net), fetch all -selected source by issuing a -$ make source - -before you disconnect. -If your build-host is never connected, then you have to copy buildroot -and your toplevel .config to a machine that has an internet-connection -and issue "make source" there, then copy the content of your dl/ dir to -the build-host. - -Building out-of-tree: -===================== - -Buildroot supports building out of tree with a syntax similar -to the Linux kernel. To use it, add O= to the -make command line, E.G.: - -$ make O=/tmp/build - -And all the output files (including .config) will be located under /tmp/build. - -More finegrained configuration: -=============================== - -You can specify a config-file for uClibc: -$ make UCLIBC_CONFIG_FILE=/my/uClibc.config - -And you can specify a config-file for busybox: -$ make BUSYBOX_CONFIG_FILE=/my/busybox.config - -To use a non-standard host-compiler (if you do not have 'gcc'), -make sure that the compiler is in your PATH and that the library paths are -setup properly, if your compiler is built dynamically: -$ make HOSTCC=gcc-4.3.orig HOSTCXX=gcc-4.3-mine - -Depending on your configuration, there are some targets you can use to -use menuconfig of certain packages. This includes: -$ make HOSTCC=gcc-4.3 linux-menuconfig -$ make HOSTCC=gcc-4.3 uclibc-menuconfig -$ make HOSTCC=gcc-4.3 busybox-menuconfig +Buildroot comes with a basic configuration for a number of boards. Run +'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org +You can also find us on #buildroot on Freenode IRC. + +If you would like to contribute patches, please read +https://buildroot.org/manual.html#submitting-patches diff --git a/buildroot/arch/Config.in b/buildroot/arch/Config.in index 890e7e2d4..0707c076e 100644 --- a/buildroot/arch/Config.in +++ b/buildroot/arch/Config.in @@ -9,6 +9,12 @@ config BR2_KERNEL_64_USERLAND_32 config BR2_SOFT_FLOAT bool +config BR2_ARCH_HAS_MMU_MANDATORY + bool + +config BR2_ARCH_HAS_MMU_OPTIONAL + bool + choice prompt "Target Architecture" default BR2_i386 @@ -17,184 +23,237 @@ choice config BR2_arcle bool "ARC (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs - that can be used from deeply embedded to high performance host - applications. Little endian. + Synopsys' DesignWare ARC Processor Cores are a family of + 32-bit CPUs that can be used from deeply embedded to high + performance host applications. Little endian. config BR2_arceb bool "ARC (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs - that can be used from deeply embedded to high performance host - applications. Big endian. + Synopsys' DesignWare ARC Processor Cores are a family of + 32-bit CPUs that can be used from deeply embedded to high + performance host applications. Big endian. config BR2_arm bool "ARM (little endian)" + # MMU support is set by the subarchitecture file, arch/Config.in.arm help - ARM is a 32-bit reduced instruction set computer (RISC) instruction - set architecture (ISA) developed by ARM Holdings. Little endian. + ARM is a 32-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by ARM Holdings. + Little endian. http://www.arm.com/ http://en.wikipedia.org/wiki/ARM config BR2_armeb bool "ARM (big endian)" + # MMU support is set by the subarchitecture file, arch/Config.in.arm help - ARM is a 32-bit reduced instruction set computer (RISC) instruction - set architecture (ISA) developed by ARM Holdings. Big endian. + ARM is a 32-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by ARM Holdings. + Big endian. http://www.arm.com/ http://en.wikipedia.org/wiki/ARM config BR2_aarch64 - bool "AArch64" + bool "AArch64 (little endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + Aarch64 is a 64-bit architecture developed by ARM Holdings. + http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php + http://en.wikipedia.org/wiki/ARM + +config BR2_aarch64_be + bool "AArch64 (big endian)" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help Aarch64 is a 64-bit architecture developed by ARM Holdings. http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php http://en.wikipedia.org/wiki/ARM -config BR2_avr32 - bool "AVR32" - select BR2_SOFT_FLOAT - # This architecture is obsolete and complicated to maintain to - # do the lack of upstream support in the major toolchain - # components. If you're interested by AVR32, contact the - # Buildroot community. Otherwise, its support will be removed - # by the 2015.02 release. - depends on BR2_DEPRECATED_SINCE_2014_08 - help - The AVR32 is a 32-bit RISC microprocessor architecture designed by - Atmel. - http://www.atmel.com/ - http://en.wikipedia.org/wiki/Avr32 - -config BR2_bfin - bool "Blackfin" - help - The Blackfin is a family of 16 or 32-bit microprocessors developed, - manufactured and marketed by Analog Devices. - http://www.analog.com/ - http://en.wikipedia.org/wiki/Blackfin +config BR2_csky + bool "csky" + select BR2_ARCH_HAS_MMU_MANDATORY + # Most variants are supported by gcc-9+, except one that is + # handled as a special exception in package/gcc/Config.in.host + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 + help + csky is processor IP from china. + http://www.c-sky.com/ + http://www.github.com/c-sky config BR2_i386 bool "i386" + select BR2_ARCH_HAS_MMU_MANDATORY help Intel i386 architecture compatible microprocessor http://en.wikipedia.org/wiki/I386 config BR2_m68k bool "m68k" - depends on BROKEN # ice in uclibc / inet_ntoa_r + # MMU support is set by the subarchitecture file, arch/Config.in.m68k help Motorola 68000 family microprocessor http://en.wikipedia.org/wiki/M68k config BR2_microblazeel bool "Microblaze AXI (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - Soft processor core designed for Xilinx FPGAs from Xilinx. AXI bus - based architecture (little endian) + Soft processor core designed for Xilinx FPGAs from Xilinx. AXI + bus based architecture (little endian) http://www.xilinx.com http://en.wikipedia.org/wiki/Microblaze config BR2_microblazebe bool "Microblaze non-AXI (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - Soft processor core designed for Xilinx FPGAs from Xilinx. PLB bus - based architecture (non-AXI, big endian) + Soft processor core designed for Xilinx FPGAs from Xilinx. PLB + bus based architecture (non-AXI, big endian) http://www.xilinx.com http://en.wikipedia.org/wiki/Microblaze config BR2_mips bool "MIPS (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + MIPS is a RISC microprocessor from MIPS Technologies. Big + endian. http://www.mips.com/ http://en.wikipedia.org/wiki/MIPS_Technologies config BR2_mipsel bool "MIPS (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY help - MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + MIPS is a RISC microprocessor from MIPS Technologies. Little + endian. http://www.mips.com/ http://en.wikipedia.org/wiki/MIPS_Technologies config BR2_mips64 bool "MIPS64 (big endian)" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help - MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + MIPS is a RISC microprocessor from MIPS Technologies. Big + endian. http://www.mips.com/ http://en.wikipedia.org/wiki/MIPS_Technologies config BR2_mips64el bool "MIPS64 (little endian)" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help - MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + MIPS is a RISC microprocessor from MIPS Technologies. Little + endian. http://www.mips.com/ http://en.wikipedia.org/wiki/MIPS_Technologies +config BR2_nds32 + bool "nds32" + select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT + select BR2_ARCH_HAS_MMU_MANDATORY + help + nds32 is a 32-bit architecture developed by Andes Technology. + https://en.wikipedia.org/wiki/Andes_Technology + config BR2_nios2 bool "Nios II" + select BR2_ARCH_HAS_MMU_MANDATORY help Nios II is a soft core processor from Altera Corporation. http://www.altera.com/ http://en.wikipedia.org/wiki/Nios_II +config BR2_or1k + bool "OpenRISC" + select BR2_ARCH_HAS_MMU_MANDATORY + help + OpenRISC is a free and open processor for embedded system. + http://openrisc.io + config BR2_powerpc bool "PowerPC" + select BR2_ARCH_HAS_MMU_MANDATORY help - PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. - Big endian. + PowerPC is a RISC architecture created by Apple-IBM-Motorola + alliance. Big endian. http://www.power.org/ http://en.wikipedia.org/wiki/Powerpc config BR2_powerpc64 bool "PowerPC64 (big endian)" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help - PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. - Big endian. + PowerPC is a RISC architecture created by Apple-IBM-Motorola + alliance. Big endian. http://www.power.org/ http://en.wikipedia.org/wiki/Powerpc config BR2_powerpc64le bool "PowerPC64 (little endian)" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help - PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. - Little endian. + PowerPC is a RISC architecture created by Apple-IBM-Motorola + alliance. Little endian. http://www.power.org/ http://en.wikipedia.org/wiki/Powerpc -config BR2_sh - bool "SuperH" +config BR2_riscv + bool "RISCV" + select BR2_ARCH_HAS_MMU_MANDATORY + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 help - SuperH (or SH) is a 32-bit reduced instruction set computer (RISC) - instruction set architecture (ISA) developed by Hitachi. - http://www.hitachi.com/ - http://en.wikipedia.org/wiki/SuperH + RISC-V is an open, free Instruction Set Architecture created + by the UC Berkeley Architecture Research group and supported + and promoted by RISC-V Foundation. + https://riscv.org/ + https://en.wikipedia.org/wiki/RISC-V -config BR2_sh64 - bool "SuperH64" +config BR2_sh + bool "SuperH" + select BR2_ARCH_HAS_MMU_OPTIONAL help - SuperH64 (or SH) is a 64-bit reduced instruction set computer (RISC) - instruction set architecture (ISA) developed by Hitachi. + SuperH (or SH) is a 32-bit reduced instruction set computer + (RISC) instruction set architecture (ISA) developed by + Hitachi. http://www.hitachi.com/ http://en.wikipedia.org/wiki/SuperH config BR2_sparc bool "SPARC" + select BR2_ARCH_HAS_MMU_MANDATORY help - SPARC (from Scalable Processor Architecture) is a RISC instruction - set architecture (ISA) developed by Sun Microsystems. + SPARC (from Scalable Processor Architecture) is a RISC + instruction set architecture (ISA) developed by Sun + Microsystems. + http://www.oracle.com/sun + http://en.wikipedia.org/wiki/Sparc + +config BR2_sparc64 + bool "SPARC64" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + SPARC (from Scalable Processor Architecture) is a RISC + instruction set architecture (ISA) developed by Sun + Microsystems. http://www.oracle.com/sun http://en.wikipedia.org/wiki/Sparc config BR2_x86_64 bool "x86_64" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY help x86-64 is an extension of the x86 instruction set (Intel i386 architecture compatible microprocessor). @@ -202,6 +261,7 @@ config BR2_x86_64 config BR2_xtensa bool "Xtensa" + # MMU support is set by the subarchitecture file, arch/Config.in.xtensa help Xtensa is a Tensilica processor IP architecture. http://en.wikipedia.org/wiki/Xtensa @@ -209,6 +269,49 @@ config BR2_xtensa endchoice +# For some architectures or specific cores, our internal toolchain +# backend is not suitable (like, missing support in upstream gcc, or +# no ChipCo fork exists...) +config BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT + bool + +config BR2_ARCH_HAS_TOOLCHAIN_BUILDROOT + bool + default y if !BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT + +# The following symbols are selected by the individual +# Config.in.$ARCH files +config BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8 + bool + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_6 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_8 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_9 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_8 + +config BR2_ARCH_NEEDS_GCC_AT_LEAST_10 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 + # The following string values are defined by the individual # Config.in.$ARCH files config BR2_ARCH @@ -223,10 +326,13 @@ config BR2_GCC_TARGET_ARCH config BR2_GCC_TARGET_ABI string -config BR2_GCC_TARGET_CPU +config BR2_GCC_TARGET_NAN + string + +config BR2_GCC_TARGET_FP32_MODE string -config BR2_GCC_TARGET_CPU_REVISION +config BR2_GCC_TARGET_CPU string # The value of this option will be passed as --with-fpu= when @@ -247,70 +353,61 @@ config BR2_GCC_TARGET_FLOAT_ABI config BR2_GCC_TARGET_MODE string -# If the architecture has atomic operations, select this: -config BR2_ARCH_HAS_ATOMICS - bool - # Must be selected by binary formats that support shared libraries. config BR2_BINFMT_SUPPORTS_SHARED bool +# Must match the name of the architecture from readelf point of view, +# i.e the "Machine:" field of readelf output. See get_machine_name() +# in binutils/readelf.c for the list of possible values. +config BR2_READELF_ARCH_NAME + string + # Set up target binary format choice prompt "Target Binary Format" - default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k) - default BR2_BINFMT_FDPIC if BR2_bfin - default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_ELF if BR2_USE_MMU + default BR2_BINFMT_FLAT config BR2_BINFMT_ELF bool "ELF" - depends on !BR2_bfin && !BR2_m68k + depends on BR2_USE_MMU select BR2_BINFMT_SUPPORTS_SHARED help - ELF (Executable and Linkable Format) is a format for libraries and - executables used across different architectures and operating - systems. - -config BR2_BINFMT_FDPIC - bool "FDPIC" - depends on BR2_bfin - select BR2_BINFMT_SUPPORTS_SHARED - help - ELF FDPIC binaries are based on ELF, but allow the individual load - segments of a binary to be located in memory independently of each - other. This makes this format ideal for use in environments where no - MMU is available. + ELF (Executable and Linkable Format) is a format for libraries + and executables used across different architectures and + operating systems. config BR2_BINFMT_FLAT bool "FLAT" - depends on BR2_bfin || BR2_m68k + depends on !BR2_USE_MMU help - FLAT binary is a relatively simple and lightweight executable format - based on the original a.out format. It is widely used in environment - where no MMU is available. + FLAT binary is a relatively simple and lightweight executable + format based on the original a.out format. It is widely used + in environment where no MMU is available. endchoice # Set up flat binary type choice prompt "FLAT Binary type" - depends on BR2_BINFMT_FLAT default BR2_BINFMT_FLAT_ONE + depends on BR2_BINFMT_FLAT config BR2_BINFMT_FLAT_ONE bool "One memory region" help All segments are linked into one memory region. -config BR2_BINFMT_FLAT_SEP_DATA - bool "Separate data and code region" - help - Allow for the data and text segments to be separated and placed in - different regions of memory. - config BR2_BINFMT_FLAT_SHARED bool "Shared binary" - select BR2_BINFMT_SUPPORTS_SHARED + depends on BR2_m68k + # Even though this really generates shared binaries, there is no libdl + # and dlopen() cannot be used. So packages that require shared + # libraries cannot be built. Therefore, we don't select + # BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS. + # Although this adds -static to the compilation, that's not a problem + # because the -mid-shared-library option overrides it. help Allow to load and link indiviual FLAT binaries at run time. @@ -320,20 +417,12 @@ if BR2_arcle || BR2_arceb source "arch/Config.in.arc" endif -if BR2_arm || BR2_armeb +if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_aarch64_be source "arch/Config.in.arm" endif -if BR2_aarch64 -source "arch/Config.in.aarch64" -endif - -if BR2_avr32 -source "arch/Config.in.avr32" -endif - -if BR2_bfin -source "arch/Config.in.bfin" +if BR2_csky +source "arch/Config.in.csky" endif if BR2_m68k @@ -348,19 +437,31 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el source "arch/Config.in.mips" endif +if BR2_nds32 +source "arch/Config.in.nds32" +endif + if BR2_nios2 source "arch/Config.in.nios2" endif +if BR2_or1k +source "arch/Config.in.or1k" +endif + if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le source "arch/Config.in.powerpc" endif -if BR2_sh || BR2_sh64 +if BR2_riscv +source "arch/Config.in.riscv" +endif + +if BR2_sh source "arch/Config.in.sh" endif -if BR2_sparc +if BR2_sparc || BR2_sparc64 source "arch/Config.in.sparc" endif diff --git a/buildroot/arch/Config.in.aarch64 b/buildroot/arch/Config.in.aarch64 deleted file mode 100644 index 2e79870b3..000000000 --- a/buildroot/arch/Config.in.aarch64 +++ /dev/null @@ -1,8 +0,0 @@ -config BR2_ARCH - default "aarch64" if BR2_aarch64 - -config BR2_ENDIAN - default "LITTLE" - -config BR2_ARCH_HAS_ATOMICS - default y diff --git a/buildroot/arch/Config.in.arc b/buildroot/arch/Config.in.arc index b48a90ff0..fdfafda31 100644 --- a/buildroot/arch/Config.in.arc +++ b/buildroot/arch/Config.in.arc @@ -1,7 +1,7 @@ choice prompt "Target CPU" - depends on BR2_arc default BR2_arc770d + depends on BR2_arc help Specific CPU to use @@ -13,16 +13,43 @@ config BR2_arc770d config BR2_archs38 bool "ARC HS38" + help + Generic ARC HS capable of running Linux, i.e. with MMU, + caches and 32-bit multiplier. Also it corresponds to the + default configuration in older GNU toolchain versions. + +config BR2_archs38_64mpy + bool "ARC HS38 with 64-bit mpy" + help + Fully featured ARC HS capable of running Linux, i.e. with + MMU, caches and 64-bit multiplier. + + If you're not sure which version of ARC HS core you build + for use this one. + +config BR2_archs38_full + bool "ARC HS38 with Quad MAC & FPU" + help + Fully featured ARC HS with additional support for + - Dual- and quad multiply and MC oprations + - Double-precision FPU + + It corresponds to "hs38_slc_full" ARC HS template in + ARChitect. + +config BR2_archs4x_rel31 + bool "ARC HS48 rel 31" + help + Latest release of HS48 processor + - Dual- and quad multiply and MC oprations + - Double-precision FPU endchoice # Choice of atomic instructions presence config BR2_ARC_ATOMIC_EXT bool "Atomic extension (LLOCK/SCOND instructions)" - default y if BR2_arc770d || BR2_archs38 - -config BR2_ARCH_HAS_ATOMICS - default y if BR2_ARC_ATOMIC_EXT + default y if BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 config BR2_ARCH default "arc" if BR2_arcle @@ -40,3 +67,51 @@ config BR2_GCC_TARGET_CPU default "arc700" if BR2_arc750d default "arc700" if BR2_arc770d default "archs" if BR2_archs38 + default "hs38" if BR2_archs38_64mpy + default "hs38_linux" if BR2_archs38_full + default "hs4x_rel31" if BR2_archs4x_rel31 + +config BR2_READELF_ARCH_NAME + default "ARCompact" if BR2_arc750d || BR2_arc770d + default "ARCv2" if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + +choice + prompt "MMU Page Size" + default BR2_ARC_PAGE_SIZE_8K + help + MMU starting from version 3 (found in ARC 770) and now + version 4 (found in ARC HS38) allows the selection of the + page size during ASIC design creation. + + The following options are available for MMU v3 and v4: 4kB, + 8kB and 16 kB. + + The default is 8 kB (that really matches the only page size + in MMU v2). It is important to build a toolchain with page + size matching the hardware configuration. Otherwise + user-space applications will fail at runtime. + +config BR2_ARC_PAGE_SIZE_4K + bool "4KB" + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + +config BR2_ARC_PAGE_SIZE_8K + bool "8KB" + help + This is the one and only option available for MMUv2 and + default value for MMU v3 and v4. + +config BR2_ARC_PAGE_SIZE_16K + bool "16KB" + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + +endchoice + +config BR2_ARC_PAGE_SIZE + string + default "4K" if BR2_ARC_PAGE_SIZE_4K + default "8K" if BR2_ARC_PAGE_SIZE_8K + default "16K" if BR2_ARC_PAGE_SIZE_16K + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.arm b/buildroot/arch/Config.in.arm index 162191bef..4c0910e4f 100644 --- a/buildroot/arch/Config.in.arm +++ b/buildroot/arch/Config.in.arm @@ -6,12 +6,21 @@ config BR2_ARM_CPU_HAS_NEON config BR2_ARM_CPU_MAYBE_HAS_NEON bool +# For some cores, the FPU is optional +config BR2_ARM_CPU_MAYBE_HAS_FPU + bool + +config BR2_ARM_CPU_HAS_FPU + bool + # for some cores, VFPv2 is optional config BR2_ARM_CPU_MAYBE_HAS_VFPV2 bool + select BR2_ARM_CPU_MAYBE_HAS_FPU config BR2_ARM_CPU_HAS_VFPV2 bool + select BR2_ARM_CPU_HAS_FPU # for some cores, VFPv3 is optional config BR2_ARM_CPU_MAYBE_HAS_VFPV3 @@ -31,6 +40,31 @@ config BR2_ARM_CPU_HAS_VFPV4 bool select BR2_ARM_CPU_HAS_VFPV3 +# FPv4 is always optional +config BR2_ARM_CPU_MAYBE_HAS_FPV4 + bool + select BR2_ARM_CPU_MAYBE_HAS_FPU + +config BR2_ARM_CPU_HAS_FPV4 + bool + select BR2_ARM_CPU_HAS_FPU + +# FPv5 is always optional +config BR2_ARM_CPU_MAYBE_HAS_FPV5 + bool + select BR2_ARM_CPU_MAYBE_HAS_FPV4 + +config BR2_ARM_CPU_HAS_FPV5 + bool + select BR2_ARM_CPU_HAS_FPV4 + +config BR2_ARM_CPU_HAS_FP_ARMV8 + bool + select BR2_ARM_CPU_HAS_VFPV4 + +config BR2_ARM_CPU_HAS_ARM + bool + config BR2_ARM_CPU_HAS_THUMB bool @@ -49,99 +83,489 @@ config BR2_ARM_CPU_ARMV6 config BR2_ARM_CPU_ARMV7A bool +config BR2_ARM_CPU_ARMV7M + bool + +config BR2_ARM_CPU_ARMV8A + bool + choice prompt "Target Architecture Variant" - depends on BR2_arm || BR2_armeb + default BR2_cortex_a53 if BR2_ARCH_IS_64 default BR2_arm926t help Specific CPU variant to use +if !BR2_ARCH_IS_64 +comment "armv4 cores" config BR2_arm920t bool "arm920t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_arm922t bool "arm922t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_fa526 + bool "fa526/626" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_strongarm + bool "strongarm sa110/sa1100" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL + +comment "armv5 cores" config BR2_arm926t bool "arm926t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_iwmmxt + bool "iwmmxt" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_xscale + bool "xscale" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL + +comment "armv6 cores" +config BR2_arm1136j_s + bool "arm1136j-s" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_arm1136jf_s bool "arm1136jf-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_arm1176jz_s bool "arm1176jz-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_arm1176jzf_s bool "arm1176jzf-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm11mpcore + bool "mpcore" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_MAYBE_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL + +comment "armv7a cores" config BR2_cortex_a5 bool "cortex-A5" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_NEON select BR2_ARM_CPU_MAYBE_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_cortex_a7 bool "cortex-A7" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_cortex_a8 bool "cortex-A8" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV3 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_cortex_a9 bool "cortex-A9" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_NEON select BR2_ARM_CPU_MAYBE_HAS_VFPV3 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_cortex_a12 bool "cortex-A12" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL config BR2_cortex_a15 bool "cortex-A15" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A -config BR2_fa526 - bool "fa526/626" - select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a15_a7 + bool "cortex-A15/A7 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 +config BR2_cortex_a17 + bool "cortex-A17" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_cortex_a17_a7 + bool "cortex-A17/A7 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 config BR2_pj4 bool "pj4" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV3 select BR2_ARM_CPU_ARMV7A -config BR2_strongarm - bool "strongarm sa110/sa1100" - select BR2_ARM_CPU_ARMV4 -config BR2_xscale - bool "xscale" - select BR2_ARM_CPU_HAS_THUMB - select BR2_ARM_CPU_ARMV5 -config BR2_iwmmxt - bool "iwmmxt" - select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL + +comment "armv7m cores" +config BR2_cortex_m3 + bool "cortex-M3" + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7M +config BR2_cortex_m4 + bool "cortex-M4" + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_MAYBE_HAS_FPV4 + select BR2_ARM_CPU_ARMV7M +config BR2_cortex_m7 + bool "cortex-M7" + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_MAYBE_HAS_FPV5 + select BR2_ARM_CPU_ARMV7M + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +endif # !BR2_ARCH_IS_64 + +comment "armv8 cores" +config BR2_cortex_a32 + bool "cortex-A32" + depends on !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_cortex_a35 + bool "cortex-A35" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_cortex_a53 + bool "cortex-A53" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a57 + bool "cortex-A57" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a57_a53 + bool "cortex-A57/A53 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_cortex_a72 + bool "cortex-A72" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_cortex_a72_a53 + bool "cortex-A72/A53 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_cortex_a73 + bool "cortex-A73" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_cortex_a73_a35 + bool "cortex-A73/A35 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_cortex_a73_a53 + bool "cortex-A73/A53 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_emag + bool "emag" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 +config BR2_exynos_m1 + bool "exynos-m1" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_falkor + bool "falkor" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_phecda + bool "phecda" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 +config BR2_qdf24xx + bool "qdf24xx" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_thunderx + bool "thunderx (aka octeontx)" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_thunderxt81 + bool "thunderxt81 (aka octeontx81)" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_thunderxt83 + bool "thunderxt83 (aka octeontx83)" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_thunderxt88 + bool "thunderxt88" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_thunderxt88p1 + bool "thunderxt88p1" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_xgene1 + bool "xgene1" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + +comment "armv8.1a cores" +config BR2_thunderx2t99 + bool "thunderx2t99" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_thunderx2t99p1 + bool "thunderx2t99p1" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 +config BR2_vulcan + bool "vulcan" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + +comment "armv8.2a cores" +config BR2_cortex_a55 + bool "cortex-A55" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_8 +config BR2_cortex_a75 + bool "cortex-A75" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_8 +config BR2_cortex_a75_a55 + bool "cortex-A75/A55 big.LITTLE" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_8 +config BR2_cortex_a76 + bool "cortex-A76" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 +config BR2_cortex_a76_a55 + bool "cortex-A76/A55 big.LITTLE" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 +config BR2_neoverse_n1 + bool "neoverse-N1 (aka ares)" + select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 +config BR2_tsv110 + bool "tsv110" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_9 + +comment "armv8.4a cores" +config BR2_saphira + bool "saphira" + depends on BR2_ARCH_IS_64 + select BR2_ARM_CPU_HAS_FP_ARMV8 + select BR2_ARM_CPU_ARMV8A + select BR2_ARCH_HAS_MMU_OPTIONAL + select BR2_ARCH_NEEDS_GCC_AT_LEAST_8 endchoice +config BR2_ARM_ENABLE_NEON + bool "Enable NEON SIMD extension support" + depends on BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_HAS_NEON + help + For some CPU cores, the NEON SIMD extension is optional. + Select this option if you are certain your particular + implementation has NEON support and you want to use it. + +config BR2_ARM_ENABLE_VFP + bool "Enable VFP extension support" + depends on BR2_ARM_CPU_MAYBE_HAS_FPU + select BR2_ARM_CPU_HAS_FPV5 if BR2_ARM_CPU_MAYBE_HAS_FPV5 + select BR2_ARM_CPU_HAS_FPV4 if BR2_ARM_CPU_MAYBE_HAS_FPV4 + select BR2_ARM_CPU_HAS_VFPV4 if BR2_ARM_CPU_MAYBE_HAS_VFPV4 + select BR2_ARM_CPU_HAS_VFPV3 if BR2_ARM_CPU_MAYBE_HAS_VFPV3 + select BR2_ARM_CPU_HAS_VFPV2 if BR2_ARM_CPU_MAYBE_HAS_VFPV2 + help + For some CPU cores, the VFP extension is optional. Select + this option if you are certain your particular + implementation has VFP support and you want to use it. + choice prompt "Target ABI" - depends on BR2_arm || BR2_armeb + default BR2_ARM_EABIHF if BR2_ARM_CPU_HAS_FPU default BR2_ARM_EABI + depends on BR2_arm || BR2_armeb help Application Binary Interface to use. The Application Binary Interface describes the calling conventions (how arguments @@ -174,7 +598,7 @@ config BR2_ARM_EABI config BR2_ARM_EABIHF bool "EABIhf" - depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 || BR2_ARM_CPU_HAS_VFPV2 + depends on BR2_ARM_CPU_HAS_FPU help The EABIhf is an extension of EABI which supports the 'hard' floating point model. This model uses the floating point @@ -192,22 +616,15 @@ config BR2_ARM_EABIHF endchoice -config BR2_ARM_ENABLE_NEON - bool "Enable NEON SIMD extension support" - depends on BR2_ARM_CPU_MAYBE_HAS_NEON - select BR2_ARM_CPU_HAS_NEON - help - For some CPU cores, the NEON SIMD extension is optional. - Select this option if you are certain your particular - implementation has NEON support and you want to use it. - choice prompt "Floating point strategy" - depends on BR2_ARM_EABI || BR2_ARM_EABIHF + default BR2_ARM_FPU_FP_ARMV8 if BR2_ARM_CPU_HAS_FP_ARMV8 + default BR2_ARM_FPU_FPV5D16 if BR2_ARM_CPU_HAS_FPV5 + default BR2_ARM_FPU_FPV4D16 if BR2_ARM_CPU_HAS_FPV4 default BR2_ARM_FPU_VFPV4D16 if BR2_ARM_CPU_HAS_VFPV4 default BR2_ARM_FPU_VFPV3D16 if BR2_ARM_CPU_HAS_VFPV3 default BR2_ARM_FPU_VFPV2 if BR2_ARM_CPU_HAS_VFPV2 - default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_VFPV2 + default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_FPU config BR2_ARM_SOFT_FLOAT bool "Soft float" @@ -221,7 +638,7 @@ config BR2_ARM_SOFT_FLOAT config BR2_ARM_FPU_VFPV2 bool "VFPv2" - depends on BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_MAYBE_HAS_VFPV2 + depends on BR2_ARM_CPU_HAS_VFPV2 help This option allows to use the VFPv2 floating point unit, as available in some ARMv5 processors (ARM926EJ-S) and some @@ -234,7 +651,7 @@ config BR2_ARM_FPU_VFPV2 config BR2_ARM_FPU_VFPV3 bool "VFPv3" - depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + depends on BR2_ARM_CPU_HAS_VFPV3 help This option allows to use the VFPv3 floating point unit, as available in some ARMv7 processors (Cortex-A{8, 9}). This @@ -250,7 +667,7 @@ config BR2_ARM_FPU_VFPV3 config BR2_ARM_FPU_VFPV3D16 bool "VFPv3-D16" - depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + depends on BR2_ARM_CPU_HAS_VFPV3 help This option allows to use the VFPv3 floating point unit, as available in some ARMv7 processors (Cortex-A{8, 9}). This @@ -265,7 +682,7 @@ config BR2_ARM_FPU_VFPV3D16 config BR2_ARM_FPU_VFPV4 bool "VFPv4" - depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + depends on BR2_ARM_CPU_HAS_VFPV4 help This option allows to use the VFPv4 floating point unit, as available in some ARMv7 processors (Cortex-A{5, 7, 12, @@ -280,7 +697,7 @@ config BR2_ARM_FPU_VFPV4 config BR2_ARM_FPU_VFPV4D16 bool "VFPv4-D16" - depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + depends on BR2_ARM_CPU_HAS_VFPV4 help This option allows to use the VFPv4 floating point unit, as available in some ARMv7 processors (Cortex-A{5, 7, 12, @@ -305,7 +722,7 @@ config BR2_ARM_FPU_NEON config BR2_ARM_FPU_NEON_VFPV4 bool "NEON/VFPv4" - depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + depends on BR2_ARM_CPU_HAS_VFPV4 depends on BR2_ARM_CPU_HAS_NEON help This option allows to use both the VFPv4 and the NEON SIMD @@ -314,14 +731,61 @@ config BR2_ARM_FPU_NEON_VFPV4 example on Cortex-A5 and Cortex-A7, support for VFPv4 and NEON is optional. +config BR2_ARM_FPU_FPV4D16 + bool "FPv4-D16" + depends on BR2_ARM_CPU_HAS_FPV4 + help + This option allows to use the FPv4-SP (single precision) + floating point unit, as available in some ARMv7m processors + (Cortex-M4). + +config BR2_ARM_FPU_FPV5D16 + bool "FPv5-D16" + depends on BR2_ARM_CPU_HAS_FPV5 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + help + This option allows to use the FPv5-SP (single precision) + floating point unit, as available in some ARMv7m processors + (Cortex-M7). + + Note that if you want binary code that works on the earlier + Cortex-M4, you should instead select FPv4-D16. + +config BR2_ARM_FPU_FPV5DPD16 + bool "FPv5-DP-D16" + depends on BR2_ARM_CPU_HAS_FPV5 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + help + This option allows to use the FPv5-DP (double precision) + floating point unit, as available in some ARMv7m processors + (Cortex-M7). + + Note that if you want binary code that works on the earlier + Cortex-M4, you should instead select FPv4-D16. + +config BR2_ARM_FPU_FP_ARMV8 + bool "FP-ARMv8" + depends on BR2_ARM_CPU_HAS_FP_ARMV8 + help + This option allows to use the ARMv8 floating point unit. + +config BR2_ARM_FPU_NEON_FP_ARMV8 + bool "NEON/FP-ARMv8" + depends on BR2_ARM_CPU_HAS_FP_ARMV8 + depends on BR2_ARM_CPU_HAS_NEON + help + This option allows to use both the ARMv8 floating point unit + and the NEON SIMD unit for floating point operations. + endchoice choice prompt "ARM instruction set" - depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2 + depends on BR2_arm || BR2_armeb -config BR2_ARM_INSTRUCTIONS_ARM_CHOICE +config BR2_ARM_INSTRUCTIONS_ARM bool "ARM" + depends on BR2_ARM_CPU_HAS_ARM help This option instructs the compiler to generate regular ARM instructions, that are all 32 bits wide. @@ -329,12 +793,18 @@ config BR2_ARM_INSTRUCTIONS_ARM_CHOICE config BR2_ARM_INSTRUCTIONS_THUMB bool "Thumb" depends on BR2_ARM_CPU_HAS_THUMB + # Thumb-1 and VFP are not compatible + depends on BR2_ARM_SOFT_FLOAT help This option instructions the compiler to generate Thumb instructions, which allows to mix 16 bits instructions and 32 bits instructions. This generally provides a much smaller compiled binary size. +comment "Thumb1 is not compatible with VFP" + depends on BR2_ARM_CPU_HAS_THUMB + depends on !BR2_ARM_SOFT_FLOAT + config BR2_ARM_INSTRUCTIONS_THUMB2 bool "Thumb2" depends on BR2_ARM_CPU_HAS_THUMB2 @@ -346,52 +816,106 @@ config BR2_ARM_INSTRUCTIONS_THUMB2 endchoice -config BR2_ARM_INSTRUCTIONS_ARM - def_bool y - depends on !(BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2) - config BR2_ARCH - default "arm" if BR2_arm - default "armeb" if BR2_armeb + default "arm" if BR2_arm + default "armeb" if BR2_armeb + default "aarch64" if BR2_aarch64 + default "aarch64_be" if BR2_aarch64_be config BR2_ENDIAN - default "LITTLE" if BR2_arm - default "BIG" if BR2_armeb - -config BR2_ARCH_HAS_ATOMICS - default y + default "LITTLE" if (BR2_arm || BR2_aarch64) + default "BIG" if (BR2_armeb || BR2_aarch64_be) config BR2_GCC_TARGET_CPU + # armv4 default "arm920t" if BR2_arm920t default "arm922t" if BR2_arm922t + default "fa526" if BR2_fa526 + default "strongarm" if BR2_strongarm + # armv5 default "arm926ej-s" if BR2_arm926t + default "iwmmxt" if BR2_iwmmxt + default "xscale" if BR2_xscale + # armv6 default "arm1136j-s" if BR2_arm1136j_s default "arm1136jf-s" if BR2_arm1136jf_s default "arm1176jz-s" if BR2_arm1176jz_s default "arm1176jzf-s" if BR2_arm1176jzf_s + default "mpcore" if BR2_arm11mpcore && BR2_ARM_CPU_HAS_VFPV2 + default "mpcorenovfp" if BR2_arm11mpcore + # armv7a default "cortex-a5" if BR2_cortex_a5 default "cortex-a7" if BR2_cortex_a7 default "cortex-a8" if BR2_cortex_a8 default "cortex-a9" if BR2_cortex_a9 default "cortex-a12" if BR2_cortex_a12 default "cortex-a15" if BR2_cortex_a15 - default "fa526" if BR2_fa526 + default "cortex-a15.cortex-a7" if BR2_cortex_a15_a7 + default "cortex-a17" if BR2_cortex_a17 + default "cortex-a17.cortex-a7" if BR2_cortex_a17_a7 default "marvell-pj4" if BR2_pj4 - default "strongarm" if BR2_strongarm - default "xscale" if BR2_xscale - default "iwmmxt" if BR2_iwmmxt + # armv7m + default "cortex-m3" if BR2_cortex_m3 + default "cortex-m4" if BR2_cortex_m4 + default "cortex-m7" if BR2_cortex_m7 + # armv8a + default "cortex-a32" if BR2_cortex_a32 + default "cortex-a35" if BR2_cortex_a35 + default "cortex-a53" if BR2_cortex_a53 + default "cortex-a57" if BR2_cortex_a57 + default "cortex-a57.cortex-a53" if BR2_cortex_a57_a53 + default "cortex-a72" if BR2_cortex_a72 + default "cortex-a72.cortex-a53" if BR2_cortex_a72_a53 + default "cortex-a73" if BR2_cortex_a73 + default "cortex-a73.cortex-a35" if BR2_cortex_a73_a35 + default "cortex-a73.cortex-a53" if BR2_cortex_a73_a53 + default "emag" if BR2_emag + default "exynos-m1" if BR2_exynos_m1 + default "falkor" if BR2_falkor + default "phecda" if BR2_phecda + default "qdf24xx" if BR2_qdf24xx + default "thunderx" if BR2_thunderx && !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "octeontx" if BR2_thunderx && BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "thunderxt81" if BR2_thunderxt81 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "octeontx81" if BR2_thunderxt81 && BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "thunderxt83" if BR2_thunderxt83 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "octeontx83" if BR2_thunderxt83 && BR2_TOOLCHAIN_GCC_AT_LEAST_9 + default "thunderxt88" if BR2_thunderxt88 + default "thunderxt88p1" if BR2_thunderxt88p1 + default "xgene1" if BR2_xgene1 + # armv8.1a + default "thunderx2t99" if BR2_thunderx2t99 + default "thunderx2t99p1" if BR2_thunderx2t99p1 + default "vulcan" if BR2_vulcan + # armv8.2a + default "cortex-a55" if BR2_cortex_a55 + default "cortex-a75" if BR2_cortex_a75 + default "cortex-a75.cortex-a55" if BR2_cortex_a75_a55 + default "cortex-a76" if BR2_cortex_a76 + default "cortex-a76.cortex-a55" if BR2_cortex_a76_a55 + default "neoverse-n1" if BR2_neoverse_n1 + default "tsv110" if BR2_tsv110 + # armv8.4a + default "saphira" if BR2_saphira config BR2_GCC_TARGET_ABI - default "aapcs-linux" + default "aapcs-linux" if BR2_arm || BR2_armeb + default "lp64" if BR2_aarch64 || BR2_aarch64_be config BR2_GCC_TARGET_FPU default "vfp" if BR2_ARM_FPU_VFPV2 default "vfpv3" if BR2_ARM_FPU_VFPV3 - default "vfpv3-d16" if BR2_ARM_FPU_VFPV3D16 - default "vfpv4" if BR2_ARM_FPU_VFPV4 - default "vfpv4-d16" if BR2_ARM_FPU_VFPV4D16 - default "neon" if BR2_ARM_FPU_NEON - default "neon-vfpv4" if BR2_ARM_FPU_NEON_VFPV4 + default "vfpv3-d16" if BR2_ARM_FPU_VFPV3D16 + default "vfpv4" if BR2_ARM_FPU_VFPV4 + default "vfpv4-d16" if BR2_ARM_FPU_VFPV4D16 + default "neon" if BR2_ARM_FPU_NEON + default "neon-vfpv4" if BR2_ARM_FPU_NEON_VFPV4 + default "fpv4-sp-d16" if BR2_ARM_FPU_FPV4D16 + default "fpv5-sp-d16" if BR2_ARM_FPU_FPV5D16 + default "fpv5-d16" if BR2_ARM_FPU_FPV5DPD16 + default "fp-armv8" if BR2_ARM_FPU_FP_ARMV8 + default "neon-fp-armv8" if BR2_ARM_FPU_NEON_FP_ARMV8 + depends on BR2_arm || BR2_armeb config BR2_GCC_TARGET_FLOAT_ABI default "soft" if BR2_ARM_SOFT_FLOAT @@ -401,3 +925,10 @@ config BR2_GCC_TARGET_FLOAT_ABI config BR2_GCC_TARGET_MODE default "arm" if BR2_ARM_INSTRUCTIONS_ARM default "thumb" if BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2 + +config BR2_READELF_ARCH_NAME + default "ARM" if BR2_arm || BR2_armeb + default "AArch64" if BR2_aarch64 || BR2_aarch64_be + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.avr32 b/buildroot/arch/Config.in.avr32 deleted file mode 100644 index fc1f4f66f..000000000 --- a/buildroot/arch/Config.in.avr32 +++ /dev/null @@ -1,11 +0,0 @@ -config BR2_ARCH - default "avr32" - -config BR2_ENDIAN - default "BIG" - -config BR2_GCC_TARGET_ARCH - default "ap" - -config BR2_ARCH_HAS_ATOMICS - default y diff --git a/buildroot/arch/Config.in.bfin b/buildroot/arch/Config.in.bfin deleted file mode 100644 index 078396926..000000000 --- a/buildroot/arch/Config.in.bfin +++ /dev/null @@ -1,110 +0,0 @@ -choice - prompt "Target CPU" - depends on BR2_bfin - default BR2_bf609 - help - Specify target CPU -config BR2_bf606 - bool "bf606" -config BR2_bf607 - bool "bf607" -config BR2_bf608 - bool "bf608" -config BR2_bf609 - bool "bf609" -config BR2_bf512 - bool "bf512" -config BR2_bf514 - bool "bf514" -config BR2_bf516 - bool "bf516" -config BR2_bf518 - bool "bf518" -config BR2_bf522 - bool "bf522" -config BR2_bf523 - bool "bf523" -config BR2_bf524 - bool "bf524" -config BR2_bf525 - bool "bf525" -config BR2_bf526 - bool "bf526" -config BR2_bf527 - bool "bf527" -config BR2_bf531 - bool "bf531" -config BR2_bf532 - bool "bf532" -config BR2_bf533 - bool "bf533" -config BR2_bf534 - bool "bf534" -config BR2_bf536 - bool "bf536" -config BR2_bf537 - bool "bf537" -config BR2_bf538 - bool "bf538" -config BR2_bf539 - bool "bf539" -config BR2_bf542 - bool "bf542" -config BR2_bf544 - bool "bf544" -config BR2_bf547 - bool "bf547" -config BR2_bf548 - bool "bf548" -config BR2_bf549 - bool "bf549" -config BR2_bf561 - bool "bf561" -endchoice - -config BR2_ARCH - default "bfin" - -config BR2_ENDIAN - default "LITTLE" - -config BR2_ARCH_HAS_ATOMICS - default y - -config BR2_GCC_TARGET_CPU - default bf606 if BR2_bf606 - default bf607 if BR2_bf607 - default bf608 if BR2_bf608 - default bf609 if BR2_bf609 - default bf512 if BR2_bf512 - default bf514 if BR2_bf514 - default bf516 if BR2_bf516 - default bf518 if BR2_bf518 - default bf522 if BR2_bf522 - default bf523 if BR2_bf523 - default bf524 if BR2_bf524 - default bf525 if BR2_bf525 - default bf526 if BR2_bf526 - default bf527 if BR2_bf527 - default bf531 if BR2_bf531 - default bf532 if BR2_bf532 - default bf533 if BR2_bf533 - default bf534 if BR2_bf534 - default bf536 if BR2_bf536 - default bf537 if BR2_bf537 - default bf538 if BR2_bf538 - default bf539 if BR2_bf539 - default bf542 if BR2_bf542 - default bf544 if BR2_bf544 - default bf547 if BR2_bf547 - default bf548 if BR2_bf548 - default bf549 if BR2_bf549 - default bf561 if BR2_bf561 - -config BR2_GCC_TARGET_CPU_REVISION - string "Target CPU revision" - help - Specify a target CPU revision, which will be appended to the - value of the -mcpu option. For example, if the selected CPU is - bf609, and then selected CPU revision is "0.0", then gcc will - receive the -mcpu=bf609-0.0 option. diff --git a/buildroot/arch/Config.in.csky b/buildroot/arch/Config.in.csky new file mode 100644 index 000000000..7e2029f75 --- /dev/null +++ b/buildroot/arch/Config.in.csky @@ -0,0 +1,49 @@ +choice + prompt "Target Architecture Variant" + default BR2_ck610 + help + Specific CPU variant to use + +config BR2_ck610 + # Not supported by upstream gcc <= 9, and handled as a special + # exception in package/gcc/Config.in.host + bool "ck610" + +config BR2_ck807 + bool "ck807" + +config BR2_ck810 + bool "ck810" + +config BR2_ck860 + bool "ck860" + +endchoice + +config BR2_CSKY_FPU + bool "Enable FPU coprocessor" + depends on BR2_ck810 || BR2_ck807 || BR2_ck860 + help + You can say N here if your C-SKY CPU doesn't have a + Floating-Point Coprocessor or if you don't need FPU support + for your user-space programs. + +config BR2_CSKY_VDSP + bool "Enable VDSP enhanced instructions Co-processor" + depends on BR2_CSKY_FPU + +config BR2_GCC_TARGET_FLOAT_ABI + default "soft" if !BR2_CSKY_FPU + default "hard" if BR2_CSKY_FPU + +config BR2_ARCH + default "csky" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_READELF_ARCH_NAME + default "CSKY" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.m68k b/buildroot/arch/Config.in.m68k index 6b868a167..275f47f1d 100644 --- a/buildroot/arch/Config.in.m68k +++ b/buildroot/arch/Config.in.m68k @@ -4,13 +4,40 @@ config BR2_ARCH config BR2_ENDIAN default "BIG" -config BR2_ARCH_HAS_ATOMICS - default y - -config BR2_GCC_TARGET_ARCH - default "68000" if BR2_m68k_68000 - default "68010" if BR2_m68k_68010 - default "68020" if BR2_m68k_68020 - default "68030" if BR2_m68k_68030 +# symbols used to distinguish between m68k and coldfire +# for gcc multilib +config BR2_m68k_m68k + bool + +config BR2_m68k_cf + bool + +# coldfire variants will be added later +choice + prompt "Target CPU" + default BR2_m68k_68040 + depends on BR2_m68k + help + Specific CPU variant to use + +config BR2_m68k_68040 + bool "68040" + select BR2_m68k_m68k + select BR2_ARCH_HAS_MMU_MANDATORY + +config BR2_m68k_cf5208 + bool "5208" + select BR2_m68k_cf + select BR2_SOFT_FLOAT + +endchoice + +config BR2_GCC_TARGET_CPU default "68040" if BR2_m68k_68040 - default "68060" if BR2_m68k_68060 + default "5208" if BR2_m68k_cf5208 + +config BR2_READELF_ARCH_NAME + default "MC68000" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.microblaze b/buildroot/arch/Config.in.microblaze index 7c21dfca8..5fe2906d4 100644 --- a/buildroot/arch/Config.in.microblaze +++ b/buildroot/arch/Config.in.microblaze @@ -6,9 +6,12 @@ config BR2_ENDIAN default "LITTLE" if BR2_microblazeel default "BIG" if BR2_microblazebe +config BR2_READELF_ARCH_NAME + default "Xilinx MicroBlaze" + config BR2_microblaze bool default y if BR2_microblazeel || BR2_microblazebe -config BR2_ARCH_HAS_ATOMICS - default y +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.mips b/buildroot/arch/Config.in.mips index 7630503ed..619456c2d 100644 --- a/buildroot/arch/Config.in.mips +++ b/buildroot/arch/Config.in.mips @@ -1,33 +1,152 @@ +# mips default CPU ISAs +config BR2_MIPS_CPU_MIPS32 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS32R2 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS32R3 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS32R5 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_MIPS_CPU_MIPS32R6 + bool + select BR2_MIPS_NAN_2008 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_MIPS_CPU_MIPS64 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS64R2 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS64R3 + bool + select BR2_MIPS_NAN_LEGACY +config BR2_MIPS_CPU_MIPS64R5 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 +config BR2_MIPS_CPU_MIPS64R6 + bool + select BR2_MIPS_NAN_2008 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + choice prompt "Target Architecture Variant" - depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el default BR2_mips_32 if BR2_mips || BR2_mipsel default BR2_mips_64 if BR2_mips64 || BR2_mips64el + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el help Specific CPU variant to use - 64bit cabable: 3, 4, 64, 64r2 - non-64bit capable: 1, 2, 32, 32r2 + 64bit capable: 64, 64r2, 64r3, 64r5, 64r6 + non-64bit capable: 32, 32r2, 32r3, 32r5, 32r6 config BR2_mips_32 - bool "mips 32" + bool "Generic MIPS32" depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32 config BR2_mips_32r2 - bool "mips 32r2" + bool "Generic MIPS32R2" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R2 +config BR2_mips_32r3 + bool "Generic MIPS32R3" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R3 +config BR2_mips_32r5 + bool "Generic MIPS32R5" depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R5 +config BR2_mips_32r6 + bool "Generic MIPS32R6" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R6 +config BR2_mips_interaptiv + bool "interAptiv" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R2 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_mips_m5150 + bool "M5150" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R5 + select BR2_MIPS_NAN_2008 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_mips_m6250 + bool "M6250" + depends on !BR2_ARCH_IS_64 + select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT + select BR2_MIPS_CPU_MIPS32R6 +config BR2_mips_p5600 + bool "P5600" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R5 + select BR2_MIPS_NAN_2008 +config BR2_mips_xburst + bool "XBurst" + depends on !BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS32R2 + help + The Ingenic XBurst is a MIPS32R2 microprocessor. It has a + bug in the FPU that can generate incorrect results in + certain cases. The problem shows up when you have several + fused madd instructions in sequence with dependant + operands. This requires the -mno-fused-madd compiler option + to be used in order to prevent emitting these instructions. + + See http://www.ingenic.com/en/?xburst.html config BR2_mips_64 - bool "mips 64" + bool "Generic MIPS64" depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64 config BR2_mips_64r2 - bool "mips 64r2" + bool "Generic MIPS64R2" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R2 +config BR2_mips_64r3 + bool "Generic MIPS64R3" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R3 +config BR2_mips_64r5 + bool "Generic MIPS64R5" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R5 +config BR2_mips_64r6 + bool "Generic MIPS64R6" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R6 +config BR2_mips_i6400 + bool "I6400" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R6 + select BR2_ARCH_NEEDS_GCC_AT_LEAST_6 +config BR2_mips_octeon2 + bool "Octeon II" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R2 + help + Marvell (formerly Cavium Networks) Octeon II CN60XX + processors. +config BR2_mips_octeon3 + bool "Octeon III" + depends on BR2_ARCH_IS_64 + select BR2_MIPS_CPU_MIPS64R3 + help + Marvell (formerly Cavium Networks) Octeon III CN7XXX + processors. +config BR2_mips_p6600 + bool "P6600" depends on BR2_ARCH_IS_64 + select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT + select BR2_MIPS_CPU_MIPS64R6 endchoice - choice prompt "Target ABI" - depends on BR2_mips64 || BR2_mips64el default BR2_MIPS_NABI32 + depends on BR2_mips64 || BR2_mips64el help Application Binary Interface to use @@ -44,6 +163,7 @@ endchoice config BR2_MIPS_SOFT_FLOAT bool "Use soft-float" default y + depends on !BR2_mips_octeon3 # hard-float only select BR2_SOFT_FLOAT help If your target CPU does not have a Floating Point Unit (FPU) @@ -51,6 +171,64 @@ config BR2_MIPS_SOFT_FLOAT floating point functions, then everything will need to be compiled with soft floating point support (-msoft-float). +choice + prompt "FP mode" + default BR2_MIPS_FP32_MODE_XX + depends on !BR2_ARCH_IS_64 && !BR2_MIPS_SOFT_FLOAT + help + MIPS32 supports different FP modes (32,xx,64). Information + about FP modes can be found here: + https://sourceware.org/binutils/docs/as/MIPS-Options.html + https://dmz-portal.imgtec.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#5._Generating_modeless_code + +config BR2_MIPS_FP32_MODE_32 + bool "32" + depends on !BR2_MIPS_CPU_MIPS32R6 + +config BR2_MIPS_FP32_MODE_XX + bool "xx" + select BR2_ARCH_NEEDS_GCC_AT_LEAST_5 + +config BR2_MIPS_FP32_MODE_64 + bool "64" + depends on !BR2_MIPS_CPU_MIPS32 +endchoice + +config BR2_GCC_TARGET_FP32_MODE + default "32" if BR2_MIPS_FP32_MODE_32 + default "xx" if BR2_MIPS_FP32_MODE_XX + default "64" if BR2_MIPS_FP32_MODE_64 + +config BR2_MIPS_NAN_LEGACY + bool + +config BR2_MIPS_NAN_2008 + bool + select BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9 + +choice + prompt "Target NaN" + default BR2_MIPS_ENABLE_NAN_2008 + depends on BR2_mips_32r5 || BR2_mips_64r5 + help + MIPS supports two different NaN encodings, legacy and 2008. + Information about MIPS NaN encodings can be found here: + https://sourceware.org/binutils/docs/as/MIPS-NaN-Encodings.html + +config BR2_MIPS_ENABLE_NAN_LEGACY + bool "legacy" + select BR2_MIPS_NAN_LEGACY + +config BR2_MIPS_ENABLE_NAN_2008 + bool "2008" + depends on !BR2_MIPS_SOFT_FLOAT + select BR2_MIPS_NAN_2008 +endchoice + +config BR2_GCC_TARGET_NAN + default "legacy" if BR2_MIPS_NAN_LEGACY + default "2008" if BR2_MIPS_NAN_2008 + config BR2_ARCH default "mips" if BR2_mips default "mipsel" if BR2_mipsel @@ -59,20 +237,28 @@ config BR2_ARCH config BR2_ENDIAN default "LITTLE" if BR2_mipsel || BR2_mips64el - default "BIG" if BR2_mips || BR2_mips64 - -config BR2_ARCH_HAS_ATOMICS - default y + default "BIG" if BR2_mips || BR2_mips64 config BR2_GCC_TARGET_ARCH - default "mips1" if BR2_mips_1 - default "mips2" if BR2_mips_2 - default "mips3" if BR2_mips_3 - default "mips4" if BR2_mips_4 default "mips32" if BR2_mips_32 default "mips32r2" if BR2_mips_32r2 + default "mips32r3" if BR2_mips_32r3 + default "mips32r5" if BR2_mips_32r5 + default "mips32r6" if BR2_mips_32r6 + default "interaptiv" if BR2_mips_interaptiv + default "m5101" if BR2_mips_m5150 + default "m6201" if BR2_mips_m6250 + default "p5600" if BR2_mips_p5600 + default "mips32r2" if BR2_mips_xburst default "mips64" if BR2_mips_64 default "mips64r2" if BR2_mips_64r2 + default "mips64r3" if BR2_mips_64r3 + default "mips64r5" if BR2_mips_64r5 + default "mips64r6" if BR2_mips_64r6 + default "i6400" if BR2_mips_i6400 + default "octeon2" if BR2_mips_octeon2 + default "octeon3" if BR2_mips_octeon3 + default "p6600" if BR2_mips_p6600 config BR2_MIPS_OABI32 bool @@ -82,3 +268,9 @@ config BR2_GCC_TARGET_ABI default "32" if BR2_MIPS_OABI32 default "n32" if BR2_MIPS_NABI32 default "64" if BR2_MIPS_NABI64 + +config BR2_READELF_ARCH_NAME + default "MIPS R3000" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.nds32 b/buildroot/arch/Config.in.nds32 new file mode 100644 index 000000000..322ff49f2 --- /dev/null +++ b/buildroot/arch/Config.in.nds32 @@ -0,0 +1,14 @@ +config BR2_ARCH + default "nds32le" + +config BR2_GCC_TARGET_ARCH + default "v3" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_READELF_ARCH_NAME + default "Andes Technology compact code size embedded RISC processor family" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.nios2 b/buildroot/arch/Config.in.nios2 index 7807769cf..aae435fa1 100644 --- a/buildroot/arch/Config.in.nios2 +++ b/buildroot/arch/Config.in.nios2 @@ -4,5 +4,8 @@ config BR2_ARCH config BR2_ENDIAN default "LITTLE" -config BR2_ARCH_HAS_ATOMICS - default y +config BR2_READELF_ARCH_NAME + default "Altera Nios II" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.or1k b/buildroot/arch/Config.in.or1k new file mode 100644 index 000000000..abdf498fb --- /dev/null +++ b/buildroot/arch/Config.in.or1k @@ -0,0 +1,11 @@ +config BR2_ARCH + default "or1k" + +config BR2_ENDIAN + default "BIG" + +config BR2_READELF_ARCH_NAME + default "OpenRISC 1000" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.powerpc b/buildroot/arch/Config.in.powerpc index 95bcaeefe..56c4b526e 100644 --- a/buildroot/arch/Config.in.powerpc +++ b/buildroot/arch/Config.in.powerpc @@ -71,12 +71,12 @@ config BR2_powerpc_740 depends on !BR2_ARCH_IS_64 config BR2_powerpc_7400 bool "7400" - select BR2_POWERPC_CPU_HAS_ALTIVEC depends on !BR2_ARCH_IS_64 + select BR2_POWERPC_CPU_HAS_ALTIVEC config BR2_powerpc_7450 bool "7450" - select BR2_POWERPC_CPU_HAS_ALTIVEC depends on !BR2_ARCH_IS_64 + select BR2_POWERPC_CPU_HAS_ALTIVEC config BR2_powerpc_750 bool "750" depends on !BR2_ARCH_IS_64 @@ -164,9 +164,6 @@ config BR2_ENDIAN default "BIG" if BR2_powerpc || BR2_powerpc64 default "LITTLE" if BR2_powerpc64le -config BR2_ARCH_HAS_ATOMICS - default y - config BR2_GCC_TARGET_CPU default "401" if BR2_powerpc_401 default "403" if BR2_powerpc_403 @@ -200,16 +197,17 @@ config BR2_GCC_TARGET_CPU default "e300c2" if BR2_powerpc_e300c2 default "e300c3" if BR2_powerpc_e300c3 default "e500mc" if BR2_powerpc_e500mc + default "e5500" if BR2_powerpc_e5500 + default "e6500" if BR2_powerpc_e6500 default "power4" if BR2_powerpc_power4 default "power5" if BR2_powerpc_power5 default "power6" if BR2_powerpc_power6 default "power7" if BR2_powerpc_power7 default "power8" if BR2_powerpc_power8 -config BR2_GCC_TARGET_ABI - default "altivec" if BR2_PPC_ABI_altivec - default "no-altivec" if BR2_PPC_ABI_no-altivec - default "spe" if BR2_PPC_ABI_spe - default "no-spe" if BR2_PPC_ABI_no-spe - default "ibmlongdouble" if BR2_PPC_ABI_ibmlongdouble - default "ieeelongdouble" if BR2_PPC_ABI_ieeelongdouble +config BR2_READELF_ARCH_NAME + default "PowerPC" if BR2_powerpc + default "PowerPC64" if BR2_powerpc64 || BR2_powerpc64le + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.riscv b/buildroot/arch/Config.in.riscv new file mode 100644 index 000000000..1fc20e5de --- /dev/null +++ b/buildroot/arch/Config.in.riscv @@ -0,0 +1,134 @@ +# RISC-V CPU ISA extensions. + +config BR2_RISCV_ISA_RVI + bool + +config BR2_RISCV_ISA_RVM + bool + +config BR2_RISCV_ISA_RVA + bool + +config BR2_RISCV_ISA_RVF + bool + +config BR2_RISCV_ISA_RVD + bool + +config BR2_RISCV_ISA_RVC + bool + +choice + prompt "Target Architecture Variant" + default BR2_riscv_g + +config BR2_riscv_g + bool "General purpose (G)" + select BR2_RISCV_ISA_RVI + select BR2_RISCV_ISA_RVM + select BR2_RISCV_ISA_RVA + select BR2_RISCV_ISA_RVF + select BR2_RISCV_ISA_RVD + help + General purpose (G) is equivalent to IMAFD. + +config BR2_riscv_custom + bool "Custom architecture" + select BR2_RISCV_ISA_RVI + select BR2_RISCV_ISA_CUSTOM_RVA + +endchoice + +if BR2_riscv_custom + +comment "Instruction Set Extensions" + +config BR2_RISCV_ISA_CUSTOM_RVM + bool "Integer Multiplication and Division (M)" + select BR2_RISCV_ISA_RVM + +config BR2_RISCV_ISA_CUSTOM_RVA + bool "Atomic Instructions (A)" + select BR2_RISCV_ISA_RVA + +config BR2_RISCV_ISA_CUSTOM_RVF + bool "Single-precision Floating-point (F)" + select BR2_RISCV_ISA_RVF + +config BR2_RISCV_ISA_CUSTOM_RVD + bool "Double-precision Floating-point (D)" + depends on BR2_RISCV_ISA_RVF + select BR2_RISCV_ISA_RVD + +config BR2_RISCV_ISA_CUSTOM_RVC + bool "Compressed Instructions (C)" + select BR2_RISCV_ISA_RVC +endif + +choice + prompt "Target Architecture Size" + default BR2_RISCV_64 + +config BR2_RISCV_32 + bool "32-bit" + +config BR2_RISCV_64 + bool "64-bit" + select BR2_ARCH_IS_64 + +endchoice + +choice + prompt "Target ABI" + default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD + default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64 + default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD + default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64 + +config BR2_RISCV_ABI_ILP32 + bool "ilp32" + depends on !BR2_ARCH_IS_64 + +config BR2_RISCV_ABI_ILP32F + bool "ilp32f" + depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + +config BR2_RISCV_ABI_ILP32D + bool "ilp32d" + depends on !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD + +config BR2_RISCV_ABI_LP64 + bool "lp64" + depends on BR2_ARCH_IS_64 + +config BR2_RISCV_ABI_LP64F + bool "lp64f" + depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + +config BR2_RISCV_ABI_LP64D + bool "lp64d" + depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD +endchoice + +config BR2_ARCH + default "riscv32" if !BR2_ARCH_IS_64 + default "riscv64" if BR2_ARCH_IS_64 + +config BR2_ENDIAN + default "LITTLE" + +config BR2_GCC_TARGET_ABI + default "ilp32" if BR2_RISCV_ABI_ILP32 + default "ilp32f" if BR2_RISCV_ABI_ILP32F + default "ilp32d" if BR2_RISCV_ABI_ILP32D + default "lp64" if BR2_RISCV_ABI_LP64 + default "lp64f" if BR2_RISCV_ABI_LP64F + default "lp64d" if BR2_RISCV_ABI_LP64D + +config BR2_READELF_ARCH_NAME + default "RISC-V" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.sh b/buildroot/arch/Config.in.sh index 9f8f79c6a..b5cce18e2 100644 --- a/buildroot/arch/Config.in.sh +++ b/buildroot/arch/Config.in.sh @@ -1,7 +1,7 @@ choice prompt "Target Architecture Variant" - depends on BR2_sh default BR2_sh4 + depends on BR2_sh help Specific CPU variant to use @@ -23,11 +23,13 @@ config BR2_ARCH default "sh4eb" if BR2_sh4eb default "sh4a" if BR2_sh4a default "sh4aeb" if BR2_sh4aeb - default "sh64" if BR2_sh64 config BR2_ENDIAN - default "LITTLE" if BR2_sh4 || BR2_sh4a || BR2_sh64 + default "LITTLE" if BR2_sh4 || BR2_sh4a default "BIG" if BR2_sh2a || BR2_sh4eb || BR2_sh4aeb -config BR2_ARCH_HAS_ATOMICS - default y +config BR2_READELF_ARCH_NAME + default "Renesas / SuperH SH" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.sparc b/buildroot/arch/Config.in.sparc index 4e502d528..4c4dc6174 100644 --- a/buildroot/arch/Config.in.sparc +++ b/buildroot/arch/Config.in.sparc @@ -1,25 +1,37 @@ choice prompt "Target Architecture Variant" - depends on BR2_sparc - default BR2_sparc_v8 + default BR2_sparc_v8 if BR2_sparc + default BR2_sparc_v9 if BR2_sparc64 + depends on BR2_sparc || BR2_sparc64 help Specific CPU variant to use config BR2_sparc_v8 bool "v8" + depends on BR2_sparc config BR2_sparc_leon3 bool "leon3" + depends on BR2_sparc +config BR2_sparc_v9 + bool "v9" + depends on BR2_sparc64 endchoice config BR2_ARCH default "sparc" if BR2_sparc + default "sparc64" if BR2_sparc64 config BR2_ENDIAN default "BIG" -config BR2_ARCH_HAS_ATOMICS - default y - config BR2_GCC_TARGET_CPU default "leon3" if BR2_sparc_leon3 default "v8" if BR2_sparc_v8 + default "ultrasparc" if BR2_sparc_v9 + +config BR2_READELF_ARCH_NAME + default "Sparc" if BR2_sparc + default "Sparc v9" if BR2_sparc64 + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.x86 b/buildroot/arch/Config.in.x86 index 8a844dbe9..7aae3cafb 100644 --- a/buildroot/arch/Config.in.x86 +++ b/buildroot/arch/Config.in.x86 @@ -1,6 +1,8 @@ # i386/x86_64 cpu features config BR2_X86_CPU_HAS_MMX bool +config BR2_X86_CPU_HAS_3DNOW + bool config BR2_X86_CPU_HAS_SSE bool config BR2_X86_CPU_HAS_SSE2 @@ -13,23 +15,35 @@ config BR2_X86_CPU_HAS_SSE4 bool config BR2_X86_CPU_HAS_SSE42 bool +config BR2_X86_CPU_HAS_AVX + bool +config BR2_X86_CPU_HAS_AVX2 + bool choice prompt "Target Architecture Variant" - depends on BR2_i386 || BR2_x86_64 default BR2_x86_i586 if BR2_i386 + depends on BR2_i386 || BR2_x86_64 help Specific CPU variant to use -config BR2_x86_i386 - bool "i386" - depends on !BR2_x86_64 config BR2_x86_i486 bool "i486" depends on !BR2_x86_64 config BR2_x86_i586 bool "i586" depends on !BR2_x86_64 +config BR2_x86_x1000 + bool "x1000" + depends on !BR2_x86_64 + help + The Intel X1000 is a Pentium class microprocessor in the + Quark (sub-Atom) Product Line. The X1000 has a bug on the + lock prefix requiring that prefix must be stripped at build + time. + + See https://en.wikipedia.org/wiki/Intel_Quark + config BR2_x86_i686 bool "i686" depends on !BR2_x86_64 @@ -38,35 +52,35 @@ config BR2_x86_pentiumpro depends on !BR2_x86_64 config BR2_x86_pentium_mmx bool "pentium MMX" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX config BR2_x86_pentium_m bool "pentium mobile" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE - depends on !BR2_x86_64 config BR2_x86_pentium2 bool "pentium2" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX config BR2_x86_pentium3 bool "pentium3" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE - depends on !BR2_x86_64 config BR2_x86_pentium4 bool "pentium4" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE select BR2_X86_CPU_HAS_SSE2 - depends on !BR2_x86_64 config BR2_x86_prescott bool "prescott" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE select BR2_X86_CPU_HAS_SSE2 select BR2_X86_CPU_HAS_SSE3 - depends on !BR2_x86_64 config BR2_x86_nocona bool "nocona" select BR2_X86_CPU_HAS_MMX @@ -89,6 +103,36 @@ config BR2_x86_corei7 select BR2_X86_CPU_HAS_SSSE3 select BR2_X86_CPU_HAS_SSE4 select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_westmere + bool "westmere" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_corei7_avx + bool "corei7-avx" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX +config BR2_x86_core_avx2 + bool "core-avx2" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX + select BR2_X86_CPU_HAS_AVX2 config BR2_x86_atom bool "atom" select BR2_X86_CPU_HAS_MMX @@ -96,23 +140,35 @@ config BR2_x86_atom select BR2_X86_CPU_HAS_SSE2 select BR2_X86_CPU_HAS_SSE3 select BR2_X86_CPU_HAS_SSSE3 +config BR2_x86_silvermont + bool "silvermont" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 config BR2_x86_k6 bool "k6" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX config BR2_x86_k6_2 bool "k6-2" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_3DNOW config BR2_x86_athlon bool "athlon" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_3DNOW config BR2_x86_athlon_4 bool "athlon-4" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE - depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_3DNOW config BR2_x86_opteron bool "opteron" select BR2_X86_CPU_HAS_MMX @@ -139,6 +195,15 @@ config BR2_x86_jaguar select BR2_X86_CPU_HAS_SSSE3 select BR2_X86_CPU_HAS_SSE4 select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_steamroller + bool "steamroller" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 config BR2_x86_geode bool "geode" # Don't include MMX support because there several variant of geode @@ -147,27 +212,28 @@ config BR2_x86_geode depends on !BR2_x86_64 config BR2_x86_c3 bool "Via/Cyrix C3 (Samuel/Ezra cores)" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_3DNOW config BR2_x86_c32 bool "Via C3-2 (Nehemiah cores)" + depends on !BR2_x86_64 select BR2_X86_CPU_HAS_MMX select BR2_X86_CPU_HAS_SSE - depends on !BR2_x86_64 config BR2_x86_winchip_c6 bool "IDT Winchip C6" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX config BR2_x86_winchip2 bool "IDT Winchip 2" - select BR2_X86_CPU_HAS_MMX depends on !BR2_x86_64 + select BR2_X86_CPU_HAS_MMX endchoice config BR2_ARCH - default "i386" if BR2_x86_i386 default "i486" if BR2_x86_i486 default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_x1000 default "i586" if BR2_x86_pentium_mmx default "i586" if BR2_x86_geode default "i586" if BR2_x86_c3 @@ -184,11 +250,16 @@ config BR2_ARCH default "i686" if BR2_x86_nocona && BR2_i386 default "i686" if BR2_x86_core2 && BR2_i386 default "i686" if BR2_x86_corei7 && BR2_i386 + default "i686" if BR2_x86_westmere && BR2_i386 + default "i686" if BR2_x86_corei7_avx && BR2_i386 + default "i686" if BR2_x86_core_avx2 && BR2_i386 default "i686" if BR2_x86_atom && BR2_i386 + default "i686" if BR2_x86_silvermont && BR2_i386 default "i686" if BR2_x86_opteron && BR2_i386 default "i686" if BR2_x86_opteron_sse3 && BR2_i386 default "i686" if BR2_x86_barcelona && BR2_i386 default "i686" if BR2_x86_jaguar && BR2_i386 + default "i686" if BR2_x86_steamroller && BR2_i386 default "i686" if BR2_x86_k6 default "i686" if BR2_x86_k6_2 default "i686" if BR2_x86_athlon @@ -198,13 +269,10 @@ config BR2_ARCH config BR2_ENDIAN default "LITTLE" -config BR2_ARCH_HAS_ATOMICS - default y if !BR2_x86_i386 - config BR2_GCC_TARGET_ARCH - default "i386" if BR2_x86_i386 default "i486" if BR2_x86_i486 default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_x1000 default "pentium-mmx" if BR2_x86_pentium_mmx default "i686" if BR2_x86_i686 default "pentiumpro" if BR2_x86_pentiumpro @@ -216,11 +284,16 @@ config BR2_GCC_TARGET_ARCH default "nocona" if BR2_x86_nocona default "core2" if BR2_x86_core2 default "corei7" if BR2_x86_corei7 + default "corei7-avx" if BR2_x86_corei7_avx + default "core-avx2" if BR2_x86_core_avx2 default "atom" if BR2_x86_atom + default "westmere" if BR2_x86_westmere + default "silvermont" if BR2_x86_silvermont default "k8" if BR2_x86_opteron default "k8-sse3" if BR2_x86_opteron_sse3 default "barcelona" if BR2_x86_barcelona default "btver2" if BR2_x86_jaguar + default "bdver3" if BR2_x86_steamroller default "k6" if BR2_x86_k6 default "k6-2" if BR2_x86_k6_2 default "athlon" if BR2_x86_athlon @@ -230,3 +303,10 @@ config BR2_GCC_TARGET_ARCH default "c3" if BR2_x86_c3 default "c3-2" if BR2_x86_c32 default "geode" if BR2_x86_geode + +config BR2_READELF_ARCH_NAME + default "Intel 80386" if BR2_i386 + default "Advanced Micro Devices X86-64" if BR2_x86_64 + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/Config.in.xtensa b/buildroot/arch/Config.in.xtensa index ff71e0b71..a79d90698 100644 --- a/buildroot/arch/Config.in.xtensa +++ b/buildroot/arch/Config.in.xtensa @@ -1,40 +1,55 @@ choice prompt "Target Architecture Variant" - depends on BR2_xtensa default BR2_xtensa_fsf + depends on BR2_xtensa + config BR2_XTENSA_CUSTOM bool "Custom Xtensa processor configuration" + select BR2_ARCH_HAS_MMU_OPTIONAL + config BR2_xtensa_fsf bool "fsf - Default configuration" + select BR2_ARCH_HAS_MMU_MANDATORY + endchoice -config BR2_XTENSA_CUSTOM_NAME - string "Custom Xtensa processor configuration name" +config BR2_XTENSA_OVERLAY_FILE + string "Overlay file for custom configuration" depends on BR2_XTENSA_CUSTOM - default "" help - Name given to a custom Xtensa processor configuration. + Enter the path to the overlay tarball for a custom processor + configuration. + + These overlay files are tar packages with updated + configuration files for various toolchain packages and Xtensa + processor configurations. They are provided by the processor + vendor or directly from Tensilica. -config BR2_XTENSA_CORE_NAME - string - default BR2_XTENSA_CUSTOM_NAME if BR2_XTENSA_CUSTOM - default "" if BR2_xtensa_fsf + The path can be either absolute, or relative to the top + directory of buildroot. -config BR2_XTENSA_OVERLAY_DIR - string "Overlay directory for custom configuration" +choice + prompt "Target Architecture Endianness" + default BR2_XTENSA_LITTLE_ENDIAN depends on BR2_XTENSA_CUSTOM - default "" - help - Provide the directory path that contains the overlay file - for a custom processor configuration. The path is relative - to the top directory of buildroot. - These overlay files are tar packages with updated configuration - files for various toolchain packages and Xtensa processor - configurations. They are provided by the processor vendor or - directly from Tensilica. + +config BR2_XTENSA_LITTLE_ENDIAN + bool "Little endian" + +config BR2_XTENSA_BIG_ENDIAN + bool "Big endian" + +endchoice + +config BR2_ENDIAN + default "LITTLE" if BR2_XTENSA_LITTLE_ENDIAN + default "BIG" if BR2_xtensa_fsf || BR2_XTENSA_BIG_ENDIAN config BR2_ARCH default "xtensa" if BR2_xtensa -config BR2_ARCH_HAS_ATOMICS - default y +config BR2_READELF_ARCH_NAME + default "Tensilica Xtensa Processor" + +# vim: ft=kconfig +# -*- mode:kconfig; -*- diff --git a/buildroot/arch/arch.mk b/buildroot/arch/arch.mk new file mode 100644 index 000000000..289c5a112 --- /dev/null +++ b/buildroot/arch/arch.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# Architecture-specific definitions +# +################################################################################ + +# Allow GCC target configuration settings to be optionally +# overwritten by architecture specific makefiles. + +# Makefiles must use the GCC_TARGET_* variables below instead +# of the BR2_GCC_TARGET_* versions. +GCC_TARGET_ARCH := $(call qstrip,$(BR2_GCC_TARGET_ARCH)) +GCC_TARGET_ABI := $(call qstrip,$(BR2_GCC_TARGET_ABI)) +GCC_TARGET_NAN := $(call qstrip,$(BR2_GCC_TARGET_NAN)) +GCC_TARGET_FP32_MODE := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE)) +GCC_TARGET_CPU := $(call qstrip,$(BR2_GCC_TARGET_CPU)) +GCC_TARGET_FPU := $(call qstrip,$(BR2_GCC_TARGET_FPU)) +GCC_TARGET_FLOAT_ABI := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +GCC_TARGET_MODE := $(call qstrip,$(BR2_GCC_TARGET_MODE)) + +# Include any architecture specific makefiles. +-include $(sort $(wildcard arch/arch.mk.*)) diff --git a/buildroot/arch/arch.mk.arc b/buildroot/arch/arch.mk.arc new file mode 100644 index 000000000..32b818b0e --- /dev/null +++ b/buildroot/arch/arch.mk.arc @@ -0,0 +1,17 @@ +ifeq ($(BR2_arc),y) + +# -matomic is always required when the ARC core has the atomic extensions +ifeq ($(BR2_ARC_ATOMIC_EXT),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS = -matomic +endif + +# Explicitly set LD's "max-page-size" instead of relying on some defaults +ifeq ($(BR2_ARC_PAGE_SIZE_4K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=4096 +else ifeq ($(BR2_ARC_PAGE_SIZE_8K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=8192 +else ifeq ($(BR2_ARC_PAGE_SIZE_16K),y) +ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=16384 +endif + +endif diff --git a/buildroot/arch/arch.mk.csky b/buildroot/arch/arch.mk.csky new file mode 100644 index 000000000..fb59ae22f --- /dev/null +++ b/buildroot/arch/arch.mk.csky @@ -0,0 +1,26 @@ +# +# Configure the GCC_TARGET_ARCH variable and append the +# appropriate C-SKY ISA extensions. +# + +ifeq ($(BR2_csky),y) + +ifeq ($(BR2_ck610),y) +GCC_TARGET_CPU := ck610 +else ifeq ($(BR2_ck807),y) +GCC_TARGET_CPU := ck807 +else ifeq ($(BR2_ck810),y) +GCC_TARGET_CPU := ck810 +else ifeq ($(BR2_ck860),y) +GCC_TARGET_CPU := ck860 +endif + +ifeq ($(BR2_CSKY_FPU),y) +GCC_TARGET_CPU := $(GCC_TARGET_CPU)f +endif + +ifeq ($(BR2_CSKY_VDSP),y) +GCC_TARGET_CPU := $(GCC_TARGET_CPU)v +endif + +endif diff --git a/buildroot/arch/arch.mk.riscv b/buildroot/arch/arch.mk.riscv new file mode 100644 index 000000000..f3bf2b346 --- /dev/null +++ b/buildroot/arch/arch.mk.riscv @@ -0,0 +1,30 @@ +# +# Configure the GCC_TARGET_ARCH variable and append the +# appropriate RISC-V ISA extensions. +# + +ifeq ($(BR2_riscv),y) + +ifeq ($(BR2_RISCV_64),y) +GCC_TARGET_ARCH := rv64i +else +GCC_TARGET_ARCH := rv32i +endif + +ifeq ($(BR2_RISCV_ISA_RVM),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m +endif +ifeq ($(BR2_RISCV_ISA_RVA),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a +endif +ifeq ($(BR2_RISCV_ISA_RVF),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f +endif +ifeq ($(BR2_RISCV_ISA_RVD),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d +endif +ifeq ($(BR2_RISCV_ISA_RVC),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c +endif + +endif diff --git a/buildroot/arch/arch.mk.xtensa b/buildroot/arch/arch.mk.xtensa new file mode 100644 index 000000000..fd410f6bf --- /dev/null +++ b/buildroot/arch/arch.mk.xtensa @@ -0,0 +1,36 @@ +################################################################################ +# This variable can be used by packages that need to extract the overlay. +# +# ARCH_XTENSA_OVERLAY_FILE is the path to the overlay tarball; empty if not +# using any overlay +# +# Example: +# ifneq ($(ARCH_XTENSA_OVERLAY_FILE),) +# tar xf $(ARCH_XTENSA_OVERLAY_FILE) -C $(@D) --strip-components=1 gcc +# endif +################################################################################ +BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE)) +ifneq ($(filter http://% https://% ftp://% scp://%,$(BR_ARCH_XTENSA_OVERLAY_FILE)),) +ARCH_XTENSA_OVERLAY_URL = $(BR_ARCH_XTENSA_OVERLAY_FILE) +ARCH_XTENSA_OVERLAY_FILE = $($(PKG)_DL_DIR)/$(notdir $(BR_ARCH_XTENSA_OVERLAY_FILE)) +# Do not check that file, we can't know its hash +BR_NO_CHECK_HASH_FOR += $(notdir $(ARCH_XTENSA_OVERLAY_URL)) +else +ARCH_XTENSA_OVERLAY_FILE = $(BR_ARCH_XTENSA_OVERLAY_FILE) +endif + +################################################################################ +# arch-xtensa-overlay-extract -- extract an extensa overlay +# +# argument 1 is the path in which to extract +# argument 2 is the component to extract, one of: gcc, binutils, gdb, linux, +# u-boot +# +# Example: +# $(call arch-xtensa-overlay-extract,/path/to/overlay.tar,$(@D),gcc) +################################################################################ +define arch-xtensa-overlay-extract + $(call suitable-extractor,$(ARCH_XTENSA_OVERLAY_FILE)) \ + $(ARCH_XTENSA_OVERLAY_FILE) | \ + $(TAR) --strip-components=1 -C $(1) $(TAR_OPTIONS) - $(2) +endef diff --git a/buildroot/board/aarch64-efi/genimage-efi.cfg b/buildroot/board/aarch64-efi/genimage-efi.cfg new file mode 100644 index 000000000..f93ab9d64 --- /dev/null +++ b/buildroot/board/aarch64-efi/genimage-efi.cfg @@ -0,0 +1,30 @@ +image efi-part.vfat { + vfat { + file startup.nsh { + image = "efi-part/startup.nsh" + } + file EFI { + image = "efi-part/EFI" + } + file Image { + image = "Image" + } + } + size = 32M +} + +image disk.img { + + hdimage { + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/aarch64-efi/grub.cfg b/buildroot/board/aarch64-efi/grub.cfg new file mode 100644 index 000000000..ab88da91b --- /dev/null +++ b/buildroot/board/aarch64-efi/grub.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /Image root=/dev/vda2 rootwait console=ttyAMA0 +} diff --git a/buildroot/board/aarch64-efi/post-image.sh b/buildroot/board/aarch64-efi/post-image.sh new file mode 100755 index 000000000..f0214dc86 --- /dev/null +++ b/buildroot/board/aarch64-efi/post-image.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg diff --git a/buildroot/board/aarch64-efi/readme.txt b/buildroot/board/aarch64-efi/readme.txt new file mode 100644 index 000000000..65a6345b6 --- /dev/null +++ b/buildroot/board/aarch64-efi/readme.txt @@ -0,0 +1,34 @@ + +The aarch64_efi_defconfig allows to build a minimal Linux system that +can boot on all AArch64 servers providing an EFI firmware and ACPI. + +Building and booting +==================== + +$ make aarch64_efi_defconfig +$ make + +The file output/images/disk.img is a complete disk image that can be +booted, it includes the grub2 bootloader, Linux kernel and root +filesystem. + +Testing under Qemu +================== + +This image can also be tested using Qemu: + +qemu-system-aarch64 \ + -M virt \ + -cpu cortex-a57 \ + -m 512 \ + -nographic \ + -bios \ + -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ + -device virtio-blk-device,drive=hd0 \ + -netdev user,id=eth0 \ + -device virtio-net-device,netdev=eth0 + +Note that needs to point to a valid aarch64 UEFI +firmware image for qemu. +It may be provided by your distribution as a edk2-aarch64 or AAVMF +package, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd . diff --git a/buildroot/board/acmesystems/aria-g25/genimage.cfg b/buildroot/board/acmesystems/aria-g25/genimage.cfg new file mode 100644 index 000000000..b40ad9edf --- /dev/null +++ b/buildroot/board/acmesystems/aria-g25/genimage.cfg @@ -0,0 +1,35 @@ +# Minimal SD card image for the Acmesystems Aria G25 + +image boot.vfat { + vfat { + file zImage { + image = "zImage" + } + + file at91-ariag25.dtb { + image = "at91-ariag25.dtb" + } + + file boot.bin { + image = "at91sam9x5_aria-sdcardboot-linux-zimage-dt-3.8.13.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/acmesystems/aria-g25/readme.txt b/buildroot/board/acmesystems/aria-g25/readme.txt new file mode 100644 index 000000000..cb9e9abf7 --- /dev/null +++ b/buildroot/board/acmesystems/aria-g25/readme.txt @@ -0,0 +1,44 @@ +Acme Systems Aria G25 + +Build instructions +================== + +To build an image for the Aria G25 choose the configuration +corresponding to the Aria variant. + +For 128MB RAM variant type: + +$ make acmesystems_aria_g25_128mb_defconfig + +else for 256MB RAM variant type: + +$ make acmesystems_aria_g25_256mb_defconfig + +To customize the configuration choosed type: + +$ make menuconfig + +When you are ready to start building Buildroot type: + +$ make + +How to write the microSD card +============================= + +Once the build process is finished you will have an image called +"sdcard.img" in the output/images/ directory. + +Write the bootable SD card image "sdcard.img" onto an SD card with +"dd" command: + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Assuming your Aria G25 baseboard has a MicroSD socket, for example +with the Terra baseboard, insert the microSD card into the baseboard +slot and power it. + +To get the kernel log messages you can use a DPI cable +(http://www.acmesystems.it/DPI) + +You can find additional informations, tutorials and a very +comprehensive documentation on http://www.acmesystems.it/aria. diff --git a/buildroot/board/acmesystems/arietta-g25/genimage.cfg b/buildroot/board/acmesystems/arietta-g25/genimage.cfg new file mode 100644 index 000000000..7c3112dd5 --- /dev/null +++ b/buildroot/board/acmesystems/arietta-g25/genimage.cfg @@ -0,0 +1,35 @@ +# Minimal SD card image for the Acmesystems Arietta G25 + +image boot.vfat { + vfat { + file zImage { + image = "zImage" + } + + file acme-arietta.dtb { + image = "at91-ariettag25.dtb" + } + + file boot.bin { + image = "at91sam9x5_arietta-sdcardboot-linux-zimage-dt-3.8.13.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/acmesystems/arietta-g25/readme.txt b/buildroot/board/acmesystems/arietta-g25/readme.txt new file mode 100644 index 000000000..f356b0a26 --- /dev/null +++ b/buildroot/board/acmesystems/arietta-g25/readme.txt @@ -0,0 +1,49 @@ +Acme Systems Arietta G25 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Arietta G25. With the current configuration +it will bring-up the board, and allow access through the serial console. + +You can find additional informations, tutorials and a very comprehensive +documentation on http://www.acmesystems.it/arietta. + +Build instructions +================== + +To build an image for the Arietta G25 choose the configuration +corresponding to the Arietta variant. + +For 128MB RAM variant type: + +$ make acmesystems_arietta_g25_128mb_defconfig + +else for 256MB RAM variant type: + +$ make acmesystems_arietta_g25_256mb_defconfig + +To customize the configuration chosen type: + +$ make menuconfig + +When you are ready to start building Buildroot type: + +$ make + +How to write the microSD card +============================= + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Insert the microSD card into the Arietta slot and power it. + +The image just built is fairly basic and the only output +you will get is on serial console, please consider to use a DPI +cable (http://www.acmesystems.it/DPI) diff --git a/buildroot/board/altera/sockit/post-image.sh b/buildroot/board/altera/sockit/post-image.sh deleted file mode 100755 index 9040808ec..000000000 --- a/buildroot/board/altera/sockit/post-image.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# post-image.sh for SoCkit -# 2014, "Roman Diouskine" -# 2014, "Sebastien Bourdelin" - -# create a DTB file copy with the name expected by the u-boot config -cp -af $BINARIES_DIR/socfpga_cyclone5_sockit.dtb $BINARIES_DIR/socfpga.dtb diff --git a/buildroot/board/altera/sockit/readme.txt b/buildroot/board/altera/sockit/readme.txt deleted file mode 100644 index b6da489f6..000000000 --- a/buildroot/board/altera/sockit/readme.txt +++ /dev/null @@ -1,157 +0,0 @@ -SoCkit - -Intro -===== - -This is the buildroot board support for the Arrow SoCkit Evaluation Board. - -A good source of information is : -http://www.rocketboards.org/foswiki/Documentation/ArrowSoCKitEvaluationBoard - -How it works -============ - -Boot process : --------------- - -In summary, the bootloader has multiple stages, an hardcoded boot routine is -loaded from an on-chip ROM. - - - That first stage is scanning the SD card's partition table to find - partition having the 0xA2 type. - - This partition is expected to contain a boot image on its first 60 Kb, - because u-boot is bigger, we must fill it with a preloader (u-boot-spl) - which will load the u-boot image. - - Then the u-boot image will load the Linux kernel. - -A good source of information for the boot process is : -http://xillybus.com/tutorials/u-boot-image-altera-soc - -Note for the SPL : -The SPL generated by the u-boot from Rocketboards doesn't seems to work, -therefore we provide a patch for {uboot-PKG}/board/altera/socfpga_cyclone5/* -based on the files generated with the Altera example design. - -For more information about this files please look at : -http://www.rocketboards.org/foswiki/Documentation/PreloaderUbootCustomization#Common_Source_Code - -How to build it -=============== - -Configure Buildroot -------------------- - -The altera_sockit_defconfig configuration is a minimal configuration with -all that is required to bring the SoCkit : - - $ make altera_sockit_defconfig - -Build everything ----------------- - -Note: you will need to have access to the network, since Buildroot will -download the packages' sources. - - $ make - -Result of the build -------------------- - -After building, you should obtain this tree: - - output/images/ - ├── rootfs.ext2 - ├── rootfs.ext3 -> rootfs.ext2 - ├── rootfs.tar - ├── socfpga_cyclone5_sockit.dtb - ├── socfpga.dtb - ├── u-boot.img - ├── u-boot-spl.bin - └── uImage - - -Signing the Preloader ---------------------- - -*** BEWARE **** -The u-boot-spl.bin must be signed using the Altera's tool "mkpimage". -This tool comes as a part of the Altera development environnment (SoC EDS). -A fork of this tool have been done by Maxime Hadjinlian and can be found here : -https://github.com/maximeh/mkpimage - -Remember that without signing the u-boot-spl.bin, the board will not boot !!! - - $ mkpimage u-boot-spl.bin -o u-boot-spl-signed.bin - -Prepare your SDcard -=================== - -A good source of information for the partitioning process is : -http://www.rocketboards.org/foswiki/view/Projects/SoCKitLinaroLinuxDesktop#Partition_the_SD_Card - -Create the SDcard partition table ----------------------------------- - -Determine the device associated to the SD card : - - $ cat /proc/partitions - -let's assume it is /dev/mmcblk0 : - - $ sudo fdisk /dev/mmcblk0 - -Delete all previous partitions with 'd' then create the new partition table, -using these options, pressing enter after each one: - - * n p 1 9000000 +20480K t 1 b - * n p 2 4096 +4496384K t 83 - * n p 3 2048 +1024K t 3 a2 - -Using the 'p' option, the SD card's partition must look like this : - -Device Boot Start End Blocks Id System -/dev/mmcblk0p1 9000000 9041919 20960 b W95 FAT32 -/dev/mmcblk0p2 4096 8996863 4496384 83 Linux -/dev/mmcblk0p3 2048 4095 1024 a2 Unknown - -Then write the partition table using 'w' and exit. - -Make partition one a DOS partition : - - $ sudo mkdosfs /dev/mmcblk0p1 - -Install the binaries to the SDcard ----------------------------------- - -Remember your binaries are located in output/images/, go inside that directory : - - $ cd output/images - -The partition with type a2 is the partition scan by the first bootloader stage -in the SoCkit ROM to find the next bootloader stage so we must write the signed -preloader and the u-boot binaries in that partition : - - $ sudo dd if=u-boot-spl-signed.bin of=/dev/mmcblk0p3 bs=64k seek=0 - $ sudo dd if=u-boot.img of=/dev/mmcblk0p3 bs=64k seek=4 - -Copy the Linux kernel and its Device tree : - - $ sudo mkdir /mnt/sdcard - $ sudo mount /dev/mmcblk0p1 /mnt/sdcard - $ sudo cp socfpga.dtb uImage /mnt/sdcard - $ sudo umount /mnt/sdcard - -Copy the rootfs : - - $ sudo dd if=rootfs.ext2 of=/dev/mmcblk0p2 bs=64k - $ sudo sync - -It's Done! - -Finish -====== - -Eject your SDcard, insert it in your SoCkit, and power it up. - -if you want a serial console, you can plug a micro B USB cable on the USB-UART -port, the serial port config to used is 57600/8-N-1. diff --git a/buildroot/board/altera/sockit/uboot-sockit-preloader-sample-design.patch b/buildroot/board/altera/sockit/uboot-sockit-preloader-sample-design.patch deleted file mode 100644 index ddf0abce7..000000000 --- a/buildroot/board/altera/sockit/uboot-sockit-preloader-sample-design.patch +++ /dev/null @@ -1,820 +0,0 @@ -From c70f2ebb350da20af1a0ed4b7960b8e5a1952713 Mon Sep 17 00:00:00 2001 -From: Sebastien Bourdelin -Date: Thu, 20 Feb 2014 11:51:31 -0500 -Subject: [PATCH] board: add to sockit a working preloader design - ---- - board/altera/socfpga_cyclone5/build.h | 2 +- - board/altera/socfpga_cyclone5/iocsr_config.c | 314 ++++++++++----------- - board/altera/socfpga_cyclone5/pinmux_config.c | 32 +-- - board/altera/socfpga_cyclone5/pinmux_config.h | 8 +- - board/altera/socfpga_cyclone5/sdram/sdram_config.h | 14 +- - .../altera/socfpga_cyclone5/sdram/sequencer_auto.h | 16 +- - .../sdram/sequencer_auto_ac_init.c | 16 +- - .../socfpga_cyclone5/sdram/sequencer_defines.h | 34 +-- - 8 files changed, 218 insertions(+), 218 deletions(-) - -diff --git a/board/altera/socfpga_cyclone5/build.h b/board/altera/socfpga_cyclone5/build.h -index e5d9c3c..a369015 100644 ---- a/board/altera/socfpga_cyclone5/build.h -+++ b/board/altera/socfpga_cyclone5/build.h -@@ -29,7 +29,7 @@ - * Handoff files must provide user option whether to - * enable watchdog during preloader execution phase - */ --#define CONFIG_PRELOADER_WATCHDOG_ENABLE (0) -+#define CONFIG_PRELOADER_WATCHDOG_ENABLE (1) - - /* - * Handoff files must provide user option whether to enable -diff --git a/board/altera/socfpga_cyclone5/iocsr_config.c b/board/altera/socfpga_cyclone5/iocsr_config.c -index fa663e1..90fc154 100644 ---- a/board/altera/socfpga_cyclone5/iocsr_config.c -+++ b/board/altera/socfpga_cyclone5/iocsr_config.c -@@ -7,113 +7,113 @@ const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH - 0xC0000000, - 0x0000003F, - 0x00008000, -- 0x00020080, -- 0x08020000, -- 0x08000000, -- 0x00018020, -+ 0x00060180, -+ 0x18060000, -+ 0x18000000, -+ 0x00018060, - 0x00000000, - 0x00004000, -- 0x00010040, -- 0x04010000, -- 0x04000000, -- 0x00000010, -- 0x00004010, -+ 0x000300C0, -+ 0x0C030000, -+ 0x0C000000, -+ 0x00000030, -+ 0x0000C030, - 0x00002000, -- 0x00020000, -- 0x02008000, -- 0x02000000, -- 0x00000008, -- 0x00002008, -+ 0x00018060, -+ 0x06018000, -+ 0x06000000, -+ 0x00000018, -+ 0x00006018, - 0x00001000, - }; - - const unsigned long iocsr_scan_chain1_table[((CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH / 32) + 1)] = { -- 0x000C0300, -- 0x10040000, -- 0x100000C0, -- 0x00000040, -- 0x00010040, -+ 0x00100000, -+ 0x300C0000, -+ 0x300000C0, -+ 0x000000C0, -+ 0x000300C0, - 0x00008000, - 0x00080000, -- 0x18060000, -- 0x18000000, -- 0x00000060, -- 0x00018060, -+ 0x20000000, -+ 0x00000000, -+ 0x00000080, -+ 0x00020000, - 0x00004000, -- 0x00010040, -+ 0x000300C0, - 0x10000000, -- 0x04000000, -- 0x00000010, -- 0x00004010, -+ 0x0C000000, -+ 0x00000030, -+ 0x0000C030, - 0x00002000, -- 0x06008020, -- 0x02008000, -+ 0x06018060, -+ 0x06018000, - 0x01FE0000, - 0xF8000000, - 0x00000007, - 0x00001000, -- 0x00004010, -- 0x01004000, -- 0x01000000, -- 0x00003004, -- 0x00001004, -+ 0x0000C030, -+ 0x0300C000, -+ 0x03000000, -+ 0x0000300C, -+ 0x0000300C, - 0x00000800, - 0x00000000, - 0x00000000, -- 0x00800000, -- 0x00000002, -+ 0x01800000, -+ 0x00000006, - 0x00002000, - 0x00000400, - 0x00000000, -- 0x00401000, -+ 0x00C03000, - 0x00000003, - 0x00000000, - 0x00000000, - 0x00000200, -- 0x00600802, -+ 0x00601806, - 0x00000000, -- 0x80200000, -- 0x80000600, -- 0x00000200, -+ 0x80600000, -+ 0x80000601, -+ 0x00000601, - 0x00000100, -- 0x00300401, -- 0xC0100400, -- 0x40100000, -- 0x40000300, -- 0x000C0100, -+ 0x00300C03, -+ 0xC0300C00, -+ 0xC0300000, -+ 0xC0000300, -+ 0x000C0300, - 0x00000080, - }; - - const unsigned long iocsr_scan_chain2_table[((CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH / 32) + 1)] = { -- 0x80040100, -+ 0x300C0300, - 0x00000000, - 0x0FF00000, - 0x00000000, -- 0x0C010040, -+ 0x0C0300C0, - 0x00008000, -- 0x18020080, -- 0x00000000, -- 0x08000000, -- 0x00040020, -- 0x06018060, -+ 0x18060180, -+ 0x18060000, -+ 0x18000000, -+ 0x00018060, -+ 0x00018060, - 0x00004000, -- 0x0C010040, -- 0x04010000, -+ 0x000300C0, -+ 0x0C030000, - 0x00000030, - 0x00000000, -- 0x03004010, -+ 0x0300C030, - 0x00002000, -- 0x06008020, -- 0x02008000, -- 0x02000018, -- 0x00006008, -- 0x01802008, -+ 0x00018060, -+ 0x06018000, -+ 0x06000000, -+ 0x00000018, -+ 0x00006018, - 0x00001000, -- 0x03004010, -- 0x01004000, -- 0x0100000C, -- 0x00003004, -- 0x00C01004, -+ 0x0000C030, -+ 0x00000000, -+ 0x03000000, -+ 0x0000000C, -+ 0x00C0300C, - 0x00000800, - }; - -@@ -170,14 +170,14 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xA0000034, - 0x0D000001, - 0x6068030C, -- 0xC7034018, -- 0x0E381A01, -+ 0xCF034059, -+ 0x1E781A03, - 0x8030C0D0, -- 0x34018606, -- 0x01A01C70, -+ 0x34059606, -+ 0x01A03CF0, - 0x0C0D0000, -- 0x18606803, -- 0x01C70340, -+ 0x59606803, -+ 0x03CF0340, - 0xD000001A, - 0x068030C0, - 0x10040000, -@@ -244,15 +244,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xA0000034, - 0x0D000001, - 0x6068030C, -- 0xC7034018, -- 0x0E381A01, -+ 0xCF034059, -+ 0x1E781A03, - 0x8030C0D0, -- 0x34018606, -+ 0x34059606, - 0x01A00000, - 0x0C0D0000, -- 0x18606803, -- 0x01C70340, -- 0xD00E381A, -+ 0x59606803, -+ 0x03CF0340, -+ 0xD01E781A, - 0x068030C0, - 0x10040000, - 0x00200000, -@@ -273,7 +273,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xAA0D4000, - 0x01C3A810, - 0xAA0D4000, -- 0x01C3A808, -+ 0x01C3A810, - 0xAA0D4000, - 0x01C3A810, - 0x00040100, -@@ -301,7 +301,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x2A835000, - 0x0070EA04, - 0x2A835000, -- 0x0070EA02, -+ 0x0070EA04, - 0x2A835000, - 0x0070EA04, - 0x00010040, -@@ -321,15 +321,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x14864000, - 0x69A47A05, - 0xCBCF23D7, -- 0xF41E791E, -- 0x034ED348, -+ 0xF5DE791E, -+ 0x0356D348, - 0x821A0000, - 0x0000D000, - 0x01860680, - 0xD769A47A, - 0x1ECBCF23, -- 0x48F41E79, -- 0x00034ED3, -+ 0x48F5DE79, -+ 0x000356D3, - 0x00080200, - 0x00001000, - 0x00080200, -@@ -347,7 +347,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xAA0D4000, - 0x01C3A810, - 0xAA0D4000, -- 0x01C3A808, -+ 0x01C3A810, - 0xAA0D4000, - 0x01C3A810, - 0x00040100, -@@ -375,7 +375,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x2A835000, - 0x0070EA04, - 0x2A835000, -- 0x0070EA02, -+ 0x0070EA04, - 0x2A835000, - 0x0070EA04, - 0x00015000, -@@ -395,15 +395,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x14864000, - 0x69A47A05, - 0xCBCF23D7, -- 0xF41E791E, -- 0x034ED348, -- 0x821A00C3, -+ 0xF5DE791E, -+ 0x0356D348, -+ 0x821A02CB, - 0x0000D000, - 0x00000680, - 0xD769A47A, - 0x1ECBCF23, -- 0x48F41E79, -- 0x00034ED3, -+ 0x48F5DE79, -+ 0x000356D3, - 0x00080200, - 0x00001000, - 0x00080200, -@@ -421,7 +421,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xAA0D4000, - 0x01C3A810, - 0xAA0D4000, -- 0x01C3A808, -+ 0x01C3A810, - 0xAA0D4000, - 0x01C3A810, - 0x00040100, -@@ -449,7 +449,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x2A835000, - 0x0070EA04, - 0x2A835000, -- 0x0070EA02, -+ 0x0070EA04, - 0x2A835000, - 0x0070EA04, - 0x00010040, -@@ -469,15 +469,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x14864000, - 0x69A47A05, - 0xCBCF23D7, -- 0xF41E791E, -- 0x034ED348, -+ 0xF5DE791E, -+ 0x0356D348, - 0x821A0000, - 0x0000D000, - 0x00000680, - 0xD769A47A, - 0x1ECBCF23, -- 0x48F41E79, -- 0x00034ED3, -+ 0x48F5DE79, -+ 0x000356D3, - 0x00080200, - 0x00001000, - 0x00080200, -@@ -495,7 +495,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0xAA0D4000, - 0x01C3A810, - 0xAA0D4000, -- 0x01C3A808, -+ 0x01C3A810, - 0xAA0D4000, - 0x01C3A810, - 0x00040100, -@@ -523,7 +523,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x2A835000, - 0x0070EA04, - 0x2A835000, -- 0x0070EA02, -+ 0x0070EA04, - 0x2A835000, - 0x0070EA04, - 0x00010040, -@@ -543,15 +543,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x14864000, - 0x69A47A05, - 0xCBCF23D7, -- 0xF41E791E, -- 0x034ED348, -+ 0xF5DE791E, -+ 0x0356D348, - 0x821A0000, - 0x0000D000, - 0x00000680, - 0xD769A47A, - 0x1ECBCF23, -- 0x48F41E79, -- 0x00034ED3, -+ 0x48F5DE79, -+ 0x000356D3, - 0x00080200, - 0x00001000, - 0x00080200, -@@ -567,80 +567,80 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH - 0x04000002, - 0x00820000, - 0x00489000, -- 0x001A1A1A, -- 0x085506A0, -- 0x0000E1D4, -- 0x045506A0, -- 0x0000E1D4, -- 0x085506A0, -- 0x8000E1D4, -+ 0x801A1A1A, -+ 0x00000200, -+ 0x80000004, -+ 0x00000200, -+ 0x80000004, -+ 0x00000200, -+ 0x80000004, - 0x00000200, - 0x00000004, -- 0x04000000, -- 0x00000009, -- 0x00002410, -+ 0x00040000, -+ 0x10000000, -+ 0x00000000, - 0x00000040, -- 0x41000000, -- 0x00002082, -- 0x00000350, -- 0x000000DA, -+ 0x00010000, -+ 0x40002000, -+ 0x00000100, -+ 0x40000002, -+ 0x00000100, -+ 0x40000002, - 0x00000100, - 0x40000002, - 0x00000100, - 0x00000002, -- 0x042A8350, -- 0x000070EA, -- 0x86000000, -- 0x08000004, -+ 0x00020000, -+ 0x08000000, - 0x00000000, -- 0x00482000, -- 0x21800000, -- 0x00101061, -- 0x021541A8, -- 0x00003875, -- 0x011541A8, -- 0x00003875, -- 0x021541A8, -- 0x20003875, -+ 0x00000020, -+ 0x00008000, -+ 0x20001000, -+ 0x00000080, -+ 0x20000001, -+ 0x00000080, -+ 0x20000001, -+ 0x00000080, -+ 0x20000001, - 0x00000080, - 0x00000001, -- 0x41000000, -- 0x00000002, -- 0x00FF0904, -+ 0x00010000, -+ 0x04000000, -+ 0x00FF0000, - 0x00000000, -- 0x90400000, -- 0x00000820, -+ 0x00004000, -+ 0x00000800, - 0x80000001, -- 0x38D612AF, -- 0x86F8E38E, -- 0x0A0A78B4, -- 0x000D020A, -+ 0x00041419, -+ 0x40000000, -+ 0x04000816, -+ 0x000D0000, - 0x00006800, -- 0x028A4320, -- 0xEBB4D23D, -- 0x8F65E791, -- 0xA47A0F3C, -- 0x0001A769, -- 0x00410D00, -+ 0x00000340, -+ 0xD000001A, -+ 0x06800000, -+ 0x00340000, -+ 0x0001A000, -+ 0x00000D00, - 0x40000068, -- 0x3D000003, -- 0x91EBB4D2, -- 0x3C8F65E7, -- 0x69A47A0F, -- 0x000001A7, -+ 0x1A000003, -+ 0x00D00000, -+ 0x00068000, -+ 0x00003400, -+ 0x000001A0, -+ 0x00000401, -+ 0x00000008, - 0x00000401, - 0x00000008, - 0x00000401, - 0x00000008, -- 0x00000540, -- 0x000003A8, -- 0x10AA0D40, -- 0x8001C3A8, -+ 0x00000401, -+ 0x80000008, - 0x0000007F, -+ 0x20000000, - 0x00000000, -- 0x00004060, -- 0xE1208000, -+ 0xE0000080, - 0x0000001F, -- 0x00004100, -+ 0x00004000, - }; - -diff --git a/board/altera/socfpga_cyclone5/pinmux_config.c b/board/altera/socfpga_cyclone5/pinmux_config.c -index 730067e..cfd74cd 100644 ---- a/board/altera/socfpga_cyclone5/pinmux_config.c -+++ b/board/altera/socfpga_cyclone5/pinmux_config.c -@@ -23,7 +23,7 @@ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = { - 0, /* EMACIO18 */ - 0, /* EMACIO19 */ - 3, /* FLASHIO0 */ -- 3, /* FLASHIO1 */ -+ 0, /* FLASHIO1 */ - 3, /* FLASHIO2 */ - 3, /* FLASHIO3 */ - 0, /* FLASHIO4 */ -@@ -34,25 +34,25 @@ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = { - 3, /* FLASHIO9 */ - 3, /* FLASHIO10 */ - 3, /* FLASHIO11 */ -- 3, /* GENERALIO0 */ -- 3, /* GENERALIO1 */ -- 3, /* GENERALIO2 */ -- 3, /* GENERALIO3 */ -- 3, /* GENERALIO4 */ -- 3, /* GENERALIO5 */ -- 3, /* GENERALIO6 */ -- 3, /* GENERALIO7 */ -- 3, /* GENERALIO8 */ -+ 0, /* GENERALIO0 */ -+ 1, /* GENERALIO1 */ -+ 1, /* GENERALIO2 */ -+ 1, /* GENERALIO3 */ -+ 1, /* GENERALIO4 */ -+ 0, /* GENERALIO5 */ -+ 0, /* GENERALIO6 */ -+ 0, /* GENERALIO7 */ -+ 0, /* GENERALIO8 */ - 3, /* GENERALIO9 */ - 3, /* GENERALIO10 */ - 3, /* GENERALIO11 */ - 3, /* GENERALIO12 */ -- 2, /* GENERALIO13 */ -- 2, /* GENERALIO14 */ -- 3, /* GENERALIO15 */ -- 3, /* GENERALIO16 */ -- 2, /* GENERALIO17 */ -- 2, /* GENERALIO18 */ -+ 0, /* GENERALIO13 */ -+ 0, /* GENERALIO14 */ -+ 1, /* GENERALIO15 */ -+ 1, /* GENERALIO16 */ -+ 1, /* GENERALIO17 */ -+ 1, /* GENERALIO18 */ - 0, /* GENERALIO19 */ - 0, /* GENERALIO20 */ - 0, /* GENERALIO21 */ -diff --git a/board/altera/socfpga_cyclone5/pinmux_config.h b/board/altera/socfpga_cyclone5/pinmux_config.h -index fb483ab..64c750a 100644 ---- a/board/altera/socfpga_cyclone5/pinmux_config.h -+++ b/board/altera/socfpga_cyclone5/pinmux_config.h -@@ -11,15 +11,15 @@ - #define CONFIG_HPS_UART0 (1) - #define CONFIG_HPS_UART1 (0) - #define CONFIG_HPS_TRACE (0) --#define CONFIG_HPS_I2C0 (1) --#define CONFIG_HPS_I2C1 (0) -+#define CONFIG_HPS_I2C0 (0) -+#define CONFIG_HPS_I2C1 (1) - #define CONFIG_HPS_I2C2 (0) - #define CONFIG_HPS_I2C3 (0) - #define CONFIG_HPS_SPIM0 (1) --#define CONFIG_HPS_SPIM1 (0) -+#define CONFIG_HPS_SPIM1 (1) - #define CONFIG_HPS_SPIS0 (0) - #define CONFIG_HPS_SPIS1 (0) --#define CONFIG_HPS_CAN0 (1) -+#define CONFIG_HPS_CAN0 (0) - #define CONFIG_HPS_CAN1 (0) - - #define CONFIG_HPS_SDMMC_BUSWIDTH (4) -diff --git a/board/altera/socfpga_cyclone5/sdram/sdram_config.h b/board/altera/socfpga_cyclone5/sdram/sdram_config.h -index b90d6f3..dd027ef 100755 ---- a/board/altera/socfpga_cyclone5/sdram/sdram_config.h -+++ b/board/altera/socfpga_cyclone5/sdram/sdram_config.h -@@ -4,16 +4,16 @@ - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMTYPE (2) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMBL (8) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ADDRORDER (0) --#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN (1) --#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN (1) -+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN (0) -+#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN (0) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_REORDEREN (1) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_STARVELIMIT (10) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_DQSTRKEN (0) - #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_NODMPINS (0) --#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL (6) -+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL (8) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_AL (0) --#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL (7) --#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD (4) -+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL (11) -+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD (3) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TFAW (12) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRFC (104) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TREFI (3120) -@@ -21,7 +21,7 @@ - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRP (6) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWR (6) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWTR (4) --#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP (4) -+#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP (3) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRAS (14) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRC (20) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TMRD (4) -@@ -33,7 +33,7 @@ - #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_ROWBITS (15) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_BANKBITS (3) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_CSBITS (1) --#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH (40) -+#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH (32) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMDEVWIDTH_DEVWIDTH (8) - #define CONFIG_HPS_SDR_CTRLCFG_DRAMINTR_INTREN (0) - #define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL (2) -diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h -index e8c5484..919676d 100644 ---- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h -+++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h -@@ -34,7 +34,7 @@ - #define __RW_MGR_ac_read_en 0x21 - #define __RW_MGR_ac_mrs3_mirr 0x0C - #define __RW_MGR_ac_mrs2 0x05 --#define __RW_MGR_CONTENT_ac_mrs1 0x10090044 -+#define __RW_MGR_CONTENT_ac_mrs1 0x10090006 - #define __RW_MGR_CONTENT_ac_mrs3 0x100B0000 - #define __RW_MGR_CONTENT_ac_write_bank_0_col_0_nodata_wl_1 0x18980000 - #define __RW_MGR_CONTENT_ac_act_1 0x106B0000 -@@ -46,8 +46,8 @@ - #define __RW_MGR_CONTENT_ac_init_reset_0_cke_0 0x20700000 - #define __RW_MGR_CONTENT_ac_read_bank_0_1_norden 0x10580008 - #define __RW_MGR_CONTENT_ac_pre_all 0x10280400 --#define __RW_MGR_CONTENT_ac_mrs0_user 0x10080431 --#define __RW_MGR_CONTENT_ac_mrs0_dll_reset 0x10080530 -+#define __RW_MGR_CONTENT_ac_mrs0_user 0x10080471 -+#define __RW_MGR_CONTENT_ac_mrs0_dll_reset 0x10080570 - #define __RW_MGR_CONTENT_ac_read_bank_0_0 0x13580000 - #define __RW_MGR_CONTENT_ac_write_bank_0_col_1 0x1C980008 - #define __RW_MGR_CONTENT_ac_read_bank_0_1 0x13580008 -@@ -55,21 +55,21 @@ - #define __RW_MGR_CONTENT_ac_write_bank_1_col_1 0x1C9B0008 - #define __RW_MGR_CONTENT_ac_write_bank_0_col_0 0x1C980000 - #define __RW_MGR_CONTENT_ac_read_bank_1_0 0x135B0000 --#define __RW_MGR_CONTENT_ac_mrs1_mirr 0x100A0024 -+#define __RW_MGR_CONTENT_ac_mrs1_mirr 0x100A0006 - #define __RW_MGR_CONTENT_ac_read_bank_1_1 0x135B0008 - #define __RW_MGR_CONTENT_ac_des_odt_1 0x38780000 --#define __RW_MGR_CONTENT_ac_mrs0_dll_reset_mirr 0x100804C8 -+#define __RW_MGR_CONTENT_ac_mrs0_dll_reset_mirr 0x100804E8 - #define __RW_MGR_CONTENT_ac_zqcl 0x10380400 - #define __RW_MGR_CONTENT_ac_write_predata 0x38F80000 --#define __RW_MGR_CONTENT_ac_mrs0_user_mirr 0x10080449 -+#define __RW_MGR_CONTENT_ac_mrs0_user_mirr 0x10080469 - #define __RW_MGR_CONTENT_ac_ref 0x10480000 - #define __RW_MGR_CONTENT_ac_nop 0x30780000 - #define __RW_MGR_CONTENT_ac_rdimm 0x10780000 --#define __RW_MGR_CONTENT_ac_mrs2_mirr 0x10090010 -+#define __RW_MGR_CONTENT_ac_mrs2_mirr 0x10090218 - #define __RW_MGR_CONTENT_ac_write_bank_0_col_0_nodata 0x18180000 - #define __RW_MGR_CONTENT_ac_read_en 0x33780000 - #define __RW_MGR_CONTENT_ac_mrs3_mirr 0x100B0000 --#define __RW_MGR_CONTENT_ac_mrs2 0x100A0008 -+#define __RW_MGR_CONTENT_ac_mrs2 0x100A0218 - - #define __RW_MGR_READ_B2B_WAIT2 0x6A - #define __RW_MGR_LFSR_WR_RD_BANK_0_WAIT 0x31 -diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c -index e16efa1..20b4ca1 100644 ---- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c -+++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c -@@ -6,16 +6,16 @@ const alt_u32 ac_rom_init[36] = - { - 0x20700000, - 0x20780000, -- 0x10080431, -- 0x10080530, -- 0x10090044, -- 0x100a0008, -+ 0x10080471, -+ 0x10080570, -+ 0x10090006, -+ 0x100a0218, - 0x100b0000, - 0x10380400, -- 0x10080449, -- 0x100804c8, -- 0x100a0024, -- 0x10090010, -+ 0x10080469, -+ 0x100804e8, -+ 0x100a0006, -+ 0x10090218, - 0x100b0000, - 0x30780000, - 0x38780000, -diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h -index 52faf3f..b85b85c 100644 ---- a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h -+++ b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h -@@ -1,28 +1,28 @@ - #ifndef _SEQUENCER_DEFINES_H_ - #define _SEQUENCER_DEFINES_H_ - --#define AC_ROM_MR1_MIRR 0000000100100 -+#define AC_ROM_MR1_MIRR 0000000000110 - #define AC_ROM_MR1_OCD_ENABLE --#define AC_ROM_MR2_MIRR 0000000010000 -+#define AC_ROM_MR2_MIRR 0001000011000 - #define AC_ROM_MR3_MIRR 0000000000000 - #define AC_ROM_MR0_CALIB --#define AC_ROM_MR0_DLL_RESET_MIRR 0010011001000 --#define AC_ROM_MR0_DLL_RESET 0010100110000 --#define AC_ROM_MR0_MIRR 0010001001001 --#define AC_ROM_MR0 0010000110001 --#define AC_ROM_MR1 0000001000100 --#define AC_ROM_MR2 0000000001000 -+#define AC_ROM_MR0_DLL_RESET_MIRR 0010011101000 -+#define AC_ROM_MR0_DLL_RESET 0010101110000 -+#define AC_ROM_MR0_MIRR 0010001101001 -+#define AC_ROM_MR0 0010001110001 -+#define AC_ROM_MR1 0000000000110 -+#define AC_ROM_MR2 0001000011000 - #define AC_ROM_MR3 0000000000000 - #define AFI_CLK_FREQ 401 - #define AFI_RATE_RATIO 1 - #define ARRIAVGZ 0 - #define ARRIAV 0 --#define AVL_CLK_FREQ 67 -+#define AVL_CLK_FREQ 81 - #define BFM_MODE 0 - #define BURST2 0 - #define CALIBRATE_BIT_SLIPS 0 --#define CALIB_LFIFO_OFFSET 7 --#define CALIB_VFIFO_OFFSET 5 -+#define CALIB_LFIFO_OFFSET 11 -+#define CALIB_VFIFO_OFFSET 9 - #define CYCLONEV 1 - #define DDR2 0 - #define DDR3 1 -@@ -89,20 +89,20 @@ - #define RW_MGR_MEM_CHIP_SELECT_WIDTH 1 - #define RW_MGR_MEM_CLK_EN_WIDTH 1 - #define RW_MGR_MEM_CONTROL_WIDTH 1 --#define RW_MGR_MEM_DATA_MASK_WIDTH 5 --#define RW_MGR_MEM_DATA_WIDTH 40 -+#define RW_MGR_MEM_DATA_MASK_WIDTH 4 -+#define RW_MGR_MEM_DATA_WIDTH 32 - #define RW_MGR_MEM_DQ_PER_READ_DQS 8 - #define RW_MGR_MEM_DQ_PER_WRITE_DQS 8 --#define RW_MGR_MEM_IF_READ_DQS_WIDTH 5 --#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH 5 -+#define RW_MGR_MEM_IF_READ_DQS_WIDTH 4 -+#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH 4 - #define RW_MGR_MEM_NUMBER_OF_CS_PER_DIMM 1 - #define RW_MGR_MEM_NUMBER_OF_RANKS 1 - #define RW_MGR_MEM_ODT_WIDTH 1 - #define RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS 1 - #define RW_MGR_MEM_VIRTUAL_GROUPS_PER_WRITE_DQS 1 - #define RW_MGR_MR0_BL 1 --#define RW_MGR_MR0_CAS_LATENCY 3 --#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH 5 -+#define RW_MGR_MR0_CAS_LATENCY 7 -+#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH 4 - #define RW_MGR_WRITE_TO_DEBUG_READ 1.0 - #define SKEW_CALIBRATION 0 - #define STATIC_FULL_CALIBRATION 1 --- -1.9.0 - diff --git a/buildroot/board/altera/socrates_cyclone5/boot-env.txt b/buildroot/board/altera/socrates_cyclone5/boot-env.txt new file mode 100644 index 000000000..ed5b61386 --- /dev/null +++ b/buildroot/board/altera/socrates_cyclone5/boot-env.txt @@ -0,0 +1,8 @@ +linux_load_address=0x100000 +linux_dtb_load_address=0x100 +linux_dtb=socfpga_cyclone5_socrates.dtb +linux_load=mmc rescan; fatload mmc 0:1 ${linux_load_address} zImage; fatload mmc 0:1 ${linux_dtb_load_address} ${linux_dtb} +bootargs=console=ttyS0,115200 root=/dev/mmcblk0p3 ro rootwait +source_env=fatload mmc 0:1 0x2000000 boot.scr; source 0x2000000 +bootcmd=run linux_load; bootz ${linux_load_address} - ${linux_dtb_load_address} +bootdelay=1 diff --git a/buildroot/board/altera/socrates_cyclone5/genimage.cfg b/buildroot/board/altera/socrates_cyclone5/genimage.cfg new file mode 100644 index 000000000..63fef8ba4 --- /dev/null +++ b/buildroot/board/altera/socrates_cyclone5/genimage.cfg @@ -0,0 +1,58 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "socfpga_cyclone5_socrates.dtb" + } + } + size = 8M +} + +image uboot.img { + hdimage { + partition-table = "no" + } + + partition spl { + in-partition-table = "no" + image = "u-boot-spl.bin.crc" + offset = 0 + size = 64k + } + + partition uboot-full { + in-partition-table = "no" + image = "u-boot.img" + offset = 256k + } + + size = 1M +} + +image sdcard.img { + hdimage { + } + + partition uboot-env { + in-partition-table = "no" + image = "uboot-env.bin" + offset = 17408 # 512 * 34 -> just after gpt + } + + partition boot { + partition-type = 0xc + bootable = "true" + image = "boot.vfat" + } + + partition uboot { + partition-type = 0xa2 + image = "uboot.img" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 500M + } +} diff --git a/buildroot/board/altera/socrates_cyclone5/readme.txt b/buildroot/board/altera/socrates_cyclone5/readme.txt new file mode 100644 index 000000000..4e78feef1 --- /dev/null +++ b/buildroot/board/altera/socrates_cyclone5/readme.txt @@ -0,0 +1,52 @@ +EBV SoCrates Evaluation Board + +Intro +===== + +More information about this board can be found here: +https://rocketboards.org/foswiki/Documentation/EBVSoCratesEvaluationBoard + +Build +===== + +First, load socrates config for buildroot + + make socrates_cyclone5_defconfig + +Build everything + + make + +Following files will be generated in output/images + +. +├── boot.vfat +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── socfpga_cyclone5_socrates.dtb +├── u-boot-spl.bin +├── u-boot-spl.bin.crc +├── u-boot.bin +├── u-boot.img +├── uboot-env.bin +├── uboot.img +└── zImage + + +Creating bootable SD card +========================= + +Simply invoke + +dd if=output/images/sdcard.img of=/dev/sdX + +Where X is your SD card device (not partition) + +Booting +======= + +Pins 6:8 on P18 selector is used to determine boot device. To boot socrates from +sdcard set these pins to value 0x5 (101b). Remaining pins are used to determine +how to configure FPGA and are not associated with booting into Linux kernel. diff --git a/buildroot/board/amarula/a64-relic/extlinux.conf b/buildroot/board/amarula/a64-relic/extlinux.conf new file mode 100644 index 000000000..9f469846b --- /dev/null +++ b/buildroot/board/amarula/a64-relic/extlinux.conf @@ -0,0 +1,4 @@ +label linux-4.17.0-rc3 + kernel /Image + devicetree /sun50i-a64-amarula-relic.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p4 rootwait diff --git a/buildroot/board/amarula/a64-relic/genimage.cfg b/buildroot/board/amarula/a64-relic/genimage.cfg new file mode 100644 index 000000000..002b6bb4d --- /dev/null +++ b/buildroot/board/amarula/a64-relic/genimage.cfg @@ -0,0 +1,10 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-amarula-relic.dtb", + "extlinux" + } + } + size = 64M +} diff --git a/buildroot/board/amarula/a64-relic/post-build.sh b/buildroot/board/amarula/a64-relic/post-build.sh new file mode 100755 index 000000000..ec20fca7d --- /dev/null +++ b/buildroot/board/amarula/a64-relic/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/amarula/a64-relic/readme.txt b/buildroot/board/amarula/a64-relic/readme.txt new file mode 100644 index 000000000..77f79e309 --- /dev/null +++ b/buildroot/board/amarula/a64-relic/readme.txt @@ -0,0 +1,90 @@ +Amarula A64 Relic +================ + +Amarula A64-Relic is an Allwinner A64 based IoT device, which supports: +- Allwinner A64 Cortex-A53 +- Mali-400MP2 GPU +- AXP803 PMIC +- 1GB DDR3 RAM +- 8GB eMMC +- AP6330 Wifi/BLE +- MIPI-DSI +- CSI: OV5640 sensor +- USB OTG +- 12V DC power supply + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Amarual+A64-Relic + +Build +===== + + $ make amarula_a64_relic_defconfig + + $ make + +build files at output/images/: + - sunxi-spl.bin + - u-boot.itb + - Image + - sun50i-a64-amarula-relic.dtb + - boot.vfat + - rootfs.ext4 + +Write eMMC +========= + +The board comes with an operating system preloaded on the eMMC. +To replace it with the Buildroot-built system, take the following +steps + +1. Connect the board UART with host and open minicom(ttyUSBx/115200N8) + +2. Supply 12V DC for power-on the board. + +3. Interrupt U-Boot by pressing enter + +4. Create GPT partitions + => mmc dev 1 + => gpt write mmc 1 $partitions + +5. Connect the board USB-OTG with USB slot on the host. + +6. Initiate fastboot + => fastboot 0 + +7. Write images from host onto eMMC using fastboot + $ cd output/images + $ sudo fastboot -i 0x1f3a flash loader1 sunxi-spl.bin + $ sudo fastboot -i 0x1f3a flash loader2 u-boot.itb + $ sudo fastboot -i 0x1f3a flash esp boot.vfat + $ sudo fastboot -i 0x1f3a flash system rootfs.ext4 + +Update eMMC during Development +============================== + +During development, reflashing the entire filesystem image at every +change is time consuming. A useful alternative is to directly access +over USB the filesystem stored on the eMMC, using the USB Mass Storage +capability of U-Boot. To achieve this: + +1. Build U-Boot by enabling UMS + $ make uboot-menuconfig + (select CONFIG_CMD_USB_MASS_STORAGE=y) + +2. Follow all 6 steps from 'Write eMMC' and mount eMMC on host + => mmc dev 1 + => ums 0 mmc 1 + +WiFi +==== + + # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf + (type password and enter) + # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B + # udhcpc -i wlan0 + # ping google.com + +-- +Jagan Teki +29-Jun-2018 diff --git a/buildroot/board/amarula/a64-relic/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt b/buildroot/board/amarula/a64-relic/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt new file mode 100644 index 000000000..d095f24c2 --- /dev/null +++ b/buildroot/board/amarula/a64-relic/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt @@ -0,0 +1,83 @@ +#AP6330_NVRAM_V1.0_20121130 +#Sample variables file for BCM94330 SD FC AGB board +manfid=0x2d0 +prodid=0x0547 +vendid=0x14e4 +devid=0x4360 +boardtype=0x05e1 +boardrev=0x1202 +boardflags=0x0080200 +nocrc=1 +xtalfreq=26000 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +ag0=254 +aa2g=1 +ccode=ALL +pa0itssit=0x20 +pa0b0=5587 +pa0b1=-633 +pa0b2=-158 +rssismf2g=0xa +rssismc2g=0x3 +rssisav2g=0x7 +#rssi params for 5GHz +rssismf5g=0x4 +rssismc5g=0x3 +rssisav5g=0x7 +#PA parameters for lower a-band +pa1lob0=4748 +pa1lob1=-566 +pa1lob2=-180 +#PA parameters for midband +pa1b0=4762 +pa1b1=-593 +pa1b2=-172 +#PA parameters for high band +#pa1hib0=4596 +pa1hib0=4666 +pa1hib1=-619 +pa1hib2=-163 +rxpo5g=0 +maxp2ga0=74 +maxp5ga0=66 +maxp5gla0=66 +maxp5gha0=66 +# 2.4G Tx Power offsets +cck2gpo=0x2222 +ofdm2gpo=0x44444444 +mcs2gpo0=0x6666 +mcs2gpo1=0x6666 +# 5G Tx Power offsets +ofdm5gpo=0x44444444 +ofdm5glpo=0x44444444 +ofdm5ghpo=0x44444444 +mcs5gpo0=0x6666 +mcs5gpo1=0x6666 +mcs5glpo0=0x6666 +mcs5glpo1=0x6666 +mcs5ghpo0=0x6666 +mcs5ghpo1=0x6666 +sromrev=3 +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b +cckPwrOffset=4 +swctrlmap_2g=0x44844484,0x42824282,0x40804484,0x18282,0x1ff +triso5g=0 +swctrlmap_5g=0x00100010,0x20202020,0x20202020,0x14202,0x0f0 +rfreg033=0x19 +rfreg033_cck=0x1f +dacrate2g=160 +dacrate5g=160 +txalpfbyp2g=1 +bphyscale=17 +cckPwrIdxCorr=-15 +pacalidx2g=50 +#pacalidx5g=20 +noise_cal_ref_2g=53 +noise_cal_po_2g=0 +noise_cal_ref_5g=52 +noise_cal_po_5g=5,0,0 +# 4330 OOB parameter: High level trigger +muxenab=0x10 + diff --git a/buildroot/board/amarula/vyasa/extlinux.conf b/buildroot/board/amarula/vyasa/extlinux.conf new file mode 100644 index 000000000..a8fcc35f5 --- /dev/null +++ b/buildroot/board/amarula/vyasa/extlinux.conf @@ -0,0 +1,4 @@ +label Vyasa linux-next + kernel /boot/uImage + devicetree /boot/rk3288-vyasa.dtb + append console=ttyS2,115200n8 root=/dev/mmcblk0p1 rootwait diff --git a/buildroot/board/amarula/vyasa/genimage.cfg b/buildroot/board/amarula/vyasa/genimage.cfg new file mode 100644 index 000000000..e7076679d --- /dev/null +++ b/buildroot/board/amarula/vyasa/genimage.cfg @@ -0,0 +1,22 @@ +image sdcard.img { + hdimage { + } + + partition u-boot-tpl-spl-dtb { + in-partition-table = "no" + image = "u-boot-tpl-spl-dtb.img" + offset = 32K + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 8M + size = 30M # falcon mode: args @ 16M args, uImage @ 17M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/amarula/vyasa/linux_gmac.fragment b/buildroot/board/amarula/vyasa/linux_gmac.fragment new file mode 100644 index 000000000..8ebf38359 --- /dev/null +++ b/buildroot/board/amarula/vyasa/linux_gmac.fragment @@ -0,0 +1,3 @@ +# Currently mainline kernel exhibits issues when running rockchip gmac +# on the board, so enable it as loadable module and insert it later +CONFIG_DWMAC_ROCKCHIP=m diff --git a/buildroot/board/amarula/vyasa/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch b/buildroot/board/amarula/vyasa/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch new file mode 100644 index 000000000..64a147c09 --- /dev/null +++ b/buildroot/board/amarula/vyasa/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch @@ -0,0 +1,35 @@ +From 8ee2b03039cccf64402a72dea2185d7fe1972729 Mon Sep 17 00:00:00 2001 +From: Shyam Saini +Date: Mon, 15 Apr 2019 16:16:16 +0530 +Subject: [PATCH] include: configs: Increase CONFIG_SYS_BOOTM_LEN to 16MB + +The default value of CONFIG_SYS_BOOTM_LEN is 0x800000 i.e, 8MB which +causes board reset because of larger uImage size. + +Error log snippet: + Booting using the fdt blob at 0x1f00000 + Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN +Must RESET board to recover +resetting ... + +Signed-off-by: Shyam Saini +--- + include/configs/rk3288_common.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h +index 72a54bc0ab..eab7cf4d86 100644 +--- a/include/configs/rk3288_common.h ++++ b/include/configs/rk3288_common.h +@@ -9,6 +9,8 @@ + #include + #include "rockchip-common.h" + ++#define CONFIG_SYS_BOOTM_LEN (16 << 20) /* 16MB */ ++ + #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY + #define CONFIG_SYS_MALLOC_LEN (32 << 20) + #define CONFIG_SYS_CBSIZE 1024 +-- +2.11.0 + diff --git a/buildroot/board/amarula/vyasa/post-build.sh b/buildroot/board/amarula/vyasa/post-build.sh new file mode 100755 index 000000000..ffbbcdeb5 --- /dev/null +++ b/buildroot/board/amarula/vyasa/post-build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +MKIMAGE=$HOST_DIR/bin/mkimage +BOARD_DIR="$(dirname $0)" + +$MKIMAGE -n rk3288 -T rksd -d $BINARIES_DIR/u-boot-tpl.bin $BINARIES_DIR/u-boot-tpl.img +cat $BINARIES_DIR/u-boot-tpl.img $BINARIES_DIR/u-boot-spl-dtb.bin > $BINARIES_DIR/u-boot-tpl-spl-dtb.img + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/amarula/vyasa/readme.txt b/buildroot/board/amarula/vyasa/readme.txt new file mode 100644 index 000000000..b95889e81 --- /dev/null +++ b/buildroot/board/amarula/vyasa/readme.txt @@ -0,0 +1,31 @@ +Vyasa RK3288 +============ + +Vyasa is RK3288 based Single board computer with fully supported opensource software. + +https://openedev.amarulasolutions.com/display/ODWIKI/Vyasa+RK3288 + +How to build it +=============== + + $ make amarula_vyasa_rk3288_defconfig + +Then you can edit the build options using + + $ make menuconfig + +Compile all and build rootfs image: + + $ make + +Prepare your SDCard +=================== + +Buildroot generates a ready-to-use SD card image that you can flash directly to +the card. The image will be in output/images/sdcard.img. +You can write this image directly to an SD card device (i.e. /dev/xxx): + + $ sudo dd if=output/images/sdcard.img of=/dev/xxx + $ sudo sync + +Finally, you can insert the SD card to the Vyasa RK3288 board, close J4 and boot it. diff --git a/buildroot/board/andes/ae3xx/ae3xx.fragment b/buildroot/board/andes/ae3xx/ae3xx.fragment new file mode 100644 index 000000000..3b13d1074 --- /dev/null +++ b/buildroot/board/andes/ae3xx/ae3xx.fragment @@ -0,0 +1 @@ +CONFIG_NDS32_BUILTIN_DTB="ae3xx" diff --git a/buildroot/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch b/buildroot/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch new file mode 100644 index 000000000..adb60937b --- /dev/null +++ b/buildroot/board/andes/patches/linux/0001-nds32-Fix-boot-messages-garbled.patch @@ -0,0 +1,28 @@ +From 90d52d180dcc5d1300dc352ca709eb6453894143 Mon Sep 17 00:00:00 2001 +From: Nylon Chen +Date: Wed, 28 Nov 2018 16:26:46 +0800 +Subject: [PATCH] nds32: Fix boot messages garbled + +In order to display uart correctly we have to pass the correct setting of uart to kernel by bootarg. +This patch will provide such settings to set the correct uart baud rate. + +Signed-off-by: Nylon Chen +--- + arch/nds32/boot/dts/ae3xx.dts | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/nds32/boot/dts/ae3xx.dts b/arch/nds32/boot/dts/ae3xx.dts +index bb39749a6673..aefe2090926a 100644 +--- a/arch/nds32/boot/dts/ae3xx.dts ++++ b/arch/nds32/boot/dts/ae3xx.dts +@@ -6,6 +6,7 @@ + interrupt-parent = <&intc>; + + chosen { ++ bootargs = "memblock=debug earlycon console=ttyS0,38400n8 debug loglevel=7"; + stdout-path = &serial0; + }; + +-- +2.18.0 + diff --git a/buildroot/board/andes/readme.txt b/buildroot/board/andes/readme.txt new file mode 100644 index 000000000..0f95c6554 --- /dev/null +++ b/buildroot/board/andes/readme.txt @@ -0,0 +1,49 @@ +Intro +===== + +Andestech(nds32) AE3XX Platform + +The AE3XX prototype demonstrates the AE3XX example platform on the FPGA. +It is composed of one Andestech(nds32) processor and AE3XX. + +How to build it +=============== + +Configure Buildroot +------------------- + +The andes_ae3xx_defconfig configuration is a sample configuration with +all that is required to bring the FPGA Development Board: + + $ make andes_ae3xx_defconfig + +Build everything +---------------- +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + + $ make + +Result of the build +------------------- + +After building, you should obtain this tree: + +output/images/ + +-- vmlinux + +-- rootfs.cpio + +-- rootfs.tar + +How to run it +============= + +Run +--- + + Setup the Console with the rate 38400/8-N-1. + + $ cd output/images + $ ../host/bin/nds32le-linux-gdb vmlinux + $ target remote [your host] + $ lo + $ c diff --git a/buildroot/board/arcturus/aarch64-ucls1012a/post-build.sh b/buildroot/board/arcturus/aarch64-ucls1012a/post-build.sh new file mode 100755 index 000000000..f8ba78095 --- /dev/null +++ b/buildroot/board/arcturus/aarch64-ucls1012a/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +mkdir -p ${TARGET_DIR}/lib/firmware +cp -f ${BUILD_DIR}/linux-custom/firmware/ppfe/* ${TARGET_DIR}/lib/firmware/ +cp -f ${BUILD_DIR}/linux-custom/br2-ucls1012a.its ${BINARIES_DIR}/ diff --git a/buildroot/board/arcturus/aarch64-ucls1012a/post-image.sh b/buildroot/board/arcturus/aarch64-ucls1012a/post-image.sh new file mode 100755 index 000000000..ccfacd385 --- /dev/null +++ b/buildroot/board/arcturus/aarch64-ucls1012a/post-image.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +MKIMAGE=${HOST_DIR}/usr/bin/mkimage +MKIMAGE_IN=${BINARIES_DIR}/br2-ucls1012a.its +MKIMAGE_OUT=${BINARIES_DIR}/part0-000000.itb +${MKIMAGE} -f ${MKIMAGE_IN} ${MKIMAGE_OUT} diff --git a/buildroot/board/arcturus/aarch64-ucls1012a/readme.txt b/buildroot/board/arcturus/aarch64-ucls1012a/readme.txt new file mode 100644 index 000000000..483d5e9ae --- /dev/null +++ b/buildroot/board/arcturus/aarch64-ucls1012a/readme.txt @@ -0,0 +1,74 @@ +Arcturus uCLS1012A SoM +====================== + +This tutorial describes how to use the predefined Buildroot +configuration for the Arcturus uCLS101A SoM platform. + +Additional information about the uCLS1012A System on Module can be found at +https://www.arcturusnetworks.com/products/ucls1012a +and product support for registered users at +https://www.arcturusnetworks.com/support + +Building +-------- + +Return to the top directory and execute the following commands. + + make arcturus_ucls1012a_defconfig + make + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- arc-ucls1012a.dtb + +-- Image + +-- part0-000000.itb + +-- rootfs.cpio + +-- rootfs.cpio.gz + +-- rootfs.tar + +-- u-boot.bin + +-- ucls1012a.its + +Flashing +-------- + +You'll need to program the image created by buildroot into the SPI NOR flash. + +1. Reboot your module and via the serial console press to enter the B$ +u-boot shell. + From the shell you will need to update four environment variables replacing the + IPv4 IP Address with ones that will work with your network and tftp server. + + B$ setenv ipaddr 192.168.1.81 + B$ setenv serverip 192.168.1.80 + B$ setenv gatewayip 192.168.1.1 + B$ setenv netmask 255.255.255.0 + B$ saveenv + +2. Enable tftp server to serve the /output/images/ folder. + +3. Program the new U-Boot binary (optional) + If you don't feel confident upgrading your bootloader then don't do it, + it's unnecessary most of the time. + + B$ tftp u-boot.bin + B$ run program_uboot + +4. Program the ITB image (includes Kernel, DTB and Ramdisk) + + B$ tftp part0-000000.itb + B$ run iprogram + +5. Booting your new system + + Reboot your system by reset command + B$ reset + + or + + B$ run bootcmd + +Good Luck ! diff --git a/buildroot/board/arcturus/aarch64-ucls1012a/rootfs_overlay/etc/init.d/S09modload b/buildroot/board/arcturus/aarch64-ucls1012a/rootfs_overlay/etc/init.d/S09modload new file mode 100755 index 000000000..c87ffda14 --- /dev/null +++ b/buildroot/board/arcturus/aarch64-ucls1012a/rootfs_overlay/etc/init.d/S09modload @@ -0,0 +1,14 @@ +#!/bin/sh +# +case "$1" in + start) + modprobe pfe + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/buildroot/board/arcturus/ppc-ucp1020/readme.txt b/buildroot/board/arcturus/ppc-ucp1020/readme.txt new file mode 100644 index 000000000..07986f50e --- /dev/null +++ b/buildroot/board/arcturus/ppc-ucp1020/readme.txt @@ -0,0 +1,74 @@ +Arcturus uCP1020 SoM +==================== + +This tutorial describes how to use the predefined Buildroot +configuration for the Arcturus uCP1020 SoM platform. + +Additional information about this module can be found at + + +Building +-------- + + make arcturus_ucp1020_defconfig + make + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.jffs2 + +-- rootfs.tar + +-- u-boot.bin + +-- ucp1020.dtb + +-- uImage + +Flashing +-------- + +You'll need to program the files created by buildroot into the NOR flash. + +1. Program the new U-Boot binary (optional) + If you don't feel confident upgrading your bootloader then don't do it, + it's unnecessary most of the time. + + B$ tftp u-boot.bin + B$ protect off 0xeff80000 +$filesize + B$ erase 0xeff80000 +$filesize + B$ cp.b $loadaddr 0xeff80000 $filesize + B$ protect on 0xeff80000 +$filesize + +2. Program the kernel + + B$ tftp uImage + B$ erase 0xec140000 +$filesize + B$ cp.b $loadaddr 0xec140000 $filesize + +3. Program the DTB + + B$ tftp ucp1020.dtb + B$ erase 0xec100000 +$filesize + B$ cp.b $loadaddr 0xec100000 $filesize + +4. Program the jffs2 root filesystem + + B$ tftp rootfs.jffs2 + B$ erase 0xec800000 0xee8fffff + B$ cp.b $loadaddr 0xec800000 $filesize + +5. Booting your new system + + B$ setenv norboot 'setenv bootargs root=/dev/mtdblock1 rootfstype=jffs2 console=$consoledev,$baudrate;bootm 0xec140000 - 0xec100000' + + If you want to set this boot option as default: + + B$ setenv bootcmd 'run norboot' + B$ saveenv + + ...or for a single boot: + + B$ run norboot + +Good Luck ! diff --git a/buildroot/board/arm/foundation-v8/readme.txt b/buildroot/board/arm/foundation-v8/readme.txt index f6d06988f..1dedf68cb 100644 --- a/buildroot/board/arm/foundation-v8/readme.txt +++ b/buildroot/board/arm/foundation-v8/readme.txt @@ -3,14 +3,14 @@ ARM software simulator of the AArch64 architecture. First, one has to download the AArch64 software simulator from: - https://silver.arm.com/download/download.tm?pv=1509509 + https://silver.arm.com/download/download.tm?pv=2663527 Then, use the arm_foundationv8_defconfig configuration to build your Buildroot system. Finally, boot your system with: - ${LOCATION_OF_FOUNDATIONV8_SIMULATOR}/Foundation_v8 \ + ${LOCATION_OF_FOUNDATIONV8_SIMULATOR}/models/Linux64_GCC-4.7/Foundation_Platform \ --image output/images/linux-system.axf \ --block-device output/images/rootfs.ext2 \ --network=nat diff --git a/buildroot/board/arm/juno/linux-juno-defconfig b/buildroot/board/arm/juno/linux-juno-defconfig new file mode 100644 index 000000000..64598d21a --- /dev/null +++ b/buildroot/board/arm/juno/linux-juno-defconfig @@ -0,0 +1,169 @@ +CONFIG_SMP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y +CONFIG_AUDIT=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_HUGETLB=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PROFILING=y +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCIEPORTBUS=y +CONFIG_HOTPLUG_PCI_PCIE=y +CONFIG_HOTPLUG_PCI=y +CONFIG_NR_CPUS=6 +CONFIG_PREEMPT=y +CONFIG_KSM=y +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_CMA=y +CONFIG_CMDLINE="console=ttyAMA0" +CONFIG_COMPAT=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_ARM_BIG_LITTLE_CPUFREQ=y +CONFIG_ARM_DT_BL_CPUFREQ=y +CONFIG_ARM_SCPI_CPUFREQ=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_BPF_JIT=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_XGENE=y +CONFIG_PATA_PLATFORM=y +CONFIG_PATA_OF_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_TUN=y +CONFIG_SKY2=y +CONFIG_SMC91X=y +CONFIG_SMSC911X=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIO_AMBAKMI=y +CONFIG_LEGACY_PTY_COUNT=16 +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_XILINX_PS_UART=y +CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_I2C_SLAVE=y +CONFIG_SPI=y +CONFIG_SPI_PL022=y +CONFIG_PTP_1588_CLOCK=m +CONFIG_GPIO_PL061=y +CONFIG_GPIO_XGENE=y +CONFIG_POWER_RESET_XGENE=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_VEXPRESS=m +CONFIG_DRM=y +CONFIG_DRM_I2C_NXP_TDA998X=y +CONFIG_DRM_ARM=y +CONFIG_DRM_HDLCD=y +CONFIG_DRM_VIRTUAL_HDLCD=y +CONFIG_FB_ARMCLCD=y +CONFIG_LOGO=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_ISP1760=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_ULPI=y +CONFIG_MMC=y +CONFIG_MMC_ARMMMCI=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SPI=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_EFI=y +CONFIG_RTC_DRV_PL030=y +CONFIG_RTC_DRV_PL031=y +CONFIG_DMADEVICES=y +CONFIG_PL330_DMA=y +CONFIG_COMMON_CLK_SCPI=y +CONFIG_ARM_TIMER_SP804=y +CONFIG_MAILBOX=y +CONFIG_ARM_MHU=y +CONFIG_PHY_XGENE=y +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_FANOTIFY=y +CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y +CONFIG_QUOTA=y +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_HUGETLBFS=y +CONFIG_EFIVAR_FS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOCKUP_DETECTOR=y +CONFIG_SECURITY=y +CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_DESIGNWARE_I2S=y +CONFIG_CMA=y +CONFIG_CMA_SIZE_MBYTES=64 diff --git a/buildroot/board/arm/juno/readme.txt b/buildroot/board/arm/juno/readme.txt new file mode 100644 index 000000000..b292d9636 --- /dev/null +++ b/buildroot/board/arm/juno/readme.txt @@ -0,0 +1,134 @@ +ARM Juno r1/r0 + +Intro +===== + +These instructions apply to all models of the ARM Juno: + - Juno r0 (does not support PCIe) + - Juno r1 (supports PCIe) + - Juno r2 (Big Cluster with A72) + +Buildroot will generate the kernel image, device tree blob, bootloader binaries +and a minimal root filesystem. + +How to build it +=============== + +Configure Buildroot +------------------- + +Configuring Buildroot is pretty simple, just execute: + + $ make arm_juno_defconfig + +Build the rootfs, kernel and DTB +-------------------------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + +You may now build your rootfs with: + + $ make + +(This may take a while) + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- rootfs.tar + +-- juno.dtb (if Juno r0 is used) + +-- juno-r1.dtb (if Juno r1 is used) + +-- juno-r2.dtb (if Juno r2 is used) + +-- Image + +-- bl1.bin + +-- bl2.bin + +-- bl2u.bin + +-- bl31.bin + +-- fip.bin + +-- scp-fw.bin + +-- u-boot.bin + +Preparing your rootfs +====================== + +Format your pen drive as a ext3 filesystem by executing: + + $ mkfs.ext3 /dev/ + +Preparing your rootfs +====================== + +Format your pen drive as a ext3 filesystem by executing: + + $ mkfs.ext3 /dev/ + +Installing your rootfs +====================== + +After mounting the pen drive please execute the following: + + $ sudo tar -xvf output/images/rootfs.tar -C + +When completed make sure to unmount the device: + + $ umount + +Insert the pen drive in one of the ARM Juno' USB type A connectors. + +Configure *.dtb in the boot configuration for Juno r0 +===================================================== + +SITE1/HBI0262B/images.txt +..... +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x00C00000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify Image name to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point +...... + +Configure *.dtb in the boot configuration for Juno r1 +===================================================== + +SITE1/HBI0262C/images.txt +...... +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x00C00000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point +...... + +Configure *.dtb in the boot configuration for Juno r2 +===================================================== + +SITE1/HBI0262D/images.txt +...... +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02000000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point +...... + +Installing kernel image and DTB +=============================== + +1. Connect to the ARM Juno UART0 and execute USB_ON in the terminal +2. Connect a USB cable between your PC and ARM Juno USB type B connector + A mass storage device should appear in your desktop. +3. Open the software/ folder +4. Copy the 'Image' file to software/ +5. Copy the 'juno-r1.dtb' (r1), 'juno.dtb' (r0) or juno-r2.dtb (r2) file to software/ +6. Copy the bootloader binaries (bl1.bin and fip.bin) to software/ +7. Press the red button in the front pannel of ARM Juno + +At this time, the board will erase the Flash entry for each new item and +replace it with the lastest ones. diff --git a/buildroot/board/armadeus/apf27/linux-3.13.config b/buildroot/board/armadeus/apf27/linux-3.13.config deleted file mode 100644 index d2955cf00..000000000 --- a/buildroot/board/armadeus/apf27/linux-3.13.config +++ /dev/null @@ -1,230 +0,0 @@ -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_CGROUPS=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MXC=y -CONFIG_MXC_IRQ_PRIOR=y -CONFIG_MACH_IMX27_DT=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -CONFIG_PM_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m -CONFIG_CAN_VCAN=m -CONFIG_CAN_MCP251X=m -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_GEOMETRY=y -# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set -# CONFIG_MTD_CFI_I2 is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_PROC_DEVICETREE=y -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_SMSC_PHY=y -CONFIG_RTL8187=m -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_RT2X00=m -CONFIG_RT2500USB=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RTL8192CU=m -CONFIG_ZD1211RW=m -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=m -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_JOYSTICK=y -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=m -CONFIG_GPIO_SYSFS=y -CONFIG_W1=y -CONFIG_W1_MASTER_MXC=y -CONFIG_W1_SLAVE_THERM=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_MEDIA_SUPPORT=m -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_USB_PWC=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_SOC_CAMERA=m -CONFIG_VIDEO_MX2=m -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -# CONFIG_DVB_AU8522_V4L is not set -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set -CONFIG_FB=y -# CONFIG_FB_MX3 is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=m -CONFIG_SND_IMX_SOC=m -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_CHIPIDEA_DEBUG=y -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_HID=m -CONFIG_USB_ULPI=y -CONFIG_MMC=y -CONFIG_MMC_MXC=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_LEDS_TRIGGER_TRANSIENT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1374=y -CONFIG_RTC_DRV_MXC=m -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_IMX_DMA=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_IIO=m -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -# CONFIG_DNOTIFY is not set -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -# CONFIG_PROC_PAGE_MONITOR is not set -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/buildroot/board/armadeus/apf27/linux-4.12.config b/buildroot/board/armadeus/apf27/linux-4.12.config new file mode 100644 index 000000000..d0fb5d35d --- /dev/null +++ b/buildroot/board/armadeus/apf27/linux-4.12.config @@ -0,0 +1,216 @@ +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=m +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MXC=y +CONFIG_MACH_IMX27_DT=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_PM_DEBUG=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +CONFIG_CAN=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_CFI_I2 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_SMSC_PHY=y +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RTL8187=m +CONFIG_RTL8192CU=m +CONFIG_ZD1211RW=m +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=m +CONFIG_GPIO_SYSFS=y +CONFIG_W1=y +CONFIG_W1_MASTER_MXC=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_PWC=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=m +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_FB=y +# CONFIG_FB_MX3 is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +# CONFIG_SND_USB is not set +CONFIG_SND_SOC=m +CONFIG_SND_IMX_SOC=m +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_HID=m +CONFIG_MMC=y +CONFIG_MMC_MXC=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1374=y +CONFIG_RTC_DRV_MXC=m +CONFIG_DMADEVICES=y +CONFIG_IMX_DMA=y +CONFIG_IMX_SDMA=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_MAX1027=y +CONFIG_MAX5821=y +CONFIG_PWM=y +CONFIG_PWM_IMX=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_DNOTIFY is not set +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_LL=y +CONFIG_EARLY_PRINTK=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y diff --git a/buildroot/board/armadeus/apf28/linux-3.12.config b/buildroot/board/armadeus/apf28/linux-3.12.config deleted file mode 100644 index 137bd12ca..000000000 --- a/buildroot/board/armadeus/apf28/linux-3.12.config +++ /dev/null @@ -1,185 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MXS=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CPU_IDLE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_CAN=m -CONFIG_CAN_VCAN=m -CONFIG_CAN_FLEXCAN=m -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_RC_PID=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_FW_LOADER=m -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -# CONFIG_M25PXX_USE_FAST_READ is not set -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_UBI=y -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_CHR_DEV_SCH=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_NETDEVICES=y -CONFIG_RTL8187=m -CONFIG_RT2X00=m -CONFIG_RT73USB=m -CONFIG_ZD1211RW=m -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_MXS_AUART=y -CONFIG_TTY_PRINTK=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MXS=y -CONFIG_SPI=y -CONFIG_SPI_BITBANG=m -CONFIG_SPI_MXS=y -CONFIG_SPI_SPIDEV=m -CONFIG_GPIO_SYSFS=y -CONFIG_HWMON=m -CONFIG_WATCHDOG=y -CONFIG_STMP3XXX_RTC_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_MEDIA_SUPPORT=m -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_FB=y -CONFIG_FB_MXS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -CONFIG_USB_WDM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_ETH=m -CONFIG_MMC=y -CONFIG_MMC_MXS=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_STMP=y -CONFIG_DMADEVICES=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_MXS_LRADC=y -CONFIG_IIO=y -CONFIG_PWM=y -CONFIG_PWM_MXS=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_FS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/buildroot/board/armadeus/apf51/linux-3.12.config b/buildroot/board/armadeus/apf51/linux-3.12.config deleted file mode 100644 index 6c461b6f0..000000000 --- a/buildroot/board/armadeus/apf51/linux-3.12.config +++ /dev/null @@ -1,266 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_MXC=y -CONFIG_MXC_IRQ_PRIOR=y -CONFIG_MACH_IMX51_DT=y -CONFIG_ARM_THUMBEE=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_IMX=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_SUSPEND is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m -CONFIG_CAN_VCAN=m -CONFIG_CAN_MCP251X=m -CONFIG_BT=m -CONFIG_BT_L2CAP=y -CONFIG_BT_SCO=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_RC_PID=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_FW_LOADER=m -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_MISC_DEVICES=y -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_CHR_DEV_SCH=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -CONFIG_RTL8187=m -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_RT2X00=m -CONFIG_RT73USB=m -CONFIG_ZD1211RW=m -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=m -CONFIG_KEYBOARD_IMX=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_WM831X=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m -CONFIG_INPUT_WM831X_ON=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=m -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_WM831X=m -CONFIG_POWER_SUPPLY=m -CONFIG_WM831X_BACKUP=m -CONFIG_WM831X_POWER=m -CONFIG_HWMON=m -CONFIG_SENSORS_AS1531=m -CONFIG_SENSORS_WM831X=m -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_WM831X_WATCHDOG=m -CONFIG_IMX2_WDT=y -CONFIG_MFD_WM831X_I2C=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_MFD_IMX_IPU_V3=y -CONFIG_MEDIA_SUPPORT=m -CONFIG_VIDEO_DEV=m -# CONFIG_RC_CORE is not set -# CONFIG_MEDIA_TUNER_SIMPLE is not set -# CONFIG_MEDIA_TUNER_TDA8290 is not set -# CONFIG_MEDIA_TUNER_TDA827X is not set -# CONFIG_MEDIA_TUNER_TDA18271 is not set -# CONFIG_MEDIA_TUNER_TDA9887 is not set -# CONFIG_MEDIA_TUNER_TEA5761 is not set -# CONFIG_MEDIA_TUNER_TEA5767 is not set -# CONFIG_MEDIA_TUNER_MT20XX is not set -# CONFIG_MEDIA_TUNER_MT2060 is not set -# CONFIG_MEDIA_TUNER_MT2266 is not set -# CONFIG_MEDIA_TUNER_MT2131 is not set -# CONFIG_MEDIA_TUNER_QT1010 is not set -# CONFIG_MEDIA_TUNER_XC2028 is not set -# CONFIG_MEDIA_TUNER_XC5000 is not set -# CONFIG_MEDIA_TUNER_MXL5005S is not set -# CONFIG_MEDIA_TUNER_MXL5007T is not set -# CONFIG_MEDIA_TUNER_MC44S803 is not set -# CONFIG_MEDIA_TUNER_MAX2165 is not set -# CONFIG_MEDIA_TUNER_TDA18218 is not set -CONFIG_VIDEO_VIVI=m -CONFIG_USB_VIDEO_CLASS=m -# CONFIG_RADIO_ADAPTERS is not set -CONFIG_FB=y -CONFIG_FB_MX5=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=m -# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=m -CONFIG_SND_IMX_SOC=m -CONFIG_SND_SOC_APF51_DEV_WM8960=m -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_SUSPEND=y -CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_ACM=y -CONFIG_USB_PRINTER=y -CONFIG_USB_WDM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_PHY=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_GPIO_VBUS=y -CONFIG_USB_ULPI=y -CONFIG_USB_GADGET=m -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_ETH=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_USB_G_HID=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MMC_SPI=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_WM831X_STATUS=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_MXC=y -CONFIG_RTC_DRV_WM831X=y -CONFIG_STAGING=y -CONFIG_IIO=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_AUTOFS4_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_CMODE_NONE=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_FS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/buildroot/board/armadeus/apf51/linux-4.4.config b/buildroot/board/armadeus/apf51/linux-4.4.config new file mode 100644 index 000000000..6957b635a --- /dev/null +++ b/buildroot/board/armadeus/apf51/linux-4.4.config @@ -0,0 +1,278 @@ +CONFIG_EXPERIMENTAL=y +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_IOSCHED_CFQ is not set +CONFIG_ARCH_MXC=y +CONFIG_MXC_IRQ_PRIOR=y +CONFIG_SOC_IMX51=y +CONFIG_ARM_THUMBEE=y +CONFIG_PREEMPT=y +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_IMX=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_SUSPEND is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_IPV6=y +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_BT=m +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_MAC80211_RC_PID=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FW_LOADER=m +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_MISC_DEVICES=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=y +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_SMSC_PHY=y +CONFIG_NET_ETHERNET=y +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_RTL8187=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_RT2X00=m +CONFIG_RT73USB=m +CONFIG_ZD1211RW=m +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_IMX=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_WM831X=y +CONFIG_TOUCHSCREEN_MC13XXX=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MC13783_PWRBUTTON=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_WM831X_ON=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_WM831X=m +CONFIG_POWER_SUPPLY=y +CONFIG_WM831X_BACKUP=m +CONFIG_WM831X_POWER=m +CONFIG_HWMON=m +CONFIG_SENSORS_AS1531=m +CONFIG_SENSORS_MC13783_ADC=m +CONFIG_SENSORS_WM831X=m +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_WM831X_WATCHDOG=m +CONFIG_IMX2_WDT=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_WM831X_I2C=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_MC13892=m +CONFIG_IMX_IPUV3_CORE=y +CONFIG_DRM=y +CONFIG_MFD_IMX_IPU_V3=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_VIDEO_DEV=m +# CONFIG_RC_CORE is not set +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +# CONFIG_MEDIA_TUNER_TDA18218 is not set +CONFIG_VIDEO_VIVI=m +CONFIG_USB_VIDEO_CLASS=m +# CONFIG_RADIO_ADAPTERS is not set +CONFIG_FB=y +CONFIG_FB_MX5=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=m +# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +# CONFIG_SND_USB is not set +CONFIG_SND_SOC=m +CONFIG_SND_IMX_SOC=m +CONFIG_SND_SOC_APF51_DEV_WM8960=m +CONFIG_USB=y +CONFIG_USB_DEBUG=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DEVICE_CLASS is not set +CONFIG_USB_SUSPEND=y +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +CONFIG_USB_MON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y +CONFIG_USB_WDM=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_PHY=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GPIO_VBUS=y +CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_ETH=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_CDC=y +CONFIG_USB_G_HID=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MMC_SPI=m +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_WM831X_STATUS=m +CONFIG_LEDS_MC13783=m +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_MXC=y +CONFIG_RTC_DRV_WM831X=y +CONFIG_RTC_DRV_MC13XXX=m +CONFIG_STAGING=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_FB_HELPER=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_IPUV3=y +CONFIG_IIO=m +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT2_FS_XIP=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_EXT4_FS=y +CONFIG_AUTOFS4_FS=y +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DEBUG_FS=y +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set diff --git a/buildroot/board/armadeus/readme.txt b/buildroot/board/armadeus/readme.txt new file mode 100644 index 000000000..c03508c60 --- /dev/null +++ b/buildroot/board/armadeus/readme.txt @@ -0,0 +1,84 @@ +Introduction +============ + +Armadeus APFxx are Systems On Module (SOM) based on Freescale/NXP i.MX +processors associated with an FPGA (except on APF28). Non volatile +data are stored in on-module NOR or NAND Flash, depending on the +model. These SOM can be used on Armadeus development boards or with +custom docking boards. + +Supported platforms +=================== + +Buildroot currently supports the following Armadeus platforms with the +associated defconfigs: + + * APF27 SOM + devt board -> armadeus_apf27_defconfig + * APF51 SOM + devt board -> armadeus_apf51_defconfig + * APF28 SOM + devt board -> armadeus_apf28_defconfig + +Vanilla Linux versions are preferred to Freescale's one in these +configurations. + +How to build it +=============== + +Configure Buildroot +------------------- + +Let's say you own an APFxx SOM with it's corresponding development +board, all you have to do is: + + $ make armadeus_apfxx_defconfig + +where "apfxx" is the version of your SOM. + +Launch build +------------ + + $ make + +Result of the build +------------------- + +When the build is finished, you will end up with: + + output/images/ + +-- imx**-apfxxdev.dtb [1] + +-- rootfs.tar + +-- rootfs.ubi + +-- rootfs.ubifs + +-- uImage + +[1] Only if the kernel version used uses a Device Tree. + +Building U-Boot is currently not supported in these configurations. + +Installation +============ + +You will require a serial connection to the board and a TFTP server on +your Host PC. Assuming your server is configured for exporting +/tftpboot/ directory, you will have to copy the generated images to +it: + + $ cp output/images/uImage /tftpboot/apfxx-linux.bin + $ cp output/images/*.dtb /tftpboot/ + $ cp output/images/rootfs.ubi /tftpboot/apfxx-rootfs.ubi + +where "apfxx" is the version of your SOM, as used with _defconfigs. + +Then on your serial terminal, all you have to do is: + +* interrupt the boot process and access U-Boot console by pressing any + key when booting, +* configure board and server IP addresses with "ipaddr" and "serverip" + environment variables, +* if you want to update kernel: + BIOS > run update_kernel +* if you want to update device tree: + BIOS > run update_dtb +* if you want to update rootfs: + BIOS > run update_rootfs + +That's it ! diff --git a/buildroot/board/asus/tinker/extlinux.conf b/buildroot/board/asus/tinker/extlinux.conf new file mode 100644 index 000000000..136af0deb --- /dev/null +++ b/buildroot/board/asus/tinker/extlinux.conf @@ -0,0 +1,4 @@ +label Tinker linux-next + kernel /boot/uImage + devicetree /boot/rk3288-tinker.dtb + append console=ttyS2,115200n8 root=/dev/mmcblk0p1 rootwait diff --git a/buildroot/board/asus/tinker/genimage.cfg b/buildroot/board/asus/tinker/genimage.cfg new file mode 100644 index 000000000..a4b1e8d60 --- /dev/null +++ b/buildroot/board/asus/tinker/genimage.cfg @@ -0,0 +1,15 @@ +image sdcard.img { + hdimage { + } + + partition u-boot-spl-dtb { + in-partition-table = "no" + image = "u-boot-spl-dtb.img" + offset = 32K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/asus/tinker/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch b/buildroot/board/asus/tinker/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch new file mode 100644 index 000000000..64a147c09 --- /dev/null +++ b/buildroot/board/asus/tinker/patches/uboot/0001-include-configs-Increase-CONFIG_SYS_BOOTM_LEN-to-16M.patch @@ -0,0 +1,35 @@ +From 8ee2b03039cccf64402a72dea2185d7fe1972729 Mon Sep 17 00:00:00 2001 +From: Shyam Saini +Date: Mon, 15 Apr 2019 16:16:16 +0530 +Subject: [PATCH] include: configs: Increase CONFIG_SYS_BOOTM_LEN to 16MB + +The default value of CONFIG_SYS_BOOTM_LEN is 0x800000 i.e, 8MB which +causes board reset because of larger uImage size. + +Error log snippet: + Booting using the fdt blob at 0x1f00000 + Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN +Must RESET board to recover +resetting ... + +Signed-off-by: Shyam Saini +--- + include/configs/rk3288_common.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h +index 72a54bc0ab..eab7cf4d86 100644 +--- a/include/configs/rk3288_common.h ++++ b/include/configs/rk3288_common.h +@@ -9,6 +9,8 @@ + #include + #include "rockchip-common.h" + ++#define CONFIG_SYS_BOOTM_LEN (16 << 20) /* 16MB */ ++ + #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY + #define CONFIG_SYS_MALLOC_LEN (32 << 20) + #define CONFIG_SYS_CBSIZE 1024 +-- +2.11.0 + diff --git a/buildroot/board/asus/tinker/post-build.sh b/buildroot/board/asus/tinker/post-build.sh new file mode 100755 index 000000000..8108ed83f --- /dev/null +++ b/buildroot/board/asus/tinker/post-build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +MKIMAGE=$HOST_DIR/bin/mkimage +BOARD_DIR="$(dirname $0)" + +$MKIMAGE -n rk3288 -T rksd -d $BINARIES_DIR/u-boot-spl-dtb.bin $BINARIES_DIR/u-boot-spl-dtb.img +cat $BINARIES_DIR/u-boot-dtb.bin >> $BINARIES_DIR/u-boot-spl-dtb.img + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/asus/tinker/readme.txt b/buildroot/board/asus/tinker/readme.txt new file mode 100644 index 000000000..7372d2952 --- /dev/null +++ b/buildroot/board/asus/tinker/readme.txt @@ -0,0 +1,37 @@ +Tinker RK3288 +============= + +Tinker Board is a Single Board Computer (SBC) in an ultra-small form +factor that offers class-leading performance while leveraging outstanding +mechanical compatibility. + +Tinker link: +https://www.asus.com/in/Single-Board-Computer/Tinker-Board/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Tinker+RK3288 + +How to build it +=============== + + $ make asus_tinker_rk3288_defconfig + +Then you can edit the build options using + + $ make menuconfig + +Compile all and build rootfs image: + + $ make + +Prepare your SDCard +=================== + +Buildroot generates a ready-to-use SD card image that you can flash directly to +the card. The image will be in output/images/sdcard.img. +You can write this image directly to an SD card device (i.e. /dev/xxx): + + $ sudo dd if=output/images/sdcard.img of=/dev/xxx + $ sudo sync + +Finally, you can insert the SD card to the Tinker RK3288 board and boot it. diff --git a/buildroot/board/atmel/at91sam9260ek/linux-3.9.config b/buildroot/board/atmel/at91sam9260ek/linux-3.9.config deleted file mode 100644 index 48dc656f4..000000000 --- a/buildroot/board/atmel/at91sam9260ek/linux-3.9.config +++ /dev/null @@ -1,98 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9260=y -CONFIG_ARCH_AT91SAM9260_SAM9XE=y -CONFIG_MACH_AT91SAM9260EK=y -CONFIG_MACH_CAM60=y -CONFIG_MACH_SAM9_L9260=y -CONFIG_MACH_AFEB9260=y -CONFIG_MACH_USB_A9260=y -CONFIG_MACH_QIL_A9260=y -CONFIG_MACH_CPU9260=y -CONFIG_MACH_FLEXIBITY=y -CONFIG_MACH_SNAPPER_9260=y -CONFIG_MACH_AT91SAM_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -# CONFIG_ARM_THUMB is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91SAM9X_WATCHDOG=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_CRAMFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/buildroot/board/atmel/at91sam9x5ek_mmc/genimage.cfg b/buildroot/board/atmel/at91sam9x5ek_mmc/genimage.cfg new file mode 100644 index 000000000..7a552665f --- /dev/null +++ b/buildroot/board/atmel/at91sam9x5ek_mmc/genimage.cfg @@ -0,0 +1,39 @@ +# Image for SD card boot on Atmel at91sam9x5ek boards +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91sam9g15ek.dtb", + "at91sam9g25ek.dtb", + "at91sam9g35ek.dtb", + "at91sam9x25ek.dtb", + "at91sam9x35ek.dtb", + "boot.bin", + "u-boot.bin" + } + + file uboot.env { + image = "uboot-env.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/at91sam9x5ek_mmc/uboot-env.txt b/buildroot/board/atmel/at91sam9x5ek_mmc/uboot-env.txt new file mode 100644 index 000000000..568e4bc98 --- /dev/null +++ b/buildroot/board/atmel/at91sam9x5ek_mmc/uboot-env.txt @@ -0,0 +1,7 @@ +bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait video=Unknown-1:800x480-16 +bootcmd=fatload mmc 0:1 0x21000000 at91sam9g35ek.dtb; fatload mmc 0:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000 +bootdelay=1 +ethact=gmac0 +stderr=serial +stdin=serial +stdout=serial diff --git a/buildroot/board/atmel/flasher.sh b/buildroot/board/atmel/flasher.sh new file mode 100755 index 000000000..a7409ce88 --- /dev/null +++ b/buildroot/board/atmel/flasher.sh @@ -0,0 +1,145 @@ +#!/usr/bin/env bash + +BUILDIR=$1 +TTY=$2 +BOARD=$3 + +family_at91sam9260ek="at91sam9260ek" +mach_at91sam9260ek="at91sam9260-ek" +dtb_at91sam9260ek="at91sam9260ek.dtb" + +family_at91sam9g45m10ek="at91sam9m10g45ek" +mach_at91sam9g45m10ek="at91sam9m10-g45-ek" +dtb_at91sam9g45m10ek="at91sam9m10g45ek.dtb" + +family_at91sam9rlek="at91sam9rlek" +mach_at91sam9rlek="at91sam9rl64-ek" +dtb_at91sam9rlek="at91sam9rlek.dtb" + +family_at91sam9g15ek="at91sam9x5ek" +mach_at91sam9g15ek="at91sam9g15-ek" +dtb_at91sam9g15ek="at91sam9g15ek.dtb" + +family_at91sam9g20ek="at91sam9g20ek" +mach_at91sam9g20ek="at91sam9g20-ek" +dtb_at91sam9g20ek="at91sam9g20ek.dtb" + +family_at91sam9g25ek="at91sam9x5ek" +mach_at91sam9g25ek="at91sam9g25-ek" +dtb_at91sam9g25ek="at91sam9g25ek.dtb" + +family_at91sam9g35ek="at91sam9x5ek" +mach_at91sam9g35ek="at91sam9g35-ek" +dtb_at91sam9g35ek="at91sam9g35ek.dtb" + +family_at91sam9x25ek="at91sam9x5ek" +mach_at91sam9x25ek="at91sam9x25-ek" +dtb_at91sam9x25ek="at91sam9x25ek.dtb" + +family_at91sam9x35ek="at91sam9x5ek" +mach_at91sam9x35ek="at91sam9x35-ek" +dtb_at91sam9x35ek="at91sam9x35ek.dtb" + +family_sama5d31ek="sama5d3xek" +mach_sama5d31ek="at91sama5d3x-ek" +dtb_sama5d31ek="sama5d31ek.dtb" + +family_sama5d31ek_revc="sama5d3xek" +mach_sama5d31ek_revc="at91sama5d3x-ek" +dtb_sama5d31ek_revc="sama5d31ek_revc.dtb" + +family_sama5d33ek="sama5d3xek" +mach_sama5d33ek="at91sama5d3x-ek" +dtb_sama5d33ek="sama5d33ek.dtb" + +family_sama5d33ek_revc="sama5d3xek" +mach_sama5d33ek_revc="at91sama5d3x-ek" +dtb_sama5d33ek_revc="sama5d33ek_revc.dtb" + +family_sama5d34ek="sama5d3xek" +mach_sama5d34ek="at91sama5d3x-ek" +dtb_sama5d34ek="sama5d34ek.dtb" + +family_sama5d34ek_revc="sama5d3xek" +mach_sama5d34ek_revc="at91sama5d3x-ek" +dtb_sama5d34ek_revc="sama5d34ek_revc.dtb" + +family_sama5d35ek="sama5d3xek" +mach_sama5d35ek="at91sama5d3x-ek" +dtb_sama5d35ek="sama5d35ek.dtb" + +family_sama5d35ek_revc="sama5d3xek" +mach_sama5d35ek_revc="at91sama5d3x-ek" +dtb_sama5d35ek_revc="sama5d35ek_revc.dtb" + +family_sama5d36ek="sama5d3xek" +mach_sama5d36ek="at91sama5d3x-ek" +dtb_sama5d36ek="sama5d36ek.dtb" + +family_sama5d36ek_revc="sama5d3xek" +mach_sama5d36ek_revc="at91sama5d3x-ek" +dtb_sama5d36ek_revc="sama5d36ek_revc.dtb" + +family_sama5d3_xplained="sama5d3_xplained" +mach_sama5d3_xplained="at91sama5d3x-xplained" +dtb_sama5d3_xplained="at91-sama5d3_xplained.dtb" + +family_sama5d4ek="sama5d4ek" +mach_sama5d4ek="at91sama5d4x-ek" +dtb_sama5d4ek="at91-sama5d4ek.dtb" + +family_sama5d4_xplained="sama5d4_xplained" +mach_sama5d4_xplained="at91sama5d4x-ek" +dtb_sama5d4_xplained="at91-sama5d4_xplained.dtb" + +usage() { + cat << EOF +Usage: + $0 + +Available boards: + at91sam9260ek + at91sam9g45m10ek + at91sam9rlek + at91sam9g15ek + at91sam9g20ek + at91sam9g25ek + at91sam9x25ek + at91sam9g35ek + at91sam9x35ek + sama5d31ek + sama5d33ek + sama5d34ek + sama5d35ek + sama5d36ek + sama5d31ek_revc (Until rev. C) + sama5d33ek_revc (Until rev. C) + sama5d34ek_revc (Until rev. C) + sama5d35ek_revc (Until rev. C) + sama5d36ek_revc (Until rev. C) + sama5d3_xplained + sama5d4ek + sama5d4_xplained + +Example: + $0 ./output /dev/ttyACM0 at91sam9g45m10ek +EOF +} + +F="family_$BOARD" +M="mach_$BOARD" +D="dtb_$BOARD" + +if [[ $# != 3 || -z ${!F} ]]; then + usage + exit 1 +fi + +video_mode="video=LVDS-1:800x480-16" +if [[ $BOARD == "*pda4" ]]; then + video_mode="video=LVDS-1:480x272-16" +fi + +echo "Executing: ${!F} O=$1/images $1/host/bin/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode" +export O=$1/images +$1/host/bin/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode diff --git a/buildroot/board/atmel/nandflash.tcl b/buildroot/board/atmel/nandflash.tcl new file mode 100644 index 000000000..3955b345a --- /dev/null +++ b/buildroot/board/atmel/nandflash.tcl @@ -0,0 +1,358 @@ +# ---------------------------------------------------------------------------- +# ATMEL Microcontroller +# ---------------------------------------------------------------------------- +# Copyright (c) 2015, Atmel Corporation +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# - Redistributions of source code must retain the above copyright notice, +# this list of conditions and the disclaimer below. +# +# Atmel's name may not be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE +# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# ---------------------------------------------------------------------------- + +################################################################################ +# Script data +################################################################################ +# DBGU address for rm9200, 9260/9g20, 9261/9g10, 9rl, 9x5 +set at91_base_dbgu0 0xfffff200 +# DBGU address for 9263, 9g45, sama5d3 +set at91_base_dbgu1 0xffffee00 +# DBGU address for sama5d4 +set at91_base_dbgu2 0xfc069000 + +set arch_exid_offset 0x44 + +# arch id +set arch_id_at91sam9g20 0x019905a0 +set arch_id_at91sam9g45 0x819b05a0 +set arch_id_at91sam9x5 0x819a05a0 +set arch_id_at91sam9n12 0x819a07a0 +set arch_id_sama5d3 0x8a5c07c0 + +## Find out at91sam9x5 variant to load the corresponding dtb file +array set at91sam9x5_variant { + 0x00000000 at91sam9g15 + 0x00000001 at91sam9g35 + 0x00000002 at91sam9x35 + 0x00000003 at91sam9g25 + 0x00000004 at91sam9x25 +} + +## Find out sama5d3 variant to load the corresponding dtb file +array set sama5d3_variant { + 0x00444300 sama5d31 + 0x00414300 sama5d33 + 0x00414301 sama5d34 + 0x00584300 sama5d35 + 0x00004301 sama5d36 +} + +## Find out sama5d4 variant +array set sama5d4_variant { + 0x00000001 sama5d41 + 0x00000002 sama5d42 + 0x00000003 sama5d43 + 0x00000004 sama5d44 +} + +################################################################################ +# proc uboot_env: Convert u-boot variables in a string ready to be flashed +# in the region reserved for environment variables +################################################################################ +proc set_uboot_env {nameOfLstOfVar} { + upvar $nameOfLstOfVar lstOfVar + + # sector size is the size defined in u-boot CFG_ENV_SIZE + set sectorSize [expr 0x20000 - 5] + + set strEnv [join $lstOfVar "\0"] + while {[string length $strEnv] < $sectorSize} { + append strEnv "\0" + } + # \0 between crc and strEnv is the flag value for redundant environment + set strCrc [binary format i [::vfs::crc $strEnv]] + return "$strCrc\0$strEnv" +} + +################################################################################ +proc find_variant_name {boardType} { + global at91_base_dbgu0 + global at91_base_dbgu1 + global at91_base_dbgu2 + global arch_exid_offset + global at91sam9x5_variant + global sama5d3_variant + global sama5d4_variant + set socName "none" + + switch $boardType { + at91sam9x5ek { + set exidAddr [expr {$at91_base_dbgu0 + $arch_exid_offset}] + set chip_variant [format "0x%08x" [read_int $exidAddr]] + + foreach {key value} [array get at91sam9x5_variant] { + if {$key == $chip_variant} { + set socName "$value" + break; + } + } + } + sama5d3xek { + set exidAddr [expr {$at91_base_dbgu1 + $arch_exid_offset}] + set chip_variant [format "0x%08x" [read_int $exidAddr]] + + foreach {key value} [array get sama5d3_variant] { + #puts "-I- === $chip_variant ? $key ($value) ===" + if {$key == $chip_variant} { + set socName "$value" + break; + } + } + } + sama5d3_xplained { + set exidAddr [expr {$at91_base_dbgu1 + $arch_exid_offset}] + set chip_variant [format "0x%08x" [read_int $exidAddr]] + + foreach {key value} [array get sama5d3_variant] { + #puts "-I- === $chip_variant ? $key ($value) ===" + if {$key == $chip_variant} { + set socName "$value" + break; + } + } + } + sama5d4ek { + set exidAddr [expr {$at91_base_dbgu2 + $arch_exid_offset}] + set chip_variant [format "0x%08x" [read_int $exidAddr]] + + foreach {key value} [array get sama5d4_variant] { + #puts "-I- === $chip_variant ? $key ($value) ===" + if {$key == $chip_variant} { + set socName "$value" + break; + } + } + } + sama5d4_xplained { + set exidAddr [expr {$at91_base_dbgu2 + $arch_exid_offset}] + set chip_variant [format "0x%08x" [read_int $exidAddr]] + + foreach {key value} [array get sama5d4_variant] { + #puts "-I- === $chip_variant ? $key ($value) ===" + if {$key == $chip_variant} { + set socName "$value" + break; + } + } + } + } + + return "$socName" +} + +proc find_variant_ecc {boardType} { + set eccType "none" + + switch $boardType { + at91sam9x5ek { + set eccType 0xc0c00405 + } + at91sam9n12ek { + set eccType 0xc0c00405 + } + sama5d3xek { + set eccType 0xc0902405 + } + sama5d3_xplained { + set eccType 0xc0902405 + } + sama5d4ek { + set eccType 0xc1e04e07 + } + sama5d4_xplained { + set eccType 0xc1e04e07 + } + } + + puts "-I- === eccType is $eccType ===" + return $eccType +} + +proc get_kernel_load_addr {boardType} { + set kernel_load_addr 0x22000000 + + switch $boardType { + at91sam9m10g45ek { + set kernel_load_addr 0x72000000 + } + } + + return $kernel_load_addr +} + +proc get_dtb_load_addr {boardType} { + set dtb_load_addr 0x21000000 + + switch $boardType { + at91sam9m10g45ek { + set dtb_load_addr 0x71000000 + } + } + + return $dtb_load_addr +} + +################################################################################ +# Main script: Load the linux demo in NandFlash, +# Update the environment variables +################################################################################ + +################################################################################ + +# check for proper variable initialization +if {! [info exists boardFamily]} { + puts "-I- === Parsing script arguments ===" + if {! [info exists env(O)]} { + puts "-E- === Binaries path not defined ===" + exit + } + + set bootstrapFile "$env(O)/at91bootstrap.bin" + set ubootFile "$env(O)/u-boot.bin" + set kernelFile "$env(O)/zImage" + set rootfsFile "$env(O)/rootfs.ubi" + set build_uboot_env "yes" + + set i 1 + foreach arg $::argv { + puts "argument $i is $arg" + switch $i { + 4 { set boardFamily $arg } + 5 { set dtbFile "$env(O)/$arg" } + 6 { set videoMode $arg } + } + incr i + } +} + +puts "-I- === Board Family is $boardFamily ===" + +set pmeccConfig [find_variant_ecc $boardFamily] + +## Now check for the needed files +if {! [file exists $bootstrapFile]} { + puts "-E- === AT91Bootstrap file not found ===" + exit +} + +if {! [file exists $ubootFile]} { + puts "-E- === U-Boot file not found ===" + exit +} + +if {! [file exists $kernelFile]} { + puts "-E- === Linux kernel file not found ===" + exit +} + +if {! [file exists $dtbFile]} { + puts "-E- === Device Tree binary: $dtbFile file not found ===" + exit +} + +if {! [file exists $rootfsFile]} { + puts "-E- === Rootfs file not found ===" + exit +} + +## NandFlash Mapping +set bootStrapAddr 0x00000000 +set ubootAddr 0x00040000 +set ubootEnvAddr 0x000c0000 +set dtbAddr 0x00180000 +set kernelAddr 0x00200000 +set rootfsAddr 0x00800000 + +## u-boot variable +set kernelLoadAddr [get_kernel_load_addr $boardFamily] +set dtbLoadAddr [get_dtb_load_addr $boardFamily] + +## NandFlash Mapping +set kernelSize [format "0x%08X" [file size $kernelFile]] +set dtbSize [format "0x%08X" [file size $dtbFile]] +set bootCmd "bootcmd=nand read $dtbLoadAddr $dtbAddr $dtbSize; nand read $kernelLoadAddr $kernelAddr $kernelSize; bootz $kernelLoadAddr - $dtbLoadAddr" +set rootfsSize [format "0x%08X" [file size $rootfsFile]] + +lappend u_boot_variables \ + "bootdelay=1" \ + "baudrate=115200" \ + "stdin=serial" \ + "stdout=serial" \ + "stderr=serial" \ + "bootargs=console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw $videoMode" \ + "$bootCmd" + +## Additional files to load +set ubootEnvFile "ubootEnvtFileNandFlash.bin" + + +## Start flashing procedure ################################################## +puts "-I- === Initialize the NAND access ===" +NANDFLASH::Init + +if {$pmeccConfig != "none"} { + puts "-I- === Enable PMECC OS Parameters ===" + NANDFLASH::NandHeaderValue HEADER $pmeccConfig +} + +puts "-I- === Erase all the NAND flash blocs and test the erasing ===" +NANDFLASH::EraseAllNandFlash + +puts "-I- === Load AT91Bootstrap in the first sector ===" +if {$pmeccConfig != "none"} { + NANDFLASH::SendBootFilePmeccCmd $bootstrapFile +} else { + NANDFLASH::sendBootFile $bootstrapFile +} + +puts "-I- === Load u-boot in the next sectors ===" +send_file {NandFlash} "$ubootFile" $ubootAddr 0 + +if {$build_uboot_env == "yes"} { + puts "-I- === Load the u-boot environment variables ===" + set fh [open "$ubootEnvFile" w] + fconfigure $fh -translation binary + puts -nonewline $fh [set_uboot_env u_boot_variables] + close $fh + send_file {NandFlash} "$ubootEnvFile" $ubootEnvAddr 0 +} + +puts "-I- === Load the Kernel image and device tree database ===" +send_file {NandFlash} "$dtbFile" $dtbAddr 0 +send_file {NandFlash} "$kernelFile" $kernelAddr 0 + +if {$pmeccConfig != "none"} { + puts "-I- === Enable trimffs ===" + NANDFLASH::NandSetTrimffs 1 +} + +puts "-I- === Load the linux file system ===" +send_file {NandFlash} "$rootfsFile" $rootfsAddr 0 + +puts "-I- === DONE. ===" diff --git a/buildroot/board/atmel/readme.txt b/buildroot/board/atmel/readme.txt new file mode 100644 index 000000000..7ebb5e830 --- /dev/null +++ b/buildroot/board/atmel/readme.txt @@ -0,0 +1,175 @@ +This document explains how to set up a basic Buildroot system on +various Atmel/Microchip boards. Additional details can also be found +on the Linux4SAM website: http://www.linux4sam.org + +This guide covers the following configurations: + - at91sam9g45m10ek_defconfig + - at91sam9rlek_defconfig + - at91sam9x5ek_defconfig (at91sam9g15, at91sam9g25, at91sam9x25, + at91sam9g35 and at91sam9x35) + - atmel_sama5d3xek_defconfig (sama5d31, sama5d33, sama5d34, sama5d35, + sama5d36) + - atmel_sama5d3_xplained_defconfig + - atmel_sama5d3_xplained_dev_defconfig + - atmel_sama5d3_xplained_mmc_defconfig + - atmel_sama5d3_xplained_mmc_dev_defconfig + - atmel_sama5d4_xplained_defconfig + - atmel_sama5d4_xplained_dev_defconfig + - atmel_sama5d4_xplained_mmc_defconfig + - atmel_sama5d4_xplained_mmc_dev_defconfig + - atmel_sama5d2_xplained_mmc_defconfig + - atmel_sama5d2_xplained_mmc_dev_defconfig + - microchip_sama5d27_wlsom1_ek_mmc_defconfig + - microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig + +These configurations will use AT91Bootstrap, u-boot and a linux kernel from +the git trees maintained by Atmel. + +The configurations labeled as 'dev' provide a development rootfs with tools to +tests the features of the SoC: +- ALSA tools to test audio +- FFMPEG to record video from the ISI/ISC +- I2C, SPI, CAN, etc. tools +- modetest for LCD screens, HDMI +- Wilc1000/Wilc3000 firmware for the Atmel Wireless sdio module +- SSH for convenience +- GDB/GDB server for debug + +Configuring and building Buildroot +================================== + +For the Xplained/Evaluation Kit boards, the Buildroot configuration is +provided to boot from an SD card. Those configurations are labeled as +'mmc'. In this case, after building Buildroot, follow the instructions +in the "Preparing the SD card" section. + +For the other configurations listed above, the Buildroot configuration +assumes the system will be flashed on NAND. In this case, after +building Buildroot, follow the instructions in the "Flashing the NAND +using SAM-BA" section below. + +To configure and build Buildroot, run: + + make _defconfig + make + +Flashing the NAND using SAM-BA +============================== + +Flashing the board +------------------ + +Connect the board: + o at91sam9g45m10ek: DBGU: J10, USB sam-ba: J14 + o at91sam9rlek: DBGU: J19, USB sam-ba: J21 + o at91sam9x5ek: DBGU: J11, USB sam-ba: J20 + o sama5d3xek: DBGU: J14, USB sam-ba: J20 + o sama5d3 Xplained: DBGU: J23, USB sam-ba: J6 + o sama5d4ek: DBGU: J22 or J24, USB sam-ba: J1 + o sama5d4 Xplained: DBGU: J1, USB sam-ba: J11 + +Start the board in RomBOOT: + o at91sam9g45m10ek: + 1. open JP8, JP10 and JP12 + 2. start the board + 3. close JP8, JP10 and JP12 + + o at91sam9rlek: + 1. J11 on 1-2 (BMS=1), open J12 and J13 + 2. start the board + 3. close J12 and J13 + + o at91sam9x5ek: + 1. open JP9 and: + - Cogent: open *NCS jumper + - Embest: open SW1 + - Ronetix: open J1 and J2 + 2. start the board + 3. close JP9 and: + - Cogent: close *NCS jumper + - Embest: close SW1 (ON position) + - Ronetix: close J1 and J2 + + o sama5d3xek: + 1. start the board + 2. push BP4 and BP1 + 3. release BP1 + 4. release BP4 + + o sama5d3 Xplained: + 1. open JP5 (NANDCS) and JP6 (SPICS) + 2. start the board + 3. close JP5 ans JP6 + + o sama5d4ek: + 1. start the board + 2. push BP3 and BP4 + 3. release BP4 + 4. release BP3 + + o sama5d4 Xplained: + 1. close JP7 (BOOT_DIS) + 2. start the board + 3. open JP7 + +"RomBOOT" should appear on your console (this should be ttyUSBx or ttyACMx) + +Now locate the USB sam-ba interface it should be ttyACMx, usually ttyACM0 +dmesg on your machine should give: +usb 1-2.1.4: New USB device found, idVendor=03eb, idProduct=6124 +usb 1-2.1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0 +cdc_acm 1-2.1.4:1.0: ttyACM0: USB ACM device + +Look for idVendor=03eb, idProduct=6124, this is the interface you want to use. + +You can then flash the board using the provided flasher.sh script in board/atmel: + +board/atmel/flasher.sh + +For example, for an out of tree build made in +/tmp/atmel_sama5d3_xplained/ for the sama5d3 Xplained, you would use: +board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained + +Reboot, the system should boot up to the buildroot login invite. + +Preparing the SD card +===================== + +An image named sdcard.img is automatically generated. With this image, +you no longer have to care about the creation of the partition and +copying files to the SD card. + +You need at least a 1GB SD card. All the data on the SD card will be +lost. To copy the image on the SD card: + +/!\ Caution be sure to do it on the right mmcblk device /!\ + +dd if=output/images/sdcard.img of=/dev/mmcblk0 + +Insert your SD card in your Xplained/Evaluation Kit board, and +enjoy. The default U-Boot environment will load properly the kernel +and Device Tree blob from the first partition of the SD card, so +everything works automatically. + +By default a 16MB FAT partition is created. It contains at91bootstrap, +u-boot, the kernel image and all dtb variants for your board. The dtb +used is the basic one: + +U-Boot> print +[...] +bootcmd=fatload mmc 1:1 0x21000000 at91-sama5d2_xplained.dtb; fatload mmc 1:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000 +[...] + +If you want to use a variant such as the _pda7 one, you will have to +update your u-boot environment: + +U-Boot> setenv bootcmd 'fatload mmc 1:1 0x21000000 at91-sama5d2_xplained_pda7.dtb; fatload mmc 1:1 0x22000000 zImage; bootz 0x22000000 - 0x21000000' +U-Boot> save +Saving Environment to FAT... +writing uboot.env +done + +A 512MB ext4 partition is also created to store the rootfs generated. + +If you want to customize the size of the partitions and their content, +take a look at the the genimage.cfg file in the board directory. diff --git a/buildroot/board/atmel/sama5d27_som1_ek_mmc/genimage.cfg b/buildroot/board/atmel/sama5d27_som1_ek_mmc/genimage.cfg new file mode 100644 index 000000000..eaa3896fc --- /dev/null +++ b/buildroot/board/atmel/sama5d27_som1_ek_mmc/genimage.cfg @@ -0,0 +1,31 @@ +# Image for SD card boot on Atmel SAMA5D2 Xplained boards +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91-sama5d27_som1_ek.dtb", + "boot.bin", + "u-boot.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg b/buildroot/board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg new file mode 100644 index 000000000..dce32524e --- /dev/null +++ b/buildroot/board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg @@ -0,0 +1,31 @@ +# Image for SD card boot on Microchip SAMA5D27 WLSOM1 EK +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91-sama5d27_wlsom1_ek.dtb", + "boot.bin", + "u-boot.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/sama5d2_xplained_mmc/genimage.cfg b/buildroot/board/atmel/sama5d2_xplained_mmc/genimage.cfg new file mode 100644 index 000000000..3cc8ae2f8 --- /dev/null +++ b/buildroot/board/atmel/sama5d2_xplained_mmc/genimage.cfg @@ -0,0 +1,31 @@ +# Image for SD card boot on Atmel SAMA5D2 Xplained boards +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91-sama5d2_xplained.dtb", + "boot.bin", + "u-boot.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/sama5d3_xplained_mmc/genimage.cfg b/buildroot/board/atmel/sama5d3_xplained_mmc/genimage.cfg new file mode 100644 index 000000000..1b4649512 --- /dev/null +++ b/buildroot/board/atmel/sama5d3_xplained_mmc/genimage.cfg @@ -0,0 +1,31 @@ +# Image for SD card boot on Atmel SAMA5D3 Xplained boards +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91-sama5d3_xplained.dtb", + "boot.bin", + "u-boot.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/sama5d4_xplained_mmc/genimage.cfg b/buildroot/board/atmel/sama5d4_xplained_mmc/genimage.cfg new file mode 100644 index 000000000..004f2fddb --- /dev/null +++ b/buildroot/board/atmel/sama5d4_xplained_mmc/genimage.cfg @@ -0,0 +1,31 @@ +# Image for SD card boot on Atmel SAMA5D4 Xplained boards +# +image boot.vfat { + vfat { + files = { + "zImage", + "at91-sama5d4_xplained.dtb", + "boot.bin", + "u-boot.bin" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/atmel/xplained/readme.txt b/buildroot/board/atmel/xplained/readme.txt deleted file mode 100644 index e29a11688..000000000 --- a/buildroot/board/atmel/xplained/readme.txt +++ /dev/null @@ -1,73 +0,0 @@ -Atmel SAMA5D3 Xplained board -============================ - -This document explains how to set up a basic Buildroot system on the -Atmel SAMA5D3 Xplained board, whose main site is -http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx. Additional details can -also be found on the http://www.at91.com/linux4sam/bin/view/Linux4SAM/ -web site. - -Note that the default Buildroot configuration is prepared to boot from -an SD card: the first stage bootloader, second stage bootloader, -kernel image and root filesystem are all located on the SD card. Some -adjustements in the bootloader configuration will be needed to boot -from NAND flash. - -Configuring and building Buildroot ----------------------------------- - - make atmel_xplained_defconfig - make - -Preparing the SD card ---------------------- - -The SD card must be partitionned with at least two partitions: one -FAT16 partition for the bootloaders, kernel image and Device Tree -blob, and one ext4 partition for the root filesystem. To partition the -SD card: - -sudo sfdisk -uM /dev/mmcblk0 </images directory. - zynq-zed.dtb - rootfs.cpio.uboot - uImage - u-boot.img - boot.bin - - -uboot.bin -- U-Boot SPL w/ Xilinx boot.bin wrapper ---------------------------------------------------- - -Due to licensing issues, the files ps7_init.c/h are not able to be -distributed with the U-Boot source code. These files are required to make a -boot.bin file. - -If you already have the Xilinx tools installed, the following sequence will -unpack, patch and build the rfs, kernel, uboot, and uboot-spl. - -make zedboard_defconfig -make uboot-patch -cp ${XILINX}/ISE_DS/EDK/sw/lib/hwplatform_templates/zed_hw_platform/ps7_init.{c,h} \ -output/build/uboot-xilinx-v2014.1/board/xilinx/zynq/ - -After copying these files into the U-Boot source tree, you can -continue the build with: - -make - -*Notice* -While the build will successfully complete without the ps7_init.* -files, the uboot.bin file generated by this configuration will not -function properly on the Zedboard. Therefore, it is imperative that -the ps7_init.* files be copied into the U-Boot source tree any time -the clean, or uboot-dirclean targets are made. - - -Resulting system ----------------- -A FAT32 partition should be created at the beggining of the SD Card -and the following files should be installed: - /boot.bin - /devicetree.dtb - /uImage - /uramdisk.image.gz - /u-boot.img - - -All needed files can be taken from output/images/ - -boot.bin, uImage and u-boot.img are direct copies of the same files -available on output/images/ - -devicetree.dtb is just zynq-zed.dtb renamed. - -uramdisk.image.gz is rootfs.cpio.uboot renamed diff --git a/buildroot/board/bananapi/bananapi-m1/boot.cmd b/buildroot/board/bananapi/bananapi-m1/boot.cmd new file mode 100644 index 000000000..0cf6f4d63 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m1/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +mmc dev 0 +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun7i-a20-bananapi.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/bananapi/bananapi-m1/genimage.cfg b/buildroot/board/bananapi/bananapi-m1/genimage.cfg new file mode 100644 index 000000000..e2e131162 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m1/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun7i-a20-bananapi.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/bananapi/bananapi-m1/readme.txt b/buildroot/board/bananapi/bananapi-m1/readme.txt new file mode 100644 index 000000000..382ba63c4 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m1/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Bananapi M1. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Bananapi M1 link: +http://www.banana-pi.org/m1.html + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Bananapi+M1 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make bananapi_m1_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Bananapi M1 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/bananapi/bananapi-m2-ultra/boot.cmd b/buildroot/board/bananapi/bananapi-m2-ultra/boot.cmd new file mode 100644 index 000000000..9c24eabff --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-ultra/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +mmc dev 0 +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-r40-bananapi-m2-ultra.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/bananapi/bananapi-m2-ultra/genimage.cfg b/buildroot/board/bananapi/bananapi-m2-ultra/genimage.cfg new file mode 100644 index 000000000..675253af2 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-ultra/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-r40-bananapi-m2-ultra.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/bananapi/bananapi-m2-ultra/readme.txt b/buildroot/board/bananapi/bananapi-m2-ultra/readme.txt new file mode 100644 index 000000000..c3de84f5b --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-ultra/readme.txt @@ -0,0 +1,35 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Bananapi M2 ULtra. With the current +configuration it will bring-up the board, and allow access through the +serial console. + +Bananapi M2 Ultra link: +http://www.banana-pi.org/m2u.html + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make bananapi_m2_ultra_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Bananapi M2 Ultra and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/bananapi/bananapi-m2-zero/boot.cmd b/buildroot/board/bananapi/bananapi-m2-zero/boot.cmd new file mode 100644 index 000000000..081450935 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-zero/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +mmc dev 0 +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h2-plus-bananapi-m2-zero.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/bananapi/bananapi-m2-zero/genimage.cfg b/buildroot/board/bananapi/bananapi-m2-zero/genimage.cfg new file mode 100644 index 000000000..e41f1f939 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-zero/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h2-plus-bananapi-m2-zero.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/bananapi/bananapi-m2-zero/readme.txt b/buildroot/board/bananapi/bananapi-m2-zero/readme.txt new file mode 100644 index 000000000..9edd477f1 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m2-zero/readme.txt @@ -0,0 +1,34 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +Buildroot environment for the Bananapi M2 Zero. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Bananapi M2 Zero link: +http://www.banana-pi.org/m2z.html + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make bananapi_m2_zero_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sync + +Insert the micro SDcard in your Bananapi M2 Zero and power it up. The console +is on the Debug UART on the CON3 header, with serial settings 115200 8N1. diff --git a/buildroot/board/bananapi/bananapi-m64/boot.cmd b/buildroot/board/bananapi/bananapi-m64/boot.cmd new file mode 100644 index 000000000..d35c9b0b2 --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m64/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-bananapi-m64.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/bananapi/bananapi-m64/genimage.cfg b/buildroot/board/bananapi/bananapi-m64/genimage.cfg new file mode 100644 index 000000000..9730d8faa --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m64/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-bananapi-m64.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/bananapi/bananapi-m64/readme.txt b/buildroot/board/bananapi/bananapi-m64/readme.txt new file mode 100644 index 000000000..0dec3e52e --- /dev/null +++ b/buildroot/board/bananapi/bananapi-m64/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Bananapi M64. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Bananapi M64 link: +http://www.banana-pi.org/m64.html + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Bananapi+M64 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make bananapi_m64_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Bananapi M64 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/beagleboardx15/genimage.cfg b/buildroot/board/beagleboardx15/genimage.cfg new file mode 100644 index 000000000..d27eff609 --- /dev/null +++ b/buildroot/board/beagleboardx15/genimage.cfg @@ -0,0 +1,26 @@ +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img" + } + } + size = 4M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/beagleboardx15/readme.txt b/buildroot/board/beagleboardx15/readme.txt new file mode 100644 index 000000000..5af2c914b --- /dev/null +++ b/buildroot/board/beagleboardx15/readme.txt @@ -0,0 +1,49 @@ +BeagleBoard X15 + +Intro +===== +This config currently supports the beagleboard x15, +and generates a barebone image. + +The image must be flashed to a SD card to be used. + +How to build it +=============== + + $ make beagleboardx15_defconfig + +Then you can edit the build options using + + $ make menuconfig + +Compile all and build a sdcard image: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + + output/images/ + +-- am57xx-beagle-x15.dtb + +-- am57xx-beagle-x15-revb1.dtb + +-- boot.vfat + +-- MLO + +--rootfs.ext2 + +-- rootfs.ext4 + +-- rootfs.tar + +-- sdcard.img + +-- u-boot.img + +-- u-boot-spl.bin + +-- zImage + +How to write the microSD card +============================= + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/beaglebone/genimage.cfg b/buildroot/board/beaglebone/genimage.cfg new file mode 100644 index 000000000..cfc1039ec --- /dev/null +++ b/buildroot/board/beaglebone/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img", + "zImage", + "uEnv.txt", + "am335x-evm.dtb", + "am335x-evmsk.dtb", + "am335x-bone.dtb", + "am335x-boneblack.dtb", + "am335x-bonegreen.dtb", + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/beaglebone/genimage_linux41.cfg b/buildroot/board/beaglebone/genimage_linux41.cfg new file mode 100644 index 000000000..ba60297dd --- /dev/null +++ b/buildroot/board/beaglebone/genimage_linux41.cfg @@ -0,0 +1,32 @@ +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img", + "zImage", + "uEnv.txt", + "am335x-evm.dtb", + "am335x-evmsk.dtb", + "am335x-bone.dtb", + "am335x-boneblack.dtb", + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/beaglebone/linux-3.12.config b/buildroot/board/beaglebone/linux-3.12.config deleted file mode 100644 index 0be5722b9..000000000 --- a/buildroot/board/beaglebone/linux-3.12.config +++ /dev/null @@ -1,251 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_OMAP_RESET_CLOCKS=y -CONFIG_OMAP_MUX_DEBUG=y -CONFIG_ARCH_OMAP3=y -CONFIG_ARCH_OMAP4=y -CONFIG_SOC_AM43XX=y -# CONFIG_ARCH_OMAP2PLUS_TYPICAL is not set -# CONFIG_SOC_TI81XX is not set -# CONFIG_MACH_OMAP3_BEAGLE is not set -# CONFIG_MACH_DEVKIT8000 is not set -# CONFIG_MACH_OMAP_LDP is not set -# CONFIG_MACH_OMAP3530_LV_SOM is not set -# CONFIG_MACH_OMAP3_TORPEDO is not set -# CONFIG_MACH_OVERO is not set -# CONFIG_MACH_OMAP3EVM is not set -# CONFIG_MACH_OMAP3_PANDORA is not set -# CONFIG_MACH_TOUCHBOOK is not set -# CONFIG_MACH_OMAP_3430SDP is not set -# CONFIG_MACH_NOKIA_RM680 is not set -# CONFIG_MACH_NOKIA_RX51 is not set -# CONFIG_MACH_OMAP_ZOOM2 is not set -# CONFIG_MACH_OMAP_ZOOM3 is not set -# CONFIG_MACH_CM_T35 is not set -# CONFIG_MACH_CM_T3517 is not set -# CONFIG_MACH_IGEP0020 is not set -# CONFIG_MACH_IGEP0030 is not set -# CONFIG_MACH_SBC3530 is not set -# CONFIG_MACH_OMAP_3630SDP is not set -CONFIG_ARM_THUMBEE=y -CONFIG_HAVE_ARM_ARCH_TIMER=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" -CONFIG_KEXEC=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_GENERIC_CPUFREQ_CPU0=y -# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=y -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_OMAP_OCP2SCP=y -CONFIG_CONNECTOR=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_CROSSBAR=y -CONFIG_EEPROM_93CX6=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_MD=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_TI_CPSW=y -CONFIG_TI_CPTS=y -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_AT803X_PHY=y -CONFIG_SMSC_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_OMAP=y -CONFIG_SERIAL_OMAP_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_OMAP=y -CONFIG_SPI=y -CONFIG_SPI_OMAP24XX=y -CONFIG_SPI_TI_QSPI=y -CONFIG_PINCTRL_SINGLE=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_W1=y -CONFIG_POWER_SUPPLY=y -CONFIG_THERMAL=y -CONFIG_THERMAL_GOV_FAIR_SHARE=y -CONFIG_THERMAL_GOV_USER_SPACE=y -CONFIG_CPU_THERMAL=y -CONFIG_TI_SOC_THERMAL=y -CONFIG_TI_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_OMAP_WATCHDOG=y -CONFIG_MFD_SYSCON=y -CONFIG_MFD_TPS65217=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_PBIAS=y -CONFIG_REGULATOR_TPS65023=y -CONFIG_REGULATOR_TPS6507X=y -CONFIG_REGULATOR_TPS65217=y -CONFIG_REGULATOR_TIAVSCLASS0=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_DA8XX=y -CONFIG_FB_DA8XX_TDA998X=y -CONFIG_OMAP2_DSS=y -CONFIG_OMAP2_DSS_SDI=y -CONFIG_OMAP2_DSS_DSI=y -CONFIG_FB_OMAP2=y -CONFIG_DISPLAY_CONNECTOR_HDMI=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_MUSB_HDRC=m -CONFIG_USB_MUSB_OMAP2PLUS=m -CONFIG_USB_MUSB_DSPS=m -CONFIG_USB_TI_CPPI41_DMA=y -CONFIG_USB_STORAGE=y -CONFIG_AM335X_PHY_USB=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_EEM=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=y -CONFIG_MMC_OMAP=y -CONFIG_MMC_OMAP_HS=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_OMAP=y -CONFIG_DMADEVICES=y -CONFIG_TI_EDMA=y -CONFIG_DMA_OMAP=y -CONFIG_TI_CPPI41=y -CONFIG_COMMON_CLK_DEBUG=y -CONFIG_OMAP_USB2=y -CONFIG_OMAP_PIPE3=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=y -CONFIG_QUOTA=y -CONFIG_QFMT_V2=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y -CONFIG_PROVE_LOCKING=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_CRYPTO_MANAGER=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_LIBCRC32C=y -CONFIG_AVERAGE=y diff --git a/buildroot/board/beaglebone/linux-sgx.fragment b/buildroot/board/beaglebone/linux-sgx.fragment new file mode 100644 index 000000000..58d46f588 --- /dev/null +++ b/buildroot/board/beaglebone/linux-sgx.fragment @@ -0,0 +1,13 @@ +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_OMAP2_DSS_INIT=y +CONFIG_OMAP_DSS_BASE=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_DSS_DPI=y +CONFIG_DRM_OMAP=y +CONFIG_DRM_OMAP_NUM_CRTCS=2 +CONFIG_DRM_OMAP_WB_M2M=y +CONFIG_DRM_TILCDC=y +CONFIG_DRM_I2C_NXP_TDA998X=y +CONFIG_DRM=y +CONFIG_DRM_LEGACY=y diff --git a/buildroot/board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch b/buildroot/board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch new file mode 100644 index 000000000..8e36d9abc --- /dev/null +++ b/buildroot/board/beaglebone/patches/linux/0001-keep-jtag-clock-alive-for-debugger.patch @@ -0,0 +1,16 @@ +This patch keeps the debugSS clock alive, it clocks the JTAG macro and enables +access to the SoC via JTAG after the kernel booted. + +Signed-off-by: Lothar Felten +--- +diff -Naur linux-orig/arch/arm/mach-omap2/omap_hwmod_33xx_data.c linux-52c4aa7cdb93d61f8008f380135beaf7b8fa6593/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +--- linux-orig/arch/arm/mach-omap2/omap_hwmod_33xx_data.c 2015-10-02 17:30:56.000000000 +0200 ++++ linux-52c4aa7cdb93d61f8008f380135beaf7b8fa6593/arch/arm/mach-omap2/omap_hwmod_33xx_data.c 2016-08-15 11:28:55.017617612 +0200 +@@ -208,6 +208,7 @@ + .name = "debugss", + .class = &am33xx_debugss_hwmod_class, + .clkdm_name = "l3_aon_clkdm", ++ .flags = (HWMOD_INIT_NO_IDLE|HWMOD_INIT_NO_RESET), /* keep debugSS clock alive for JTAG */ + .main_clk = "trace_clk_div_ck", + .prcm = { + .omap4 = { diff --git a/buildroot/board/beaglebone/patches/linux/linux-0001-arm-Export-cache-flush-management-symbols-when-MULTI.patch b/buildroot/board/beaglebone/patches/linux/linux-0001-arm-Export-cache-flush-management-symbols-when-MULTI.patch deleted file mode 100644 index 1ca1e70ca..000000000 --- a/buildroot/board/beaglebone/patches/linux/linux-0001-arm-Export-cache-flush-management-symbols-when-MULTI.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 29885f2f3d700341d322274db6ad085e601c0994 Mon Sep 17 00:00:00 2001 -From: Pantelis Antoniou -Date: Fri, 4 Jan 2013 00:32:33 +0200 -Subject: [PATCH 3/3] arm: Export cache flush management symbols when - !MULTI_CACHE - -When compiling a kernel without CONFIG_MULTI_CACHE enabled the -dma access functions end up not being exported. Fix it. - -Signed-off-by: Pantelis Antoniou ---- - arch/arm/kernel/setup.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c -index da1d1aa..dcb678c 100644 ---- a/arch/arm/kernel/setup.c -+++ b/arch/arm/kernel/setup.c -@@ -923,3 +923,12 @@ const struct seq_operations cpuinfo_op = { - .stop = c_stop, - .show = c_show - }; -+ -+/* export the cache management functions */ -+#ifndef MULTI_CACHE -+ -+EXPORT_SYMBOL(__glue(_CACHE,_dma_map_area)); -+EXPORT_SYMBOL(__glue(_CACHE,_dma_unmap_area)); -+EXPORT_SYMBOL(__glue(_CACHE,_dma_flush_range)); -+ -+#endif --- -1.7.10.4 - diff --git a/buildroot/board/beaglebone/post-build.sh b/buildroot/board/beaglebone/post-build.sh new file mode 100755 index 000000000..ffdd19138 --- /dev/null +++ b/buildroot/board/beaglebone/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +cp $BOARD_DIR/uEnv.txt $BINARIES_DIR/uEnv.txt diff --git a/buildroot/board/beaglebone/post-image.sh b/buildroot/board/beaglebone/post-image.sh deleted file mode 100755 index 7441d07a0..000000000 --- a/buildroot/board/beaglebone/post-image.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# post-image.sh for BeagleBone -# 2014, Marcin Jabrzyk - -# copy the uEnv.txt to the output/images directory -cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt diff --git a/buildroot/board/beaglebone/readme.txt b/buildroot/board/beaglebone/readme.txt index c6d0aa0cd..e6647dad2 100644 --- a/buildroot/board/beaglebone/readme.txt +++ b/buildroot/board/beaglebone/readme.txt @@ -1,62 +1,52 @@ -BeagleBone +CircuitCo BeagleBone +Texas Instuments AM335x Evaluation Module (TMDXEVM3358) -Intro -===== -To be able to use BeagleBone board with the images generated by -Buildroot, you have prepare the SDCard. +Description +=========== -How to build it -=============== +This configuration will build a complete image for the beaglebone and +the TI AM335x-EVM, the board type is identified by the on-board +EEPROM. The configuration is based on the +ti-processor-sdk-02.00.00.00. Device tree blobs for beaglebone +variants and the evm-sk are built too. - $ make beaglebone_defconfig +For Qt5 support support use the beaglebone_qt5_defconfig. -Then you can edit the build options using +How to build it +=============== - $ make menuconfig +Select the default configuration for the target: +$ make beaglebone_defconfig -Compile all and build rootfs image: +Optional: modify the configuration: +$ make menuconfig - $ make +Build: +$ make Result of the build -------------------- - -After building, you should get a tree like this: - - output/images/ - ├── am335x-boneblack.dtb - ├── am335x-bone.dtb - ├── MLO - ├── rootfs.ext2 - ├── u-boot.img - ├── uEnv.txt - └── zImage - - -Prepare you SDCard -================== - -You need to prepare first partition in fat32 and marked as bootable, -and second where you will write rootfs. - -Copy the files to boot partition - - $ cp MLO u-boot.img zImage uEnv.txt *.dtb /media/zzzzz - -where /media/zzzzz is the mount point -Then you need to write the rootfs image onto SDCard: - - # dd if=rootfs.ext2 of=/dev/xxxxx - -where /dev/xxxxx is the second partition. Use: - - # fdisk -l - -to check for correct one. - -Finish -====== +=================== +output/images/ ++-- am335x-boneblack.dtb ++-- am335x-bone.dtb ++-- am335x-evm.dtb ++-- am335x-evmsk.dtb ++-- boot.vfat ++-- MLO ++-- rootfs.ext2 ++-- rootfs.tar ++-- sdcard.img ++-- u-boot.img ++-- uEnv.txt ++-- zImage + +To copy the image file to the sdcard use dd: +$ dd if=output/images/sdcard.img of=/dev/XXX + +Tested hardware +=============== +am335x-evm (rev. 1.1A) +beagleboneblack (rev. A5A) +beaglebone (rev. A6) -Unmount all mounted SDCard partitions and insert the card to BeagleBone. -Hold the "BOOT" button and apply power. Then release the "BOOT" button. -The output is available on the serial console. +2016, Lothar Felten diff --git a/buildroot/board/beaglebone/uEnv.txt b/buildroot/board/beaglebone/uEnv.txt index d63843239..8fce54d87 100644 --- a/buildroot/board/beaglebone/uEnv.txt +++ b/buildroot/board/beaglebone/uEnv.txt @@ -1,3 +1,11 @@ bootpart=0:1 +devtype=mmc bootdir= -uenvcmd=run loaduimage;run loadramdisk;run findfdt;run loadfdt;run ramboot +bootfile=zImage +bootpartition=mmcblk0p2 +console=ttyS0,115200n8 +loadaddr=0x82000000 +fdtaddr=0x88000000 +set_mmc1=if test $board_name = A33515BB; then setenv bootpartition mmcblk1p2; fi +set_bootargs=setenv bootargs console=${console} root=/dev/${bootpartition} rw rootfstype=ext4 rootwait +uenvcmd=run set_mmc1; run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr} diff --git a/buildroot/board/beagleboneai/genimage.cfg b/buildroot/board/beagleboneai/genimage.cfg new file mode 100644 index 000000000..0bdfa64d3 --- /dev/null +++ b/buildroot/board/beagleboneai/genimage.cfg @@ -0,0 +1,29 @@ +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img", + "zImage", + "am5729-beagleboneai.dtb", + "uEnv.txt" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/beagleboneai/patches/uboot/0001-BeagleBone-AI-support.patch b/buildroot/board/beagleboneai/patches/uboot/0001-BeagleBone-AI-support.patch new file mode 100644 index 000000000..2d9accf95 --- /dev/null +++ b/buildroot/board/beagleboneai/patches/uboot/0001-BeagleBone-AI-support.patch @@ -0,0 +1,1783 @@ +From 989c27c791a453550ff6c1440b41c55c6e70615d Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 27 Mar 2019 14:06:24 -0400 +Subject: [PATCH] BeagleBone AI support + +Patch from: +https://github.com/beagleboard/beaglebone-ai/blob/master/SW/buildroot/local/patches/uboot/0001-BeagleBone-AI-support.patch + +Signed-off-by: Peter Korsgaard +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/am5729-beagleboneai.dts | 494 +++++++++++++++++++++++++++ + arch/arm/mach-omap2/omap5/hw_data.c | 3 +- + board/ti/am57xx/board.c | 134 +++++++- + board/ti/am57xx/mux_data.h | 390 +++++++++++++++++++++ + configs/am57xx_evm_defconfig | 10 +- + include/configs/am57xx_evm.h | 2 +- + include/configs/ti_armv7_common.h | 357 +++++++++++++++++++ + include/configs/ti_omap5_common.h | 5 + + include/environment/ti/boot.h | 49 +-- + include/environment/ti/mmc.h | 45 ++- + 11 files changed, 1447 insertions(+), 43 deletions(-) + create mode 100644 arch/arm/dts/am5729-beagleboneai.dts + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 2a040b20a5..6771d457a4 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -232,6 +232,7 @@ dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb \ + dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \ + am57xx-beagle-x15-revb1.dtb \ + am57xx-beagle-x15-revc.dtb \ ++ am5729-beagleboneai.dtb \ + am574x-idk.dtb \ + am572x-idk.dtb \ + am571x-idk.dtb +diff --git a/arch/arm/dts/am5729-beagleboneai.dts b/arch/arm/dts/am5729-beagleboneai.dts +new file mode 100644 +index 0000000000..d1afe55751 +--- /dev/null ++++ b/arch/arm/dts/am5729-beagleboneai.dts +@@ -0,0 +1,494 @@ ++/* ++ * Copyright (C) 2014-2018 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++ ++#include "dra74x.dtsi" ++#include "am57xx-commercial-grade.dtsi" ++#include "dra74x-mmc-iodelay.dtsi" ++#include ++#include ++#include ++ ++/ { ++ model = "BeagleBoard.org BeagleBone AI"; ++ compatible = "beagleboard.org,am57xx-beagleboneai", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"; ++ ++ chosen { ++ stdout-path = &uart1; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x80000000 0x0 0x40000000>; ++ }; ++ ++ vdd_5v: fixedregulator-vdd_5v { ++ compatible = "regulator-fixed"; ++ regulator-name = "vdd_5v"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vtt_fixed: fixedregulator-vtt { ++ /* TPS51200 */ ++ compatible = "regulator-fixed"; ++ regulator-name = "vtt_fixed"; ++ vin-supply = <&vdd_3v3>; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ src_clk_x1: src_clk_x1 { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <20000000>; ++ }; ++ ++ src_clk_osc1: src_clk_osc1 { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <24000000>; ++ }; ++ ++ src_clk_osc4: src_clk_osc4 { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <24000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led0 { ++ label = "beaglebone:green:usr0"; ++ gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ default-state = "off"; ++ }; ++ ++ led1 { ++ label = "beaglebone:green:usr1"; ++ gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc0"; ++ default-state = "off"; ++ }; ++ ++ led2 { ++ label = "beaglebone:green:usr2"; ++ gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "cpu"; ++ default-state = "off"; ++ }; ++ ++ led3 { ++ label = "beaglebone:green:usr3"; ++ gpios = <&gpio3 17 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc1"; ++ default-state = "off"; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ tps659038: tps659038@58 { ++ compatible = "ti,tps659038"; ++ reg = <0x58>; ++ interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH ++ &dra7_pmx_core 0x418>; ++ ++ #interrupt-cells = <2>; ++ interrupt-controller; ++ ++ ti,system-power-controller; ++ ti,palmas-override-powerhold; ++ ++ tps659038_pmic { ++ compatible = "ti,tps659038-pmic"; ++ ++ smps12-in-supply = <&vdd_5v>; ++ smps3-in-supply = <&vdd_5v>; ++ smps45-in-supply = <&vdd_5v>; ++ smps6-in-supply = <&vdd_5v>; ++ smps7-in-supply = <&vdd_5v>; ++ mps3-in-supply = <&vdd_5v>; ++ smps8-in-supply = <&vdd_5v>; ++ smps9-in-supply = <&vdd_5v>; ++ ldo1-in-supply = <&vdd_5v>; ++ ldo2-in-supply = <&vdd_5v>; ++ ldo3-in-supply = <&vdd_5v>; ++ ldo4-in-supply = <&vdd_5v>; ++ ldo9-in-supply = <&vdd_5v>; ++ ldoln-in-supply = <&vdd_5v>; ++ ldousb-in-supply = <&vdd_5v>; ++ ldortc-in-supply = <&vdd_5v>; ++ ++ regulators { ++ vdd_mpu: smps12 { ++ /* VDD_MPU */ ++ regulator-name = "smps12"; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <1250000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_ddr: smps3 { ++ /* VDD_DDR EMIF1 EMIF2 */ ++ regulator-name = "smps3"; ++ regulator-min-microvolt = <1350000>; ++ regulator-max-microvolt = <1350000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_dspeve: smps45 { ++ /* VDD_DSPEVE on AM572 */ ++ /* VDD_IVA + VDD_DSP on AM571 */ ++ regulator-name = "smps45"; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <1250000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_gpu: smps6 { ++ /* VDD_GPU */ ++ regulator-name = "smps6"; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <1250000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_core: smps7 { ++ /* VDD_CORE */ ++ regulator-name = "smps7"; ++ regulator-min-microvolt = <850000>; /*** 1.15V */ ++ regulator-max-microvolt = <1150000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_iva: smps8 { ++ /* 5728 - VDD_IVAHD */ /*** 1.06V */ ++ /* 5718 - N.C. test point */ ++ regulator-name = "smps8"; ++ }; ++ ++ vdd_3v3: smps9 { ++ /* VDD_3V3 */ ++ regulator-name = "smps9"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_sd: ldo1 { ++ /* VDDSHV8 - VSDMMC */ ++ regulator-name = "ldo1"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ vdd_1v8: ldo2 { ++ /* VDDSH18V */ ++ regulator-name = "ldo2"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_1v8_phy_ldo3: ldo3 { ++ /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */ ++ regulator-name = "ldo3"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_1v8_phy_ldo4: ldo4 { ++ /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/ ++ regulator-name = "ldo4"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ /* LDO5-8 unused */ ++ ++ vdd_rtc: ldo9 { ++ /* VDD_RTC */ ++ regulator-name = "ldo9"; ++ regulator-min-microvolt = <840000>; ++ regulator-max-microvolt = <1160000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ vdd_1v8_pll: ldoln { ++ /* VDDA_1V8_PLL */ ++ regulator-name = "ldoln"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ ldousb_reg: ldousb { ++ /* VDDA_3V_USB: VDDA_USBHS33 */ ++ regulator-name = "ldousb"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ ldortc_reg: ldortc { ++ /* VDDA_RTC */ ++ regulator-name = "ldortc"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ regulator-boot-on; ++ }; ++ ++ regen1: regen1 { ++ /* VDD_3V3_ON */ ++ regulator-name = "regen1"; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ regen2: regen2 { ++ /* Needed for PMIC internal resource */ ++ regulator-name = "regen2"; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ }; ++ }; ++ ++ tps659038_rtc: tps659038_rtc { ++ compatible = "ti,palmas-rtc"; ++ interrupt-parent = <&tps659038>; ++ interrupts = <8 IRQ_TYPE_EDGE_FALLING>; ++ wakeup-source; ++ }; ++ ++ tps659038_pwr_button: tps659038_pwr_button { ++ compatible = "ti,palmas-pwrbutton"; ++ interrupt-parent = <&tps659038>; ++ interrupts = <1 IRQ_TYPE_EDGE_FALLING>; ++ wakeup-source; ++ ti,palmas-long-press-seconds = <12>; ++ }; ++ ++ tps659038_gpio: tps659038_gpio { ++ compatible = "ti,palmas-gpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; ++ ++ extcon_usb2: tps659038_usb { ++ compatible = "ti,palmas-usb-vid"; ++ }; ++ ++ }; ++ ++ eeprom: eeprom@50 { ++ compatible = "atmel,24c32"; ++ reg = <0x50>; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++ clock-frequency = <400000>; ++}; ++ ++&i2c3 { ++ status = "okay"; ++ clock-frequency = <400000>; ++}; ++ ++&i2c4 { ++ status = "okay"; ++ clock-frequency = <100000>; ++}; ++ ++&i2c5 { ++ status = "okay"; ++ clock-frequency = <100000>; ++}; ++ ++&cpu0 { ++ vdd-supply = <&vdd_mpu>; ++ voltage-tolerance = <1>; ++}; ++ ++&uart1 { ++ status = "okay"; ++ interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, ++ <&dra7_pmx_core 0x3e0>; ++}; ++ ++&uart3 { ++ status = "okay"; ++ interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, ++ <&dra7_pmx_core 0x3f8>; ++}; ++ ++&davinci_mdio { ++ reset-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; ++ reset-delay-us = <2>; ++ ++ phy0: ethernet-phy@1 { ++ reg = <4>; ++ }; ++}; ++ ++&mac { ++ slaves = <1>; ++ status = "okay"; ++ //dual_emac; ++}; ++ ++&cpsw_emac0 { ++ phy-handle = <&phy0>; ++ phy-mode = "rgmii"; ++ //dual_emac_res_vlan = <1>; ++}; ++ ++&mmc1 { ++ status = "okay"; ++ vmmc-supply = <&vdd_3v3>; ++ vmmc_aux-supply = <&vdd_sd>; ++ vqmmc-supply = <&vdd_sd>; /* IO Line Power */ ++ bus-width = <4>; ++ max-frequency = <24000000>; ++ cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */ ++ ++ pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; ++ pinctrl-0 = <&mmc1_pins_default>; ++ pinctrl-1 = <&mmc1_pins_hs>; ++ pinctrl-2 = <&mmc1_pins_sdr12>; ++ pinctrl-3 = <&mmc1_pins_sdr25>; ++ pinctrl-4 = <&mmc1_pins_sdr50>; ++ pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>; ++ pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>; ++}; ++ ++&mmc2 { ++ status = "okay"; ++ vmmc-supply = <&vdd_3v3>; ++ //FUTURE: vqmmc-supply = <&vdd_3v3>; /* IO Line Power */ ++ bus-width = <8>; ++ ti,non-removable; ++ non-removable; ++ max-frequency = <96000000>; ++ no-1-8-v; ++ /delete-property/ mmc-hs200-1_8v; ++ ++ pinctrl-names = "default", "hs"; ++ pinctrl-0 = <&mmc2_pins_default>; ++ pinctrl-1 = <&mmc2_pins_hs>; ++}; ++ ++&usb2_phy1 { ++ phy-supply = <&ldousb_reg>; ++}; ++ ++&usb2_phy2 { ++ phy-supply = <&ldousb_reg>; ++}; ++ ++&usb1 { ++ dr_mode = "host"; ++}; ++ ++&omap_dwc3_2 { ++ extcon = <&extcon_usb2>; ++}; ++ ++&usb2 { ++ dr_mode = "peripheral"; ++}; ++ ++&cpu_trips { ++ cpu_alert1: cpu_alert1 { ++ temperature = <50000>; /* millicelsius */ ++ hysteresis = <2000>; /* millicelsius */ ++ type = "active"; ++ }; ++}; ++ ++&cpu_cooling_maps { ++ map1 { ++ trip = <&cpu_alert1>; ++ }; ++}; ++ ++&thermal_zones { ++ board_thermal: board_thermal { ++ polling-delay-passive = <1250>; /* milliseconds */ ++ polling-delay = <1500>; /* milliseconds */ ++ ++ board_trips: trips { ++ board_alert0: board_alert { ++ temperature = <40000>; /* millicelsius */ ++ hysteresis = <2000>; /* millicelsius */ ++ type = "active"; ++ }; ++ ++ board_crit: board_crit { ++ temperature = <105000>; /* millicelsius */ ++ hysteresis = <0>; /* millicelsius */ ++ type = "critical"; ++ }; ++ }; ++ ++ board_cooling_maps: cooling-maps { ++ map0 { ++ trip = <&board_alert0>; ++ }; ++ }; ++ }; ++}; ++ ++&mailbox5 { ++ status = "okay"; ++ mbox_ipu1_ipc3x: mbox_ipu1_ipc3x { ++ status = "okay"; ++ }; ++ mbox_dsp1_ipc3x: mbox_dsp1_ipc3x { ++ status = "okay"; ++ }; ++}; ++ ++&mailbox6 { ++ status = "okay"; ++ mbox_ipu2_ipc3x: mbox_ipu2_ipc3x { ++ status = "okay"; ++ }; ++ mbox_dsp2_ipc3x: mbox_dsp2_ipc3x { ++ status = "okay"; ++ }; ++}; +diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c +index c4a41db92a..57b23b93b5 100644 +--- a/arch/arm/mach-omap2/omap5/hw_data.c ++++ b/arch/arm/mach-omap2/omap5/hw_data.c +@@ -418,8 +418,10 @@ void enable_basic_clocks(void) + (*prcm)->cm_l3init_hsmmc2_clkctrl, + (*prcm)->cm_l4per_gptimer2_clkctrl, + (*prcm)->cm_wkup_wdtimer2_clkctrl, ++ (*prcm)->cm_l4per_uart1_clkctrl, + (*prcm)->cm_l4per_uart3_clkctrl, + (*prcm)->cm_l4per_i2c1_clkctrl, ++ (*prcm)->cm_l4per_i2c4_clkctrl, + #ifdef CONFIG_DRIVER_TI_CPSW + (*prcm)->cm_gmac_gmac_clkctrl, + #endif +@@ -493,7 +495,6 @@ void enable_basic_uboot_clocks(void) + (*prcm)->cm_l4per_mcspi1_clkctrl, + (*prcm)->cm_l4per_i2c2_clkctrl, + (*prcm)->cm_l4per_i2c3_clkctrl, +- (*prcm)->cm_l4per_i2c4_clkctrl, + #if defined(CONFIG_DRA7XX) + (*prcm)->cm_ipu_i2c5_clkctrl, + #else +diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c +index 7063345dcc..47a8391de8 100644 +--- a/board/ti/am57xx/board.c ++++ b/board/ti/am57xx/board.c +@@ -30,6 +30,8 @@ + #include + #include + #include ++#include ++#include + + #include "../common/board_detect.h" + #include "mux_data.h" +@@ -46,6 +48,7 @@ + #define board_is_am574x_idk() board_ti_is("AM574IDK") + #define board_is_am572x_idk() board_ti_is("AM572IDK") + #define board_is_am571x_idk() board_ti_is("AM571IDK") ++#define board_is_bbai() board_ti_is("BBBBAI__") //no EEPROM... + + #ifdef CONFIG_DRIVER_TI_CPSW + #include +@@ -75,6 +78,12 @@ DECLARE_GLOBAL_DATA_PTR; + #define TPS65903X_PRIMARY_SECONDARY_PAD2 0xFB + #define TPS65903X_PAD2_POWERHOLD_MASK 0x20 + ++#define CAPE_EEPROM_BUS_NUM 3 ++#define CAPE_EEPROM_ADDR0 0x54 ++#define CAPE_EEPROM_ADDR3 0x57 ++ ++#define CAPE_EEPROM_ADDR_LEN 0x10 ++ + const struct omap_sysinfo sysinfo = { + "Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n" + }; +@@ -84,6 +93,12 @@ static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = { + .is_ma_present = 0x1 + }; + ++static const struct dmm_lisa_map_regs bbai_lisa_regs = { ++ ///FIXME: Document, where this magic number come from? ++ .dmm_lisa_map_3 = 0x80640100, ++ .is_ma_present = 0x1 ++}; ++ + static const struct dmm_lisa_map_regs am571x_idk_lisa_regs = { + .dmm_lisa_map_3 = 0x80640100, + .is_ma_present = 0x1 +@@ -101,6 +116,8 @@ void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs) + *dmm_lisa_regs = &am571x_idk_lisa_regs; + else if (board_is_am574x_idk()) + *dmm_lisa_regs = &am574x_idk_lisa_regs; ++ else if (board_is_bbai()) ++ *dmm_lisa_regs = &bbai_lisa_regs; + else + *dmm_lisa_regs = &beagle_x15_lisa_regs; + } +@@ -502,8 +519,30 @@ void do_board_detect(void) + + rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS, + CONFIG_EEPROM_CHIP_ADDRESS); +- if (rc) ++ if (rc) { + printf("ti_i2c_eeprom_init failed %d\n", rc); ++ ti_i2c_eeprom_am_set("BBBBAI__", "A"); ++ }; ++ ++ puts("in do_board_detect\n"); ++ printf("do_board_detect\n"); ++} ++ ++void write_hex (unsigned char i) ++{ ++ char cc; ++ ++ cc = i >> 4; ++ cc &= 0xf; ++ if (cc > 9) ++ serial_putc (cc + 55); ++ else ++ serial_putc (cc + 48); ++ cc = i & 0xf; ++ if (cc > 9) ++ serial_putc (cc + 55); ++ else ++ serial_putc (cc + 48); + } + + #else /* CONFIG_SPL_BUILD */ +@@ -521,6 +560,8 @@ void do_board_detect(void) + + if (board_is_x15()) + bname = "BeagleBoard X15"; ++ else if (board_is_bbai()) ++ bname = "BeagleBone AI"; + else if (board_is_am572x_evm()) + bname = "AM572x EVM"; + else if (board_is_am574x_idk()) +@@ -535,6 +576,23 @@ void do_board_detect(void) + "Board: %s REV %s\n", bname, board_ti_get_rev()); + } + ++void write_hex (unsigned char i) ++{ ++ char cc; ++ ++ cc = i >> 4; ++ cc &= 0xf; ++ if (cc > 9) ++ serial_putc (cc + 55); ++ else ++ serial_putc (cc + 48); ++ cc = i & 0xf; ++ if (cc > 9) ++ serial_putc (cc + 55); ++ else ++ serial_putc (cc + 48); ++} ++ + static void setup_board_eeprom_env(void) + { + char *name = "beagle_x15"; +@@ -557,6 +615,8 @@ static void setup_board_eeprom_env(void) + name = "am57xx_evm_reva3"; + else + name = "am57xx_evm"; ++ } else if (board_is_bbai()) { ++ name = "am5729_beagleboneai"; + } else if (board_is_am574x_idk()) { + name = "am574x_idk"; + } else if (board_is_am572x_idk()) { +@@ -626,7 +686,7 @@ void am57x_idk_lcd_detect(void) + struct udevice *dev; + + /* Only valid for IDKs */ +- if (board_is_x15() || board_is_am572x_evm()) ++ if (board_is_x15() || board_is_am572x_evm() || board_is_bbai()) + return; + + /* Only AM571x IDK has gpio control detect.. so check that */ +@@ -720,6 +780,28 @@ int board_late_init(void) + + am57x_idk_lcd_detect(); + ++ ///FIXME, too late!! But useful for testing function... ++ unsigned char addr; ++ struct udevice *dev; ++ int rc; ++ ++ for ( addr = CAPE_EEPROM_ADDR0; addr <= CAPE_EEPROM_ADDR3; addr++ ) { ++ puts("BeagleBone: cape eeprom: i2c_probe: 0x"); write_hex(addr); puts(":\n"); ++ rc = i2c_get_chip_for_busnum(CAPE_EEPROM_BUS_NUM, addr, 1, &dev); ++ if (rc) { ++ printf("failed to get device for EEPROM at address 0x%x\n", ++ addr); ++// goto out; ++ } ++// out: ++ } ++ ++ if (board_is_bbai()) { ++ env_set("console", "ttyS0,115200n8"); ++ } else { ++ env_set("console", "ttyO2,115200n8"); ++ } ++ + #if !defined(CONFIG_SPL_BUILD) + board_ti_set_ethaddr(2); + #endif +@@ -762,6 +844,13 @@ void recalibrate_iodelay(void) + pconf_sz = ARRAY_SIZE(core_padconf_array_essential_am571x_idk); + iod = iodelay_cfg_array_am571x_idk; + iod_sz = ARRAY_SIZE(iodelay_cfg_array_am571x_idk); ++ } else if (board_is_bbai()) { ++ /* Common for X15/GPEVM */ ++ pconf = core_padconf_array_essential_bbai; ++ pconf_sz = ARRAY_SIZE(core_padconf_array_essential_bbai); ++ /* Since full production should switch to SR2.0 */ ++ iod = iodelay_cfg_array_bbai; ++ iod_sz = ARRAY_SIZE(iodelay_cfg_array_bbai); + } else { + /* Common for X15/GPEVM */ + pconf = core_padconf_array_essential_x15; +@@ -863,12 +952,50 @@ const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr) + #endif + + #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT) ++ ++//static int eeprom_has_been_read; ++//static struct id_eeprom eeprom; ++ ++struct am335x_cape_eeprom_id { ++ unsigned int header; ++ char eeprom_rev[2]; ++ char board_name[32]; ++ char version[4]; ++ char manufacture[16]; ++ char part_number[16]; ++ char number_of_pins[2]; ++ char serial_number[12]; ++ char pin_usage[140]; ++ char vdd_3v3exp[ 2]; ++ char vdd_5v[ 2]; ++ char sys_5v[2]; ++ char dc_supplied[2]; ++}; ++ + int spl_start_uboot(void) + { + /* break into full u-boot on 'c' */ + if (serial_tstc() && serial_getc() == 'c') + return 1; + ++ //FIXME, i2c doesn't see to be up.. ++ puts("spl_start_uboot\n"); ++ unsigned char addr; ++ struct udevice *dev; ++ int rc; ++ ++ for ( addr = CAPE_EEPROM_ADDR0; addr <= CAPE_EEPROM_ADDR3; addr++ ) { ++ puts("BeagleBone: cape eeprom: i2c_probe: 0x"); write_hex(addr); puts(":\n"); ++ rc = i2c_get_chip_for_busnum(CAPE_EEPROM_BUS_NUM, addr, 1, &dev); ++ if (rc) { ++ printf("failed to get device for EEPROM at address 0x%x\n", ++ addr); ++// goto out; ++ } ++// out: ++ } ++ ++ + #ifdef CONFIG_SPL_ENV_SUPPORT + env_init(); + env_load(); +@@ -1084,6 +1211,9 @@ int board_fit_config_name_match(const char *name) + } else if (board_is_am572x_evm() && + !strcmp(name, "am57xx-beagle-x15")) { + return 0; ++ } else if (board_is_bbai() && ++ !strcmp(name, "am5729-beagleboneai")) { ++ return 0; + } else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) { + return 0; + } else if (board_is_am574x_idk() && !strcmp(name, "am574x-idk")) { +diff --git a/board/ti/am57xx/mux_data.h b/board/ti/am57xx/mux_data.h +index d4a15ae93d..9b8ee944f8 100644 +--- a/board/ti/am57xx/mux_data.h ++++ b/board/ti/am57xx/mux_data.h +@@ -233,6 +233,272 @@ const struct pad_conf_entry core_padconf_array_essential_x15[] = { + {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */ + }; + ++const struct pad_conf_entry core_padconf_array_essential_bbai[] = { ++ {GPMC_AD0, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad0.vin3a_d0 */ ++ {GPMC_AD1, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad1.vin3a_d1 */ ++ {GPMC_AD2, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad2.vin3a_d2 */ ++ {GPMC_AD3, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad3.vin3a_d3 */ ++ {GPMC_AD4, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad4.vin3a_d4 */ ++ {GPMC_AD5, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad5.vin3a_d5 */ ++ {GPMC_AD6, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad6.vin3a_d6 */ ++ {GPMC_AD7, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad7.vin3a_d7 */ ++ {GPMC_AD8, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad8.vin3a_d8 */ ++ {GPMC_AD9, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad9.vin3a_d9 */ ++ {GPMC_AD10, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad10.vin3a_d10 */ ++ {GPMC_AD11, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad11.vin3a_d11 */ ++ {GPMC_AD12, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad12.vin3a_d12 */ ++ {GPMC_AD13, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad13.vin3a_d13 */ ++ {GPMC_AD14, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad14.vin3a_d14 */ ++ {GPMC_AD15, (M2 | PIN_INPUT | MANUAL_MODE)}, /* gpmc_ad15.vin3a_d15 */ ++ ++ /* Cape Bus i2c */ ++ {GPMC_A0, (M7 | PIN_INPUT_PULLUP)}, /* R6_GPIO7_3: gpmc_a0.i2c4_scl (Shared with F4_UART10_RTSN) */ ++ {GPMC_A1, (M7 | PIN_INPUT_PULLUP)}, /* T9_GPIO7_4: gpmc_a1.i2c4_sda (Shared with D2_UART10_CTSN) */ ++ ++ {GPMC_A2, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a2.vin3a_d18 */ ++ {GPMC_A3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a3.vin3a_d19 */ ++ {GPMC_A4, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a4.vin3a_d20 */ ++ {GPMC_A5, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a5.vin3a_d21 */ ++ {GPMC_A6, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a6.vin3a_d22 */ ++ {GPMC_A7, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a7.vin3a_d23 */ ++ {GPMC_A8, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a8.vin3a_hsync0 */ ++ {GPMC_A9, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a9.vin3a_vsync0 */ ++ {GPMC_A10, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a10.vin3a_de0 */ ++ {GPMC_A11, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_a11.vin3a_fld0 */ ++ {GPMC_A12, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a12.gpio2_2 */ ++ {GPMC_A13, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a13.gpio2_3 */ ++ {GPMC_A14, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a14.gpio2_4 */ ++ {GPMC_A15, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a15.gpio2_5 */ ++ {GPMC_A16, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a16.gpio2_6 */ ++ {GPMC_A17, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a17.gpio2_7 */ ++ {GPMC_A18, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a18.gpio2_8 */ ++ ++ /* eMMC */ ++ {GPMC_A19, (M1 | PIN_INPUT_PULLUP)}, /* K7: gpmc_a19.mmc2_dat4 */ ++ {GPMC_A20, (M1 | PIN_INPUT_PULLUP)}, /* M7: gpmc_a20.mmc2_dat5 */ ++ {GPMC_A21, (M1 | PIN_INPUT_PULLUP)}, /* J5: gpmc_a21.mmc2_dat6 */ ++ {GPMC_A22, (M1 | PIN_INPUT_PULLUP)}, /* K6: gpmc_a22.mmc2_dat7 */ ++ {GPMC_A23, (M1 | PIN_INPUT_PULLUP)}, /* J7: gpmc_a23.mmc2_clk */ ++ {GPMC_A24, (M1 | PIN_INPUT_PULLUP)}, /* J4: gpmc_a24.mmc2_dat0 */ ++ {GPMC_A25, (M1 | PIN_INPUT_PULLUP)}, /* J6: gpmc_a25.mmc2_dat1 */ ++ {GPMC_A26, (M1 | PIN_INPUT_PULLUP)}, /* H4: gpmc_a26.mmc2_dat2 */ ++ {GPMC_A27, (M1 | PIN_INPUT_PULLUP)}, /* H5: gpmc_a27.mmc2_dat3 */ ++ {GPMC_CS1, (M1 | PIN_INPUT_PULLUP)}, /* H6: gpmc_cs1.mmc2_cmd */ ++ ++ {GPMC_CS0, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_cs0.gpio2_19 */ ++ {GPMC_CS2, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_cs2.gpio2_20 */ ++ {GPMC_CS3, (M2 | PIN_INPUT_PULLDOWN | MANUAL_MODE)}, /* gpmc_cs3.vin3a_clk0 */ ++ {GPMC_CLK, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_clk.dma_evt1 */ ++ {GPMC_ADVN_ALE, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_advn_ale.gpio2_23 */ ++ {GPMC_OEN_REN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_oen_ren.gpio2_24 */ ++ {GPMC_WEN, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_wen.gpio2_25 */ ++ {GPMC_BEN0, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben0.dma_evt3 */ ++ {GPMC_BEN1, (M9 | PIN_INPUT_PULLDOWN)}, /* gpmc_ben1.dma_evt4 */ ++ {GPMC_WAIT0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* gpmc_wait0.gpio2_28 */ ++ {VIN1A_CLK0, (M14 | PIN_INPUT)}, /* vin1a_clk0.gpio2_30 */ ++ {VIN1B_CLK1, (M14 | PIN_INPUT_SLEW)}, /* vin1b_clk1.gpio2_31 */ ++ {VIN1A_D2, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d2.gpio3_6 */ ++ {VIN1A_D3, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d3.gpio3_7 */ ++ {VIN1A_D4, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d4.gpio3_8 */ ++ {VIN1A_D5, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d5.gpio3_9 */ ++ {VIN1A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d6.gpio3_10 */ ++ {VIN1A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d7.gpio3_11 */ ++ {VIN1A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d8.gpio3_12 */ ++ {VIN1A_D10, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d10.gpio3_14 */ ++ {VIN1A_D11, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d11.gpio3_15 */ ++ {VIN1A_D12, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d12.gpio3_16 */ ++ {VIN1A_D14, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d14.gpio3_18 */ ++ {VIN1A_D16, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d16.gpio3_20 */ ++ {VIN1A_D19, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d19.gpio3_23 */ ++ {VIN1A_D20, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d20.gpio3_24 */ ++ {VIN1A_D22, (M14 | PIN_INPUT_PULLDOWN)}, /* vin1a_d22.gpio3_26 */ ++ {VIN2A_CLK0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_clk0.gpio3_28 */ ++ {VIN2A_DE0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_de0.gpio3_29 */ ++ {VIN2A_FLD0, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_fld0.gpio3_30 */ ++ {VIN2A_HSYNC0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_hsync0.pr1_uart0_cts_n */ ++ {VIN2A_VSYNC0, (M11 | PIN_OUTPUT_PULLUP)}, /* vin2a_vsync0.pr1_uart0_rts_n */ ++ {VIN2A_D0, (M11 | PIN_INPUT_PULLUP)}, /* vin2a_d0.pr1_uart0_rxd */ ++ {VIN2A_D1, (M11 | PIN_OUTPUT)}, /* vin2a_d1.pr1_uart0_txd */ ++ {VIN2A_D2, (M8 | PIN_INPUT_PULLUP)}, /* vin2a_d2.uart10_rxd */ ++ {VIN2A_D3, (M8 | PIN_OUTPUT)}, /* vin2a_d3.uart10_txd */ ++ ++ /* Cape Bus i2c (gpio shared) */ ++ {VIN2A_D4, (M15 | PIN_INPUT)}, /* D2_UART10_CTSN: vin2a_d4.uart10_ctsn (Shared with T9_GPIO7_4) */ ++ {VIN2A_D5, (M15 | PIN_INPUT)}, /* F4_UART10_RTSN: vin2a_d5.uart10_rtsn (Shared with R6_GPIO7_3) */ ++ ++ {VIN2A_D6, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d6.gpio4_7 */ ++ {VIN2A_D7, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d7.gpio4_8 */ ++ {VIN2A_D8, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d8.gpio4_9 */ ++ {VIN2A_D9, (M14 | PIN_INPUT_PULLDOWN)}, /* vin2a_d9.gpio4_10 */ ++ {VIN2A_D10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* vin2a_d10.ehrpwm2B */ ++ {VIN2A_D11, (M10 | PIN_INPUT_PULLDOWN)}, /* vin2a_d11.ehrpwm2_tripzone_input */ ++ {VIN2A_D12, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d12.rgmii1_txc */ ++ {VIN2A_D13, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d13.rgmii1_txctl */ ++ {VIN2A_D14, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d14.rgmii1_txd3 */ ++ {VIN2A_D15, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d15.rgmii1_txd2 */ ++ {VIN2A_D16, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d16.rgmii1_txd1 */ ++ {VIN2A_D17, (M3 | PIN_OUTPUT | MANUAL_MODE)}, /* vin2a_d17.rgmii1_txd0 */ ++ {VIN2A_D18, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d18.rgmii1_rxc */ ++ {VIN2A_D19, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d19.rgmii1_rxctl */ ++ {VIN2A_D20, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d20.rgmii1_rxd3 */ ++ {VIN2A_D21, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d21.rgmii1_rxd2 */ ++ {VIN2A_D22, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d22.rgmii1_rxd1 */ ++ {VIN2A_D23, (M3 | PIN_INPUT | MANUAL_MODE)}, /* vin2a_d23.rgmii1_rxd0 */ ++ {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_clk.vout1_clk */ ++ {VOUT1_DE, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_de.vout1_de */ ++ {VOUT1_FLD, (M14 | PIN_INPUT)}, /* vout1_fld.gpio4_21 */ ++ {VOUT1_HSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_hsync.vout1_hsync */ ++ {VOUT1_VSYNC, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_vsync.vout1_vsync */ ++ {VOUT1_D0, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d0.vout1_d0 */ ++ {VOUT1_D1, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d1.vout1_d1 */ ++ {VOUT1_D2, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d2.vout1_d2 */ ++ {VOUT1_D3, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d3.vout1_d3 */ ++ {VOUT1_D4, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d4.vout1_d4 */ ++ {VOUT1_D5, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d5.vout1_d5 */ ++ {VOUT1_D6, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d6.vout1_d6 */ ++ {VOUT1_D7, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d7.vout1_d7 */ ++ {VOUT1_D8, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d8.vout1_d8 */ ++ {VOUT1_D9, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d9.vout1_d9 */ ++ {VOUT1_D10, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d10.vout1_d10 */ ++ {VOUT1_D11, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d11.vout1_d11 */ ++ {VOUT1_D12, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d12.vout1_d12 */ ++ {VOUT1_D13, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d13.vout1_d13 */ ++ {VOUT1_D14, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d14.vout1_d14 */ ++ {VOUT1_D15, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d15.vout1_d15 */ ++ {VOUT1_D16, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d16.vout1_d16 */ ++ {VOUT1_D17, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d17.vout1_d17 */ ++ {VOUT1_D18, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d18.vout1_d18 */ ++ {VOUT1_D19, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d19.vout1_d19 */ ++ {VOUT1_D20, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d20.vout1_d20 */ ++ {VOUT1_D21, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d21.vout1_d21 */ ++ {VOUT1_D22, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d22.vout1_d22 */ ++ {VOUT1_D23, (M0 | PIN_OUTPUT | SLEWCONTROL | MANUAL_MODE)}, /* vout1_d23.vout1_d23 */ ++ {MDIO_MCLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* mdio_mclk.mdio_mclk */ ++ {MDIO_D, (M0 | PIN_INPUT | SLEWCONTROL)}, /* mdio_d.mdio_d */ ++ {RMII_MHZ_50_CLK, (M14 | PIN_INPUT_PULLUP)}, /* RMII_MHZ_50_CLK.gpio5_17 */ ++ {UART3_RXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_rxd.gpio5_18 */ ++ {UART3_TXD, (M14 | PIN_INPUT_SLEW)}, /* uart3_txd.gpio5_19 */ ++ {RGMII0_TXC, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txc.rgmii0_txc */ ++ {RGMII0_TXCTL, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txctl.rgmii0_txctl */ ++ {RGMII0_TXD3, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd3.rgmii0_txd3 */ ++ {RGMII0_TXD2, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd2.rgmii0_txd2 */ ++ {RGMII0_TXD1, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd1.rgmii0_txd1 */ ++ {RGMII0_TXD0, (M0 | PIN_OUTPUT | MANUAL_MODE)}, /* rgmii0_txd0.rgmii0_txd0 */ ++ {RGMII0_RXC, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxc.rgmii0_rxc */ ++ {RGMII0_RXCTL, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxctl.rgmii0_rxctl */ ++ {RGMII0_RXD3, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd3.rgmii0_rxd3 */ ++ {RGMII0_RXD2, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd2.rgmii0_rxd2 */ ++ {RGMII0_RXD1, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd1.rgmii0_rxd1 */ ++ {RGMII0_RXD0, (M0 | PIN_INPUT | MANUAL_MODE)}, /* rgmii0_rxd0.rgmii0_rxd0 */ ++ {USB1_DRVVBUS, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* usb1_drvvbus.usb1_drvvbus */ ++ {USB2_DRVVBUS, (M0 | PIN_OUTPUT_PULLDOWN | SLEWCONTROL)}, /* usb2_drvvbus.usb2_drvvbus */ ++ {GPIO6_14, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_14.timer1 */ ++ {GPIO6_15, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_15.timer2 */ ++ {GPIO6_16, (M10 | PIN_INPUT_PULLUP)}, /* gpio6_16.timer3 */ ++ {XREF_CLK0, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk0.clkout2 */ ++ {XREF_CLK1, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk1.gpio6_18 */ ++ {XREF_CLK2, (M14 | PIN_INPUT_PULLDOWN)}, /* xref_clk2.gpio6_19 */ ++ {XREF_CLK3, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk3.clkout3 */ ++ {MCASP1_ACLKX, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkx.i2c3_sda */ ++ {MCASP1_FSX, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_fsx.i2c3_scl */ ++ {MCASP1_ACLKR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_aclkr.i2c4_sda */ ++ {MCASP1_FSR, (M10 | PIN_INPUT_PULLUP)}, /* mcasp1_fsr.i2c4_scl */ ++ {MCASP1_AXR0, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr0.i2c5_sda */ ++ {MCASP1_AXR1, (M10 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr1.i2c5_scl */ ++ {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr2.gpio5_4 */ ++ {MCASP1_AXR3, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr3.gpio5_5 */ ++ {MCASP1_AXR4, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr4.gpio5_6 */ ++ {MCASP1_AXR5, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr5.gpio5_7 */ ++ {MCASP1_AXR6, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr6.gpio5_8 */ ++ {MCASP1_AXR7, (M14 | PIN_INPUT_PULLDOWN)}, /* mcasp1_axr7.gpio5_9 */ ++ {MCASP1_AXR8, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr8.gpio5_10 */ ++ {MCASP1_AXR9, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr9.gpio5_11 */ ++ {MCASP1_AXR10, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mcasp1_axr10.gpio5_12 */ ++ {MCASP1_AXR11, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* mcasp1_axr11.gpio4_17 */ ++ {MCASP1_AXR12, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr12.mcasp7_axr0 */ ++ {MCASP1_AXR13, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr13.mcasp7_axr1 */ ++ {MCASP1_AXR14, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr14.mcasp7_aclkx */ ++ {MCASP1_AXR15, (M1 | PIN_INPUT_SLEW | VIRTUAL_MODE10)}, /* mcasp1_axr15.mcasp7_fsx */ ++ {MCASP3_ACLKX, (M0 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.mcasp3_aclkx */ ++ {MCASP3_FSX, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.mcasp3_fsx */ ++ {MCASP3_AXR0, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr0.mcasp3_axr0 */ ++ {MCASP3_AXR1, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr1.mcasp3_axr1 */ ++ {MCASP4_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_aclkx.uart8_rxd */ ++ {MCASP4_FSX, (M3 | PIN_OUTPUT)}, /* mcasp4_fsx.uart8_txd */ ++ {MCASP4_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp4_axr0.uart8_ctsn */ ++ {MCASP4_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp4_axr1.uart8_rtsn */ ++ {MCASP5_ACLKX, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_aclkx.uart9_rxd */ ++ {MCASP5_FSX, (M3 | PIN_OUTPUT)}, /* mcasp5_fsx.uart9_txd */ ++ {MCASP5_AXR0, (M3 | PIN_INPUT_PULLUP)}, /* mcasp5_axr0.uart9_ctsn */ ++ {MCASP5_AXR1, (M3 | PIN_OUTPUT_PULLUP)}, /* mcasp5_axr1.uart9_rtsn */ ++ ++ /* microSD Socket */ ++ {MMC1_CLK, (M0 | PIN_INPUT_PULLUP)}, /* W6: mmc1_clk.mmc1_clk */ ++ {MMC1_CMD, (M0 | PIN_INPUT_PULLUP)}, /* Y6: mmc1_cmd.mmc1_cmd */ ++ {MMC1_DAT0, (M0 | PIN_INPUT_PULLUP)}, /* AA6: mmc1_dat0.mmc1_dat0 */ ++ {MMC1_DAT1, (M0 | PIN_INPUT_PULLUP)}, /* Y4: mmc1_dat1.mmc1_dat1 */ ++ {MMC1_DAT2, (M0 | PIN_INPUT_PULLUP)}, /* AA5: mmc1_dat2.mmc1_dat2 */ ++ {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)}, /* Y3: mmc1_dat3.mmc1_dat3 */ ++ {MMC1_SDCD, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* W7: mmc1_sdcd.gpio6_27 */ ++ ++ {GPIO6_10, (M10 | PIN_OUTPUT_PULLDOWN)}, /* gpio6_10.ehrpwm2A */ ++ {GPIO6_11, (M0 | PIN_INPUT_PULLUP)}, /* gpio6_11.gpio6_11 */ ++ {MMC3_CLK, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_clk.mmc3_clk */ ++ {MMC3_CMD, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_cmd.mmc3_cmd */ ++ {MMC3_DAT0, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat0.mmc3_dat0 */ ++ {MMC3_DAT1, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat1.mmc3_dat1 */ ++ {MMC3_DAT2, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat2.mmc3_dat2 */ ++ {MMC3_DAT3, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat3.mmc3_dat3 */ ++ {MMC3_DAT4, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat4.mmc3_dat4 */ ++ {MMC3_DAT5, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat5.mmc3_dat5 */ ++ {MMC3_DAT6, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat6.mmc3_dat6 */ ++ {MMC3_DAT7, (M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}, /* mmc3_dat7.mmc3_dat7 */ ++ {SPI1_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_sclk.gpio7_7 */ ++ {SPI1_D1, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d1.gpio7_8 */ ++ {SPI1_D0, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d0.gpio7_9 */ ++ {SPI1_CS0, (M14 | PIN_INPUT)}, /* spi1_cs0.gpio7_10 */ ++ {SPI1_CS1, (M14 | PIN_INPUT)}, /* spi1_cs1.gpio7_11 */ ++ {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */ ++ {SPI1_CS3, (M6 | PIN_INPUT | SLEWCONTROL)}, /* spi1_cs3.hdmi1_cec */ ++ {SPI2_SCLK, (M14 | PIN_INPUT_PULLDOWN)}, /* spi2_sclk.gpio7_14 */ ++ {SPI2_D1, (M14 | PIN_INPUT_SLEW)}, /* spi2_d1.gpio7_15 */ ++ {SPI2_D0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_d0.gpio7_16 */ ++ {SPI2_CS0, (M14 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* spi2_cs0.gpio7_17 */ ++ {DCAN1_TX, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* dcan1_tx.dcan1_tx */ ++ {DCAN1_RX, (M0 | PIN_INPUT | SLEWCONTROL)}, /* dcan1_rx.dcan1_rx */ ++ ++ /* BeagleBone AI: Debug UART */ ++ {UART1_RXD, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* uart1_rxd.uart1_rxd */ ++ {UART1_TXD, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* uart1_txd.uart1_txd */ ++ ++ {UART1_CTSN, (M14 | PIN_INPUT_PULLDOWN)}, /* uart1_ctsn.gpio7_24 */ ++ {UART1_RTSN, (M14 | PIN_INPUT)}, /* uart1_rtsn.gpio7_25 */ ++ {UART2_RXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_rxd.gpio7_26 */ ++ {UART2_TXD, (M14 | PIN_INPUT_PULLDOWN)}, /* uart2_txd.gpio7_27 */ ++ {UART2_CTSN, (M2 | PIN_INPUT_PULLUP)}, /* uart2_ctsn.uart3_rxd */ ++ {UART2_RTSN, (M1 | PIN_OUTPUT)}, /* uart2_rtsn.uart3_txd */ ++ {I2C1_SDA, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_sda.i2c1_sda */ ++ {I2C1_SCL, (M0 | PIN_INPUT_PULLUP)}, /* i2c1_scl.i2c1_scl */ ++ {I2C2_SDA, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_sda.hdmi1_ddc_scl */ ++ {I2C2_SCL, (M1 | PIN_INPUT_PULLUP)}, /* i2c2_scl.hdmi1_ddc_sda */ ++ {WAKEUP0, (M0 | PIN_INPUT)}, /* Wakeup0.Wakeup0 */ ++ {WAKEUP1, (M0 | PIN_INPUT)}, /* Wakeup1.Wakeup1 */ ++ {WAKEUP2, (M0 | PIN_INPUT)}, /* Wakeup2.Wakeup2 */ ++ {WAKEUP3, (M0 | PIN_INPUT)}, /* Wakeup3.Wakeup3 */ ++ {ON_OFF, (M0 | PIN_OUTPUT)}, /* on_off.on_off */ ++ {RTC_PORZ, (M0 | PIN_INPUT)}, /* rtc_porz.rtc_porz */ ++ {TMS, (M0 | PIN_INPUT_PULLUP)}, /* tms.tms */ ++ {TDI, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)}, /* tdi.tdi */ ++ {TDO, (M0 | PIN_OUTPUT)}, /* tdo.tdo */ ++ {TCLK, (M0 | PIN_INPUT_PULLDOWN)}, /* tclk.tclk */ ++ {TRSTN, (M0 | PIN_INPUT)}, /* trstn.trstn */ ++ {RTCK, (M0 | PIN_OUTPUT)}, /* rtck.rtck */ ++ {EMU0, (M0 | PIN_INPUT)}, /* emu0.emu0 */ ++ {EMU1, (M0 | PIN_INPUT)}, /* emu1.emu1 */ ++ {NMIN_DSP, (M0 | PIN_INPUT)}, /* nmin_dsp.nmin_dsp */ ++ {RSTOUTN, (M0 | PIN_OUTPUT)}, /* rstoutn.rstoutn */ ++}; ++ + const struct pad_conf_entry core_padconf_array_delta_x15_sr1_1[] = { + {MMC1_SDWP, (M14 | PIN_INPUT | SLEWCONTROL)}, /* mmc1_sdwp.gpio6_28 */ + {VOUT1_CLK, (M0 | PIN_OUTPUT | SLEWCONTROL)}, /* vout1_clk.vout1_clk */ +@@ -998,6 +1264,17 @@ const struct pad_conf_entry early_padconf[] = { + {UART2_RTSN, (M1 | PIN_INPUT_SLEW)}, /* uart2_rtsn.uart3_txd */ + {I2C1_SDA, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SDA */ + {I2C1_SCL, (PIN_INPUT_PULLUP | M0)}, /* I2C1_SCL */ ++ ++ /* BeagleBone AI: Debug UART */ ++ {UART1_RXD, (M0 | PIN_INPUT_SLEW)}, /* UART1_RXD */ ++ {UART1_TXD, (M0 | PIN_INPUT_SLEW)}, /* UART1_TXD */ ++ ++ /* Cape Bus i2c */ ++ {GPMC_A0, (M7 | PIN_INPUT_PULLUP)}, /* R6_GPIO7_3: gpmc_a0.i2c4_scl (Shared with F4_UART10_RTSN) */ ++ {GPMC_A1, (M7 | PIN_INPUT_PULLUP)}, /* T9_GPIO7_4: gpmc_a1.i2c4_sda (Shared with D2_UART10_CTSN) */ ++ /* Cape Bus i2c (gpio shared) */ ++ {VIN2A_D4, (M14 | PIN_INPUT_PULLUP)}, /* D2_UART10_CTSN: vin2a_d4.uart10_ctsn (Shared with T9_GPIO7_4) */ ++ {VIN2A_D5, (M14 | PIN_INPUT_PULLUP)}, /* F4_UART10_RTSN: vin2a_d5.uart10_rtsn (Shared with R6_GPIO7_3) */ + }; + + #ifdef CONFIG_IODELAY_RECALIBRATION +@@ -1199,6 +1476,119 @@ const struct iodelay_cfg_entry iodelay_cfg_array_x15_sr2_0[] = { + {0x0CEC, 2739, 0}, /* CFG_VOUT1_VSYNC_OUT */ + }; + ++const struct iodelay_cfg_entry iodelay_cfg_array_bbai[] = { ++ {0x0114, 2519, 702}, /* CFG_GPMC_A0_IN */ ++ {0x0120, 2435, 411}, /* CFG_GPMC_A10_IN */ ++ {0x012C, 2379, 755}, /* CFG_GPMC_A11_IN */ ++ {0x0198, 2384, 778}, /* CFG_GPMC_A1_IN */ ++ {0x0204, 2499, 1127}, /* CFG_GPMC_A2_IN */ ++ {0x0210, 2455, 1181}, /* CFG_GPMC_A3_IN */ ++ {0x021C, 2486, 1039}, /* CFG_GPMC_A4_IN */ ++ {0x0228, 2456, 938}, /* CFG_GPMC_A5_IN */ ++ {0x0234, 2463, 573}, /* CFG_GPMC_A6_IN */ ++ {0x0240, 2608, 783}, /* CFG_GPMC_A7_IN */ ++ {0x024C, 2430, 656}, /* CFG_GPMC_A8_IN */ ++ {0x0258, 2465, 850}, /* CFG_GPMC_A9_IN */ ++ {0x0264, 2316, 301}, /* CFG_GPMC_AD0_IN */ ++ {0x0270, 2324, 406}, /* CFG_GPMC_AD10_IN */ ++ {0x027C, 2278, 352}, /* CFG_GPMC_AD11_IN */ ++ {0x0288, 2297, 160}, /* CFG_GPMC_AD12_IN */ ++ {0x0294, 2278, 108}, /* CFG_GPMC_AD13_IN */ ++ {0x02A0, 2035, 0}, /* CFG_GPMC_AD14_IN */ ++ {0x02AC, 2279, 378}, /* CFG_GPMC_AD15_IN */ ++ {0x02B8, 2440, 70}, /* CFG_GPMC_AD1_IN */ ++ {0x02C4, 2404, 446}, /* CFG_GPMC_AD2_IN */ ++ {0x02D0, 2343, 212}, /* CFG_GPMC_AD3_IN */ ++ {0x02DC, 2355, 322}, /* CFG_GPMC_AD4_IN */ ++ {0x02E8, 2337, 192}, /* CFG_GPMC_AD5_IN */ ++ {0x02F4, 2270, 314}, /* CFG_GPMC_AD6_IN */ ++ {0x0300, 2339, 259}, /* CFG_GPMC_AD7_IN */ ++ {0x030C, 2308, 577}, /* CFG_GPMC_AD8_IN */ ++ {0x0318, 2334, 166}, /* CFG_GPMC_AD9_IN */ ++ {0x0378, 0, 0}, /* CFG_GPMC_CS3_IN */ ++ {0x0678, 0, 386}, /* CFG_MMC3_CLK_IN */ ++ {0x0680, 605, 0}, /* CFG_MMC3_CLK_OUT */ ++ {0x0684, 0, 0}, /* CFG_MMC3_CMD_IN */ ++ {0x0688, 0, 0}, /* CFG_MMC3_CMD_OEN */ ++ {0x068C, 0, 0}, /* CFG_MMC3_CMD_OUT */ ++ {0x0690, 171, 0}, /* CFG_MMC3_DAT0_IN */ ++ {0x0694, 0, 0}, /* CFG_MMC3_DAT0_OEN */ ++ {0x0698, 0, 0}, /* CFG_MMC3_DAT0_OUT */ ++ {0x069C, 221, 0}, /* CFG_MMC3_DAT1_IN */ ++ {0x06A0, 0, 0}, /* CFG_MMC3_DAT1_OEN */ ++ {0x06A4, 0, 0}, /* CFG_MMC3_DAT1_OUT */ ++ {0x06A8, 0, 0}, /* CFG_MMC3_DAT2_IN */ ++ {0x06AC, 0, 0}, /* CFG_MMC3_DAT2_OEN */ ++ {0x06B0, 0, 0}, /* CFG_MMC3_DAT2_OUT */ ++ {0x06B4, 474, 0}, /* CFG_MMC3_DAT3_IN */ ++ {0x06B8, 0, 0}, /* CFG_MMC3_DAT3_OEN */ ++ {0x06BC, 0, 0}, /* CFG_MMC3_DAT3_OUT */ ++ {0x06C0, 792, 0}, /* CFG_MMC3_DAT4_IN */ ++ {0x06C4, 0, 0}, /* CFG_MMC3_DAT4_OEN */ ++ {0x06C8, 0, 0}, /* CFG_MMC3_DAT4_OUT */ ++ {0x06CC, 782, 0}, /* CFG_MMC3_DAT5_IN */ ++ {0x06D0, 0, 0}, /* CFG_MMC3_DAT5_OEN */ ++ {0x06D4, 0, 0}, /* CFG_MMC3_DAT5_OUT */ ++ {0x06D8, 942, 0}, /* CFG_MMC3_DAT6_IN */ ++ {0x06DC, 0, 0}, /* CFG_MMC3_DAT6_OEN */ ++ {0x06E0, 0, 0}, /* CFG_MMC3_DAT6_OUT */ ++ {0x06E4, 636, 0}, /* CFG_MMC3_DAT7_IN */ ++ {0x06E8, 0, 0}, /* CFG_MMC3_DAT7_OEN */ ++ {0x06EC, 0, 0}, /* CFG_MMC3_DAT7_OUT */ ++ {0x06F0, 260, 0}, /* CFG_RGMII0_RXC_IN */ ++ {0x06FC, 0, 1412}, /* CFG_RGMII0_RXCTL_IN */ ++ {0x0708, 123, 1047}, /* CFG_RGMII0_RXD0_IN */ ++ {0x0714, 139, 1081}, /* CFG_RGMII0_RXD1_IN */ ++ {0x0720, 195, 1100}, /* CFG_RGMII0_RXD2_IN */ ++ {0x072C, 239, 1216}, /* CFG_RGMII0_RXD3_IN */ ++ {0x0740, 89, 0}, /* CFG_RGMII0_TXC_OUT */ ++ {0x074C, 15, 125}, /* CFG_RGMII0_TXCTL_OUT */ ++ {0x0758, 339, 162}, /* CFG_RGMII0_TXD0_OUT */ ++ {0x0764, 146, 94}, /* CFG_RGMII0_TXD1_OUT */ ++ {0x0770, 0, 27}, /* CFG_RGMII0_TXD2_OUT */ ++ {0x077C, 291, 205}, /* CFG_RGMII0_TXD3_OUT */ ++ {0x0A70, 0, 0}, /* CFG_VIN2A_D12_OUT */ ++ {0x0A7C, 219, 101}, /* CFG_VIN2A_D13_OUT */ ++ {0x0A88, 92, 58}, /* CFG_VIN2A_D14_OUT */ ++ {0x0A94, 135, 100}, /* CFG_VIN2A_D15_OUT */ ++ {0x0AA0, 154, 101}, /* CFG_VIN2A_D16_OUT */ ++ {0x0AAC, 78, 27}, /* CFG_VIN2A_D17_OUT */ ++ {0x0AB0, 411, 0}, /* CFG_VIN2A_D18_IN */ ++ {0x0ABC, 0, 382}, /* CFG_VIN2A_D19_IN */ ++ {0x0AD4, 320, 750}, /* CFG_VIN2A_D20_IN */ ++ {0x0AE0, 192, 836}, /* CFG_VIN2A_D21_IN */ ++ {0x0AEC, 294, 669}, /* CFG_VIN2A_D22_IN */ ++ {0x0AF8, 50, 700}, /* CFG_VIN2A_D23_IN */ ++ {0x0B9C, 0, 706}, /* CFG_VOUT1_CLK_OUT */ ++ {0x0BA8, 2313, 0}, /* CFG_VOUT1_D0_OUT */ ++ {0x0BB4, 2199, 0}, /* CFG_VOUT1_D10_OUT */ ++ {0x0BC0, 2266, 0}, /* CFG_VOUT1_D11_OUT */ ++ {0x0BCC, 3159, 0}, /* CFG_VOUT1_D12_OUT */ ++ {0x0BD8, 2100, 0}, /* CFG_VOUT1_D13_OUT */ ++ {0x0BE4, 2229, 0}, /* CFG_VOUT1_D14_OUT */ ++ {0x0BF0, 2202, 0}, /* CFG_VOUT1_D15_OUT */ ++ {0x0BFC, 2084, 0}, /* CFG_VOUT1_D16_OUT */ ++ {0x0C08, 2195, 0}, /* CFG_VOUT1_D17_OUT */ ++ {0x0C14, 2342, 0}, /* CFG_VOUT1_D18_OUT */ ++ {0x0C20, 2463, 0}, /* CFG_VOUT1_D19_OUT */ ++ {0x0C2C, 2439, 0}, /* CFG_VOUT1_D1_OUT */ ++ {0x0C38, 2304, 0}, /* CFG_VOUT1_D20_OUT */ ++ {0x0C44, 2103, 0}, /* CFG_VOUT1_D21_OUT */ ++ {0x0C50, 2145, 0}, /* CFG_VOUT1_D22_OUT */ ++ {0x0C5C, 1932, 0}, /* CFG_VOUT1_D23_OUT */ ++ {0x0C68, 2200, 0}, /* CFG_VOUT1_D2_OUT */ ++ {0x0C74, 2355, 0}, /* CFG_VOUT1_D3_OUT */ ++ {0x0C80, 3215, 0}, /* CFG_VOUT1_D4_OUT */ ++ {0x0C8C, 2314, 0}, /* CFG_VOUT1_D5_OUT */ ++ {0x0C98, 2238, 0}, /* CFG_VOUT1_D6_OUT */ ++ {0x0CA4, 2381, 0}, /* CFG_VOUT1_D7_OUT */ ++ {0x0CB0, 2138, 0}, /* CFG_VOUT1_D8_OUT */ ++ {0x0CBC, 2383, 0}, /* CFG_VOUT1_D9_OUT */ ++ {0x0CC8, 1984, 0}, /* CFG_VOUT1_DE_OUT */ ++ {0x0CE0, 1947, 0}, /* CFG_VOUT1_HSYNC_OUT */ ++ {0x0CEC, 2739, 0}, /* CFG_VOUT1_VSYNC_OUT */ ++}; ++ + const struct iodelay_cfg_entry iodelay_cfg_array_am574x_idk[] = { + {0x0114, 2199, 621}, /* CFG_GPMC_A0_IN */ + {0x0120, 0, 0}, /* CFG_GPMC_A10_IN */ +diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig +index 3e2c166e0d..b1e2960a9f 100644 +--- a/configs/am57xx_evm_defconfig ++++ b/configs/am57xx_evm_defconfig +@@ -27,14 +27,20 @@ CONFIG_SPL_DMA_SUPPORT=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_SPI_LOAD=y + CONFIG_SPL_YMODEM_SUPPORT=y ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" ++CONFIG_AUTOBOOT_DELAY_STR="d" ++CONFIG_AUTOBOOT_STOP_STR=" " + CONFIG_CMD_SPL=y + # CONFIG_CMD_FLASH is not set + # CONFIG_CMD_SETEXPR is not set + # CONFIG_CMD_PMIC is not set ++CONFIG_CMD_BTRFS=y + CONFIG_OF_CONTROL=y + CONFIG_SPL_OF_CONTROL=y +-CONFIG_DEFAULT_DEVICE_TREE="am572x-idk" +-CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk" ++CONFIG_DEFAULT_DEVICE_TREE="am5729-beagleboneai" ++CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk" ++# CONFIG_ENV_IS_IN_FAT is not set + CONFIG_ENV_IS_IN_MMC=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y + CONFIG_DM=y +diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h +index 70aa425060..fcc6ac7f8f 100644 +--- a/include/configs/am57xx_evm.h ++++ b/include/configs/am57xx_evm.h +@@ -24,7 +24,7 @@ + #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) + #define CONFIG_SYS_REDUNDAND_ENVIRONMENT + +-#define CONSOLEDEV "ttyO2" ++//#define CONSOLEDEV "ttyO2" + #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ + #define CONFIG_SYS_NS16550_COM2 UART2_BASE /* UART2 */ + #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ +diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h +index 1e2a62dd6f..47f641165d 100644 +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h +@@ -80,6 +80,363 @@ + #define CONFIG_SYS_I2C + #endif + ++#define EEPROM_PROGRAMMING \ ++ "eeprom_dump=i2c dev 0; " \ ++ "i2c md 0x50 0x00.2 20; " \ ++ "\0" \ ++ "eeprom_blank=i2c dev 0; " \ ++ "i2c mw 0x50 0x00.2 ff; " \ ++ "i2c mw 0x50 0x01.2 ff; " \ ++ "i2c mw 0x50 0x02.2 ff; " \ ++ "i2c mw 0x50 0x03.2 ff; " \ ++ "i2c mw 0x50 0x04.2 ff; " \ ++ "i2c mw 0x50 0x05.2 ff; " \ ++ "i2c mw 0x50 0x06.2 ff; " \ ++ "i2c mw 0x50 0x07.2 ff; " \ ++ "i2c mw 0x50 0x08.2 ff; " \ ++ "i2c mw 0x50 0x09.2 ff; " \ ++ "i2c mw 0x50 0x0a.2 ff; " \ ++ "i2c mw 0x50 0x0b.2 ff; " \ ++ "i2c mw 0x50 0x0c.2 ff; " \ ++ "i2c mw 0x50 0x0d.2 ff; " \ ++ "i2c mw 0x50 0x0e.2 ff; " \ ++ "i2c mw 0x50 0x0f.2 ff; " \ ++ "i2c mw 0x50 0x10.2 ff; " \ ++ "i2c mw 0x50 0x11.2 ff; " \ ++ "i2c mw 0x50 0x12.2 ff; " \ ++ "i2c mw 0x50 0x13.2 ff; " \ ++ "i2c mw 0x50 0x14.2 ff; " \ ++ "i2c mw 0x50 0x15.2 ff; " \ ++ "i2c mw 0x50 0x16.2 ff; " \ ++ "i2c mw 0x50 0x17.2 ff; " \ ++ "i2c mw 0x50 0x18.2 ff; " \ ++ "i2c mw 0x50 0x19.2 ff; " \ ++ "i2c mw 0x50 0x1a.2 ff; " \ ++ "i2c mw 0x50 0x1b.2 ff; " \ ++ "i2c mw 0x50 0x1c.2 ff; " \ ++ "i2c mw 0x50 0x1d.2 ff; " \ ++ "i2c mw 0x50 0x1e.2 ff; " \ ++ "i2c mw 0x50 0x1f.2 ff; " \ ++ "i2c md 0x50 0x00.2 20; " \ ++ "\0" \ ++ "eeprom_x15_b1=i2c dev 0; " \ ++ "i2c mw 0x50 0x00.2 aa; " \ ++ "i2c mw 0x50 0x01.2 55; " \ ++ "i2c mw 0x50 0x02.2 33; " \ ++ "i2c mw 0x50 0x03.2 ee; " \ ++ "i2c mw 0x50 0x04.2 42; " \ ++ "i2c mw 0x50 0x05.2 42; " \ ++ "i2c mw 0x50 0x06.2 52; " \ ++ "i2c mw 0x50 0x07.2 44; " \ ++ "i2c mw 0x50 0x08.2 58; " \ ++ "i2c mw 0x50 0x09.2 31; " \ ++ "i2c mw 0x50 0x0a.2 35; " \ ++ "i2c mw 0x50 0x0b.2 5f; " \ ++ "i2c mw 0x50 0x0c.2 42; " \ ++ "i2c mw 0x50 0x0d.2 2e; " \ ++ "i2c mw 0x50 0x0e.2 31; " \ ++ "i2c mw 0x50 0x0f.2 30; " \ ++ "i2c mw 0x50 0x10.2 57; " \ ++ "i2c mw 0x50 0x11.2 57; " \ ++ "i2c mw 0x50 0x12.2 59; " \ ++ "i2c mw 0x50 0x13.2 59; " \ ++ "i2c mw 0x50 0x14.2 34; " \ ++ "i2c mw 0x50 0x15.2 50; " \ ++ "i2c mw 0x50 0x16.2 35; " \ ++ "i2c mw 0x50 0x17.2 35; " \ ++ "i2c mw 0x50 0x18.2 30; " \ ++ "i2c mw 0x50 0x19.2 30; " \ ++ "i2c mw 0x50 0x1a.2 30; " \ ++ "i2c mw 0x50 0x1b.2 30; " \ ++ "i2c mw 0x50 0x1c.2 ff; " \ ++ "i2c mw 0x50 0x1d.2 ff; " \ ++ "i2c mw 0x50 0x1e.2 ff; " \ ++ "i2c mw 0x50 0x1f.2 ff; " \ ++ "i2c md 0x50 0x00.2 20; " \ ++ "\0" \ ++ "eeprom_x15_c=i2c dev 0; " \ ++ "i2c mw 0x50 0x00.2 aa; " \ ++ "i2c mw 0x50 0x01.2 55; " \ ++ "i2c mw 0x50 0x02.2 33; " \ ++ "i2c mw 0x50 0x03.2 ee; " \ ++ "i2c mw 0x50 0x04.2 42; " \ ++ "i2c mw 0x50 0x05.2 42; " \ ++ "i2c mw 0x50 0x06.2 52; " \ ++ "i2c mw 0x50 0x07.2 44; " \ ++ "i2c mw 0x50 0x08.2 58; " \ ++ "i2c mw 0x50 0x09.2 31; " \ ++ "i2c mw 0x50 0x0a.2 35; " \ ++ "i2c mw 0x50 0x0b.2 5f; " \ ++ "i2c mw 0x50 0x0c.2 43; " \ ++ "i2c mw 0x50 0x0d.2 2e; " \ ++ "i2c mw 0x50 0x0e.2 30; " \ ++ "i2c mw 0x50 0x0f.2 30; " \ ++ "i2c mw 0x50 0x10.2 79; " \ ++ "i2c mw 0x50 0x11.2 79; " \ ++ "i2c mw 0x50 0x12.2 77; " \ ++ "i2c mw 0x50 0x13.2 77; " \ ++ "i2c mw 0x50 0x14.2 50; " \ ++ "i2c mw 0x50 0x15.2 58; " \ ++ "i2c mw 0x50 0x16.2 31; " \ ++ "i2c mw 0x50 0x17.2 35; " \ ++ "i2c mw 0x50 0x18.2 6e; " \ ++ "i2c mw 0x50 0x19.2 6e; " \ ++ "i2c mw 0x50 0x1a.2 6e; " \ ++ "i2c mw 0x50 0x1b.2 6e; " \ ++ "i2c mw 0x50 0x1c.2 ff; " \ ++ "i2c mw 0x50 0x1d.2 ff; " \ ++ "i2c mw 0x50 0x1e.2 ff; " \ ++ "i2c mw 0x50 0x1f.2 ff; " \ ++ "i2c md 0x50 0x00.2 20; " \ ++ "\0" \ ++ ++#define EEWIKI_MMC_BOOT \ ++ "mmc_boot=${devtype} dev ${mmcdev}; ${devtype} part; " \ ++ "if ${devtype} rescan; then " \ ++ "echo Scanning ${devtype} device ${mmcdev};" \ ++ "setenv bootpart ${mmcdev}:1; " \ ++ "echo Checking for: /uEnv.txt ...;" \ ++ "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /uEnv.txt;" \ ++ "echo Checking if uenvcmd is set ...;" \ ++ "if test -n ${uenvcmd}; then " \ ++ "echo Running uenvcmd ...;" \ ++ "run uenvcmd;" \ ++ "fi;" \ ++ "fi; " \ ++ "echo Checking for: /boot/uEnv.txt ...;" \ ++ "for i in 1 2 3 4 5 6 7 ; do " \ ++ "setenv mmcpart ${i};" \ ++ "setenv bootpart ${mmcdev}:${mmcpart};" \ ++ "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /boot/uEnv.txt;" \ ++ "if test -n ${dtb}; then " \ ++ "setenv fdtfile ${dtb};" \ ++ "echo debug: [dtb=${fdtfile}] ...;" \ ++ "fi;" \ ++ "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \ ++ "if test -n ${uname_r}; then " \ ++ "echo debug: [uname_r=${uname_r}] ...;" \ ++ "setenv oldroot /dev/mmcblk${mmcdev}p${mmcpart};" \ ++ "run uname_boot;" \ ++ "fi;" \ ++ "fi;" \ ++ "done;" \ ++ "fi;\0" \ ++ ++#define EEWIKI_SCSI_BOOT \ ++ "scsi_boot=${devtype} reset ; " \ ++ "if ${devtype} dev ${mmcdev}; then " \ ++ "echo Scanning ${devtype} device ${mmcdev};" \ ++ "setenv bootpart ${mmcdev}:1; " \ ++ "echo Checking for: /uEnv.txt ...;" \ ++ "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /uEnv.txt;" \ ++ "echo Checking if uenvcmd is set ...;" \ ++ "if test -n ${uenvcmd}; then " \ ++ "echo Running uenvcmd ...;" \ ++ "run uenvcmd;" \ ++ "fi;" \ ++ "fi; " \ ++ "echo Checking for: /boot/uEnv.txt ...;" \ ++ "for i in 1 2 3 4 ; do " \ ++ "setenv mmcpart ${i};" \ ++ "setenv bootpart ${mmcdev}:${mmcpart};" \ ++ "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /boot/uEnv.txt;" \ ++ "if test -n ${dtb}; then " \ ++ "setenv fdtfile ${dtb};" \ ++ "echo debug: [dtb=${fdtfile}] ...;" \ ++ "fi;" \ ++ "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \ ++ "if test -n ${uname_r}; then " \ ++ "echo debug: [uname_r=${uname_r}] ...;" \ ++ "setenv oldroot /dev/sda${mmcpart};" \ ++ "run uname_boot;" \ ++ "fi;" \ ++ "fi;" \ ++ "done;" \ ++ "fi;\0" \ ++ ++#define EEWIKI_USB_BOOT \ ++ "usb_boot=${devtype} reset ; " \ ++ "if ${devtype} dev ${mmcdev}; then " \ ++ "echo Scanning ${devtype} device ${mmcdev};" \ ++ "setenv bootpart ${mmcdev}:1; " \ ++ "echo Checking for: /uEnv.txt ...;" \ ++ "if test -e ${devtype} ${bootpart} /uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /uEnv.txt;" \ ++ "echo Checking if uenvcmd is set in /uEnv.txt ...;" \ ++ "if test -n ${uenvcmd}; then " \ ++ "echo Running uenvcmd ...;" \ ++ "run uenvcmd;" \ ++ "fi;" \ ++ "fi; " \ ++ "echo Checking for: /boot/uEnv.txt ...;" \ ++ "for i in 1 2 3 4 ; do " \ ++ "setenv mmcpart ${i};" \ ++ "setenv bootpart ${mmcdev}:${mmcpart};" \ ++ "if test -e ${devtype} ${bootpart} /boot/uEnv.txt; then " \ ++ "load ${devtype} ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ ++ "env import -t ${loadaddr} ${filesize};" \ ++ "echo Loaded environment from /boot/uEnv.txt;" \ ++ "if test -n ${dtb}; then " \ ++ "setenv fdtfile ${dtb};" \ ++ "echo debug: [dtb=${fdtfile}] ...;" \ ++ "fi;" \ ++ "echo Checking if uname_r is set in /boot/uEnv.txt ...;" \ ++ "if test -n ${uname_r}; then " \ ++ "echo debug: [uname_r=${uname_r}] ...;" \ ++ "setenv oldroot /dev/sda${mmcpart};" \ ++ "run uname_boot;" \ ++ "fi;" \ ++ "fi;" \ ++ "done;" \ ++ "fi;\0" \ ++ ++#define EEWIKI_UNAME_BOOT \ ++ "uname_boot="\ ++ "setenv bootdir /boot; " \ ++ "setenv bootfile vmlinuz-${uname_r}; " \ ++ "if test -e ${devtype} ${bootpart} ${bootdir}/${bootfile}; then " \ ++ "echo loading ${bootdir}/${bootfile} ...; "\ ++ "run loadimage;" \ ++ "setenv fdtdir /boot/dtbs/${uname_r}; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /boot/dtb-${uname_r}; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /boot/dtbs; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /boot/dtb; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "setenv fdtdir /boot; " \ ++ "if test -e ${devtype} ${bootpart} ${fdtdir}/${fdtfile}; then " \ ++ "run loadfdt;" \ ++ "else " \ ++ "echo; echo unable to find ${fdtfile} ...; echo booting legacy ...;"\ ++ "run args_mmc;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr}] ... ;" \ ++ "bootz ${loadaddr}; " \ ++ "fi;" \ ++ "fi;" \ ++ "fi;" \ ++ "fi;" \ ++ "fi;" \ ++ "fi;" \ ++ "fi; " \ ++ "if test -n ${enable_uboot_overlays}; then " \ ++ "setenv fdt_buffer 0x60000;" \ ++ "if test -n ${uboot_fdt_buffer}; then " \ ++ "setenv fdt_buffer ${uboot_fdt_buffer};" \ ++ "fi;" \ ++ "echo uboot_overlays: [fdt_buffer=${fdt_buffer}] ... ;" \ ++ "if test -n ${uboot_overlay_addr0}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr0}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr1}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr1}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr2}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr2}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr3}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr3}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr4}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr4}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr5}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr5}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr6}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr6}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_addr7}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_addr7}; " \ ++ "run capeloadoverlay;" \ ++ "fi;" \ ++ "if test -n ${uboot_overlay_pru}; then " \ ++ "setenv uboot_overlay ${uboot_overlay_pru}; " \ ++ "run virtualloadoverlay;" \ ++ "fi;" \ ++ "else " \ ++ "echo uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...;" \ ++ "fi;" \ ++ "setenv rdfile initrd.img-${uname_r}; " \ ++ "if test -e ${devtype} ${bootpart} ${bootdir}/${rdfile}; then " \ ++ "echo loading ${bootdir}/${rdfile} ...; "\ ++ "run loadrd;" \ ++ "if test -n ${netinstall_enable}; then " \ ++ "run args_netinstall; run message;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ ++ "fi;" \ ++ "if test -n ${uenv_root}; then " \ ++ "run args_uenv_root;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ ++ "fi;" \ ++ "if test -n ${uuid}; then " \ ++ "run args_mmc_uuid;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ ++ "else " \ ++ "run args_mmc_old;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ ++ "fi;" \ ++ "else " \ ++ "if test -n ${uenv_root}; then " \ ++ "run args_uenv_root;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} - ${fdtaddr}; " \ ++ "fi;" \ ++ "run args_mmc_old;" \ ++ "echo debug: [${bootargs}] ... ;" \ ++ "echo debug: [bootz ${loadaddr} - ${fdtaddr}] ... ;" \ ++ "bootz ${loadaddr} - ${fdtaddr}; " \ ++ "fi;" \ ++ "fi;\0" \ ++ + /* + * The following are general good-enough settings for U-Boot. We set a + * large malloc pool as we generally have a lot of DDR, and we opt for +diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h +index ba57c40182..93368cdc51 100644 +--- a/include/configs/ti_omap5_common.h ++++ b/include/configs/ti_omap5_common.h +@@ -63,6 +63,11 @@ + DEFAULT_FIT_TI_ARGS \ + DEFAULT_COMMON_BOOT_TI_ARGS \ + DEFAULT_FDT_TI_ARGS \ ++ EEWIKI_USB_BOOT \ ++ EEWIKI_SCSI_BOOT \ ++ EEWIKI_MMC_BOOT \ ++ EEWIKI_UNAME_BOOT \ ++ EEPROM_PROGRAMMING \ + DFUARGS \ + NETARGS \ + +diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h +index 05bdbbc23e..b0254b064a 100644 +--- a/include/environment/ti/boot.h ++++ b/include/environment/ti/boot.h +@@ -64,32 +64,18 @@ + "bootpart=0:2\0" \ + "bootdir=/boot\0" \ + "bootfile=zImage\0" \ ++ "board_eeprom_header=undefined\0" \ + "usbtty=cdc_acm\0" \ + "vram=16M\0" \ + AVB_VERIFY_CMD \ + "partitions=" PARTS_DEFAULT "\0" \ + "optargs=\0" \ + "dofastboot=0\0" \ +- "emmc_linux_boot=" \ +- "echo Trying to boot Linux from eMMC ...; " \ +- "setenv mmcdev 1; " \ +- "setenv bootpart 1:2; " \ +- "setenv mmcroot /dev/mmcblk0p2 rw; " \ +- "run mmcboot;\0" \ +- "emmc_android_boot=" \ +- "echo Trying to boot Android from eMMC ...; " \ +- "run update_to_fit; " \ +- "setenv eval_bootargs setenv bootargs $bootargs; " \ +- "run eval_bootargs; " \ +- "setenv mmcdev 1; " \ +- "setenv machid fe6; " \ +- "mmc dev $mmcdev; " \ +- "mmc rescan; " \ +- AVB_VERIFY_CHECK \ +- "part start mmc ${mmcdev} boot boot_start; " \ +- "part size mmc ${mmcdev} boot boot_size; " \ +- "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \ +- "bootm ${loadaddr}#${fdtfile};\0 " ++ "read_board_eeprom="\ ++ "if test $board_eeprom_header = beagle_x15_revb1_blank; then " \ ++ "run eeprom_dump; run eeprom_x15_b1; reset; fi; " \ ++ "if test $board_eeprom_header = beagle_x15_revc_blank; then " \ ++ "run eeprom_dump; run eeprom_x15_c; reset; fi; \0 " + + #ifdef CONFIG_OMAP54XX + +@@ -127,20 +113,17 @@ + "echo WARNING: Could not determine device tree to use; fi; \0" + + #define CONFIG_BOOTCOMMAND \ +- "if test ${dofastboot} -eq 1; then " \ +- "echo Boot fastboot requested, resetting dofastboot ...;" \ +- "setenv dofastboot 0; saveenv;" \ +- "echo Booting into fastboot ...; " \ +- "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ +- "fi;" \ +- "if test ${boot_fit} -eq 1; then " \ +- "run update_to_fit;" \ +- "fi;" \ ++ "run read_board_eeprom; " \ + "run findfdt; " \ +- "run envboot; " \ +- "run mmcboot;" \ +- "run emmc_linux_boot; " \ +- "run emmc_android_boot; " \ ++ "setenv mmcdev 0; " \ ++ "setenv devtype usb; " \ ++ "echo usb_boot is currently disabled;" \ ++ "setenv devtype scsi; " \ ++ "echo scsi_boot is currently disabled;" \ ++ "setenv devtype mmc; " \ ++ "run mmc_boot;" \ ++ "setenv mmcdev 1; " \ ++ "run mmc_boot;" \ + "" + + #endif /* CONFIG_OMAP54XX */ +diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h +index 785fc15345..6481682fc7 100644 +--- a/include/environment/ti/mmc.h ++++ b/include/environment/ti/mmc.h +@@ -11,11 +11,33 @@ + #define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ +- "finduuid=part uuid mmc ${bootpart} uuid\0" \ ++ "finduuid=part uuid ${devtype} ${bootpart} uuid\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ +- "root=PARTUUID=${uuid} rw " \ +- "rootfstype=${mmcrootfstype}\0" \ ++ "root=PARTUUID=${uuid} ro " \ ++ "rootfstype=${mmcrootfstype} " \ ++ "${cmdline}\0" \ ++ "args_mmc_old=setenv bootargs console=${console} " \ ++ "${optargs} " \ ++ "root=${oldroot} ro " \ ++ "rootfstype=${mmcrootfstype} " \ ++ "${cmdline}\0" \ ++ "args_mmc_uuid=setenv bootargs console=${console} " \ ++ "${optargs} " \ ++ "root=UUID=${uuid} ro " \ ++ "rootfstype=${mmcrootfstype} " \ ++ "${cmdline}\0" \ ++ "args_uenv_root=setenv bootargs console=${console} " \ ++ "${optargs} " \ ++ "root=${uenv_root} ro " \ ++ "rootfstype=${mmcrootfstype} " \ ++ "${musb} ${cmdline}\0" \ ++ "args_netinstall=setenv bootargs ${netinstall_bootargs} " \ ++ "${optargs} " \ ++ "${cape_disable} " \ ++ "${cape_enable} " \ ++ "root=/dev/ram rw " \ ++ "${cmdline}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ +@@ -24,7 +46,22 @@ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ +- "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ ++ "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \ ++ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \ ++ "loadoverlay=echo uboot_overlays: loading ${uboot_overlay} ...; " \ ++ "load ${devtype} ${bootpart} ${rdaddr} ${uboot_overlay}; " \ ++ "fdt addr ${fdtaddr}; fdt resize ${fdt_buffer}; " \ ++ "fdt apply ${rdaddr}; fdt resize ${fdt_buffer};\0" \ ++ "virtualloadoverlay=if test -e ${devtype} ${bootpart} ${uboot_overlay}; then " \ ++ "run loadoverlay;" \ ++ "else " \ ++ "echo uboot_overlays: unable to find [${devtype} ${bootpart} ${uboot_overlay}]...;" \ ++ "fi;\0" \ ++ "capeloadoverlay=if test -e ${devtype} ${bootpart} ${uboot_overlay}; then " \ ++ "run loadoverlay;" \ ++ "else " \ ++ "echo uboot_overlays: unable to find [${devtype} ${bootpart} ${uboot_overlay}]...;" \ ++ "fi;\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ +-- +2.17.1 + diff --git a/buildroot/board/beagleboneai/post-build.sh b/buildroot/board/beagleboneai/post-build.sh new file mode 100755 index 000000000..34a86cc74 --- /dev/null +++ b/buildroot/board/beagleboneai/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +cp board/beagleboneai/uEnv.txt $BINARIES_DIR/uEnv.txt diff --git a/buildroot/board/beagleboneai/readme.txt b/buildroot/board/beagleboneai/readme.txt new file mode 100644 index 000000000..f4c798f55 --- /dev/null +++ b/buildroot/board/beagleboneai/readme.txt @@ -0,0 +1,28 @@ +Intro +===== + +This configuration will build a basic image for the BeagleBoard.org +BeagleBone AI. For more details about the board, visit: + +https://beagleboard.org/ai + +How to build it +=============== + +Configure Buildroot: + + $ make beagleboneai_defconfig + +Compile everything and build the USB flash drive image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/beagleboneai/uEnv.txt b/buildroot/board/beagleboneai/uEnv.txt new file mode 100644 index 000000000..d38df7727 --- /dev/null +++ b/buildroot/board/beagleboneai/uEnv.txt @@ -0,0 +1,6 @@ +bootpart=0:1 +bootdir=/ +bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p2 ro rootwait +devtype=mmc +fdtfile=am5729-beagleboneai.dtb +uenvcmd=run loadimage; run loadfdt; printenv bootargs; bootz ${loadaddr} - ${fdtaddr} diff --git a/buildroot/board/beelink/gs1/extlinux.conf b/buildroot/board/beelink/gs1/extlinux.conf new file mode 100644 index 000000000..046681f71 --- /dev/null +++ b/buildroot/board/beelink/gs1/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /Image + devicetree /sun50i-h6-beelink-gs1.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait diff --git a/buildroot/board/beelink/gs1/genimage.cfg b/buildroot/board/beelink/gs1/genimage.cfg new file mode 100644 index 000000000..88bbd2659 --- /dev/null +++ b/buildroot/board/beelink/gs1/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h6-beelink-gs1.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/beelink/gs1/post-build.sh b/buildroot/board/beelink/gs1/post-build.sh new file mode 100755 index 000000000..ec20fca7d --- /dev/null +++ b/buildroot/board/beelink/gs1/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/boundarydevices/common/boot.cmd b/buildroot/board/boundarydevices/common/boot.cmd new file mode 100644 index 000000000..dbc3b3c37 --- /dev/null +++ b/buildroot/board/boundarydevices/common/boot.cmd @@ -0,0 +1,157 @@ +setenv bootargs '' + +setenv initrd_high 0xffffffff +m4='' +kernelimage=zImage +bootcommand=bootz +a_base=0x10000000 +if itest.s x51 == "x${imx_cpu}" ; then + a_base=0x90000000 +elif itest.s x53 == "x${imx_cpu}"; then + a_base=0x70000000 +elif itest.s x6SX == "x${imx_cpu}" || itest.s x6ULL == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then + a_base=0x80000000 +elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}" || itest.s x8MMQ == "x${imx_cpu}" || itest.s x8MNano == "x${imx_cpu}"; then + a_base=0x40000000 + kernelimage=Image + bootcommand=booti +fi +if itest.s "x1" == "x${m4enabled}" ; then + run m4boot; + m4='-m4'; +fi + +setexpr a_script ${a_base} + 0x00800000 +setexpr a_zImage ${a_base} + 0x00800000 +setexpr a_fdt ${a_base} + 0x03000000 +setexpr a_ramdisk ${a_base} + 0x03800000 +setexpr a_initrd ${a_base} + 0x03a00000 +setexpr a_reset_cause_marker ${a_base} + 0x80 +setexpr a_reset_cause ${a_base} + 0x84 + +if itest.s "x" == "x${board}" ; then + echo "!!!! Error: Your u-boot is outdated. Please upgrade."; + exit; +fi + +if itest.s "x" == "x${fdt_file}" ; then + if itest.s x6SOLO == "x${imx_cpu}" ; then + fdt_file=imx6dl-${board}.dtb; + elif itest.s x6DL == "x${imx_cpu}" ; then + fdt_file=imx6dl-${board}.dtb; + elif itest.s x6QP == "x${imx_cpu}" ; then + fdt_file=imx6qp-${board}.dtb; + elif itest.s x6SX == "x${imx_cpu}" ; then + fdt_file=imx6sx-${board}${m4}.dtb; + elif itest.s x6ULL == "x${imx_cpu}" ; then + fdt_file=imx6ull-${board}.dtb; + elif itest.s x7D == "x${imx_cpu}" ; then + fdt_file=imx7d-${board}${m4}.dtb; + elif itest.s x8MQ == "x${imx_cpu}" ; then + fdt_file=imx8mq-${board}${m4}.dtb; + elif itest.s x8MM == "x${imx_cpu}" ; then + fdt_file=imx8mm-${board}${m4}.dtb; + elif itest.s x8MMQ == "x${imx_cpu}" ; then + fdt_file=imx8mm-${board}${m4}.dtb; + elif itest.s x8MNano == "x${imx_cpu}" ; then + fdt_file=imx8mn-${board}${m4}.dtb; + elif itest.s x51 == "x${imx_cpu}" ; then + fdt_file=imx51-${board}.dtb; + elif itest.s x53 == "x${imx_cpu}" ; then + fdt_file=imx53-${board}.dtb; + else + fdt_file=imx6q-${board}.dtb; + fi +fi + +if itest.s x${distro_bootpart} == x ; then + distro_bootpart=1 +fi + +if load ${devtype} ${devnum}:${distro_bootpart} ${a_script} uEnv.txt ; then + env import -t ${a_script} ${filesize} +fi +setenv bootargs ${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc cpu=${imx_cpu} board=${board} + +if load ${devtype} ${devnum}:${distro_bootpart} ${a_fdt} ${prefix}${fdt_file} ; then + fdt addr ${a_fdt} + setenv fdt_high 0xffffffff +else + echo "!!!! Error loading ${prefix}${fdt_file}"; + exit; +fi + +fdt resize 4096 +if itest.s "x" != "x${cmd_board}" ; then + run cmd_board +fi +if itest.s "x" != "x${cmd_custom}" ; then + run cmd_custom +fi +if itest.s "x" != "x${cmd_hdmi}" ; then + run cmd_hdmi + if itest.s x != x${allow_noncea} ; then + setenv bootargs ${bootargs} mxc_hdmi.only_cea=0; + echo "non-CEA modes allowed on HDMI, audio may be affected"; + fi +fi +if itest.s "x" != "x${cmd_lcd}" ; then + run cmd_lcd +fi +if itest.s "x" != "x${cmd_lcd2}" ; then + run cmd_lcd2 +fi +if itest.s "x" != "x${cmd_lvds}" ; then + run cmd_lvds +fi +if itest.s "x" != "x${cmd_lvds2}" ; then + run cmd_lvds2 +fi +if itest.s "x" != "x${cmd_mipi}" ; then + run cmd_mipi +fi + +if test "sata" = "${devtype}" ; then + setenv bootargs "${bootargs} root=/dev/sda${distro_bootpart}" ; +elif test "usb" = "${devtype}" ; then + setenv bootargs "${bootargs} root=/dev/sda${distro_bootpart}" ; +else + setenv bootargs "${bootargs} root=/dev/mmcblk${devnum}p${distro_bootpart}" +fi + +if itest.s "x" != "x${disable_msi}" ; then + setenv bootargs ${bootargs} pci=nomsi +fi; + +if itest.s "x" != "x${disable_giga}" ; then + setenv bootargs ${bootargs} fec.disable_giga=1 +fi + +if itest.s "x" != "x${wlmac}" ; then + setenv bootargs ${bootargs} wlcore.mac=${wlmac} +fi + +if itest.s "x" != "x${gpumem}" ; then + setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem} +fi + +if itest.s "x" != "x${cma}" ; then + setenv bootargs ${bootargs} cma=${cma} +fi + +if itest.s "x" != "x${loglevel}" ; then + setenv bootargs ${bootargs} loglevel=${loglevel} +fi + +if itest.s "x" != "x${show_fdt}" ; then + fdt print / +fi + +if itest.s "x" != "x${show_env}" ; then + printenv +fi + +if load ${devtype} ${devnum}:${distro_bootpart} ${a_zImage} ${prefix}${kernelimage} ; then + ${bootcommand} ${a_zImage} - ${a_fdt} +fi +echo "Error loading kernel image" diff --git a/buildroot/board/boundarydevices/common/genimage.cfg b/buildroot/board/boundarydevices/common/genimage.cfg new file mode 100644 index 000000000..a383fb750 --- /dev/null +++ b/buildroot/board/boundarydevices/common/genimage.cfg @@ -0,0 +1,18 @@ +# Minimal SD card image for Boundary Devices platforms +# +# It does not need a boot section for a bootloader since it is booted +# from its NOR flash memory. +# +# To update the bootloader, execute the following from U-Boot prompt: +# => run upgradeu + +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/boundarydevices/common/post-build.sh b/buildroot/board/boundarydevices/common/post-build.sh new file mode 100755 index 000000000..161ec0643 --- /dev/null +++ b/buildroot/board/boundarydevices/common/post-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# post-build fixups +# for further details, see +# +# http://boundarydevices.com/u-boot-on-i-mx6/ +# + +BOARD_DIR="$(dirname $0)" +UBOOT_DEFCONFIG="$(grep BR2_TARGET_UBOOT_BOARD_DEFCONFIG ${BR2_CONFIG} | sed 's/.*\"\(.*\)\"/\1/')" + +if grep -Eq "^BR2_aarch64=y$" ${BR2_CONFIG}; then + MKIMAGE_ARCH=arm64 + UBOOT_BINARY=imx8-boot-sd.bin +else + MKIMAGE_ARCH=arm + UBOOT_BINARY=u-boot.imx +fi + +# bd u-boot looks for standard bootscript +$HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \ + -n "boot script" -d $BOARD_DIR/boot.cmd $TARGET_DIR/boot/boot.scr + +# u-boot / update script for bd upgradeu command +if [ -e $BINARIES_DIR/$UBOOT_BINARY ]; then + install -D -m 0644 $BINARIES_DIR/$UBOOT_BINARY \ + $TARGET_DIR/u-boot.$UBOOT_DEFCONFIG + $HOST_DIR/bin/mkimage -A $MKIMAGE_ARCH -O linux -T script -C none -a 0 -e 0 \ + -n "upgrade script" -d $BOARD_DIR/upgrade.cmd $TARGET_DIR/upgrade.scr +fi diff --git a/buildroot/board/boundarydevices/common/post-image.sh b/buildroot/board/boundarydevices/common/post-image.sh new file mode 100755 index 000000000..5c70d98e5 --- /dev/null +++ b/buildroot/board/boundarydevices/common/post-image.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +support/scripts/genimage.sh -c $(dirname $0)/genimage.cfg + +exit $? diff --git a/buildroot/board/boundarydevices/common/readme.txt b/buildroot/board/boundarydevices/common/readme.txt new file mode 100644 index 000000000..d1bb3fa59 --- /dev/null +++ b/buildroot/board/boundarydevices/common/readme.txt @@ -0,0 +1,42 @@ +Buildroot for Boundary Devices platforms: + +https://boundarydevices.com/nitrogen-sbcs-and-soms/ + +Here is the list of targeted platforms per defconfig: + +- nitrogen6x_defconfig + - BD-SL-i.MX6 (SABRE-Lite) + - Nitrogen6X + - Nitrogen6_Lite + - Nitrogen6_MAX + - Nitrogen6_VM + - Nitrogen6_SOM + - Nitrogen6_SOMv2 + +- nitrogen6sx_defconfig + - Nitrogen6_SoloX + +- nitrogen7_defconfig + - Nitrogen7 + +- nitrogen8m_defconfig + - Nitrogen8M + - Nitrogen8M_SOM + +- nitrogen8mm_defconfig + - Nitrogen8MMini + - Nitrogen8MMini_SOM + +- nitrogen8mn_defconfig + - Nitrogen8MNano + - Nitrogen8MNano_SOM + +To install, simply copy the image to your storage (SD, eMMC, USB): + +$ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Where 'sdX' is the device node of the uSD partition. + +To upgrade u-boot, cancel autoboot and type: + +> run upgradeu diff --git a/buildroot/board/boundarydevices/common/upgrade.cmd b/buildroot/board/boundarydevices/common/upgrade.cmd new file mode 100644 index 000000000..ce32d77b5 --- /dev/null +++ b/buildroot/board/boundarydevices/common/upgrade.cmd @@ -0,0 +1,221 @@ +if itest.s a$uboot_defconfig == a; then + echo "Please set uboot_defconfig to the appropriate value" + exit +fi + +offset=0x400 +erase_size=0xC0000 +qspi_offset=0x0 +a_base=0x12000000 +block_size=0x200 + +if itest.s x51 == "x${imx_cpu}"; then + a_base=0x92000000 +elif itest.s x53 == "x${imx_cpu}"; then + a_base=0x72000000 +elif itest.s x6SX == "x${imx_cpu}" || itest.s x6ULL == "x${imx_cpu}" || itest.s x7D == "x${imx_cpu}"; then + a_base=0x82000000 +elif itest.s x8MQ == "x${imx_cpu}" || itest.s x8MM == "x${imx_cpu}" || itest.s x8MMQ == "x${imx_cpu}"; then + a_base=0x42000000 + offset=0x8400 +elif itest.s x8MNano == "x${imx_cpu}"; then + a_base=0x42000000 + offset=0x8000 +fi + +qspi_match=1 +setexpr a_qspi1 ${a_base} +setexpr a_qspi2 ${a_qspi1} + 0x400000 +setexpr a_uImage1 ${a_qspi1} + 0x400 +setexpr a_uImage2 ${a_qspi2} + 0x400 +setexpr a_script ${a_base} + +setenv stdout serial,vga + +if itest.s "x${sfname}" == "x" ; then +# U-Boot resides in (e)MMC +if itest.s "x${env_dev}" == "x" || itest.s "x${env_part}" == "x"; then + echo "Please set env_dev/part to the appropriate values" + exit +fi + +# Load bootloader binary for this board +if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_uImage1} u-boot.$uboot_defconfig ; then +else + echo "File u-boot.$uboot_defconfig not found on SD card" ; + exit +fi + +# Compute block count for filesize and offset +setexpr cntoffset ${offset} / ${block_size} +setexpr cntfile ${filesize} / ${block_size} +# Add 1 in case the $filesize is not a multiple of $block_size +setexpr cntfile ${cntfile} + 1 + +# Select media partition (if different from main partition) +mmc dev ${env_dev} ${env_part} + +# Read and compare current U-Boot +mmc read ${a_uImage2} ${cntoffset} ${cntfile} +if cmp.b ${a_uImage1} ${a_uImage2} ${filesize} ; then + echo "------- U-Boot versions match" ; + echo "------- U-Boot upgrade NOT needed" ; + exit ; +fi + +echo "Need U-Boot upgrade" ; +echo "Program in 5 seconds" ; +for n in 5 4 3 2 1 ; do + echo $n ; + sleep 1 ; +done +mmc write ${a_uImage1} ${cntoffset} ${cntfile} + +# Make sure to boot from the proper partition +if itest ${env_part} != 0 ; then + mmc partconf ${env_dev} 1 ${env_part} 0 +fi + +# Switch back to main eMMC partition (to avoid confusion) +mmc dev ${env_dev} + +else +# U-Boot resides in NOR flash +if sf probe || sf probe || sf probe 1 27000000 || sf probe 1 27000000 ; then + echo "probed SPI ROM" ; +else + echo "Error initializing EEPROM" + exit +fi + +if itest.s "x${sfname}" == "xat45db041d" ; then + erase_size=0x7e000 +fi + +if itest.s x7D == "x${imx_cpu}"; then + echo "check qspi parameter block" ; + if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_qspi1} qspi-${sfname}.${uboot_defconfig} ; then + else + echo "parameter file qspi-${sfname}.${uboot_defconfig} not found on SD card" + exit + fi + if itest ${filesize} != 0x200 ; then + echo "------- qspi-${sfname}.${uboot_defconfig} 0x${filesize} != 0x200 bytes" ; + exit + fi + setexpr a_marker ${a_qspi1} + 0x1fc + if itest *${a_marker} != c0ffee01 ; then + echo "------- qspi-${sfname}.${uboot_defconfig} c0ffee01 marker missing" ; + exit + fi + if sf read ${a_qspi2} ${qspi_offset} 0x200 ; then + else + echo "Error reading qspi parameter from EEPROM" + exit + fi + if cmp.b ${a_qspi1} ${a_qspi2} 0x200 ; then + echo "------- qspi parameters match" + else + echo "------- qspi parameters mismatch" + qspi_match=0 + fi +fi + +echo "check U-Boot" ; + +if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_uImage1} u-boot.$uboot_defconfig ; then +else + echo "File u-boot.$uboot_defconfig not found on SD card" ; + exit +fi +echo "read $filesize bytes from SD card" ; +if sf read ${a_uImage2} $offset $filesize ; then +else + echo "Error reading boot loader from EEPROM" ; + exit +fi + +if cmp.b ${a_uImage1} ${a_uImage2} $filesize ; then + echo "------- U-Boot versions match" ; + if itest.s "${qspi_match}" == "1" ; then + echo "------- U-Boot upgrade NOT needed" ; + if itest.s "x" != "x${next}" ; then + if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_script} ${next} ; then + source ${a_script} + else + echo "${next} not found on SD card" + fi + fi + exit + fi + erase_size=0x1000 + if itest.s xMX25L6405D == "x${sfname}"; then + erase_size=0x10000 + fi + setexpr filesize ${erase_size} - ${offset} +fi + +echo "Need U-Boot upgrade" ; +echo "Program in 5 seconds" ; +for n in 5 4 3 2 1 ; do + echo $n ; + sleep 1 ; +done +echo "erasing" ; +sf erase 0 ${erase_size} ; + +# two steps to prevent bricking +echo "programming" ; +setexpr a1 ${a_uImage1} + 0x400 +setexpr o1 ${offset} + 0x400 +setexpr s1 ${filesize} - 0x400 +sf write ${a1} ${o1} ${s1} ; +sf write ${a_uImage1} $offset 0x400 ; + +if itest.s x7D == "x${imx_cpu}"; then + sf write ${a_qspi1} ${qspi_offset} 0x200 +fi + +echo "verifying" ; +if sf read ${a_uImage2} $offset $filesize ; then +else + echo "Error re-reading EEPROM" ; + exit +fi +if cmp.b ${a_uImage1} ${a_uImage2} $filesize ; then +else + echo "Read verification error" ; + exit +fi + +if itest.s x7D == "x${imx_cpu}"; then + if sf read ${a_qspi2} ${qspi_offset} 0x200 ; then + else + echo "Error re-reading qspi" ; + exit + fi + if cmp.b ${a_qspi1} ${a_qspi2} 0x200 ; then + else + echo "qspi parameter block verification error" ; + exit + fi +fi + +if itest.s "x" != "x${next}" ; then + if ${fs}load ${devtype} ${devnum}:${distro_bootpart} ${a_script} ${next} ; then + source ${a_script} + else + echo "${next} not found on ${devtype} ${devnum}:${distro_bootpart}" + fi +fi +fi + +if itest.s "xno" == "x${reset}" ; then + while echo "---- U-Boot upgraded. Please reset the board" ; do + sleep 120 + done +fi +echo "---- U-Boot upgraded. The board will now reset." +sleep 1 +reset +done diff --git a/buildroot/board/boundarydevices/nitrogen6x/6x_bootscript b/buildroot/board/boundarydevices/nitrogen6x/6x_bootscript deleted file mode 100644 index 05442a6b0..000000000 Binary files a/buildroot/board/boundarydevices/nitrogen6x/6x_bootscript and /dev/null differ diff --git a/buildroot/board/boundarydevices/nitrogen6x/6x_upgrade b/buildroot/board/boundarydevices/nitrogen6x/6x_upgrade deleted file mode 100644 index 395f13fae..000000000 Binary files a/buildroot/board/boundarydevices/nitrogen6x/6x_upgrade and /dev/null differ diff --git a/buildroot/board/boundarydevices/nitrogen6x/post-build.sh b/buildroot/board/boundarydevices/nitrogen6x/post-build.sh deleted file mode 100755 index 2b43aa322..000000000 --- a/buildroot/board/boundarydevices/nitrogen6x/post-build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# post-build fixups -# for further details, see -# -# http://boundarydevices.com/u-boot-on-i-mx6/ -# - -BOARD_DIR="$(dirname $0)" - -# bd u-boot looks for bootscript here -install -D -m 0644 $BOARD_DIR/6x_bootscript $TARGET_DIR/6x_bootscript - -# u-boot / update script for bd upgradeu command -if [ -e $BINARIES_DIR/u-boot.imx ]; -then - install -D -m 0644 $BINARIES_DIR/u-boot.imx $TARGET_DIR/u-boot.imx - install -D -m 0644 $BOARD_DIR/6x_upgrade $TARGET_DIR/6x_upgrade -fi diff --git a/buildroot/board/boundarydevices/nitrogen6x/readme.txt b/buildroot/board/boundarydevices/nitrogen6x/readme.txt deleted file mode 100644 index f01d9f05e..000000000 --- a/buildroot/board/boundarydevices/nitrogen6x/readme.txt +++ /dev/null @@ -1,13 +0,0 @@ -Buildroot for Boundary Devices Nitrogen6X: - -http://boundarydevices.com/products/nitrogen6x-board-imx6-arm-cortex-a9-sbc/ - -To install, simply extract rootfs.ext2 to first partition of a uSD card: - -sudo dd if=output/images/rootfs.ext2 of=/dev/sdX1 - -Where 'sdX1' is the device node of the uSD partition. - -To upgrade u-boot, cancel autoboot and type: - -run upgradeu diff --git a/buildroot/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch b/buildroot/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch deleted file mode 100644 index eb9de2a15..000000000 --- a/buildroot/board/calao/qil-a9260/at91bootstrap-1.16-qil-a9260.patch +++ /dev/null @@ -1,603 +0,0 @@ -From a3e08beea8bf5e96e1237eef4a82f4a2fdd5286b Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Thu, 19 Jul 2012 14:19:59 +0200 -Subject: [PATCH] Add support for the Calao-systems QIL-A9260 - - -Signed-off-by: Gregory Hermant ---- - board/qil_a9260/nandflash/Makefile | 122 ++++++++++++++ - board/qil_a9260/nandflash/qil-a9260.h | 109 ++++++++++++ - board/qil_a9260/qil_a9260.c | 298 +++++++++++++++++++++++++++++++++ - crt0_gnu.S | 7 + - include/part.h | 6 +- - 5 files changed, 541 insertions(+), 1 deletions(-) - create mode 100644 board/qil_a9260/nandflash/Makefile - create mode 100644 board/qil_a9260/nandflash/qil-a9260.h - create mode 100644 board/qil_a9260/qil_a9260.c - -diff --git a/board/qil_a9260/nandflash/Makefile b/board/qil_a9260/nandflash/Makefile -new file mode 100644 -index 0000000..209a25f ---- /dev/null -+++ b/board/qil_a9260/nandflash/Makefile -@@ -0,0 +1,122 @@ -+# TODO: set this appropriately for your local toolchain -+ifndef ERASE_FCT -+ERASE_FCT=rm -f -+endif -+ifndef CROSS_COMPILE -+CROSS_COMPILE=arm-elf- -+endif -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# NandFlashBoot Configuration for QIL-A9260 -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9260 -+# Board name (case sensitive!!!) -+BOARD=qil_a9260 -+# Link Address and Top_of_Memory -+LINK_ADDR=0x200000 -+TOP_OF_MEMORY=0x301000 -+# Name of current directory -+PROJECT=nandflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ nandflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ $(ERASE_FCT) *.o *.bin *.elf *.map -diff --git a/board/qil_a9260/nandflash/qil-a9260.h b/board/qil_a9260/nandflash/qil-a9260.h -new file mode 100644 -index 0000000..c87002e ---- /dev/null -+++ b/board/qil_a9260/nandflash/qil-a9260.h -@@ -0,0 +1,109 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : qil-a9260.h -+ * Object : -+ * Creation : GH July 19th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _QIL_A9260_H -+#define _QIL_A9260_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (180000000/2) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+#define PLLA_SETTINGS 0x20593F06 -+#define PLLB_SETTINGS 0x10483F0E -+ -+/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ -+#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* NandFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SMARTMEDIA_BASE 0x40000000 -+ -+#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ -+#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ -+ -+#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) -+#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) -+ -+#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) -+ -+ -+/* ******************************************************************** */ -+/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000.*/ -+/* Please refer to SMC section in AT91SAM datasheet to learn how */ -+/* to generate these values. */ -+/* ******************************************************************** */ -+#define AT91C_SM_NWE_SETUP (1 << 0) -+#define AT91C_SM_NCS_WR_SETUP (0 << 8) -+#define AT91C_SM_NRD_SETUP (1 << 16) -+#define AT91C_SM_NCS_RD_SETUP (0 << 24) -+ -+#define AT91C_SM_NWE_PULSE (3 << 0) -+#define AT91C_SM_NCS_WR_PULSE (3 << 8) -+#define AT91C_SM_NRD_PULSE (3 << 16) -+#define AT91C_SM_NCS_RD_PULSE (3 << 24) -+ -+#define AT91C_SM_NWE_CYCLE (5 << 0) -+#define AT91C_SM_NRD_CYCLE (5 << 16) -+#define AT91C_SM_TDF (2 << 16) -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ -+ -+#define MACH_TYPE 0x6AF /* QIL-A9260 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#undef CFG_DEBUG -+#undef CFG_DATAFLASH -+ -+#define CFG_NANDFLASH -+#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ -+ -+#define CFG_HW_INIT -+#define CFG_SDRAM -+ -+#endif /* _QIL_A9260_H */ -diff --git a/board/qil_a9260/qil_a9260.c b/board/qil_a9260/qil_a9260.c -new file mode 100644 -index 0000000..ae122e7 ---- /dev/null -+++ b/board/qil_a9260/qil_a9260.c -@@ -0,0 +1,298 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaiimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : qil_a9260.c -+ * Object : -+ * Creation : GH July 19th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#include "../../include/part.h" -+#include "../../include/gpio.h" -+#include "../../include/pmc.h" -+#include "../../include/debug.h" -+#include "../../include/sdramc.h" -+#include "../../include/main.h" -+#ifdef CFG_NANDFLASH -+#include "../../include/nandflash.h" -+#endif -+#ifdef CFG_DATAFLASH -+#include "../../include/dataflash.h" -+#endif -+ -+static inline unsigned int get_cp15(void) -+{ -+ unsigned int value; -+ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); -+ return value; -+} -+ -+static inline void set_cp15(unsigned int value) -+{ -+ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); -+} -+ -+#ifdef CFG_HW_INIT -+/*----------------------------------------------------------------------------*/ -+/* \fn hw_init */ -+/* \brief This function performs very low level HW initialization */ -+/* This function is invoked as soon as possible during the c_startup */ -+/* The bss segment must be initialized */ -+/*----------------------------------------------------------------------------*/ -+void hw_init(void) -+{ -+ unsigned int cp15; -+ -+ /* Configure PIOs */ -+ const struct pio_desc hw_pio[] = { -+#ifdef CFG_DEBUG -+ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Disable watchdog */ -+ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); -+ -+ /* At this stage the main oscillator is supposed to be enabled -+ * PCK = MCK = MOSC */ -+ -+ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ -+ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* PCK = PLLA = 2 * MCK */ -+ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); -+ /* Switch MCK on PLLA output */ -+ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure PLLB */ -+ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure CP15 */ -+ cp15 = get_cp15(); -+ cp15 |= I_CACHE; -+ set_cp15(cp15); -+ -+ /* Configure the PIO controller */ -+ pio_setup(hw_pio); -+ -+ /* Configure the EBI Slave Slot Cycle to 64 */ -+ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); -+ -+#ifdef CFG_DEBUG -+ /* Enable Debug messages on the DBGU */ -+ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); -+ -+ dbg_print("Start AT91Bootstrap...\n\r"); -+#endif /* CFG_DEBUG */ -+ -+#ifdef CFG_SDRAM -+ /* Initialize the matrix */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SDRAM Controller */ -+ sdram_init( AT91C_SDRAMC_NC_9 | -+ AT91C_SDRAMC_NR_13 | -+ AT91C_SDRAMC_CAS_2 | -+ AT91C_SDRAMC_NB_4_BANKS | -+ AT91C_SDRAMC_DBW_32_BITS | -+ AT91C_SDRAMC_TWR_2 | -+ AT91C_SDRAMC_TRC_7 | -+ AT91C_SDRAMC_TRP_2 | -+ AT91C_SDRAMC_TRCD_2 | -+ AT91C_SDRAMC_TRAS_5 | -+ AT91C_SDRAMC_TXSR_8, /* Control Register */ -+ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ -+ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ -+ -+ -+#endif /* CFG_SDRAM */ -+} -+#endif /* CFG_HW_INIT */ -+ -+#ifdef CFG_SDRAM -+/*------------------------------------------------------------------------------*/ -+/* \fn sdramc_hw_init */ -+/* \brief This function performs SDRAMC HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void sdramc_hw_init(void) -+{ -+ /* Configure PIOs */ -+/* const struct pio_desc sdramc_pio[] = { -+ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+*/ -+ /* Configure the SDRAMC PIO controller to output PCK0 */ -+/* pio_setup(sdramc_pio); */ -+ -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); -+ -+} -+#endif /* CFG_SDRAM */ -+ -+#ifdef CFG_DATAFLASH -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_recovery */ -+/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+void df_recovery(AT91PS_DF pDf) -+{ -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USR PB is pressed during Boot sequence */ -+ /* Erase DataFlash Page 0*/ -+ if ( !pio_get_value(AT91C_PIN_PB(10)) ) -+ df_page_erase(pDf, 0); -+#endif -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_hw_init */ -+/* \brief This function performs DataFlash HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void df_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc df_pio[] = { -+ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ pio_setup(df_pio); -+} -+#endif /* CFG_DATAFLASH */ -+ -+ -+ -+#ifdef CFG_NANDFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn nand_recovery */ -+/* \brief This function erases NandFlash Block 0 if USR PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+static void nand_recovery(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USR PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if (!pio_get_value(AT91C_PIN_PB(10)) ) -+ AT91F_NandEraseBlock0(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_hw_init */ -+/* \brief NandFlash HW init */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc nand_pio[] = { -+ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, -+ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SMC CS3 */ -+ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); -+ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); -+ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); -+ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | -+ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(nand_pio); -+ -+ nand_recovery(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_16bits_dbw_init */ -+/* \brief Configure SMC in 16 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_16bits_dbw_init(void) -+{ -+ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_8bits_dbw_init */ -+/* \brief Configure SMC in 8 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_8bits_dbw_init(void) -+{ -+ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+ -+#endif /* #ifdef CFG_NANDFLASH */ -diff --git a/crt0_gnu.S b/crt0_gnu.S -index 042b617..002feef 100644 ---- a/crt0_gnu.S -+++ b/crt0_gnu.S -@@ -106,6 +106,13 @@ _relocate_to_sram: - #endif /* CFG_NORFLASH */ - - _setup_clocks: -+/* Test if main osc is bypassed */ -+ ldr r0,=AT91C_PMC_MOR -+ ldr r1, [r0] -+ ldr r2,=AT91C_CKGR_OSCBYPASS -+ ands r1, r1, r2 -+ bne _init_data /* branch if OSCBYPASS=1 */ -+ - /* Test if main oscillator is enabled */ - ldr r0,=AT91C_PMC_SR - ldr r1, [r0] -diff --git a/include/part.h b/include/part.h -index ba5985a..bbd33fe 100644 ---- a/include/part.h -+++ b/include/part.h -@@ -35,7 +35,11 @@ - - #ifdef AT91SAM9260 - #include "AT91SAM9260_inc.h" --#include "at91sam9260ek.h" -+ #ifdef at91sam9260ek -+ #include "at91sam9260ek.h" -+ #elif qil_a9260 -+ #include "qil-a9260.h" -+ #endif - #endif - - #ifdef AT91SAM9XE --- -1.5.6.3 - diff --git a/buildroot/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch b/buildroot/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch deleted file mode 100644 index a74e65706..000000000 --- a/buildroot/board/calao/qil-a9260/barebox-2012.07.0-qil-a9260.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d076aa6182dc6df6bb311e60bbddb03573b9483b Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Fri, 3 Aug 2012 11:25:49 +0200 -Subject: [PATCH] Enable pull-up on Rx serial ports for the CALAO MB-QIL-A9260 - - -Signed-off-by: Gregory Hermant ---- - arch/arm/boards/qil-a9260/init.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boards/qil-a9260/init.c b/arch/arm/boards/qil-a9260/init.c -index 305d733..b43cace 100644 ---- a/arch/arm/boards/qil-a9260/init.c -+++ b/arch/arm/boards/qil-a9260/init.c -@@ -196,11 +196,17 @@ device_initcall(qil_a9260_devices_init); - static int qil_a9260_console_init(void) - { - at91_register_uart(0, 0); -+ at91_set_A_periph(AT91_PIN_PB14, 1); /* Enable pull-up on DRXD */ -+ - at91_register_uart(1, ATMEL_UART_CTS | ATMEL_UART_RTS - | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD - | ATMEL_UART_RI); -+ - at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS); -+ at91_set_A_periph(AT91_PIN_PB7, 1); /* Enable pull-up on RXD1 */ -+ - at91_register_uart(3, ATMEL_UART_CTS | ATMEL_UART_RTS); -+ at91_set_A_periph(AT91_PIN_PB9, 1); /* Enable pull-up on RXD2 */ - - return 0; - } --- -1.5.6.3 - diff --git a/buildroot/board/calao/qil-a9260/linux-3.4.7.config b/buildroot/board/calao/qil-a9260/linux-3.4.7.config deleted file mode 100644 index 105d76006..000000000 --- a/buildroot/board/calao/qil-a9260/linux-3.4.7.config +++ /dev/null @@ -1,111 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9260=y -CONFIG_MACH_QIL_A9260=y -CONFIG_AT91_SLOW_CLOCK=y -CONFIG_AT91_EARLY_USART0=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS1,115200" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_MMC=y -CONFIG_MMC_AT91=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_M41T94=y -CONFIG_EXT2_FS=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_XATTR=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/buildroot/board/calao/qil-a9260/linux-3.4.7.patch b/buildroot/board/calao/qil-a9260/linux-3.4.7.patch deleted file mode 100644 index 5d355d23c..000000000 --- a/buildroot/board/calao/qil-a9260/linux-3.4.7.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fe6432a9728b62bce3db73c5a4efe026018fd495 Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Fri, 3 Aug 2012 16:45:37 +0200 -Subject: [PATCH] QIL-A9260: rtc modalias m41t48 renamed to rtc-m41t48 - - -Signed-off-by: Gregory Hermant ---- - arch/arm/mach-at91/board-qil-a9260.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c -index bf351e2..c0df05c 100644 ---- a/arch/arm/mach-at91/board-qil-a9260.c -+++ b/arch/arm/mach-at91/board-qil-a9260.c -@@ -78,7 +78,7 @@ static struct at91_udc_data __initdata ek_udc_data = { - static struct spi_board_info ek_spi_devices[] = { - #if defined(CONFIG_RTC_DRV_M41T94) - { /* M41T94 RTC */ -- .modalias = "m41t94", -+ .modalias = "rtc-m41t94", - .chip_select = 0, - .max_speed_hz = 1 * 1000 * 1000, - .bus_num = 0, --- -1.5.6.3 - diff --git a/buildroot/board/calao/snowball/linux-3.4.patch b/buildroot/board/calao/snowball/linux-3.4.patch deleted file mode 100644 index 4e6fb518f..000000000 --- a/buildroot/board/calao/snowball/linux-3.4.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 3d1a9b44b9dcd2c0f5d54c09596c96c0524d8340 Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Tue, 13 Nov 2012 11:47:41 +0100 -Subject: [PATCH] trace-debug[stm]: Fix for BT/WLAN instability - -Pins under mop500_ske_pins array are used for different -functionalities in snowball. Ex: GPIO161 pin configured -for keypad here must stay configured as GPIO alternate -function for operating PMU_EN pin of BT/WLAN chip in snowball. -So forbid configuring these pins, for snowball - -Signed-off-by: Rajanikanth H.V -Signed-off-by: Gregory Hermant ---- - arch/arm/mach-ux500/board-mop500-stm.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-ux500/board-mop500-stm.c b/arch/arm/mach-ux500/board-mop500-stm.c -index 1bef2a0..532fb9e 100644 ---- a/arch/arm/mach-ux500/board-mop500-stm.c -+++ b/arch/arm/mach-ux500/board-mop500-stm.c -@@ -121,7 +121,9 @@ static int stm_ste_disable_ape_on_mipi60(void) - if (retval) - STM_ERR("Failed to disable MIPI60\n"); - else { -- retval = nmk_config_pins(ARRAY_AND_SIZE(mop500_ske_pins)); -+ if (!machine_is_snowball()) -+ retval = nmk_config_pins( -+ ARRAY_AND_SIZE(mop500_ske_pins)); - if (retval) - STM_ERR("Failed to enable SKE gpio\n"); - } -@@ -314,7 +316,8 @@ static int stm_ste_connection(enum stm_connection_type con_type) - /* Enable altC3 on GPIO70-74 (STMMOD) and GPIO75-76 (UARTMOD) */ - prcmu_enable_stm_mod_uart(); - /* Enable APE on MIPI60 */ -- retval = nmk_config_pins_sleep(ARRAY_AND_SIZE(mop500_ske_pins)); -+ if (!machine_is_snowball()) -+ retval = nmk_config_pins_sleep(ARRAY_AND_SIZE(mop500_ske_pins)); - if (retval) - STM_ERR("Failed to disable SKE GPIO\n"); - else { --- -1.7.9.5 - diff --git a/buildroot/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch b/buildroot/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch deleted file mode 100644 index 71746ce5a..000000000 --- a/buildroot/board/calao/tny-a9g20-lpw/at91bootstrap-1.16-tny-a9g20-lpw.patch +++ /dev/null @@ -1,551 +0,0 @@ -From 53bd82b122f4530a98cba45795832820bb1d0b45 Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Mon, 13 Aug 2012 11:26:10 +0200 -Subject: [PATCH] Add support for the Calao-systems TNY-A9G20-LPW - - -Signed-off-by: Gregory Hermant ---- - board/tny_a9g20_lpw/nandflash/Makefile | 121 ++++++++++++ - board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h | 114 ++++++++++++ - board/tny_a9g20_lpw/tny_a9g20_lpw.c | 243 +++++++++++++++++++++++++ - crt0_gnu.S | 6 + - include/part.h | 6 +- - 5 files changed, 489 insertions(+), 1 deletion(-) - create mode 100644 board/tny_a9g20_lpw/nandflash/Makefile - create mode 100644 board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h - create mode 100644 board/tny_a9g20_lpw/tny_a9g20_lpw.c - -diff --git a/board/tny_a9g20_lpw/nandflash/Makefile b/board/tny_a9g20_lpw/nandflash/Makefile -new file mode 100644 -index 0000000..7efbea7 ---- /dev/null -+++ b/board/tny_a9g20_lpw/nandflash/Makefile -@@ -0,0 +1,121 @@ -+# TODO: set this appropriately for your local toolchain -+ifndef ERASE_FCT -+ERASE_FCT=rm -f -+endif -+ifndef CROSS_COMPILE -+CROSS_COMPILE=arm-elf- -+endif -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# NandFlashBoot Configuration for AT91SAM9260EK -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9G20 -+# Board name (case sensitive!!!) -+BOARD=tny_a9g20_lpw -+# Link Address and Top_of_Memory -+LINK_ADDR=0x200000 -+TOP_OF_MEMORY=0x301000 -+# Name of current directory -+PROJECT=nandflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ nandflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ $(ERASE_FCT) *.o *.bin *.elf *.map -diff --git a/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h b/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h -new file mode 100644 -index 0000000..b1f8a1d ---- /dev/null -+++ b/board/tny_a9g20_lpw/nandflash/tny-a9g20-lpw.h -@@ -0,0 +1,114 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2008, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : tny-a9g20-lpw.h -+ * Object : -+ * Creation : GH August 13th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _TNY_A9G20_LPW_H -+#define _TNY_A9G20_LPW_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (100000000) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+/* set PLLA to 800Mhz from MAINCK= 12Mhz MULA=199 (0xC7+1= 200), DIVA=0x03 (Fplla=12Mhz x [(199+1)/3]=800Mhz) */ -+#define PLLA_SETTINGS 0x20C73F03 -+#define PLLB_SETTINGS 0x100F3F02 -+ -+/* Switch MCK on PLLA output PCK = PLLA/2 = 3 * MCK */ -+/* LP-SDRAM (fmax=100Mhz) PDIV=0 => PRESCALER CLK=PCLK; */ -+/* MDIV = 2 => PRESCALER CLK / 4 = MCLK=100Mhz */ -+/* PRESCALER CLK = PLLA (800Mhz) / 2 (PRES=1) = 400Mhz */ -+#define MCKR_SETTINGS 0x0204 -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* NandFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SMARTMEDIA_BASE 0x40000000 -+ -+#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ -+#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ -+ -+#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) -+#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) -+ -+#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) -+ -+ -+/* ******************************************************************** */ -+/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 100000000.*/ -+/* Please refer to SMC section in AT91SAM9 datasheet to learn how */ -+/* to generate these values. */ -+/* ******************************************************************** */ -+#define AT91C_SM_NWE_SETUP (1 << 0) -+#define AT91C_SM_NCS_WR_SETUP (0 << 8) -+#define AT91C_SM_NRD_SETUP (1 << 16) -+#define AT91C_SM_NCS_RD_SETUP (0 << 24) -+ -+#define AT91C_SM_NWE_PULSE (3 << 0) -+#define AT91C_SM_NCS_WR_PULSE (3 << 8) -+#define AT91C_SM_NRD_PULSE (3 << 16) -+#define AT91C_SM_NCS_RD_PULSE (3 << 24) -+ -+#define AT91C_SM_NWE_CYCLE (5 << 0) -+#define AT91C_SM_NRD_CYCLE (5 << 16) -+ -+#define AT91C_SM_TDF (2 << 16) -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ -+ -+#define MACH_TYPE 0x80B /* TNY-A9G20 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#undef CFG_DEBUG -+#undef CFG_DATAFLASH -+ -+#define CFG_NANDFLASH -+#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ -+ -+#define CFG_SDRAM -+#define CFG_HW_INIT -+ -+#endif /* _TNY_A9G20_LPW_H */ -diff --git a/board/tny_a9g20_lpw/tny_a9g20_lpw.c b/board/tny_a9g20_lpw/tny_a9g20_lpw.c -new file mode 100644 -index 0000000..cef9055 ---- /dev/null -+++ b/board/tny_a9g20_lpw/tny_a9g20_lpw.c -@@ -0,0 +1,243 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2008, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : tny_a9g20_lpw.c -+ * Object : -+ * Creation : GH August 13th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#include "../../include/part.h" -+#include "../../include/gpio.h" -+#include "../../include/pmc.h" -+#include "../../include/debug.h" -+#include "../../include/sdramc.h" -+#include "../../include/main.h" -+#ifdef CFG_NANDFLASH -+#include "../../include/nandflash.h" -+#endif -+ -+static inline unsigned int get_cp15(void) -+{ -+ unsigned int value; -+ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); -+ return value; -+} -+ -+static inline void set_cp15(unsigned int value) -+{ -+ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); -+} -+ -+#ifdef CFG_HW_INIT -+/*----------------------------------------------------------------------------*/ -+/* \fn hw_init */ -+/* \brief This function performs very low level HW initialization */ -+/* This function is invoked as soon as possible during the c_startup */ -+/* The bss segment must be initialized */ -+/*----------------------------------------------------------------------------*/ -+void hw_init(void) -+{ -+ unsigned int cp15; -+ -+ /* Configure PIOs */ -+ const struct pio_desc hw_pio[] = { -+#ifdef CFG_DEBUG -+ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Disable watchdog */ -+ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); -+ -+ /* At this stage the main oscillator is supposed to be enabled -+ * PCK = MCK = MOSC */ -+ writel(0x00, AT91C_BASE_PMC + PMC_PLLICPR); -+ -+ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ -+ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* PCK = PLLA/2 = 3 * MCK */ -+ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); -+ /* Switch MCK on PLLA output */ -+ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure PLLB */ -+ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure CP15 */ -+ cp15 = get_cp15(); -+ cp15 |= I_CACHE; -+ set_cp15(cp15); -+ -+ /* Configure the PIO controller */ -+ pio_setup(hw_pio); -+ -+ /* Configure the EBI Slave Slot Cycle to 64 */ -+ writel((readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); -+ -+#ifdef CFG_DEBUG -+ /* Enable Debug messages on the DBGU */ -+ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); -+ -+ dbg_print("Start AT91Bootstrap...\n\r"); -+#endif /* CFG_DEBUG */ -+ -+#ifdef CFG_SDRAM -+ /* Initialize the matrix (slow slew rate enabled and LPSDRAM memory voltage = 1.8V) */ -+ writel(((readl(AT91C_BASE_CCFG + CCFG_EBICSA)) | AT91C_EBI_CS1A_SDRAMC | (1<<17)) & ~0x00010000, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SDRAM Controller */ -+ sdram_init( AT91C_SDRAMC_NC_9 | -+ AT91C_SDRAMC_NR_13 | -+ AT91C_SDRAMC_CAS_3 | -+ AT91C_SDRAMC_NB_4_BANKS | -+ AT91C_SDRAMC_DBW_32_BITS | -+ AT91C_SDRAMC_TWR_2 | -+ AT91C_SDRAMC_TRC_7 | -+ AT91C_SDRAMC_TRP_2 | -+ AT91C_SDRAMC_TRCD_2 | -+ AT91C_SDRAMC_TRAS_5 | -+ AT91C_SDRAMC_TXSR_8, /* Control Register */ -+ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ -+ AT91C_SDRAMC_MD_LOW_POWER_SDRAM); /* SDRAM (low power) */ -+ -+#endif /* CFG_SDRAM */ -+} -+#endif /* CFG_HW_INIT */ -+ -+#ifdef CFG_SDRAM -+/*------------------------------------------------------------------------------*/ -+/* \fn sdramc_hw_init */ -+/* \brief This function performs SDRAMC HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void sdramc_hw_init(void) -+{ -+ /* Configure PIOs */ -+/* const struct pio_desc sdramc_pio[] = { -+ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+*/ -+ /* Configure the SDRAMC PIO controller to output PCK0 */ -+/* pio_setup(sdramc_pio); */ -+ -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); -+ -+} -+#endif /* CFG_SDRAM */ -+ -+#ifdef CFG_NANDFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn nand_recovery */ -+/* \brief This function erases NandFlash Block 0 if BP4 is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+static void nand_recovery(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc bp4_pio[] = { -+ {"BP4", AT91C_PIN_PA(31), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOA), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(bp4_pio); -+ -+ /* If BP4 is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if (!pio_get_value(AT91C_PIN_PA(31)) ) -+ AT91F_NandEraseBlock0(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_hw_init */ -+/* \brief NandFlash HW init */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc nand_pio[] = { -+ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, -+ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SMC CS3 */ -+ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); -+ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); -+ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); -+ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | -+ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(nand_pio); -+ -+ nand_recovery(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_16bits_dbw_init */ -+/* \brief Configure SMC in 16 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_16bits_dbw_init(void) -+{ -+ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_8bits_dbw_init */ -+/* \brief Configure SMC in 8 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_8bits_dbw_init(void) -+{ -+ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+#endif /* #ifdef CFG_NANDFLASH */ -diff --git a/crt0_gnu.S b/crt0_gnu.S -index 042b617..c6cd49d 100644 ---- a/crt0_gnu.S -+++ b/crt0_gnu.S -@@ -106,6 +106,12 @@ _relocate_to_sram: - #endif /* CFG_NORFLASH */ - - _setup_clocks: -+/* Test if main osc is bypassed */ -+ ldr r0,=AT91C_PMC_MOR -+ ldr r1, [r0] -+ ldr r2,=AT91C_CKGR_OSCBYPASS -+ ands r1, r1, r2 -+ bne _init_data /* branch if OSCBYPASS=1 */ - /* Test if main oscillator is enabled */ - ldr r0,=AT91C_PMC_SR - ldr r1, [r0] -diff --git a/include/part.h b/include/part.h -index ba5985a..ab79af1 100644 ---- a/include/part.h -+++ b/include/part.h -@@ -46,7 +46,11 @@ - - #ifdef AT91SAM9G20 - #include "AT91SAM9260_inc.h" --#include "at91sam9g20ek.h" -+ #ifdef at91sam9g20ek -+ #include "at91sam9g20ek.h" -+ #elif tny_a9g20_lpw -+ #include "tny-a9g20-lpw.h" -+ #endif - #endif - - #ifdef AT91SAM9261 --- -1.7.9.5 - diff --git a/buildroot/board/calao/tny-a9g20-lpw/linux-3.9.config b/buildroot/board/calao/tny-a9g20-lpw/linux-3.9.config deleted file mode 100644 index 797c15a4d..000000000 --- a/buildroot/board/calao/tny-a9g20-lpw/linux-3.9.config +++ /dev/null @@ -1,187 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_SOC_AT91SAM9260=y -CONFIG_SOC_AT91SAM9263=y -CONFIG_SOC_AT91SAM9G45=y -CONFIG_SOC_AT91SAM9X5=y -CONFIG_SOC_AT91SAM9N12=y -CONFIG_MACH_AT91SAM_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AT91_TIMER_HZ=128 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT_6RD=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_ATMEL_PWM=y -CONFIG_ATMEL_TCLIB=y -CONFIG_EEPROM_93CX6=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_DAVICOM_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_SSB=m -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_ATMEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_GADGET=y -CONFIG_USB_AT91=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_ACM_MS=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=y -CONFIG_MMC_SPI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_DMADEVICES=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_FANOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_AVERAGE=y diff --git a/buildroot/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch b/buildroot/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch deleted file mode 100644 index 1393677df..000000000 --- a/buildroot/board/calao/usb-a9260/at91bootstrap-1.16-usb-a9260.patch +++ /dev/null @@ -1,603 +0,0 @@ -From 43e8c90f13806405bde8eaaf3a956d0ddc806f64 Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Tue, 2 Oct 2012 09:19:15 +0200 -Subject: [PATCH] Add support for the USB-A9260 - - -Signed-off-by: Gregory Hermant ---- - board/usb_a9260/nandflash/Makefile | 122 ++++++++++++++ - board/usb_a9260/nandflash/usb-a9260.h | 109 ++++++++++++ - board/usb_a9260/usb_a9260.c | 298 +++++++++++++++++++++++++++++++++ - crt0_gnu.S | 7 + - include/part.h | 6 +- - 5 files changed, 541 insertions(+), 1 deletion(-) - create mode 100644 board/usb_a9260/nandflash/Makefile - create mode 100644 board/usb_a9260/nandflash/usb-a9260.h - create mode 100644 board/usb_a9260/usb_a9260.c - -diff --git a/board/usb_a9260/nandflash/Makefile b/board/usb_a9260/nandflash/Makefile -new file mode 100644 -index 0000000..02f4b50 ---- /dev/null -+++ b/board/usb_a9260/nandflash/Makefile -@@ -0,0 +1,122 @@ -+# TODO: set this appropriately for your local toolchain -+ifndef ERASE_FCT -+ERASE_FCT=rm -f -+endif -+ifndef CROSS_COMPILE -+CROSS_COMPILE=arm-elf- -+endif -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# NandFlashBoot Configuration for USB-A9260 -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9260 -+# Board name (case sensitive!!!) -+BOARD=usb_a9260 -+# Link Address and Top_of_Memory -+LINK_ADDR=0x200000 -+TOP_OF_MEMORY=0x301000 -+# Name of current directory -+PROJECT=nandflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ nandflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ $(ERASE_FCT) *.o *.bin *.elf *.map -diff --git a/board/usb_a9260/nandflash/usb-a9260.h b/board/usb_a9260/nandflash/usb-a9260.h -new file mode 100644 -index 0000000..2aaf759 ---- /dev/null -+++ b/board/usb_a9260/nandflash/usb-a9260.h -@@ -0,0 +1,109 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb-a9260.h -+ * Object : -+ * Creation : GH Oct 1th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _USB_A9260_H -+#define _USB_A9260_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (180000000/2) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+#define PLLA_SETTINGS 0x20593F06 -+#define PLLB_SETTINGS 0x10483F0E -+ -+/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ -+#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* NandFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SMARTMEDIA_BASE 0x40000000 -+ -+#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ -+#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ -+ -+#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) -+#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) -+ -+#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) -+ -+ -+/* ******************************************************************** */ -+/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000.*/ -+/* Please refer to SMC section in AT91SAM datasheet to learn how */ -+/* to generate these values. */ -+/* ******************************************************************** */ -+#define AT91C_SM_NWE_SETUP (1 << 0) -+#define AT91C_SM_NCS_WR_SETUP (0 << 8) -+#define AT91C_SM_NRD_SETUP (1 << 16) -+#define AT91C_SM_NCS_RD_SETUP (0 << 24) -+ -+#define AT91C_SM_NWE_PULSE (3 << 0) -+#define AT91C_SM_NCS_WR_PULSE (3 << 8) -+#define AT91C_SM_NRD_PULSE (3 << 16) -+#define AT91C_SM_NCS_RD_PULSE (3 << 24) -+ -+#define AT91C_SM_NWE_CYCLE (5 << 0) -+#define AT91C_SM_NRD_CYCLE (5 << 16) -+#define AT91C_SM_TDF (2 << 16) -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ -+ -+#define MACH_TYPE 0x6AD /* USB-A9260 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#undef CFG_DEBUG -+#undef CFG_DATAFLASH -+ -+#define CFG_NANDFLASH -+#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ -+ -+#define CFG_HW_INIT -+#define CFG_SDRAM -+ -+#endif /* _USB_A9260_H */ -diff --git a/board/usb_a9260/usb_a9260.c b/board/usb_a9260/usb_a9260.c -new file mode 100644 -index 0000000..de30f0b ---- /dev/null -+++ b/board/usb_a9260/usb_a9260.c -@@ -0,0 +1,298 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaiimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb_a9260.c -+ * Object : -+ * Creation : GH Oct 1th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#include "../../include/part.h" -+#include "../../include/gpio.h" -+#include "../../include/pmc.h" -+#include "../../include/debug.h" -+#include "../../include/sdramc.h" -+#include "../../include/main.h" -+#ifdef CFG_NANDFLASH -+#include "../../include/nandflash.h" -+#endif -+#ifdef CFG_DATAFLASH -+#include "../../include/dataflash.h" -+#endif -+ -+static inline unsigned int get_cp15(void) -+{ -+ unsigned int value; -+ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); -+ return value; -+} -+ -+static inline void set_cp15(unsigned int value) -+{ -+ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); -+} -+ -+#ifdef CFG_HW_INIT -+/*----------------------------------------------------------------------------*/ -+/* \fn hw_init */ -+/* \brief This function performs very low level HW initialization */ -+/* This function is invoked as soon as possible during the c_startup */ -+/* The bss segment must be initialized */ -+/*----------------------------------------------------------------------------*/ -+void hw_init(void) -+{ -+ unsigned int cp15; -+ -+ /* Configure PIOs */ -+ const struct pio_desc hw_pio[] = { -+#ifdef CFG_DEBUG -+ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Disable watchdog */ -+ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); -+ -+ /* At this stage the main oscillator is supposed to be enabled -+ * PCK = MCK = MOSC */ -+ -+ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ -+ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* PCK = PLLA = 2 * MCK */ -+ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); -+ /* Switch MCK on PLLA output */ -+ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure PLLB */ -+ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure CP15 */ -+ cp15 = get_cp15(); -+ cp15 |= I_CACHE; -+ set_cp15(cp15); -+ -+ /* Configure the PIO controller */ -+ pio_setup(hw_pio); -+ -+ /* Configure the EBI Slave Slot Cycle to 64 */ -+ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); -+ -+#ifdef CFG_DEBUG -+ /* Enable Debug messages on the DBGU */ -+ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); -+ -+ dbg_print("Start AT91Bootstrap...\n\r"); -+#endif /* CFG_DEBUG */ -+ -+#ifdef CFG_SDRAM -+ /* Initialize the matrix */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SDRAM Controller */ -+ sdram_init( AT91C_SDRAMC_NC_9 | -+ AT91C_SDRAMC_NR_13 | -+ AT91C_SDRAMC_CAS_2 | -+ AT91C_SDRAMC_NB_4_BANKS | -+ AT91C_SDRAMC_DBW_32_BITS | -+ AT91C_SDRAMC_TWR_2 | -+ AT91C_SDRAMC_TRC_7 | -+ AT91C_SDRAMC_TRP_2 | -+ AT91C_SDRAMC_TRCD_2 | -+ AT91C_SDRAMC_TRAS_5 | -+ AT91C_SDRAMC_TXSR_8, /* Control Register */ -+ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ -+ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ -+ -+ -+#endif /* CFG_SDRAM */ -+} -+#endif /* CFG_HW_INIT */ -+ -+#ifdef CFG_SDRAM -+/*------------------------------------------------------------------------------*/ -+/* \fn sdramc_hw_init */ -+/* \brief This function performs SDRAMC HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void sdramc_hw_init(void) -+{ -+ /* Configure PIOs */ -+/* const struct pio_desc sdramc_pio[] = { -+ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+*/ -+ /* Configure the SDRAMC PIO controller to output PCK0 */ -+/* pio_setup(sdramc_pio); */ -+ -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); -+ -+} -+#endif /* CFG_SDRAM */ -+ -+#ifdef CFG_DATAFLASH -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_recovery */ -+/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+void df_recovery(AT91PS_DF pDf) -+{ -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USR PB is pressed during Boot sequence */ -+ /* Erase DataFlash Page 0*/ -+ if ( !pio_get_value(AT91C_PIN_PB(10)) ) -+ df_page_erase(pDf, 0); -+#endif -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_hw_init */ -+/* \brief This function performs DataFlash HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void df_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc df_pio[] = { -+ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ pio_setup(df_pio); -+} -+#endif /* CFG_DATAFLASH */ -+ -+ -+ -+#ifdef CFG_NANDFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn nand_recovery */ -+/* \brief This function erases NandFlash Block 0 if USR PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+static void nand_recovery(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USR PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if (!pio_get_value(AT91C_PIN_PB(10)) ) -+ AT91F_NandEraseBlock0(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_hw_init */ -+/* \brief NandFlash HW init */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc nand_pio[] = { -+ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, -+ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SMC CS3 */ -+ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); -+ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); -+ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); -+ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | -+ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(nand_pio); -+ -+ nand_recovery(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_16bits_dbw_init */ -+/* \brief Configure SMC in 16 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_16bits_dbw_init(void) -+{ -+ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_8bits_dbw_init */ -+/* \brief Configure SMC in 8 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_8bits_dbw_init(void) -+{ -+ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+ -+#endif /* #ifdef CFG_NANDFLASH */ -diff --git a/crt0_gnu.S b/crt0_gnu.S -index 042b617..002feef 100644 ---- a/crt0_gnu.S -+++ b/crt0_gnu.S -@@ -106,6 +106,13 @@ _relocate_to_sram: - #endif /* CFG_NORFLASH */ - - _setup_clocks: -+/* Test if main osc is bypassed */ -+ ldr r0,=AT91C_PMC_MOR -+ ldr r1, [r0] -+ ldr r2,=AT91C_CKGR_OSCBYPASS -+ ands r1, r1, r2 -+ bne _init_data /* branch if OSCBYPASS=1 */ -+ - /* Test if main oscillator is enabled */ - ldr r0,=AT91C_PMC_SR - ldr r1, [r0] -diff --git a/include/part.h b/include/part.h -index ba5985a..212789f 100644 ---- a/include/part.h -+++ b/include/part.h -@@ -35,7 +35,11 @@ - - #ifdef AT91SAM9260 - #include "AT91SAM9260_inc.h" --#include "at91sam9260ek.h" -+ #ifdef at91sam9260ek -+ #include "at91sam9260ek.h" -+ #elif usb_a9260 -+ #include "usb-a9260.h" -+ #endif - #endif - - #ifdef AT91SAM9XE --- -1.7.9.5 - diff --git a/buildroot/board/calao/usb-a9260/linux-3.7.4.config b/buildroot/board/calao/usb-a9260/linux-3.7.4.config deleted file mode 100644 index c466bdc88..000000000 --- a/buildroot/board/calao/usb-a9260/linux-3.7.4.config +++ /dev/null @@ -1,97 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9260=y -CONFIG_MACH_USB_A9260=y -CONFIG_AT91_SLOW_CLOCK=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_EXT2_FS=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/buildroot/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch b/buildroot/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch deleted file mode 100644 index 579893050..000000000 --- a/buildroot/board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch +++ /dev/null @@ -1,851 +0,0 @@ -From 74796655212d321f50ab89e8c5570245901f4cba Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Thu, 5 Jul 2012 18:44:07 +0200 -Subject: [PATCH] Add support for the Calao-systems USB-A9263 - - -Signed-off-by: Gregory Hermant ---- - board/usb_a9263/dataflash/Makefile | 115 +++++++++++++ - board/usb_a9263/dataflash/usb-a9263.h | 97 +++++++++++ - board/usb_a9263/nandflash/Makefile | 117 ++++++++++++++ - board/usb_a9263/nandflash/usb-a9263.h | 116 +++++++++++++ - board/usb_a9263/usb_a9263.c | 285 +++++++++++++++++++++++++++++++++ - crt0_gnu.S | 7 + - driver/dataflash.c | 6 +- - include/part.h | 6 +- - 8 files changed, 745 insertions(+), 4 deletions(-) - create mode 100644 board/usb_a9263/dataflash/Makefile - create mode 100644 board/usb_a9263/dataflash/usb-a9263.h - create mode 100644 board/usb_a9263/nandflash/Makefile - create mode 100644 board/usb_a9263/nandflash/usb-a9263.h - create mode 100644 board/usb_a9263/usb_a9263.c - -diff --git a/board/usb_a9263/dataflash/Makefile b/board/usb_a9263/dataflash/Makefile -new file mode 100644 -index 0000000..332685e ---- /dev/null -+++ b/board/usb_a9263/dataflash/Makefile -@@ -0,0 +1,115 @@ -+# TODO: set this appropriately for your local toolchain -+#SHELL=C:\CYGWIN_REP\dwn_071004\bin\BASH.exe -+CROSS_COMPILE=arm-elf- -+#CROSS_COMPILE = arm-softfloat-linux-gnu- -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# DataFlashBoot Configuration for USB-A9263 -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9263 -+# Board name (case sensitive!!!) -+BOARD=usb_a9263 -+# Link Address and Top_of_Memory -+LINK_ADDR=0x300000 -+TOP_OF_MEMORY=0x314000 -+# Name of current directory -+PROJECT=dataflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm9 -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ dataflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ rm -f *.o *.bin *.elf *.map -diff --git a/board/usb_a9263/dataflash/usb-a9263.h b/board/usb_a9263/dataflash/usb-a9263.h -new file mode 100644 -index 0000000..40a3af8 ---- /dev/null -+++ b/board/usb_a9263/dataflash/usb-a9263.h -@@ -0,0 +1,97 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb-a9263.h -+ * Object : -+ * Creation : GH Jun 28th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _USB_A9263_H -+#define _USB_A9263_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (180000000/2) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+#define PLLA_SETTINGS 0x20593F06 -+#define PLLB_SETTINGS 0x10483F0E -+ -+/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ -+#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* DataFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_BASE_SPI AT91C_BASE_SPI0 -+#define AT91C_ID_SPI AT91C_ID_SPI0 -+ -+/* SPI CLOCK */ -+#define AT91C_SPI_CLK 8000000 -+/* AC characteristics */ -+/* DLYBS = tCSS= 250ns min and DLYBCT = tCSH = 250ns */ -+#define DATAFLASH_TCSS (0x1a << 16) /* 250ns min (tCSS) <=> 12/48000000 = 250ns */ -+#define DATAFLASH_TCHS (0x1 << 24) /* 250ns min (tCSH) <=> (64*1+SCBR)/(2*48000000) */ -+ -+#define DF_CS_SETTINGS (AT91C_SPI_NCPHA | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT & DATAFLASH_TCHS) | ((MASTER_CLOCK / AT91C_SPI_CLK) << 8)) -+ -+/* ******************************************************************* */ -+/* SDRAMC Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_BASE_SDRAMC AT91C_BASE_SDRAMC0 -+#define AT91C_EBI_SDRAM AT91C_EBI0_SDRAM -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SPI_PCS_DATAFLASH AT91C_SPI_PCS0_DATAFLASH /* Boot on SPI NCS0 */ -+ -+#define IMG_ADDRESS 0x4000 /* Image Address in DataFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in DataFlash */ -+ -+#define MACH_TYPE 0x6AE /* USB-A9263 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#define CFG_HW_INIT -+#define CFG_SDRAM -+#undef CFG_DEBUG -+ -+#define CFG_DATAFLASH -+ -+#endif /* _USB_A9263_H */ -diff --git a/board/usb_a9263/nandflash/Makefile b/board/usb_a9263/nandflash/Makefile -new file mode 100644 -index 0000000..c453098 ---- /dev/null -+++ b/board/usb_a9263/nandflash/Makefile -@@ -0,0 +1,117 @@ -+# TODO: set this appropriately for your local toolchain -+#SHELL=C:\CYGWIN_REP\dwn_071004\bin\BASH.exe -+CROSS_COMPILE=arm-elf- -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# NandFlashBoot Configuration for USB-A9263 -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9263 -+# Board name (case sensitive!!!) -+BOARD=usb_a9263 -+# Link Address and Top_of_Memory -+LINK_ADDR=0x300000 -+TOP_OF_MEMORY=0x314000 -+# Name of current directory -+PROJECT=nandflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm9 -O0 -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm9 -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ nandflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ rm -f *.o *.bin *.elf *.map -diff --git a/board/usb_a9263/nandflash/usb-a9263.h b/board/usb_a9263/nandflash/usb-a9263.h -new file mode 100644 -index 0000000..24e2cf1 ---- /dev/null -+++ b/board/usb_a9263/nandflash/usb-a9263.h -@@ -0,0 +1,116 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb-a9263.h -+ * Object : -+ * Creation : GH Jun 28th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _USB_A9263_H -+#define _USB_A9263_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (180000000/2) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+#define PLLA_SETTINGS 0x20593F06 -+#define PLLB_SETTINGS 0x10483F0E -+ -+/* Switch MCK on PLLA output PCK = PLLA = 2 * MCK */ -+#define MCKR_SETTINGS (AT91C_PMC_PRES_CLK | AT91C_PMC_MDIV_2) -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* NandFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SMARTMEDIA_BASE 0x40000000 -+ -+#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ -+#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ -+ -+#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOD_SODR = AT91C_PIO_PD15;} while(0) -+#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOD_CODR = AT91C_PIO_PD15;} while(0) -+#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOA_PDSR & AT91C_PIO_PA22)) -+ -+/* ******************************************************************* */ -+/* SDRAMC Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_BASE_SDRAMC AT91C_BASE_SDRAMC0 -+#define AT91C_EBI_SDRAM AT91C_EBI0_SDRAM -+ -+/* ******************************************************************** */ -+/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 90000000. */ -+/* Please refer to SMC section in AT91SAM9x datasheet to learn how */ -+/* to generate these values. */ -+/* ******************************************************************** */ -+#define AT91C_SM_NWE_SETUP (1 << 0) -+#define AT91C_SM_NCS_WR_SETUP (0 << 8) -+#define AT91C_SM_NRD_SETUP (1 << 16) -+#define AT91C_SM_NCS_RD_SETUP (0 << 24) -+ -+#define AT91C_SM_NWE_PULSE (3 << 0) -+#define AT91C_SM_NCS_WR_PULSE (3 << 8) -+#define AT91C_SM_NRD_PULSE (3 << 16) -+#define AT91C_SM_NCS_RD_PULSE (3 << 24) -+ -+#define AT91C_SM_NWE_CYCLE (5 << 0) -+#define AT91C_SM_NRD_CYCLE (5 << 16) -+ -+#define AT91C_SM_TDF (2 << 16) -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ -+ -+#define MACH_TYPE 0x6AE /* USB-A9263 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#undef CFG_DEBUG -+#undef CFG_DATAFLASH -+ -+#define CFG_NANDFLASH -+#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ -+ -+#define CFG_HW_INIT -+#define CFG_SDRAM -+ -+ -+#endif /* _USB_A9263_H */ -diff --git a/board/usb_a9263/usb_a9263.c b/board/usb_a9263/usb_a9263.c -new file mode 100644 -index 0000000..5630f99 ---- /dev/null -+++ b/board/usb_a9263/usb_a9263.c -@@ -0,0 +1,285 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2006, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaiimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb_a9263.c -+ * Object : -+ * Creation : GH Jun 28th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#include "../../include/part.h" -+#include "../../include/gpio.h" -+#include "../../include/pmc.h" -+#include "../../include/debug.h" -+#include "../../include/sdramc.h" -+#include "../../include/main.h" -+#ifdef CFG_NANDFLASH -+#include "../../include/nandflash.h" -+#endif -+#ifdef CFG_DATAFLASH -+#include "../../include/dataflash.h" -+#endif -+ -+static inline unsigned int get_cp15(void) -+{ -+ unsigned int value; -+ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); -+ return value; -+} -+ -+static inline void set_cp15(unsigned int value) -+{ -+ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); -+} -+ -+ -+#ifdef CFG_HW_INIT -+/*---------------------------------------------------------------------------- */ -+/* \fn hw_init */ -+/* \brief This function performs very low level HW initialization */ -+/* This function is invoked as soon as possible during the c_startup */ -+/* The bss segment must be initialized */ -+/*---------------------------------------------------------------------------- */ -+void hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc hw_pio[] = { -+#ifdef CFG_DEBUG -+ {"RXD", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"TXD", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Disable watchdog */ -+ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); -+ -+ /* At this stage the main oscillator is supposed to be enabled -+ * PCK = MCK = MOSC */ -+ -+ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ -+ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* PCK = PLLA = 2 * MCK */ -+ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); -+ /* Switch MCK on PLLA output */ -+ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ -+ /* Configure PLLB */ -+ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure the PIO controller to output PCK0 */ -+ pio_setup(hw_pio); -+ -+ /* Configure the EBI0 Slave Slot Cycle to 64 */ -+ writel( (readl((AT91C_BASE_MATRIX + MATRIX_SCFG4)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG4)); -+ -+#ifdef CFG_DEBUG -+ /* Enable Debug messages on the DBGU */ -+ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); -+ dbg_print("Start AT91Bootstrap...\n\r"); -+#endif /* CFG_DEBUG */ -+ -+#ifdef CFG_SDRAM -+ /* Initialize the matrix */ -+ /* VDDIOMSEL = 1 -> Memories are 3.3V powered */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBI0CSA) | (1 << 16) | AT91C_EBI_CS1A_SDRAMC, AT91C_BASE_CCFG + CCFG_EBI0CSA); -+ -+ /* Configure SDRAM Controller */ -+ sdram_init( AT91C_SDRAMC_NC_9 | -+ AT91C_SDRAMC_NR_13 | -+ AT91C_SDRAMC_CAS_2 | -+ AT91C_SDRAMC_NB_4_BANKS | -+ AT91C_SDRAMC_DBW_32_BITS | -+ AT91C_SDRAMC_TWR_2 | -+ AT91C_SDRAMC_TRC_7 | -+ AT91C_SDRAMC_TRP_2 | -+ AT91C_SDRAMC_TRCD_2 | -+ AT91C_SDRAMC_TRAS_5 | -+ AT91C_SDRAMC_TXSR_8, /* Control Register */ -+ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ -+ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ -+#endif /* CFG_SDRAM */ -+} -+#endif /* CFG_HW_INIT */ -+ -+ -+#ifdef CFG_SDRAM -+//*---------------------------------------------------------------------------- -+//* \fn sdramc_hw_init -+//* \brief This function performs SDRAMC HW initialization -+//*----------------------------------------------------------------------------*/ -+void sdramc_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc sdramc_pio[] = { -+ {"D16", AT91C_PIN_PD(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D17", AT91C_PIN_PD(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D18", AT91C_PIN_PD(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D19", AT91C_PIN_PD(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D20", AT91C_PIN_PD(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D21", AT91C_PIN_PD(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D22", AT91C_PIN_PD(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D23", AT91C_PIN_PD(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D24", AT91C_PIN_PD(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D25", AT91C_PIN_PD(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D26", AT91C_PIN_PD(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D27", AT91C_PIN_PD(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D28", AT91C_PIN_PD(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D29", AT91C_PIN_PD(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D30", AT91C_PIN_PD(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D31", AT91C_PIN_PD(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the SDRAMC PIO controller */ -+ pio_setup(sdramc_pio); -+} -+#endif -+ -+#ifdef CFG_DATAFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn df_recovery */ -+/* \brief This function erases DataFlash Page 0 if USER PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+void df_recovery(AT91PS_DF pDf) -+{ -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USER PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if ( !pio_get_value(AT91C_PIN_PB(10)) ) -+ df_page_erase(pDf, 0); -+#endif -+} -+/*------------------------------------------------------------------------------*/ -+/* \fn df_hw_init */ -+/* \brief This function performs DataFlash HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void df_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc df_pio[] = { -+ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_B}, -+ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_B}, -+ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_B}, -+ {"NPCS0", AT91C_PIN_PA(5), 0, PIO_DEFAULT, PIO_PERIPH_B}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ pio_setup(df_pio); -+} -+#endif /* CFG_DATAFLASH */ -+ -+ -+#ifdef CFG_NANDFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn nand_recovery */ -+/* \brief This function erases NandFlash Block 0 if USER PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+static void nand_recovery(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc usrpb_pio[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb_pio); -+ -+ /* If USER PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if (!pio_get_value(AT91C_PIN_PB(10)) ) -+ AT91F_NandEraseBlock0(); -+} -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_hw_init */ -+/* \brief NandFlash HW init */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc nand_pio[] = { -+ {"RDY_BSY", AT91C_PIN_PA(22), 0, PIO_PULLUP, PIO_INPUT}, -+ {"NANDCS", AT91C_PIN_PD(15), 0, PIO_PULLUP, PIO_OUTPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBI0CSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBI0CSA); -+ -+ /* Configure SMC CS3 */ -+ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC0 + SMC_SETUP3); -+ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC0 + SMC_PULSE3); -+ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC0 + SMC_CYCLE3); -+ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | -+ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC0 + SMC_CTRL3); -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOA), PMC_PCER + AT91C_BASE_PMC); -+ writel((1 << AT91C_ID_PIOCDE), PMC_PCER + AT91C_BASE_PMC); -+ -+ pio_setup(nand_pio); -+ -+ nand_recovery(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_16bits_dbw_init */ -+/* \brief Configure SMC in 16 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_16bits_dbw_init(void) -+{ -+ writel(readl(AT91C_BASE_SMC0 + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC0 + SMC_CTRL3); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_8bits_dbw_init */ -+/* \brief Configure SMC in 8 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_8bits_dbw_init(void) -+{ -+ writel((readl(AT91C_BASE_SMC0 + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC0 + SMC_CTRL3); -+} -+ -+#endif /* #ifdef CFG_NANDFLASH */ -+ -+ -diff --git a/crt0_gnu.S b/crt0_gnu.S -index 042b617..002feef 100644 ---- a/crt0_gnu.S -+++ b/crt0_gnu.S -@@ -106,6 +106,13 @@ _relocate_to_sram: - #endif /* CFG_NORFLASH */ - - _setup_clocks: -+/* Test if main osc is bypassed */ -+ ldr r0,=AT91C_PMC_MOR -+ ldr r1, [r0] -+ ldr r2,=AT91C_CKGR_OSCBYPASS -+ ands r1, r1, r2 -+ bne _init_data /* branch if OSCBYPASS=1 */ -+ - /* Test if main oscillator is enabled */ - ldr r0,=AT91C_PMC_SR - ldr r1, [r0] -diff --git a/driver/dataflash.c b/driver/dataflash.c -index e28e49e..4de295a 100644 ---- a/driver/dataflash.c -+++ b/driver/dataflash.c -@@ -293,14 +293,14 @@ static int df_init (AT91PS_DF pDf) - pDf->dfDescription.pages_size = 264; - pDf->dfDescription.page_offset = 9; - break; -- -+*/ - case AT45DB021B: - pDf->dfDescription.pages_number = 1024; - pDf->dfDescription.pages_size = 264; - pDf->dfDescription.page_offset = 9; - break; - -- case AT45DB041B: -+/* case AT45DB041B: - pDf->dfDescription.pages_number = 2048; - pDf->dfDescription.pages_size = 264; - pDf->dfDescription.page_offset = 9; -@@ -373,7 +373,7 @@ int load_df(unsigned int pcs, unsigned int img_addr, unsigned int img_size, unsi - if (!df_init(pDf)) - return -1; - --#if defined(AT91SAM9260) || defined(AT91SAM9XE) || defined(AT91SAM9G20) -+#if defined(AT91SAM9260) || defined(AT91SAM9263) || defined(AT91SAM9XE) || defined(AT91SAM9G20) - /* Test if a button has been pressed or not */ - /* Erase Page 0 to avoid infinite loop */ - df_recovery(pDf); -diff --git a/include/part.h b/include/part.h -index ba5985a..a1863d0 100644 ---- a/include/part.h -+++ b/include/part.h -@@ -61,7 +61,11 @@ - - #ifdef AT91SAM9263 - #include "AT91SAM9263_inc.h" --#include "at91sam9263ek.h" -+ #ifdef at91sam9263ek -+ #include "at91sam9263ek.h" -+ #elif usb_a9263 -+ #include "usb-a9263.h" -+ #endif - #endif - - #ifdef AT91CAP9 --- -1.5.6.3 - diff --git a/buildroot/board/calao/usb-a9263/linux-3.4.4.config b/buildroot/board/calao/usb-a9263/linux-3.4.4.config deleted file mode 100644 index 8c71231f3..000000000 --- a/buildroot/board/calao/usb-a9263/linux-3.4.4.config +++ /dev/null @@ -1,102 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9263=y -CONFIG_MACH_USB_A9263=y -CONFIG_AT91_SLOW_CLOCK=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_EXT2_FS=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_XATTR=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/buildroot/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch b/buildroot/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch deleted file mode 100644 index 06a89edd6..000000000 --- a/buildroot/board/calao/usb-a9g20-lpw/at91bootstrap-1.16-usb-a9g20-lpw.patch +++ /dev/null @@ -1,610 +0,0 @@ -From 8d84757d5170969e8bdfebc7951f43c5aa2b05fd Mon Sep 17 00:00:00 2001 -From: Gregory Hermant -Date: Fri, 6 Jul 2012 16:32:47 +0200 -Subject: [PATCH] Add support for the Calao-systems USB-A9G20-LPW - - -Signed-off-by: Gregory Hermant ---- - board/usb_a9g20_lpw/nandflash/Makefile | 121 ++++++++++ - board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h | 112 +++++++++ - board/usb_a9g20_lpw/usb_a9g20_lpw.c | 303 +++++++++++++++++++++++++ - crt0_gnu.S | 7 + - include/part.h | 6 +- - 5 files changed, 548 insertions(+), 1 deletions(-) - create mode 100644 board/usb_a9g20_lpw/nandflash/Makefile - create mode 100644 board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h - create mode 100644 board/usb_a9g20_lpw/usb_a9g20_lpw.c - -diff --git a/board/usb_a9g20_lpw/nandflash/Makefile b/board/usb_a9g20_lpw/nandflash/Makefile -new file mode 100644 -index 0000000..8c9d99a ---- /dev/null -+++ b/board/usb_a9g20_lpw/nandflash/Makefile -@@ -0,0 +1,121 @@ -+# TODO: set this appropriately for your local toolchain -+ifndef ERASE_FCT -+ERASE_FCT=rm -f -+endif -+ifndef CROSS_COMPILE -+CROSS_COMPILE=arm-elf- -+endif -+ -+TOOLCHAIN=gcc -+ -+BOOTSTRAP_PATH=../../.. -+ -+# NandFlashBoot Configuration for USB-A9G20-LPW -+ -+# Target name (case sensitive!!!) -+TARGET=AT91SAM9G20 -+# Board name (case sensitive!!!) -+BOARD=usb_a9g20_lpw -+# Link Address and Top_of_Memory -+LINK_ADDR=0x200000 -+TOP_OF_MEMORY=0x301000 -+# Name of current directory -+PROJECT=nandflash -+ -+ifndef BOOT_NAME -+BOOT_NAME=$(PROJECT)_$(BOARD) -+endif -+ -+INCL=./$(BOOTSTRAP_PATH)/board/$(BOARD)/$(PROJECT) -+ -+ifeq ($(TOOLCHAIN), gcc) -+ -+AS=$(CROSS_COMPILE)gcc -+CC=$(CROSS_COMPILE)gcc -+LD=$(CROSS_COMPILE)gcc -+NM= $(CROSS_COMPILE)nm -+SIZE=$(CROSS_COMPILE)size -+OBJCOPY=$(CROSS_COMPILE)objcopy -+OBJDUMP=$(CROSS_COMPILE)objdump -+CCFLAGS=-g -mcpu=arm926ej-s -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -+ASFLAGS=-g -mcpu=arm926ej-s -c -Os -Wall -D$(TARGET) -D$(BOARD) -I$(INCL) -DTOP_OF_MEM=$(TOP_OF_MEMORY) -+ -+# Linker flags. -+# -Wl,...: tell GCC to pass this to linker. -+# -Map: create map file -+# --cref: add cross reference to map file -+LDFLAGS+=-nostartfiles -nostdlib -Wl,-Map=$(BOOT_NAME).map,--cref -+LDFLAGS+=-T $(BOOTSTRAP_PATH)/elf32-littlearm.lds -Ttext $(LINK_ADDR) -+OBJS=crt0_gnu.o -+ -+endif -+ -+OBJS+=\ -+ $(BOARD).o \ -+ main.o \ -+ gpio.o \ -+ pmc.o \ -+ debug.o \ -+ sdramc.o \ -+ nandflash.o \ -+ _udivsi3.o \ -+ _umodsi3.o \ -+ div0.o \ -+ udiv.o \ -+ string.o -+ -+rebuild: clean all -+ -+all: $(BOOT_NAME) -+ -+ifeq ($(TOOLCHAIN), gcc) -+$(BOOT_NAME): $(OBJS) -+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS) -+ $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin -+endif -+ -+ -+$(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c -o $(BOARD).o -+ -+main.o: $(BOOTSTRAP_PATH)/main.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/main.c -o main.o -+ -+gpio.o: $(BOOTSTRAP_PATH)/driver/gpio.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/gpio.c -o gpio.o -+ -+pmc.o: $(BOOTSTRAP_PATH)/driver/pmc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/pmc.c -o pmc.o -+ -+debug.o: $(BOOTSTRAP_PATH)/driver/debug.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/debug.c -o debug.o -+ -+sdramc.o: $(BOOTSTRAP_PATH)/driver/sdramc.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/sdramc.c -o sdramc.o -+ -+dataflash.o: $(BOOTSTRAP_PATH)/driver/dataflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/dataflash.c -o dataflash.o -+ -+nandflash.o: $(BOOTSTRAP_PATH)/driver/nandflash.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/driver/nandflash.c -o nandflash.o -+ -+crt0_gnu.o: $(BOOTSTRAP_PATH)/crt0_gnu.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/crt0_gnu.S -o crt0_gnu.o -+ -+div0.o: $(BOOTSTRAP_PATH)/lib/div0.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/div0.c -o div0.o -+ -+string.o: $(BOOTSTRAP_PATH)/lib/string.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/string.c -o string.o -+ -+udiv.o: $(BOOTSTRAP_PATH)/lib/udiv.c -+ $(CC) -c $(CCFLAGS) $(BOOTSTRAP_PATH)/lib/udiv.c -o udiv.o -+ -+_udivsi3.o: $(BOOTSTRAP_PATH)/lib/_udivsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_udivsi3.S -o _udivsi3.o -+ -+_umodsi3.o: $(BOOTSTRAP_PATH)/lib/_umodsi3.S -+ $(AS) $(ASFLAGS) $(BOOTSTRAP_PATH)/lib/_umodsi3.S -o _umodsi3.o -+ -+clean: -+ $(ERASE_FCT) *.o *.bin *.elf *.map -diff --git a/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h b/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h -new file mode 100644 -index 0000000..c0bdc6e ---- /dev/null -+++ b/board/usb_a9g20_lpw/nandflash/usb-a9g20-lpw.h -@@ -0,0 +1,112 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2008, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb-a9g20-lpw.h -+ * Object : -+ * Creation : GH July 6th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#ifndef _USB_A9G20_LPW_H -+#define _USB_A9G20_LPW_H -+ -+/* ******************************************************************* */ -+/* PMC Settings */ -+/* */ -+/* The main oscillator is enabled as soon as possible in the c_startup */ -+/* and MCK is switched on the main oscillator. */ -+/* PLL initialization is done later in the hw_init() function */ -+/* ******************************************************************* */ -+#define MASTER_CLOCK (133000000) -+#define PLL_LOCK_TIMEOUT 1000000 -+ -+/* Set PLLA to 798Mhz */ -+#define PLLA_SETTINGS 0x20843F02 -+#define PLLB_SETTINGS 0x100F3F02 -+ -+/* Switch MCK on PLLA output PCK = PLLA/2 = 3 * MCK */ -+#define MCKR_SETTINGS 0x1300 -+#define MCKR_CSS_SETTINGS (AT91C_PMC_CSS_PLLA_CLK | MCKR_SETTINGS) -+ -+/* ******************************************************************* */ -+/* NandFlash Settings */ -+/* */ -+/* ******************************************************************* */ -+#define AT91C_SMARTMEDIA_BASE 0x40000000 -+ -+#define AT91_SMART_MEDIA_ALE (1 << 21) /* our ALE is AD21 */ -+#define AT91_SMART_MEDIA_CLE (1 << 22) /* our CLE is AD22 */ -+ -+#define NAND_DISABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_SODR = AT91C_PIO_PC14;} while(0) -+#define NAND_ENABLE_CE() do { *(volatile unsigned int *)AT91C_PIOC_CODR = AT91C_PIO_PC14;} while(0) -+ -+#define NAND_WAIT_READY() while (!(*(volatile unsigned int *)AT91C_PIOC_PDSR & AT91C_PIO_PC13)) -+ -+ -+/* ******************************************************************** */ -+/* SMC Chip Select 3 Timings for NandFlash for MASTER_CLOCK = 133000000.*/ -+/* Please refer to SMC section in AT91SAM9 datasheet to learn how */ -+/* to generate these values. */ -+/* ******************************************************************** */ -+#define AT91C_SM_NWE_SETUP (2 << 0) -+#define AT91C_SM_NCS_WR_SETUP (0 << 8) -+#define AT91C_SM_NRD_SETUP (2 << 16) -+#define AT91C_SM_NCS_RD_SETUP (0 << 24) -+ -+#define AT91C_SM_NWE_PULSE (4 << 0) -+#define AT91C_SM_NCS_WR_PULSE (4 << 8) -+#define AT91C_SM_NRD_PULSE (4 << 16) -+#define AT91C_SM_NCS_RD_PULSE (4 << 24) -+ -+#define AT91C_SM_NWE_CYCLE (7 << 0) -+#define AT91C_SM_NRD_CYCLE (7 << 16) -+ -+#define AT91C_SM_TDF (3 << 16) -+ -+/* ******************************************************************* */ -+/* BootStrap Settings */ -+/* */ -+/* ******************************************************************* */ -+#define IMG_ADDRESS 0x20000 /* Image Address in NandFlash */ -+#define IMG_SIZE 0x40000 /* Image Size in NandFlash */ -+ -+#define MACH_TYPE 0x731 /* USB-A9G20 */ -+#define JUMP_ADDR 0x23F00000 /* Final Jump Address */ -+ -+/* ******************************************************************* */ -+/* Application Settings */ -+/* ******************************************************************* */ -+#undef CFG_DEBUG -+#undef CFG_DATAFLASH -+ -+#define CFG_NANDFLASH -+#undef NANDFLASH_SMALL_BLOCKS /* NANDFLASH_LARGE_BLOCKS used instead */ -+#undef CFG_NANDFLASH_RECOVERY -+ -+#define CFG_SDRAM -+#define CFG_HW_INIT -+ -+#endif /* _USB_A9G20_LPW_H */ -diff --git a/board/usb_a9g20_lpw/usb_a9g20_lpw.c b/board/usb_a9g20_lpw/usb_a9g20_lpw.c -new file mode 100644 -index 0000000..c372307 ---- /dev/null -+++ b/board/usb_a9g20_lpw/usb_a9g20_lpw.c -@@ -0,0 +1,303 @@ -+/* ---------------------------------------------------------------------------- -+ * ATMEL Microcontroller Software Support - ROUSSET - -+ * ---------------------------------------------------------------------------- -+ * Copyright (c) 2008, Atmel Corporation -+ -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions are met: -+ * -+ * - Redistributions of source code must retain the above copyright notice, -+ * this list of conditions and the disclaimer below. -+ * -+ * Atmel's name may not be used to endorse or promote products derived from -+ * this software without specific prior written permission. -+ * -+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR -+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE -+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, -+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * ---------------------------------------------------------------------------- -+ * File Name : usb_a9g20_lpw.c -+ * Object : -+ * Creation : GH July 6th 2012 -+ *----------------------------------------------------------------------------- -+ */ -+#include "../../include/part.h" -+#include "../../include/gpio.h" -+#include "../../include/pmc.h" -+#include "../../include/debug.h" -+#include "../../include/sdramc.h" -+#include "../../include/main.h" -+#ifdef CFG_NANDFLASH -+#include "../../include/nandflash.h" -+#endif -+#ifdef CFG_DATAFLASH -+#include "../../include/dataflash.h" -+#endif -+ -+static inline unsigned int get_cp15(void) -+{ -+ unsigned int value; -+ __asm__("mrc p15, 0, %0, c1, c0, 0" : "=r" (value)); -+ return value; -+} -+ -+static inline void set_cp15(unsigned int value) -+{ -+ __asm__("mcr p15, 0, %0, c1, c0, 0" : : "r" (value)); -+} -+ -+#ifdef CFG_HW_INIT -+/*----------------------------------------------------------------------------*/ -+/* \fn hw_init */ -+/* \brief This function performs very low level HW initialization */ -+/* This function is invoked as soon as possible during the c_startup */ -+/* The bss segment must be initialized */ -+/*----------------------------------------------------------------------------*/ -+void hw_init(void) -+{ -+ unsigned int cp15; -+ -+ /* Configure PIOs */ -+ const struct pio_desc hw_pio[] = { -+#ifdef CFG_DEBUG -+ {"RXD", AT91C_PIN_PB(14), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"TXD", AT91C_PIN_PB(15), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Disable watchdog */ -+ writel(AT91C_WDTC_WDDIS, AT91C_BASE_WDTC + WDTC_WDMR); -+ -+ /* At this stage the main oscillator is supposed to be enabled -+ * PCK = MCK = MOSC */ -+ writel(0x00, AT91C_BASE_PMC + PMC_PLLICPR); -+ -+ /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */ -+ pmc_cfg_plla(PLLA_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* PCK = PLLA/2 = 3 * MCK */ -+ pmc_cfg_mck(MCKR_SETTINGS, PLL_LOCK_TIMEOUT); -+ /* Switch MCK on PLLA output */ -+ pmc_cfg_mck(MCKR_CSS_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure PLLB */ -+ pmc_cfg_pllb(PLLB_SETTINGS, PLL_LOCK_TIMEOUT); -+ -+ /* Configure CP15 */ -+ cp15 = get_cp15(); -+ cp15 |= I_CACHE; -+ set_cp15(cp15); -+ -+ /* Configure the PIO controller */ -+ pio_setup(hw_pio); -+ -+ /* Configure the EBI Slave Slot Cycle to 64 */ -+ writel((readl((AT91C_BASE_MATRIX + MATRIX_SCFG3)) & ~0xFF) | 0x40, (AT91C_BASE_MATRIX + MATRIX_SCFG3)); -+ -+#ifdef CFG_DEBUG -+ /* Enable Debug messages on the DBGU */ -+ dbg_init(BAUDRATE(MASTER_CLOCK, 115200)); -+ -+ dbg_print("Start AT91Bootstrap...\n\r"); -+#endif /* CFG_DEBUG */ -+ -+#ifdef CFG_SDRAM -+ /* Initialize the matrix (VDDIOSEL=0: memory voltage = 1.8V ) */ -+ writel((readl(AT91C_BASE_CCFG + CCFG_EBICSA) & ~0x00010000) | AT91C_EBI_CS1A_SDRAMC , AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SDRAM Controller */ -+ sdram_init( AT91C_SDRAMC_NC_9 | -+ AT91C_SDRAMC_NR_13 | -+ AT91C_SDRAMC_CAS_3 | -+ AT91C_SDRAMC_NB_4_BANKS | -+ AT91C_SDRAMC_DBW_32_BITS | -+ AT91C_SDRAMC_TWR_3 | -+ AT91C_SDRAMC_TRC_9 | -+ AT91C_SDRAMC_TRP_3 | -+ AT91C_SDRAMC_TRCD_3 | -+ AT91C_SDRAMC_TRAS_6 | -+ AT91C_SDRAMC_TXSR_10, /* Control Register */ -+ (MASTER_CLOCK * 7)/1000000, /* Refresh Timer Register */ -+ AT91C_SDRAMC_MD_SDRAM); /* SDRAM (no low power) */ -+ -+#endif /* CFG_SDRAM */ -+} -+#endif /* CFG_HW_INIT */ -+ -+#ifdef CFG_SDRAM -+/*------------------------------------------------------------------------------*/ -+/* \fn sdramc_hw_init */ -+/* \brief This function performs SDRAMC HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void sdramc_hw_init(void) -+{ -+ /* Configure PIOs */ -+/* const struct pio_desc sdramc_pio[] = { -+ {"D16", AT91C_PIN_PC(16), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D17", AT91C_PIN_PC(17), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D18", AT91C_PIN_PC(18), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D19", AT91C_PIN_PC(19), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D20", AT91C_PIN_PC(20), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D21", AT91C_PIN_PC(21), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D22", AT91C_PIN_PC(22), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D23", AT91C_PIN_PC(23), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D24", AT91C_PIN_PC(24), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D25", AT91C_PIN_PC(25), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D26", AT91C_PIN_PC(26), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D27", AT91C_PIN_PC(27), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D28", AT91C_PIN_PC(28), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D29", AT91C_PIN_PC(29), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D30", AT91C_PIN_PC(30), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"D31", AT91C_PIN_PC(31), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+*/ -+ /* Configure the SDRAMC PIO controller to output PCK0 */ -+/* pio_setup(sdramc_pio); */ -+ -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_ASR(0)); -+ writel(0xFFFF0000, AT91C_BASE_PIOC + PIO_PDR(0)); -+ -+} -+#endif /* CFG_SDRAM */ -+ -+#ifdef CFG_DATAFLASH -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_recovery */ -+/* \brief This function erases DataFlash Page 0 if USR PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+void df_recovery(AT91PS_DF pDf) -+{ -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS1_DATAFLASH) -+ /* Configure PIOs */ -+ const struct pio_desc usrpb[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb); -+ -+ /* If USR PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if ( !pio_get_value(AT91C_PIN_PB(10)) ) -+ df_page_erase(pDf, 0); -+#endif -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn df_hw_init */ -+/* \brief This function performs DataFlash HW initialization */ -+/*------------------------------------------------------------------------------*/ -+void df_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc df_pio[] = { -+ {"MISO", AT91C_PIN_PA(0), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"MOSI", AT91C_PIN_PA(1), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ {"SPCK", AT91C_PIN_PA(2), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS0_DATAFLASH) -+ {"NPCS0", AT91C_PIN_PA(3), 0, PIO_DEFAULT, PIO_PERIPH_A}, -+#endif -+#if (AT91C_SPI_PCS_DATAFLASH == AT91C_SPI_PCS1_DATAFLASH) -+ {"NPCS1", AT91C_PIN_PC(11), 0, PIO_DEFAULT, PIO_PERIPH_B}, -+#endif -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ pio_setup(df_pio); -+} -+#endif /* CFG_DATAFLASH */ -+ -+ -+ -+#ifdef CFG_NANDFLASH -+/*------------------------------------------------------------------------------*/ -+/* \fn nand_recovery */ -+/* \brief This function erases NandFlash Block 0 if USER PB is pressed */ -+/* during boot sequence */ -+/*------------------------------------------------------------------------------*/ -+#ifdef CFG_NANDFLASH_RECOVERY -+static void nand_recovery(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc usrpb[] = { -+ {"USRPB", AT91C_PIN_PB(10), 0, PIO_PULLUP, PIO_INPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOB), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(usrpb); -+ -+ /* If USER PB is pressed during Boot sequence */ -+ /* Erase NandFlash block 0*/ -+ if (!pio_get_value(AT91C_PIN_PB(10)) ) -+ AT91F_NandEraseBlock0(); -+} -+#else -+static void nand_recovery(void) {} -+#endif -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_hw_init */ -+/* \brief NandFlash HW init */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_hw_init(void) -+{ -+ /* Configure PIOs */ -+ const struct pio_desc nand_pio[] = { -+ {"RDY_BSY", AT91C_PIN_PC(13), 0, PIO_PULLUP, PIO_INPUT}, -+ {"NANDCS", AT91C_PIN_PC(14), 0, PIO_PULLUP, PIO_OUTPUT}, -+ {(char *) 0, 0, 0, PIO_DEFAULT, PIO_PERIPH_A}, -+ }; -+ -+ /* Setup Smart Media, first enable the address range of CS3 in HMATRIX user interface */ -+ writel(readl(AT91C_BASE_CCFG + CCFG_EBICSA) | AT91C_EBI_CS3A_SM, AT91C_BASE_CCFG + CCFG_EBICSA); -+ -+ /* Configure SMC CS3 */ -+ writel((AT91C_SM_NWE_SETUP | AT91C_SM_NCS_WR_SETUP | AT91C_SM_NRD_SETUP | AT91C_SM_NCS_RD_SETUP), AT91C_BASE_SMC + SMC_SETUP3); -+ writel((AT91C_SM_NWE_PULSE | AT91C_SM_NCS_WR_PULSE | AT91C_SM_NRD_PULSE | AT91C_SM_NCS_RD_PULSE), AT91C_BASE_SMC + SMC_PULSE3); -+ writel((AT91C_SM_NWE_CYCLE | AT91C_SM_NRD_CYCLE) , AT91C_BASE_SMC + SMC_CYCLE3); -+ writel((AT91C_SMC_READMODE | AT91C_SMC_WRITEMODE | AT91C_SMC_NWAITM_NWAIT_DISABLE | -+ AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS | AT91C_SM_TDF) , AT91C_BASE_SMC + SMC_CTRL3); -+ -+ /* Configure the PIO controller */ -+ writel((1 << AT91C_ID_PIOC), PMC_PCER + AT91C_BASE_PMC); -+ pio_setup(nand_pio); -+ -+ nand_recovery(); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_16bits_dbw_init */ -+/* \brief Configure SMC in 16 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_16bits_dbw_init(void) -+{ -+ writel(readl(AT91C_BASE_SMC + SMC_CTRL3) | AT91C_SMC_DBW_WIDTH_SIXTEEN_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+/*------------------------------------------------------------------------------*/ -+/* \fn nandflash_cfg_8bits_dbw_init */ -+/* \brief Configure SMC in 8 bits mode */ -+/*------------------------------------------------------------------------------*/ -+void nandflash_cfg_8bits_dbw_init(void) -+{ -+ writel((readl(AT91C_BASE_SMC + SMC_CTRL3) & ~(AT91C_SMC_DBW)) | AT91C_SMC_DBW_WIDTH_EIGTH_BITS, AT91C_BASE_SMC + SMC_CTRL3); -+} -+ -+#endif /* #ifdef CFG_NANDFLASH */ -diff --git a/crt0_gnu.S b/crt0_gnu.S -index 042b617..002feef 100644 ---- a/crt0_gnu.S -+++ b/crt0_gnu.S -@@ -106,6 +106,13 @@ _relocate_to_sram: - #endif /* CFG_NORFLASH */ - - _setup_clocks: -+/* Test if main osc is bypassed */ -+ ldr r0,=AT91C_PMC_MOR -+ ldr r1, [r0] -+ ldr r2,=AT91C_CKGR_OSCBYPASS -+ ands r1, r1, r2 -+ bne _init_data /* branch if OSCBYPASS=1 */ -+ - /* Test if main oscillator is enabled */ - ldr r0,=AT91C_PMC_SR - ldr r1, [r0] -diff --git a/include/part.h b/include/part.h -index ba5985a..1d7392a 100644 ---- a/include/part.h -+++ b/include/part.h -@@ -46,7 +46,11 @@ - - #ifdef AT91SAM9G20 - #include "AT91SAM9260_inc.h" --#include "at91sam9g20ek.h" -+ #ifdef at91sam9g20ek -+ #include "at91sam9g20ek.h" -+ #elif usb_a9g20_lpw -+ #include "usb-a9g20-lpw.h" -+ #endif - #endif - - #ifdef AT91SAM9261 --- -1.5.6.3 - diff --git a/buildroot/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch b/buildroot/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch deleted file mode 100644 index cea8bb8c0..000000000 --- a/buildroot/board/calao/usb-a9g20-lpw/barebox-2012.07.0-usb-a9g20-lpw.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig -index 30bf380..7716e0e 100644 ---- a/arch/arm/configs/usb_a9g20_defconfig -+++ b/arch/arm/configs/usb_a9g20_defconfig -@@ -15,6 +15,7 @@ CONFIG_HUSH_FANCY_PROMPT=y - CONFIG_CMDLINE_EDITING=y - CONFIG_AUTO_COMPLETE=y - CONFIG_MENU=y -+# CONFIG_ERRNO_MESSAGES is not set - # CONFIG_CONSOLE_ACTIVATE_FIRST is not set - CONFIG_CONSOLE_ACTIVATE_ALL=y - CONFIG_PARTITION=y diff --git a/buildroot/board/calao/usb-a9g20-lpw/linux-3.4.4.config b/buildroot/board/calao/usb-a9g20-lpw/linux-3.4.4.config deleted file mode 100644 index 56eb04bd7..000000000 --- a/buildroot/board/calao/usb-a9g20-lpw/linux-3.4.4.config +++ /dev/null @@ -1,105 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91SAM9G20=y -CONFIG_MACH_USB_A9G20=y -CONFIG_AT91_SLOW_CLOCK=y -# CONFIG_ARM_THUMB is not set -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200" -CONFIG_FPE_NWFPE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -# CONFIG_HWMON is not set -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_MON=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_RV3029C2=y -CONFIG_EXT2_FS=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_XATTR=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y diff --git a/buildroot/board/chromebook/snow/kernel.args b/buildroot/board/chromebook/snow/kernel.args new file mode 100644 index 000000000..1220bf84a --- /dev/null +++ b/buildroot/board/chromebook/snow/kernel.args @@ -0,0 +1 @@ +console=tty1 clk_ignore_unused root=/dev/mmcblk1p2 rootfstype=ext4 ro diff --git a/buildroot/board/chromebook/snow/kernel.its b/buildroot/board/chromebook/snow/kernel.its new file mode 100644 index 000000000..c8766ef9e --- /dev/null +++ b/buildroot/board/chromebook/snow/kernel.its @@ -0,0 +1,37 @@ +/dts-v1/; + +/ { + description = "Buildroot kernel for Chromebook Snow"; + images { + kernel@1 { + description = "kernel"; + data = /incbin/("zImage"); + type = "kernel_noload"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0>; + entry = <0>; + hash@1 { + algo = "sha1"; + }; + }; + fdt@1{ + description = "exynos5250-snow.dtb"; + data = /incbin/("exynos5250-snow.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + hash@1 { + algo = "sha1"; + }; + }; + }; + configurations { + default = "conf@1"; + conf@1{ + kernel = "kernel@1"; + fdt = "fdt@1"; + }; + }; +}; diff --git a/buildroot/board/chromebook/snow/linux-4.15-dts-tpm.patch b/buildroot/board/chromebook/snow/linux-4.15-dts-tpm.patch new file mode 100644 index 000000000..c71ff1b58 --- /dev/null +++ b/buildroot/board/chromebook/snow/linux-4.15-dts-tpm.patch @@ -0,0 +1,27 @@ +Some versions of u-boot for this Chromebook check for tpm node +in the device tree and fail badly (reboot) if it is not found. + +While not exactly correct, it is much easier to patch the mainline +device tree to match u-boot expectations than to fix u-boot on +this device. + +See https://code.google.com/p/chromium/issues/detail?id=220169 +and https://lkml.org/lkml/2013/3/4/242 + +Signed-off-by: Alex Suykov + +--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi ++++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi +@@ -466,6 +466,11 @@ + status = "okay"; + samsung,i2c-sda-delay = <100>; + samsung,i2c-max-bus-freq = <66000>; ++ ++ tpm { ++ compatible = "infineon,slb9635tt"; ++ reg = <0x20>; ++ }; + }; + + &i2c_5 { + diff --git a/buildroot/board/chromebook/snow/linux-4.15.fragment b/buildroot/board/chromebook/snow/linux-4.15.fragment new file mode 100644 index 000000000..e2786dacb --- /dev/null +++ b/buildroot/board/chromebook/snow/linux-4.15.fragment @@ -0,0 +1,2 @@ +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m diff --git a/buildroot/board/chromebook/snow/mksd.sh b/buildroot/board/chromebook/snow/mksd.sh new file mode 100755 index 000000000..cba1578ec --- /dev/null +++ b/buildroot/board/chromebook/snow/mksd.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +# This scripts makes a minimal bootable SD card image for the Chromebook. +# The resulting file is called bootsd.img. It should be written directly +# to the card: +# +# SD=/dev/mmcblk1 # check your device name! +# dd if=output/images/bootsd.img of=$SD +# +# The partitions are created just large enough to hold the kernel and +# the rootfs image. Most of the card will be empty, and the secondary +# GPT will not be in its proper location. + +# cgpt does not create protective MBR, and the kernel refuses to read +# GPT unless there's some kind of MBR in sector 0. So we need parted +# to write that single sector before doing anything with the GPT. +cgpt=$HOST_DIR/bin/cgpt +parted=$HOST_DIR/sbin/parted +kernel=$BINARIES_DIR/uImage.kpart +rootfs=$BINARIES_DIR/rootfs.ext2 + +run() { echo "$@"; "$@"; } +die() { echo "$@" >&2; exit 1; } +test -f $kernel || die "No kernel image found" +test -f $rootfs || die "No rootfs image found" +test -x $cgpt || die "cgpt not found (host-vboot-utils have not been built?)" + +# True file sizes in bytes +kernelsize=`stat -t $kernel | cut -d\ -f2` +rootfssize=`stat -t $rootfs | cut -d\ -f2` + +# The card is partitioned in sectors of 8KB. +# 4 sectors are reserved for MBR+GPT. Their actual size turns out +# to be 33 512-blocks which is just over 2 sectors, but we align +# it to a nice round number. +sec=8192 +kernelsec=$(((kernelsize+8191)>>13)) +rootfssec=$(((rootfssize+8191)>>13)) +headersec=4 + +# There is also a copy of MBR+GPT at the end of the image. +# It's going to be useless but both tools assume it's there. +imagesec=$((2*headersec+kernelsec+rootfssec)) +bootsd="$BINARIES_DIR/bootsd.img" +run dd bs=$sec count=$imagesec if=/dev/zero of=$bootsd + +# cgpt needs offsets and sizes in 512-blocks. +block=512 +kernelstart=$((headersec<<4)) +kernelblocks=$((kernelsec<<4)) +rootfsblocks=$((rootfssec<<4)) +rootfsstart=$((kernelstart+kernelblocks)) + +# This command initializes both GPT and MBR +run $parted -s $bootsd mklabel gpt + +# The kernel partition must be marked as bootable, that's why -S -T -P +run $cgpt add -i 1 -b $kernelstart -s $kernelblocks \ + -t kernel -l kernel \ + -S 1 -T 1 -P 10 $bootsd + +# It does not really matter where the rootfs partition is located as long +# as the kernel can find it. +# However, if anything is changed here, kernel.args must be updated as well. +run $cgpt add -i 2 -b $rootfsstart -s $rootfsblocks \ + -t data -l rootfs $bootsd + +run dd bs=$block if=$kernel of=$bootsd seek=$kernelstart +run dd bs=$block if=$rootfs of=$bootsd seek=$rootfsstart diff --git a/buildroot/board/chromebook/snow/readme.txt b/buildroot/board/chromebook/snow/readme.txt new file mode 100644 index 000000000..1afd94982 --- /dev/null +++ b/buildroot/board/chromebook/snow/readme.txt @@ -0,0 +1,137 @@ +Samsung XE303C12 aka Chromebook Snow +==================================== + +This file describes booting the Chromebook from an SD card containing +Buildroot kernel and rootfs, using the original bootloader. This is +the least invasive way to get Buildroot onto the devices and a good +starting point. + +The bootloader will only boot a kernel from a GPT partition marked +bootable with cgpt tool from vboot-utils package. +The kernel image must be signed using futility from the same package. +The signing part is done by sign.sh script in this directory. + +It does not really matter where rootfs is as long as the kernel is able +to find it, but this particular configuration assumes the kernel is on +partition 1 and rootfs is on partition 2 of the SD card. +Make sure to check kernel.args if you change this. + +Making the boot media +--------------------- +Start by configuring and building the images. + + make chromebook_snow_defconfig + make menuconfig # if necessary + make + +The important files are: + + uImage.kpart (kernel and device tree, signed) + rootfs.tar + bootsd.img (SD card image containing both kernel and rootfs) + +Write the image directly to some SD card. +WARNING: make sure there is nothing important on that card, +and double-check the device name! + + SD=/dev/mmcblk1 # may be /dev/sdX on some hosts + dd if=output/images/bootsd.img of=$SD + +Switching to developer mode and booting from SD +----------------------------------------------- +Power Chromebook down, then power it up while holding Esc+F3. +BEWARE: switching to developer mode deletes all user data. +Create backups if you need them. + +While in developer mode, Chromebook will boot into a white screen saying +"OS verification is off". + +Press Ctrl-D at this screen to boot Chromium OS from eMMC. +Press Ctrl-U at this screen to boot from SD (or USB) +Press Power to power it off. +Do NOT press Space unless you mean it. +This will switch it back to normal mode. + +The is no way to get rid of the white screen without re-flashing the bootloader. + +Troubleshooting +--------------- +Loud *BEEP* after pressing Ctrl-U means there's no valid partition to boot from. +Which in turn means either bad GPT or improperly signed kernel. + +Return to the OS verification screen without any sounds means the code managed +to reboot the board. May indicate properly signed but invalid image. + +Blank screen means the image is valid and properly signed but cannot boot +for some reason, like missing or incorrect DT. + +In case the board becomes unresponsive: + +* Press Esc+F3+Power. The board should reboot instantly. + Remove SD card to prevent it from attempting a system recovery. + +* Hold Power button for around 10s. The board should shut down into + its soft-off mode. Press Power button again or open the lid to turn in on. + +* If that does not work, disconnect the charger and push a hidden + button on the underside with a pin of some sort. The board should shut + down completely. Opening the lid and pressing Power button will not work. + To turn it back on, connect the charger. + +Partitioning SD card manually +----------------------------- +Check mksd.sh for partitioning commands. + +Use parted and cgpt on a real device, and calculate the partition +sizes properly. The kernel partition may be as small as 4MB, but +you will probably want the rootfs to occupy the whole remaining space. + +cgpt may be used to check current layout: + + output/host/bin/cgpt show $SD + +All sizes and all offsets are in 512-byte blocks. + +Writing kernel and rootfs to a partitioned SD card +-------------------------------------------------- +Write .kpart directly to the bootable partition: + + dd if=output/images/uImage.kpart of=${SD}1 + +Make a new filesystem on the rootfs partition, and unpack rootfs.tar there: + + mkfs.ext4 ${SD}2 + mount ${SD2} /mnt/ + tar -xvf output/images/rootfs.tar -C /mnt/ + umount /mnt/ + +This will require root permissions even if you can write to $SD. + +Kernel command line +------------------- +The command line is taken from board/chromebook/snow/kernel.args and stored +in the vboot header (which also holds the signature). + +The original bootloader prepends "cros_secure console= " to the supplied +command line. The only way to suppress this is to enable CMDLINE_FORCE +in the kernel config, disabling external command line completely. + +That's not necessary however. The mainline kernel ignores cros_secure, +and supplying console=tty1 in kernel.args undoes the effect of console= + +Booting with console= suppresses all kernel output. +As a side effect, it makes /dev/console unusable, which the init in use must +be able to handle. + +WiFi card +--------- +Run modprobe mwifiex_sdio to load the driver. +The name of the device should be mlan0. + +Further reading +--------------- +https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-arm-chromebook +http://linux-exynos.org/wiki/Samsung_Chromebook_XE303C12/Installing_Linux +http://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook +http://www.de7ec7ed.com/2013/05/application-processor-ap-uart-samsung.html +http://www.de7ec7ed.com/2013/05/embedded-controller-ec-uart-samsung.html diff --git a/buildroot/board/chromebook/snow/sign.sh b/buildroot/board/chromebook/snow/sign.sh new file mode 100755 index 000000000..e8f111ff0 --- /dev/null +++ b/buildroot/board/chromebook/snow/sign.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# This script creates u-boot FIT image containing the kernel and the DT, +# then signs it using futility from vboot-utils. +# The resulting file is called uImage.kpart. + +BOARD_DIR=$(dirname $0) +mkimage=$HOST_DIR/bin/mkimage +futility=$HOST_DIR/bin/futility +devkeys=$HOST_DIR/share/vboot/devkeys + +run() { echo "$@"; "$@"; } +die() { echo "$@" >&2; exit 1; } +test -f $BINARIES_DIR/zImage || \ + die "No kernel image found" +test -x $mkimage || \ + die "No mkimage found (host-uboot-tools has not been built?)" +test -x $futility || \ + die "No futility found (host-vboot-utils has not been built?)" + +# kernel.its references zImage and exynos5250-snow.dtb, and all three +# files must be in current directory for mkimage. +run cp $BOARD_DIR/kernel.its $BINARIES_DIR/kernel.its || exit 1 +echo "# entering $BINARIES_DIR for the next command" +(cd $BINARIES_DIR && run $mkimage -f kernel.its uImage.itb) || exit 1 + +# futility requires non-empty file to be supplied with --bootloader +# even if it does not make sense for the target platform. +echo > $BINARIES_DIR/dummy.txt + +run $futility vbutil_kernel \ + --keyblock $devkeys/kernel.keyblock \ + --signprivate $devkeys/kernel_data_key.vbprivk \ + --arch arm \ + --version 1 \ + --config $BOARD_DIR/kernel.args \ + --vmlinuz $BINARIES_DIR/uImage.itb \ + --bootloader $BINARIES_DIR/dummy.txt \ + --pack $BINARIES_DIR/uImage.kpart || exit 1 + +rm -f $BINARIES_DIR/kernel.its $BINARIES_DIR/dummy.txt diff --git a/buildroot/board/ci20/genimage.cfg b/buildroot/board/ci20/genimage.cfg new file mode 100644 index 000000000..5f8a16c61 --- /dev/null +++ b/buildroot/board/ci20/genimage.cfg @@ -0,0 +1,28 @@ +image sdcard.img { + hdimage { + } + + partition uboot-spl { + in-partition-table = "no" + image = "u-boot-spl.bin" + offset = 512 + } + + partition uboot { + in-partition-table = "no" + image = "u-boot.img" + offset = 14k + } + + partition uboot-env { + in-partition-table = "no" + image = "uboot-env.bin" + offset = 526k + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 2M + } +} diff --git a/buildroot/board/ci20/patches/uboot/0001-mips-Remove-default-endiannes.patch b/buildroot/board/ci20/patches/uboot/0001-mips-Remove-default-endiannes.patch new file mode 100644 index 000000000..a6191804f --- /dev/null +++ b/buildroot/board/ci20/patches/uboot/0001-mips-Remove-default-endiannes.patch @@ -0,0 +1,66 @@ +From b3a1e97498e7987073775d49a703932c20f2df1d Mon Sep 17 00:00:00 2001 +From: Ezequiel Garcia +Date: Mon, 12 Nov 2018 14:04:46 -0300 +Subject: [PATCH] mips: Remove default endiannes + +Currently, trying to build ci20_mmc fails on little-endian +toolchains. The problem seems to be that some targets don't +have CONFIG_SYS_LITTLE_ENDIAN properly set, and therefore +the default -EB switch is selected. + +Let's get rid of the default switch entirely, and fix this problem. +While this may be a hack, it is a quick solution until +U-Boot gets CI20 proper support. + +make ARCH=mips CROSS_COMPILE=mips-linux-gnu- ci20_mmc +Configuring for ci20_mmc - Board: ci20, Options: SPL_MMC_SUPPORT,ENV_IS_IN_MMC +make +make[1]: Entering directory '/home/zeta/repos/u-boot-ci20' +Generating include/autoconf.mk +Generating include/autoconf.mk.dep +mips-linux-gnu-gcc: error: may not use both -EB and -EL +mips-linux-gnu-gcc: error: may not use both -EB and -EL +Generating include/spl-autoconf.mk +mips-linux-gnu-gcc: error: may not use both -EB and -EL +Generating include/tpl-autoconf.mk +mips-linux-gnu-gcc: error: may not use both -EB and -EL +mips-linux-gnu-gcc -DDO_DEPS_ONLY \ + -g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes \ + -o lib/asm-offsets.s lib/asm-offsets.c -c -S +if [ -f arch/mips/cpu/xburst/jz4780/asm-offsets.c ];then \ + mips-linux-gnu-gcc -DDO_DEPS_ONLY \ + -g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes \ + -o arch/mips/cpu/xburst/jz4780/asm-offsets.s arch/mips/cpu/xburst/jz4780/asm-offsets.c -c -S; \ +else \ + touch arch/mips/cpu/xburst/jz4780/asm-offsets.s; \ +fi +mips-linux-gnu-gcc: error: may not use both -EB and -EL +make[1]: *** [Makefile:747: lib/asm-offsets.s] Error 1 +make[1]: *** Waiting for unfinished jobs.... +make[1]: Leaving directory '/home/zeta/repos/u-boot-ci20' +make: *** [.boards.depend:463: ci20_mmc] Error 2 + +Signed-off-by: Ezequiel Garcia +--- +https://github.com/MIPS/CI20_u-boot/pull/19 + + arch/mips/config.mk | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/arch/mips/config.mk b/arch/mips/config.mk +index c89279025507..43560abbc0e1 100644 +--- a/arch/mips/config.mk ++++ b/arch/mips/config.mk +@@ -20,9 +20,6 @@ ifdef CONFIG_SYS_BIG_ENDIAN + ENDIANNESS := -EB + endif + +-# Default to EB if no endianess is configured +-ENDIANNESS ?= -EB +- + PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ + + # +-- +2.19.1 + diff --git a/buildroot/board/ci20/readme.txt b/buildroot/board/ci20/readme.txt index ca7bb5291..71d507069 100644 --- a/buildroot/board/ci20/readme.txt +++ b/buildroot/board/ci20/readme.txt @@ -2,41 +2,45 @@ * MIPS Creator CI20 * ********************* +Introduction +============ + The 'ci20_defconfig' will create a root filesystem and a kernel image under the 'output/images/' directory. This document will try to explain how to use them in order to run Buildroot in the MIPS Creator CI20 board. -Assuming you are at the U-Boot prompt of the MIPS Creator CI20, you have to -load the generated kernel image by using the 'tftpboot' command. In -order to do that, you will need to get the network working. Here you -have the instructions to set the ip address, netmask and gateway: +How to build it +=============== + +Configure Buildroot +------------------- + + $ make ci20_defconfig + +Build the rootfs +---------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. - setenv ipaddr x.x.x.x - setenv netmask x.x.x.x - setenv gatewayip x.x.x.x +You may now build your rootfs with: -Now you have to set the ip for the TFTP server you are going to load the -kernel image from, and also the name of the kernel image file (we use -'uImage' as a filename in this example): + $ make - setenv serverip x.x.x.x - setenv bootfile uImage +(This may take a while, consider getting yourself a coffee ;-) ) -And finally load the kernel image: +How to write the SD card +======================== - tftpboot +Once the build process is finished you will have an image called +"sdcard.img" in the output/images/ directory. -Now you have to extract the generated root filesystem into a USB drive -or SD-Card. Here you have the instructions to boot from the two of them. -You have to choose the one your prefer: +Make sure the SD card is not mounted then copy the bootable "sdcard.img" onto +it with "dd": -From USB - setenv bootargs console=ttyS4,115200 console=tty0 mem=256M@0x0 -mem=768M@0x30000000 root=/dev/sda1 + $ sudo dd if=output/images/sdcard.img of=/dev/sdX -From SD-Card - setenv bootargs console=ttyS4,115200 console=tty0 mem=256M@0x0 -mem=768M@0x30000000 root=/dev/mmcblk0p1 +Insert the SDcard into your ci20, and power it up. Your new system +should come up now and start a console on the UART HEADER. -And finally run this command to boot the board: - bootm +see: https://elinux.org/CI20_Hardware#Dedicated_UART_header diff --git a/buildroot/board/ci20/uboot-env.txt b/buildroot/board/ci20/uboot-env.txt new file mode 100644 index 000000000..3093496cc --- /dev/null +++ b/buildroot/board/ci20/uboot-env.txt @@ -0,0 +1,10 @@ +baudrate=115200 +board_mfr=NP +bootargs=console=ttyS4,115200 console=tty0 mem=256M@0x0 mem=768M@0x30000000 rootwait root=/dev/mmcblk0p1 devtmpfs.mount=1 ip=dhcp +bootcmd=run ethargs; ext4load mmc 0:1 0x88000000 /boot/uImage; bootm 0x88000000 +bootdelay=1 +ethargs=env set bootargs ${bootargs} +loads_echo=1 +stderr=eserial0,eserial4 +stdin=eserial0,eserial4 +stdout=eserial0,eserial4 diff --git a/buildroot/board/congatec/qmx6/6q_bootscript.txt b/buildroot/board/congatec/qmx6/6q_bootscript.txt deleted file mode 100644 index 13822207b..000000000 --- a/buildroot/board/congatec/qmx6/6q_bootscript.txt +++ /dev/null @@ -1,2 +0,0 @@ -set bootargs console=ttymxc1,115200 root=/dev/mmcblk0p1 rootwait consoleblank=0 -${fs}load mmc ${disk}:1 10800000 /boot/uImage && bootm 10800000 ; echo "Error loading kernel image" diff --git a/buildroot/board/congatec/qmx6/post-build.sh b/buildroot/board/congatec/qmx6/post-build.sh deleted file mode 100755 index 92251a53a..000000000 --- a/buildroot/board/congatec/qmx6/post-build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -TARGET_DIR=$1 -BOARD_DIR="$(dirname $0)" - -mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" \ - -d $BOARD_DIR/6q_bootscript.txt $TARGET_DIR/6q_bootscript diff --git a/buildroot/board/congatec/qmx6/readme.txt b/buildroot/board/congatec/qmx6/readme.txt deleted file mode 100644 index d2e0dcacb..000000000 --- a/buildroot/board/congatec/qmx6/readme.txt +++ /dev/null @@ -1,36 +0,0 @@ -This is the minimal buildroot support for the Congatec QMX6 Qseven CoM - -conga-QMX6 is based on the freescale iMX6 SoC. For more information please -have a look at http://www.congatec.com/products/qseven/conga-qmx6.html - -The configuration is based on the currently latest kernel release from -Congatec's git repository which is based on 3.0.35. The bootloader u-boot -is preconfigured on the CPU module and does not need to be replaced. - -To build the default configuration you only have to: - - make qmx6_defconfig && make - -You will need a microSD card of sufficient size and the first or only -partition configured as Linux type. - -To transfer the system to the card do: - - $ sudo dd if=output/images/rootfs.ext2 of=/dev/sdX1 - -You can optionally extend the filesystem size to the whole partition: - - $ sudo resize2fs /dev/sdX1 - -You can also update the card image without completely rewriting it: - - $ sudo mount /dev/sdX1 /mnt - $ sudo tar xf output/images/rootfs.tar -C /mnt - $ sudo umount /mnt - -Connect a terminal program to the rs232 connector marked "CONSOLE" -with baudrate set to 115200, insert the microSD card into the socket -on the CPU module and power the board to watch the system boot. - -Booting from the SD card slot on the base board is currently not -supported. diff --git a/buildroot/board/csky/gx6605s/gdbinit b/buildroot/board/csky/gx6605s/gdbinit new file mode 100644 index 000000000..d602aad46 --- /dev/null +++ b/buildroot/board/csky/gx6605s/gdbinit @@ -0,0 +1,25 @@ +tar jtag jtag://127.0.0.1:1025 +reset + +# setup CCR (Cache Config Reg) +# 0-1:MP,2:IE,3:DE,4:WB,5:RS,6:Z,7:BE +set $cr18 = 0x7d + +# vendor custom setup, double cache line & preload +set $cr30 = 0xc + +# pin mux for serial8250 +set *(unsigned int *) 0xa030a14c |= (1 << 22) | (1 << 23) + +# pass devicetree blob +# r2 is magic +# r3 is address +set $r2 = 0x20150401 +set $r3 = 0x92000000 +restore gx6605s.dtb binary 0x92000000 + +# flush cache +set $cr17 = 0x33 + +load + diff --git a/buildroot/board/csky/gx6605s/gx6605s.dts b/buildroot/board/csky/gx6605s/gx6605s.dts new file mode 100644 index 000000000..e4d46f59a --- /dev/null +++ b/buildroot/board/csky/gx6605s/gx6605s.dts @@ -0,0 +1,155 @@ +/dts-v1/; +#include +#include + +/ { + model = "C-SKY gx6605s"; + compatible = "csky,gx6605s"; + #address-cells = <1>; + #size-cells = <1>; + + memory { + device_type = "memory"; + reg = <0x10000000 0x04000000>; + }; + + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + + dummy_apb: apb-clock { + compatible = "fixed-clock"; + clock-frequency = <27000000>; + clock-output-names = "dummy_apb"; + #clock-cells = <0>; + }; + + intc: interrupt-controller@500000 { + compatible = "csky,gx6605s-intc"; + reg = <0x00500000 0x400>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + timer@20a000 { + compatible = "csky,gx6605s-timer"; + reg = <0x0020a000 0x400>; + clocks = <&dummy_apb>; + interrupts = <10>; + interrupt-parent = <&intc>; + }; + + ehci-hcd@900000 { + compatible = "generic-ehci"; + reg = <0x00900000 0x400>; + interrupt-parent = <&intc>; + interrupts = <59>; + }; + + ohci-hcd0@a00000 { + compatible = "generic-ohci"; + reg = <0x00a00000 0x400>; + interrupt-parent = <&intc>; + interrupts = <58>; + }; + + ohci-hcd1@b00000 { + compatible = "generic-ohci"; + reg = <0x00b00000 0x400>; + interrupt-parent = <&intc>; + interrupts = <57>; + }; + + serial@403000 { + compatible = "ns16550a"; + reg = <0x00403000 0x400>; + interrupt-parent = <&intc>; + interrupts = <15>; + clock-frequency = <29491200>; + baud = <115200>; + reg-shift = <2>; + reg-io-width = <1>; + }; + + gpio0: gpio@305000 { + compatible = "wd,mbl-gpio"; + reg-names = "dirout", "dat", "set", "clr"; + reg = <0x305000 4>, <0x305004 4>, <0x305008 4>, <0x30500c 4>; + bgpio-base = <0>; + #gpio-cells = <2>; + gpio-controller; + }; + + gpio_buttons { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + autorepeat; + + button0 { + label = "button8"; + linux,code = ; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + + button1 { + label = "button6"; + linux,code = ; + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + }; + + button2 { + label = "button5"; + linux,code = ; + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + }; + + button3 { + label = "button9"; + linux,code = ; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + }; + + button4 { + label = "button7"; + linux,code = ; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + }; + + gpio_leds { + compatible = "gpio-leds"; + + led0 { + label = "led10"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + + led1 { + label = "led11"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + linux,default-trigger = "timer"; + }; + + led2 { + label = "led12"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "default-on"; + }; + + led3 { + label = "led13"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "default-on"; + }; + }; + }; + + chosen { + bootargs = "console=ttyS0,115200 init=/sbin/init root=/dev/sda2 rw rootwait"; + }; +}; diff --git a/buildroot/board/csky/readme.txt b/buildroot/board/csky/readme.txt new file mode 100644 index 000000000..dc82dcc1d --- /dev/null +++ b/buildroot/board/csky/readme.txt @@ -0,0 +1,88 @@ +C-SKY Development Kit + +Intro +===== + +C-SKY is a CPU Architecture from www.c-sky.com and has it own instruction set. +Just like arm and mips in linux/arch, it named as 'csky'. + +gx6605s develop board is made by Hangzhou Nationalchip and C-SKY. + +Hardware Spec: + * CPU: ck610 up to 594Mhz + * Integrate with 64MB ddr2 in SOC. + * Integrate with hardware Jtag. + * Integrate with usb-to-serial chip. + * USB ehci controller in SOC. + * Power Supply: DC 5V from two micro-usb. + +How to build it +=============== + +Configure Buildroot +------------------- + +The csky_gx6605s_defconfig configuration is a sample configuration with +all that is required to bring the gx6605s Development Board: + + $ make csky_gx6605s_defconfig + +Build everything +---------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + + $ make + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- vmlinux + +-- rootfs.ext2 + +-- .dtb + +How to run it +============= + +Prepare Jtag-Server +------------------- + + Download the Jtag-Server here: + + https://github.com/c-sky/tools/raw/master/DebugServerConsole-linux-x86_64-V4.2.00-20161213.tar.gz + + Go to the unpacked directory: + + $./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025 + + Perhaps you need to use "sudo", which need libusb to detect c510:b210 + + $ sudo ./DebugServerConsole -ddc -rstwait 1000 -prereset -port 1025 + +Prepare USB drive +----------------- + + You sould determine which device associated to the usb drive + carefully. eg: + + $ cat /proc/partitions + 8 48 1971712 sdd + 8 49 976720 sdd1 + + $ sudo dd if=rootfs.ext2 of=/dev/sdd1 + $ sudo sync + +Run +--- + + Plug the usb drive on gx6605s dev board. + + Setup the Console with the rate 115200/8-N-1. + + $ cd output/images + $ ../host/bin/csky-linux-gdb -x ../../board/csky/gx6605s/gdbinit vmlinux + diff --git a/buildroot/board/cubietech/cubieboard/boot.cmd b/buildroot/board/cubietech/cubieboard/boot.cmd deleted file mode 100644 index 849ed0071..000000000 --- a/buildroot/board/cubietech/cubieboard/boot.cmd +++ /dev/null @@ -1,4 +0,0 @@ -setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} -fatload mmc 0 0x43000000 script.bin -fatload mmc 0 0x48000000 uImage -bootm 0x48000000 diff --git a/buildroot/board/cubietech/cubieboard/linux-cubieboard2.config b/buildroot/board/cubietech/cubieboard/linux-cubieboard2.config deleted file mode 100644 index 1ae1519f8..000000000 --- a/buildroot/board/cubietech/cubieboard/linux-cubieboard2.config +++ /dev/null @@ -1,749 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_AUDIT=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_RCU_FAST_NO_HZ=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=19 -CONFIG_CGROUPS=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CPUSETS=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_MEM_RES_CTLR=y -CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y -CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y -CONFIG_CGROUP_PERF=y -CONFIG_CGROUP_SCHED=y -CONFIG_CFS_BANDWIDTH=y -CONFIG_RT_GROUP_SCHED=y -CONFIG_BLK_CGROUP=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PERF_COUNTERS=y -# CONFIG_COMPAT_BRK is not set -CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_BLK_DEV_INTEGRITY=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_SGI_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_CFQ_GROUP_IOSCHED=y -CONFIG_ARCH_SUN7I=y -CONFIG_SUNXI_SCALING_MIN=408 -# CONFIG_CACHE_L2X0 is not set -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_NR_CPUS=2 -CONFIG_PREEMPT=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_HIGHMEM=y -CONFIG_COMPACTION=y -CONFIG_KSM=y -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/mmc0p1 rw init=/init loglevel=8" -CONFIG_KEXEC=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_DEFAULT_GOV_FANTASY=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_CPU_FREQ_USR_EVNT_NOTIFY=y -CONFIG_CPU_FREQ_DVFS=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=y -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_FIB_TRIE_STATS=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=y -CONFIG_NET_IPGRE_DEMUX=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_MROUTE_MULTIPLE_TABLES=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_ARPD=y -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_DIAG=m -CONFIG_INET_UDP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_WESTWOOD=y -CONFIG_TCP_CONG_HTCP=y -CONFIG_TCP_CONG_HSTCP=y -CONFIG_TCP_CONG_HYBLA=y -CONFIG_TCP_CONG_SCALABLE=y -CONFIG_TCP_CONG_LP=y -CONFIG_TCP_CONG_VENO=y -CONFIG_TCP_CONG_YEAH=y -CONFIG_TCP_CONG_ILLINOIS=y -CONFIG_TCP_MD5SIG=y -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_IPV6_OPTIMISTIC_DAD=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_MIP6=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m -CONFIG_IPV6_SIT=m -CONFIG_IPV6_SIT_6RD=y -CONFIG_IPV6_TUNNEL=m -CONFIG_IPV6_MULTIPLE_TABLES=y -CONFIG_IPV6_SUBTREES=y -CONFIG_IPV6_MROUTE=y -CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y -CONFIG_IPV6_PIMSM_V2=y -# CONFIG_ANDROID_PARANOID_NETWORK is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETWORK_PHY_TIMESTAMPING=y -CONFIG_NETFILTER=y -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_SECMARK=y -CONFIG_NF_CONNTRACK_ZONES=y -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CONNTRACK_TIMEOUT=y -CONFIG_NF_CONNTRACK_TIMESTAMP=y -CONFIG_NF_CT_PROTO_DCCP=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_SNMP=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NF_CT_NETLINK_TIMEOUT=m -CONFIG_NETFILTER_TPROXY=m -CONFIG_NETFILTER_XT_SET=m -CONFIG_NETFILTER_XT_TARGET_AUDIT=m -CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_TARGET_CT=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_LOG=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_TEE=m -CONFIG_NETFILTER_XT_TARGET_TPROXY=m -CONFIG_NETFILTER_XT_TARGET_TRACE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m -CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -CONFIG_NETFILTER_XT_MATCH_CLUSTER=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_CPU=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -CONFIG_NETFILTER_XT_MATCH_IPVS=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_NFACCT=m -CONFIG_NETFILTER_XT_MATCH_OSF=m -CONFIG_NETFILTER_XT_MATCH_OWNER=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_QUOTA2=m -CONFIG_NETFILTER_XT_MATCH_RATEEST=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_RECENT=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_SOCKET=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_IP_SET=m -CONFIG_IP_SET_BITMAP_IP=m -CONFIG_IP_SET_BITMAP_IPMAC=m -CONFIG_IP_SET_BITMAP_PORT=m -CONFIG_IP_SET_HASH_IP=m -CONFIG_IP_SET_HASH_IPPORT=m -CONFIG_IP_SET_HASH_IPPORTIP=m -CONFIG_IP_SET_HASH_IPPORTNET=m -CONFIG_IP_SET_HASH_NET=m -CONFIG_IP_SET_HASH_NETPORT=m -CONFIG_IP_SET_HASH_NETIFACE=m -CONFIG_IP_SET_LIST_SET=m -CONFIG_IP_VS=m -CONFIG_IP_VS_IPV6=y -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y -CONFIG_IP_VS_PROTO_SCTP=y -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m -CONFIG_IP_VS_FTP=m -CONFIG_IP_VS_PE_SIP=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_RPFILTER=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_REJECT_SKERR=y -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RPFILTER=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_REJECT_SKERR=y -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_IP6=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m -CONFIG_BRIDGE_EBT_NFLOG=m -CONFIG_L2TP=m -CONFIG_L2TP_V3=y -CONFIG_L2TP_IP=m -CONFIG_L2TP_ETH=m -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_BATMAN_ADV=m -CONFIG_OPENVSWITCH=m -CONFIG_NETPRIO_CGROUP=m -CONFIG_NET_PKTGEN=m -CONFIG_IRDA=m -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y -CONFIG_IRTTY_SIR=m -CONFIG_KINGSUN_DONGLE=m -CONFIG_KSDAZZLE_DONGLE=m -CONFIG_KS959_DONGLE=m -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_MCS_FIR=m -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -CONFIG_BT_ATH3K=m -CONFIG_AF_RXRPC=m -CONFIG_RXKAD=m -CONFIG_CFG80211=y -CONFIG_CFG80211_DEVELOPER_WARNINGS=y -CONFIG_WIRELESS_EXT_SYSFS=y -CONFIG_LIB80211=m -CONFIG_CFG80211_ALLOW_RECONNECT=y -CONFIG_MAC80211=m -CONFIG_MAC80211_MESH=y -CONFIG_WIMAX=m -CONFIG_RFKILL=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_CONNECTOR=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=2 -CONFIG_SUNXI_DBGREG=m -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_SW_SATA_AHCI_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_BONDING=m -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_SUNXI_EMAC=y -CONFIG_PHYLIB=y -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -CONFIG_PPPOLAC=m -CONFIG_PPPOPNS=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_USB_IPHETH=m -CONFIG_ATH_COMMON=m -CONFIG_ATH9K=m -CONFIG_RTL8192CU=m -CONFIG_RTL8192CU_SW=m -CONFIG_RTL8188EU=m -CONFIG_RTXX7X_SW=m -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_KEYRESET=y -CONFIG_KEYBOARD_HV2605_KEYBOARD=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GT801=m -CONFIG_TOUCHSCREEN_GT811=m -CONFIG_TOUCHSCREEN_GT818=m -CONFIG_TOUCHSCREEN_FT5X_TS=m -CONFIG_TOUCHSCREEN_ZT8031=m -CONFIG_GSENSOR=y -CONFIG_SENSORS_BMA250=m -CONFIG_MEMSIC_ECOMPASS=m -CONFIG_SENSORS_MXC622X=m -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_SPI=y -CONFIG_SPI_DEBUG=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_SUNXI=m -CONFIG_POWER_SUPPLY=y -CONFIG_AW_AXP=y -# CONFIG_HWMON is not set -CONFIG_REGULATOR=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_VIDEO_DEV=y -CONFIG_MEDIA_TUNER_CUSTOMISE=y -# CONFIG_MEDIA_TUNER_SIMPLE is not set -# CONFIG_MEDIA_TUNER_TDA8290 is not set -# CONFIG_MEDIA_TUNER_TDA827X is not set -# CONFIG_MEDIA_TUNER_TDA18271 is not set -# CONFIG_MEDIA_TUNER_TDA9887 is not set -# CONFIG_MEDIA_TUNER_TEA5767 is not set -# CONFIG_MEDIA_TUNER_MT20XX is not set -# CONFIG_MEDIA_TUNER_MT2060 is not set -# CONFIG_MEDIA_TUNER_MT2266 is not set -# CONFIG_MEDIA_TUNER_MT2131 is not set -# CONFIG_MEDIA_TUNER_QT1010 is not set -# CONFIG_MEDIA_TUNER_MXL5005S is not set -# CONFIG_MEDIA_TUNER_MXL5007T is not set -# CONFIG_MEDIA_TUNER_MC44S803 is not set -# CONFIG_MEDIA_TUNER_MAX2165 is not set -# CONFIG_MEDIA_TUNER_TDA18218 is not set -# CONFIG_MEDIA_TUNER_TDA18212 is not set -CONFIG_USB_VIDEO_CLASS=m -CONFIG_USB_M5602=m -CONFIG_USB_STV06XX=m -CONFIG_USB_GL860=m -CONFIG_USB_GSPCA_BENQ=m -CONFIG_USB_GSPCA_CONEX=m -CONFIG_USB_GSPCA_CPIA1=m -CONFIG_USB_GSPCA_ETOMS=m -CONFIG_USB_GSPCA_FINEPIX=m -CONFIG_USB_GSPCA_JEILINJ=m -CONFIG_USB_GSPCA_JL2005BCD=m -CONFIG_USB_GSPCA_KINECT=m -CONFIG_USB_GSPCA_KONICA=m -CONFIG_USB_GSPCA_MARS=m -CONFIG_USB_GSPCA_MR97310A=m -CONFIG_USB_GSPCA_NW80X=m -CONFIG_USB_GSPCA_OV519=m -CONFIG_USB_GSPCA_OV534=m -CONFIG_USB_GSPCA_OV534_9=m -CONFIG_USB_GSPCA_PAC207=m -CONFIG_USB_GSPCA_PAC7302=m -CONFIG_USB_GSPCA_PAC7311=m -CONFIG_USB_GSPCA_SE401=m -CONFIG_USB_GSPCA_SN9C2028=m -CONFIG_USB_GSPCA_SN9C20X=m -CONFIG_USB_GSPCA_SONIXB=m -CONFIG_USB_GSPCA_SONIXJ=m -CONFIG_USB_GSPCA_SPCA500=m -CONFIG_USB_GSPCA_SPCA501=m -CONFIG_USB_GSPCA_SPCA505=m -CONFIG_USB_GSPCA_SPCA506=m -CONFIG_USB_GSPCA_SPCA508=m -CONFIG_USB_GSPCA_SPCA561=m -CONFIG_USB_GSPCA_SPCA1528=m -CONFIG_USB_GSPCA_SQ905=m -CONFIG_USB_GSPCA_SQ905C=m -CONFIG_USB_GSPCA_SQ930X=m -CONFIG_USB_GSPCA_STK014=m -CONFIG_USB_GSPCA_STV0680=m -CONFIG_USB_GSPCA_SUNPLUS=m -CONFIG_USB_GSPCA_T613=m -CONFIG_USB_GSPCA_TOPRO=m -CONFIG_USB_GSPCA_TV8532=m -CONFIG_USB_GSPCA_VC032X=m -CONFIG_USB_GSPCA_VICAM=m -CONFIG_USB_GSPCA_XIRLINK_CIT=m -CONFIG_USB_GSPCA_ZC3XX=m -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_CX231XX=m -CONFIG_VIDEO_CX231XX_ALSA=m -CONFIG_VIDEO_TM6000=m -CONFIG_VIDEO_TM6000_ALSA=m -CONFIG_VIDEO_USBVISION=m -CONFIG_USB_ET61X251=m -CONFIG_USB_SN9C102=m -CONFIG_USB_PWC=m -CONFIG_VIDEO_CPIA2=m -CONFIG_USB_ZR364XX=m -CONFIG_USB_STKWEBCAM=m -CONFIG_USB_S2255=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_SOC_CAMERA=m -CONFIG_SOC_CAMERA_IMX074=m -CONFIG_SOC_CAMERA_MT9M001=m -CONFIG_SOC_CAMERA_MT9M111=m -CONFIG_SOC_CAMERA_MT9T031=m -CONFIG_SOC_CAMERA_MT9T112=m -CONFIG_SOC_CAMERA_MT9V022=m -CONFIG_SOC_CAMERA_RJ54N1=m -CONFIG_SOC_CAMERA_TW9910=m -CONFIG_SOC_CAMERA_PLATFORM=m -CONFIG_SOC_CAMERA_OV2640=m -CONFIG_SOC_CAMERA_OV5642=m -CONFIG_SOC_CAMERA_OV6650=m -CONFIG_SOC_CAMERA_OV772X=m -CONFIG_SOC_CAMERA_OV9640=m -CONFIG_SOC_CAMERA_OV9740=m -CONFIG_V4L_MEM2MEM_DRIVERS=y -# CONFIG_VIDEO_CSI_SUN4I is not set -CONFIG_RADIO_SI470X=y -CONFIG_USB_SI470X=m -CONFIG_I2C_SI470X=m -CONFIG_USB_MR800=m -CONFIG_USB_DSBR=m -CONFIG_RADIO_SI4713=m -CONFIG_USB_KEENE=m -CONFIG_RADIO_TEA5764=m -CONFIG_RADIO_SAA7706H=m -CONFIG_RADIO_TEF6862=m -CONFIG_RADIO_WL1273=m -CONFIG_AUDIO_ENGINE=y -CONFIG_PA_CONTROL=y -CONFIG_DRM=m -CONFIG_DRM_MALI=m -CONFIG_DRM_UDL=m -CONFIG_MALI=m -CONFIG_MALI400_DEBUG=y -CONFIG_MALI400_GPU_UTILIZATION=y -CONFIG_FB=y -CONFIG_FB_SUNXI=y -CONFIG_FB_SUNXI_LCD=y -CONFIG_FB_SUNXI_HDMI=y -CONFIG_HDMI_CEC=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_LOGO_LINUX_CLUT224 is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=m -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_ALOOP=m -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_SUNXI_SOC_SPDIF=y -CONFIG_HIDRAW=y -CONFIG_UHID=y -CONFIG_HID_PID=y -CONFIG_USB_HIDDEV=y -CONFIG_HID_KYE=y -CONFIG_HID_LOGITECH_DJ=y -CONFIG_LOGITECH_FF=y -# CONFIG_LOGIWHEELS_FF is not set -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_REALTEK=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_STORAGE_ONETOUCH=y -CONFIG_USB_STORAGE_KARMA=y -CONFIG_USB_STORAGE_CYPRESS_ATACB=y -CONFIG_USB_STORAGE_ENE_UB6250=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_GADGET=y -CONFIG_USB_FILE_STORAGE=m -CONFIG_USB_FILE_STORAGE_TEST=y -CONFIG_MMC=y -# CONFIG_MMC_BLOCK_BOUNCE is not set -CONFIG_MMC_USHC=y -CONFIG_MMC_SUNXI_POWER_CONTROL=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_SUNXI=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SUN4I=y -CONFIG_STAGING=y -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_LOGGER=y -CONFIG_ANDROID_RAM_CONSOLE=y -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_REISERFS_FS=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_QFMT_V2=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_CUSE=y -CONFIG_FSCACHE=y -CONFIG_FSCACHE_STATS=y -CONFIG_CACHEFILES=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -CONFIG_NTFS_FS=y -CONFIG_NTFS_RW=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=y -CONFIG_HFS_FS=y -CONFIG_HFSPLUS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_V4_1=y -CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="y" -CONFIG_ROOT_NFS=y -CONFIG_NFS_USE_LEGACY_DNS=y -CONFIG_NFSD=m -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_FAULT_INJECTION=y -CONFIG_CIFS=y -CONFIG_CIFS_DFS_UPCALL=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_936=y -CONFIG_NLS_CODEPAGE_950=y -CONFIG_NLS_CODEPAGE_932=y -CONFIG_NLS_CODEPAGE_949=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -CONFIG_FRAME_WARN=2048 -CONFIG_MAGIC_SYSRQ=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_SECTION_MISMATCH=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_SHIRQ=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_LIST=y -CONFIG_BOOT_PRINTK_DELAY=y -CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y -# CONFIG_FTRACE is not set -CONFIG_DYNAMIC_DEBUG=y -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_LL=y -CONFIG_SECURITYFS=y -# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_SEQIV=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ZLIB=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_LIBCRC32C=y diff --git a/buildroot/board/cubietech/cubieboard/mkcubiecard.sh b/buildroot/board/cubietech/cubieboard/mkcubiecard.sh deleted file mode 100755 index f1d5a9fb4..000000000 --- a/buildroot/board/cubietech/cubieboard/mkcubiecard.sh +++ /dev/null @@ -1,124 +0,0 @@ -#! /bin/sh -# mkCubieCard.sh v0.1: -# 2013, Carlo Caione -# heavely based on : -# mkA10card.sh v0.1 -# 2012, Jason Plum -# loosely based on : -# mkcard.sh v0.5 -# (c) Copyright 2009 Graeme Gregory -# Licensed under terms of GPLv2 -# -# Parts of the procudure base on the work of Denys Dmytriyenko -# http://wiki.omap.com/index.php/MMC_Boot_Format - -IMAGES_DIR=$1 -SPL_IMG=$IMAGES_DIR/sunxi-spl.bin -SPL_UBOOT=$IMAGES_DIR/u-boot-sunxi-with-spl.bin -UBOOT_IMG=$IMAGES_DIR/u-boot.bin -UIMAGE=$IMAGES_DIR/uImage -BIN_BOARD_FILE=$IMAGES_DIR/script.bin -ROOTFS=$IMAGES_DIR/rootfs.tar -BOOT_CMD_H=$IMAGES_DIR/boot.scr - -export LC_ALL=C - -if [ $# -ne 2 ]; then - echo "Usage: $0 " - exit 1; -fi - -if [ `id -u` -ne 0 ]; then - echo "This script must be run as root" 1>&2 - exit 1 -fi - -if [ ! -f $SPL_IMG -a ! -f $SPL_UBOOT ] || - [ ! -f $UBOOT_IMG ] || - [ ! -f $UIMAGE ] || - [ ! -f $BIN_BOARD_FILE ] || - [ ! -f $ROOTFS ] || - [ ! -f $BOOT_CMD_H ]; then - echo "File(s) missing." - exit 1 -fi - -DRIVE=$2 -P1=`mktemp -d` -P2=`mktemp -d` - -dd if=/dev/zero of=$DRIVE bs=1M count=3 - -SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'` - -echo DISK SIZE - $SIZE bytes - - -# ~2048, 16MB, FAT, bootable -# ~rest of drive, Ext4 -{ -echo 32,512,0x0C,* -echo 544,,,- -} | sfdisk -D $DRIVE - -sleep 1 - -if [ -b ${DRIVE}1 ]; then - D1=${DRIVE}1 - umount ${DRIVE}1 - mkfs.vfat -n "boot" ${DRIVE}1 -else - if [ -b ${DRIVE}p1 ]; then - D1=${DRIVE}p1 - umount ${DRIVE}p1 - mkfs.vfat -n "boot" ${DRIVE}p1 - else - echo "Cant find boot partition in /dev" - exit 1 - fi -fi - - -if [ -b ${DRIVE}2 ]; then - D2=${DRIVE}2 - umount ${DRIVE}2 - mkfs.ext4 -L "Cubie" ${DRIVE}2 -else - if [ -b ${DRIVE}p2 ]; then - D2=${DRIVE}p2 - umount ${DRIVE}p2 - mkfs.ext4 -L "Cubie" ${DRIVE}p2 - else - echo "Cant find rootfs partition in /dev" - exit 1 - fi -fi - -mount $D1 $P1 -mount $D2 $P2 - -# write uImage -cp $UIMAGE $P1 -# write board file -cp $BIN_BOARD_FILE $P1 -# write u-boot script -cp $BOOT_CMD_H $P1 -# write rootfs -tar -C $P2 -xvf $ROOTFS - -sync - -umount $D1 -umount $D2 - -rm -fr $P1 -rm -fr $P2 - -if [ -e $SPL_UBOOT ]; then - dd if=$SPL_UBOOT of=$DRIVE bs=1024 seek=8 -else - # write SPL - dd if=$SPL_IMG of=$DRIVE bs=1024 seek=8 - # write mele u-boot - dd if=$UBOOT_IMG of=$DRIVE bs=1024 seek=32 -fi diff --git a/buildroot/board/cubietech/cubieboard/post-build.sh b/buildroot/board/cubietech/cubieboard/post-build.sh deleted file mode 100755 index 1b0258c55..000000000 --- a/buildroot/board/cubietech/cubieboard/post-build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# post-build.sh for CubieBoard -# 2013, Carlo Caione - -BOARD_DIR="$(dirname $0)" -MKIMAGE=$HOST_DIR/usr/bin/mkimage -BOOT_CMD=$BOARD_DIR/boot.cmd -BOOT_CMD_H=$BINARIES_DIR/boot.scr - -# U-Boot script -if [ -e $MKIMAGE -a -e $BOOT_CMD ]; -then - $MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H -fi diff --git a/buildroot/board/cubietech/cubieboard/readme.txt b/buildroot/board/cubietech/cubieboard/readme.txt deleted file mode 100644 index 81cc5e409..000000000 --- a/buildroot/board/cubietech/cubieboard/readme.txt +++ /dev/null @@ -1,62 +0,0 @@ -cubieboard and cubieboard2 - ------ -Intro ------ - -To be able to use your cubieboard board with the images generated by -Buildroot you have to correctly setup the SD card. - -For more information, please see http://linux-sunxi.org/FirstSteps - ---------------- -How to build it ---------------- - -You need to use the cubieboard_defconfig or cubieboard2_defconfig, to do so: - * make cubieboard_defconfig -or - * make cubieboard2_defconfig - -And to compile: - * make - ------------------ -What is generated ------------------ - -After building, you should obtain this tree: - - output/images/ - +-- rootfs.tar - +-- boot.scr - +-- script.bin - +-- sunxi-spl.bin - +-- u-boot.bin - +-- u-boot-sunxi-with-spl.bin (optional) - `-- uImage - --------------------------- -How setting up the SD card --------------------------- - -Depending on the rootfs size, you might want to use a 2GB or larger SD-card. -The script mkcubiecard.sh will take care of partitioning and formatting -the SD-card. - -BEWARE! This process will erase your SD card. - -Use dmesg to find out where the SD card is attached in the /dev tree -() and then: - -# sudo ./mkcubiecard.sh - -where: - - is the directory containing the generated files (usually - output/images) - - is the device file of the SD card (usually /dev/sdX) - - - --- -Carlo Caione diff --git a/buildroot/board/cubietech/cubieboard2/boot.cmd b/buildroot/board/cubietech/cubieboard2/boot.cmd new file mode 100644 index 000000000..a9ae0e24e --- /dev/null +++ b/buildroot/board/cubietech/cubieboard2/boot.cmd @@ -0,0 +1,5 @@ +setenv fdt_high ffffffff +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun7i-a20-cubieboard2.dtb +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/cubietech/cubieboard2/genimage.cfg b/buildroot/board/cubietech/cubieboard2/genimage.cfg new file mode 100644 index 000000000..b082ab0da --- /dev/null +++ b/buildroot/board/cubietech/cubieboard2/genimage.cfg @@ -0,0 +1,37 @@ +# Minimal SD card image for the Cubieboard2 +# Based in the Orange Pi genimage.cfg + +image boot.vfat { + vfat { + files = { + "zImage", + "sun7i-a20-cubieboard2.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/cubietech/cubieboard2/post-image.sh b/buildroot/board/cubietech/cubieboard2/post-image.sh new file mode 100755 index 000000000..9cca1b178 --- /dev/null +++ b/buildroot/board/cubietech/cubieboard2/post-image.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/buildroot/board/embest/riotboard/genimage.cfg b/buildroot/board/embest/riotboard/genimage.cfg new file mode 100644 index 000000000..1221c83b9 --- /dev/null +++ b/buildroot/board/embest/riotboard/genimage.cfg @@ -0,0 +1,17 @@ +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.imx" + offset = 1024 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + offset = 1M + size = 60M + } +} diff --git a/buildroot/board/embest/riotboard/readme.txt b/buildroot/board/embest/riotboard/readme.txt new file mode 100644 index 000000000..4ba836fa5 --- /dev/null +++ b/buildroot/board/embest/riotboard/readme.txt @@ -0,0 +1,38 @@ +Buildroot for Embest RIoTboard +============================== + +This is a small development board, based on Freescale IMX6 Solo SoC +(single core ARM Cortex-A9). + +More details about the board can be found at: + + http://www.embest-tech.com/riotboard + +1. Compiling buildroot +---------------------- + +$ make riotboard_defconfig +$ make + +2. Installing buildroot +----------------------- + +Prepare an SD-card and plug it into your card reader. Always double +check the block device before writing to it, as writing to the wrong +block device can cause irrecoverable data loss. Now you can write the +image to your SD-card: + +sudo dd if=output/images/sdcard.img of=/dev/ bs=1M + +3. Running buildroot +-------------------- + +Position the board so you can read the label "RIoTboard" on the right +side of SW1 DIP switches. Configure the SW1 swiches like this: + +1 0 1 0 0 1 0 1 +ON OFF ON OFF OFF ON OFF ON + +Now plug your prepared SD-card in slot J6. Connect a serial console +(115200, 8, N, 1) to header J18. Connect a 5V/1A power supply to the +board and enjoy. diff --git a/buildroot/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf b/buildroot/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf new file mode 100644 index 000000000..23e48a0da --- /dev/null +++ b/buildroot/board/embest/riotboard/rootfs_overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,6 @@ +default buildroot + +label buildroot +kernel /boot/zImage +devicetree /boot/imx6dl-riotboard.dtb +append console=ttymxc1,115200 root=/dev/mmcblk1p1 rw diff --git a/buildroot/board/engicam/geam6ul/genimage.cfg b/buildroot/board/engicam/geam6ul/genimage.cfg new file mode 100644 index 000000000..fcca6e173 --- /dev/null +++ b/buildroot/board/engicam/geam6ul/genimage.cfg @@ -0,0 +1,38 @@ +image boot.vfat { + vfat { + files = { + "uImage", + "imx6ul-geam-kit.dtb" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition SPL { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/engicam/geam6ul/readme.txt b/buildroot/board/engicam/geam6ul/readme.txt new file mode 100644 index 000000000..ace993a66 --- /dev/null +++ b/buildroot/board/engicam/geam6ul/readme.txt @@ -0,0 +1,66 @@ +******************************************** +Buildroot for Engicam GEAM6UL SOM platforms: +******************************************** + +This file documents the Buildroot support for all Engicam GEAM6UL +SOM platform boards. + +GEAM6UL SOM Starter kits: +https://www.engicam.com/vis-prod/101115 + +This configuration uses U-Boot mainline and kernel mainline. + +Build +===== + +First, configure Buildroot for the Engicam GEAM6UL SOM: + +- for GEAM6UL SOM: + + make engicam_imx6ul_geam_defconfig + +Build all components: + + make + +You will find the following files in output/images/: + - imx6ul-geam-kit.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - SPL + - u-boot-dtb.img + - uImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + sync + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/engicam/geam6ul/genimage.cfg + +Boot the GEAM6UL boards with SD boot: +==================================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- connect 3-wire RS232 serial port J28 on board, and connect with other + serial end or USB cable(if serial-to-usb converter used) using + a terminal emulator at 115200 bps, 8n1; +- close JM3 for sd boot. +- power on the board. + +Enjoy! diff --git a/buildroot/board/engicam/icorem6/genimage.cfg b/buildroot/board/engicam/icorem6/genimage.cfg new file mode 100644 index 000000000..835d90586 --- /dev/null +++ b/buildroot/board/engicam/icorem6/genimage.cfg @@ -0,0 +1,41 @@ +image boot.vfat { + vfat { + files = { + "uImage", + "imx6dl-icore.dtb", + "imx6q-icore.dtb", + "imx6q-icore-ofcap10.dtb", + "imx6q-icore-ofcap12.dtb" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition SPL { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/engicam/icorem6/linux_qt5.fragment b/buildroot/board/engicam/icorem6/linux_qt5.fragment new file mode 100644 index 000000000..5c0505e51 --- /dev/null +++ b/buildroot/board/engicam/icorem6/linux_qt5.fragment @@ -0,0 +1,4 @@ +# Currently kernel mainline exhibits issues when running cpufreq as ondemand +# governor on mx6. +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y diff --git a/buildroot/board/engicam/icorem6/readme.txt b/buildroot/board/engicam/icorem6/readme.txt new file mode 100644 index 000000000..bd78c5a55 --- /dev/null +++ b/buildroot/board/engicam/icorem6/readme.txt @@ -0,0 +1,93 @@ +********************************************* +Buildroot for Engicam i.CoreM6 SOM platforms: +********************************************* + +This file documents the Buildroot support for Engicam i.CoreM6 +platform boards. + +i.CoreM6 Quad/Dual/DualLite/Solo SOM Starter kits: +https://www.engicam.com/vis-prod/101120 +i.CoreM6 Quad/Dual/DualLite/Solo Open Frame 10.1 C.TOUCH kits: +https://www.engicam.com/vis-prod/101133 + +This configuration uses U-Boot mainline and kernel mainline. + +Build +===== + +First, configure Buildroot for the Engicam i.CoreM6: + + make engicam_imx6qdl_icore_defconfig + +Build all components: + + make + +You will find the following files in output/images/: + - imx6q-icore.dtb (for i.CoreM6 Quad/Dual) + - imx6dl-icore.dtb (for i.CoreM6 DualLite/Solo) + - imx6q-icore-ofcap10.dtb (for i.CoreM6 Quad/Dual ofcap 10) + - imx6q-icore-ofcap12.dtb (for i.CoreM6 Quad/Dual ofcap 12) + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - SPL + - u-boot-dtb.img + - uImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + sync + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/engicam/icorem6/genimage.cfg + +Boot the i.CoreM6 boards with SD boot: +===================================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- connect 3-wire RS232 serial port J28 on board, and connect with other + serial end or USB cable(if serial-to-usb converter used) using + a terminal emulator at 115200 bps, 8n1; +- close JM3 for sd boot. +- power on the board. + +Testing graphics on i.CoreM6: +============================ + +Build with support for Etnaviv, Qt5 and demo applications: + + make engicam_imx6qdl_icore_qt5_defconfig + make + +Running kmscube +# kmscube -D /dev/dri/card1 + +Running glmark2-es2-drm +# glmark2-es2-drm + +Running Qt5 Cinematic Demo: +- for i.CoreM6 Starter Kit +# export QT_QPA_EGLFS_KMS_CONFIG=/root/imx6qdl-icore.json +- for i.CoreM6 ofcap10 +# export QT_QPA_EGLFS_KMS_CONFIG=/root/imx6qdl-icore-ofcap10.json +- for i.CoreM6 ofcap12 +# export QT_QPA_EGLFS_KMS_CONFIG=/root/imx6qdl-icore-ofcap12.json + +# CinematicExperience-demo + +Enjoy! diff --git a/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap10.json b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap10.json new file mode 100644 index 000000000..3bfe4a236 --- /dev/null +++ b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap10.json @@ -0,0 +1,11 @@ +{ + "device": "/dev/dri/card1", + "hwcursor": false, + "pbuffers": true, + "outputs": [ + { + "name": "LVDS1", + "mode": "1280x800" + } + ] +} diff --git a/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap12.json b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap12.json new file mode 100644 index 000000000..ea5ce6f97 --- /dev/null +++ b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore-ofcap12.json @@ -0,0 +1,11 @@ +{ + "device": "/dev/dri/card1", + "hwcursor": false, + "pbuffers": true, + "outputs": [ + { + "name": "LVDS1", + "mode": "1280x480" + } + ] +} diff --git a/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore.json b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore.json new file mode 100644 index 000000000..b4fa359b6 --- /dev/null +++ b/buildroot/board/engicam/icorem6/rootfs_overlay/root/imx6qdl-icore.json @@ -0,0 +1,11 @@ +{ + "device": "/dev/dri/card1", + "hwcursor": false, + "pbuffers": true, + "outputs": [ + { + "name": "LVDS1", + "mode": "800x480" + } + ] +} diff --git a/buildroot/board/engicam/icorem6_rqs/genimage.cfg b/buildroot/board/engicam/icorem6_rqs/genimage.cfg new file mode 100644 index 000000000..967d10b18 --- /dev/null +++ b/buildroot/board/engicam/icorem6_rqs/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "uImage", + "imx6dl-icore-rqs.dtb", + "imx6q-icore-rqs.dtb" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition SPL { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/engicam/icorem6_rqs/readme.txt b/buildroot/board/engicam/icorem6_rqs/readme.txt new file mode 100644 index 000000000..a0bf6f508 --- /dev/null +++ b/buildroot/board/engicam/icorem6_rqs/readme.txt @@ -0,0 +1,69 @@ +************************************************* +Buildroot for Engicam i.CoreM6 RQS SOM platforms: +************************************************* + +This file documents the Buildroot support for Engicam i.CoreM6 RQS +SOM platform boards. + +i.CoreM6 Quad/Dual/DualLite/Solo RQS SOM Starter kits: +https://www.engicam.com/vis-prod/101124 + +This configuration uses U-Boot mainline and kernel mainline. + +Build +===== + +First, configure Buildroot for the Engicam i.CoreM6 RQS: + +- for i.CoreM6 RQS Quad/Dual/DualLite/Solo: + + make engicam_imx6qdl_icore_rqs_defconfig + +Build all components: + + make + +You will find the following files in output/images/: +- for i.CoreM6 Quad/Dual RQS: + - imx6q-icore-rqs.dtb +- for i.CoreM6 DualLite/Solo RQS: + - imx6dl-icore-rqs.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - SPL + - u-boot-dtb.img + - uImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + sync + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/engicam/icorem6_rqs/genimage.cfg + +Boot the i.CoreM6 RQS boards with SD boot: +========================================= + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- connect 3-wire RS232 serial port J7 on board, and connect with other + serial end or USB cable(if serial-to-usb converter used) using + a terminal emulator at 115200 bps, 8n1; +- close JM2 for sd boot. +- power on the board. + +Enjoy! diff --git a/buildroot/board/engicam/isiot/genimage.cfg b/buildroot/board/engicam/isiot/genimage.cfg new file mode 100644 index 000000000..dc8c20db5 --- /dev/null +++ b/buildroot/board/engicam/isiot/genimage.cfg @@ -0,0 +1,38 @@ +image boot.vfat { + vfat { + files = { + "uImage", + "imx6ul-isiot-emmc.dtb" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition SPL { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/engicam/isiot/readme.txt b/buildroot/board/engicam/isiot/readme.txt new file mode 100644 index 000000000..5394007ca --- /dev/null +++ b/buildroot/board/engicam/isiot/readme.txt @@ -0,0 +1,66 @@ +******************************************** +Buildroot for Engicam Is.IoT SOM platforms: +******************************************** + +This file documents the Buildroot support for all Engicam Is.IoT MX6UL +SOM platform boards. + +Is.IoT MX6UL SOM Starter kits: +https://www.engicam.com/vis-prod/101122 + +This configuration uses U-Boot mainline and kernel mainline. + +Build +===== + +First, configure Buildroot for the Engicam Is.IoT MX6UL SOM: + +- for Is.IoT MX6UL SOM: + + make engicam_imx6ul_isiot_defconfig + +Build all components: + + make + +You will find the following files in output/images/: + - imx6ul-isiot-emmc.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - SPL + - u-boot-dtb.img + - uImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + sync + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/engicam/isiot/genimage.cfg + +Boot the Is.IoT MX6UL boards with SD boot: +========================================= + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- connect 3-wire RS232 serial port J28 on board, and connect with other + serial end or USB cable(if serial-to-usb converter used) using + a terminal emulator at 115200 bps, 8n1; +- close JM3 for sd boot. +- power on the board. + +Enjoy! diff --git a/buildroot/board/firefly/roc-rk3399-pc/extlinux.conf b/buildroot/board/firefly/roc-rk3399-pc/extlinux.conf new file mode 100644 index 000000000..50a358fad --- /dev/null +++ b/buildroot/board/firefly/roc-rk3399-pc/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399RocPC linux + kernel /boot/Image + devicetree /boot/rk3399-roc-pc.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p1 rootwait diff --git a/buildroot/board/firefly/roc-rk3399-pc/genimage.cfg b/buildroot/board/firefly/roc-rk3399-pc/genimage.cfg new file mode 100644 index 000000000..966c86927 --- /dev/null +++ b/buildroot/board/firefly/roc-rk3399-pc/genimage.cfg @@ -0,0 +1,22 @@ +image sdcard.img { + hdimage { + } + + partition u-boot-tpl-spl-dtb { + in-partition-table = "no" + image = "idbloader.img" + offset = 32K + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot.itb" + offset = 8M + size = 30M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/firefly/roc-rk3399-pc/post-build.sh b/buildroot/board/firefly/roc-rk3399-pc/post-build.sh new file mode 100755 index 000000000..1f5ff6a61 --- /dev/null +++ b/buildroot/board/firefly/roc-rk3399-pc/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/firefly/roc-rk3399-pc/readme.txt b/buildroot/board/firefly/roc-rk3399-pc/readme.txt new file mode 100644 index 000000000..8a6f1cdee --- /dev/null +++ b/buildroot/board/firefly/roc-rk3399-pc/readme.txt @@ -0,0 +1,40 @@ +Libre Computer Board ROC-RK3399-PC +=================================== + +Build: + + $ make roc_pc_rk3399_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── idbloader.img +├── Image +├── rk3399-roc-pc.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device + +Serial console +-------------- + +Baudrate for this board is 1500000 + +Wiki link: +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/roc-rk3399-pc.html diff --git a/buildroot/board/freescale/common/imx/genimage.cfg.template b/buildroot/board/freescale/common/imx/genimage.cfg.template new file mode 100644 index 000000000..61b09bde9 --- /dev/null +++ b/buildroot/board/freescale/common/imx/genimage.cfg.template @@ -0,0 +1,41 @@ +# Minimal SD card image for the Freescale boards Template +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 1 kB free space at the beginning, +# * U-Boot is dumped as is, +# * a FAT partition at offset 8 MB is containing zImage/uImage and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + label = "boot" + files = { + %FILES% + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "%UBOOTBIN%" + offset = 1024 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/freescale/common/imx/genimage.cfg.template_imx8 b/buildroot/board/freescale/common/imx/genimage.cfg.template_imx8 new file mode 100644 index 000000000..568920508 --- /dev/null +++ b/buildroot/board/freescale/common/imx/genimage.cfg.template_imx8 @@ -0,0 +1,41 @@ +# Minimal SD card image for the Freescale iMX8 boards +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 33 kB free space at the beginning, +# * U-Boot is integrated into imx8-boot-sd.bin and is dumped as is, +# * a FAT partition at offset 8MB is containing Image and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + label = "boot" + files = { + %FILES% + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition imx-boot { + in-partition-table = "no" + image = "imx8-boot-sd.bin" + offset = %IMXOFFSET% + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/buildroot/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl new file mode 100644 index 000000000..c29032572 --- /dev/null +++ b/buildroot/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl @@ -0,0 +1,30 @@ +# Minimal SD card image for the Freescale boards Template for SPL Boot +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 1 kB free space at the beginning, +# * SPL is at the offset expected by ROM, +# * U-Boot is at the offset expected by SPL, +# * The first partition is expected to be an ext2 and have a /boot directory. +# + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot { + in-partition-table = "no" + image = "%UBOOTBIN%" + offset = 69K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/freescale/common/imx/genimage.cfg.template_spl b/buildroot/board/freescale/common/imx/genimage.cfg.template_spl new file mode 100644 index 000000000..3b0667c38 --- /dev/null +++ b/buildroot/board/freescale/common/imx/genimage.cfg.template_spl @@ -0,0 +1,47 @@ +# Minimal SD card image for the Freescale boards Template for SPL Boot +# +# We mimic the .sdcard Freescale's image format: +# * the SD card must have 1 kB free space at the beginning, +# * U-Boot is dumped as is, +# * a FAT partition at offset 8MB is containing zImage/uImage and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + label = "boot" + files = { + %FILES% + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot { + in-partition-table = "no" + image = "%UBOOTBIN%" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/freescale/common/imx/imx8-bootloader-prepare.sh b/buildroot/board/freescale/common/imx/imx8-bootloader-prepare.sh new file mode 100755 index 000000000..cb7c37bfc --- /dev/null +++ b/buildroot/board/freescale/common/imx/imx8-bootloader-prepare.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +main () +{ + UBOOT_DTB=$2 + if [ ! -e "$UBOOT_DTB" ]; then + echo "ERROR: couldn't find dtb: $UBOOT_DTB" + exit 1 + fi + + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then + cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin + BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot-nodtb.bin ATF_LOAD_ADDR=0x00910000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its + ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb + rm -f ${BINARIES_DIR}/u-boot.its + + ${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" ${BR2_CONFIG}; then + cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin + BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot-nodtb.bin ATF_LOAD_ADDR=0x00920000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its + ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb + rm -f ${BINARIES_DIR}/u-boot.its + + ${HOST_DIR}/bin/mkimage_imx8 -fit -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y$" ${BR2_CONFIG}; then + cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin + BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot-nodtb.bin ATF_LOAD_ADDR=0x00960000 ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its + ${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb + rm -f ${BINARIES_DIR}/u-boot.its + + ${HOST_DIR}/bin/mkimage_imx8 -v v2 -fit -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x912000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin + else + ${HOST_DIR}/bin/mkimage_imx8 -commit > ${BINARIES_DIR}/mkimg.commit + cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin + cp ${BINARIES_DIR}/bl31.bin ${BINARIES_DIR}/u-boot-atf.bin + dd if=${BINARIES_DIR}/u-boot-hash.bin of=${BINARIES_DIR}/u-boot-atf.bin bs=1K seek=128 + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" ${BR2_CONFIG}; then + ${HOST_DIR}/bin/mkimage_imx8 -soc QM -rev B0 -append ${BINARIES_DIR}/ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qm-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a53 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin + else + ${HOST_DIR}/bin/mkimage_imx8 -soc QX -rev B0 -append ${BINARIES_DIR}/ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qx-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a35 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin + fi + fi + + exit $? +} + +main $@ diff --git a/buildroot/board/freescale/common/imx/post-image.sh b/buildroot/board/freescale/common/imx/post-image.sh new file mode 100755 index 000000000..06ccaac3a --- /dev/null +++ b/buildroot/board/freescale/common/imx/post-image.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env bash + +# +# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME +# in ${BR_CONFIG}, then prints the corresponding list of file names for the +# genimage configuration file +# +dtb_list() +{ + local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" + + for dt in $DTB_LIST; do + echo -n "\"`basename $dt`.dtb\", " + done +} + +# +# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in +# ${BR_CONFIG}, then prints the corresponding file name for the genimage +# configuration file +# +linux_image() +{ + if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then + echo "\"uImage\"" + elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then + echo "\"Image\"" + else + echo "\"zImage\"" + fi +} + +genimage_type() +{ + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_imx8" + elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then + if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_no_boot_part_spl" + fi + elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then + echo "genimage.cfg.template_spl" + else + echo "genimage.cfg.template" + fi +} + +imx_offset() +{ + if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then + echo "33K" + elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" ${BR2_CONFIG}; then + echo "33K" + else + echo "32K" + fi +} + +uboot_image() +{ + if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then + echo "u-boot-dtb.imx" + elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMX=y$" ${BR2_CONFIG}; then + echo "u-boot.imx" + elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y$" ${BR2_CONFIG}; then + echo "u-boot-dtb.img" + elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMG=y$" ${BR2_CONFIG}; then + echo "u-boot.img" + fi +} + +main() +{ + local FILES="$(dtb_list) $(linux_image)" + local IMXOFFSET="$(imx_offset)" + local UBOOTBIN="$(uboot_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%FILES%/${FILES}/" \ + -e "s/%IMXOFFSET%/${IMXOFFSET}/" \ + -e "s/%UBOOTBIN%/${UBOOTBIN}/" \ + board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@ diff --git a/buildroot/board/freescale/common/mxs/genimage.cfg.template b/buildroot/board/freescale/common/mxs/genimage.cfg.template new file mode 100644 index 000000000..c9da45282 --- /dev/null +++ b/buildroot/board/freescale/common/mxs/genimage.cfg.template @@ -0,0 +1,40 @@ +# Minimal SD card image for the Freescale MX23/MX28 Template +# +# We mimic the .sdcard Freescale's MX23/MX28 image format: +# * u-boot.sb is placed at offset 1M, +# * a FAT partition at offset 16 MB is containing zImage/uImage and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + label = "boot" + files = { + %FILES% + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0x53 + image = "u-boot.sd" + offset = 1M + size = 16M + } + + partition kernel { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/freescale/common/mxs/post-image.sh b/buildroot/board/freescale/common/mxs/post-image.sh new file mode 100755 index 000000000..0bfb835c6 --- /dev/null +++ b/buildroot/board/freescale/common/mxs/post-image.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# +# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME +# in ${BR_CONFIG}, then prints the corresponding list of file names for the +# genimage configuration file +# +dtb_list() +{ + local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" + + for dt in $DTB_LIST; do + echo -n "\"$dt.dtb\", " + done +} + +# +# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in +# ${BR_CONFIG}, then prints the corresponding file name for the genimage +# configuration file +# +linux_image() +{ + if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then + echo "\"uImage\"" + else + echo "\"zImage\"" + fi +} + +main() +{ + local FILES="$(dtb_list) $(linux_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%FILES%/${FILES}/" \ + board/freescale/common/mxs/genimage.cfg.template > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@ diff --git a/buildroot/board/freescale/imx23evk/readme.txt b/buildroot/board/freescale/imx23evk/readme.txt new file mode 100644 index 000000000..6574577dc --- /dev/null +++ b/buildroot/board/freescale/imx23evk/readme.txt @@ -0,0 +1,48 @@ +************************** +Freescale i.MX23 EVK board +************************** + +This file documents the Buildroot support for the Freescale i.MX23 EVK board. + +Build +===== + +First, configure Buildroot for your i.MX23 EVK board: + + make imx23evk_defconfig + +Build all components: + + make + +You will find in output/images/ directory the following files: + - imx23-evk.dtb + - rootfs.tar + - u-boot.sd + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Then, run the following command: + +*** WARNING! The command will destroy all the card content. Use with care! *** + + sudo dd if=output/images/sdcard.img of=/dev/ + +Boot the i.MX23 EVK board +========================= + +- Put the Boot Mode Select jumper as 1 0 0 1 so that it can boot + from the SD card +- Insert the SD card in the SD Card slot of the board; +- Connect an RS232 UART cable to the Debug UART Port and connect using a + terminal emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/imx25pdk/readme.txt b/buildroot/board/freescale/imx25pdk/readme.txt new file mode 100644 index 000000000..1aece6c9b --- /dev/null +++ b/buildroot/board/freescale/imx25pdk/readme.txt @@ -0,0 +1,54 @@ +************************** +Freescale i.MX25 PDK board +************************** + +This file documents the Buildroot support for the Freescale i.MX25 PDK board. + +Build +===== + +First, configure Buildroot for the i.MX25 PDK board: + + make mx25pdk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx25-pdk.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX25 PDK board +========================= + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- put a USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/imx28evk/readme.txt b/buildroot/board/freescale/imx28evk/readme.txt new file mode 100644 index 000000000..2920cb04c --- /dev/null +++ b/buildroot/board/freescale/imx28evk/readme.txt @@ -0,0 +1,57 @@ +************************** +Freescale i.MX28 EVK board +************************** + +This file documents the Buildroot support for the Freescale i.MX28 EVK board. + +Read the i.MX28 Evaluation Kit Quick Start Guide [1] for an introduction to the +board. + +Build +===== + +First, configure Buildroot for your i.MX28 EVK board: + + make freescale_imx28evk_defconfig + +Build all components: + + make + +You will find in ./output/images/ the following files: + - imx28-evk.dtb + - rootfs.tar + - u-boot.sd + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Then, run the following command as root: + +*** WARNING! The command will destroy all the card content. Use with care! *** + + sudo dd if=output/images/sdcard.img of=/dev/ + +Boot the i.MX28 EVK board +========================= + +To boot your newly created system (refer to the i.MX28 EVK Quick Start Guide +[1] for guidance): +- insert the SD card in the SD Card Socket 0 of the board; +- verify that your i.MX28 EVK board jumpers and switches are set as mentioned + in the i.MX28 EVK Quick Start Guide [1]; +- connect an RS232 UART cable to the Debug UART Port and connect using a + terminal emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] http://cache.freescale.com/files/32bit/doc/user_guide/EVK_imx28_QuickStart.pdf diff --git a/buildroot/board/freescale/imx51evk/readme.txt b/buildroot/board/freescale/imx51evk/readme.txt new file mode 100644 index 000000000..d67a3fd72 --- /dev/null +++ b/buildroot/board/freescale/imx51evk/readme.txt @@ -0,0 +1,54 @@ +************************** +Freescale i.MX51 EVK board +************************** + +This file documents the Buildroot support for the Freescale i.MX51 EVK board. + +Build +===== + +First, configure Buildroot for the i.MX51 EVK board: + + make mx51evk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx51-babbage.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX51 EVK board +========================= + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/imx53loco/create-boot-sd.sh b/buildroot/board/freescale/imx53loco/create-boot-sd.sh deleted file mode 120000 index 3083fd286..000000000 --- a/buildroot/board/freescale/imx53loco/create-boot-sd.sh +++ /dev/null @@ -1 +0,0 @@ -../imx6sabresd/create-boot-sd.sh \ No newline at end of file diff --git a/buildroot/board/freescale/imx6-sabresd/linux_qt5.fragment b/buildroot/board/freescale/imx6-sabresd/linux_qt5.fragment new file mode 100644 index 000000000..ffa5f63ea --- /dev/null +++ b/buildroot/board/freescale/imx6-sabresd/linux_qt5.fragment @@ -0,0 +1,4 @@ +# Currently mx6sabresd exhibits touchscreen issues when running cpufreq as +# ondemand governor with a mainline kernel. +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y diff --git a/buildroot/board/freescale/imx6-sabresd/readme.txt b/buildroot/board/freescale/imx6-sabresd/readme.txt new file mode 100644 index 000000000..292dab72c --- /dev/null +++ b/buildroot/board/freescale/imx6-sabresd/readme.txt @@ -0,0 +1,111 @@ +******************************* +Freescale i.MX6 Sabre SD boards +******************************* + +This file documents the Buildroot support for the Freescale i.MX6 Sabre SD +boards based on i.MX6Q, i.MX6DL and iMX6QP. + +Thanks to the SPL support in U-Boot it is possible to run a single +sdcard.img in all i.MX6 Sabre SD board variants. + +This configuration uses U-Boot mainline and kernel mainline. + +Build +===== + +First, configure Buildroot for the i.MX6 Sabre SD board: + + make imx6-sabresd_defconfig + +Build all components: + + make + +You will find the following files in output/images/ : + - imx6q-sabresd.dtb + - imx6dl-sabresd.dtb + - imx6qp-sabresd.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX6 Sabre SD board +============================= + +To boot your newly created system: +- insert the SD card in the SD3 slot of the board (close to the HDMI connector); +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Testing graphics on the i.MX6 Sabre SD board +============================================ + +The imx6-sabresd_qt5_defconfig allows to quickly test the graphics +capabilities of i.MX6 using the opensource Etnaviv graphics stack +and kernel mainline. + +In order to build it: + +make imx6-sabresd_qt5_defconfig +make + +Then flash the SD card as explained above. + +Running kmscube application: + +# kmscube + +Running Qt5 Cinematic Demo: + +# export QT_QPA_EGLFS_KMS_CONFIG=/root/sabresd.json +# export QT_QPA_EGLFS_ALWAYS_SET_MODE=1 +# /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience + +Running gl2mark benchmark: + +# glmark2-es2-drm + +Testing video playback on the i.MX6 Sabre SD board +================================================== + +As the mx6sabresd has two display outputs (LVDS and HDMI), it is necessary to +know what is the connector that corresponds to the HDMI output. + +This information can be found by running: + +# modetest + +And search for the HDMI connector number. In our case it shows up as 37. + +In the mx6sabresd prompt run the following Gstreamer pipeline: + +# gst-launch-1.0 filesrc location=/root/trailer_1080p_h264_mp3.avi ! avidemux ! \ +h264parse ! v4l2video1dec capture-io-mode=dmabuf ! kmssink connector-id=37 \ +name=imx-drm sync=0 + +(The video used on this example was retrieved from: +http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi) + +Enjoy! diff --git a/buildroot/board/freescale/imx6-sabresd/rootfs_overlay/root/sabresd.json b/buildroot/board/freescale/imx6-sabresd/rootfs_overlay/root/sabresd.json new file mode 100644 index 000000000..fe92ce5b2 --- /dev/null +++ b/buildroot/board/freescale/imx6-sabresd/rootfs_overlay/root/sabresd.json @@ -0,0 +1,15 @@ +{ + "device": "/dev/dri/card0", + "hwcursor": false, + "pbuffers": true, + "outputs": [ + { + "name": "HDMI1", + "mode": "off" + }, + { + "name": "LVDS1", + "mode": "1024x768" + } + ] +} diff --git a/buildroot/board/freescale/imx6sabre/patches/uboot/0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch b/buildroot/board/freescale/imx6sabre/patches/uboot/0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch new file mode 100644 index 000000000..a9f88c264 --- /dev/null +++ b/buildroot/board/freescale/imx6sabre/patches/uboot/0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch @@ -0,0 +1,37 @@ +From e9a88fddc149fc52cdc5a8997f9fd3a29416c643 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= +Date: Tue, 12 Aug 2014 10:17:31 +0200 +Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Buildroot supplies a nice /init wrapper script to use when booting from a +ramdisk. + +This patch tells u-boot to tell the kernel to boot into /init (instead of +/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a +buildroot system entirely through USB. + +Signed-off-by: Vincent Stehlé +Signed-off-by: Julien Olivain +--- + include/configs/imx_env.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/configs/imx_env.h b/include/configs/imx_env.h +index c03748d93f..aa1a8bf488 100644 +--- a/include/configs/imx_env.h ++++ b/include/configs/imx_env.h +@@ -29,7 +29,7 @@ + + #define CONFIG_MFG_ENV_SETTINGS_DEFAULT \ + "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ +- "rdinit=/linuxrc " \ ++ "rdinit=/init " \ + "clk_ignore_unused "\ + "\0" \ + "kboot="MFG_BOOT_CMD"\0"\ +-- +2.26.2 + diff --git a/buildroot/board/freescale/imx6sabre/readme.txt b/buildroot/board/freescale/imx6sabre/readme.txt new file mode 100644 index 000000000..4b8db5233 --- /dev/null +++ b/buildroot/board/freescale/imx6sabre/readme.txt @@ -0,0 +1,171 @@ +******************************************************** +Freescale i.MX6 Q, DL and SoloX SABRE development boards +******************************************************** + +This file documents the Buildroot support for the Freescale SABRE Board +for Smart Devices Based on the i.MX 6 and i.MX 6SoloX Series (SABRESD), +as well as the Freescale SABRE Board for Automotive Infotainment. + +Read the i.MX 6 SABRESD Quick Start Guide for an introduction to the +board: +http://cache.freescale.com/files/32bit/doc/quick_start_guide/SABRESDB_IMX6_QSG.pdf + +Read the i.MX 6 SoloX SABRESD Quick Start Guide for an introduction to +the board: +http://cache.freescale.com/files/32bit/doc/user_guide/IMX6SOLOXQSG.pdf + +Read the SABRE for Automotive Infotainment Quick Start Guide for an +introduction to the board: +http://cache.freescale.com/files/32bit/doc/user_guide/IMX6SABREINFOQSG.pdf + +Building with NXP kernel and NXP U-Boot +======================================= + +First, configure Buildroot for your SABRE board. +For i.MX6Q SABRE SD board: + + make freescale_imx6qsabresd_defconfig + +For i.MX6DL SABRE SD board: + + make freescale_imx6dlsabresd_defconfig + +For i.MX6 SoloX SABRE SD board: + + make freescale_imx6sxsabresd_defconfig + +For i.MX6Q SABRE Auto board: + + make freescale_imx6qsabreauto_defconfig + +For i.MX6DL SABRE Auto board: + + make freescale_imx6dlsabreauto_defconfig + +Build all components: + + make + +You will find in ./output/images/ the following files: + - imx6dl-sabresd.dtb or imx6q-sabresd.dtb or imx6sx-sdb.dtb or + imx6q-sabreauto.dtb or imx6dl-sabreauto.dtb + - rootfs.ext2 + - rootfs.tar + - u-boot.imx + - uImage, or zImage for i.MX6 SoloX + +Building with mainline kernel and mainline U-Boot +================================================= + +Mainline U-Boot uses SPL and can support the three +variants of mx6sabreauto boards: mx6q, mx6dl and mx6qp. + +First, configure Buildroot for your mx6sabreauto board + + make imx6-sabreauto_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx6dl-sabresd.dtb, imx6q-sabresd.dtb, imx6q-sabresd.dtb + - rootfs.ext2 + - SPL and u-boot.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a microSD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/ + +*** WARNING! The script will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the SABRE board +==================== + +i.MX6 SABRE SD +-------------- + +To boot your newly created system on an i.MX6 SABRE SD Board (refer to +the i.MX6 SABRE SD Quick Start Guide for guidance): +- insert the SD card in the SD3 slot of the board; +- locate the BOOT dip switches (SW6), set dips 2 and 7 to ON, all others to OFF; +- connect a Micro USB cable to Debug Port and connect using a terminal emulator + at 115200 bps, 8n1; +- power on the board. + +i.MX6 SoloX SABRE SD +-------------------- + +To boot your newly created system on an i.MX6 SoloX SABRE SD Board +(refer to the i.MX6 SoloX SABRE SD Quick Start Guide for guidance): +- insert the SD card in the J4-SD4 socket at the bottom of the board; +- Set the SW10, SW11 and SW12 DIP switches at the top of the board in + their default position, to boot from SD card. Reference configuration: + + SW10 + 1 2 3 4 5 6 7 8 + off off off off off off off off + + SW11 + 1 2 3 4 5 6 7 8 + off off ON ON ON off off off + + SW12 + 1 2 3 4 5 6 7 8 + off ON off off off off off off + +- connect a Micro USB cable to the J16 Debug Port at the bottom of the + board. This is a dual UART debug port; connect to the first tty using + a terminal emulator at 115200 bps, 8n1; +- power on the board with the SW1-PWR switch at the top of the board. + +SABRE Auto +---------- + +To boot your newly created system on a SABRE Auto Board (refer to the SABRE for +Automotive Infotainment Quick Start Guide for guidance): +- insert the SD card in the CPU card SD card socket J14; +- Set the S1, S2 and S3 DIP switches and J3 jumper to boot from SD on CPU card. + Reference configuration: + + S1 + 1 2 3 4 5 6 7 8 9 10 + off ON off off ON off off off off off + + S2 + 1 2 3 4 + off off ON off + + S3 + 1 2 3 4 + off off ON ON + + J3: 1-2 + +- connect an RS-232 UART cable to CPU card debug port J18 UART DB9 and + connect using a terminal emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== + +https://community.freescale.com/docs/DOC-95015 +https://community.freescale.com/docs/DOC-95017 +https://community.freescale.com/docs/DOC-99218 diff --git a/buildroot/board/freescale/imx6sabresd/create-boot-sd.sh b/buildroot/board/freescale/imx6sabresd/create-boot-sd.sh deleted file mode 100755 index af45115c7..000000000 --- a/buildroot/board/freescale/imx6sabresd/create-boot-sd.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -set -u -set -e - -PROGNAME=$(basename $0) - -usage() -{ - echo "Create an SD card that boots on an i.MX53/6 board." - echo - echo "Note: all data on the the card will be completely deleted!" - echo "Use with care!" - echo "Superuser permissions may be required to write to the device." - echo - echo "Usage: ${PROGNAME} " - echo "Arguments:" - echo " The device to be written to" - echo - echo "Example: ${PROGNAME} /dev/mmcblk0" - echo -} - -if [ $# -ne 1 ]; then - usage - exit 1 -fi - -if [ $(id -u) -ne 0 ]; then - echo "${PROGNAME} must be run as root" - exit 1 -fi - -DEV=${1} - -# The partition name prefix depends on the device name: -# - /dev/sde -> /dev/sde1 -# - /dev/mmcblk0 -> /dev/mmcblk0p1 -if echo ${DEV}|grep -q mmcblk ; then - PART="p" -else - PART="" -fi - -PART1=${DEV}${PART}1 -PART2=${DEV}${PART}2 - -# Unmount the partitions if mounted -umount ${PART1} || true -umount ${PART2} || true - -# First, clear the card -dd if=/dev/zero of=${DEV} bs=1M count=20 - -sync - -# Partition the card. -# SD layout for i.MX6 boot: -# - Bootloader at offset 1024 -# - FAT partition starting at 1MB offset, containing uImage and *.dtb -# - ext2/3 partition formatted as ext2 or ext3, containing the root filesystem. -sfdisk ${DEV} < -Date: Tue, 12 Aug 2014 10:17:31 +0200 -Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Buildroot supplies a nice /init wrapper script to use when booting from a -ramdisk. - -This patch tells u-boot to tell the kernel to boot into /init (instead of -/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a -buildroot system entirely through USB. - -Signed-off-by: Vincent Stehlé ---- - include/configs/mx6qsabre_common.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h -index 69ff0df..ec7b665 100644 ---- a/include/configs/mx6qsabre_common.h -+++ b/include/configs/mx6qsabre_common.h -@@ -129,7 +129,7 @@ - - #define CONFIG_MFG_ENV_SETTINGS \ - "mfgtool_args=setenv bootargs console=" CONFIG_CONSOLE_DEV ",115200 " \ -- "rdinit=/linuxrc " \ -+ "rdinit=/init " \ - "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ - "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ - "g_mass_storage.iSerialNumber=\"\" "\ --- -2.0.1 - diff --git a/buildroot/board/freescale/imx6sabresd/readme.txt b/buildroot/board/freescale/imx6sabresd/readme.txt deleted file mode 100644 index 583ef4016..000000000 --- a/buildroot/board/freescale/imx6sabresd/readme.txt +++ /dev/null @@ -1,67 +0,0 @@ -******************************************************* -Freescale i.MX6Q and i.MX6DL SABRESD development boards -******************************************************* - -This file documents the Buildroot support for the Freescale SABRE Board for -Smart Devices Based on the i.MX 6 Series (SABRESD). - -Read the SABRESD Quick Start Guide for an introduction to the board: -http://cache.freescale.com/files/32bit/doc/quick_start_guide/SABRESDB_IMX6_QSG.pdf - -Build -===== - -First, configure Buildroot for your SABRESD board. -For i.MX6Q: - - make freescale_imx6qsabresd_defconfig - -For i.MX6DL: - - make freescale_imx6dlsabresd_defconfig - -Build all components: - - make - -You will find in ./output/images/ the following files: - - imx6dl-sabresd.dtb or imx6q-sabresd.dtb - - rootfs.ext2 - - rootfs.tar - - u-boot.imx - - uImage - -Create a bootable SD card -========================= - -To determine the device associated to the SD card have a look in the -/proc/partitions file: - - cat /proc/partitions - -Run the following script as root on your SD card. This will partition the card -and copy the bootloader, kernel, DTBs and root filesystem as needed. - -*** WARNING! The script will destroy all the card content. Use with care! *** - - ./board/freescale/imx6sabresd/create-boot-sd.sh - -Boot the SABRESD board -====================== - -To boot your newly created system (refer to the SABRESD Quick Start Guide for -guidance): -- insert the SD card in the SD3 slot of the board; -- locate the BOOT dip switches (SW6), set dips 2 and 7 to ON, all others to OFF; -- connect a Micro USB cable to Debug Port and connect using a terminal emulator - at 115200 bps, 8n1; -- power on the board. - -Enjoy! - -References -========== - -https://community.freescale.com/docs/DOC-95015 -https://community.freescale.com/docs/DOC-95017 -https://community.freescale.com/docs/DOC-99218 diff --git a/buildroot/board/freescale/imx6slevk/readme.txt b/buildroot/board/freescale/imx6slevk/readme.txt new file mode 100644 index 000000000..424380e31 --- /dev/null +++ b/buildroot/board/freescale/imx6slevk/readme.txt @@ -0,0 +1,14 @@ +NXP i.MX6SL EVK board +--------------------- + +To build a minimal support for this board: + +$ make imx6slevk_defconfig +$ make + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be flashed into the SD card: + +$ sudo dd if=output/images/sdcard.img of=/dev/; sync + +Then insert the SD card into the SD2 slot and boot the board. diff --git a/buildroot/board/freescale/imx6sxsdb/readme.txt b/buildroot/board/freescale/imx6sxsdb/readme.txt new file mode 100644 index 000000000..2779075f0 --- /dev/null +++ b/buildroot/board/freescale/imx6sxsdb/readme.txt @@ -0,0 +1,14 @@ +NXP i.MX6SX SDB board +--------------------- + +To build a minimal support for this board: + +$ make imx6sx-sdb_defconfig +$ make + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be flashed into the SD card: + +$ sudo dd if=output/images/sdcard.img of=/dev/; sync + +Then insert the SD card into the SD4 boot slot and boot the board. diff --git a/buildroot/board/freescale/imx6ulevk/readme.txt b/buildroot/board/freescale/imx6ulevk/readme.txt new file mode 100644 index 000000000..90355f354 --- /dev/null +++ b/buildroot/board/freescale/imx6ulevk/readme.txt @@ -0,0 +1,74 @@ +*************************** +Freescale i.MX6UL EVK board +*************************** + +This file documents the Buildroot support for the Freescale i.MX6UL EVK board. + +Please read the i.MX6UL Evaluation Kit Quick Start Guide [1] for an +introduction to the board. + +Build +===== + +First, configure Buildroot for your i.MX6UL EVK board: + +In order to to do so there are two supported options: + + make freescale_imx6ulevk_defconfig + +if you plan to use NXP provided U-Boot and kernel. + +or + + make imx6ulevk_defconfig + +if you plan to use mainline U-Boot and mainline kernel. + +Build all components: + + make + +You will find in ./output/images/ the following files: + - imx6ul-14x14-evk.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable microSD card +============================== + +To determine the device associated to the microSD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a microSD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX6UL EVK board +========================= + +To boot your newly created system (refer to the i.MX6UL EVK Quick Start Guide +[1] for guidance): +- insert the microSD card in the microSD slot of the board; +- verify that your i.MX6UL EVK board jumpers and switches are set as mentioned + in the i.MX6UL EVK Quick Start Guide [1]; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] http://cache.freescale.com/files/32bit/doc/quick_start_guide/IMX6ULTRALITEQSG.pdf diff --git a/buildroot/board/freescale/imx6ullevk/readme.txt b/buildroot/board/freescale/imx6ullevk/readme.txt new file mode 100644 index 000000000..77acec261 --- /dev/null +++ b/buildroot/board/freescale/imx6ullevk/readme.txt @@ -0,0 +1,71 @@ +**************************** +Freescale i.MX6ULL EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX6ULL EVK board. + +Build +===== + +First, configure Buildroot for your i.MX6ULL EVK board: + +In order to to do so there are two supported options: + + make freescale_imx6ullevk_defconfig + +if you plan to use NXP provided U-Boot and kernel. + +or + + make imx6ullevk_defconfig + +if you plan to use mainline U-Boot and mainline kernel. + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx6ull-14x14-evk.dtb + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.bin + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX6ULL EVK board +=========================== + +To boot your newly created system (refer to the i.MX 6ULL EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/files-static/32bit/doc/brochure/IMX6ULLQSG.pdf diff --git a/buildroot/board/freescale/imx7dsdb/readme.txt b/buildroot/board/freescale/imx7dsdb/readme.txt new file mode 100644 index 000000000..c6030f696 --- /dev/null +++ b/buildroot/board/freescale/imx7dsdb/readme.txt @@ -0,0 +1,54 @@ +*************************** +Freescale i.MX7D SDB board +*************************** + +This file documents the Buildroot support for the Freescale i.MX7D SDB board. + +Build +===== + +First, configure Buildroot for your i.MX7D SDB board: + + make freescale_imx7dsabresd_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx7d-sdb.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX7D SDB board +========================= + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/imx8mmevk/readme.txt b/buildroot/board/freescale/imx8mmevk/readme.txt new file mode 100644 index 000000000..7b69405d3 --- /dev/null +++ b/buildroot/board/freescale/imx8mmevk/readme.txt @@ -0,0 +1,71 @@ +*************************** +Freescale i.MX8MM EVK board +*************************** + +This file documents the Buildroot support for the Freescale i.MX8MM +EVK board. + +Build +===== + +First, configure Buildroot for the i.MX8MM EVK board: + + make freescale_imx8mmevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - fsl-imx8mm-evk.dtb + - Image + - imx8-boot-sd.bin + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.bin + - u-boot.imx + - u-boot-nodtb.bin + - u-boot-spl-ddr.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8MM EVK board +========================== + +To boot your newly created system (refer to the i.MX8MMini EVK Quick Start Guide +[1] for guidance): +- insert the SD card in the SD slot of the board; +- Configure the switches as follows: +SW1101: 0110110010 [D1-D10] +SW1102: 0001101000 [D1-D10] +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/document/guide/Get-Started-with-the-i.MX-8M-Mini-EVK:GS-iMX-8M-Mini-EVK diff --git a/buildroot/board/freescale/imx8mnevk/readme.txt b/buildroot/board/freescale/imx8mnevk/readme.txt new file mode 100644 index 000000000..d7700568f --- /dev/null +++ b/buildroot/board/freescale/imx8mnevk/readme.txt @@ -0,0 +1,73 @@ +*************************** +Freescale i.MX8MN EVK board +*************************** + +This file documents the Buildroot support for the i.MX8M Nano EVK board. + +Build +===== + +First, configure Buildroot for the i.MX8MN EVK board: + + make freescale_imx8mnevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - ddr4_201810_fw.bin + - ddr_fw.bin + - fsl-imx8mn-ddr4-evk.dtb + - Image + - imx8-boot-sd.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.bin + - u-boot.imx + - u-boot.itb + - u-boot-nodtb.bin + - u-boot-spl.bin + - u-boot-spl-ddr.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8MN EVK board +========================== + +To boot your newly created system (refer to the i.MX8MNano EVK Quick Start Guide +[1] for guidance): +- insert the SD card in the SD slot of the board; +- Configure the switches as follows (X = "don't care"): +SW1101: 1100XXXXXX [D1-D10] +SW1102: XXXXXXXXXX [D1-D10] +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-nano-applications-processor:8MNANOD4-EVK diff --git a/buildroot/board/freescale/imx8mqevk/readme.txt b/buildroot/board/freescale/imx8mqevk/readme.txt new file mode 100644 index 000000000..e60eba4cb --- /dev/null +++ b/buildroot/board/freescale/imx8mqevk/readme.txt @@ -0,0 +1,80 @@ +*************************** +Freescale i.MX8MQ EVK board +*************************** + +This file documents the Buildroot support for the Freescale i.MX8MQ +EVK board. + +Build +===== + +First, configure Buildroot for the i.MX8MQ EVK board: + + make freescale_imx8mqevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - fsl-imx8mq-evk.dtb + - Image + - imx8-boot-sd.bin + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - signed_hdmi_imx8m.bin + - u-boot.bin + - u-boot.imx + - u-boot-nodtb.bin + - u-boot-spl-ddr.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8MQ EVK board +========================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- Configure the switches as follows: +SW801: ON ON OFF OFF +SW802: ON OFF +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enable HDMI output +================== + +To enable HDMI output at boot you must provide the video kernel boot +argument. To set the video boot argument from U-Boot run after +stopping in U-Boot prompt: + +setenv mmcargs 'setenv bootargs console=${console} root=${mmcroot} video=HDMI-A-1:1920x1080-32@60' +saveenv +reset + +Change screen resolution to suit your connected display. + +Enjoy! diff --git a/buildroot/board/freescale/imx8qmmek/readme.txt b/buildroot/board/freescale/imx8qmmek/readme.txt new file mode 100644 index 000000000..b6bb3c476 --- /dev/null +++ b/buildroot/board/freescale/imx8qmmek/readme.txt @@ -0,0 +1,76 @@ +*************************** +Freescale i.MX8QM MEK board +*************************** + +This file documents the Buildroot support for the NXP i.MX8QM MEK board. + +You will find a reference to the board on nxp.com: +https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-8quadmax-multisensory-enablement-kit-mek:MCIMX8QM-CPU + +You can also find the get started guide here: +https://www.nxp.com/document/guide/get-started-with-the-i.mx-8quadmax-mek:GS-iMX-8QM-MEK + +Build +===== + +First, configure Buildroot for the i.MX8QM MEK board: + +$ make freescale_imx8qmmek_defconfig + +Build all components: + +$ make + +You will find in output/images/ the following files: + - ahab-container.img + - bl31.bin + - boot.vfat + - fsl-imx8qm-mek.dtb + - Image + - imx8-boot-sd.bin + - mkimg.commit + - mx8qm-mek-scfw-tcm.bin + - mx8qm-val-scfw-tcm.bin + - mx8qm-a0-ddr4-scfw-tcm.bin + - mx8qm-a0-mek-scfw-tcm.bin + - mx8qm-a0-val-scfw-tcm.bin + - mx8qm-ddr4-scfw-tcm.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot-atf.bin + - u-boot.bin + - u-boot-hash.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8QM MEK board +========================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- Configure the boot switch as follows: +SW2: OFF OFF ON ON OFF OFF +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/imx8qxpmek/readme.txt b/buildroot/board/freescale/imx8qxpmek/readme.txt new file mode 100644 index 000000000..45f7915fe --- /dev/null +++ b/buildroot/board/freescale/imx8qxpmek/readme.txt @@ -0,0 +1,67 @@ +*************************** +Freescale i.MX8QXP MEK board +*************************** + +This file documents the Buildroot support for the Freescale i.MX8QXP +MEK board. + +Build +===== + +First, configure Buildroot for the i.MX8QXP MEK board: + + make freescale_imx8qxpmek_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - ahab-container.img + - bl31.bin + - boot.vfat + - fsl-imx8qxp-mek.dtb + - Image + - imx8-boot-sd.bin + - mkimg.commit + - mx8qx-mek-scfw-tcm.bin + - mx8qx-val-scfw-tcm.bin + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot-atf.bin + - u-boot.bin + - u-boot-hash.bin + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template_imx8. + +Boot the i.MX8QXP MEK board +========================== + +To boot your newly created system: +- insert the SD card in the SD slot of the board; +- Configure the boot switch as follows: +SW2: ON ON OFF OFF +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/buildroot/board/freescale/mpc8315erdb/linux-3.18.config b/buildroot/board/freescale/mpc8315erdb/linux-3.18.config deleted file mode 100644 index a994706fc..000000000 --- a/buildroot/board/freescale/mpc8315erdb/linux-3.18.config +++ /dev/null @@ -1,92 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_KALLSYMS is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -# CONFIG_PPC_CHRP is not set -# CONFIG_PPC_PMAC is not set -CONFIG_PPC_83xx=y -CONFIG_MPC831x_RDB=y -CONFIG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_FW_LOADER is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSL_ELBC=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_SPI_ATTRS=y -CONFIG_ATA=y -CONFIG_SATA_FSL=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_NETDEVICES=y -CONFIG_GIANFAR=y -CONFIG_E100=y -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MPC=y -CONFIG_SPI=y -CONFIG_SPI_BITBANG=y -CONFIG_WATCHDOG=y -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_FSL=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PPC_OF_BE=y -CONFIG_USB_UHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/buildroot/board/freescale/mpc8315erdb/readme.txt b/buildroot/board/freescale/mpc8315erdb/readme.txt deleted file mode 100644 index 446bd397c..000000000 --- a/buildroot/board/freescale/mpc8315erdb/readme.txt +++ /dev/null @@ -1,62 +0,0 @@ - -******************** WARNING ******************** -The compiled U-Boot binary is intended for NAND flash only! -It won't work for NOR and will brick that bootloader! - -Also don't go playing around with different U-boot versions or flash targets -unless you've got the necessary hardware and/or know-how to unbrick your kit. - -2014.04 is known good for NAND. -******************** WARNING ******************** - -You'll need to program the files created by buildroot into the flash. -The fast way is to tftp transfer the files via one of the network interfaces. - -Alternatively you can transfer the files via serial console with an Ymodem -file transfer from your terminal program by using a "loady" command -from the u-boot prompt instead of the "tftp ..." commands stated below. -Beware that serial console file transfers are quite slow! - -Remember to set the MPC8315ERDB switches to NAND boot if you want to use -your newly built U-Boot. - -1. Program the new U-Boot binary to NAND flash (optional) - If you don't feel confident upgrading your bootloader then don't do it, - it's unnecessary most of the time. - - => tftp $loadaddr u-boot-nand.bin - => nand erase 0 0x80000 - => nand write $loadaddr 0 0x80000 $filesize - -2. Program the kernel to NAND flash - - => tftp $loadaddr uImage - => nand erase 0x100000 0x1e0000 - => nand write $loadaddr 0x100000 0x1e0000 - -3. Program the DTB to NAND flash - - => tftp $loadaddr mpc8315erdb.dtb - => nand erase 0x2e0000 0x20000 - => nand write $loadaddr 0x2e0000 0x20000 - -4. Program the root filesystem to NAND flash - - => tftp $loadaddr rootfs.jffs2 - => nand erase 0x400000 0x1c00000 - => nand write $loadaddr 0x400000 $filesize - -5. Booting your new system - - => setenv nandboot 'setenv bootargs root=/dev/mtdblock3 rootfstype=jffs2 console=$consoledev,$baudrate;nand read $fdtaddr 0x2e0000 0x20000;nand read $loadaddr 0x100000 0x1e0000;bootm $loadaddr - $fdtaddr' - - If you want to set this boot option as default: - - => setenv bootcmd 'run nandboot' - => saveenv - - ...or for a single boot: - - => run nandboot - - You can login with user "root". diff --git a/buildroot/board/freescale/p1010rdb/linux-3.18.config b/buildroot/board/freescale/p1010rdb/linux-3.18.config deleted file mode 100644 index c48c4fb5d..000000000 --- a/buildroot/board/freescale/p1010rdb/linux-3.18.config +++ /dev/null @@ -1,129 +0,0 @@ -CONFIG_PPC_85xx=y -CONFIG_PHYS_64BIT=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_AUDIT=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_P1010_RDB=y -CONFIG_HIGHMEM=y -CONFIG_SWIOTLB=y -CONFIG_FORCE_MAX_ZONEORDER=12 -CONFIG_PCI=y -CONFIG_PCI_MSI=y -CONFIG_RAPIDIO=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_INET_ESP=y -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_IPV6=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_FTL=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSL_ELBC=y -CONFIG_MTD_NAND_FSL_IFC=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=131072 -CONFIG_EEPROM_LEGACY=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_LOGGING=y -CONFIG_ATA=y -CONFIG_SATA_FSL=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_GIANFAR=y -CONFIG_VITESSE_PHY=y -CONFIG_FIXED_PHY=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_NVRAM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MPC=y -CONFIG_SPI=y -CONFIG_SPI_FSL_SPI=y -CONFIG_SPI_FSL_ESPI=y -# CONFIG_HWMON is not set -CONFIG_USB=y -CONFIG_USB_MON=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_FSL=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_OF_ESDHC=y -CONFIG_EDAC=y -CONFIG_EDAC_MM_EDAC=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_CMOS=y -CONFIG_DMADEVICES=y -CONFIG_FSL_DMA=y -CONFIG_EXT4_FS=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_SQUASHFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_CRC_T10DIF=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_FSL_CAAM=y diff --git a/buildroot/board/freescale/p1010rdb/readme.txt b/buildroot/board/freescale/p1010rdb/readme.txt deleted file mode 100644 index b119f9a47..000000000 --- a/buildroot/board/freescale/p1010rdb/readme.txt +++ /dev/null @@ -1,77 +0,0 @@ - -******************** WARNING ******************** -The compiled U-Boot binary is intended for NOR flash only! -It won't work for NAND or SPI and will brick those bootloaders! - -Also don't go playing around with different U-boot versions or flash targets -unless you've got the necessary hardware and/or know-how to unbrick your kit. - -2014.01 is known good for NOR on the P1010RDB-PA kit. - -Freescale released a revised version of the kit with a faster processor and -some other hardware changes named P1010RDB-PB. U-Boot needs to be configured -differently for this kit hence this default config WILL NOT WORK. -This is ONLY related to U-Boot, otherwise the configuration is the same, -you can perfectly use the generated kernel and rootfs. - -IF you want to build an U-Boot for the new kit just change -BR2_TARGET_UBOOT_BOARDNAME from P1010RDB-PA_NOR to P1010RDB-PB_NOR. -!!!!! THIS IS COMPLETELY UNTESTED BY BR DEVS SO YOU ARE ON YOUR OWN !!!!! -If it works we'd like to know so drop an email to the mailing list. Thanks. - -If your kit doesn't mention PA nor PB in their shipping inventory then it's -the old version (PA). -******************** WARNING ******************** - -You'll need to program the files created by buildroot into the flash. -The fast way is to tftp transfer the files via one of the network interfaces. - -Alternatively you can transfer the files via serial console with an Ymodem -file transfer from your terminal program by using a "loady" command -from the u-boot prompt instead of the "tftp ..." commands stated below. -Beware that serial console file transfers are quite slow! - -Remember to set the P1010RDB switches to NOR boot if you want to use -your newly built U-Boot. - -1. Program the new U-Boot binary to NOR flash (optional) - If you don't feel confident upgrading your bootloader then don't do it, - it's unnecessary most of the time. - - => tftp $loadaddr u-boot.bin - => protect off 0xeff80000 +$filesize - => erase 0xeff80000 +$filesize - => cp.b $loadaddr 0xeff80000 $filesize - -2. Program the DTB to NOR flash - - => tftp $loadaddr p1010rdb-pa.dtb - => erase 0xee000000 +$filesize - => cp.b $loadaddr 0xee000000 $filesize - -3. Program the kernel to NOR flash - - => tftp $loadaddr uImage - => erase 0xee080000 +$filesize - => cp.b $loadaddr 0xee080000 $filesize - -4. Program the root filesystem to NOR flash - - => tftp $loadaddr rootfs.jffs2 - => erase 0xee800000 0xeff5ffff - => cp.b $loadaddr 0xee800000 $filesize - -5. Booting your new system - - => setenv norboot 'setenv bootargs root=/dev/mtdblock2 rootfstype=jffs2 console=$consoledev,$baudrate;bootm 0xee080000 - 0xee000000' - - If you want to set this boot option as default: - - => setenv bootcmd 'run norboot' - => saveenv - - ...or for a single boot: - - => run norboot - - You can login with user "root". diff --git a/buildroot/board/freescale/p1025twr/readme.txt b/buildroot/board/freescale/p1025twr/readme.txt new file mode 100644 index 000000000..9179aeac6 --- /dev/null +++ b/buildroot/board/freescale/p1025twr/readme.txt @@ -0,0 +1,25 @@ +The bootloader is no longer buildable in the latest Freescale/NXP tree or +upstream. As such, retrieve the "Image: SDK V1.2 e500v2 Binary ISO" from +NXP downloads and follow the release notes for reflashing. + +For programming the kernel and rootfs created by buildroot into the flash. +The fast way is to tftp transfer the files via one of the network interfaces. +Make sure your devkit has ipaddr and serverip defined to reach your tftp +server. + +(Assuming the default u-boot env from NXP) +1. Program the DTB to NOR flash + + => setenv dtbfile p1025twr.dtb + => run dtbflash + +2. Program the kernel and rootfs to NOR flash (reusing orignal rootfs + NOR location, as the kernel location is to small) + + => tftpboot $loadaddr uImage; protect off 0xeeb80000 +$filesize; erase 0xeeb80000 +$filesize; cp.b $loadaddr 0xeeb80000 $filesize; protect on 0xeeb80000 +$filesize; cmp.b $loadaddr 0xefa80000 $filesize + +3. Booting your new system + + => bootm 0xeeb80000 - 0xefe80000 + + You can login with user "root". diff --git a/buildroot/board/freescale/p2020ds/linux-3.12.config b/buildroot/board/freescale/p2020ds/linux-3.12.config deleted file mode 100644 index 7181a6dcb..000000000 --- a/buildroot/board/freescale/p2020ds/linux-3.12.config +++ /dev/null @@ -1,374 +0,0 @@ -CONFIG_PPC_85xx=y -CONFIG_PHYS_64BIT=y -CONFIG_SMP=y -CONFIG_NR_CPUS=8 -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_FHANDLE=y -CONFIG_AUDIT=y -CONFIG_IRQ_DOMAIN_DEBUG=y -CONFIG_NO_HZ_IDLE=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_CGROUPS=y -CONFIG_NAMESPACES=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_MAC_PARTITION=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_POWERNV_MSI is not set -CONFIG_MPC85xx_DS=y -CONFIG_HIGHMEM=y -CONFIG_HOTPLUG_CPU=y -CONFIG_IRQ_ALL_CPUS=y -CONFIG_FORCE_MAX_ZONEORDER=12 -# CONFIG_SUSPEND is not set -CONFIG_PCI=y -CONFIG_PCIEPORTBUS=y -CONFIG_PCI_MSI=y -CONFIG_RAPIDIO=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -CONFIG_INET_ESP=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_SECMARK=y -CONFIG_NF_CONNTRACK_ZONES=y -CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CONNTRACK_TIMEOUT=y -CONFIG_NF_CONNTRACK_TIMESTAMP=y -CONFIG_NF_CT_PROTO_DCCP=m -CONFIG_NF_CT_PROTO_UDPLITE=m -CONFIG_NF_CONNTRACK_AMANDA=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_H323=m -CONFIG_NF_CONNTRACK_IRC=m -CONFIG_NF_CONNTRACK_NETBIOS_NS=m -CONFIG_NF_CONNTRACK_SNMP=m -CONFIG_NF_CONNTRACK_PPTP=m -CONFIG_NF_CONNTRACK_SANE=m -CONFIG_NF_CONNTRACK_SIP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NF_CT_NETLINK=m -CONFIG_NF_CT_NETLINK_TIMEOUT=m -CONFIG_NF_CT_NETLINK_HELPER=m -CONFIG_NETFILTER_NETLINK_QUEUE_CT=y -CONFIG_NETFILTER_XT_TARGET_AUDIT=m -CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_HMARK=m -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_LOG=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_TEE=m -CONFIG_NETFILTER_XT_TARGET_TPROXY=m -CONFIG_NETFILTER_XT_TARGET_TRACE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m -CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -CONFIG_NETFILTER_XT_MATCH_BPF=m -CONFIG_NETFILTER_XT_MATCH_CLUSTER=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_CPU=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_NFACCT=m -CONFIG_NETFILTER_XT_MATCH_OSF=m -CONFIG_NETFILTER_XT_MATCH_OWNER=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_RATEEST=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_RECENT=m -CONFIG_NETFILTER_XT_MATCH_SOCKET=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_RPFILTER=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_SYNPROXY=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT_IPV4=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_MH=m -CONFIG_IP6_NF_MATCH_RPFILTER=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_SYNPROXY=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_RAW=m -CONFIG_NF_NAT_IPV6=m -CONFIG_IP6_NF_TARGET_MASQUERADE=m -CONFIG_IP6_NF_TARGET_NPT=m -CONFIG_IP_SCTP=m -CONFIG_BRIDGE=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FW_LOADER_USER_HELPER is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_FTL=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSL_ELBC=y -CONFIG_MTD_NAND_FSL_IFC=y -CONFIG_MTD_UBI=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_EEPROM_LEGACY=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_LOGGING=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_FSL=y -CONFIG_SATA_SIL24=y -CONFIG_PATA_ALI=y -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -CONFIG_MD_RAID10=y -CONFIG_MD_RAID456=y -CONFIG_MD_MULTIPATH=y -CONFIG_BCACHE=y -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_THIN_PROVISIONING=m -CONFIG_DM_CACHE=m -CONFIG_DM_MIRROR=m -CONFIG_DM_RAID=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_TUN=y -CONFIG_NET_TULIP=y -CONFIG_GIANFAR=y -CONFIG_E1000E=y -CONFIG_AT803X_PHY=y -CONFIG_ATHEROS_PHY=y -CONFIG_MARVELL_PHY=y -CONFIG_DAVICOM_PHY=y -CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_DP8384x_PHY=y -CONFIG_FIXED_PHY=y -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MPPE=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPPOE=m -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_ATH_CARDS=m -CONFIG_ATH9K=m -CONFIG_ATH9K_HTC=m -CONFIG_RT2X00=m -CONFIG_RT2800PCI=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RT2800USB_RT3573=y -CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_RT55XX=y -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_NVRAM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MPC=y -CONFIG_SPI=y -CONFIG_SPI_FSL_SPI=y -CONFIG_SPI_FSL_ESPI=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_MPC8XXX=y -# CONFIG_HWMON is not set -# CONFIG_VGA_ARB is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_HRTIMER=m -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_DRIVERS is not set -CONFIG_SND_INTEL8X0=m -# CONFIG_SND_PPC is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -# CONFIG_HID_GENERIC is not set -# CONFIG_USB_HID is not set -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_FSL=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PPC_OF_BE=y -CONFIG_USB_OHCI_HCD_PPC_OF_LE=y -CONFIG_USB_STORAGE=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_OF_ESDHC=y -CONFIG_EDAC=y -CONFIG_EDAC_MM_EDAC=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_CMOS=y -CONFIG_DMADEVICES=y -CONFIG_FSL_DMA=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_FANOTIFY=y -CONFIG_FUSE_FS=m -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_FS_XATTR=y -CONFIG_UBIFS_FS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_XATTR=y -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=y -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=m -CONFIG_CIFS=m -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG is not set -CONFIG_CIFS_SMB2=y -CONFIG_CIFS_FSCACHE=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=m -CONFIG_CRC_T10DIF=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_TALITOS=y diff --git a/buildroot/board/freescale/p2020ds/linux-fix-c6187597-breakage.patch b/buildroot/board/freescale/p2020ds/linux-fix-c6187597-breakage.patch deleted file mode 100644 index 598f92d3c..000000000 --- a/buildroot/board/freescale/p2020ds/linux-fix-c6187597-breakage.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Nikita Yushchenko -Subject: [PATCH] usb: pci-quirks: do not access OHCI_FMINTERVAL register on ULI hw - -This access causes hang on Freescale P2020DS board (that has OHCI -provided by ULI 1533 chip). - -Since preserving OHCI_FMINTERVAL was originally done only for NVIDIA -hardware and only later (in c6187597) was turned unconditional, and -c6187597 commit message again mentions only NVIDIA, I think it should be -safe to disable preserving OHCI_FMINTERVAL if device vendor is ULI. - -Signed-off-by: Nikita Yushchenko ---- - drivers/usb/host/pci-quirks.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c -index 00661d3..5acbd5b 100644 ---- a/drivers/usb/host/pci-quirks.c -+++ b/drivers/usb/host/pci-quirks.c -@@ -571,7 +571,7 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev) - { - void __iomem *base; - u32 control; -- u32 fminterval; -+ u32 uninitialized_var(fminterval); - int cnt; - - if (!mmio_resource_enabled(pdev, 0)) -@@ -619,7 +619,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev) - } - - /* software reset of the controller, preserving HcFmInterval */ -- fminterval = readl(base + OHCI_FMINTERVAL); -+ if (pdev->vendor != PCI_VENDOR_ID_AL) -+ fminterval = readl(base + OHCI_FMINTERVAL); - writel(OHCI_HCR, base + OHCI_CMDSTATUS); - - /* reset requires max 10 us delay */ -@@ -628,7 +629,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev) - break; - udelay(1); - } -- writel(fminterval, base + OHCI_FMINTERVAL); -+ if (pdev->vendor != PCI_VENDOR_ID_AL) -+ writel(fminterval, base + OHCI_FMINTERVAL); - - /* Now the controller is safely in SUSPEND and nothing can wake it up */ - iounmap(base); --- -1.7.10.4 diff --git a/buildroot/board/freescale/p2020ds/readme.txt b/buildroot/board/freescale/p2020ds/readme.txt deleted file mode 100644 index a9735b07c..000000000 --- a/buildroot/board/freescale/p2020ds/readme.txt +++ /dev/null @@ -1,40 +0,0 @@ -You'll need to program the files created by buildroot into the flash. -The fast way is to tftp transfer the files via one of the network interfaces. - -Alternatively you can transfer the files via serial console with an Ymodem -file transfer from your terminal program by using a "loady" command -from the u-boot prompt instead of the "tftp ..." commands stated below. -Beware that serial console file transfers are quite slow! - -1. Program the DTB to NOR flash - - => tftp ${loadaddr} p2020ds.dtb - => erase 0xeff00000 0xeff7ffff - => cp.b ${loadaddr} 0xeff00000 ${filesize} - -2. Program the kernel to NOR flash - - => tftp ${loadaddr} uImage - => erase 0xec000000 0xec3fffff - => cp.b ${loadaddr} 0xec000000 ${filesize} - -3. Program the root filesystem to NOR flash - - => tftp ${loadaddr} rootfs.jffs2 - => erase 0xec400000 0xeeffffff - => cp.b ${loadaddr} 0xec400000 ${filesize} - -4. Booting your new system - - => setenv jffs2boot 'setenv bootargs root=/dev/mtdblock4 rootfstype=jffs2 rw console=ttyS0,115200;bootm ec000000 - eff00000' - - If you want to set this boot option as default: - - => setenv bootcmd 'run jffs2boot' - => saveenv - - ...or for a single boot: - - => run jffs2boot - - You can login with user "root". diff --git a/buildroot/board/freescale/t1040_t2080/readme.txt b/buildroot/board/freescale/t1040_t2080/readme.txt new file mode 100644 index 000000000..65695295f --- /dev/null +++ b/buildroot/board/freescale/t1040_t2080/readme.txt @@ -0,0 +1,51 @@ +For the bootloader, NXP has stablized at SDK2.0 (final release). It is +suggested to download the prebuilt from NXP downloads and follow the +release notes for reflashing. + +To program the kernel and rootfs created by buildroot into the flash. The +fast way is to tftp transfer the files via one of the network interfaces. +Make sure your devkit has ipaddr, netmask, and serverip defined to reach your +tftp server. Verify bootargs are reasonable (console=ttyS0,115200). + +------------------------------------------------------------------------------ + +Devkit: T1040RDB + +(Assuming the default u-boot env from NXP) +1. Program the DTB to NOR flash + + => tftpboot $loadaddr t1040d4rdb.dtb; protect off 0xe8800000 +$filesize; erase 0xe8800000 +$filesize; cp.b $loadaddr 0xe8800000 $filesize; protect on 0xe8800000 +$filesize; cmp.b $loadaddr 0xe8800000 $filesize + +2. Program the kernel and rootfs to NOR flash + + => tftpboot $loadaddr uImage; protect off 0xe8020000 +$filesize; erase 0xe8020000 +$filesize; cp.b $loadaddr 0xe8020000 $filesize; protect on 0xe8020000 +$filesize; cmp.b $loadaddr 0xe8020000 $filesize + => tftpboot $loadaddr rootfs.cpio.uboot; protect off 0xe9300000 +$filesize; erase 0xe9300000 +$filesize; cp.b $loadaddr 0xe9300000 $filesize; protect on 0xe9300000 +$filesize; cmp.b $loadaddr 0xe9300000 $filesize + +3. Booting your new system + + => boot + + You can login with user "root". +------------------------------------------------------------------------------ + +Devkit: T2080 QDS or RDB + +(Assuming the default u-boot env from NXP) +1. Netboot the kernel/rootfs/dtb + + => tftp 0x1000000 uImage && tftp 0x2000000 rootfs.cpio.uboot + + RDB => tftp 0x3000000 t2080rdb.dtb + or + QDS => tftp 0x3000000 t2080qds.dtb + +2. Booting your new system + + => bootm 0x1000000 0x2000000 0x3000000 + + You can login with user "root". + +3. If flashing is desired, a similar approach to the T1040 can be followed + with updated addresses for the flash layout. Example is in the NXP default + env. +------------------------------------------------------------------------------ diff --git a/buildroot/board/freescale/warpboard/README b/buildroot/board/freescale/warpboard/README new file mode 100644 index 000000000..67d4e044e --- /dev/null +++ b/buildroot/board/freescale/warpboard/README @@ -0,0 +1,77 @@ +Build +===== + +First, configure Buildroot for your WarpBoard. + make warpboard_defconfig + +Build all components: + make + +You will find in ./output/images/ the following files: + - imx6sl-warp.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Update uboot +============ + +- Put warpboard in USB download mode by closing the j2 jumper on the + daugther board + +- Load u-boot.imx in the WarpBoard by using the imx-usb-loader host utility: + + $ ./output/host/bin/imx_usb -c output/host/etc/imx-loader.d/ output/images/u-boot.imx + +- U-Boot will appear in minicom + +- Reset the U-Boot environment to its default: + => env default -f -a + => saveenv + +- Run the DFU command in U-Boot: + => dfu 0 mmc 0 + +- Transfer U-Boot into flash by running this command in host side: + + $ sudo ./output/host/bin/dfu-util -D output/images/u-boot.imx -a boot + +- remove power and put the WarpBoard back into normal boot mode by + opening the j2 jumper. + +Update linux & rootfs +===================== + +Run the 'ums' command from the U-Boot prompt to mount the eMMC as USB mass +storage: + +=> ums 0 mmc 0 + +And then flash the sdcard.img into the eMMC: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the eMMC content. Use it with care! *** + +Using bluetooth +================ + +Enable the bluez_utils or bluez5_utils package, and then run: + +$ hciattach /dev/ttymxc4 any +$ hciconfig hci0 up + +Using Wifi +========== + +# modprobe brcmfmac +# iwconfig wlan0 essid ACCESSPOINTNAME +# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf +(enter the wifi password and press enter) +# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf & +# udhcpc -i wlan0 +# ping buildroot.org + +Enjoy! diff --git a/buildroot/board/freescale/warpboard/linux.fragment b/buildroot/board/freescale/warpboard/linux.fragment new file mode 100644 index 000000000..892d0cb7b --- /dev/null +++ b/buildroot/board/freescale/warpboard/linux.fragment @@ -0,0 +1 @@ +CONFIG_CFG80211_WEXT=y diff --git a/buildroot/board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt b/buildroot/board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt new file mode 100644 index 000000000..9546246b9 --- /dev/null +++ b/buildroot/board/freescale/warpboard/rootfs_overlay/lib/firmware/brcm/brcmfmac4330-sdio.txt @@ -0,0 +1,40 @@ +# bcm94330wlsdgb.txt +manfid=0x2d0 +prodid=0x0552 +vendid=0x14e4 +devid=0x4360 +boardtype=0x0552 +boardrev=0x11 +# this design has 2.4GHz SP3T switch +boardflags=0x00080200 +nocrc=1 +xtalfreq=37400 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +ag0=255 +aa2g=1 +ccode=CN +pa0b0=0x14d0 +pa0b1=0xfd98 +pa0b2=0xff78 +rssismf2g=0xa +rssismc2g=0x3 +rssisav2g=0x7 +maxp2ga0=0x50 +sromrev=3 +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b +cckPwrOffset=5 +ofdm2gpo=0x66666666 +mcs2gpo0=0x6666 +mcs2gpo1=0x6666 +swctrlmap_2g=0x04040404,0x02020202,0x02020404,0x10202,0x1ff +swctrlmap_5g=0x00100010,0x00280020,0x00200010,0x14202,0x2f8 +rfreg033=0x19 +rfreg033_cck=0x1f +dacrate2g=160 +txalpfbyp2g=1 +bphyscale=17 +cckPwrIdxCorr=-15 +pacalidx2g=45 +txgaintbl=1 diff --git a/buildroot/board/friendlyarm/nanopi-a64/boot.cmd b/buildroot/board/friendlyarm/nanopi-a64/boot.cmd new file mode 100644 index 000000000..446bd8567 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-a64/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-nanopi-a64.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-a64/genimage.cfg b/buildroot/board/friendlyarm/nanopi-a64/genimage.cfg new file mode 100644 index 000000000..66b6c5f46 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-a64/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-nanopi-a64.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-a64/readme.txt b/buildroot/board/friendlyarm/nanopi-a64/readme.txt new file mode 100644 index 000000000..88c4e661c --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-a64/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Nanopi A64. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Nanopi A64 link: +http://nanopi.io/nanopi-a64.html + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/FriendlyARM+Nanopi+A64 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make friendlyarm_nanopi_a64_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Nanopi A64 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/friendlyarm/nanopi-m1-plus/boot.cmd b/buildroot/board/friendlyarm/nanopi-m1-plus/boot.cmd new file mode 100644 index 000000000..35a1d65d3 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1-plus/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-m1-plus.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-m1-plus/genimage.cfg b/buildroot/board/friendlyarm/nanopi-m1-plus/genimage.cfg new file mode 100644 index 000000000..fdb3b9067 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1-plus/genimage.cfg @@ -0,0 +1,35 @@ +# Minimal SD card image for the NanoPi M1 Plus +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-m1-plus.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-m1-plus/readme.txt b/buildroot/board/friendlyarm/nanopi-m1-plus/readme.txt new file mode 100644 index 000000000..3e16c8afa --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1-plus/readme.txt @@ -0,0 +1,29 @@ +NanoPi M1 Plus + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi M1 Plus. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make nanopi_m1_plus_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/friendlyarm/nanopi-m1/boot.cmd b/buildroot/board/friendlyarm/nanopi-m1/boot.cmd new file mode 100644 index 000000000..b4d612ede --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-m1.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-m1/genimage.cfg b/buildroot/board/friendlyarm/nanopi-m1/genimage.cfg new file mode 100644 index 000000000..23c9c7dca --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the NanoPi M1 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-m1.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/friendlyarm/nanopi-m1/readme.txt b/buildroot/board/friendlyarm/nanopi-m1/readme.txt new file mode 100644 index 000000000..8b10e4b7c --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-m1/readme.txt @@ -0,0 +1,29 @@ +NanoPi M1 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi M1. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make nanopi_m1_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/extlinux.conf b/buildroot/board/friendlyarm/nanopi-neo-plus2/extlinux.conf new file mode 100644 index 000000000..fcb6f632c --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /Image + devicetree /sun50i-h5-nanopi-neo-plus2.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/genimage.cfg b/buildroot/board/friendlyarm/nanopi-neo-plus2/genimage.cfg new file mode 100644 index 000000000..fb871abd4 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h5-nanopi-neo-plus2.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/linux-extras.config b/buildroot/board/friendlyarm/nanopi-neo-plus2/linux-extras.config new file mode 100644 index 000000000..52b4b4b29 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/linux-extras.config @@ -0,0 +1,10 @@ +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_BRCMFMAC=m diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/post-build.sh b/buildroot/board/friendlyarm/nanopi-neo-plus2/post-build.sh new file mode 100755 index 000000000..ec20fca7d --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/readme.txt b/buildroot/board/friendlyarm/nanopi-neo-plus2/readme.txt new file mode 100644 index 000000000..ae5995202 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Nanopi NEO Plus2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Nanopi NEO2 link: +http://nanopi.io/nanopi-neo-plus2.html + +Wiki link: +http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO_Plus2 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make friendlyarm_nanopi_neo_plus2_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Nanopi NEO Plus2 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/friendlyarm/nanopi-neo-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-neo-plus2.txt b/buildroot/board/friendlyarm/nanopi-neo-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-neo-plus2.txt new file mode 100644 index 000000000..740d172eb --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-neo-plus2.txt @@ -0,0 +1,53 @@ +#AP6212_NVRAM_V1.0.1_20160606 +# 2.4 GHz, 20 MHz BW mode +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1101 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +xtalfreq=26000 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=90 +txpwrbckof=6 +cckbw202gpo=0x5555 +legofdmbw202gpo=0x77777777 +mcsbw202gpo=0xaaaaaaaa + +# OFDM IIR : +ofdmdigfilttype=7 +# PAPD mode: +papdmode=2 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +#OOB parameters +hostwake=0x40 +hostrdy=0x41 +usbrdy=0x03 +usbrdydelay=100 +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x10 for Host awake +muxenab=0x10 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 +glitch_based_crsmin=1 diff --git a/buildroot/board/friendlyarm/nanopi-neo/boot.cmd b/buildroot/board/friendlyarm/nanopi-neo/boot.cmd new file mode 100644 index 000000000..787405785 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-neo.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-neo/genimage.cfg b/buildroot/board/friendlyarm/nanopi-neo/genimage.cfg new file mode 100644 index 000000000..f6adc4af3 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-neo.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-neo/readme.txt b/buildroot/board/friendlyarm/nanopi-neo/readme.txt new file mode 100644 index 000000000..539df541d --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo/readme.txt @@ -0,0 +1,42 @@ +Intro +===== + +The instructions herein are valid for the FriendlyARM NanoPi NEO, +both the 256MiB and 512MiB versions. They should also work for the +NanoPi NEO Air, but this is untested so far. + +The FriendlyARM Nanopi NEO is a 4x4cm² board with an Allwiner H3 SoC: + - quad-core Cortex-A7 @1.2GHz + - 256 or 512MiB of DDR + - uSDCard as only storage option + - 3x USB 2.0 host (one socket, two on expansion pin-holes) + - 1x USB 2.0 OTG (also used as power source) + - 10/100 ethernet MAC + - GPIOs, SPI, I2c... + +Support for the Nanopi NEO in U-Boot and Linux is very recent, so only +core, basic features are available. + +Unfortunately, support for the ethernet MAC and the USB OTG are not +yet upstream, but are being actively worked on. + + +How to build +============ + + $ make nanopi_neo_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +You will then obtain an image ready to be written to your micro SDcard: + + $ dd if=output/images/sdcard.img of=/dev/sdX bs=1M + +Notes: + - replace 'sdX' with the actual device with your micro SDcard, + - you may need to be root to do that (use 'sudo'). + +Insert the micro SDcard in your NanoPi NEO and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/friendlyarm/nanopi-neo2/boot.cmd b/buildroot/board/friendlyarm/nanopi-neo2/boot.cmd new file mode 100644 index 000000000..9a39f4afc --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo2/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-h5-nanopi-neo2.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-neo2/genimage.cfg b/buildroot/board/friendlyarm/nanopi-neo2/genimage.cfg new file mode 100644 index 000000000..ebe123b75 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo2/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h5-nanopi-neo2.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-neo2/readme.txt b/buildroot/board/friendlyarm/nanopi-neo2/readme.txt new file mode 100644 index 000000000..0f445e2be --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo2/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Nanopi NEO2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Nanopi NEO2 link: +http://nanopi.io/nanopi-neo2.html + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/FriendlyARM+NanoPi+NEO2 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make friendlyarm_nanopi_neo2_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Nanopi NEO2 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/friendlyarm/nanopi-neo4/extlinux.conf b/buildroot/board/friendlyarm/nanopi-neo4/extlinux.conf new file mode 100644 index 000000000..91eef67fb --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo4/extlinux.conf @@ -0,0 +1,4 @@ +label NanoPi Neo4 linux + kernel /boot/Image + devicetree /boot/rk3399-nanopi-neo4.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p1 rootwait diff --git a/buildroot/board/friendlyarm/nanopi-neo4/genimage.cfg b/buildroot/board/friendlyarm/nanopi-neo4/genimage.cfg new file mode 100644 index 000000000..966c86927 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo4/genimage.cfg @@ -0,0 +1,22 @@ +image sdcard.img { + hdimage { + } + + partition u-boot-tpl-spl-dtb { + in-partition-table = "no" + image = "idbloader.img" + offset = 32K + } + + partition u-boot-dtb { + in-partition-table = "no" + image = "u-boot.itb" + offset = 8M + size = 30M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/friendlyarm/nanopi-neo4/post-build.sh b/buildroot/board/friendlyarm/nanopi-neo4/post-build.sh new file mode 100755 index 000000000..1f5ff6a61 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo4/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/friendlyarm/nanopi-neo4/readme.txt b/buildroot/board/friendlyarm/nanopi-neo4/readme.txt new file mode 100644 index 000000000..07e349145 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-neo4/readme.txt @@ -0,0 +1,53 @@ +Intro +===== + +NanoPi Neo4 is a RK3399 SoC based ARM64 board. + + +Official wiki: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4 +Mainline wiki: https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/neo4.html + +Build +===== + +Run NanoPi Neo4 configuration + + $ make nanopi_neo4_defconfig + +To build, run make comamnd. + + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.bin +├── bl31.elf +├── Image +├── rk3399-nanopi-neo4.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +├── u-boot.itb +├── u-boot-spl-dtb.bin +├── u-boot-tpl-dtb.bin +├── u-boot-tpl-dtb.img +└── u-boot-tpl-spl-dtb.img + +Creating bootable SD card: +========================= + +Simply invoke (as root) + + # dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device + +Serial console +-------------- + +Baudrate for this board is 1500000 diff --git a/buildroot/board/friendlyarm/nanopi-r1/boot.cmd b/buildroot/board/friendlyarm/nanopi-r1/boot.cmd new file mode 100644 index 000000000..9f0cdbfe5 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-r1.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/friendlyarm/nanopi-r1/genimage.cfg b/buildroot/board/friendlyarm/nanopi-r1/genimage.cfg new file mode 100644 index 000000000..6f5f35dcd --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the NanoPi M1 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-nanopi-r1.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/friendlyarm/nanopi-r1/kernel/linux-extras.config b/buildroot/board/friendlyarm/nanopi-r1/kernel/linux-extras.config new file mode 100644 index 000000000..206b3810a --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/kernel/linux-extras.config @@ -0,0 +1,2 @@ +# USB ethernet +CONFIG_USB_RTL8152=y diff --git a/buildroot/board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts b/buildroot/board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts new file mode 100644 index 000000000..ca15a57be --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2019 Igor Pecovnik + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "sun8i-h3-nanopi.dtsi" + +/ { + model = "FriendlyElec NanoPi-R1"; + compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3"; + + aliases { + serial1 = &uart3; + ethernet0 = &emac; + ethernet1 = &emac; + ethernet2 = &sdio_wifi; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + }; + + leds { + /delete-node/ status; + /delete-node/ pwr; + led1 { + label = "LED1"; + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + led2 { + label = "LED2"; + gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "netdev"; + }; + + led3 { + label = "LED3"; + gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "netdev"; + }; + }; + + r_gpio_keys { + compatible = "gpio-keys"; + input-name = "k1"; + pinctrl-names = "default"; + pinctrl-0 = <&sw_r_npi>; + + /delete-node/ k1; + reset { + label = "reset"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + + status = "okay"; +}; + +&external_mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; + +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + sdio_wifi: sdio_wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ + interrupt-names = "host-wake"; + }; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; diff --git a/buildroot/board/friendlyarm/nanopi-r1/readme.txt b/buildroot/board/friendlyarm/nanopi-r1/readme.txt new file mode 100644 index 000000000..0ff63df3c --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/readme.txt @@ -0,0 +1,29 @@ +NanoPi R1 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the NanoPi R1. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make nanopi_r1_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig b/buildroot/board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig new file mode 100644 index 000000000..e028b41a4 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig @@ -0,0 +1,22 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_SPL=y +CONFIG_MACH_SUN8I_H3=y +CONFIG_DRAM_CLK=408 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y +CONFIG_MACPWR="PD6" +# CONFIG_VIDEO_DE2 is not set +CONFIG_NR_DRAM_BANKS=1 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_CONSOLE_MUX=y +CONFIG_SYS_CLK_FREQ=480000000 +# CONFIG_CMD_FLASH is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1" +CONFIG_SUN8I_EMAC=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 diff --git a/buildroot/board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts b/buildroot/board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts new file mode 100644 index 000000000..9c3c574e0 --- /dev/null +++ b/buildroot/board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2019 Igor Pecovnik + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "sun8i-h3-nanopi.dtsi" + +/ { + model = "FriendlyARM NanoPi R1"; + compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + }; + +}; + +&ehci0 { + status = "okay"; +}; + +&pio { + gmac_power_pin_nanopi: gmac_power_pin@0 { + pins = "PD6"; + function = "gpio_out"; + }; +}; + +&ohci0 { + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + + status = "okay"; +}; + +&external_mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; diff --git a/buildroot/board/globalscale/espressobin/genimage.cfg b/buildroot/board/globalscale/espressobin/genimage.cfg new file mode 100644 index 000000000..360c8f098 --- /dev/null +++ b/buildroot/board/globalscale/espressobin/genimage.cfg @@ -0,0 +1,11 @@ +# Minimal image, no U-boot since v3/v5 cannot boot from sdcard, see +# readme.txt for details on configuring the on-board u-boot. +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/globalscale/espressobin/linux-extras.config b/buildroot/board/globalscale/espressobin/linux-extras.config new file mode 100644 index 000000000..7ce0a495c --- /dev/null +++ b/buildroot/board/globalscale/espressobin/linux-extras.config @@ -0,0 +1,14 @@ +# +# The Espressobin has a switchcore with full support in the kernel. +# This fragment enables DSA and its drivers, inclding VLAN aware bridge +# support to allow users to easily set up a LAN switch + WAN interface. +# +CONFIG_NET_DSA=m +CONFIG_VLAN_8021Q=y + +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +CONFIG_BRIDGE_VLAN_FILTERING=y + +CONFIG_NET_DSA_MV88E6XXX=m +CONFIG_NET_DSA_MV88E6XXX_PTP=y diff --git a/buildroot/board/globalscale/espressobin/readme.txt b/buildroot/board/globalscale/espressobin/readme.txt new file mode 100644 index 000000000..c5af7e3c9 --- /dev/null +++ b/buildroot/board/globalscale/espressobin/readme.txt @@ -0,0 +1,90 @@ +Marvell ESPRESSObin +=================== + +This default configuration allows you to quickly get up and running with +the Marvell ESPRESSObin board by Globalscale Technologies Inc. + +The ESPRESSObin is based on the Marvell Armada 88F3720 SoC, coupled with +a Marvell 88E6341 switch core "Topaz", with three exposed gigabit ports. + + _________________________ + |# U W L L U #| + |# S A A A S #| + |# B N N N B #| + |# 0 1 #| + |# Mini #| + |# -PCI #| + |# #| + |# 5 #| + |#__V___usb_PWR_SATA__SW_#| + + Fig 1: Overview of board + +Notice difference in Ethernet port layout compared to the Globalscale +docs. They order the ports; LAN2, LAN1, WAN (left to right in figure +above). For more information, see http://espressobin.net + + +Building +-------- + + $ make globalscale_espressobin_defconfig + $ make + +This generates the kernel image, the devicetree binary, the rootfs as a +tar.gz, and a filesystem image containing everything. + +All build artifacts are located in `output/images/` + + +Booting +------- + +To boot, you need a UART connection, using the on-board micro USB port +set to 115200 8N1. + +By default, the ESPRESSObin comes with a pre-flashed U-Boot set up to +load the kernel, device-tree and rootfs from SPI NOR flash. The board +jumpers can be changed to boot from different sources, see the quick +start guide for each board revision for details: + +- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V5/ +- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V7/ + +Note: the v5, and earlier, cannot boot from sdcard, so you have to set +up the factory U-Boot to boot into Buildroot: + +1. Flash rootfs image to sdcard drive, your `of=` device may differ: + + $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=1M + $ sync + +2. Boot board from SPI NOR, interrupt boot by pressing any key ... +3. Check with `printenv` that the default setup is OK, otherwise ensure + the following are set, and define `bootcmd` for automatic boot: + + > setenv kernel_addr 0x5000000 + > setenv fdt_addr 0x1800000 + > setenv fdt_name boot/armada-3720-espressobin.dtb + > setenv console console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 + > setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr' + +4. Call the boot command, or `reset` the board to start: + + > run bootcmd + + +Networking +---------- + +To enable Ethernet networking, load the `mv88e6xxx` kernel module, and +bring up each respective interface needed: + + # modprobe mv88e6xxx + # ifconfig wan up + +A more advanced scenario is setting up switching between the ports using +the Linux bridge. The kernel switchdev layer, and DSA driver, ensure +switch functions are "offloaded" to the HW switch, i.e., all traffic +between LAN ports never reach the CPU. For this you need the iproute2 +suite of tools. diff --git a/buildroot/board/gnublin/README b/buildroot/board/gnublin/README deleted file mode 100644 index 8f6a9f01e..000000000 --- a/buildroot/board/gnublin/README +++ /dev/null @@ -1,48 +0,0 @@ -This the Buildroot support for the LPC3131 based Gnublin board (see here: -http://en.gnublin.org/) and to the Elektor Linux board -(http://www.elektor.com/news/elektor-presents-embedded-linux-made-easy.2147294. -lynkx) - -Unfortunately currently the AD and the pwm modules are not supported, i'm about -to add also those drivers as well to the current kernel later. - -Base kernel version: 3.7 (available here: -https://gitorious.org/linux-3-7-gnublin/linux-3-7-gnublin/commits/gnublin- -support) - -U-boot version: 2009.11 (available here: -https://gitorious.org/u-boot-gnublin-support/u-boot-gnublin-support) - - -Steps to create a bootable SD card (with the given config you need an at least -500 MB SD card): - -1.Config buildroot with the gnublin_defconfig: - -$ make gnublin_defconfig - -2.Tweak the config for your needs: - -$ make menuconfig - -3.Build: - -$ make - -4.Create two partitions on your SD card, one with type of BootIt (fdisk ID: df), -the size should be around 1M, and another partition with all of the left space -on the card, and with the type of normal DOS partition. - -5.From the output/images directory dump the u-boot image to the BootIt partition -(probably you have to modify the output /dev files according to your system): - -$ dd if=output/images/u-boot.bin of=/dev/sdc1 - -6.Dump the root fs image as well: - -$ dd if=output/images/rootfs.ext2 of=/dev/sdc2 - -7.Insert the SD card into the board's slot, and your board should boot up with -your newly created system. - -Any feedback/report is welcome on the mr.zoltan.gyarmati[at]gmail.com diff --git a/buildroot/board/grinn/chiliboard/genimage.cfg b/buildroot/board/grinn/chiliboard/genimage.cfg new file mode 100644 index 000000000..ffe027e7a --- /dev/null +++ b/buildroot/board/grinn/chiliboard/genimage.cfg @@ -0,0 +1,31 @@ +# Minimal microSD card image for Grinn's chiliBoard +# + +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img", + "am335x-chiliboard.dtb", + "zImage" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/grinn/chiliboard/readme.txt b/buildroot/board/grinn/chiliboard/readme.txt new file mode 100644 index 000000000..676aa7040 --- /dev/null +++ b/buildroot/board/grinn/chiliboard/readme.txt @@ -0,0 +1,46 @@ +********** +chiliBoard +********** + +Build +===== + +First, configure Buildroot for your chiliBoard: + + make grinn_chiliboard_defconfig + +Build image: + + make + +After building you should get a tree like this: + + output/images/ + ├── am335x-chiliboard.dtb + ├── boot.vfat + ├── MLO + ├── rootfs.ext2 + ├── rootfs.ext4 + ├── rootfs.tar + ├── sdcard.img + ├── u-boot.img + └── zImage + +Create a bootable microSD card +============================== + +Buildroot prepares a bootable microSD card image "sdcard.img" in output/images/ +directory, To flash SD card just run the following command: + + sudo dd if=output/images/sdcard.img of=/dev/ bs=1M + +where can be sdX or mmcblkX + +*** WARNING! This will destroy all contents of device you specify! *** + +Boot chiliBoard +=============== + +- insert the microSD card in the microSD slot of the board; +- plug micro USB cable to provide power and console interface +- use terminal emulator with 115200 bps, 8n1 diff --git a/buildroot/board/grinn/liteboard/genimage.cfg b/buildroot/board/grinn/liteboard/genimage.cfg new file mode 100644 index 000000000..cbce2db58 --- /dev/null +++ b/buildroot/board/grinn/liteboard/genimage.cfg @@ -0,0 +1,48 @@ +# Minimal microSD card image for Grinn's liteBoard +# +# We mimic the .sdcard Freescale's image format for i.MX6UL: +# * the microSD card must have 1 kB free space at the beginning, +# * SPL is dumped as is, +# * U-Boot is dumped at 69K offset, as configured in SPL +# * a FAT partition at offset 8 MB is containing zImage and dtbs, +# * a single root filesystem partition is required (Ext4 in this case). +# + +image boot.vfat { + vfat { + files = { + "imx6ul-liteboard.dtb", + "zImage" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition SPL { + in-partition-table = "no" + image = "SPL" + offset = 1K + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.img" + offset = 69K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/grinn/liteboard/readme.txt b/buildroot/board/grinn/liteboard/readme.txt new file mode 100644 index 000000000..fe1386a0b --- /dev/null +++ b/buildroot/board/grinn/liteboard/readme.txt @@ -0,0 +1,45 @@ +********* +liteBoard +********* + +Build +===== + +First, configure Buildroot for your liteBoard: + + make grinn_liteboard_defconfig + +Build image: + + make + +After building you should get a tree like this: + + output/images/ + ├── boot.vfat + ├── imx6ul-liteboard.dtb + ├── rootfs.ext2 + ├── rootfs.ext4 + ├── rootfs.tar + ├── sdcard.img + ├── u-boot.imx + └── zImage + +Create a bootable microSD card +============================== + +Buildroot prepares a bootable microSD card image "sdcard.img" in output/images/ +directory, To flash SD card just run the following command: + + sudo dd if=output/images/sdcard.img of=/dev/ bs=1M + +where can be sdX or mmcblkX + +*** WARNING! This will destroy all contents of device you specify! *** + +Boot liteBoard +============== + +- insert the microSD card in the microSD slot of the board; +- plug micro USB cable to provide power and console interface +- use terminal emulator with 115200 bps, 8n1 diff --git a/buildroot/board/hardkernel/odroidxu4/boot.ini b/buildroot/board/hardkernel/odroidxu4/boot.ini new file mode 100644 index 000000000..87ac7ac13 --- /dev/null +++ b/buildroot/board/hardkernel/odroidxu4/boot.ini @@ -0,0 +1,38 @@ +ODROIDXU-UBOOT-CONFIG + +# U-Boot Parameters +setenv initrd_high "0xffffffff" +setenv fdt_high "0xffffffff" + +setenv macaddr "00:1e:06:61:7a:39" +setenv bootrootfs "console=tty1 root=/dev/mmcblk1p2 rootwait rw fsck.repair=yes net.ifnames=0" +setenv bootcmd "load mmc 0:1 0x40008000 zImage; load mmc 0:1 0x44000000 exynos5422-odroidxu4.dtb; bootz 0x40008000 - 0x44000000" +setenv vout "hdmi" +setenv governor "performance" +setenv HPD "true" + +# TMDS data amplitude control. +setenv hdmi_tx_amp_lvl "31" + +# TMDS data amplitude fine control for each channel. +setenv hdmi_tx_lvl_ch0 "3" +setenv hdmi_tx_lvl_ch1 "3" +setenv hdmi_tx_lvl_ch2 "3" + +# TMDS data pre-emphasis level control. +setenv hdmi_tx_emp_lvl "6" + +# TMDS clock amplitude control. +setenv hdmi_clk_amp_lvl "31" + +# TMDS data source termination resistor control. +setenv hdmi_tx_res "0" + +setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hdmi_tx_lvl_ch0} hdmi_tx_lvl_ch1=${hdmi_tx_lvl_ch1} hdmi_tx_lvl_ch2=${hdmi_tx_lvl_ch2} hdmi_tx_emp_lvl=${hdmi_tx_emp_lvl} hdmi_clk_amp_lvl=${hdmi_clk_amp_lvl} hdmi_tx_res=${hdmi_tx_res} HPD=${HPD} vout=${vout}" + +# final boot args +setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control}" + +# Boot the board +boot + diff --git a/buildroot/board/hardkernel/odroidxu4/genimage.cfg b/buildroot/board/hardkernel/odroidxu4/genimage.cfg new file mode 100644 index 000000000..e6b85cf2f --- /dev/null +++ b/buildroot/board/hardkernel/odroidxu4/genimage.cfg @@ -0,0 +1,54 @@ +image boot.vfat { + vfat { + files = { + "boot.ini", + "zImage", + "exynos5422-odroidxu4.dtb" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition bl1 { + in-partition-table = "no" + image = "bl1.bin.hardkernel" + offset = 512 + size = 15360 + } + + partition bl2 { + in-partition-table = "no" + image = "bl2.bin.hardkernel.720k_uboot" + offset = 15872 + size = 16384 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-dtb.bin" + offset = 32256 + size = 720k + } + + partition tzsw { + in-partition-table = "no" + image = "tzsw.bin.hardkernel" + offset = 769536 + size = 256k + } + + partition vfat { + partition-type = 0xC + image = "boot.vfat" + offset = 2097152 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/hardkernel/odroidxu4/post-image.sh b/buildroot/board/hardkernel/odroidxu4/post-image.sh new file mode 100755 index 000000000..025906cd0 --- /dev/null +++ b/buildroot/board/hardkernel/odroidxu4/post-image.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/ + +# The bl1.bin.hardkernel file provided by the uboot hardkernel repository is overwritten +# by the bl2.bin.hardkernel in the sd_fusing.sh script because it is too big. +# In order to implement this in genimage, we need to truncate the bl1.bin file +# so that it does not exceed the available place. +# An issue has been filled about this: https://github.com/hardkernel/u-boot/issues/45 +truncate -s 15360 ${BINARIES_DIR}/bl1.bin.hardkernel + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + diff --git a/buildroot/board/hardkernel/odroidxu4/readme.txt b/buildroot/board/hardkernel/odroidxu4/readme.txt new file mode 100644 index 000000000..e3cba8b0c --- /dev/null +++ b/buildroot/board/hardkernel/odroidxu4/readme.txt @@ -0,0 +1,37 @@ +Odroid XU-4 board with Samsung Exynos 5422 SoC + +How to build it +=============== + + $ make odroidxu4_defconfig + +Then you can edit the build options using + + $ make menuconfig + +Compile all and build rootfs image: + + $ make + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + +Result of the build +------------------- + +After building, you should obtain all output files in output/images/ + + +How to write the SD card or eMMC +================================ + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card or eMMC with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Insert the SDcard into your ODROID-XU4, and power it up. Your new system +should come up now. + diff --git a/buildroot/board/intel/galileo/genimage.cfg b/buildroot/board/intel/galileo/genimage.cfg new file mode 100644 index 000000000..31add21e6 --- /dev/null +++ b/buildroot/board/intel/galileo/genimage.cfg @@ -0,0 +1,31 @@ +# Create an image of the efi partition +image efi-part.vfat { + vfat { + file startup.nsh { + image = "efi-part/startup.nsh" + } + file EFI { + image = "efi-part/EFI" + } + } + size=512K +} + +# Create the sdcard image, pulling in +# * the image created by buildroot +# * the efi-partition created above +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + image = "efi-part.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 512M + } +} diff --git a/buildroot/board/intel/galileo/grub.cfg b/buildroot/board/intel/galileo/grub.cfg new file mode 100644 index 000000000..dde2f762f --- /dev/null +++ b/buildroot/board/intel/galileo/grub.cfg @@ -0,0 +1,11 @@ +set default="0" +set timeout="0" + +menuentry "Buildroot" { + # Grub2 supports ext4, load the kernel from the Linux rootfs partition + # Set root tells grub to search the 2nd partition for the bzImage + set root=(hd0,msdos2) + + # Set Linux to boot from the 2nd partition, SD/MMC support is baked into the kernel + linux /boot/bzImage root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw +} diff --git a/buildroot/board/intel/galileo/linux-3.14.config b/buildroot/board/intel/galileo/linux-3.14.config new file mode 100644 index 000000000..e7aa9cf23 --- /dev/null +++ b/buildroot/board/intel/galileo/linux-3.14.config @@ -0,0 +1,308 @@ +# CONFIG_LOCALVERSION_AUTO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_FHANDLE=y +CONFIG_KERNEL_LZMA=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_SCHED=y +CONFIG_NAMESPACES=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_LBDAF=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_ZONE_DMA is not set +CONFIG_X86_INTEL_QUARK=y +CONFIG_M586TSC=y +CONFIG_X86_GENERIC=y +CONFIG_HPET_TIMER=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_X86_UP_IOAPIC=y +# CONFIG_X86_MCE_AMD is not set +# CONFIG_X86_16BIT is not set +CONFIG_X86_REBOOTFIXUPS=y +CONFIG_MICROCODE=y +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +CONFIG_HIGHMEM64G=y +# CONFIG_COMPACTION is not set +# CONFIG_MTRR is not set +# CONFIG_ARCH_RANDOM is not set +CONFIG_EFI=y +CONFIG_EFI_STUB=y +CONFIG_EFI_CAPSULE=m +CONFIG_HZ_100=y +CONFIG_KEXEC=y +CONFIG_PHYSICAL_START=0x400000 +CONFIG_PHYSICAL_ALIGN=0x1000000 +# CONFIG_COMPAT_VDSO is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TRACE_RTC=y +CONFIG_ACPI_PROCFS=y +CONFIG_ACPI_PROCFS_POWER=y +CONFIG_ACPI_EC_DEBUGFS=y +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_FAN is not set +CONFIG_ACPI_DEBUG=y +CONFIG_ACPI_PCI_SLOT=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +CONFIG_PCI_DEBUG=y +CONFIG_PCI_IOAPIC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_SYN_COOKIES=y +# CONFIG_IPV6_SIT is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_CAN=m +# CONFIG_CAN_GW is not set +CONFIG_CAN_J1939=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +# CONFIG_CAN_DEV is not set +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTUSB=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_LEDS=y +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_FW_LOADER_USER_HELPER is not set +CONFIG_DEBUG_DEVRES=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=m +# CONFIG_PNP_DEBUG_MESSAGES is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=2 +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=81920 +CONFIG_EEPROM_AT24=m +CONFIG_EEPROM_93CX6=m +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_SPI_ATTRS=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +CONFIG_TUN=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_I825XX is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +CONFIG_STMMAC_ETH=m +# CONFIG_STMMAC_PLATFORM is not set +CONFIG_STMMAC_PCI=m +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y +CONFIG_PPP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_ASYNC=m +# CONFIG_RTL_CARDS is not set +# CONFIG_INPUT_MOUSEDEV is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=32 +CONFIG_SERIAL_NONSTANDARD=y +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_NR_UARTS=8 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_SC16IS7XX=m +CONFIG_SERIAL_SC16IS7XX_SPI=m +# CONFIG_HW_RANDOM is not set +CONFIG_HPET=y +# CONFIG_HPET_MMAP is not set +CONFIG_I2C=y +CONFIG_SPI_DEBUG=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_PXA2XX=y +CONFIG_PTP_1588_CLOCK=y +CONFIG_GPIO_SCH=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=y +CONFIG_HWMON=m +CONFIG_SENSORS_LM75=m +# CONFIG_X86_PKG_TEMP_THERMAL is not set +CONFIG_MFD_INTEL_QUARK_HSUART_DMA=y +CONFIG_CY8C9540A=m +CONFIG_MFD_PCA9685=m +CONFIG_INTEL_QRK_GIP=m +CONFIG_INTEL_QRK_GIP_TEST=m +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +# CONFIG_USB_GSPCA is not set +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +# CONFIG_VGA_ARB is not set +# CONFIG_VGA_CONSOLE is not set +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_USB_AUDIO=m +CONFIG_USB=m +# CONFIG_USB_DEFAULT_PERSIST is not set +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_OHCI_HCD=m +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_GADGET=m +CONFIG_USB_EG20T=m +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=y +CONFIG_USB_G_ACM_MS=m +CONFIG_MMC=y +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=m +CONFIG_RTC_CLASS=y +# CONFIG_RTC_SYSTOHC is not set +CONFIG_DMADEVICES=y +CONFIG_DW_DMAC=y +CONFIG_UIO=y +CONFIG_STAGING=y +CONFIG_INTEL_QRK_THERMAL=y +CONFIG_INTEL_QRK_AUDIO_CTRL=m +CONFIG_INTEL_QRK_J1708=m +CONFIG_INTEL_QRK_ESRAM=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_IIO_BUFFER_CB=y +CONFIG_IIO_LIS331DLH_INTEL_QRK=y +CONFIG_IIO_ST_ACCEL_3AXIS=y +CONFIG_AD7298=m +CONFIG_ADC1x8S102=m +CONFIG_IIO_SYSFS_TRIGGER=m +CONFIG_IIO_HRTIMER_TRIGGER=m +CONFIG_PWM=y +CONFIG_DMI_SYSFS=y +CONFIG_EFI_VARS=m +# CONFIG_EFI_RUNTIME_MAP is not set +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_EXT4_FS=y +CONFIG_VFAT_FS=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_HUGETLBFS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +CONFIG_FRAME_WARN=2048 +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_HEADERS_CHECK=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_TIMER_STATS=y +CONFIG_LATENCYTOP=y +# CONFIG_FTRACE is not set +CONFIG_X86_PTDUMP=y +# CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_DEBUG_SET_MODULE_RONX=y +# CONFIG_DOUBLEFAULT is not set +CONFIG_OPTIMIZE_INLINING=y +CONFIG_KEYS=y +CONFIG_KEYS_DEBUG_PROC_KEYS=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_VIRTUALIZATION is not set +CONFIG_CRC_T10DIF=y diff --git a/buildroot/board/intel/galileo/post-build.sh b/buildroot/board/intel/galileo/post-build.sh new file mode 100755 index 000000000..2b34cb43b --- /dev/null +++ b/buildroot/board/intel/galileo/post-build.sh @@ -0,0 +1,2 @@ +#!/bin/sh -e +cp board/intel/galileo/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg diff --git a/buildroot/board/intel/galileo/post-image.sh b/buildroot/board/intel/galileo/post-image.sh new file mode 100755 index 000000000..f9aef0b1b --- /dev/null +++ b/buildroot/board/intel/galileo/post-image.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e + +GENIMAGE_CFG="board/intel/galileo/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/buildroot/board/intel/galileo/readme.txt b/buildroot/board/intel/galileo/readme.txt new file mode 100644 index 000000000..7a3abd4f7 --- /dev/null +++ b/buildroot/board/intel/galileo/readme.txt @@ -0,0 +1,52 @@ + +Intel Galileo Gen 1/2 + +Intro +============ + +These instructions apply to both the Intel Galileo Gen 1/2 development boards +based on the Intel Quark X1000. + +How to build +============ + +Apply the defconfig for the Intel Galileo Gen 1/2 + + $ make galileo_defconfig + +Add any additional packages required and build. + + $ make + +The build process will create a SD card image and place it in output/images. + + $ ls -lh output/images/sdcard.img + -rw-r--r--. 1 foo foo 11M Nov 17 16:19 output/images/sdcard.img + +Write the image to an mSD card, insert into the Galileo and power on. + + $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync + +Accessing the console +===================== + +During power-on the console will become available on the Galileo's ttyS1. This +may be accessed as follows. + + * Galileo Gen 1 + + http://clayskits.com/products/galileo-gen-1-serial-cable + + A USB to RS-232 to 3.5mm Jack cable is required. Connect to the 3.5mm + Jack next to the Ethernet Header. + + * Galileo Gen 2 + + http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm + + A FTDI TTL-232R-3V3 cable may be used to connect to the FTDI header + next to the Ethernet connector on the Galileo Gen 2. + +The console should now be visible at 115200 baud. + + $ picocom -b 115200 /dev/ttyUSB0 diff --git a/buildroot/board/intel/galileo/rootfs_overlay/etc/init.d/S09modload b/buildroot/board/intel/galileo/rootfs_overlay/etc/init.d/S09modload new file mode 100755 index 000000000..359d607c1 --- /dev/null +++ b/buildroot/board/intel/galileo/rootfs_overlay/etc/init.d/S09modload @@ -0,0 +1,33 @@ +#!/bin/sh +# + +load_drivers() +{ + while IFS= read -r line; do + modprobe $line + done < "/etc/modules-load.galileo/$1.conf" +} + +do_board() +{ + board=$(cat /sys/devices/virtual/dmi/id/board_name) + case "$board" in + *"GalileoGen2" ) + load_drivers "galileo_gen2" ;; + *"Galileo" ) + load_drivers "galileo" ;; + esac +} + +case "$1" in + start) + do_board + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf b/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file mode 100644 index 000000000..b65826194 --- /dev/null +++ b/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf @@ -0,0 +1,3 @@ +intel_qrk_gip +cy8c9540a +ad7298 diff --git a/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf b/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf new file mode 100644 index 000000000..4f80a3301 --- /dev/null +++ b/buildroot/board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf @@ -0,0 +1,4 @@ +intel_qrk_gip +gpio-pca953x +pca9685 +adc1x8s102 diff --git a/buildroot/board/lego/ev3/busybox.fragment b/buildroot/board/lego/ev3/busybox.fragment new file mode 100644 index 000000000..901274d31 --- /dev/null +++ b/buildroot/board/lego/ev3/busybox.fragment @@ -0,0 +1,3 @@ +CONFIG_BEEP=y +CONFIG_FEATURE_BEEP_FREQ=440 +CONFIG_FEATURE_BEEP_LENGTH_MS=250 diff --git a/buildroot/board/lego/ev3/genimage.cfg b/buildroot/board/lego/ev3/genimage.cfg new file mode 100644 index 000000000..14880e8f1 --- /dev/null +++ b/buildroot/board/lego/ev3/genimage.cfg @@ -0,0 +1,65 @@ +# LEGO MINDSTORMS EV3 can boot from a 16MB flash or from a microSD card. +# The U-Boot bootloader from the flash is always used, even when booting +# from a microSD card. + +# The Flash image + +flash nor-16M-256 { + pebsize = 4096 + numpebs = 4096 + minimum-io-unit-size = 256 +} + +image flash.bin { + flash { + } + flashtype = "nor-16M-256" + partition uboot { + image = "u-boot.bin" + size = 256K + } + partition dtb { + image = "da850-lego-ev3.dtb" + size = 64K + offset = 0x40000 + } + partition uimage { + image = "uImage" + size = 4M + offset = 0x50000 + } + partition rootfs { + image = "rootfs.squashfs" + size = 10M + offset = 0x450000 + } +} + +# The SD card image + +image boot.vfat { + vfat { + file uImage { + image = "uImage" + } + file da850-lego-ev3.dtb { + image = "da850-lego-ev3.dtb" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 4M + } + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/buildroot/board/lego/ev3/linux.fragment b/buildroot/board/lego/ev3/linux.fragment new file mode 100644 index 000000000..79efd27d3 --- /dev/null +++ b/buildroot/board/lego/ev3/linux.fragment @@ -0,0 +1,68 @@ +CONFIG_ARM_APPENDED_DTB=n +CONFIG_ARCH_DAVINCI_DM644x=n +CONFIG_ARCH_DAVINCI_DM355=n +CONFIG_ARCH_DAVINCI_DM646x=n +CONFIG_ARCH_DAVINCI_DA830=n +CONFIG_ARCH_DAVINCI_DM365=n +CONFIG_MACH_SFFSDR=n +CONFIG_MACH_NEUROS_OSD2=n +CONFIG_MACH_DM355_LEOPARD=n +CONFIG_MACH_MITYOMAPL138=n +CONFIG_MACH_OMAPL138_HAWKBOARD=n +CONFIG_MACH_DAVINCI_DA850_EVM=n +CONFIG_ATA=n +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=32768 +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_PWM_BEEPER=y +CONFIG_SPI_DAVINCI=y +CONFIG_PINCTRL_DA850_PUPD=y +CONFIG_V4L_PLATFORM_DRIVERS=n +CONFIG_SOUND=n +CONFIG_SND=n +CONFIG_SND_SOC=n +CONFIG_SND_EDMA_SOC=n +CONFIG_SND_DAVINCI_SOC_MCASP=n +CONFIG_SND_SOC_TLV320AIC3X=n +CONFIG_SND_SIMPLE_CARD=n +CONFIG_DAVINCI_WATCHDOG=y +CONFIG_USB=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_DAVINCI=y +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_MUSB_DA8XX=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GADGET=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGER_MTD=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_DRV_OMAP=y +CONFIG_IIO=y +CONFIG_TI_ADS7950=y +CONFIG_PWM_TIECAP=y +CONFIG_PWM_TIEHRPWM=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_DRM=y +CONFIG_DRM_TILCDC=n +CONFIG_DRM_DUMB_VGA_DAC=n +CONFIG_DRM_TINYDRM=y +CONFIG_TINYDRM_ST7586=y +CONFIG_FB_DA8XX=n +CONFIG_COMMON_CLK_PWM=y +CONFIG_BT=y +CONFIG_BT_HS=n +CONFIG_BT_LE=n +CONFIG_RFKILL=y diff --git a/buildroot/board/lego/ev3/post-image.sh b/buildroot/board/lego/ev3/post-image.sh new file mode 100755 index 000000000..81626dc37 --- /dev/null +++ b/buildroot/board/lego/ev3/post-image.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/buildroot/board/lego/ev3/readme.txt b/buildroot/board/lego/ev3/readme.txt index 3c0bd2ec4..648bca1e9 100644 --- a/buildroot/board/lego/ev3/readme.txt +++ b/buildroot/board/lego/ev3/readme.txt @@ -4,8 +4,7 @@ Intro ===== This is the buildroot basic board support for the Lego Mindstorms EV3 -programmable brick. No support for sensors and drivers is provided for the -moment. +programmable brick. The Lego Mindstorms EV3 brick comprises a Texas Instruments AM1808 SoC, with an ARM 926EJ-S main processor running at 300 MHz. @@ -14,23 +13,19 @@ See: - http://www.lego.com/en-us/mindstorms/products/ev3/31313-mindstorms-ev3/ - http://www.ti.com/product/am1808 -The buildroot configuration uses the Linux kernel of the ev3dev project. -See: -- http://botbench.com/blog/2013/07/31/lego-mindstorms-ev3-source-code-available/ -- https://github.com/mindboards/ev3sources - -Note that the EV3 configuration uses gcc 4.7, as the boot is broken with gcc -4.8. - How it works ============ Boot process : -------------- -The u-boot on-board the EV3 brick has provision to boot a Linux kernel from the -external µSD card. It will try to load a uImage from the first µSD card -partition, which must be formatted with a FAT filesystem. +The EV3 boots from an EEPROM. This loads whatever is on the built-in 16MB flash +(usually U-Boot) and runs it. The U-Boot from the official LEGO firmware and +mainline U-Boot will attempt to boot a Linux kernel from the external µSD card. +It will try to load a uImage (and optional boot.scr) from the first µSD card +partition, which must be formatted with a FAT filesystem. If no µSD is found or +it does not contain a uImage file, then the EV3 will boot the uImage from the +built-in 16MB flash. How to build it =============== @@ -57,75 +52,34 @@ Result of the build After building, you should obtain this tree: output/images/ + ├── boot.vfat + ├── flash.bin ├── rootfs.ext2 ├── rootfs.ext3 -> rootfs.ext2 - └── uImage - - -Prepare your SDcard -=================== - -The following µSD card layout is recommended: - -- First partition formated with a FAT filesystem, containing the uImage. -- Second partition formatted as ext2 or ext3, containing the root filesystem. - -Create the SDcard partition table ----------------------------------- - -Determine the device associated to the SD card : - - $ cat /proc/partitions - -Let's assume it is /dev/mmcblk0 : - - $ sudo fdisk /dev/mmcblk0 - -Delete all previous partitions by creating a new disklabel with 'o', then -create the new partition table, using these options, pressing enter after each -one: - - * n p 1 2048 +10M t c - * n p 2 22528 +256M - -Using the 'p' option, the SD card's partition must look like this : + ├── rootfs.squashfs + ├── sdcard.img + ├── u-boot.bin + ├── uImage -> uImage.da850-lego-ev3 + └── uImage.da850-lego-ev3 -Device Boot Start End Blocks Id System -/dev/mmcblk0p1 2048 22527 10240 c W95 FAT32 (LBA) -/dev/mmcblk0p2 22528 546815 262144 83 Linux - -Then write the partition table using 'w' and exit. - -Make partition one a DOS partition : - - $ sudo mkfs.vfat /dev/mmcblk0p1 - -Install the binaries to the SDcard ----------------------------------- - -Remember your binaries are located in output/images/, go inside that directory : - - $ cd output/images - -Copy the Linux kernel: - - $ sudo mkdir /mnt/sdcard - $ sudo mount /dev/mmcblk0p1 /mnt/sdcard - $ sudo cp uImage /mnt/sdcard - $ sudo umount /mnt/sdcard - -Copy the rootfs : +Installation +============ - $ sudo dd if=rootfs.ext3 of=/dev/mmcblk0p2 bs=1M - $ sync +You can use either flash.bin or the sdcard.img. To load flash.bin, use the +official Lego Mindstorms EV3 programming software firmware update tool to load +the image. To use sdcard.img, use a disk writing tool such as Etcher or dd to +write the image to the µSD card. -It's Done! +NOTE: The sdcard.img created by lego_ev3_defconfig won't boot if the official +LEGO firmware is installed on the EV3 (it has an old version of U-Boot that +doesn't know about device tree). You must either set the kernel configuration +option to append the device tree to the kernel or you can create a boot.scr +that chainloads a newer U-Boot or you can install a newer U-Boot in the flash +memory (just flashing u-boot.bin is enough). Finish ====== -Eject your µSD card, insert it in your Lego EV3, and power it up. - To have a serial console, you will need a proper USB to Lego serial port adapter plugged into the EV3 sensors port 1. See: @@ -133,3 +87,13 @@ See: - http://botbench.com/blog/2013/08/05/mindsensors-ev3-usb-console-adapter/ The serial port config to use is 115200/8-N-1. + +Bluetooth +========= + +To enable Bluetooth: + + # modprobe hci_uart + # /usr/libexec/bluetooth/bluetoothd & + # bluetoothctl + [bluetooth]# power on diff --git a/buildroot/board/lemaker/bananapro/boot.cmd b/buildroot/board/lemaker/bananapro/boot.cmd new file mode 100644 index 000000000..439f5b12c --- /dev/null +++ b/buildroot/board/lemaker/bananapro/boot.cmd @@ -0,0 +1,5 @@ +setenv fdt_high ffffffff +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun7i-a20-bananapro.dtb +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/lemaker/bananapro/genimage.cfg b/buildroot/board/lemaker/bananapro/genimage.cfg new file mode 100644 index 000000000..190a4b1ff --- /dev/null +++ b/buildroot/board/lemaker/bananapro/genimage.cfg @@ -0,0 +1,37 @@ +# Minimal SD card image for the Banana Pro +# Based in the Orange Pi genimage.cfg + +image boot.vfat { + vfat { + files = { + "zImage", + "sun7i-a20-bananapro.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/lemaker/bananapro/linux-wifi.fragment b/buildroot/board/lemaker/bananapro/linux-wifi.fragment new file mode 100644 index 000000000..f4ede39fa --- /dev/null +++ b/buildroot/board/lemaker/bananapro/linux-wifi.fragment @@ -0,0 +1,24 @@ +# Networking support +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_RFKILL=y + +# Network device support +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_BRCMFMAC=m +# CONFIG_WLAN_VENDOR_ADMTEK is not set +# CONFIG_WLAN_VENDOR_ATH is not set +# CONFIG_WLAN_VENDOR_ATMEL is not set +# CONFIG_WLAN_VENDOR_CISCO is not set +# CONFIG_WLAN_VENDOR_INTEL is not set +# CONFIG_WLAN_VENDOR_INTERSIL is not set +# CONFIG_WLAN_VENDOR_MARVELL is not set +# CONFIG_WLAN_VENDOR_MEDIATEK is not set +# CONFIG_WLAN_VENDOR_RALINK is not set +# CONFIG_WLAN_VENDOR_REALTEK is not set +# CONFIG_WLAN_VENDOR_RSI is not set +# CONFIG_WLAN_VENDOR_ST is not set +# CONFIG_WLAN_VENDOR_TI is not set +# CONFIG_WLAN_VENDOR_ZYDAS is not set diff --git a/buildroot/board/lemaker/bananapro/patches/linux/0001-arch-arm-boot-dts-sun7i-a20-bananapro.dts-disable-00.patch b/buildroot/board/lemaker/bananapro/patches/linux/0001-arch-arm-boot-dts-sun7i-a20-bananapro.dts-disable-00.patch new file mode 100644 index 000000000..c8e8c0375 --- /dev/null +++ b/buildroot/board/lemaker/bananapro/patches/linux/0001-arch-arm-boot-dts-sun7i-a20-bananapro.dts-disable-00.patch @@ -0,0 +1,44 @@ +From 896e82ab14e7e4e361ffa7c81def787907c1bf4c Mon Sep 17 00:00:00 2001 +From: Bartosz Bilas +Date: Sun, 19 May 2019 21:04:35 +0200 +Subject: [PATCH] arch/arm/boot/dts/sun7i-a20-bananapro.dts: disable 00B + IRQ for brcm wifi module + + BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908438 + +Signed-off-by: Hans de Goede +Signed-off-by: Bartosz Bilas +--- + arch/arm/boot/dts/sun7i-a20-bananapro.dts | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +index 0176e9de0..93b3340f5 100644 +--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts ++++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts +@@ -160,9 +160,19 @@ + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; +- interrupt-parent = <&pio>; +- interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; +- interrupt-names = "host-wake"; ++ /* ++ * OOB interrupt support is broken ATM, often the first irq ++ * does not get seen resulting in the drv probe failing with: ++ * ++ * brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout ++ * brcmfmac: brcmf_bus_started: failed: -110 ++ * brcmfmac: brcmf_attach: dongle is not responding: err=-110 ++ * brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed ++ * ++ * interrupt-parent = <&pio>; ++ * interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; ++ * interrupt-names = "host-wake"; ++ */ + }; + }; + +-- +2.21.0 + diff --git a/buildroot/board/lemaker/bananapro/post-build.sh b/buildroot/board/lemaker/bananapro/post-build.sh new file mode 100755 index 000000000..a335310db --- /dev/null +++ b/buildroot/board/lemaker/bananapro/post-build.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Remove all but the brcmfmac43362 firmware files +find $TARGET_DIR/lib/firmware/brcm -type f -not -name "brcmfmac43362*" -delete + +BOARD_DIR="$(dirname $0)" +MKIMAGE=$HOST_DIR/bin/mkimage +BOOT_CMD=$BOARD_DIR/boot.cmd +BOOT_CMD_H=$BINARIES_DIR/boot.scr + +# U-Boot script +$MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H diff --git a/buildroot/board/lemaker/bananapro/post-image.sh b/buildroot/board/lemaker/bananapro/post-image.sh new file mode 100755 index 000000000..9cca1b178 --- /dev/null +++ b/buildroot/board/lemaker/bananapro/post-image.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/buildroot/board/lemaker/bananapro/readme.txt b/buildroot/board/lemaker/bananapro/readme.txt new file mode 100644 index 000000000..27b922e26 --- /dev/null +++ b/buildroot/board/lemaker/bananapro/readme.txt @@ -0,0 +1,62 @@ +Banana Pro + +Intro +===== + +This default configuration will allow you to start experimenting with the +Buildroot environment for the Banana Pro. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make bananapro_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ dd if=output/images/sdcard.img of=/dev/sdX + +Notes: + - replace 'sdX' with the actual device with your micro SD card + - you may need to be root to do that (use 'sudo') + +Insert the micro SD card in your Banana Pro and power it up. The console +is on the debug TTL UART, 115200 8N1. + +Ethernet +========== + + # udhcpc -i eth0 + +Wifi +========== + + # wpa_passphrase YOUR_SSID >> /etc/wpa_supplicant.conf + (enter the wifi password and press enter) + # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B + # udhcpc -i wlan0 + +Note: + - replace 'YOUR_SSID' with the actual SSID from your access point + +Audio +========== + +Connect a headphone to the 3.5mm jack (TRRS). Note, that the Banana Pro +has an on-board microphone, too. + + # amixer cset name='Power Amplifier DAC Playback Switch' on + # amixer cset name='Power Amplifier Mute Switch' on + # amixer cset name='Power Amplifier Volume' 42 diff --git a/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.lemaker,bananapro.txt b/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.lemaker,bananapro.txt new file mode 120000 index 000000000..93947975e --- /dev/null +++ b/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.lemaker,bananapro.txt @@ -0,0 +1 @@ +brcmfmac43362-sdio.txt \ No newline at end of file diff --git a/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt b/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt new file mode 100644 index 000000000..14a554fdd --- /dev/null +++ b/buildroot/board/lemaker/bananapro/rootfs_overlay/lib/firmware/brcm/brcmfmac43362-sdio.txt @@ -0,0 +1,56 @@ +#AP6210_NVRAM_V1.2_03192013 +manfid=0x2d0 +prodid=0x492 +vendid=0x14e4 +devid=0x4343 +boardtype=0x0598 + +# Board Revision is P307, same nvram file can be used for P304, P305, P306 and P307 as the tssi pa params used are same +#Please force the automatic RX PER data to the respective board directory if not using P307 board, for e.g. for P305 boards force the data into the following directory /projects/BCM43362/a1_labdata/boardtests/results/sdg_rev0305 +boardrev=0x1307 +boardnum=777 +xtalfreq=26000 +boardflags=0x80201 +boardflags2=0x80 +sromrev=3 +wl0id=0x431b +macaddr=00:90:4c:07:71:12 +aa2g=1 +ag0=2 +maxp2ga0=74 +cck2gpo=0x2222 +ofdm2gpo=0x44444444 +mcs2gpo0=0x6666 +mcs2gpo1=0x6666 +pa0maxpwr=56 + +#P207 PA params +#pa0b0=5447 +#pa0b1=-658 +#pa0b2=-175 + +#Same PA params for P304,P305, P306, P307 + +pa0b0=5447 +pa0b1=-607 +pa0b2=-160 +pa0itssit=62 +pa1itssit=62 + + +cckPwrOffset=5 +ccode=0 +rssismf2g=0xa +rssismc2g=0x3 +rssisav2g=0x7 +triso2g=0 +noise_cal_enable_2g=0 +noise_cal_po_2g=0 +swctrlmap_2g=0x04040404,0x02020202,0x02020202,0x010101,0x1ff +temp_add=29767 +temp_mult=425 + +btc_flags=0x6 +btc_params0=5000 +btc_params1=1000 +btc_params6=63 diff --git a/buildroot/board/librecomputer/lafrite/genimage.cfg b/buildroot/board/librecomputer/lafrite/genimage.cfg new file mode 100644 index 000000000..212f82952 --- /dev/null +++ b/buildroot/board/librecomputer/lafrite/genimage.cfg @@ -0,0 +1,10 @@ +image usb.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/librecomputer/lafrite/overlay/extlinux/extlinux.conf b/buildroot/board/librecomputer/lafrite/overlay/extlinux/extlinux.conf new file mode 100644 index 000000000..60aa9d6e7 --- /dev/null +++ b/buildroot/board/librecomputer/lafrite/overlay/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /boot/Image + devicetree /boot/meson-gxl-s805x-libretech-ac.dtb + append console=ttyAML0,115200 earlyprintk root=/dev/sda1 rootwait diff --git a/buildroot/board/librecomputer/lafrite/readme.txt b/buildroot/board/librecomputer/lafrite/readme.txt new file mode 100644 index 000000000..c439c5e91 --- /dev/null +++ b/buildroot/board/librecomputer/lafrite/readme.txt @@ -0,0 +1,34 @@ +Intro +===== + +Libre Computer "La Frite" is a low cost SBC based around an Amlogic +s805x SoC (quad A53), 512MB/1GB DDR4 and a 16MB SPI NOR flash: + +https://libre.computer/products/boards/aml-s805x-ac/ + +How to build it +=============== + +Configure Buildroot: + + $ make lafrite_defconfig + +Compile everything and build the USB flash drive image: + + $ make + +How to write the USB flash drive image +====================================== + +Once the build process is finished you will have an image called "usb.img" +in the output/images/ directory. + +Copy the bootable "usb.img" onto a USB flash drive with "dd": + + $ sudo dd if=output/images/usb.img of=/dev/sdX + +How to boot +=========== + +Insert flash drive to the USB connector furthest away from the IR +receiver and power up board. The system will boot automatically. diff --git a/buildroot/board/licheepi/boot.cmd b/buildroot/board/licheepi/boot.cmd new file mode 100644 index 000000000..383b3473e --- /dev/null +++ b/buildroot/board/licheepi/boot.cmd @@ -0,0 +1,4 @@ +setenv bootargs console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p2 earlyprintk rw +load mmc 0:1 0x41000000 zImage +load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb +bootz 0x41000000 - 0x41800000 diff --git a/buildroot/board/licheepi/genimage.cfg b/buildroot/board/licheepi/genimage.cfg new file mode 100644 index 000000000..0d8540f2a --- /dev/null +++ b/buildroot/board/licheepi/genimage.cfg @@ -0,0 +1,35 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-v3s-licheepi-zero-dock.dtb", + "sun8i-v3s-licheepi-zero.dtb", + "boot.scr" + } + } + size = 8M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 516096 # 512KB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 0 + } +} diff --git a/buildroot/board/licheepi/readme.txt b/buildroot/board/licheepi/readme.txt new file mode 100644 index 000000000..6b8bf94b4 --- /dev/null +++ b/buildroot/board/licheepi/readme.txt @@ -0,0 +1,62 @@ +Intro +===== + +This directory contains a buildroot configuration for building a +LicheePi Zero. + +How to build it +=============== + +Configure Buildroot +------------------- + + $ make licheepi_zero_defconfig + +Build the rootfs +---------------- + +Note: you will need to have access to the network, since Buildroot +will download the packages' sources. + +You may now build your rootfs with: + + $ make + +(This may take a while, consider getting yourself a coffee ;-) ) + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + +-- boot.scr + +-- boot.vfat + +-- rootfs.ext2 + +-- rootfs.ext4 -> rootfs.ext2 + +-- rootfs.tar + +-- sdcard.img + +-- sun8i-v3s-licheepi-zero-dock.dtb + +-- sun8i-v3s-licheepi-zero.dtb + +-- u-boot.bin + +-- u-boot-sunxi-with-spl.bin + `-- zImage + +How to write the SD card +======================== + +Once the build process is finished you will have an image called +"sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Alternatively, you can use the Etcher graphical tool to burn the image +to the SD card safely and on any platform: + +https://etcher.io/ + +Once the SD card is burned, insert it into your LicheePi Zero board, +and power it up. Your new system should come up now and start a +console on the UART0 serial port. diff --git a/buildroot/board/linksprite/pcduino/boot.cmd b/buildroot/board/linksprite/pcduino/boot.cmd new file mode 100644 index 000000000..0db836359 --- /dev/null +++ b/buildroot/board/linksprite/pcduino/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 console=tty1 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10 ${extra} + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun4i-a10-pcduino.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/linksprite/pcduino/genimage.cfg b/buildroot/board/linksprite/pcduino/genimage.cfg new file mode 100644 index 000000000..9cbc383d4 --- /dev/null +++ b/buildroot/board/linksprite/pcduino/genimage.cfg @@ -0,0 +1,42 @@ +# +# Minimal SD card image for the pcDuino +# + +image boot.vfat { + vfat { + files = { + "zImage", + "sun4i-a10-pcduino.dtb", + "boot.scr" + } + } + size = 16M +} + +# +# Note: u-boot environment is stored between u-boot and boot partitions +# + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/linksprite/pcduino/linux-extras.config b/buildroot/board/linksprite/pcduino/linux-extras.config new file mode 100644 index 000000000..670f83fa6 --- /dev/null +++ b/buildroot/board/linksprite/pcduino/linux-extras.config @@ -0,0 +1,16 @@ +# spidev +CONFIG_SPI_SPIDEV=y + +# wireless core +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m + +# wireless drivers +CONFIG_WLAN=y +CONFIG_RTL_CARDS=m +CONFIG_RTL8192CU=m +CONFIG_RTLWIFI=m +CONFIG_RTLWIFI_USB=m +CONFIG_RTLWIFI_DEBUG=y +CONFIG_RTL8192C_COMMON=m diff --git a/buildroot/board/linksprite/pcduino/post-build.sh b/buildroot/board/linksprite/pcduino/post-build.sh new file mode 100755 index 000000000..e1e187767 --- /dev/null +++ b/buildroot/board/linksprite/pcduino/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# post-build.sh for pcDuino taken from OrangePi post-build.sh +# 2013, Carlo Caione + +BOARD_DIR="$(dirname $0)" +MKIMAGE=$HOST_DIR/bin/mkimage +BOOT_CMD=$BOARD_DIR/boot.cmd +BOOT_CMD_H=$BINARIES_DIR/boot.scr + +# U-Boot script +$MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H diff --git a/buildroot/board/linksprite/pcduino/post-image.sh b/buildroot/board/linksprite/pcduino/post-image.sh new file mode 100755 index 000000000..c82b189f9 --- /dev/null +++ b/buildroot/board/linksprite/pcduino/post-image.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/buildroot/board/linksprite/pcduino/readme.txt b/buildroot/board/linksprite/pcduino/readme.txt new file mode 100644 index 000000000..08f380fbc --- /dev/null +++ b/buildroot/board/linksprite/pcduino/readme.txt @@ -0,0 +1,42 @@ +pcDuino v1 boards (http://www.linksprite.com/linksprite-pcduino) + +Intro +===== + +This default configuration will allow you to start experimenting +with the buildroot environment for the LinkSprite pcDuino v1 board +including its flavors pcDuino-Lite and pcDuino-Lite-WiFi. With the +current configuration it will bring-up the board and allow access +through the serial console as well as ethernet and wireless +network interfaces. + +How to build it +=============== + +Configure Buildroot: + + $ make linksprite_pcduino_defconfig + +Modify configuration if needed, e.g. add more packages to target: + + $ make menuconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image +called "sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +How to boot new image +===================== + +Insert SD card and reset the board. By default pcDuino board +boots from SD card. diff --git a/buildroot/board/minnowboard-max/grub.cfg b/buildroot/board/minnowboard-max/grub.cfg deleted file mode 100644 index f38db8f62..000000000 --- a/buildroot/board/minnowboard-max/grub.cfg +++ /dev/null @@ -1,6 +0,0 @@ -set default="0" -set timeout="5" - -menuentry "Buildroot" { - linux /bzImage root=/dev/mmcblk0p2 rootwait console=tty0 console=ttyS0,115200 -} diff --git a/buildroot/board/minnowboard-max/linux-3.18.config b/buildroot/board/minnowboard-max/linux-3.18.config deleted file mode 100644 index d13f49282..000000000 --- a/buildroot/board/minnowboard-max/linux-3.18.config +++ /dev/null @@ -1,47 +0,0 @@ -CONFIG_NO_HZ=y -CONFIG_SMP=y -CONFIG_X86_INTEL_LPSS=y -CONFIG_MATOM=y -CONFIG_EFI=y -CONFIG_PM_RUNTIME=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_X86_INTEL_PSTATE=y -CONFIG_X86_ACPI_CPUFREQ=y -CONFIG_INTEL_IDLE=y -CONFIG_IA32_EMULATION=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_CHR_DEV_SG=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_ATA_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_R8169=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_DW=y -CONFIG_I2C_I801=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_I2C_DESIGNWARE_PCI=y -CONFIG_SPI=y -CONFIG_SPI_PXA2XX=y -CONFIG_SPI_DESIGNWARE=y -CONFIG_PINCTRL_BAYTRAIL=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_AGP=y -CONFIG_DRM=y -CONFIG_DRM_I915=y -CONFIG_USB=y -CONFIG_USB_XHCI_HCD=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PCI=y -CONFIG_MMC_SDHCI_ACPI=y -CONFIG_PWM=y -CONFIG_PWM_LPSS=y -CONFIG_EXT4_FS=y diff --git a/buildroot/board/minnowboard-max/post-build.sh b/buildroot/board/minnowboard-max/post-build.sh deleted file mode 100755 index 9f86d390f..000000000 --- a/buildroot/board/minnowboard-max/post-build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cp board/minnowboard-max/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg diff --git a/buildroot/board/minnowboard-max/readme.txt b/buildroot/board/minnowboard-max/readme.txt deleted file mode 100644 index f865b663e..000000000 --- a/buildroot/board/minnowboard-max/readme.txt +++ /dev/null @@ -1,40 +0,0 @@ -Prepare the SD card for the Minnow Board MAX -============================================ - - 1. Partition the SD card with a GPT partition table - - sudo cgdisk /dev/mmcblk0 - - Create two partitions: - - a) First partition of a few dozens of megabytes, which will be - used to store the bootloader and the kernel image. Type must - be EF00 (EFI partition). - - b) Second partition of any size, which will be used to store the - root filesystem. Type must be 8300 (Linux filesystem) - - 2. Prepare the boot partition - - We will format it, mount it, copy the EFI data generated by - Buildroot, and the kernel image. - - sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1 - sudo mount /dev/mmcblk0p1 /mnt - sudo cp -a output/images/efi-part/* /mnt/ - sudo cp output/images/bzImage /mnt/ - sudo umount /mnt - - 3. Prepare the root partition - - We will format it, mount it, and extract the root filesystem. - - sudo mkfs.ext4 -L root /dev/mmcblk0p2 - sudo mount /dev/mmcblk0p2 /mnt - sudo tar -C /mnt -xf output/images/rootfs.tar - sudo umount /mnt - - 4. Enjoy - -Additional information about this board can be found at -http://www.minnowboard.org/ or http://elinux.org/Minnowboard:MinnowMax. diff --git a/buildroot/board/minnowboard/fs-overlay-graphical/etc/X11/Xsession b/buildroot/board/minnowboard/fs-overlay-graphical/etc/X11/Xsession new file mode 100755 index 000000000..d8862f170 --- /dev/null +++ b/buildroot/board/minnowboard/fs-overlay-graphical/etc/X11/Xsession @@ -0,0 +1,7 @@ +# Start a terminal on the top left corner +xterm -geom 80x30+0+0 & + +# OpenGL demo +glmark2 & + +exec /usr/bin/openbox-session diff --git a/buildroot/board/minnowboard/fs-overlay-graphical/etc/asound.conf b/buildroot/board/minnowboard/fs-overlay-graphical/etc/asound.conf new file mode 100644 index 000000000..b75b23836 --- /dev/null +++ b/buildroot/board/minnowboard/fs-overlay-graphical/etc/asound.conf @@ -0,0 +1,4 @@ +# Customize ALSA: +# the HDMI PCM is at card=0, device=3 (i.e. hw:0,3) +defaults.pcm.card 0 +defaults.pcm.device 3 diff --git a/buildroot/board/minnowboard/genimage.cfg b/buildroot/board/minnowboard/genimage.cfg new file mode 100644 index 000000000..6cf787430 --- /dev/null +++ b/buildroot/board/minnowboard/genimage.cfg @@ -0,0 +1,34 @@ +# Create an image of the efi partition +image efi-part.vfat { + vfat { + file startup.nsh { + image = "efi-part/startup.nsh" + } + file EFI { + image = "efi-part/EFI" + } + file bzImage { + image = "bzImage" + } + } + size=10M +} + +# Create the sdcard image, pulling in +# * the image created by buildroot +# * the efi-partition created above +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/minnowboard/grub.cfg b/buildroot/board/minnowboard/grub.cfg index 33a0f4aa8..3d6feb702 100644 --- a/buildroot/board/minnowboard/grub.cfg +++ b/buildroot/board/minnowboard/grub.cfg @@ -2,5 +2,5 @@ set default="0" set timeout="5" menuentry "Buildroot" { - linux /bzImage root=/dev/mmcblk0p2 rootwait console=ttyPCH0,115200 + linux /bzImage root=/dev/mmcblk2p2 rootwait console=tty0 console=ttyS0,115200 } diff --git a/buildroot/board/minnowboard/linux-3.8.config b/buildroot/board/minnowboard/linux-3.8.config deleted file mode 100644 index 460aa2d0d..000000000 --- a/buildroot/board/minnowboard/linux-3.8.config +++ /dev/null @@ -1,172 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_RCU_FANOUT=32 -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_CGROUPS=y -CONFIG_CGROUP_DEBUG=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CPUSETS=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -CONFIG_MEMCG=y -CONFIG_MEMCG_SWAP=y -CONFIG_MEMCG_KMEM=y -CONFIG_CGROUP_SCHED=y -CONFIG_RT_GROUP_SCHED=y -CONFIG_BLK_CGROUP=y -CONFIG_NAMESPACES=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EMBEDDED=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_SMP=y -CONFIG_MATOM=y -CONFIG_SCHED_SMT=y -CONFIG_PREEMPT=y -CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y -CONFIG_X86_CHECK_BIOS_CORRUPTION=y -# CONFIG_MTRR_SANITIZER is not set -CONFIG_EFI=y -CONFIG_EFI_STUB=y -CONFIG_HZ_1000=y -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_X86_ACPI_CPUFREQ=y -CONFIG_INTEL_IDLE=y -CONFIG_PCI_MMCONFIG=y -CONFIG_PCIEPORTBUS=y -CONFIG_PCI_MSI=y -CONFIG_HOTPLUG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_SUB_POLICY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_FW_LOADER=m -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_PCH_PHUB=m -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=y -CONFIG_CHR_DEV_SG=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_NETCONSOLE=y -CONFIG_TUN=m -CONFIG_PCH_GBE=m -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO_POLLED=y -# CONFIG_MOUSE_PS2 is not set -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_PCH_UART=y -CONFIG_SERIAL_PCH_UART_CONSOLE=y -CONFIG_GEN_RTC=y -CONFIG_GEN_RTC_X=y -CONFIG_HPET=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_EG20T=m -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_TOPCLIFF_PCH=m -CONFIG_SPI_SPIDEV=m -CONFIG_GPIOLIB=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC_PLATFORM=y -CONFIG_GPIO_SCH=y -CONFIG_GPIO_PCH=y -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_AGP=m -CONFIG_DRM=m -CONFIG_FB=y -CONFIG_FB_EFI=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_HDA_INTEL=m -CONFIG_USB=y -CONFIG_USB_SUSPEND=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_GADGET=m -CONFIG_USB_EG20T=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_DMADEVICES=y -CONFIG_PCH_DMA=y -CONFIG_MINNOWBOARD=y -CONFIG_MINNOWBOARD_GPIO=m -CONFIG_MINNOWBOARD_KEYS=m -CONFIG_EFI_VARS=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_FANOTIFY=y -CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y -CONFIG_ISO9660_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=m -CONFIG_NFS_FS=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y -CONFIG_FRAME_WARN=1024 -CONFIG_TIMER_STATS=y -CONFIG_LATENCYTOP=y -CONFIG_BLK_DEV_IO_TRACE=y diff --git a/buildroot/board/minnowboard/linux.config b/buildroot/board/minnowboard/linux.config new file mode 100644 index 000000000..27077dbcd --- /dev/null +++ b/buildroot/board/minnowboard/linux.config @@ -0,0 +1,60 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_SMP=y +CONFIG_X86_INTEL_LPSS=y +CONFIG_MATOM=y +CONFIG_EFI=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_X86_INTEL_PSTATE=y +CONFIG_X86_ACPI_CPUFREQ=y +CONFIG_INTEL_IDLE=y +CONFIG_IA32_EMULATION=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_R8169=y +CONFIG_IGB=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_DW=y +CONFIG_I2C_I801=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_I2C_DESIGNWARE_PCI=y +CONFIG_SPI=y +CONFIG_SPI_DESIGNWARE=y +CONFIG_SPI_PXA2XX=y +CONFIG_PINCTRL_BAYTRAIL=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_AGP=y +CONFIG_DRM=y +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_I915=y +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_CODEC_HDMI=y +# CONFIG_SND_SPI is not set +# CONFIG_SND_USB is not set +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_MMC_SDHCI_ACPI=y +CONFIG_PWM=y +CONFIG_EXT4_FS=y +CONFIG_UNWINDER_FRAME_POINTER=y diff --git a/buildroot/board/minnowboard/post-build.sh b/buildroot/board/minnowboard/post-build.sh index e3f4a92ec..24b8c0539 100755 --- a/buildroot/board/minnowboard/post-build.sh +++ b/buildroot/board/minnowboard/post-build.sh @@ -1,2 +1,10 @@ #!/bin/sh -cp board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg + +cp -v board/minnowboard/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot/board/minnowboard/readme.txt b/buildroot/board/minnowboard/readme.txt index 62ffa92e0..fdbb81e3a 100644 --- a/buildroot/board/minnowboard/readme.txt +++ b/buildroot/board/minnowboard/readme.txt @@ -1,40 +1,28 @@ -Prepare the SD card for the Minnow Board -======================================== +How to get started with the MinnowBoard MAX +=========================================== - 1. Partition the SD card with a GPT partition table +1. Build - sudo cgdisk /dev/mmcblk0 + Apply the defconfig: - Create two partitions: + $ make minnowboard_max_defconfig - a) First partition of a few dozens of megabytes, which will be - used to store the bootloader and the kernel image. Type must - be EF00 (EFI partition). + Add any additional packages required and build: - b) Second partition of any size, which will be used to store the - root filesystem. Type must be 8300 (Linux filesystem) + $ make - 2. Prepare the boot partition +2. Write the SD card - We will format it, mount it, copy the EFI data generated by - Buildroot, and the kernel image. + The build process will create a SD card image in output/images. + Write the image to an mSD card, insert into the MinnowBoard MAX + and power the board on. - sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1 - sudo mount /dev/mmcblk0p1 /mnt - sudo cp -a output/images/efi-part/* /mnt/ - sudo cp output/images/bzImage /mnt/ - sudo umount /mnt + $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync - 3. Prepare the root partition + The system starts two consoles: one on the serial port + and one on HDMI. - We will format it, mount it, and extract the root filesystem. - - sudo mkfs.ext3 -L root /dev/mmcblk0p2 - sudo mount /dev/mmcblk0p2 /mnt - sudo tar -C /mnt -xf output/images/rootfs.tar - sudo umount /mnt - - 4. Enjoy +3. Enjoy Additional information about this board can be found at http://www.minnowboard.org/. diff --git a/buildroot/board/nexbox/a95x/boot.txt b/buildroot/board/nexbox/a95x/boot.txt new file mode 100644 index 000000000..f388ba814 --- /dev/null +++ b/buildroot/board/nexbox/a95x/boot.txt @@ -0,0 +1,11 @@ +setenv bootargs console=ttyAML0,115200 earlyprintk root=/dev/mmcblk1p2 rootwait + +fatload mmc 0:1 0x01080000 uImage + +if itest.s "${aml_dt}" == "gxl_p212_2g"; then + fatload mmc 0:1 $dtb_mem_addr meson-gxl-s905x-nexbox-a95x.dtb +else + fatload mmc 0:1 $dtb_mem_addr meson-gxbb-nexbox-a95x.dtb +fi + +bootm 0x1080000 - $dtb_mem_addr diff --git a/buildroot/board/nexbox/a95x/genimage.cfg b/buildroot/board/nexbox/a95x/genimage.cfg new file mode 100644 index 000000000..74e2d3a6f --- /dev/null +++ b/buildroot/board/nexbox/a95x/genimage.cfg @@ -0,0 +1,28 @@ +image boot.vfat { + vfat { + files = { + "uImage", + "meson-gxbb-nexbox-a95x.dtb", + "meson-gxl-s905x-nexbox-a95x.dtb", + "boot.scr" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/nexbox/a95x/post-build.sh b/buildroot/board/nexbox/a95x/post-build.sh new file mode 100755 index 000000000..f8706f2df --- /dev/null +++ b/buildroot/board/nexbox/a95x/post-build.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +MKIMAGE=$HOST_DIR/bin/mkimage + +$MKIMAGE -C none -A arm64 -T script -d $BOARD_DIR/boot.txt $BINARIES_DIR/boot.scr + +# vendor u-boot uses uImage +if [ -e $BINARIES_DIR/Image ]; then + $MKIMAGE -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 \ + -n linux -d $BINARIES_DIR/Image $BINARIES_DIR/uImage +fi diff --git a/buildroot/board/nexbox/a95x/post-image.sh b/buildroot/board/nexbox/a95x/post-image.sh new file mode 100755 index 000000000..359b4c9e7 --- /dev/null +++ b/buildroot/board/nexbox/a95x/post-image.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/buildroot/board/nexbox/a95x/readme.txt b/buildroot/board/nexbox/a95x/readme.txt new file mode 100644 index 000000000..e08b4e4e6 --- /dev/null +++ b/buildroot/board/nexbox/a95x/readme.txt @@ -0,0 +1,48 @@ +Nexbox A95X + +Intro +===== + +Nexbox A95X is a low cost Android STB based around an Amlogic s905(x) SoC +(quad A53), 8/16GB eMMC and 1/2GB RAM. To use this defconfig, wires to the +internal UART solder pads must be added. See the linux-meson page for +details: + +http://linux-meson.com/doku.php?id=nexbox_a95x_s905 + +Both the s905 (gxbb) and s905x (gxl) variant is supported. + +This default configuration will allow you to start experimenting with the +buildroot environment for the A95X. With the current configuration it will +bring-up the board from microSD, and allow access through the serial +console. + +How to build it +=============== + +Configure Buildroot: + + $ make nexbox_a95x_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto a microSD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +How to boot +=========== + +Insert microSD card and connect serial cable. Power board and stop +U-Boot by pressing any key. Boot the system by typing: + +fatload mmc 0:1 0x1070000 boot.scr +autoscr 0x1070000 diff --git a/buildroot/board/olimex/a10_olinuxino/boot.cmd b/buildroot/board/olimex/a10_olinuxino/boot.cmd new file mode 120000 index 000000000..612c74550 --- /dev/null +++ b/buildroot/board/olimex/a10_olinuxino/boot.cmd @@ -0,0 +1 @@ +../a20_olinuxino/boot.cmd \ No newline at end of file diff --git a/buildroot/board/olimex/a10_olinuxino/genimage.cfg b/buildroot/board/olimex/a10_olinuxino/genimage.cfg new file mode 120000 index 000000000..c21932fee --- /dev/null +++ b/buildroot/board/olimex/a10_olinuxino/genimage.cfg @@ -0,0 +1 @@ +../a20_olinuxino/genimage.cfg \ No newline at end of file diff --git a/buildroot/board/olimex/a10_olinuxino/post-build.sh b/buildroot/board/olimex/a10_olinuxino/post-build.sh new file mode 120000 index 000000000..b34689602 --- /dev/null +++ b/buildroot/board/olimex/a10_olinuxino/post-build.sh @@ -0,0 +1 @@ +../a20_olinuxino/post-build.sh \ No newline at end of file diff --git a/buildroot/board/olimex/a10_olinuxino/readme.txt b/buildroot/board/olimex/a10_olinuxino/readme.txt new file mode 100644 index 000000000..ba4bf6912 --- /dev/null +++ b/buildroot/board/olimex/a10_olinuxino/readme.txt @@ -0,0 +1,57 @@ +A10-OLinuXino-LIME + +Intro +===== + +These are open hardware boards, all based on the Allwinner A10 SoC. + +for more details about the boards see the following pages: + - https://www.olimex.com/Products/OLinuXino/open-source-hardware + - https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME/ + +The following defconfigs are available: + - olimex_a10_olinuxino_lime_defconfig + for the A10-OLinuXino-LIME board using mainline kernel + +(see http://linux-sunxi.org/Linux_Kernel for more details) + +How to build it +=============== + +Configure Buildroot: + + $ make _defconfig + +Compile everything and build the rootfs image: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + + output/images/ + +-- boot.scr + +-- rootfs.ext2 + +-- rootfs.ext4 -> rootfs.ext2 + +-- sdcard.img + +-- sun4i-a10-olinuxino-lime.dtb (lime, mainline) + +-- u-boot.bin + +-- u-boot-sunxi-with-spl.bin + `-- zImage + + +How to write the SD card +======================== + +The sdcard.img file is a complete bootable image ready to be written +on the boot medium. To install it, simply copy the image to a uSD +card: + + # dd if=output/images/sdcard.img of=/dev/sdX + +Where 'sdX' is the device node of the uSD. + +Eject the SD card, insert it in the A10-OLinuXino board, and power it up. + diff --git a/buildroot/board/olimex/a13_olinuxino/boot.cmd b/buildroot/board/olimex/a13_olinuxino/boot.cmd new file mode 100644 index 000000000..4dd1c7b75 --- /dev/null +++ b/buildroot/board/olimex/a13_olinuxino/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +mmc dev 0 +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun5i-a13-olinuxino.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/olimex/a13_olinuxino/genimage.cfg b/buildroot/board/olimex/a13_olinuxino/genimage.cfg new file mode 100644 index 000000000..6f6b0b0ba --- /dev/null +++ b/buildroot/board/olimex/a13_olinuxino/genimage.cfg @@ -0,0 +1,34 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun5i-a13-olinuxino.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/olimex/a13_olinuxino/post-build.sh b/buildroot/board/olimex/a13_olinuxino/post-build.sh new file mode 100755 index 000000000..aa2a76bdd --- /dev/null +++ b/buildroot/board/olimex/a13_olinuxino/post-build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +MKIMAGE=$HOST_DIR/bin/mkimage + +$MKIMAGE -A arm -O linux -T script -C none \ + -d board/olimex/a13_olinuxino/boot.cmd \ + ${BINARIES_DIR}/boot.scr diff --git a/buildroot/board/olimex/a13_olinuxino/readme.txt b/buildroot/board/olimex/a13_olinuxino/readme.txt new file mode 100644 index 000000000..b64e339fd --- /dev/null +++ b/buildroot/board/olimex/a13_olinuxino/readme.txt @@ -0,0 +1,43 @@ +A13-OLinuXino + +Intro +===== + +This default configuration will allow you to start experimenting with +the buildroot environment for the A13-OLinuXino. With the current +configuration it will bring-up the board, and allow access through the +serial console. + +For more details about the A13-OLinuXino: + +https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino/open-source-hardware + +How to build it +=============== + +Configure Buildroot: + + $ make olimex_a13_olinuxino_defconfig + +Compile everything and build the rootfs image: + + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +The sdcard.img file is a complete bootable image ready to be written +on the boot medium. To install it, simply copy the image to a micro SD +card: + + # dd if=output/images/sdcard.img of=/dev/sdX + +Notes: + - replace 'sdX' with the actual device with your micro SDcard, + - you may need to be root to do that (use 'sudo'). + +Eject the SD card, insert it in the A13-OLinuXino board, and power it +up. diff --git a/buildroot/board/olimex/a20_olinuxino/boot.cmd b/buildroot/board/olimex/a20_olinuxino/boot.cmd new file mode 100644 index 000000000..44d9239a9 --- /dev/null +++ b/buildroot/board/olimex/a20_olinuxino/boot.cmd @@ -0,0 +1,5 @@ +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra} +ext4load mmc 0 0x49000000 /boot/${fdtfile} +ext4load mmc 0 0x46000000 /boot/zImage +env set fdt_high ffffffff +bootz 0x46000000 - 0x49000000 diff --git a/buildroot/board/olimex/a20_olinuxino/genimage.cfg b/buildroot/board/olimex/a20_olinuxino/genimage.cfg new file mode 100644 index 000000000..fc2f7f8d7 --- /dev/null +++ b/buildroot/board/olimex/a20_olinuxino/genimage.cfg @@ -0,0 +1,17 @@ +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/olimex/a20_olinuxino/post-build.sh b/buildroot/board/olimex/a20_olinuxino/post-build.sh new file mode 100755 index 000000000..d3f612f81 --- /dev/null +++ b/buildroot/board/olimex/a20_olinuxino/post-build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cp $BINARIES_DIR/boot.scr $TARGET_DIR/boot/boot.scr diff --git a/buildroot/board/olimex/a20_olinuxino/readme.txt b/buildroot/board/olimex/a20_olinuxino/readme.txt new file mode 100644 index 000000000..504483b51 --- /dev/null +++ b/buildroot/board/olimex/a20_olinuxino/readme.txt @@ -0,0 +1,69 @@ +A20-OLinuXino-LIME and A20-OLinuXino-MICRO + +Intro +===== + +These are open hardware boards, all based on the Allwinner A20 SoC. + +for more details about the boards see the following pages: + - https://www.olimex.com/Products/OLinuXino/open-source-hardware + - https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/ + - https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME/ + - https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/ + +The following defconfigs are available: + - olimex_a20_olinuxino_micro_defconfig + for the A20-OLinuXino-MICRO board using mainline kernel + - olimex_a20_olinuxino_lime_defconfig + for the A20-OLinuXino-LIME board using mainline kernel + - olimex_a20_olinuxino_lime2_defconfig + for the A20-OLinuXino-LIME2 board using mainline kernel + +The Mainline Kernel is already a much better choice for a headless server. +And also the mainline kernel works fine even for a basic Linux desktop +system running on top of a simple framebuffer, which may be good enough for +the users who do not need fancy 3D graphics or video playback acceleration. + +(see http://linux-sunxi.org/Linux_Kernel for more details) + +How to build it +=============== + +Configure Buildroot: + + $ make _defconfig + +Compile everything and build the rootfs image: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + + output/images/ + +-- rootfs.ext2 + +-- rootfs.ext4 -> rootfs.ext2 + +-- sdcard.img + +-- sun7i-a20-olinuxino-lime.dtb (lime, mainline) + +-- sun7i-a20-olinuxino-lime2.dtb (lime2, mainline) + +-- sun7i-a20-olinuxino-micro.dtb (micro, mainline) + +-- u-boot.bin + +-- u-boot-sunxi-with-spl.bin + `-- zImage + + +How to write the SD card +======================== + +The sdcard.img file is a complete bootable image ready to be written +on the boot medium. To install it, simply copy the image to a uSD +card: + + # dd if=output/images/sdcard.img of=/dev/sdX + +Where 'sdX' is the device node of the uSD. + +Eject the SD card, insert it in the A20-OLinuXino board, and power it up. + diff --git a/buildroot/board/olimex/a33_olinuxino/boot.cmd b/buildroot/board/olimex/a33_olinuxino/boot.cmd new file mode 100644 index 000000000..44d9239a9 --- /dev/null +++ b/buildroot/board/olimex/a33_olinuxino/boot.cmd @@ -0,0 +1,5 @@ +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra} +ext4load mmc 0 0x49000000 /boot/${fdtfile} +ext4load mmc 0 0x46000000 /boot/zImage +env set fdt_high ffffffff +bootz 0x46000000 - 0x49000000 diff --git a/buildroot/board/olimex/a33_olinuxino/genimage.cfg b/buildroot/board/olimex/a33_olinuxino/genimage.cfg new file mode 100644 index 000000000..fc2f7f8d7 --- /dev/null +++ b/buildroot/board/olimex/a33_olinuxino/genimage.cfg @@ -0,0 +1,17 @@ +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/olimex/a33_olinuxino/post-build.sh b/buildroot/board/olimex/a33_olinuxino/post-build.sh new file mode 100755 index 000000000..b41812065 --- /dev/null +++ b/buildroot/board/olimex/a33_olinuxino/post-build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cp $BINARIES_DIR/boot.scr $TARGET_DIR/boot/boot.scr diff --git a/buildroot/board/olimex/a33_olinuxino/readme.txt b/buildroot/board/olimex/a33_olinuxino/readme.txt new file mode 100644 index 000000000..b19060200 --- /dev/null +++ b/buildroot/board/olimex/a33_olinuxino/readme.txt @@ -0,0 +1,50 @@ +A33-OLinuXino + +Intro +===== + +This board is based on Allwinner A33 SoC. + +Home Page: https://www.olimex.com/Products/OLinuXino/A33/A33-OLinuXino/open-source-hardware +Wiki: https://wiki.amarulasolutions.com/bsp/sunxi/a33/Olimex-A33-Olinuxino.html + +How to build it +=============== + +Configure Buildroot: + + $ make olimex_a33_olinuxino_defconfig + +Build everything by running: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + +output/images/ +├── boot.scr +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── sun8i-a33-olinuxino.dtb +├── u-boot.bin +├── u-boot-sunxi-with-spl.bin +└── zImage + + +How to write the SD card +======================== + +The sdcard.img file is a complete bootable image ready to be written +on the boot medium. To install it, simply copy the image to a uSD +card: + + # dd if=output/images/sdcard.img of=/dev/sdX + +Where 'sdX' is the device node of the uSD. + +Eject the SD card, insert it in the A33-OLinuXino board, and power it up. diff --git a/buildroot/board/olimex/a64-olinuxino/boot.cmd b/buildroot/board/olimex/a64-olinuxino/boot.cmd new file mode 100644 index 000000000..28ed6d9dc --- /dev/null +++ b/buildroot/board/olimex/a64-olinuxino/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-olinuxino.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/olimex/a64-olinuxino/genimage.cfg b/buildroot/board/olimex/a64-olinuxino/genimage.cfg new file mode 100644 index 000000000..328b68be1 --- /dev/null +++ b/buildroot/board/olimex/a64-olinuxino/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-olinuxino.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/olimex/a64-olinuxino/readme.txt b/buildroot/board/olimex/a64-olinuxino/readme.txt new file mode 100644 index 000000000..342bdc77d --- /dev/null +++ b/buildroot/board/olimex/a64-olinuxino/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the A64-OLinuXino. With the current configuration +it will bring-up the board, and allow access through the serial console. + +A64-OLinuXino link: +https://www.olimex.com/Products/OLinuXino/A64/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Olimex+A64-Olinuxino + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make olimex_a64_olinuxino_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your A64-OLinuXino and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/olimex/imx233_olinuxino/linux-3.18.config b/buildroot/board/olimex/imx233_olinuxino/linux-3.18.config deleted file mode 100644 index d46d4d5cb..000000000 --- a/buildroot/board/olimex/imx233_olinuxino/linux-3.18.config +++ /dev/null @@ -1,152 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PERF_EVENTS=y -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_BLK_DEV_INTEGRITY=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MXS=y -# CONFIG_ARM_THUMB is not set -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_UBI=y -# CONFIG_BLK_DEV is not set -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_93CX6=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -# CONFIG_ETHERNET is not set -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_RTL8187=m -CONFIG_ATH_CARDS=m -CONFIG_ATH9K_HTC=m -CONFIG_RT2X00=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_RT55XX=y -CONFIG_RT2800USB_UNKNOWN=y -CONFIG_RTL_CARDS=m -CONFIG_RTL8192CU=m -# CONFIG_RTLWIFI_DEBUG is not set -CONFIG_ZD1211RW=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_MXS_AUART=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MXS=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_MXS=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_STMP3XXX_RTC_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_FB=y -CONFIG_FB_MXS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_HRTIMER=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_MXS_PHY=y -CONFIG_MMC=y -CONFIG_MMC_MXS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_STMP=y -CONFIG_DMADEVICES=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_MXS_LRADC=y -CONFIG_IIO=y -CONFIG_IIO_SYSFS_TRIGGER=y -CONFIG_PWM=y -CONFIG_PWM_MXS=y -CONFIG_EXT4_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y -CONFIG_FRAME_WARN=2048 -CONFIG_UNUSED_SYMBOLS=y -CONFIG_DEBUG_FS=y -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_USER=y -CONFIG_KEYS=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=m -CONFIG_FONTS=y diff --git a/buildroot/board/olimex/imx233_olinuxino/linux-wifi.fragment b/buildroot/board/olimex/imx233_olinuxino/linux-wifi.fragment new file mode 100644 index 000000000..b70dea2c6 --- /dev/null +++ b/buildroot/board/olimex/imx233_olinuxino/linux-wifi.fragment @@ -0,0 +1,18 @@ +# Network testing +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +# MII PHY device drivers +CONFIG_WLAN=y +CONFIG_RTL8187=m +CONFIG_ATH9K_HTC=m +CONFIG_RT2X00=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL_CARDS=m +CONFIG_RTL8192CU=m +CONFIG_ZD1211RW=m diff --git a/buildroot/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch b/buildroot/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch deleted file mode 100644 index 54c3ca019..000000000 --- a/buildroot/board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch +++ /dev/null @@ -1,122 +0,0 @@ -Forward-ported patch from https://github.com/koliqi/imx23-olinuxino -for mxs-bootlets-10.12.01 - -Signed-off-by: Gustavo Zacarias - -diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c ---- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 -@@ -0,0 +1,54 @@ -+/* -+ * Platform specific data for the IMX23_OLINUXINO development board -+ * -+ * Fadil Berisha -+ * -+ * Copyright 2008 SigmaTel, Inc -+ * Copyright 2008 Embedded Alley Solutions, Inc -+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. -+ * -+ * This file is licensed under the terms of the GNU General Public License -+ * version 2. This program is licensed "as is" without any warranty of any -+ * kind, whether express or implied. -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+#include -+#include -+#include -+ -+/************************************************ -+ * LRADC keyboard data * -+ ************************************************/ -+int lradc_keypad_ch = LRADC_CH0; -+int lradc_vddio_ch = LRADC_CH6; -+ -+struct lradc_keycode lradc_keycodes[] = { -+ { 100, KEY4 }, -+ { 306, KEY5 }, -+ { 601, KEY6 }, -+ { 932, KEY7 }, -+ { 1260, KEY8 }, -+ { 1424, KEY9 }, -+ { 1707, KEY10 }, -+ { 2207, KEY11 }, -+ { 2525, KEY12 }, -+ { 2831, KEY13 }, -+ { 3134, KEY14 }, -+ { -1, 0 }, -+}; -+ -+/************************************************ -+ * Magic key combinations for Armadillo * -+ ************************************************/ -+u32 magic_keys[MAGIC_KEY_NR] = { -+ [MAGIC_KEY1] = KEY4, -+ [MAGIC_KEY2] = KEY6, -+ [MAGIC_KEY3] = KEY10, -+}; -+ -+/************************************************ -+ * Default command line * -+ ************************************************/ -+char cmdline_def[] = "console=ttyAMA0,115200"; -diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt ---- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 -@@ -0,0 +1,3 @@ -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c ---- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 -@@ -84,6 +84,8 @@ - #include "../../mach-mx28/includes/registers/regsrtc.h" - #elif defined(STMP378X) - #include "../../mach-mx23/includes/registers/regsrtc.h" -+#elif defined(IMX23_OLINUXINO) -+#include "../../mach-mx23/includes/registers/regsrtc.h" - #endif - - #define NAND_SECONDARY_BOOT 0x00000002 -diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h ---- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 -@@ -19,6 +19,8 @@ - - #if defined (BOARD_STMP378X_DEV) - #define MACHINE_ID 0xa45 -+#elif defined (BOARD_IMX23_OLINUXINO_DEV) -+#define MACHINE_ID 0x1009 - #else - #error "Allocate a machine ID for your board" - #endif -diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile ---- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 -@@ -69,6 +69,11 @@ - HW_OBJS = $(LRADC_OBJS) - CFLAGS += -DMX28 -DBOARD_MX28_EVK - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+HW_OBJS = $(LRADC_OBJS) -+CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV -+endif - - # Generic code - CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o -diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile ---- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 -@@ -16,6 +16,9 @@ - ifeq ($(BOARD), iMX28_EVK) - ARCH = mx28 - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+endif - - all: build_prep gen_bootstream - diff --git a/buildroot/board/olimex/imx233_olinuxino/readme.txt b/buildroot/board/olimex/imx233_olinuxino/readme.txt index 1c36a61e7..1e676c45d 100644 --- a/buildroot/board/olimex/imx233_olinuxino/readme.txt +++ b/buildroot/board/olimex/imx233_olinuxino/readme.txt @@ -5,53 +5,25 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. -You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically two partitions: +=== Output files after building ============================================== -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +output/images ++-- boot.vfat (VFAT kernel partition image generated by genimage) ++-- imx23-olinuxino.dtb (device tree blob) ++-- rootfs.ext2 (Root file system) ++-- sdcard.img (Complete SD card image generated by genimage) ++-- u-boot.sd (U-Boot image) ++-- uImage (Kernel binary) -Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root -and from the buildroot project top level directory: -(remember to replace /dev/sdc* with the appropiate device name!) +=== Use of generated SD card image =========================================== -***** WARNING: Double check that /dev/sdc is your MicroSD card ***** -***** It might be /dev/sdb or some other device name ***** -***** Failure to do so may result in you wiping your hard disk ***** +To determine the device associated to the SD card have a look in the +/proc/partitions file: -1. Unmount the filesystem(s) if they're already mounted, usually... + cat /proc/partitions - # for fs in `grep /dev/sdc /proc/mounts|cut -d ' ' -f 1`;do umount $fs;done +Then, run the following command as root: - ...should work +*** WARNING! The command will destroy all the card content. Use with care! *** -2. Blank the partition table out - - # dd if=/dev/zero of=/dev/sdc bs=1024 count=1024 - -3. Set up the partitions - - # fdisk /dev/sdc - n - p - 1 - - +16MB - t - 53 - n - p - 2 - - - w - -4. Fill up the first (bootstrap + kernel) partition - # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 - -5. Fill up the second (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 - -6. Remove the MicroSD card from your linux PC and put it into your olinuxino. - -7. Boot! You're done! + sudo dd if=output/images/sdcard.img of=/dev/ diff --git a/buildroot/board/olpc/genimage.cfg b/buildroot/board/olpc/genimage.cfg new file mode 100644 index 000000000..baafe3171 --- /dev/null +++ b/buildroot/board/olpc/genimage.cfg @@ -0,0 +1,9 @@ +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/olpc/linux.config b/buildroot/board/olpc/linux.config new file mode 100644 index 000000000..538f7c594 --- /dev/null +++ b/buildroot/board/olpc/linux.config @@ -0,0 +1,71 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_RFKILL=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_GPIO_SYSFS=y +CONFIG_NETDEVICES=y +CONFIG_LIBERTAS=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1200 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=900 +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TABLET=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_POWER_SUPPLY=y +CONFIG_BATTERY_OLPC=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FB_SIMPLE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_EXT4_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_FONTS=y +CONFIG_FONT_TER16x32=y diff --git a/buildroot/board/olpc/olpc.fth b/buildroot/board/olpc/olpc.fth new file mode 100644 index 000000000..b4cbecf11 --- /dev/null +++ b/buildroot/board/olpc/olpc.fth @@ -0,0 +1,47 @@ +\ OLPC XO boot script + +: (visible) " unfreeze visible" evaluate ; +' (visible) catch drop forget (visible) + +" /aliases" find-device " last" get-property +abort" No last alias" +" /pci/sd@c" 2over substring? if " root=/dev/mmcblk0p1 " to boot-file then +" /sd/sdhci@d4280000" 2over substring? if " root=/dev/mmcblk1p1 " to boot-file then +" /pci/usb@" 2over substring? if " root=/dev/sda1 " to boot-file then +" /usb@" 2over substring? if " root=/dev/sda1 " to boot-file then +" /pci/nandflash@c" 2over substring? if " root=/dev/mtdblock0 rootfstype=jffs2 " to boot-file then +2drop + +root-device " compatible" get-property dend if 0 0 then ( compatible$ ) +" olpc,xo-1.75" 2over sindex -1 > if ( compatible$ ) + \ Version check on XO-1.75 + " mrvl,mmp2" 2over sindex -1 = if ( compatible$ ) + 2drop ( ) + cr + ." Firmware Q4E00 or newer is needed to boot a Devicetree enabled kernel." cr + cr + ." One way to update is to copy http://dev.laptop.org/~quozl/q4e00ja.rom" cr + ." to a FAT partition on a USB flash stick and run ""flash u:\q4e00ja.rom""" cr + cr + ." Aborting boot." cr + " show-sad" evaluate + abort + then +then ( compatible$ ) + +" mmp" 2swap sindex -1 > if + \ A Marvell MMP-based machine + " last:\boot\zImage" to boot-device + boot-file " console=ttyS2,115200 " $cat2 to boot-file +else + \ Assume XO-1 + " last:\boot\bzImage" to boot-device + boot-file " console=ttyS0,115200 reboot=pci " $cat2 to boot-file +then + +\ Pick a terminal that looks better on the XO screen +root-device " architecture" get-property dend if 0 0 else 1- then +" OLPC" $= if boot-file " fbcon=font:TER16x32 vt.color=0xf0 " $cat2 to boot-file then + +boot-file " console=tty0 rootwait" $cat2 to boot-file +boot diff --git a/buildroot/board/olpc/post-build.sh b/buildroot/board/olpc/post-build.sh new file mode 100755 index 000000000..4d4cf9708 --- /dev/null +++ b/buildroot/board/olpc/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" +install -m 0644 -D $BOARD_DIR/olpc.fth $TARGET_DIR/boot/olpc.fth diff --git a/buildroot/board/olpc/readme.txt b/buildroot/board/olpc/readme.txt new file mode 100644 index 000000000..f1110c82c --- /dev/null +++ b/buildroot/board/olpc/readme.txt @@ -0,0 +1,98 @@ +OLPC XO Laptops +=============== + +This document explains how to build and run images that run on the OLPC +XO laptops. + +Supported models +---------------- + +* OLPC XO-1 + The original NS Geode based OLPC laptop, uses the x86 architecture. + Can be booted either from an internal MTD device formatted with JFFS2 + or from a FAT or EXT4 partition on a SD card or a USB flash stick. + +* OLPC XO-7.5 + The ARM-based laptop. Needs a recent enough firmware to provide a good + enough flattened device tree to the kernel. Can be from a FAT or EXT4 + partition on a internal eMMC, a SD card or a USB flash stick. + +Configure and build +=================== + + $ make olpc_xo1_defconfig # Configure for XO-1 + +or: + + $ make olpc_xo175_defconfig # Configure for XO-1.75 + +Then: + + $ make menuconfig # Customize the build configuration + $ make # Build + +Preparing the machine +===================== + +Firmware security +----------------- + +Most OLPC machines were shipped with the security system that disallows +booting unsigned software. If this is the case with your machine, in order +to run the image you've built on it you'll need to get a developer key and +deactivate the security system. + +The procedure is descriped in the OLPC wiki: +http://wiki.laptop.org/go/Activation_and_Developer_Keys + +Firmware upgrade +---------------- + +It is always preferrable to use an up to date firmware. The firmware images +are available at http://wiki.laptop.org/go/Firmware. For the XO-1.75 laptop +to boot the mainline kernel a firmware Q4E00JA or newer is needed. You can +get it at http://dev.laptop.org/~quozl/q4e00ja.rom. + +To update the firmware, place the .rom file on to your bootable media, +connect a charged battery pack and a wall adapter, and enter the Open +Firmware prompt by pressing ESC during the early boot (needs an unlocked +laptop -- see "Firmware security" above). Then use the "flash" command +to update the firmware: + + ok flash ext:\q4e00ja.rom \ Flash the "q4e00ja.rom" from the SD card + ok flash u:\q4e00ja.rom \ Flash the "q4e00ja.rom" from USB stick + +Create the bootable SD card or USB flash stick +============================================== + +When the build is finished, an image file called "sdcard.img" will be created. +It is suitable for writing directly to a SD card, USB flash stick or (on a +XO-1.75) the internal eMMC flash. + +Before writing the image, please double check that you're using the right +device (e.g. with "lsblk" command). Doing the following will DESTROY ALL DATA +that's currently on the media. + + # cat output/images/sdcard.img >/dev/ + +Flashing the JFFS2 image (XO-1 only) +==================================== + +Unlike XO-1.75, the internal NAND flash on XO-1 is accessed without a +FTL and needs a flash-friendly filesystem. A build configured for XO-1 +creates a file named "root.jffs2" that can be written to it. + +One way to write it is from the Open Firmware prompt. First, partition +and format a USB flash disk with a FAT file system and place the +"root.jffs2" file onto it. Then power on the machine, enter the +Open Firmware port by pressing the ESC key and run the following: + + ok patch noop ?open-crcs copy-nand \ Disable CRC check + ok copy-nand u:\root.jffs2 + +Booting the machine +=================== + +Once your machine is unlocked, it will automatically boot from your media +wherever it will detect it attached to the USB bus or the SD card slot, +otherwise it will proceed booting from the internal flash. diff --git a/buildroot/board/olpc/xo-1.75/linux.config b/buildroot/board/olpc/xo-1.75/linux.config new file mode 100644 index 000000000..30e43a886 --- /dev/null +++ b/buildroot/board/olpc/xo-1.75/linux.config @@ -0,0 +1,46 @@ +CONFIG_ARCH_MMP=y +CONFIG_MACH_MMP2_DT=y +CONFIG_MACH_MMP3_DT=y +CONFIG_USB_EHCI_MV_U2O=y +CONFIG_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=16 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_SENSORS_LIS3_SPI=y +CONFIG_SERIO_OLPC_APSP=y +CONFIG_REGULATOR_88PG86X=m +CONFIG_VIDEO_MMP_CAMERA=y +CONFIG_DRM_ARMADA=y +CONFIG_DRM_DISPLAY_CONNECTOR=m +CONFIG_DRM_SIMPLE_BRIDGE=m +CONFIG_DRM_ETNAVIV=m +CONFIG_USB_EHCI_MV=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +CONFIG_OLPC_XO175=y +CONFIG_OLPC_XO175_EC=y +CONFIG_PHY_PXA_USB=y +CONFIG_PHY_MMP3_USB=y +CONFIG_CRYPTO_LZO=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MTD_SPI_NOR=m +CONFIG_I2C_PXA=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SPI=y +CONFIG_SPI_PXA2XX=y +CONFIG_SPI_SLAVE=y +CONFIG_SND_SOC=y +CONFIG_SND_SOC_RT5631=y +CONFIG_PWRSEQ_SD8787=m +CONFIG_RTC_DRV_DS1307=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ZFORCE=y diff --git a/buildroot/board/olpc/xo-1/linux.config b/buildroot/board/olpc/xo-1/linux.config new file mode 100644 index 000000000..12919471a --- /dev/null +++ b/buildroot/board/olpc/xo-1/linux.config @@ -0,0 +1,80 @@ +# CONFIG_64BIT is not set +CONFIG_IOSF_MBI=y +CONFIG_MGEODE_LX=y +CONFIG_X86_MSR=y +CONFIG_HZ_100=y +CONFIG_KEXEC=y +CONFIG_CMDLINE_BOOL=y +CONFIG_ACPI=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_OLPC=y +CONFIG_OLPC_XO1_PM=y +CONFIG_OLPC_XO1_RTC=y +CONFIG_OLPC_XO1_SCI=y +# CONFIG_VIRTUALIZATION is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_CMA=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=0 +CONFIG_MTD_ONENAND=y +CONFIG_MTD_ONENAND_GENERIC=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_NAND_CAFE=y +CONFIG_MTD_UBI=y +CONFIG_CS5535_MFGPT=y +CONFIG_CS5535_CLOCK_EVENT_SRC=y +CONFIG_MOUSE_PS2_OLPC=y +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_VIA is not set +CONFIG_NVRAM=y +CONFIG_SCx200_ACB=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_GPIO_CS5535=y +CONFIG_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_GEODE_WDT=y +CONFIG_MFD_CS5535=y +CONFIG_MFD_MAX8925=y +CONFIG_VIDEO_CAFE_CCIC=y +CONFIG_FB_TILEBLITTING=y +CONFIG_FB_VESA=y +CONFIG_FB_GEODE=y +CONFIG_FB_GEODE_LX=y +CONFIG_BACKLIGHT_MAX8925=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_SND_OSSEMUL=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_AC97_POWER_SAVE=y +CONFIG_SND_CS5535AUDIO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_OHCI_HCD=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_STAGING=y +CONFIG_FB_OLPC_DCON=y +CONFIG_XO1_RFKILL=y +CONFIG_RESET_CONTROLLER=y +CONFIG_GENERIC_PHY=y +CONFIG_PROC_KCORE=y +CONFIG_HUGETLBFS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_WBUF_VERIFY=y +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_FS_XATTR=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_UBIFS_FS=y +CONFIG_PCI=y +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_MESH=y +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m diff --git a/buildroot/board/openblocks/a6/readme.txt b/buildroot/board/openblocks/a6/readme.txt new file mode 100644 index 000000000..10a78bb79 --- /dev/null +++ b/buildroot/board/openblocks/a6/readme.txt @@ -0,0 +1,78 @@ +Openblocks A6 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Openblocks A6. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make openblocks_a6_defconfig + +Compile everything: + + $ make + +Updating board over TFTP +======================== + +Copy the content of output/images to the root of your TFTP server. + +Connect serial and ethernet, power up board and stop it in U-Boot: + +DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 14 tRCD=5 +DRAM CS[0] base 0x00000000 size 512MB +DRAM Total size 512MB 16bit width +Addresses 8M - 0M are saved for the U-Boot usage. +Mem malloc Initialization (8M - 7M): Done +NAND:64 MB +POST: mac verify Eth0 PASSED + +CPU : Marvell Feroceon (Rev 1) + +Streaming disabled +Write allocate disabled + + +USB 0: host mode +Net: egiga0 +Hit any key to stop autoboot: 0 +openblocks>> + + +Load kernel from tftp: + +setenv serverip +setenv bootfile uImage.kirkwood-openblocks_a6 +bootp && tftp + + +Write it to nand: + +nand erase 0x590000 0x1c5c000 +nand write.e $loadaddr 0x590000 0x1c5c000 + + +Load rootfs from tftp: + +setenv serverip +setenv bootfile rootfs.jffs2 +bootp && tftp + + +Write it to nand: + +nand erase 0x2214000 0x1dc4000 +nand write.jffs2 $loadaddr 0x2214000 0x1dc4000 + + +Configure kernel to use rootfs: + +setenv root /dev/mtdblock5 rootfstype=jffs2 +saveenv +boot diff --git a/buildroot/board/orangepi/orangepi-lite/boot.cmd b/buildroot/board/orangepi/orangepi-lite/boot.cmd new file mode 100644 index 000000000..5c29dabfe --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-lite.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-lite/genimage.cfg b/buildroot/board/orangepi/orangepi-lite/genimage.cfg new file mode 100644 index 000000000..cd81f986b --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi Lite +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-orangepi-lite.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-lite/linux-extras.config b/buildroot/board/orangepi/orangepi-lite/linux-extras.config new file mode 100644 index 000000000..6bb716903 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite/linux-extras.config @@ -0,0 +1,15 @@ +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y + +# hdmi +CONFIG_DRM_SUN8I_DW_HDMI=y +CONFIG_SUN8I_DE2_CCU=y + +# analog audio +CONFIG_SND_SUN8I_CODEC_ANALOG=y diff --git a/buildroot/board/orangepi/orangepi-lite/readme.txt b/buildroot/board/orangepi/orangepi-lite/readme.txt new file mode 100644 index 000000000..5f402bf20 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite/readme.txt @@ -0,0 +1,29 @@ +OrangePi Lite + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi Lite. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_lite_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-lite2/extlinux.conf b/buildroot/board/orangepi/orangepi-lite2/extlinux.conf new file mode 100644 index 000000000..1966186a2 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite2/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /Image + devicetree /sun50i-h6-orangepi-lite2.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait diff --git a/buildroot/board/orangepi/orangepi-lite2/genimage.cfg b/buildroot/board/orangepi/orangepi-lite2/genimage.cfg new file mode 100644 index 000000000..97251b483 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite2/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h6-orangepi-lite2.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-lite2/post-build.sh b/buildroot/board/orangepi/orangepi-lite2/post-build.sh new file mode 100755 index 000000000..ec20fca7d --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite2/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/orangepi/orangepi-lite2/readme.txt b/buildroot/board/orangepi/orangepi-lite2/readme.txt new file mode 100644 index 000000000..bed561b56 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite2/readme.txt @@ -0,0 +1,44 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi Lite2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi Lite2 link: +http://www.orangepi.org/Orange%20Pi%20Lite%202/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Lite2 + +How to build +============ + + $ make orangepi_lite2_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi Lite2 and power it up. The console +is on the serial line, 115200 8N1. + +WiFi +==== + + # wpa_passphrase ACCESSPOINTNAME >> /etc/wpa_supplicant.conf + (type password and enter) + # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B + # udhcpc -i wlan0 + # ping google.com diff --git a/buildroot/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt b/buildroot/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt new file mode 100755 index 000000000..c1cc4c3c2 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-lite2/rootfs_overlay/lib/firmware/brcm/brcmfmac43455-sdio.txt @@ -0,0 +1,82 @@ +#AP6255_NVRAM_V1.0_29052015 + +NVRAMRev=$Rev: 498373 $ +sromrev=11 +vendid=0x14e4 +devid=0x43ab +manfid=0x2d0 +prodid=0x06e4 +macaddr=00:90:4c:c5:12:38 +nocrc=1 +boardtype=0x6e4 +boardrev=0x1304 +xtalfreq=37400 +#boardflags: 5GHz eTR switch by default +#2.4GHz eTR switch by default +#bit1 for btcoex +boardflags=0x00080201 +boardflags2=0x40000000 +boardflags3=0x48200100 +rxgains2gelnagaina0=0 +rxgains2gtrisoa0=0 +rxgains2gtrelnabypa0=0 +rxgains5gelnagaina0=0 +rxgains5gtrisoa0=0 +rxgains5gtrelnabypa0=0 +rxchain=1 +txchain=1 +aa2g=1 +aa5g=1 +tssipos5g=1 +tssipos2g=1 +femctrl=0 +AvVmid_c0=0,157,1,126,1,126,1,126,1,126 +pa2ga0=-112,6296,-662 +pa2ga1=-165,3699,-515 +pa5ga0=-143,6016,-683,-141,6013,-678,-137,5988,-670,-136,5982,-670 +pa5ga1=-161,3544,-499,-166,3543,-497,-169,3569,-497,-171,3598,-498 +itrsw=1 +pdoffset2g40ma0=10 +pdoffset40ma0=0xaaaa +pdoffset80ma0=0xaaaa +extpagain5g=2 +extpagain2g=2 +tworangetssi2g=1 +tworangetssi5g=1 +# LTECX flags +# WCI2 +ltecxmux=0 +ltecxpadnum=0x0504 +ltecxfnsel=0x22 +ltecxgcigpio=0x32 + +maxp2ga0=64 +ofdmlrbw202gpo=0x0033 +dot11agofdmhrbw202gpo=0x1553 +mcsbw202gpo=0x99355533 + +maxp5ga0=80,82,76,77 + +mcsbw205glpo=0x99755000 +mcsbw205gmpo=0x9df55000 +mcsbw205ghpo=0x99855000 + +mcsbw405glpo=0xb8555000 +mcsbw405gmpo=0xed955000 +mcsbw405ghpo=0xd9755000 + +mcsbw805glpo=0xc8555000 +mcsbw805gmpo=0xe9555000 +mcsbw805ghpo=0xd9555000 + +swctrlmap_2g=0x00040004,0x00020002,0x00040004,0x010a02,0x1ff +swctrlmap_5g=0x00100010,0x00200020,0x00100010,0x010a02,0x2f4 +swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000 + +vcodivmode=1 +deadman_to=481500000 +ed_thresh2g=-54 +ed_thresh5g=-54 + +muxenab=0x10 diff --git a/buildroot/board/orangepi/orangepi-one-plus/extlinux.conf b/buildroot/board/orangepi/orangepi-one-plus/extlinux.conf new file mode 100644 index 000000000..f573aa17d --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one-plus/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /Image + devicetree /sun50i-h6-orangepi-one-plus.dtb + append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait diff --git a/buildroot/board/orangepi/orangepi-one-plus/genimage.cfg b/buildroot/board/orangepi/orangepi-one-plus/genimage.cfg new file mode 100644 index 000000000..ebb07e8b2 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one-plus/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h6-orangepi-one-plus.dtb", + "extlinux" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-one-plus/post-build.sh b/buildroot/board/orangepi/orangepi-one-plus/post-build.sh new file mode 100755 index 000000000..ec20fca7d --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one-plus/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/orangepi/orangepi-one-plus/readme.txt b/buildroot/board/orangepi/orangepi-one-plus/readme.txt new file mode 100644 index 000000000..87f6de851 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one-plus/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi One Plus. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi One Plus link: +http://www.orangepi.org/OrangePiOneplus/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+One+Plus + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make orangepi_one_plus_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi One Plus and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/orangepi/orangepi-one/boot.cmd b/buildroot/board/orangepi/orangepi-one/boot.cmd new file mode 100644 index 000000000..ab616e6ac --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-one.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-one/genimage.cfg b/buildroot/board/orangepi/orangepi-one/genimage.cfg new file mode 100644 index 000000000..4640ff2b1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi PC +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-orangepi-one.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-one/readme.txt b/buildroot/board/orangepi/orangepi-one/readme.txt new file mode 100644 index 000000000..e650f82d1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-one/readme.txt @@ -0,0 +1,29 @@ +OrangePi One + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi One. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_one_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-pc-plus/boot.cmd b/buildroot/board/orangepi/orangepi-pc-plus/boot.cmd new file mode 100644 index 000000000..0c75c862e --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc-plus/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-pc-plus.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-pc-plus/genimage.cfg b/buildroot/board/orangepi/orangepi-pc-plus/genimage.cfg new file mode 100644 index 000000000..9ffa1a21a --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc-plus/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi PC Plus +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-orangepi-pc-plus.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-pc-plus/linux-extras.config b/buildroot/board/orangepi/orangepi-pc-plus/linux-extras.config new file mode 100644 index 000000000..5e3af2b83 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc-plus/linux-extras.config @@ -0,0 +1,8 @@ +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y diff --git a/buildroot/board/orangepi/orangepi-pc-plus/readme.txt b/buildroot/board/orangepi/orangepi-pc-plus/readme.txt new file mode 100644 index 000000000..49206949c --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc-plus/readme.txt @@ -0,0 +1,29 @@ +OrangePi PC Plus + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi PC Plus. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_pc_plus_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-pc/boot.cmd b/buildroot/board/orangepi/orangepi-pc/boot.cmd new file mode 100644 index 000000000..9da625c80 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-pc.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-pc/genimage.cfg b/buildroot/board/orangepi/orangepi-pc/genimage.cfg new file mode 100644 index 000000000..932d81cf1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi PC +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-orangepi-pc.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-pc/linux.fragment b/buildroot/board/orangepi/orangepi-pc/linux.fragment new file mode 100644 index 000000000..581b715bd --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc/linux.fragment @@ -0,0 +1,5 @@ +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_REGULATOR_SY8106A=y +CONFIG_DRM_SUN8I_DW_HDMI=y +CONFIG_SUN8I_DE2_CCU=y +CONFIG_SND_SUN8I_CODEC_ANALOG=y diff --git a/buildroot/board/orangepi/orangepi-pc/readme.txt b/buildroot/board/orangepi/orangepi-pc/readme.txt new file mode 100644 index 000000000..d316b6fc1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc/readme.txt @@ -0,0 +1,29 @@ +OrangePi PC + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi PC. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_pc_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-pc2/boot.cmd b/buildroot/board/orangepi/orangepi-pc2/boot.cmd new file mode 100644 index 000000000..4d4fc7bf6 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc2/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-pc2.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-pc2/genimage.cfg b/buildroot/board/orangepi/orangepi-pc2/genimage.cfg new file mode 100644 index 000000000..e10c67ffc --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc2/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h5-orangepi-pc2.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-pc2/readme.txt b/buildroot/board/orangepi/orangepi-pc2/readme.txt new file mode 100644 index 000000000..120048195 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-pc2/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi PC2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi PC2 link: +http://www.orangepi.org/orangepipc2/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+PC2 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make orangepi_pc2_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi PC2 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/orangepi/orangepi-plus/boot.cmd b/buildroot/board/orangepi/orangepi-plus/boot.cmd new file mode 100644 index 000000000..1a378cb91 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-plus/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-plus.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-plus/genimage.cfg b/buildroot/board/orangepi/orangepi-plus/genimage.cfg new file mode 100644 index 000000000..391678b73 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-plus/genimage.cfg @@ -0,0 +1,35 @@ +# Minimal SD card image for the OrangePi Plus\Plus2 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-orangepi-plus.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-plus/readme.txt b/buildroot/board/orangepi/orangepi-plus/readme.txt new file mode 100644 index 000000000..7f871bcfa --- /dev/null +++ b/buildroot/board/orangepi/orangepi-plus/readme.txt @@ -0,0 +1,29 @@ +OrangePi Plus/Plus2 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi Plus/Plus2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_plus_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-prime/boot.cmd b/buildroot/board/orangepi/orangepi-prime/boot.cmd new file mode 100644 index 000000000..34887880d --- /dev/null +++ b/buildroot/board/orangepi/orangepi-prime/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-prime.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-prime/genimage.cfg b/buildroot/board/orangepi/orangepi-prime/genimage.cfg new file mode 100644 index 000000000..bb01ed9f1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-prime/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h5-orangepi-prime.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-prime/readme.txt b/buildroot/board/orangepi/orangepi-prime/readme.txt new file mode 100644 index 000000000..5811884d4 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-prime/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi Prime. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi Prime link: +http://www.orangepi.org/OrangePiPrime/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Prime + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make orangepi_prime_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi Prime and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/orangepi/orangepi-r1/boot.cmd b/buildroot/board/orangepi/orangepi-r1/boot.cmd new file mode 100644 index 000000000..e927b01e8 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-r1/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-r1.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-r1/genimage.cfg b/buildroot/board/orangepi/orangepi-r1/genimage.cfg new file mode 100644 index 000000000..01e2c0adc --- /dev/null +++ b/buildroot/board/orangepi/orangepi-r1/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi R1 +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h2-plus-orangepi-r1.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-r1/linux-extras.config b/buildroot/board/orangepi/orangepi-r1/linux-extras.config new file mode 100644 index 000000000..47ba88f67 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-r1/linux-extras.config @@ -0,0 +1,11 @@ +# spi nor +CONFIG_MTD=y +CONFIG_MTD_OF_PARTS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_M25P80=y + +# ondemand cpufreq governor +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y + +# USB ethernet +CONFIG_USB_RTL8152=y diff --git a/buildroot/board/orangepi/orangepi-r1/readme.txt b/buildroot/board/orangepi/orangepi-r1/readme.txt new file mode 100644 index 000000000..826649936 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-r1/readme.txt @@ -0,0 +1,29 @@ +OrangePi R1 + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi R1. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_r1_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/orangepi/orangepi-win/boot.cmd b/buildroot/board/orangepi/orangepi-win/boot.cmd new file mode 100644 index 000000000..2ddb769d6 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-win/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-orangepi-win.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-win/genimage.cfg b/buildroot/board/orangepi/orangepi-win/genimage.cfg new file mode 100644 index 000000000..db025d55c --- /dev/null +++ b/buildroot/board/orangepi/orangepi-win/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-orangepi-win.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-win/readme.txt b/buildroot/board/orangepi/orangepi-win/readme.txt new file mode 100644 index 000000000..93adddd86 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-win/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi Win/Win Plus. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi Win/Win Plus link: +http://www.orangepi.org/OrangePiWin_WinPlus/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Win + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make orangepi_win_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi Win/Win Plus and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/orangepi/orangepi-zero-plus2/boot.cmd b/buildroot/board/orangepi/orangepi-zero-plus2/boot.cmd new file mode 100644 index 000000000..4772a9be3 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero-plus2/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-zero-plus2.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-zero-plus2/genimage.cfg b/buildroot/board/orangepi/orangepi-zero-plus2/genimage.cfg new file mode 100644 index 000000000..8091edad6 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero-plus2/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-h5-orangepi-zero-plus2.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/orangepi/orangepi-zero-plus2/linux-extras.config b/buildroot/board/orangepi/orangepi-zero-plus2/linux-extras.config new file mode 100644 index 000000000..52b4b4b29 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero-plus2/linux-extras.config @@ -0,0 +1,10 @@ +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_BRCMFMAC=m diff --git a/buildroot/board/orangepi/orangepi-zero-plus2/readme.txt b/buildroot/board/orangepi/orangepi-zero-plus2/readme.txt new file mode 100644 index 000000000..322ba0e12 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero-plus2/readme.txt @@ -0,0 +1,37 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Orangepi Zero Plus2. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Orangepi Zero Plus2 link: +http://www.orangepi.org/OrangePiZeroPlus2/ + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Orangepi+Zero+Plus2 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make orangepi_zero_plus2_defconfig + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Orangepi Zero Plus2 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/orangepi/orangepi-zero-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt b/buildroot/board/orangepi/orangepi-zero-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file mode 100644 index 000000000..8f0bf6906 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero-plus2/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt @@ -0,0 +1,54 @@ +#AP6212_NVRAM_V1.0_20140603 +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1101 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +xtalfreq=26000 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=90 +txpwrbckof=6 +cckbw202gpo=0x5555 +legofdmbw202gpo=0x77777777 +mcsbw202gpo=0xaaaaaaaa + +# OFDM IIR : +ofdmdigfilttype=7 +# PAPD mode: +papdmode=2 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +#OOB parameters +hostwake=0x40 +hostrdy=0x41 +usbrdy=0x03 +usbrdydelay=100 +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x10 for Host awake +muxenab=0x10 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + diff --git a/buildroot/board/orangepi/orangepi-zero/boot.cmd b/buildroot/board/orangepi/orangepi-zero/boot.cmd new file mode 100644 index 000000000..44f0885ff --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/boot.cmd @@ -0,0 +1,8 @@ +setenv fdt_high ffffffff + +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h2-plus-orangepi-zero.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/orangepi/orangepi-zero/genimage.cfg b/buildroot/board/orangepi/orangepi-zero/genimage.cfg new file mode 100644 index 000000000..017435f28 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/genimage.cfg @@ -0,0 +1,36 @@ +# Minimal SD card image for the OrangePi Zero +# +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h2-plus-orangepi-zero.dtb", + "boot.scr" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/orangepi/orangepi-zero/linux-extras.config b/buildroot/board/orangepi/orangepi-zero/linux-extras.config new file mode 100644 index 000000000..2db241de2 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/linux-extras.config @@ -0,0 +1,20 @@ +# spidev +CONFIG_SPI_SPIDEV=y + +# spi nor +CONFIG_MTD=y +CONFIG_MTD_OF_PARTS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_M25P80=y + +# wireless core +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y +CONFIG_CFG80211_WEXT=y + +# wireless drivers +CONFIG_WLAN=y + +# ondemand cpufreq governor +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y diff --git a/buildroot/board/orangepi/orangepi-zero/patches/linux/0001-ARM-dts-orange-pi-zero-interrupt-triggering-xr819.patch b/buildroot/board/orangepi/orangepi-zero/patches/linux/0001-ARM-dts-orange-pi-zero-interrupt-triggering-xr819.patch new file mode 100644 index 000000000..146d23d1a --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/patches/linux/0001-ARM-dts-orange-pi-zero-interrupt-triggering-xr819.patch @@ -0,0 +1,35 @@ +From 321faaf4b78d46a0c77782c1798856746f0619e9 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich +Date: Fri, 19 May 2017 23:39:48 +0300 +Subject: [PATCH 1/3] ARM: dts: orange-pi-zero: specify XR819 WiFi chip + interrupts + +The orange-pi-zero board has Allwinner XR819 SDIO wifi chip. The board +dts file provides a node enabling mmc1 controller. Together with an +out-of-tree driver https://github.com/fifteenhex/xradio this node +enables using the wifi chip. + +This commit specifies XR819 interrupt configuration for the driver. + +Signed-off-by: Sergey Matyukevich +--- + arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +index b7ca916d871d..4e1a9050c6b4 100644 +--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts ++++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +@@ -125,6 +125,9 @@ + */ + xr819: sdio_wifi@1 { + reg = <1>; ++ compatible = "xradio,xr819"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>; + }; + }; + +-- +2.11.0 + diff --git a/buildroot/board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch b/buildroot/board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch new file mode 100644 index 000000000..fc24e7b8a --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/patches/linux/0002-ARM-dts-orange-pi-zero-enable-spi-nor.patch @@ -0,0 +1,42 @@ +From 068c3baff3048a3db4ef2518ff917ce749cd8169 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich +Date: Sat, 20 May 2017 11:24:26 +0300 +Subject: [PATCH 2/3] ARM: dts: orange-pi-zero: enable SPI NOR + +Enable SPI NOR on orange-pi-zero board. + +For more information see: +- http://linux-sunxi.org/Orange_Pi_Zero#SPI_NOR_flash + +Signed-off-by: Sergey Matyukevich +--- + arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +index 4e1a9050c6b4..cdf19821b1f3 100644 +--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts ++++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +@@ -161,3 +161,19 @@ + /* USB VBUS is always on */ + status = "okay"; + }; ++ ++&spi0 { ++ status = "okay"; ++ ++ flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "mxicy,mx25l1606e", "winbond,w25q128"; ++ reg = <0>; ++ spi-max-frequency = <40000000>; ++ ++ partition@00000000 { ++ reg = <0x00000000 0x200000>; /* 2Mb */ ++ }; ++ }; ++}; +-- +2.11.0 + diff --git a/buildroot/board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch b/buildroot/board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch new file mode 100644 index 000000000..553155ce1 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/patches/linux/0003-ARM-dts-orange-pi-zero-enable-spidev.patch @@ -0,0 +1,42 @@ +From 8dd1b2a696bb7e9914abd11cc6f5c0f54c33d626 Mon Sep 17 00:00:00 2001 +From: Sergey Matyukevich +Date: Sat, 20 May 2017 15:36:51 +0300 +Subject: [PATCH 3/3] ARM: dts: orange-pi-zero: enable spidev + +On orange-pi-zero board SPI1 pins are accessible via GPIO expansion port. +This patch enables spidev driver for SPI1. + +Signed-off-by: Sergey Matyukevich +--- + arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +index cdf19821b1f3..7242aaecb14f 100644 +--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts ++++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +@@ -59,6 +59,7 @@ + serial0 = &uart0; + /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ + ethernet1 = &xr819; ++ spi1 = &spi1; + }; + + chosen { +@@ -177,3 +178,13 @@ + }; + }; + }; ++ ++&spi1 { ++ status = "okay"; ++ ++ spidev@0 { ++ compatible = "rohm,dh2228fv"; ++ reg = <0>; ++ spi-max-frequency = <10000000>; ++ }; ++}; +-- +2.11.0 + diff --git a/buildroot/board/orangepi/orangepi-zero/readme.txt b/buildroot/board/orangepi/orangepi-zero/readme.txt new file mode 100644 index 000000000..1afdbb784 --- /dev/null +++ b/buildroot/board/orangepi/orangepi-zero/readme.txt @@ -0,0 +1,29 @@ +OrangePi Zero + +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the OrangePi Zero. With the current configuration +it will bring-up the board, and allow access through the serial console. + +How to build it +=============== + +Configure Buildroot: + + $ make orangepi_zero_defconfig + +Compile everything and build the SD card image: + + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX diff --git a/buildroot/board/pandaboard/genimage.cfg b/buildroot/board/pandaboard/genimage.cfg new file mode 100644 index 000000000..f30033f02 --- /dev/null +++ b/buildroot/board/pandaboard/genimage.cfg @@ -0,0 +1,26 @@ +image boot.vfat { + vfat { + files = { + "MLO", + "u-boot.img" + } + } + size = 8M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/pandaboard/readme.txt b/buildroot/board/pandaboard/readme.txt new file mode 100644 index 000000000..80a20c274 --- /dev/null +++ b/buildroot/board/pandaboard/readme.txt @@ -0,0 +1,46 @@ +Pandaboard +========== + +This file documents the Buildroot support for the Pandaboard, a +low-power, low-cost single-board computer development platform based +on the Texas Instruments OMAP4 system on a chip (SoC). + +Configuring and building Buildroot +---------------------------------- + +Start from the defconfig: + + $ make pandaboard_defconfig + +You can edit build options the usual way: + + $ make menuconfig + +When you are happy with the setup, run: + + $ make + +The result of the build with the default settings should be these files: + + output/images + +-- MLO + +-- omap4-panda-a4.dtb + +-- omap4-panda.dtb + +-- omap4-panda-es.dtb + +-- rootfs.ext4 + +-- sdcard.img + +-- u-boot.img + +-- zImage + +How to write the SD card +------------------------ + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Where /dev/sdX is the device node of your SD card (may be /dev/mmcblkX +instead depending on setup). diff --git a/buildroot/board/pc/genimage-bios.cfg b/buildroot/board/pc/genimage-bios.cfg new file mode 100644 index 000000000..c66949991 --- /dev/null +++ b/buildroot/board/pc/genimage-bios.cfg @@ -0,0 +1,24 @@ +image disk.img { + + hdimage { + } + + partition boot { + in-partition-table = "no" + image = "boot.img" + offset = 0 + size = 512 + } + + partition grub { + in-partition-table = "no" + image = "grub.img" + offset = 512 + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } + +} diff --git a/buildroot/board/pc/genimage-efi.cfg b/buildroot/board/pc/genimage-efi.cfg new file mode 100644 index 000000000..ea15ae5cf --- /dev/null +++ b/buildroot/board/pc/genimage-efi.cfg @@ -0,0 +1,35 @@ +image efi-part.vfat { + vfat { + file startup.nsh { + image = "efi-part/startup.nsh" + } + file EFI { + image = "efi-part/EFI" + } + file bzImage { + image = "bzImage" + } + } + size = 16777216 +} + +image disk.img { + hdimage { + gpt = true + } + + partition boot { + image = "efi-part.vfat" + partition-type-uuid = c12a7328-f81f-11d2-ba4b-00a0c93ec93b + offset = 32768 + size = 16777216 + bootable = true + } + + partition root { + partition-type-uuid = 44479540-f297-41b2-9af7-d131d5f0458a + partition-uuid = UUID_TMP + image = "rootfs.ext2" + offset = 16809984 + } +} diff --git a/buildroot/board/pc/grub-bios.cfg b/buildroot/board/pc/grub-bios.cfg new file mode 100644 index 000000000..bd3e3f000 --- /dev/null +++ b/buildroot/board/pc/grub-bios.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /boot/bzImage root=/dev/sda1 rootwait console=tty1 +} diff --git a/buildroot/board/pc/grub-efi.cfg b/buildroot/board/pc/grub-efi.cfg new file mode 100644 index 000000000..bd4466640 --- /dev/null +++ b/buildroot/board/pc/grub-efi.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 +} diff --git a/buildroot/board/pc/linux.config b/buildroot/board/pc/linux.config new file mode 100644 index 000000000..f86352e1e --- /dev/null +++ b/buildroot/board/pc/linux.config @@ -0,0 +1,85 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_SMP=y +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +CONFIG_EFI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETFILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_ATL2=m +CONFIG_ATL1=m +CONFIG_ATL1E=m +CONFIG_ATL1C=m +CONFIG_ALX=m +CONFIG_E100=m +CONFIG_E1000=m +CONFIG_E1000E=m +CONFIG_IGB=m +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +CONFIG_R8169=m +CONFIG_ATH9K=m +CONFIG_ATH9K_HTC=m +CONFIG_CARL9170=m +CONFIG_ATH10K=m +CONFIG_ATH10K_PCI=m +CONFIG_IWL4965=m +CONFIG_IWL3945=m +CONFIG_IWLWIFI=m +CONFIG_RT2X00=m +CONFIG_RT2800PCI=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +# CONFIG_RTL_CARDS is not set +CONFIG_RTL8XXXU=m +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_DRM=y +CONFIG_DRM_I915=y +CONFIG_DRM_QXL=y +CONFIG_DRM_BOCHS=y +CONFIG_DRM_VIRTIO_GPU=y +CONFIG_FB_VESA=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_EXT4_FS=y +CONFIG_FUSE_FS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_SQUASHFS=y +CONFIG_UNWINDER_FRAME_POINTER=y diff --git a/buildroot/board/pc/post-build.sh b/buildroot/board/pc/post-build.sh new file mode 100755 index 000000000..ed37b3b87 --- /dev/null +++ b/buildroot/board/pc/post-build.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +BOARD_DIR=$(dirname "$0") + +# Detect boot strategy, EFI or BIOS +if [ -f "$BINARIES_DIR/efi-part/startup.nsh" ]; then + cp -f "$BOARD_DIR/grub-efi.cfg" "$BINARIES_DIR/efi-part/EFI/BOOT/grub.cfg" +else + cp -f "$BOARD_DIR/grub-bios.cfg" "$TARGET_DIR/boot/grub/grub.cfg" + + # Copy grub 1st stage to binaries, required for genimage + cp -f "$HOST_DIR/lib/grub/i386-pc/boot.img" "$BINARIES_DIR" +fi diff --git a/buildroot/board/pc/post-image-efi.sh b/buildroot/board/pc/post-image-efi.sh new file mode 100755 index 000000000..a0df70a6a --- /dev/null +++ b/buildroot/board/pc/post-image-efi.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +UUID=$(dumpe2fs "$BINARIES_DIR/rootfs.ext2" 2>/dev/null | sed -n 's/^Filesystem UUID: *\(.*\)/\1/p') +sed -i "s/UUID_TMP/$UUID/g" "$BINARIES_DIR/efi-part/EFI/BOOT/grub.cfg" +sed "s/UUID_TMP/$UUID/g" board/pc/genimage-efi.cfg > "$BINARIES_DIR/genimage-efi.cfg" +support/scripts/genimage.sh -c "$BINARIES_DIR/genimage-efi.cfg" diff --git a/buildroot/board/pc/readme.txt b/buildroot/board/pc/readme.txt new file mode 100644 index 000000000..41aec50d3 --- /dev/null +++ b/buildroot/board/pc/readme.txt @@ -0,0 +1,72 @@ +Bare PC sample config +===================== + +1. Build + + First select the appropriate target you want. + + For BIOS-based boot strategy: + + $ make pc_x86_64_bios_defconfig + + For EFI-based boot strategy on a GPT-partitioned disk: + + $ make pc_x86_64_efi_defconfig + + Add any additional packages required and build: + + $ make + +2. Write the pendrive + + The build process will create a pendrive image called sdcard.img in + output/images. + + Write the image to a pendrive: + + $ dd if=output/images/disk.img of=/dev/sdc; sync + + Once it's done insert it into the target PC and boot. + + Remember that if said PC has another boot device you might need to + select this alternative for it to boot. + + In the case of EFI boot you might need to disable Secure Boot from + the setup as well. + +3. Enjoy + +Emulation in qemu (BIOS) +======================== + +1. Edit grub-bios.cfg + + Since the driver will show up in the virtual machine as /dev/vda, + change board/pc/grub-bios.cfg to use root=/dev/vda2 instead of + root=/dev/sda2. Then rebuild grub2 and the image. + +2. Run the emulation with: + +qemu-system-x86_64 \ + -M pc \ + -drive file=output/images/disk.img,if=virtio,format=raw \ + -net nic,model=virtio \ + -net user + + +Emulation in qemu (UEFI) +======================== + +Run the emulation with: + +qemu-system-x86_64 \ + -M pc \ + -bios \ + -drive file=output/images/disk.img,if=virtio,format=raw \ + -net nic,model=virtio \ + -net user + +Note that needs to point to a valid x86_64 UEFI +firmware image for qemu. It may be provided by your distribution as a +edk2 or OVMF package, in path such as +/usr/share/edk2/ovmf/OVMF_CODE.fd . diff --git a/buildroot/board/pine64/pine64/boot.cmd b/buildroot/board/pine64/pine64/boot.cmd new file mode 100644 index 000000000..14f561044 --- /dev/null +++ b/buildroot/board/pine64/pine64/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-pine64.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/pine64/pine64/genimage.cfg b/buildroot/board/pine64/pine64/genimage.cfg new file mode 100644 index 000000000..2ff38d541 --- /dev/null +++ b/buildroot/board/pine64/pine64/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-pine64.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/pine64/pine64/readme.txt b/buildroot/board/pine64/pine64/readme.txt new file mode 100644 index 000000000..85226fdd1 --- /dev/null +++ b/buildroot/board/pine64/pine64/readme.txt @@ -0,0 +1,38 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Pine64. With the current configuration +it will bring-up the board, and allow access through the serial console. + +Pine64 link: +https://www.pine64.org/?page_id=1194 + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/Pine64 + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make pine64_defconfig + + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your Pine64 and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/pine64/rock64/extlinux.conf b/buildroot/board/pine64/rock64/extlinux.conf new file mode 100644 index 000000000..bf71982a9 --- /dev/null +++ b/buildroot/board/pine64/rock64/extlinux.conf @@ -0,0 +1,4 @@ +label rock64-buildroot + kernel /boot/Image + devicetree /boot/rk3328-rock64.dtb + append console=ttyS2,1500000n8 root=/dev/mmcblk0p1 ro rootwait diff --git a/buildroot/board/pine64/rock64/genimage.cfg b/buildroot/board/pine64/rock64/genimage.cfg new file mode 100644 index 000000000..0b5a0d880 --- /dev/null +++ b/buildroot/board/pine64/rock64/genimage.cfg @@ -0,0 +1,23 @@ +image sdcard.img { + hdimage { + } + + partition uboot-spl { + in-partition-table = "no" + image = "u-boot-tpl-spl.img" + offset = 32768 # 512 * 0x40 from start of sd card + } + + partition uboot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 262144 # 512 * 0x200 from start of sd card + } + + partition rootfs { + partition-type = 0x83 + bootable = "yes" + image = "rootfs.ext2" + size = 500M + } +} diff --git a/buildroot/board/pine64/rock64/patches/uboot/0001-Makefile-rk3328-needs-itb-image-to-boot-properly.patch b/buildroot/board/pine64/rock64/patches/uboot/0001-Makefile-rk3328-needs-itb-image-to-boot-properly.patch new file mode 100644 index 000000000..2d35b78da --- /dev/null +++ b/buildroot/board/pine64/rock64/patches/uboot/0001-Makefile-rk3328-needs-itb-image-to-boot-properly.patch @@ -0,0 +1,32 @@ +From 211bf049084e6e374dac253138fa813682910146 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= +Date: Tue, 5 Feb 2019 22:08:54 +0100 +Subject: [PATCH] Makefile: rk3328 needs itb image to boot properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michał Łyszczek +--- + Makefile | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile b/Makefile +index 8086f3c93e..a6425b5b03 100644 +--- a/Makefile ++++ b/Makefile +@@ -799,6 +799,11 @@ ifneq ($(BUILD_ROM),) + ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom + endif + ++# rk3328 needs itb image to boot properly ++ifeq ($(CONFIG_ROCKCHIP_RK3328),y) ++ALL-y += u-boot.itb ++endif ++ + # enable combined SPL/u-boot/dtb rules for tegra + ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy) + ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin +-- +2.18.1 + diff --git a/buildroot/board/pine64/rock64/post-build.sh b/buildroot/board/pine64/rock64/post-build.sh new file mode 100755 index 000000000..26b53cba8 --- /dev/null +++ b/buildroot/board/pine64/rock64/post-build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +MKIMAGE=$HOST_DIR/bin/mkimage +BOARD_DIR="$(dirname $0)" + +$MKIMAGE -n rk3328 -T rksd -d $BINARIES_DIR/u-boot-tpl.bin $BINARIES_DIR/u-boot-tpl.img +cat $BINARIES_DIR/u-boot-tpl.img $BINARIES_DIR/u-boot-spl.bin > $BINARIES_DIR/u-boot-tpl-spl.img + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/pine64/rock64/readme.txt b/buildroot/board/pine64/rock64/readme.txt new file mode 100644 index 000000000..029c67641 --- /dev/null +++ b/buildroot/board/pine64/rock64/readme.txt @@ -0,0 +1,95 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the Rock64. With this default configuration you +can log in into board via uart and look around. + +Board homepage: https://www.pine64.org/?page_id=7147 + +Build +===== + +First, load rock64 config for buildroot + + $ make rock64_defconfig + +Optionally make changes to buildroot config (to install more programs) + + $ make menuconfig + +And then build everything + + $ make + +When completed, following files will be generated in output/images directory: + + . + ├── Image + ├── bl31.bin + ├── bl31.elf + ├── rk3328-rock64.dtb + ├── rootfs.ext2 + ├── rootfs.ext4 -> rootfs.ext2 + ├── rootfs.tar + ├── sdcard.img + ├── u-boot-spl.bin + ├── u-boot-tpl-spl.img + ├── u-boot-tpl.bin + ├── u-boot-tpl.img + ├── u-boot.bin + └── u-boot.itb + +Creating bootable SD card +========================= + +!!! THIS COMMAND MAY WIPE YOUR DISK! +!!! MAKE SURE YOU PASSED CORRECT DEVICE! +!!! OR IT THIS WILL WIPE YOUR DISK! + +Simply invoke (as root) + + # dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device (not partition), of= argument may also be +/dev/mmcblk0 if you are using built-in sd card reader. + +Runtime +======= + +Login +----- + +By default, buildroot has no password, just type 'root' as login user, and +you will be logged in. + +Serial console +-------------- + +Serial console needs to be connected to pins (into 40pin rpi compatible part) + +pin 6: gnd +pin 8: tx +pin 10: rx + +Pin numbers are printed on board. + +Uart configuration is not standard. Rock64 uses 1500000 (1,5M) baudrate +with standard 8n1. + +Ethernet +-------- + +To enable ethernet you need to load modules for it: + +# modprobe stmmac +# modprobe dwmac-rk + +and since by default there is no dhcp installed, you need to configure ip +address, remember to change address to fit your network. + +# ifconfig eth0 up +# ip addr add 10.1.1.180/24 dev eth0 +# ping 10.1.1.1 +PING 10.1.1.1 (10.1.1.1): 56 data bytes +64 bytes from 10.1.1.1: seq=0 ttl=64 time=0.695 ms diff --git a/buildroot/board/pine64/sopine/boot.cmd b/buildroot/board/pine64/sopine/boot.cmd new file mode 100644 index 000000000..2eab64237 --- /dev/null +++ b/buildroot/board/pine64/sopine/boot.cmd @@ -0,0 +1,6 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +fatload mmc 0 $kernel_addr_r Image +fatload mmc 0 $fdt_addr_r sun50i-a64-sopine-baseboard.dtb + +booti $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/pine64/sopine/genimage.cfg b/buildroot/board/pine64/sopine/genimage.cfg new file mode 100644 index 000000000..02ebe7ab9 --- /dev/null +++ b/buildroot/board/pine64/sopine/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "sun50i-a64-sopine-baseboard.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "sunxi-spl.bin" + offset = 8192 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.itb" + offset = 40K + size = 1M # 1MB - 40K + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/pine64/sopine/readme.txt b/buildroot/board/pine64/sopine/readme.txt new file mode 100644 index 000000000..08cb380b4 --- /dev/null +++ b/buildroot/board/pine64/sopine/readme.txt @@ -0,0 +1,38 @@ +Intro +===== + +This default configuration will allow you to start experimenting with the +buildroot environment for the SoPine. With the current configuration +it will bring-up the board, and allow access through the serial console. + +SoPINE link: +https://www.pine64.org/?page_id=1491 + +Wiki link: +https://openedev.amarulasolutions.com/display/ODWIKI/SoPine + +This configuration uses U-Boot mainline and kernel mainline. + +How to build +============ + + $ make pine64_sopine_defconfig + + $ make + +Note: you will need access to the internet to download the required +sources. + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + $ sudo sync + +Insert the micro SDcard in your SoPine and power it up. The console +is on the serial line, 115200 8N1. diff --git a/buildroot/board/qemu/aarch64-virt/linux-3.18.config b/buildroot/board/qemu/aarch64-virt/linux-3.18.config deleted file mode 100644 index 93cb42f2e..000000000 --- a/buildroot/board/qemu/aarch64-virt/linux-3.18.config +++ /dev/null @@ -1,56 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_FHANDLE=y -CONFIG_NO_HZ_IDLE=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_TASKSTATS=y -CONFIG_SCHED_AUTOGROUP=y -CONFIG_PROFILING=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_ARCH_VEXPRESS=y -CONFIG_SMP=y -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_BINFMT_MISC=y -CONFIG_COMPAT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_PACKET_DIAG=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_BRIDGE=m -CONFIG_NET_SCHED=y -CONFIG_VSOCKETS=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_VIRTIO_BLK=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SCSI_VIRTIO=y -CONFIG_ATA=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -CONFIG_MACVLAN=y -CONFIG_VIRTIO_NET=y -CONFIG_NLMON=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_VIRTIO_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_VIRTIO=y -CONFIG_RTC_CLASS=y -CONFIG_VIRTIO_MMIO=y -CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y -CONFIG_MAILBOX=y -CONFIG_PL320_MBOX=y -CONFIG_EXT4_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/aarch64-virt/linux.config b/buildroot/board/qemu/aarch64-virt/linux.config new file mode 100644 index 000000000..02e0812ff --- /dev/null +++ b/buildroot/board/qemu/aarch64-virt/linux.config @@ -0,0 +1,66 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_PROFILING=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_COMPAT=y +CONFIG_FW_CFG_SYSFS=y +CONFIG_FW_CFG_SYSFS_CMDLINE=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_BLK_DEV_BSGLIB=y +CONFIG_BINFMT_MISC=y +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_BRIDGE=m +CONFIG_NET_SCHED=y +CONFIG_VSOCKETS=y +CONFIG_PCI=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +CONFIG_MACVLAN=y +CONFIG_VIRTIO_NET=y +CONFIG_NLMON=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS=y +CONFIG_DRM=y +CONFIG_DRM_VIRTIO_GPU=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_MAILBOX=y +CONFIG_PL320_MBOX=y +CONFIG_ARM_SMMU_V3=y +CONFIG_EXT4_FS=y +CONFIG_FUSE_FS=y +CONFIG_VIRTIO_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/aarch64-virt/readme.txt b/buildroot/board/qemu/aarch64-virt/readme.txt index c17472535..db35a3a7a 100644 --- a/buildroot/board/qemu/aarch64-virt/readme.txt +++ b/buildroot/board/qemu/aarch64-virt/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -smp 1 -kernel output/images/Image -append "console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 + qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel output/images/Image -append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 # qemu_aarch64_virt_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/arm-nuri/readme.txt b/buildroot/board/qemu/arm-nuri/readme.txt deleted file mode 100644 index 6fe1ac05e..000000000 --- a/buildroot/board/qemu/arm-nuri/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -Run the emulation with: - - qemu-system-arm -M nuri -kernel output/images/zImage -append "console=ttySAC1,115200" -smp 2 -serial null -serial stdio - -The login prompt will appear in the terminal that started Qemu. The -graphical window is the framebuffer. - -Startup time is slow because of the SMP CPU emulation so be patient. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/arm-versatile/linux-3.18.config b/buildroot/board/qemu/arm-versatile/linux-3.18.config deleted file mode 100644 index dd5db5323..000000000 --- a/buildroot/board/qemu/arm-versatile/linux-3.18.config +++ /dev/null @@ -1,81 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_VERSATILE=y -CONFIG_MACH_VERSATILE_AB=y -CONFIG_PCI=y -CONFIG_AEABI=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_PHYSMAP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_LEGACY=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_NETDEVICES=y -CONFIG_SMC91X=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_ARMAACI=m -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=m -CONFIG_EXT4_FS=y -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_FONTS=y -CONFIG_FONT_ACORN_8x8=y diff --git a/buildroot/board/qemu/arm-versatile/linux-nommu.config b/buildroot/board/qemu/arm-versatile/linux-nommu.config new file mode 100644 index 000000000..1d91d51a1 --- /dev/null +++ b/buildroot/board/qemu/arm-versatile/linux-nommu.config @@ -0,0 +1,47 @@ +# CONFIG_MMU is not set +CONFIG_ARCH_VERSATILE=y +CONFIG_ARM_SINGLE_ARCH_VERSATILE=y +CONFIG_SET_MEM_PARAM=y +CONFIG_DRAM_BASE=0x00000000 +CONFIG_DRAM_SIZE=0x08000000 +CONFIG_ARCH_VERSATILE_PB=y +CONFIG_MACH_VERSATILE_AB=y +CONFIG_MACH_VERSATILE_DT=y +CONFIG_BINFMT_FLAT=y +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_AEABI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETDEVICES=y +CONFIG_SMC91X=y +CONFIG_PHYLIB=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIO_AMBAKMI=y +CONFIG_LEGACY_PTY_COUNT=16 +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_ARMAACI=m +CONFIG_EXT4_FS=y +CONFIG_VFAT_FS=m +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_MAGIC_SYSRQ=y diff --git a/buildroot/board/qemu/arm-versatile/linux.config b/buildroot/board/qemu/arm-versatile/linux.config new file mode 100644 index 000000000..b1001d84a --- /dev/null +++ b/buildroot/board/qemu/arm-versatile/linux.config @@ -0,0 +1,43 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_VERSATILE=y +CONFIG_PCI=y +CONFIG_PCI_VERSATILE=y +CONFIG_AEABI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_SYM53C8XX_2=y +CONFIG_NETDEVICES=y +CONFIG_8139CP=y +CONFIG_PHYLIB=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIO_AMBAKMI=y +CONFIG_LEGACY_PTY_COUNT=16 +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_ARMAACI=m +CONFIG_EXT4_FS=y +CONFIG_VFAT_FS=m +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_MAGIC_SYSRQ=y diff --git a/buildroot/board/qemu/arm-versatile/patches/linux/versatile-nommu.patch b/buildroot/board/qemu/arm-versatile/patches/linux/versatile-nommu.patch new file mode 100644 index 000000000..a2c0962f8 --- /dev/null +++ b/buildroot/board/qemu/arm-versatile/patches/linux/versatile-nommu.patch @@ -0,0 +1,113 @@ +From 4ac4324dcdaf237aa34545b3795acb2e5c42d10e Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Fri, 1 Feb 2019 11:36:20 +0100 +Subject: [PATCH] arm-versatile-nommu: Linux patch + +Originally made by Waldemar Brodkorb from LKML. + +Signed-Off-by: Waldemar Brodkorb +[Gerome: reformated as a Git patch] +Signed-off-by: Gerome Burlats +[Romain: fix Waldemar's authorship in Git patch] +Signed-off-by: Romain Naour +--- + arch/arm/Kconfig | 11 +++++++++++ + arch/arm/Kconfig.debug | 3 ++- + arch/arm/include/asm/mach/map.h | 1 + + arch/arm/mach-versatile/Kconfig | 5 +++-- + arch/arm/mach-versatile/Makefile.boot | 3 +++ + arch/arm/mach-versatile/versatile_dt.c | 4 ++++ + 6 files changed, 24 insertions(+), 3 deletions(-) + create mode 100644 arch/arm/mach-versatile/Makefile.boot + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index e8cd55a5b04c..fc2dbff70394 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -353,6 +353,17 @@ config ARM_SINGLE_ARMV7M + select SPARSE_IRQ + select USE_OF + ++config ARM_SINGLE_ARCH_VERSATILE ++ bool "ARM Ltd. Versatile family" ++ depends on !MMU ++ select AUTO_ZRELADDR ++ select CLKSRC_OF ++ select COMMON_CLK ++ select GENERIC_CLOCKEVENTS ++ select GPIOLIB ++ select SPARSE_IRQ ++ select USE_OF ++ + config ARCH_EBSA110 + bool "EBSA-110" + select ARCH_USES_GETTIMEOFFSET +diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug +index f6fcb8a79889..92fc637d3db8 100644 +--- a/arch/arm/Kconfig.debug ++++ b/arch/arm/Kconfig.debug +@@ -1843,7 +1843,8 @@ config DEBUG_UNCOMPRESS + config UNCOMPRESS_INCLUDE + string + default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ +- PLAT_SAMSUNG || ARM_SINGLE_ARMV7M ++ PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ ++ ARM_SINGLE_ARCH_VERSATILE + default "mach/uncompress.h" + + config EARLY_PRINTK +diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h +index 9b7c328fb207..b1fe9c8b5c3e 100644 +--- a/arch/arm/include/asm/mach/map.h ++++ b/arch/arm/include/asm/mach/map.h +@@ -62,6 +62,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, + #else + #define iotable_init(map,num) do { } while (0) + #define vm_reserve_area_early(a,s,c) do { } while (0) ++#define debug_ll_io_init() do { } while (0) + #endif + + #endif +diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig +index f5c275434d6c..06ad999d5978 100644 +--- a/arch/arm/mach-versatile/Kconfig ++++ b/arch/arm/mach-versatile/Kconfig +@@ -1,7 +1,8 @@ + # SPDX-License-Identifier: GPL-2.0 + config ARCH_VERSATILE +- bool "ARM Ltd. Versatile family" +- depends on ARCH_MULTI_V5 ++ bool "ARM Ltd. Versatile family" if ARCH_MULTI_V5 ++ depends on ARCH_MULTI_V5 || ARM_SINGLE_ARCH_VERSATILE ++ default y if ARM_SINGLE_ARCH_VERSATILE + select ARM_AMBA + select ARM_TIMER_SP804 + select ARM_VIC +diff --git a/arch/arm/mach-versatile/Makefile.boot b/arch/arm/mach-versatile/Makefile.boot +new file mode 100644 +index 000000000000..eacfc3f5c33e +--- /dev/null ++++ b/arch/arm/mach-versatile/Makefile.boot +@@ -0,0 +1,3 @@ ++# Empty file waiting for deletion once Makefile.boot isn't needed any more. ++# Patch waits for application at ++# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 . +diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c +index 3c8d39c12909..8cfa05a37295 100644 +--- a/arch/arm/mach-versatile/versatile_dt.c ++++ b/arch/arm/mach-versatile/versatile_dt.c +@@ -37,7 +37,11 @@ + #include + + /* macro to get at MMIO space when running virtually */ ++#ifdef CONFIG_MMU + #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) ++#else ++#define IO_ADDRESS(x) (x) ++#endif + #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n)) + + /* +-- +2.14.5 + diff --git a/buildroot/board/qemu/arm-versatile/readme.txt b/buildroot/board/qemu/arm-versatile/readme.txt index cfa30e23e..223bd55c0 100644 --- a/buildroot/board/qemu/arm-versatile/readme.txt +++ b/buildroot/board/qemu/arm-versatile/readme.txt @@ -1,8 +1,10 @@ Run the emulation with: - qemu-system-arm -M versatilepb -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=scsi -append "root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=smc91c111 -net user + qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -drive file=output/images/rootfs.ext2,if=scsi,format=raw -append "rootwait root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user # qemu_arm_versatile_defconfig + +Or for the noMMU emulation: + + qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -append "console=ttyAMA0,115200" -serial stdio -net user -net nic,model=smc91c111 # qemu_arm_versatile_nommu_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/arm-vexpress-tz/linux.fragment b/buildroot/board/qemu/arm-vexpress-tz/linux.fragment new file mode 100644 index 000000000..1537d938f --- /dev/null +++ b/buildroot/board/qemu/arm-vexpress-tz/linux.fragment @@ -0,0 +1,3 @@ +### Enable OP-TEE +CONFIG_TEE=y +CONFIG_OPTEE=y diff --git a/buildroot/board/qemu/arm-vexpress-tz/post-build.sh b/buildroot/board/qemu/arm-vexpress-tz/post-build.sh new file mode 100755 index 000000000..7ead69a99 --- /dev/null +++ b/buildroot/board/qemu/arm-vexpress-tz/post-build.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -u +set -e + +# Rename boot images for the dear TF-A +ln -sf u-boot.bin ${BINARIES_DIR}/bl33.bin +ln -sf tee-header_v2.bin ${BINARIES_DIR}/bl32.bin +ln -sf tee-pager_v2.bin ${BINARIES_DIR}/bl32_extra1.bin +ln -sf tee-pageable_v2.bin ${BINARIES_DIR}/bl32_extra2.bin diff --git a/buildroot/board/qemu/arm-vexpress-tz/readme.txt b/buildroot/board/qemu/arm-vexpress-tz/readme.txt new file mode 100644 index 000000000..b235ba5cd --- /dev/null +++ b/buildroot/board/qemu/arm-vexpress-tz/readme.txt @@ -0,0 +1,136 @@ +Board qemu_arm_vexpress_tz builds a QEMU ARMv7-A target system with +OP-TEE running in the TrustZone secure world and a Linux based +OS running in the non-secure world. The board configuration enables +builds of the QEMU host ARM target emulator. + + make qemu_arm_vexpress_tz_defconfig + make + +The BIOS used in the QEMU host is the ARM Trusted Firmware-A (TF-A). TF-A +uses QEMU semihosting file access to access boot image files. The +QEMU platform is quite specific for that in TF-A and one needs to +run the emulation from the image directory for TF-A to boot the +secure and non-secure worlds. + + cd output/images && ../host/bin/qemu-system-arm \ + -machine virt -machine secure=on -cpu cortex-a15 \ + -smp 1 -s -m 1024 -d unimp \ + -serial stdio \ + -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \ + -semihosting-config enable,target=native \ + -bios bl1.bin + +The boot stage traces (if any) followed by the login prompt will appear +in the terminal that started QEMU. + +If you want to emulate more cores, use "-smp {1|2|3|4}" to select the +number of cores. + +Note: "-netdev user,id=vmnic -device virtio-net-device,netdev=vmnic" +brings network support that is used i.e. in OP-TEE regression tests. + + +-- Boot Details -- + +TF-A is used as QEMU BIOS. Its BL1 image boots and load its BL2 image. In turn, +this image loads the OP-TEE secure world (ARMv7-A BL32 stage) and the U-boot as +non-secure bootloader (BL33 stage). + +QEMU natively hosts and loads in RAM the QEMU ARM target device tree. OP-TEE +reads and modifies its content according to OP-TEE configuration. + +Enable TF-A traces from LOG_LEVEL (I.e LOG_LEVEL=40) from +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES. + + +-- OP-TEE Traces -- + +Secure boot stages and/or secure runtime services may use a serial link for +their traces. + +The ARM Trusted Firmware outputs its traces on the QEMU standard (first) +serial interface. + +The OP-TEE OS uses the QEMU second serial interface. + +To get the OP-TEE OS traces, append a second -serial argument after +-serial stdio in the QEMU command line. I.e, the following enables 2 serial +consoles over telnet connections: + + cd output/images && ../host/bin/qemu-system-arm \ + -machine virt -machine secure=on -cpu cortex-a15 \ + -smp 1 -s -m 1024 -d unimp \ + -serial telnet:127.0.0.1:1235,server \ + -serial telnet:127.0.0.1:1236,server \ + -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \ + -semihosting-config enable,target=native \ + -bios bl1.bin + +QEMU is now waiting for the telnet connection. From another shell, open a +telnet connection on the port for the U-boot and Linux consoles: + + telnet 127.0.0.1 1235 + +and again for the secure console + + telnet 127.0.0.1 1236 + + +-- Using gdb -- + +One can debug the OP-TEE secure world using GDB through the QEMU host. +To do so, simply run the qemu-system-arm emulation, then run a GDB client +and connect the QEMU internal GDB server. + +The example below assumes we run QEMU and the GDB client from the same +host computer. We use option -S of qemu-system-arm to make QEMU +waiting for the GDB continue instruction before booting the images. + +From a first shell: + cd output/images && ../host/bin/qemu-system-arm \ + -machine virt -machine secure=on -cpu cortex-a15 \ + -smp 1 -s -m 1024 -d unimp \ + -serial stdio \ + -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \ + -semihosting-config enable,target=native \ + -bios bl1.bin \ + -S + +From a second shell: + ./output/host/bin/arm-linux-gdb + GNU gdb (GNU Toolchain for the A-profile Architecture 8.2-2018-08 (arm-rel-8.23)) 8.1.1.20180704-git + Copyright (C) 2018 Free Software Foundation, Inc. + ... + For help, type "help". + Type "apropos word" to search for commands related to "word". + (gdb) + +From this GDB console, connect to the target, load the OP-TEE core symbols, +set a breakpoint to its entry point (__text_start) and start emulation: + + (gdb) target remote 127.0.0.1:1234 + (gdb) symbol-file ./output/build/optee-os-/out/arm/core/tee.elf + (gdb) hbreak __text_start + Hardware assisted breakpoint 1 at 0xe100000: file core/arch/arm/kernel/generic_entry_a32.S, line 246. + (gdb) cont + Continuing. + + Thread 1 hit Breakpoint 1, _start () at core/arch/arm/kernel/generic_entry_a32.S:246 + 246 bootargs_entry + (gdb) + + +Emulation has started, TF-A has loaded OP-TEE and U-boot images in memory and +has booted OP-TEE. Emulation stopped at OP-TEE core entry. + +Note: QEMU hosts a GDB service listening to TCP port 1234, as set through +qemu-system-arm command line option -s. + +Note: To build the GDB server, the following extra options have to be added to +the Buildroot configuration: + + BR2_ENABLE_DEBUG=y + BR2_PACKAGE_GDB=y + BR2_PACKAGE_HOST_GDB=y + BR2_TOOLCHAIN_BUILDROOT_CXX=y + BR2_TOOLCHAIN_BUILDROOT_GLIBC=y diff --git a/buildroot/board/qemu/arm-vexpress-tz/u-boot.config b/buildroot/board/qemu/arm-vexpress-tz/u-boot.config new file mode 100644 index 000000000..fd74bf1fe --- /dev/null +++ b/buildroot/board/qemu/arm-vexpress-tz/u-boot.config @@ -0,0 +1,7 @@ +CONFIG_SYS_TEXT_BASE=0x60000000 +CONFIG_BOOTCOMMAND="fdt addr ${fdt_addr} && fdt resize 1000 && smhload zImage ${kernel_addr_r} && smhload rootfs.cpio.gz ${ramdisk_addr_r} ramdisk_addr_end && setenv bootargs console=ttyAMA0,115200 earlyprintk=serial,ttyAMA0,115200 && fdt chosen ${ramdisk_addr_r} ${ramdisk_addr_end} && bootz ${kernel_addr_r} - ${fdt_addr}" +CONFIG_SEMIHOSTING=y +# Drop flash accesses +CONFIG_ENV_IS_IN_FLASH=n +CONFIG_MTD=n +CONFIG_MTD_NOR_FLASH=n diff --git a/buildroot/board/qemu/arm-vexpress/readme.txt b/buildroot/board/qemu/arm-vexpress/readme.txt index 937a39b18..8d1bb72f8 100644 --- a/buildroot/board/qemu/arm-vexpress/readme.txt +++ b/buildroot/board/qemu/arm-vexpress/readme.txt @@ -1,8 +1,9 @@ Run the emulation with: - qemu-system-arm -M vexpress-a9 -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=sd -append "console=ttyAMA0,115200 root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user + qemu-system-arm -M vexpress-a9 -smp 1 -m 256 -kernel output/images/zImage -dtb output/images/vexpress-v2p-ca9.dtb -drive file=output/images/rootfs.ext2,if=sd,format=raw -append "console=ttyAMA0,115200 rootwait root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user # qemu_arm_vexpress_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. -Tested with QEMU 2.2.0 +If you want to emulate more cores change "-smp 1" to "-smp 2" for +dual-core or even "smp -4" for a quad-core configuration. diff --git a/buildroot/board/qemu/csky/linux-ck610.config.fragment b/buildroot/board/qemu/csky/linux-ck610.config.fragment new file mode 100644 index 000000000..b690c7d6e --- /dev/null +++ b/buildroot/board/qemu/csky/linux-ck610.config.fragment @@ -0,0 +1,6 @@ +CONFIG_COMPILE_TEST=y +CONFIG_CPU_CK610=y +CONFIG_CPU_PM_WAIT=y +CONFIG_RAM_BASE=0x10000000 +CONFIG_CSKY_APB_INTC=y +CONFIG_GX6605S_TIMER=y diff --git a/buildroot/board/qemu/csky/linux-ck807.config.fragment b/buildroot/board/qemu/csky/linux-ck807.config.fragment new file mode 100644 index 000000000..b6974f015 --- /dev/null +++ b/buildroot/board/qemu/csky/linux-ck807.config.fragment @@ -0,0 +1,5 @@ +CONFIG_COMPILE_TEST=y +CONFIG_CPU_CK807=y +# CONFIG_CPU_HAS_FPU is not set +CONFIG_CPU_PM_WAIT=y +CONFIG_CSKY_APB_INTC=y diff --git a/buildroot/board/qemu/csky/linux-ck810.config.fragment b/buildroot/board/qemu/csky/linux-ck810.config.fragment new file mode 100644 index 000000000..50fa1f4f7 --- /dev/null +++ b/buildroot/board/qemu/csky/linux-ck810.config.fragment @@ -0,0 +1,5 @@ +CONFIG_COMPILE_TEST=y +CONFIG_CPU_CK810=y +# CONFIG_CPU_HAS_FPU is not set +CONFIG_CPU_PM_WAIT=y +CONFIG_CSKY_APB_INTC=y diff --git a/buildroot/board/qemu/csky/linux-ck860.config.fragment b/buildroot/board/qemu/csky/linux-ck860.config.fragment new file mode 100644 index 000000000..e8f6af10b --- /dev/null +++ b/buildroot/board/qemu/csky/linux-ck860.config.fragment @@ -0,0 +1,9 @@ +CONFIG_COMPILE_TEST=y +CONFIG_CPU_CK860=y +# CONFIG_CPU_HAS_FPU is not set +CONFIG_CPU_PM_WAIT=y +CONFIG_SMP=y +CONFIG_HOTPLUG_CPU=y +CONFIG_CSKY_APB_INTC=y +CONFIG_CSKY_MPINTC=y +CONFIG_CSKY_MP_TIMER=y diff --git a/buildroot/board/qemu/csky/readme.txt b/buildroot/board/qemu/csky/readme.txt new file mode 100644 index 000000000..5e4cb1871 --- /dev/null +++ b/buildroot/board/qemu/csky/readme.txt @@ -0,0 +1,15 @@ +Run with qemu: + +For ck860 smp: + qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux # qemu_csky860_virt_defconfig + +For ck807: + qemu-system-cskyv2 -M virt -nographic -kernel vmlinux # qemu_csky807_virt_defconfig + +For ck810: + qemu-system-cskyv2 -M virt -nographic -kernel vmlinux # qemu_csky810_virt_defconfig + +For ck610: + qemu-system-cskyv1 -M virt -nographic -kernel vmlinux # qemu_csky610_virt_defconfig + +The login prompt will appear in the terminal that started Qemu. Username is root and no password. diff --git a/buildroot/board/qemu/m68k-mcf5208/linux.config b/buildroot/board/qemu/m68k-mcf5208/linux.config new file mode 100644 index 000000000..09a89d725 --- /dev/null +++ b/buildroot/board/qemu/m68k-mcf5208/linux.config @@ -0,0 +1,28 @@ +CONFIG_M68K=y +CONFIG_COLDFIRE=y +# CONFIG_MMU is not set +CONFIG_M520x=y +CONFIG_CLOCK_SET=y +CONFIG_CLOCK_FREQ=66666666 +CONFIG_CLOCK_DIV=1 +CONFIG_M5208EVB=y +CONFIG_FREESCALE=y +CONFIG_RAMBASE=0x40000000 +CONFIG_RAMSIZE=0x0 +CONFIG_VECTORBASE=0x40000000 +CONFIG_KERNELBASE=0x40020000 +CONFIG_4KSTACKS=y +CONFIG_RAMKERNEL=y +CONFIG_BINFMT_FLAT=y +CONFIG_SERIAL_MCF=y +CONFIG_SERIAL_MCF_BAUDRATE=115200 +CONFIG_SERIAL_MCF_CONSOLE=y +CONFIG_BOOTPARAM=y +CONFIG_BOOTPARAM_STRING="console=ttyS0,115200" +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETDEVICES=y +CONFIG_NET_VENDOR_FREESCALE=y +CONFIG_FEC=y diff --git a/buildroot/board/qemu/m68k-mcf5208/readme.txt b/buildroot/board/qemu/m68k-mcf5208/readme.txt new file mode 100644 index 000000000..79bf7146a --- /dev/null +++ b/buildroot/board/qemu/m68k-mcf5208/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-m68k -M mcf5208evb -cpu m5208 -kernel output/images/vmlinux -nographic # qemu_m68k_mcf5208_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/m68k-q800/linux.config b/buildroot/board/qemu/m68k-q800/linux.config new file mode 100644 index 000000000..44eb70e2d --- /dev/null +++ b/buildroot/board/qemu/m68k-q800/linux.config @@ -0,0 +1,26 @@ +CONFIG_M68K=y +CONFIG_M68040=y +CONFIG_M68KFPU_EMU=y +CONFIG_MAC=y +CONFIG_MACINTOSH_DRIVERS=y +CONFIG_ADB=y +CONFIG_ADB_MACII=y +CONFIG_TTY=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETDEVICES=y +CONFIG_MACSONIC=y +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +CONFIG_SCSI_LOWLEVEL=y +CONFIG_SCSI_MAC_ESP=y +CONFIG_BLK_DEV_SD=y +CONFIG_SERIAL_PMACZILOG=y +CONFIG_SERIAL_PMACZILOG_TTYS=y +CONFIG_SERIAL_PMACZILOG_CONSOLE=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y diff --git a/buildroot/board/qemu/m68k-q800/readme.txt b/buildroot/board/qemu/m68k-q800/readme.txt new file mode 100644 index 000000000..f1db57d52 --- /dev/null +++ b/buildroot/board/qemu/m68k-q800/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-m68k -M q800 -kernel output/images/vmlinux -nographic -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0" # qemu_m68k_q800_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/microblazebe-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch b/buildroot/board/qemu/microblazebe-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch new file mode 100644 index 000000000..eb3859f85 --- /dev/null +++ b/buildroot/board/qemu/microblazebe-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch @@ -0,0 +1,34 @@ +From e96b73478232aa42b773cd19371808af69fd4b95 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Apr 2020 09:49:11 +0200 +Subject: [PATCH] net: xilinx: xemaclite: add 2.00.b revision + +Patch added for the kernel 3.14 +- fix networking in Qemu using a small patch +- disable DTS, because linux.bin does not include any DTB the + default Qemu included DTB is used and this is okay and works fine + +https://git.buildroot.net/buildroot/commit/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch?id=fa2798548368d51998fad18d7f6d1ae0ed065b33 + +[Romain: convert to git format] +Signed-off-by: Romain Naour +Cc: Waldemar Brodkorb +--- + drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c +index 0de52e70abcc..d8c13140ca77 100644 +--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c ++++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c +@@ -1278,6 +1278,7 @@ static const struct of_device_id xemaclite_of_match[] = { + { .compatible = "xlnx,opb-ethernetlite-1.01.b", }, + { .compatible = "xlnx,xps-ethernetlite-1.00.a", }, + { .compatible = "xlnx,xps-ethernetlite-2.00.a", }, ++ { .compatible = "xlnx,xps-ethernetlite-2.00.b", }, + { .compatible = "xlnx,xps-ethernetlite-2.01.a", }, + { .compatible = "xlnx,xps-ethernetlite-3.00.a", }, + { /* end of list */ }, +-- +2.25.3 + diff --git a/buildroot/board/qemu/microblazebe-mmu/linux-3.18.config b/buildroot/board/qemu/microblazebe-mmu/linux-3.18.config deleted file mode 100644 index fc25c9d2d..000000000 --- a/buildroot/board/qemu/microblazebe-mmu/linux-3.18.config +++ /dev/null @@ -1,56 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="rootfs.cpio" -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_BASE_FULL is not set -# CONFIG_FUTEX is not set -# CONFIG_EPOLL is not set -# CONFIG_SIGNALFD is not set -# CONFIG_SHMEM is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_OPT_LIB_ASM=y -CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" -CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 -CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 -CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 -CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 -CONFIG_HZ_100=y -CONFIG_MMU=y -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE_FORCE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_XILINX_EMACLITE=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_UARTLITE=y -CONFIG_SERIAL_UARTLITE_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_NFS_FS=y -CONFIG_CIFS=y -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_SLAB=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_EARLY_PRINTK=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set diff --git a/buildroot/board/qemu/microblazebe-mmu/linux.config b/buildroot/board/qemu/microblazebe-mmu/linux.config new file mode 100644 index 000000000..7bcd38206 --- /dev/null +++ b/buildroot/board/qemu/microblazebe-mmu/linux.config @@ -0,0 +1,20 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_OPT_LIB_ASM=y +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 +CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 +CONFIG_MMU=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETDEVICES=y +CONFIG_XILINX_EMACLITE=y +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +# CONFIG_VGA_CONSOLE is not set +CONFIG_TMPFS=y diff --git a/buildroot/board/qemu/microblazebe-mmu/readme.txt b/buildroot/board/qemu/microblazebe-mmu/readme.txt index c6375ccc6..7bb986422 100644 --- a/buildroot/board/qemu/microblazebe-mmu/readme.txt +++ b/buildroot/board/qemu/microblazebe-mmu/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-microblaze -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio + qemu-system-microblaze -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio # qemu_microblazebe_mmu_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch b/buildroot/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch deleted file mode 100644 index 756bfaea9..000000000 --- a/buildroot/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur linux-3.14.orig/drivers/net/ethernet/xilinx/xilinx_emaclite.c linux-3.14/drivers/net/ethernet/xilinx/xilinx_emaclite.c ---- linux-3.14.orig/drivers/net/ethernet/xilinx/xilinx_emaclite.c 2014-03-31 05:40:15.000000000 +0200 -+++ linux-3.14/drivers/net/ethernet/xilinx/xilinx_emaclite.c 2014-04-11 22:53:42.000000000 +0200 -@@ -1249,6 +1249,7 @@ - { .compatible = "xlnx,opb-ethernetlite-1.01.b", }, - { .compatible = "xlnx,xps-ethernetlite-1.00.a", }, - { .compatible = "xlnx,xps-ethernetlite-2.00.a", }, -+ { .compatible = "xlnx,xps-ethernetlite-2.00.b", }, - { .compatible = "xlnx,xps-ethernetlite-2.01.a", }, - { .compatible = "xlnx,xps-ethernetlite-3.00.a", }, - { /* end of list */ }, diff --git a/buildroot/board/qemu/microblazeel-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch b/buildroot/board/qemu/microblazeel-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch new file mode 100644 index 000000000..eb3859f85 --- /dev/null +++ b/buildroot/board/qemu/microblazeel-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch @@ -0,0 +1,34 @@ +From e96b73478232aa42b773cd19371808af69fd4b95 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Apr 2020 09:49:11 +0200 +Subject: [PATCH] net: xilinx: xemaclite: add 2.00.b revision + +Patch added for the kernel 3.14 +- fix networking in Qemu using a small patch +- disable DTS, because linux.bin does not include any DTB the + default Qemu included DTB is used and this is okay and works fine + +https://git.buildroot.net/buildroot/commit/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch?id=fa2798548368d51998fad18d7f6d1ae0ed065b33 + +[Romain: convert to git format] +Signed-off-by: Romain Naour +Cc: Waldemar Brodkorb +--- + drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c +index 0de52e70abcc..d8c13140ca77 100644 +--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c ++++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c +@@ -1278,6 +1278,7 @@ static const struct of_device_id xemaclite_of_match[] = { + { .compatible = "xlnx,opb-ethernetlite-1.01.b", }, + { .compatible = "xlnx,xps-ethernetlite-1.00.a", }, + { .compatible = "xlnx,xps-ethernetlite-2.00.a", }, ++ { .compatible = "xlnx,xps-ethernetlite-2.00.b", }, + { .compatible = "xlnx,xps-ethernetlite-2.01.a", }, + { .compatible = "xlnx,xps-ethernetlite-3.00.a", }, + { /* end of list */ }, +-- +2.25.3 + diff --git a/buildroot/board/qemu/microblazeel-mmu/linux-3.18.config b/buildroot/board/qemu/microblazeel-mmu/linux-3.18.config deleted file mode 100644 index 53ef20391..000000000 --- a/buildroot/board/qemu/microblazeel-mmu/linux-3.18.config +++ /dev/null @@ -1,57 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="rootfs.cpio" -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_BASE_FULL is not set -# CONFIG_FUTEX is not set -# CONFIG_EPOLL is not set -# CONFIG_SIGNALFD is not set -# CONFIG_SHMEM is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" -CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 -CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 -CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 -CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 -CONFIG_HZ_100=y -CONFIG_MMU=y -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE_FORCE=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_XILINX_EMACLITE=y -# CONFIG_INPUT is not set -# CONFIG_SERIO is not set -# CONFIG_VT is not set -CONFIG_SERIAL_UARTLITE=y -CONFIG_SERIAL_UARTLITE_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_DNOTIFY is not set -CONFIG_NFS_FS=y -CONFIG_CIFS=y -CONFIG_CIFS_STATS=y -CONFIG_CIFS_STATS2=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_SLAB=y -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_EARLY_PRINTK=y -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC16=y diff --git a/buildroot/board/qemu/microblazeel-mmu/linux.config b/buildroot/board/qemu/microblazeel-mmu/linux.config new file mode 100644 index 000000000..a6228280b --- /dev/null +++ b/buildroot/board/qemu/microblazeel-mmu/linux.config @@ -0,0 +1,19 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_XILINX_MICROBLAZE0_FAMILY="spartan3adsp" +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 +CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 +CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 +CONFIG_MMU=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_NETDEVICES=y +CONFIG_XILINX_EMACLITE=y +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +# CONFIG_VGA_CONSOLE is not set +CONFIG_TMPFS=y diff --git a/buildroot/board/qemu/microblazeel-mmu/readme.txt b/buildroot/board/qemu/microblazeel-mmu/readme.txt index 3a5d55a3c..20fa0072e 100644 --- a/buildroot/board/qemu/microblazeel-mmu/readme.txt +++ b/buildroot/board/qemu/microblazeel-mmu/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio + qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio # qemu_microblazeel_mmu_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/microblazeel-mmu/xilinx-xemaclite.patch b/buildroot/board/qemu/microblazeel-mmu/xilinx-xemaclite.patch deleted file mode 100644 index 756bfaea9..000000000 --- a/buildroot/board/qemu/microblazeel-mmu/xilinx-xemaclite.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur linux-3.14.orig/drivers/net/ethernet/xilinx/xilinx_emaclite.c linux-3.14/drivers/net/ethernet/xilinx/xilinx_emaclite.c ---- linux-3.14.orig/drivers/net/ethernet/xilinx/xilinx_emaclite.c 2014-03-31 05:40:15.000000000 +0200 -+++ linux-3.14/drivers/net/ethernet/xilinx/xilinx_emaclite.c 2014-04-11 22:53:42.000000000 +0200 -@@ -1249,6 +1249,7 @@ - { .compatible = "xlnx,opb-ethernetlite-1.01.b", }, - { .compatible = "xlnx,xps-ethernetlite-1.00.a", }, - { .compatible = "xlnx,xps-ethernetlite-2.00.a", }, -+ { .compatible = "xlnx,xps-ethernetlite-2.00.b", }, - { .compatible = "xlnx,xps-ethernetlite-2.01.a", }, - { .compatible = "xlnx,xps-ethernetlite-3.00.a", }, - { /* end of list */ }, diff --git a/buildroot/board/qemu/mips-malta/linux-3.18.config b/buildroot/board/qemu/mips-malta/linux-3.18.config deleted file mode 100644 index 4716bb6a9..000000000 --- a/buildroot/board/qemu/mips-malta/linux-3.18.config +++ /dev/null @@ -1,60 +0,0 @@ -CONFIG_MIPS_MALTA=y -CONFIG_CPU_MIPS32_R2=y -CONFIG_MIPS_MT_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HZ_100=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_NAMESPACES=y -CONFIG_RELAY=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_PCNET32=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_I8042 is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CIRRUS=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT4_FS=y -CONFIG_QUOTA=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y diff --git a/buildroot/board/qemu/mips-malta/readme.txt b/buildroot/board/qemu/mips-malta/readme.txt deleted file mode 100644 index 7dac3cbec..000000000 --- a/buildroot/board/qemu/mips-malta/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -Run the emulation with: - - qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" -net nic,model=pcnet -net user - -The login prompt will appear in the terminal that started Qemu. The -graphical window is the framebuffer. No keyboard support has been -enabled. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/mips32r2-malta/linux.config b/buildroot/board/qemu/mips32r2-malta/linux.config new file mode 100644 index 000000000..3a26ac830 --- /dev/null +++ b/buildroot/board/qemu/mips32r2-malta/linux.config @@ -0,0 +1,30 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS32_R2=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips32r2-malta/readme.txt b/buildroot/board/qemu/mips32r2-malta/readme.txt new file mode 100644 index 000000000..db1db65b1 --- /dev/null +++ b/buildroot/board/qemu/mips32r2-malta/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user # qemu_mips32r2_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. diff --git a/buildroot/board/qemu/mips32r2el-malta/linux.config b/buildroot/board/qemu/mips32r2el-malta/linux.config new file mode 100644 index 000000000..79d735247 --- /dev/null +++ b/buildroot/board/qemu/mips32r2el-malta/linux.config @@ -0,0 +1,31 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MIPS32_R2=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips32r2el-malta/readme.txt b/buildroot/board/qemu/mips32r2el-malta/readme.txt new file mode 100644 index 000000000..4dc0e64e0 --- /dev/null +++ b/buildroot/board/qemu/mips32r2el-malta/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-mipsel -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user # qemu_mips32r2el_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. diff --git a/buildroot/board/qemu/mips32r6-malta/linux.config b/buildroot/board/qemu/mips32r6-malta/linux.config new file mode 100644 index 000000000..d55967661 --- /dev/null +++ b/buildroot/board/qemu/mips32r6-malta/linux.config @@ -0,0 +1,30 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS32_R6=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips32r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch b/buildroot/board/qemu/mips32r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch new file mode 100644 index 000000000..801efb5d0 --- /dev/null +++ b/buildroot/board/qemu/mips32r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch @@ -0,0 +1,149 @@ +From bb04c220d82598066eeadf49defaec1157d4d206 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Jul 2020 11:46:01 +0200 +Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From [1] +"GCC 10 (PR 91233) won't silently allow registers that are not architecturally +available to be present in the clobber list anymore, resulting in build failure +for mips*r6 targets in form of: +... +.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target + 146 | __asm__ volatile ( \ + | ^~~~~~~ + +This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. +This patch provides the alternative clobber list for r6 targets that won't include +those registers." + +Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build +for mips r6 cpus with gcc 10 for the same reason as glibc. + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 +[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d + +Signed-off-by: Romain Naour +--- + arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h +index 0ae9b4cbc153..ea600e0ebfe7 100644 +--- a/arch/mips/include/asm/vdso/gettimeofday.h ++++ b/arch/mips/include/asm/vdso/gettimeofday.h +@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback( + register long nr asm("v0") = __NR_gettimeofday; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (tv), "r" (tz), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (tv), "r" (tz), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback( + register long nr asm("v0") = __NR_clock_gettime; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback( + register long nr asm("v0") = __NR_clock_getres; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +-- +2.25.4 + diff --git a/buildroot/board/qemu/mips32r6-malta/readme.txt b/buildroot/board/qemu/mips32r6-malta/readme.txt new file mode 100644 index 000000000..9ad4959f0 --- /dev/null +++ b/buildroot/board/qemu/mips32r6-malta/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-mips -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic # qemu_mips32r6_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/mips32r6el-malta/linux.config b/buildroot/board/qemu/mips32r6el-malta/linux.config new file mode 100644 index 000000000..d55967661 --- /dev/null +++ b/buildroot/board/qemu/mips32r6el-malta/linux.config @@ -0,0 +1,30 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS32_R6=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips32r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch b/buildroot/board/qemu/mips32r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch new file mode 100644 index 000000000..801efb5d0 --- /dev/null +++ b/buildroot/board/qemu/mips32r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch @@ -0,0 +1,149 @@ +From bb04c220d82598066eeadf49defaec1157d4d206 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Jul 2020 11:46:01 +0200 +Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From [1] +"GCC 10 (PR 91233) won't silently allow registers that are not architecturally +available to be present in the clobber list anymore, resulting in build failure +for mips*r6 targets in form of: +... +.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target + 146 | __asm__ volatile ( \ + | ^~~~~~~ + +This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. +This patch provides the alternative clobber list for r6 targets that won't include +those registers." + +Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build +for mips r6 cpus with gcc 10 for the same reason as glibc. + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 +[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d + +Signed-off-by: Romain Naour +--- + arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h +index 0ae9b4cbc153..ea600e0ebfe7 100644 +--- a/arch/mips/include/asm/vdso/gettimeofday.h ++++ b/arch/mips/include/asm/vdso/gettimeofday.h +@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback( + register long nr asm("v0") = __NR_gettimeofday; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (tv), "r" (tz), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (tv), "r" (tz), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback( + register long nr asm("v0") = __NR_clock_gettime; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback( + register long nr asm("v0") = __NR_clock_getres; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +-- +2.25.4 + diff --git a/buildroot/board/qemu/mips32r6el-malta/readme.txt b/buildroot/board/qemu/mips32r6el-malta/readme.txt new file mode 100644 index 000000000..96c9dc88b --- /dev/null +++ b/buildroot/board/qemu/mips32r6el-malta/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-mipsel -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user -nographic # qemu_mips32r6el_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/mips64-malta/linux-3.18.config b/buildroot/board/qemu/mips64-malta/linux-3.18.config deleted file mode 100644 index f850f0927..000000000 --- a/buildroot/board/qemu/mips64-malta/linux-3.18.config +++ /dev/null @@ -1,60 +0,0 @@ -CONFIG_MIPS_MALTA=y -CONFIG_CPU_MIPS64_R1=y -CONFIG_64BIT=y -CONFIG_MIPS_MT_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HZ_100=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_NAMESPACES=y -CONFIG_RELAY=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_MIPS32_COMPAT=y -CONFIG_MIPS32_O32=y -CONFIG_MIPS32_N32=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_PCNET32=y -# CONFIG_WLAN is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CIRRUS=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT4_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y diff --git a/buildroot/board/qemu/mips64-malta/linux.config b/buildroot/board/qemu/mips64-malta/linux.config new file mode 100644 index 000000000..cd0b56063 --- /dev/null +++ b/buildroot/board/qemu/mips64-malta/linux.config @@ -0,0 +1,34 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS64_R1=y +CONFIG_64BIT=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_MIPS32_COMPAT=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS32_N32=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips64-malta/readme.txt b/buildroot/board/qemu/mips64-malta/readme.txt index 11fba3415..7432dac1a 100644 --- a/buildroot/board/qemu/mips64-malta/readme.txt +++ b/buildroot/board/qemu/mips64-malta/readme.txt @@ -1,8 +1,6 @@ Run the emulation with: - qemu-system-mips64 -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" + qemu-system-mips64 -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" # qemu_mips64_malta_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/mips64el-malta/linux-3.18.config b/buildroot/board/qemu/mips64el-malta/linux-3.18.config deleted file mode 100644 index 6fe3594dc..000000000 --- a/buildroot/board/qemu/mips64el-malta/linux-3.18.config +++ /dev/null @@ -1,61 +0,0 @@ -CONFIG_MIPS_MALTA=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_MIPS64_R1=y -CONFIG_64BIT=y -CONFIG_MIPS_MT_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HZ_100=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_NAMESPACES=y -CONFIG_RELAY=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_MIPS32_COMPAT=y -CONFIG_MIPS32_O32=y -CONFIG_MIPS32_N32=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_PCNET32=y -# CONFIG_WLAN is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CIRRUS=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT4_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y diff --git a/buildroot/board/qemu/mips64el-malta/linux.config b/buildroot/board/qemu/mips64el-malta/linux.config new file mode 100644 index 000000000..c6b46d4d7 --- /dev/null +++ b/buildroot/board/qemu/mips64el-malta/linux.config @@ -0,0 +1,35 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MIPS64_R1=y +CONFIG_64BIT=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_MIPS32_COMPAT=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS32_N32=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips64el-malta/readme.txt b/buildroot/board/qemu/mips64el-malta/readme.txt index 8ad80c49a..f67ac91ac 100644 --- a/buildroot/board/qemu/mips64el-malta/readme.txt +++ b/buildroot/board/qemu/mips64el-malta/readme.txt @@ -1,8 +1,6 @@ Run the emulation with: - qemu-system-mips64el -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" + qemu-system-mips64el -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" # qemu_mips64el_malta_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/mips64r6-malta/linux.config b/buildroot/board/qemu/mips64r6-malta/linux.config new file mode 100644 index 000000000..0ebfdbdb0 --- /dev/null +++ b/buildroot/board/qemu/mips64r6-malta/linux.config @@ -0,0 +1,34 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS64_R6=y +CONFIG_64BIT=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_MIPS32_COMPAT=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS32_N32=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips64r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch b/buildroot/board/qemu/mips64r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch new file mode 100644 index 000000000..ad2647e62 --- /dev/null +++ b/buildroot/board/qemu/mips64r6-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch @@ -0,0 +1,149 @@ +From cfb381d8f4b64f3752c95b4bdd787be63ef84fb2 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Jul 2020 11:46:01 +0200 +Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From [1] +"GCC 10 (PR 91233) won't silently allow registers that are not architecturally +available to be present in the clobber list anymore, resulting in build failure +for mips*r6 targets in form of: +... +.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target + 146 | __asm__ volatile ( \ + | ^~~~~~~ + +This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. +This patch provides the alternative clobber list for r6 targets that won't include +those registers." + +Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build +for mips r6 cpus with gcc 10 for the same reason as glibc. + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 +[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d + +Signed-off-by: Romain Naour +--- + arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h +index 0ae9b4cbc153..ea600e0ebfe7 100644 +--- a/arch/mips/include/asm/vdso/gettimeofday.h ++++ b/arch/mips/include/asm/vdso/gettimeofday.h +@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback( + register long nr asm("v0") = __NR_gettimeofday; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (tv), "r" (tz), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (tv), "r" (tz), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback( + register long nr asm("v0") = __NR_clock_gettime; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback( + register long nr asm("v0") = __NR_clock_getres; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +-- +2.25.4 + diff --git a/buildroot/board/qemu/mips64r6-malta/readme.txt b/buildroot/board/qemu/mips64r6-malta/readme.txt new file mode 100644 index 000000000..252a54319 --- /dev/null +++ b/buildroot/board/qemu/mips64r6-malta/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-mips64 -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic # qemu_mips64r6_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/mips64r6el-malta/linux.config b/buildroot/board/qemu/mips64r6el-malta/linux.config new file mode 100644 index 000000000..0ebfdbdb0 --- /dev/null +++ b/buildroot/board/qemu/mips64r6el-malta/linux.config @@ -0,0 +1,34 @@ +CONFIG_MIPS_MALTA=y +CONFIG_CPU_MIPS64_R6=y +CONFIG_64BIT=y +CONFIG_MIPS_MT_SMP=y +CONFIG_NR_CPUS=2 +CONFIG_SYSVIPC=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_MIPS32_COMPAT=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS32_N32=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_GENERIC=y +CONFIG_BLK_DEV_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_FB=y +CONFIG_FB_CIRRUS=y +CONFIG_USB=y +CONFIG_USB_UHCI_HCD=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/mips64r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch b/buildroot/board/qemu/mips64r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch new file mode 100644 index 000000000..ad2647e62 --- /dev/null +++ b/buildroot/board/qemu/mips64r6el-malta/patches/linux/0001-mips-Do-not-include-hi-and-lo-in-clobber-list-for-R6.patch @@ -0,0 +1,149 @@ +From cfb381d8f4b64f3752c95b4bdd787be63ef84fb2 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 25 Jul 2020 11:46:01 +0200 +Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From [1] +"GCC 10 (PR 91233) won't silently allow registers that are not architecturally +available to be present in the clobber list anymore, resulting in build failure +for mips*r6 targets in form of: +... +.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target + 146 | __asm__ volatile ( \ + | ^~~~~~~ + +This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. +This patch provides the alternative clobber list for r6 targets that won't include +those registers." + +Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build +for mips r6 cpus with gcc 10 for the same reason as glibc. + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 +[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d + +Signed-off-by: Romain Naour +--- + arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++ + 1 file changed, 45 insertions(+) + +diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h +index 0ae9b4cbc153..ea600e0ebfe7 100644 +--- a/arch/mips/include/asm/vdso/gettimeofday.h ++++ b/arch/mips/include/asm/vdso/gettimeofday.h +@@ -36,12 +36,21 @@ static __always_inline long gettimeofday_fallback( + register long nr asm("v0") = __NR_gettimeofday; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (tv), "r" (tz), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (tv), "r" (tz), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -60,12 +69,21 @@ static __always_inline long clock_gettime_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -84,12 +102,21 @@ static __always_inline int clock_getres_fallback( + #endif + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -108,12 +135,21 @@ static __always_inline long clock_gettime32_fallback( + register long nr asm("v0") = __NR_clock_gettime; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +@@ -128,12 +164,21 @@ static __always_inline int clock_getres32_fallback( + register long nr asm("v0") = __NR_clock_getres; + register long error asm("a3"); + ++#if MIPS_ISA_REV >= 6 ++ asm volatile( ++ " syscall\n" ++ : "=r" (ret), "=r" (error) ++ : "r" (clkid), "r" (ts), "r" (nr) ++ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", ++ "$14", "$15", "$24", "$25", "memory"); ++#else + asm volatile( + " syscall\n" + : "=r" (ret), "=r" (error) + : "r" (clkid), "r" (ts), "r" (nr) + : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", + "$14", "$15", "$24", "$25", "hi", "lo", "memory"); ++#endif + + return error ? -ret : ret; + } +-- +2.25.4 + diff --git a/buildroot/board/qemu/mips64r6el-malta/readme.txt b/buildroot/board/qemu/mips64r6el-malta/readme.txt new file mode 100644 index 000000000..e9d02e772 --- /dev/null +++ b/buildroot/board/qemu/mips64r6el-malta/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-mips64el -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic # qemu_mips64r6el_malta_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/mipsel-malta/linux-3.18.config b/buildroot/board/qemu/mipsel-malta/linux-3.18.config deleted file mode 100644 index 4ce1d9192..000000000 --- a/buildroot/board/qemu/mipsel-malta/linux-3.18.config +++ /dev/null @@ -1,61 +0,0 @@ -CONFIG_MIPS_MALTA=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_MIPS32_R2=y -CONFIG_MIPS_MT_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_HZ_100=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_NAMESPACES=y -CONFIG_RELAY=y -CONFIG_EMBEDDED=y -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_PCNET32=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_I8042 is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_CIRRUS=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT4_FS=y -CONFIG_QUOTA=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y diff --git a/buildroot/board/qemu/mipsel-malta/readme.txt b/buildroot/board/qemu/mipsel-malta/readme.txt deleted file mode 100644 index 27d31532a..000000000 --- a/buildroot/board/qemu/mipsel-malta/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -Run the emulation with: - - qemu-system-mipsel -M malta -kernel output/images/vmlinux -serial stdio -hda output/images/rootfs.ext2 -append "root=/dev/hda" -net nic,model=pcnet -net user - -The login prompt will appear in the terminal that started Qemu. The -graphical window is the framebuffer. No keyboard support has been -enabled. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/nios2-10m50/linux.fragment b/buildroot/board/qemu/nios2-10m50/linux.fragment new file mode 100644 index 000000000..c7647cee8 --- /dev/null +++ b/buildroot/board/qemu/nios2-10m50/linux.fragment @@ -0,0 +1,3 @@ +# Embed the DTB in the kernel image +CONFIG_NIOS2_DTB_SOURCE_BOOL=y +CONFIG_NIOS2_DTB_SOURCE="10m50_devboard.dts" diff --git a/buildroot/board/qemu/nios2-10m50/readme.txt b/buildroot/board/qemu/nios2-10m50/readme.txt new file mode 100644 index 000000000..f8f8f3b3a --- /dev/null +++ b/buildroot/board/qemu/nios2-10m50/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-nios2 -kernel output/images/vmlinux -nographic # qemu_nios2_10m50_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/or1k/linux.config b/buildroot/board/qemu/or1k/linux.config new file mode 100644 index 000000000..0a817b1e7 --- /dev/null +++ b/buildroot/board/qemu/or1k/linux.config @@ -0,0 +1,30 @@ +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio" +CONFIG_OPENRISC_BUILTIN_DTB="or1ksim" +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_TMPFS=y +CONFIG_NETDEVICES=y +CONFIG_ETHOC=y +# CONFIG_WLAN is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HWMON is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_USB_SUPPORT is not set diff --git a/buildroot/board/qemu/or1k/readme.txt b/buildroot/board/qemu/or1k/readme.txt new file mode 100644 index 000000000..2ea797440 --- /dev/null +++ b/buildroot/board/qemu/or1k/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-or1k -kernel output/images/vmlinux -nographic # qemu_or1k_defconfig + +The login prompt will appear in the terminal that started Qemu. + +Ethernet support is not working, yet. diff --git a/buildroot/board/qemu/post-image.sh b/buildroot/board/qemu/post-image.sh new file mode 100755 index 000000000..9a4d21627 --- /dev/null +++ b/buildroot/board/qemu/post-image.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +QEMU_BOARD_DIR="$(dirname $0)" +DEFCONFIG_NAME="$(basename $2)" +README_FILES="${QEMU_BOARD_DIR}/*/readme.txt" +START_QEMU_SCRIPT="${BINARIES_DIR}/start-qemu.sh" + +if [[ "${DEFCONFIG_NAME}" =~ ^"qemu_*" ]]; then + # Not a Qemu defconfig, can't test. + exit 0 +fi + +# Search for "# qemu_*_defconfig" tag in all readme.txt files. +# Qemu command line on multilines using back slash are accepted. +QEMU_CMD_LINE=$(sed -r ':a; /\\$/N; s/\\\n//; s/\t/ /; ta; /# '${DEFCONFIG_NAME}'$/!d; s/#.*//' ${README_FILES}) + +if [ -z "${QEMU_CMD_LINE}" ]; then + # No Qemu cmd line found, can't test. + exit 0 +fi + +# Replace output/images path by ${IMAGE_DIR} since the script +# will be in the same directory as the kernel and the rootfs images. +QEMU_CMD_LINE="${QEMU_CMD_LINE//output\/images/\${IMAGE_DIR\}}" + +# Remove -serial stdio if present, keep it as default args +DEFAULT_ARGS="$(sed -r -e '/-serial stdio/!d; s/.*(-serial stdio).*/\1/' <<<"${QEMU_CMD_LINE}")" +QEMU_CMD_LINE="${QEMU_CMD_LINE//-serial stdio/}" + +# Disable graphical output and redirect serial I/Os to console +case ${DEFCONFIG_NAME} in + (qemu_sh4eb_r2d_defconfig|qemu_sh4_r2d_defconfig) + # Special case for SH4 + SERIAL_ARGS="-serial stdio -display none" + ;; + (*) + SERIAL_ARGS="-nographic" + ;; +esac + +cat <<-_EOF_ > "${START_QEMU_SCRIPT}" + #!/bin/sh + IMAGE_DIR="\${0%/*}/" + + if [ "\${1}" = "serial-only" ]; then + EXTRA_ARGS='${SERIAL_ARGS}' + else + EXTRA_ARGS='${DEFAULT_ARGS}' + fi + + export PATH="${HOST_DIR}/bin:\${PATH}" + exec ${QEMU_CMD_LINE} \${EXTRA_ARGS} +_EOF_ + +chmod +x "${START_QEMU_SCRIPT}" diff --git a/buildroot/board/qemu/ppc-g3beige/linux-3.18.config b/buildroot/board/qemu/ppc-g3beige/linux-3.18.config deleted file mode 100644 index 26be1c59e..000000000 --- a/buildroot/board/qemu/ppc-g3beige/linux-3.18.config +++ /dev/null @@ -1,46 +0,0 @@ -CONFIG_ALTIVEC=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_PPC601_SYNC_FIX=y -CONFIG_HIGHMEM=y -CONFIG_PCCARD=y -CONFIG_YENTA=y -CONFIG_ADVANCED_OPTIONS=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_CONNECTOR=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_IDE_PMAC=y -CONFIG_ADB=y -CONFIG_ADB_CUDA=y -CONFIG_ADB_PMU=y -CONFIG_NETDEVICES=y -CONFIG_PCNET32=y -CONFIG_MACE=y -CONFIG_BMAC=y -CONFIG_NE2K_PCI=y -CONFIG_8139CP=y -CONFIG_8139TOO=y -CONFIG_HAPPYMEAL=y -CONFIG_SUNGEM=y -CONFIG_CASSINI=y -CONFIG_SERIAL_PMACZILOG=y -CONFIG_SERIAL_PMACZILOG_TTYS=y -CONFIG_SERIAL_PMACZILOG_CONSOLE=y -CONFIG_SSB=y -CONFIG_SSB_PCMCIAHOST=y -CONFIG_SSB_DRIVER_PCICORE=y -CONFIG_EXT4_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_SQUASHFS=y -CONFIG_LIBCRC32C=y -CONFIG_BOOTX_TEXT=y diff --git a/buildroot/board/qemu/ppc-g3beige/linux.config b/buildroot/board/qemu/ppc-g3beige/linux.config new file mode 100644 index 000000000..799455354 --- /dev/null +++ b/buildroot/board/qemu/ppc-g3beige/linux.config @@ -0,0 +1,25 @@ +CONFIG_ALTIVEC=y +CONFIG_SYSVIPC=y +CONFIG_HIGHMEM=y +CONFIG_YENTA=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IDE=y +CONFIG_BLK_DEV_IDECD=y +CONFIG_BLK_DEV_CMD64X=y +CONFIG_BLK_DEV_IDE_PMAC=y +CONFIG_ADB=y +CONFIG_ADB_CUDA=y +CONFIG_ADB_PMU=y +CONFIG_NETDEVICES=y +CONFIG_PCNET32=y +CONFIG_8139CP=y +CONFIG_SERIAL_PMACZILOG=y +CONFIG_SERIAL_PMACZILOG_TTYS=y +CONFIG_SERIAL_PMACZILOG_CONSOLE=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_BOOTX_TEXT=y diff --git a/buildroot/board/qemu/ppc-g3beige/readme.txt b/buildroot/board/qemu/ppc-g3beige/readme.txt index 65cb261d9..e6c9c2016 100644 --- a/buildroot/board/qemu/ppc-g3beige/readme.txt +++ b/buildroot/board/qemu/ppc-g3beige/readme.txt @@ -1,8 +1,6 @@ Run the emulation with: - qemu-system-ppc -M g3beige -kernel output/images/vmlinux -hda output/images/rootfs.ext2 -append "console=ttyS0 root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user + qemu-system-ppc -M g3beige -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "console=ttyS0 rootwait root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user # qemu_ppc_g3beige_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/ppc-mac99/linux.fragment b/buildroot/board/qemu/ppc-mac99/linux.fragment new file mode 100644 index 000000000..b1975f825 --- /dev/null +++ b/buildroot/board/qemu/ppc-mac99/linux.fragment @@ -0,0 +1,3 @@ +CONFIG_SERIAL_PMACZILOG=y +CONFIG_SERIAL_PMACZILOG_TTYS=y +CONFIG_SERIAL_PMACZILOG_CONSOLE=y diff --git a/buildroot/board/qemu/ppc-mac99/readme.txt b/buildroot/board/qemu/ppc-mac99/readme.txt new file mode 100644 index 000000000..fb94a7837 --- /dev/null +++ b/buildroot/board/qemu/ppc-mac99/readme.txt @@ -0,0 +1,3 @@ +Run the emulation with: + + qemu-system-ppc -nographic -vga none -M mac99 -cpu g4 -m 1G -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -net nic,model=sungem -net user -append "root=/dev/sda" # qemu_ppc_mac99_defconfig diff --git a/buildroot/board/qemu/ppc-mpc8544ds/linux.config b/buildroot/board/qemu/ppc-mpc8544ds/linux.config new file mode 100644 index 000000000..b36847c93 --- /dev/null +++ b/buildroot/board/qemu/ppc-mpc8544ds/linux.config @@ -0,0 +1,38 @@ +CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio" +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MPC8540_ADS=y +CONFIG_MPC85xx_DS=y +CONFIG_HIGHMEM=y +CONFIG_MATH_EMULATION=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_NETDEVICES=y +CONFIG_E1000=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=6 +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_FSL=y +CONFIG_USB_OHCI_HCD=y +CONFIG_TMPFS=y diff --git a/buildroot/board/qemu/ppc-mpc8544ds/readme.txt b/buildroot/board/qemu/ppc-mpc8544ds/readme.txt index 8a3374f0f..d34d64c33 100644 --- a/buildroot/board/qemu/ppc-mpc8544ds/readme.txt +++ b/buildroot/board/qemu/ppc-mpc8544ds/readme.txt @@ -1,8 +1,5 @@ Run the emulation with: - qemu-system-ppc -M mpc8544ds -kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net user + qemu-system-ppc -M mpc8544ds -kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net user # qemu_ppc_mpc8544ds_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.0.2 -QEMU 2.1.x and 2.2.x are known broken. diff --git a/buildroot/board/qemu/ppc-virtex-ml507/linux.config b/buildroot/board/qemu/ppc-virtex-ml507/linux.config new file mode 100644 index 000000000..ed4eb792b --- /dev/null +++ b/buildroot/board/qemu/ppc-virtex-ml507/linux.config @@ -0,0 +1,36 @@ +CONFIG_44x=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_EBONY is not set +CONFIG_XILINX_VIRTEX440_GENERIC_BOARD=y +CONFIG_MATH_EMULATION=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_XILINX_SYSACE=y +CONFIG_NETDEVICES=y +CONFIG_SERIO_XILINX_XPS_PS2=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_UARTLITE=y +CONFIG_SERIAL_UARTLITE_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_XILINX_HWICAP=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_XILINX=y +CONFIG_FB=y +CONFIG_FB_XILINX=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_EXT4_FS=y +CONFIG_AUTOFS4_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y diff --git a/buildroot/board/qemu/ppc-virtex-ml507/readme.txt b/buildroot/board/qemu/ppc-virtex-ml507/readme.txt index f8bf15026..feb4b2d7d 100644 --- a/buildroot/board/qemu/ppc-virtex-ml507/readme.txt +++ b/buildroot/board/qemu/ppc-virtex-ml507/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-ppc -M virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append "console=ttyS0" -dtb output/images/virtex440-ml507.dtb + qemu-system-ppc -M virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append "console=ttyS0" -dtb output/images/virtex440-ml507.dtb # qemu_ppc_virtex_ml507_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/ppc64-e5500/linux.fragment b/buildroot/board/qemu/ppc64-e5500/linux.fragment new file mode 100644 index 000000000..071a55ccf --- /dev/null +++ b/buildroot/board/qemu/ppc64-e5500/linux.fragment @@ -0,0 +1,10 @@ +# Enables generic PPC e500 base arch support for QEMU. +# The e5500 is a variant of the e500 arch. +CONFIG_PPC_QEMU_E500=y + +# Enable virtio (blk, rng and net devices) +CONFIG_VIRTIO=y +CONFIG_VIRTIO_PCI=y +CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_VIRTIO_BLK=y +CONFIG_VIRTIO_NET=y diff --git a/buildroot/board/qemu/ppc64-e5500/readme.txt b/buildroot/board/qemu/ppc64-e5500/readme.txt new file mode 100644 index 000000000..61d51f7f4 --- /dev/null +++ b/buildroot/board/qemu/ppc64-e5500/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "console=ttyS0 rootwait root=/dev/vda" -serial mon:stdio -nographic # qemu_ppc64_e5500_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/ppc64-pseries/readme.txt b/buildroot/board/qemu/ppc64-pseries/readme.txt index 6d5157e7b..cbd3c6ca2 100644 --- a/buildroot/board/qemu/ppc64-pseries/readme.txt +++ b/buildroot/board/qemu/ppc64-pseries/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-ppc64 -M pseries -cpu POWER7 -m 256 -kernel output/images/vmlinux -append 'console=hvc0 root=/dev/sda' -drive file=output/images/rootfs.ext2,if=scsi,index=0 -serial stdio -display curses + qemu-system-ppc64 -M pseries -cpu POWER7 -m 256 -kernel output/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses # qemu_ppc64_pseries_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/ppc64le-pseries/readme.txt b/buildroot/board/qemu/ppc64le-pseries/readme.txt new file mode 100644 index 000000000..8ee72ea6c --- /dev/null +++ b/buildroot/board/qemu/ppc64le-pseries/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + +qemu-system-ppc64 -M pseries -cpu POWER8 -m 256 -kernel output/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses # qemu_ppc64le_pseries_defconfig + +The login prompt will appear in the terminal window. diff --git a/buildroot/board/qemu/riscv32-virt/patches/linux/0001-Revert-riscv-Use-latest-system-call-ABI.patch b/buildroot/board/qemu/riscv32-virt/patches/linux/0001-Revert-riscv-Use-latest-system-call-ABI.patch new file mode 100644 index 000000000..e0dfaa150 --- /dev/null +++ b/buildroot/board/qemu/riscv32-virt/patches/linux/0001-Revert-riscv-Use-latest-system-call-ABI.patch @@ -0,0 +1,66 @@ +From 15f62343916fcb3cae82e618da28eaa82bc8c007 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Tue, 16 Apr 2019 09:03:41 -0700 +Subject: [PATCH] Revert "riscv: Use latest system call ABI" + +This reverts commit d4c08b9776b392e20efc6198ebe1bc8ec1911d9b. + +The latest RISC-V 32bit glibc submission doesn't work with this patch, +so let's revert it. This revert can be reverted when the glibc +submission is updated to work on the 5.1 kernel. + +Signed-off-by: Alistair Francis +--- + arch/riscv/Kconfig | 1 + + arch/riscv/include/uapi/asm/unistd.h | 5 ++++- + arch/riscv/kernel/vdso/Makefile | 2 -- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig +index eb56c82d8aa1..43dd2680c696 100644 +--- a/arch/riscv/Kconfig ++++ b/arch/riscv/Kconfig +@@ -11,6 +11,7 @@ config 32BIT + + config RISCV + def_bool y ++ select ARCH_32BIT_OFF_T if !64BIT + # even on 32-bit, physical (and DMA) addresses are > 32-bits + select PHYS_ADDR_T_64BIT + select OF +diff --git a/arch/riscv/include/uapi/asm/unistd.h b/arch/riscv/include/uapi/asm/unistd.h +index 0e2eeeb1fd27..486a288b454c 100644 +--- a/arch/riscv/include/uapi/asm/unistd.h ++++ b/arch/riscv/include/uapi/asm/unistd.h +@@ -17,8 +17,11 @@ + + #ifdef __LP64__ + #define __ARCH_WANT_NEW_STAT +-#define __ARCH_WANT_SET_GET_RLIMIT + #endif /* __LP64__ */ ++#define __ARCH_WANT_SET_GET_RLIMIT ++#ifndef __LP64__ ++#define __ARCH_WANT_TIME32_SYSCALLS ++#endif + + #include + +diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile +index fec62b24df89..eed1c137f618 100644 +--- a/arch/riscv/kernel/vdso/Makefile ++++ b/arch/riscv/kernel/vdso/Makefile +@@ -2,11 +2,9 @@ + + # Symbols present in the vdso + vdso-syms = rt_sigreturn +-ifdef CONFIG_64BIT + vdso-syms += gettimeofday + vdso-syms += clock_gettime + vdso-syms += clock_getres +-endif + vdso-syms += getcpu + vdso-syms += flush_icache + +-- +2.21.0 + diff --git a/buildroot/board/qemu/riscv32-virt/readme.txt b/buildroot/board/qemu/riscv32-virt/readme.txt new file mode 100644 index 000000000..6a848270b --- /dev/null +++ b/buildroot/board/qemu/riscv32-virt/readme.txt @@ -0,0 +1,5 @@ +Run Linux in emulation with: + + qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80400000 -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv32_virt_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/riscv64-virt/readme.txt b/buildroot/board/qemu/riscv64-virt/readme.txt new file mode 100644 index 000000000..81b5246e6 --- /dev/null +++ b/buildroot/board/qemu/riscv64-virt/readme.txt @@ -0,0 +1,5 @@ +Run Linux in emulation with: + + qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80200000 -append "rootwait root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic # qemu_riscv64_virt_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/sh4-r2d/linux-3.18.config b/buildroot/board/qemu/sh4-r2d/linux-3.18.config deleted file mode 100644 index 5a98a6929..000000000 --- a/buildroot/board/qemu/sh4-r2d/linux-3.18.config +++ /dev/null @@ -1,71 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_CPU_SUBTYPE_SH7751R=y -CONFIG_MEMORY_START=0x0c000000 -CONFIG_FLATMEM_MANUAL=y -CONFIG_SH_RTS7751R2D=y -CONFIG_RTS7751R2D_PLUS=y -CONFIG_HEARTBEAT=y -CONFIG_PCI=y -CONFIG_HOTPLUG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_PATA_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_8139CP=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SPI=y -CONFIG_SPI_SH_SCI=y -CONFIG_MFD_SM501=y -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=m -CONFIG_FB_SH_MOBILE_HDMI=m -CONFIG_FB_SM501=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND_YMFPCI=m -CONFIG_SOUND_PRIME=m -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_R9701=y -CONFIG_EXT4_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_MINIX_FS=y -CONFIG_NLS_CODEPAGE_932=y -CONFIG_DEBUG_FS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_T10DIF=y diff --git a/buildroot/board/qemu/sh4-r2d/linux.config b/buildroot/board/qemu/sh4-r2d/linux.config new file mode 100644 index 000000000..a3d654454 --- /dev/null +++ b/buildroot/board/qemu/sh4-r2d/linux.config @@ -0,0 +1,38 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_CPU_SUBTYPE_SH7751R=y +CONFIG_MEMORY_START=0x0c000000 +CONFIG_FLATMEM_MANUAL=y +CONFIG_SH_RTS7751R2D=y +CONFIG_RTS7751R2D_PLUS=y +CONFIG_HEARTBEAT=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_PATA_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_8139CP=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_SPI=y +CONFIG_SPI_SH_SCI=y +CONFIG_MFD_SM501=y +CONFIG_FB=y +CONFIG_FB_SH_MOBILE_LCDC=y +CONFIG_FB_SH_MOBILE_HDMI=y +CONFIG_FB_SM501=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND_YMFPCI=y +CONFIG_SOUND_PRIME=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_R9701=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/sh4-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch b/buildroot/board/qemu/sh4-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch new file mode 100644 index 000000000..7543767a5 --- /dev/null +++ b/buildroot/board/qemu/sh4-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch @@ -0,0 +1,32 @@ +From fe657afd48fc67841d32207ef9eeeb5f099764cd Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 21 Dec 2019 11:52:04 +0100 +Subject: [PATCH] arch/sh: vmlinux.scr + +Building the kernel using a toolchain built with Binutils 2.33.1 prevent +booting a sh4 system under Qemu. +Apply the patch provided by Alan Modra [2] that fix alignment of rodata. + +[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e +[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html + +Signed-off-by: Romain Naour +--- + arch/sh/boot/compressed/vmlinux.scr | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr +index 862d74808236..dd292b4b9082 100644 +--- a/arch/sh/boot/compressed/vmlinux.scr ++++ b/arch/sh/boot/compressed/vmlinux.scr +@@ -1,6 +1,6 @@ + SECTIONS + { +- .rodata..compressed : { ++ .rodata..compressed : ALIGN(8) { + input_len = .; + LONG(input_data_end - input_data) input_data = .; + *(.data) +-- +2.24.1 + diff --git a/buildroot/board/qemu/sh4-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch b/buildroot/board/qemu/sh4-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch new file mode 100644 index 000000000..1faffea63 --- /dev/null +++ b/buildroot/board/qemu/sh4-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch @@ -0,0 +1,32 @@ +From 7f92adbba385a4e512abfd6633ac0f9f0cdf91f8 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 21 Dec 2019 11:54:07 +0100 +Subject: [PATCH] include/asm-generic: vmlinux.lds.h + +Building the kernel using a toolchain built with Binutils 2.33.1 prevent +booting a sh4 system under Qemu. +Apply the patch provided by Alan Modra [2] that fix alignment of rodata. + +[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e +[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html + +Signed-off-by: Romain Naour +--- + include/asm-generic/vmlinux.lds.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h +index d7701d466b60..1aa33597e91e 100644 +--- a/include/asm-generic/vmlinux.lds.h ++++ b/include/asm-generic/vmlinux.lds.h +@@ -306,6 +306,7 @@ + */ + #ifndef RO_AFTER_INIT_DATA + #define RO_AFTER_INIT_DATA \ ++ . = ALIGN(8); \ + __start_ro_after_init = .; \ + *(.data..ro_after_init) \ + __end_ro_after_init = .; +-- +2.24.1 + diff --git a/buildroot/board/qemu/sh4-r2d/readme.txt b/buildroot/board/qemu/sh4-r2d/readme.txt index c256f0b8c..b0799e47a 100644 --- a/buildroot/board/qemu/sh4-r2d/readme.txt +++ b/buildroot/board/qemu/sh4-r2d/readme.txt @@ -1,8 +1,6 @@ Run the emulation with: - qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide -append "root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user + qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user # qemu_sh4_r2d_defconfig The login prompt will appear in the terminal that started Qemu. The graphical window is the framebuffer. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/sh4eb-r2d/linux.config b/buildroot/board/qemu/sh4eb-r2d/linux.config new file mode 100644 index 000000000..6ead626c4 --- /dev/null +++ b/buildroot/board/qemu/sh4eb-r2d/linux.config @@ -0,0 +1,38 @@ +CONFIG_SYSVIPC=y +CONFIG_MODULES=y +CONFIG_CPU_SUBTYPE_SH7751R=y +CONFIG_MEMORY_START=0x0c000000 +CONFIG_FLATMEM_MANUAL=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_SH_RTS7751R2D=y +CONFIG_RTS7751R2D_PLUS=y +CONFIG_HEARTBEAT=y +CONFIG_PCI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_PATA_PLATFORM=y +CONFIG_NETDEVICES=y +CONFIG_8139CP=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_SPI=y +CONFIG_SPI_SH_SCI=y +CONFIG_MFD_SM501=y +CONFIG_FB=y +CONFIG_FB_SH_MOBILE_LCDC=y +CONFIG_FB_SH_MOBILE_HDMI=y +CONFIG_FB_SM501=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SND_YMFPCI=y +CONFIG_SOUND_PRIME=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_R9701=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/sh4eb-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch b/buildroot/board/qemu/sh4eb-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch new file mode 100644 index 000000000..7543767a5 --- /dev/null +++ b/buildroot/board/qemu/sh4eb-r2d/patches/linux/0001-arch-sh-vmlinux.scr.patch @@ -0,0 +1,32 @@ +From fe657afd48fc67841d32207ef9eeeb5f099764cd Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 21 Dec 2019 11:52:04 +0100 +Subject: [PATCH] arch/sh: vmlinux.scr + +Building the kernel using a toolchain built with Binutils 2.33.1 prevent +booting a sh4 system under Qemu. +Apply the patch provided by Alan Modra [2] that fix alignment of rodata. + +[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e +[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html + +Signed-off-by: Romain Naour +--- + arch/sh/boot/compressed/vmlinux.scr | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr +index 862d74808236..dd292b4b9082 100644 +--- a/arch/sh/boot/compressed/vmlinux.scr ++++ b/arch/sh/boot/compressed/vmlinux.scr +@@ -1,6 +1,6 @@ + SECTIONS + { +- .rodata..compressed : { ++ .rodata..compressed : ALIGN(8) { + input_len = .; + LONG(input_data_end - input_data) input_data = .; + *(.data) +-- +2.24.1 + diff --git a/buildroot/board/qemu/sh4eb-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch b/buildroot/board/qemu/sh4eb-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch new file mode 100644 index 000000000..445b71f40 --- /dev/null +++ b/buildroot/board/qemu/sh4eb-r2d/patches/linux/0002-include-asm-generic-vmlinux.lds.h.patch @@ -0,0 +1,27 @@ +From 7f92adbba385a4e512abfd6633ac0f9f0cdf91f8 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 21 Dec 2019 11:54:07 +0100 +Subject: [PATCH] include/asm-generic: vmlinux.lds.h + +https://www.sourceware.org/ml/binutils/2019-12/msg00112.html + +Signed-off-by: Romain Naour +--- + include/asm-generic/vmlinux.lds.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h +index d7701d466b60..1aa33597e91e 100644 +--- a/include/asm-generic/vmlinux.lds.h ++++ b/include/asm-generic/vmlinux.lds.h +@@ -306,6 +306,7 @@ + */ + #ifndef RO_AFTER_INIT_DATA + #define RO_AFTER_INIT_DATA \ ++ . = ALIGN(8); \ + __start_ro_after_init = .; \ + *(.data..ro_after_init) \ + __end_ro_after_init = .; +-- +2.24.1 + diff --git a/buildroot/board/qemu/sh4eb-r2d/readme.txt b/buildroot/board/qemu/sh4eb-r2d/readme.txt new file mode 100644 index 000000000..9f3dd8b20 --- /dev/null +++ b/buildroot/board/qemu/sh4eb-r2d/readme.txt @@ -0,0 +1,6 @@ +Run the emulation with: + + qemu-system-sh4eb -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user # qemu_sh4eb_r2d_defconfig + +The login prompt will appear in the terminal that started Qemu. +The graphical window is the framebuffer. diff --git a/buildroot/board/qemu/sparc-ss10/linux-3.18.config b/buildroot/board/qemu/sparc-ss10/linux-3.18.config deleted file mode 100644 index 0e7e500ab..000000000 --- a/buildroot/board/qemu/sparc-ss10/linux-3.18.config +++ /dev/null @@ -1,95 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_SUN_OPENPROMFS=m -CONFIG_BINFMT_MISC=m -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -# CONFIG_INET_LRO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NET_PKTGEN=m -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_SCSI_QLOGICPTI=m -CONFIG_SCSI_SUNESP=y -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_SUNLANCE=y -CONFIG_HAPPYMEAL=m -CONFIG_SUNBMAC=m -CONFIG_SUNQE=m -# CONFIG_WLAN is not set -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_ATKBD=m -CONFIG_KEYBOARD_SUNKBD=m -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_SERIO=m -CONFIG_SERIAL_SUNZILOG=y -CONFIG_SERIAL_SUNZILOG_CONSOLE=y -CONFIG_SERIAL_SUNSU=y -CONFIG_SERIAL_SUNSU_CONSOLE=y -CONFIG_SPI=y -CONFIG_SPI_XILINX=m -CONFIG_SUN_OPENPROMIO=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_AUTOFS4_FS=m -CONFIG_ISO9660_FS=m -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_ROMFS_FS=m -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_DETECT_HUNG_TASK=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_KGDB=y -CONFIG_KGDB_TESTS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_LIBCRC32C=m diff --git a/buildroot/board/qemu/sparc-ss10/linux.config b/buildroot/board/qemu/sparc-ss10/linux.config new file mode 100644 index 000000000..cb8d01dc0 --- /dev/null +++ b/buildroot/board/qemu/sparc-ss10/linux.config @@ -0,0 +1,31 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_PCI=y +CONFIG_SUN_OPENPROMFS=m +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_WIRELESS is not set +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=y +CONFIG_SCSI_SUNESP=y +CONFIG_NETDEVICES=y +CONFIG_SUNLANCE=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_SUNKBD=y +CONFIG_MOUSE_SERIAL=y +CONFIG_SERIAL_SUNZILOG=y +CONFIG_SERIAL_SUNZILOG_CONSOLE=y +CONFIG_SERIAL_SUNSU=y +CONFIG_SERIAL_SUNSU_CONSOLE=y +CONFIG_SUN_OPENPROMIO=m +CONFIG_EXT4_FS=y +CONFIG_ISO9660_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/sparc-ss10/readme.txt b/buildroot/board/qemu/sparc-ss10/readme.txt index 88f98d50d..d624b82d9 100644 --- a/buildroot/board/qemu/sparc-ss10/readme.txt +++ b/buildroot/board/qemu/sparc-ss10/readme.txt @@ -1,7 +1,5 @@ Run the emulation with: - qemu-system-sparc -M SS-10 -kernel output/images/zImage -drive file=output/images/rootfs.ext2 -append "root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user -display none + qemu-system-sparc -M SS-10 -kernel output/images/zImage -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user # qemu_sparc_ss10_defconfig The login prompt will appear in the terminal that started Qemu. - -Tested with QEMU 2.2.0 diff --git a/buildroot/board/qemu/sparc64-sun4u/linux.config b/buildroot/board/qemu/sparc64-sun4u/linux.config new file mode 100644 index 000000000..0e1e16879 --- /dev/null +++ b/buildroot/board/qemu/sparc64-sun4u/linux.config @@ -0,0 +1,25 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ_IDLE=y +CONFIG_EMBEDDED=y +CONFIG_MODULES=y +CONFIG_PCI=y +CONFIG_SUN_OPENPROMFS=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_PATA_CMD64X=y +CONFIG_NETDEVICES=y +CONFIG_E1000=y +CONFIG_SERIAL_SUNSU=y +CONFIG_SERIAL_SUNSU_CONSOLE=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf-8" +CONFIG_MAGIC_SYSRQ=y diff --git a/buildroot/board/qemu/sparc64-sun4u/readme.txt b/buildroot/board/qemu/sparc64-sun4u/readme.txt new file mode 100644 index 000000000..17d8cbdf9 --- /dev/null +++ b/buildroot/board/qemu/sparc64-sun4u/readme.txt @@ -0,0 +1,5 @@ +Run the emulation with: + + qemu-system-sparc64 -M sun4u -kernel output/images/vmlinux -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -drive file=output/images/rootfs.ext2,format=raw -net nic,model=e1000 -net user # qemu_sparc64_sun4u_defconfig + +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/x86/linux-3.18.config b/buildroot/board/qemu/x86/linux-3.18.config deleted file mode 100644 index 602a9bb25..000000000 --- a/buildroot/board/qemu/x86/linux-3.18.config +++ /dev/null @@ -1,63 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_X86_EXTENDED_PLATFORM is not set -# CONFIG_SCHED_OMIT_FRAME_POINTER is not set -# CONFIG_MTRR_SANITIZER is not set -# CONFIG_SECCOMP is not set -# CONFIG_RELOCATABLE is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FIRMWARE_IN_KERNEL is not set -# CONFIG_BLK_DEV is not set -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_ATA_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_NE2K_PCI=y -CONFIG_8139CP=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_HDA_INTEL=y -# CONFIG_USB_SUPPORT is not set -# CONFIG_X86_PLATFORM_DEVICES is not set -# CONFIG_DMIID is not set -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_X86_VERBOSE_BOOTUP is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/buildroot/board/qemu/x86/linux.config b/buildroot/board/qemu/x86/linux.config new file mode 100644 index 000000000..a4da99ff4 --- /dev/null +++ b/buildroot/board/qemu/x86/linux.config @@ -0,0 +1,52 @@ +CONFIG_SYSVIPC=y +CONFIG_CGROUPS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_SMP=y +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_WIRELESS is not set +CONFIG_PCI=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_DRM=y +CONFIG_DRM_QXL=y +CONFIG_DRM_BOCHS=y +CONFIG_DRM_VIRTIO_GPU=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_EXT4_FS=y +CONFIG_AUTOFS4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y diff --git a/buildroot/board/qemu/x86/post-build.sh b/buildroot/board/qemu/x86/post-build.sh new file mode 100755 index 000000000..bf83a002c --- /dev/null +++ b/buildroot/board/qemu/x86/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot/board/qemu/x86/readme.txt b/buildroot/board/qemu/x86/readme.txt index 1d4e1234b..a1f232e2e 100644 --- a/buildroot/board/qemu/x86/readme.txt +++ b/buildroot/board/qemu/x86/readme.txt @@ -1,7 +1,7 @@ Run the emulation with: - qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append root=/dev/sda -net nic,model=rtl8139 -net user + qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user # qemu_x86_defconfig -The login prompt will appear in the graphical window. +Optionally add -smp N to emulate a SMP system with N CPUs. -Tested with QEMU 2.2.0 +The login prompt will appear in the graphical window. diff --git a/buildroot/board/qemu/x86_64/linux-3.18.config b/buildroot/board/qemu/x86_64/linux-3.18.config deleted file mode 100644 index 602a9bb25..000000000 --- a/buildroot/board/qemu/x86_64/linux-3.18.config +++ /dev/null @@ -1,63 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_X86_EXTENDED_PLATFORM is not set -# CONFIG_SCHED_OMIT_FRAME_POINTER is not set -# CONFIG_MTRR_SANITIZER is not set -# CONFIG_SECCOMP is not set -# CONFIG_RELOCATABLE is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FIRMWARE_IN_KERNEL is not set -# CONFIG_BLK_DEV is not set -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_ATA_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_NE2K_PCI=y -CONFIG_8139CP=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_HDA_INTEL=y -# CONFIG_USB_SUPPORT is not set -# CONFIG_X86_PLATFORM_DEVICES is not set -# CONFIG_DMIID is not set -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_X86_VERBOSE_BOOTUP is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/buildroot/board/qemu/x86_64/linux.config b/buildroot/board/qemu/x86_64/linux.config new file mode 100644 index 000000000..e1d2ce01b --- /dev/null +++ b/buildroot/board/qemu/x86_64/linux.config @@ -0,0 +1,53 @@ +CONFIG_SYSVIPC=y +CONFIG_CGROUPS=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_SMP=y +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_WIRELESS is not set +CONFIG_PCI=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_VIRTIO=y +CONFIG_ATA=y +CONFIG_ATA_PIIX=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_NE2K_PCI=y +CONFIG_8139CP=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_HW_RANDOM_VIRTIO=m +CONFIG_DRM=y +CONFIG_DRM_QXL=y +CONFIG_DRM_BOCHS=y +CONFIG_DRM_VIRTIO_GPU=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_GENERIC=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_EXT4_FS=y +CONFIG_AUTOFS4_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_UNWINDER_FRAME_POINTER=y diff --git a/buildroot/board/qemu/x86_64/post-build.sh b/buildroot/board/qemu/x86_64/post-build.sh new file mode 100755 index 000000000..bf83a002c --- /dev/null +++ b/buildroot/board/qemu/x86_64/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot/board/qemu/x86_64/readme.txt b/buildroot/board/qemu/x86_64/readme.txt index 626ec2f14..2b2ae3be2 100644 --- a/buildroot/board/qemu/x86_64/readme.txt +++ b/buildroot/board/qemu/x86_64/readme.txt @@ -1,7 +1,7 @@ Run the emulation with: - qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append root=/dev/sda -net nic,model=rtl8139 -net user + qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user # qemu_x86_64_defconfig -The login prompt will appear in the graphical window. +Optionally add -smp N to emulate a SMP system with N CPUs. -Tested with QEMU 2.2.0 +The login prompt will appear in the graphical window. diff --git a/buildroot/board/qemu/xtensa-lx60/linux-3.18.config b/buildroot/board/qemu/xtensa-lx60/linux-3.18.config deleted file mode 100644 index 51701b20a..000000000 --- a/buildroot/board/qemu/xtensa-lx60/linux-3.18.config +++ /dev/null @@ -1,36 +0,0 @@ -# CONFIG_SWAP is not set -# CONFIG_CROSS_MEMORY_ATTACH is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_XTENSA_VARIANT_DC232B=y -# CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is not set -CONFIG_XTENSA_PLATFORM_XTFPGA=y -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="console=ttyS0,38400" -# CONFIG_COMPACTION is not set -# CONFIG_BOUNCE is not set -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_NETDEVICES=y -# CONFIG_WLAN is not set -CONFIG_SERIAL_8250=y -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_LD_NO_RELAX=y -# CONFIG_S32C1I_SELFTEST is not set diff --git a/buildroot/board/qemu/xtensa-lx60/linux-nommu.config b/buildroot/board/qemu/xtensa-lx60/linux-nommu.config new file mode 100644 index 000000000..8077645ee --- /dev/null +++ b/buildroot/board/qemu/xtensa-lx60/linux-nommu.config @@ -0,0 +1,39 @@ +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_XTENSA_VARIANT_CUSTOM=y +CONFIG_XTENSA_VARIANT_CUSTOM_NAME="dc233c" +# CONFIG_XTENSA_VARIANT_MMU is not set +CONFIG_XTENSA_UNALIGNED_USER=y +CONFIG_PREEMPT=y +CONFIG_MEMMAP_CACHEATTR=0x2cccccc7 +CONFIG_KERNEL_LOAD_ADDRESS=0x00003000 +# CONFIG_PCI is not set +CONFIG_XTENSA_PLATFORM_XTFPGA=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="earlycon=uart8250,mmio32,0xfd050020,115200n8 console=ttyS0,115200n8 memmap=0x04000000@0" +CONFIG_DEFAULT_MEM_START=0x00000000 +CONFIG_BINFMT_FLAT=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +CONFIG_DNS_RESOLVER=y +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_NETDEVICES=y +CONFIG_MARVELL_PHY=y +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HWMON is not set +# CONFIG_VGA_CONSOLE is not set +CONFIG_TMPFS=y +CONFIG_FANOTIFY=y +CONFIG_PRINTK_TIME=y +# CONFIG_S32C1I_SELFTEST is not set diff --git a/buildroot/board/qemu/xtensa-lx60/linux.config b/buildroot/board/qemu/xtensa-lx60/linux.config new file mode 100644 index 000000000..625b86049 --- /dev/null +++ b/buildroot/board/qemu/xtensa-lx60/linux.config @@ -0,0 +1,36 @@ +# CONFIG_SWAP is not set +# CONFIG_CROSS_MEMORY_ATTACH is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_XTENSA_VARIANT_DC233C=y +CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX=y +CONFIG_XTENSA_PLATFORM_XTFPGA=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS0,38400 memmap=0x04000000@0" +# CONFIG_COMPACTION is not set +# CONFIG_BOUNCE is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_NETDEVICES=y +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_VGA_CONSOLE is not set +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_LD_NO_RELAX=y +# CONFIG_S32C1I_SELFTEST is not set diff --git a/buildroot/board/qemu/xtensa-lx60/linux/linux-0001-disable-redboot-and-uboot.patch b/buildroot/board/qemu/xtensa-lx60/linux/linux-0001-disable-redboot-and-uboot.patch deleted file mode 100644 index c0ccf4846..000000000 --- a/buildroot/board/qemu/xtensa-lx60/linux/linux-0001-disable-redboot-and-uboot.patch +++ /dev/null @@ -1,16 +0,0 @@ -disable boot-uboot and boot-redboot, requires a patched u-boot and mkimage - -Signed-off-by:Waldemar Brodkorb - -diff -Nur linux-3.15.orig/arch/xtensa/boot/Makefile linux-3.15/arch/xtensa/boot/Makefile ---- linux-3.15.orig/arch/xtensa/boot/Makefile 2014-06-08 20:19:54.000000000 +0200 -+++ linux-3.15/arch/xtensa/boot/Makefile 2014-06-14 20:07:15.206091165 +0200 -@@ -23,7 +23,7 @@ - - bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf - bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot --bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot -+bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-elf - - zImage Image: $(bootdir-y) - diff --git a/buildroot/board/qemu/xtensa-lx60/readme.txt b/buildroot/board/qemu/xtensa-lx60/readme.txt index 0f138bc69..6f0e2710c 100644 --- a/buildroot/board/qemu/xtensa-lx60/readme.txt +++ b/buildroot/board/qemu/xtensa-lx60/readme.txt @@ -1,7 +1,7 @@ Run the emulation with: - qemu-system-xtensa -M lx60 -cpu dc232b -monitor null -nographic -kernel output/images/Image.elf + qemu-system-xtensa -M lx60 -cpu dc233c -monitor null -nographic -kernel output/images/Image.elf # qemu_xtensa_lx60_defconfig -The login prompt will appear in the terminal that started Qemu. + qemu-system-xtensa -M lx60 -cpu dc233c -monitor null -nographic -kernel output/images/Image.elf # qemu_xtensa_lx60_nommu_defconfig -Tested with QEMU 2.2.0 +The login prompt will appear in the terminal that started Qemu. diff --git a/buildroot/board/qemu/xtensa-lx60/xtensa_dc232b.tar b/buildroot/board/qemu/xtensa-lx60/xtensa_dc232b.tar deleted file mode 100644 index 77080e07b..000000000 Binary files a/buildroot/board/qemu/xtensa-lx60/xtensa_dc232b.tar and /dev/null differ diff --git a/buildroot/board/qmtech/zynq/patches/linux/0001-DTS-for-QMTech-Zynq-starter-kit.patch b/buildroot/board/qmtech/zynq/patches/linux/0001-DTS-for-QMTech-Zynq-starter-kit.patch new file mode 100644 index 000000000..86d8e387d --- /dev/null +++ b/buildroot/board/qmtech/zynq/patches/linux/0001-DTS-for-QMTech-Zynq-starter-kit.patch @@ -0,0 +1,418 @@ +From 22d955122ac0f7ac74ab74aadebf6b8edaf0bbbd Mon Sep 17 00:00:00 2001 +From: Julien Olivain +Date: Sun, 15 Dec 2019 18:45:40 +0100 +Subject: [PATCH] DTS for QMTech Zynq starter kit + +Signed-off-by: Martin Chabot +Signed-off-by: Julien Olivain +--- + arch/arm/boot/dts/zynq-qmtech.dts | 397 ++++++++++++++++++++++++++++++ + 1 file changed, 397 insertions(+) + create mode 100644 arch/arm/boot/dts/zynq-qmtech.dts + +diff --git a/arch/arm/boot/dts/zynq-qmtech.dts b/arch/arm/boot/dts/zynq-qmtech.dts +new file mode 100644 +index 000000000000..c6081dc0080e +--- /dev/null ++++ b/arch/arm/boot/dts/zynq-qmtech.dts +@@ -0,0 +1,397 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (C) 2011 - 2015 Xilinx ++ * Copyright (C) 2012 National Instruments Corp. ++ * Copyright (C) 2019 Martin Chabot ++ */ ++ ++/* Derived from: ++ * https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2019.2.01/arch/arm/boot/dts/zynq-zc702.dts ++ */ ++ ++/dts-v1/; ++#include "zynq-7000.dtsi" ++ ++/ { ++ model = "QMTECH XC7Z010 Starter Kit"; ++ compatible = "xlnx,zynq-qmtech", "xlnx,zynq-zc702", "xlnx,zynq-7000"; ++ ++ aliases { ++ ethernet0 = &gem0; ++ i2c0 = &i2c0; ++ serial0 = &uart1; ++ spi0 = &qspi; ++ mmc0 = &sdhci0; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x0 0x20000000>; ++ }; ++ ++ chosen { ++ bootargs = ""; ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ ds23 { ++ label = "ds23"; ++ gpios = <&gpio0 10 0>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++}; ++ ++&amba { ++ ocm: sram@fffc0000 { ++ compatible = "mmio-sram"; ++ reg = <0xfffc0000 0x10000>; ++ }; ++}; ++ ++&clkc { ++ ps-clk-frequency = <33333333>; ++}; ++ ++&gem0 { ++ status = "okay"; ++ phy-mode = "rgmii-id"; ++ phy-handle = <ðernet_phy>; ++ ++ ethernet_phy: ethernet-phy@0 { ++ reg = <0>; ++ device_type = "ethernet-phy"; ++ }; ++}; ++ ++&gpio0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpio0_default>; ++}; ++ ++&i2c0 { ++ status = "disabled"; ++ clock-frequency = <400000>; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c0_default>; ++ pinctrl-1 = <&pinctrl_i2c0_gpio>; ++ scl-gpios = <&gpio0 50 0>; ++ sda-gpios = <&gpio0 51 0>; ++ ++ i2c-mux@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ si570: clock-generator@5d { ++ #clock-cells = <0>; ++ compatible = "silabs,si570"; ++ temperature-stability = <50>; ++ reg = <0x5d>; ++ factory-fout = <156250000>; ++ clock-frequency = <148500000>; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ adv7511: hdmi-tx@39 { ++ compatible = "adi,adv7511"; ++ reg = <0x39>; ++ adi,input-depth = <8>; ++ adi,input-colorspace = "yuv422"; ++ adi,input-clock = "1x"; ++ adi,input-style = <3>; ++ adi,input-justification = "right"; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ eeprom@54 { ++ compatible = "atmel,24c08"; ++ reg = <0x54>; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ gpio@21 { ++ compatible = "ti,tca6416"; ++ reg = <0x21>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; ++ }; ++ ++ i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ rtc@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ }; ++ }; ++ ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ hwmon@52 { ++ compatible = "ti,ucd9248"; ++ reg = <52>; ++ }; ++ hwmon@53 { ++ compatible = "ti,ucd9248"; ++ reg = <53>; ++ }; ++ hwmon@54 { ++ compatible = "ti,ucd9248"; ++ reg = <54>; ++ }; ++ }; ++ }; ++}; ++ ++&pinctrl0 { ++ pinctrl_can0_default: can0-default { ++ mux { ++ function = "can0"; ++ groups = "can0_9_grp"; ++ }; ++ ++ conf { ++ groups = "can0_9_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ ++ conf-rx { ++ pins = "MIO46"; ++ bias-high-impedance; ++ }; ++ ++ conf-tx { ++ pins = "MIO47"; ++ bias-disable; ++ }; ++ }; ++ ++ pinctrl_gem0_default: gem0-default { ++ mux { ++ function = "ethernet0"; ++ groups = "ethernet0_0_grp"; ++ }; ++ ++ conf { ++ groups = "ethernet0_0_grp"; ++ slew-rate = <0>; ++ io-standard = <4>; ++ }; ++ ++ conf-rx { ++ pins = "MIO22", "MIO23", "MIO24", "MIO25", "MIO26", "MIO27"; ++ bias-high-impedance; ++ low-power-disable; ++ }; ++ ++ conf-tx { ++ pins = "MIO16", "MIO17", "MIO18", "MIO19", "MIO20", "MIO21"; ++ bias-disable; ++ low-power-enable; ++ }; ++ ++ mux-mdio { ++ function = "mdio0"; ++ groups = "mdio0_0_grp"; ++ }; ++ ++ conf-mdio { ++ groups = "mdio0_0_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ bias-disable; ++ }; ++ }; ++ ++ pinctrl_gpio0_default: gpio0-default { ++ mux { ++ function = "gpio0"; ++ groups = "gpio0_7_grp", "gpio0_8_grp", "gpio0_9_grp", ++ "gpio0_10_grp", "gpio0_11_grp", "gpio0_12_grp", ++ "gpio0_13_grp", "gpio0_14_grp"; ++ }; ++ ++ conf { ++ groups = "gpio0_7_grp", "gpio0_8_grp", "gpio0_9_grp", ++ "gpio0_10_grp", "gpio0_11_grp", "gpio0_12_grp", ++ "gpio0_13_grp", "gpio0_14_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ ++ conf-pull-up { ++ pins = "MIO9", "MIO10", "MIO11", "MIO12", "MIO13", "MIO14"; ++ bias-pull-up; ++ }; ++ ++ conf-pull-none { ++ pins = "MIO7", "MIO8"; ++ bias-disable; ++ }; ++ }; ++ ++ pinctrl_i2c0_default: i2c0-default { ++ mux { ++ groups = "i2c0_10_grp"; ++ function = "i2c0"; ++ }; ++ ++ conf { ++ groups = "i2c0_10_grp"; ++ bias-pull-up; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ }; ++ ++ pinctrl_i2c0_gpio: i2c0-gpio { ++ mux { ++ groups = "gpio0_50_grp", "gpio0_51_grp"; ++ function = "gpio0"; ++ }; ++ ++ conf { ++ groups = "gpio0_50_grp", "gpio0_51_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ }; ++ ++ pinctrl_sdhci0_default: sdhci0-default { ++ mux { ++ groups = "sdio0_2_grp"; ++ function = "sdio0"; ++ }; ++ ++ conf { ++ groups = "sdio0_2_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ bias-disable; ++ }; ++ ++ mux-cd { ++ groups = "gpio0_0_grp"; ++ function = "sdio0_cd"; ++ }; ++ ++ conf-cd { ++ groups = "gpio0_0_grp"; ++ bias-high-impedance; ++ bias-pull-up; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ ++ mux-wp { ++ groups = "gpio0_15_grp"; ++ function = "sdio0_wp"; ++ }; ++ ++ conf-wp { ++ groups = "gpio0_15_grp"; ++ bias-high-impedance; ++ bias-pull-up; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ }; ++ ++ pinctrl_uart1_default: uart1-default { ++ mux { ++ groups = "uart1_10_grp"; ++ function = "uart1"; ++ }; ++ ++ conf { ++ groups = "uart1_10_grp"; ++ slew-rate = <0>; ++ io-standard = <1>; ++ }; ++ ++ conf-rx { ++ pins = "MIO25"; ++ bias-high-impedance; ++ }; ++ ++ conf-tx { ++ pins = "MIO24"; ++ bias-disable; ++ }; ++ }; ++}; ++ ++&qspi { ++ u-boot,dm-pre-reloc; ++ status = "disabled"; ++ is-dual = <0>; ++ num-cs = <1>; ++ flash@0 { ++ compatible = "n25q128a11"; ++ reg = <0x0>; ++ spi-tx-bus-width = <1>; ++ spi-rx-bus-width = <4>; ++ spi-max-frequency = <50000000>; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ partition@qspi-fsbl-uboot { ++ label = "qspi-fsbl-uboot"; ++ reg = <0x0 0x100000>; ++ }; ++ partition@qspi-linux { ++ label = "qspi-linux"; ++ reg = <0x100000 0x500000>; ++ }; ++ partition@qspi-device-tree { ++ label = "qspi-device-tree"; ++ reg = <0x600000 0x20000>; ++ }; ++ partition@qspi-rootfs { ++ label = "qspi-rootfs"; ++ reg = <0x620000 0x5E0000>; ++ }; ++ partition@qspi-bitstream { ++ label = "qspi-bitstream"; ++ reg = <0xC00000 0x400000>; ++ }; ++ }; ++}; ++ ++&sdhci0 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++}; ++ ++&uart1 { ++ u-boot,dm-pre-reloc; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart1_default>; ++}; +-- +2.23.0 + diff --git a/buildroot/board/qmtech/zynq/readme.txt b/buildroot/board/qmtech/zynq/readme.txt new file mode 100644 index 000000000..5fb95bb90 --- /dev/null +++ b/buildroot/board/qmtech/zynq/readme.txt @@ -0,0 +1,76 @@ +******************************* +QMTECH Zynq XC7Z010 Starter Kit +******************************* + +This file documents the Buildroot support for the QMTECH [1] Zynq +XC7Z010 Starter Kit [2]. It is a low cost (~55$) Zynq based +development board. The board user manual is available at +[3]. Additional files are available on Github [4]. + + +Build +===== + +First, configure Buildroot for the QMTECH Zynq board: + + make zynq_qmtech_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.bin + - boot.vfat + - devicetree.dtb + - rootfs.cpio + - rootfs.cpio.gz + - rootfs.cpio.uboot + - rootfs.tar + - sdcard.img + - u-boot.bin + - u-boot.img + - uImage + - zynq-qmtech.dtb + + +Create a bootable micro SD card +=============================== + +To determine the device associated to the micro SD card have a look in +the /proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a micro SD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + + +Boot the QMTECH Zynq board +========================== + +To boot your newly created system: +- put a mini USB cable into the J4 Debug USB Port and connect using a + terminal emulator at 115200 bps, 8n1, +- put the prepared micro SD card in the J2 micro SD card slot, +- plug the 5V power supply on the JP4 barrel jack. + +Enjoy! + + +[1]. QMTECH: + http://www.chinaqmtech.com/ + +[2]. QMTECH Zynq XC7Z010 Starter Kit Product Page: + http://www.chinaqmtech.com/xilinx_zynq_soc + +[3]. QMTECH Zynq XC7Z010 Starter Kit Hardware User Manual: + http://www.chinaqmtech.com/filedownload/32552 + +[4]. QMTECH Github: + https://github.com/ChinaQMTECH/ZYNQ_STARTER_KIT diff --git a/buildroot/board/radxa/rockpi-4/extlinux.conf b/buildroot/board/radxa/rockpi-4/extlinux.conf new file mode 100644 index 000000000..83374f174 --- /dev/null +++ b/buildroot/board/radxa/rockpi-4/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_ROCK_PI_4 linux + kernel /Image + devicetree /rk3399-rock-pi-4.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait diff --git a/buildroot/board/radxa/rockpi-4/genimage.cfg b/buildroot/board/radxa/rockpi-4/genimage.cfg new file mode 100644 index 000000000..88986df34 --- /dev/null +++ b/buildroot/board/radxa/rockpi-4/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399-rock-pi-4.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/radxa/rockpi-4/post-build.sh b/buildroot/board/radxa/rockpi-4/post-build.sh new file mode 100755 index 000000000..ba29375c0 --- /dev/null +++ b/buildroot/board/radxa/rockpi-4/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/radxa/rockpi-4/readme.txt b/buildroot/board/radxa/rockpi-4/readme.txt new file mode 100644 index 000000000..1db7569ed --- /dev/null +++ b/buildroot/board/radxa/rockpi-4/readme.txt @@ -0,0 +1,61 @@ +RADXA ROCK_PI_4 +================ +https://rockpi.org/rockpi4 + +ROCK Pi 4 is a Single Board Computer (SBC) from radxa. This guide is valid +for the below models: +- ROCK PI 4 Model A +- ROCK PI 4 Model B +- ROCK PI 4 Model C + +Build: +====== + $ make rock_pi_4_defconfig + $ make + +Files created in output directory +================================= + +output/images + +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399-rock-pi-4.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device. + +Booting: +======== + +Serial console: +--------------- +RockPi4 has a 40-pin GPIO header. The pin layout is as follows: + +pin 6: gnd +pin 8: tx +pin 10: rx + +Baudrate for this board is 1500000. + +Login: +------ +Enter 'root' as login user, and the prompt is ready. + +Wiki link: +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/rock-pi-4.html diff --git a/buildroot/board/radxa/rockpi-n10/extlinux.conf b/buildroot/board/radxa/rockpi-n10/extlinux.conf new file mode 100644 index 000000000..b6a4c97cd --- /dev/null +++ b/buildroot/board/radxa/rockpi-n10/extlinux.conf @@ -0,0 +1,4 @@ +label RK3399_ROCK_PI_N10 linux + kernel /Image + devicetree /rk3399pro-rock-pi-n10.dtb + append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p4 rw rootwait diff --git a/buildroot/board/radxa/rockpi-n10/genimage.cfg b/buildroot/board/radxa/rockpi-n10/genimage.cfg new file mode 100644 index 000000000..8fbf562f2 --- /dev/null +++ b/buildroot/board/radxa/rockpi-n10/genimage.cfg @@ -0,0 +1,39 @@ +image boot.vfat { + vfat { + files = { + "Image", + "rk3399pro-rock-pi-n10.dtb", + "extlinux" + } + } + size = 112M +} + +image sdcard.img { + + hdimage { + gpt = true + } + + partition loader1 { + image = "idbloader.img" + offset = 32K + } + + partition loader2 { + image = "u-boot.itb" + offset = 8M + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 16M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/radxa/rockpi-n10/post-build.sh b/buildroot/board/radxa/rockpi-n10/post-build.sh new file mode 100755 index 000000000..ba29375c0 --- /dev/null +++ b/buildroot/board/radxa/rockpi-n10/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf diff --git a/buildroot/board/radxa/rockpi-n10/readme.txt b/buildroot/board/radxa/rockpi-n10/readme.txt new file mode 100644 index 000000000..49decbb3d --- /dev/null +++ b/buildroot/board/radxa/rockpi-n10/readme.txt @@ -0,0 +1,61 @@ +RADXA ROCKPI-N10 +================ +https://wiki.radxa.com/RockpiN10 + +Build: +====== + $ make rock_pi_n10_defconfig + $ make + +Files created in output directory +================================= + +output/images +. +├── bl31.elf +├── boot.vfat +├── extlinux +├── idbloader.img +├── Image +├── rk3399pro-rock-pi-n10.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +├── u-boot.bin +└── u-boot.itb + +Creating bootable SD card: +========================== + +Simply invoke (as root) + +sudo dd if=output/images/sdcard.img of=/dev/sdX && sync + +Where X is your SD card device. + +Booting: +======== + +Serial console: +--------------- +RockPi-N10 has a 40-pin GPIO header. The pin layout is as follows: + +pin 6: gnd +pin 8: tx +pin 10: rx + +Baudrate for this board is 1500000. + +The boot order on rockpi-n10 is emmc, sd. If emmc contains a valid Image, the board +always boots from emmc. To boot from SD, erase emmc as per the guide: + +https://wiki.amarulasolutions.com/bsp/setup/rockchip/rk3399_emmc.html + +Login: +------ +Enter 'root' as login user, and the prompt is ready. + +wiki link: +---------- +https://wiki.amarulasolutions.com/bsp/rockchip/rk3399pro/rock-pi-n10.html diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi.cfg new file mode 100644 index 000000000..bd5166a0f --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi.cfg @@ -0,0 +1,32 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-b.dtb", + "bcm2708-rpi-b-plus.dtb", + "bcm2708-rpi-cm.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi0.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi0.cfg new file mode 100644 index 000000000..f21a52f31 --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi0.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-zero.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi0w.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi0w.cfg new file mode 100644 index 000000000..f76256ef8 --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi0w.cfg @@ -0,0 +1,31 @@ +image boot.vfat { + vfat { + files = { + "bcm2708-rpi-zero-w.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi2.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi2.cfg new file mode 100644 index 000000000..a3be2a344 --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi2.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2709-rpi-2-b.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi3-64.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi3-64.cfg new file mode 100644 index 000000000..af1d17cde --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi3-64.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "bcm2710-rpi-3-b.dtb", + "bcm2710-rpi-3-b-plus.dtb", + "bcm2837-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", + "Image" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi3.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi3.cfg new file mode 100644 index 000000000..0a547241f --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi3.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "bcm2710-rpi-3-b.dtb", + "bcm2710-rpi-3-b-plus.dtb", + "bcm2710-rpi-cm3.dtb", + "rpi-firmware/bootcode.bin", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi4-64.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi4-64.cfg new file mode 100644 index 000000000..854e0c7e3 --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi4-64.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2711-rpi-4-b.dtb", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "Image" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/genimage-raspberrypi4.cfg b/buildroot/board/raspberrypi/genimage-raspberrypi4.cfg new file mode 100644 index 000000000..60e1f23bc --- /dev/null +++ b/buildroot/board/raspberrypi/genimage-raspberrypi4.cfg @@ -0,0 +1,30 @@ +image boot.vfat { + vfat { + files = { + "bcm2711-rpi-4-b.dtb", + "rpi-firmware/cmdline.txt", + "rpi-firmware/config.txt", + "rpi-firmware/fixup.dat", + "rpi-firmware/start.elf", + "rpi-firmware/overlays", + "zImage" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/raspberrypi/linux-3.18-rpi-dt.defconfig b/buildroot/board/raspberrypi/linux-3.18-rpi-dt.defconfig deleted file mode 100644 index 69c0fa3cf..000000000 --- a/buildroot/board/raspberrypi/linux-3.18-rpi-dt.defconfig +++ /dev/null @@ -1,204 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_XZ=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_FHANDLE=y -CONFIG_NO_HZ_IDLE=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=m -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=21 -# CONFIG_UTS_NS is not set -# CONFIG_IPC_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set -CONFIG_RELAY=y -# CONFIG_COMPAT_BRK is not set -CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_BCM2708=y -CONFIG_BCM2708_DT=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_KSM=y -CONFIG_UACCESS_WITH_MEMCPY=y -# CONFIG_ATAGS is not set -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_VFP=y -CONFIG_BINFMT_MISC=m -# CONFIG_SUSPEND is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_PACKET_DIAG=m -CONFIG_UNIX=y -CONFIG_UNIX_DIAG=m -CONFIG_INET=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=m -CONFIG_INET_UDP_DIAG=m -# CONFIG_IPV6 is not set -CONFIG_NETLINK_DIAG=y -CONFIG_BPF_JIT=y -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_CONNECTOR=y -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_RAM=m -CONFIG_SCSI=m -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=m -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -# CONFIG_ETHERNET is not set -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_AX8817X is not set -# CONFIG_USB_NET_AX88179_178A is not set -# CONFIG_USB_NET_CDCETHER is not set -# CONFIG_USB_NET_CDC_NCM is not set -CONFIG_USB_NET_SMSC95XX=m -# CONFIG_USB_NET_NET1080 is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -# CONFIG_USB_NET_ZAURUS is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_SPARSEKMAP=m -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_HW_RANDOM_BCM2708=m -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m -CONFIG_I2C_BCM2835=m -CONFIG_I2C_BCM2708=m -CONFIG_SPI=y -CONFIG_SPI_BCM2835=m -CONFIG_SPI_BCM2708=m -CONFIG_SPI_BITBANG=m -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_GENERIC_PLATFORM=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_BCM2835=y -CONFIG_WATCHDOG=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_BCM2708_WDT=m -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=m -CONFIG_REGULATOR_USERSPACE_CONSUMER=m -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_BCM2708=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_SOUND=m -CONFIG_SND=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=m -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_DUMMY=m -CONFIG_SND_BCM2835=m -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -CONFIG_HIDRAW=y -CONFIG_UHID=y -CONFIG_HID_PID=y -CONFIG_USB_HIDDEV=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DYNAMIC_MINORS=y -CONFIG_USB_DWCOTG=y -CONFIG_USB_STORAGE=m -CONFIG_USB_STORAGE_REALTEK=m -CONFIG_USB_STORAGE_DATAFAB=m -CONFIG_USB_STORAGE_FREECOM=m -CONFIG_USB_STORAGE_ISD200=m -CONFIG_USB_STORAGE_USBAT=m -CONFIG_USB_STORAGE_SDDR09=m -CONFIG_USB_STORAGE_SDDR55=m -CONFIG_USB_STORAGE_JUMPSHOT=m -CONFIG_USB_STORAGE_ALAUDA=m -CONFIG_USB_STORAGE_ONETOUCH=m -CONFIG_USB_STORAGE_KARMA=m -CONFIG_USB_STORAGE_CYPRESS_ATACB=m -CONFIG_USB_STORAGE_ENE_UB6250=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_BCM2835=y -CONFIG_MMC_BCM2835_DMA=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=m -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_ONESHOT=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m -CONFIG_LEDS_TRIGGER_BACKLIGHT=m -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=m -CONFIG_LEDS_TRIGGER_DEFAULT_ON=m -CONFIG_LEDS_TRIGGER_TRANSIENT=m -CONFIG_LEDS_TRIGGER_CAMERA=m -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=m -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_EXT4_FS=y -CONFIG_FANOTIFY=y -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=850 -CONFIG_FAT_DEFAULT_IOCHARSET="utf8" -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=m -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_PANIC_ON_OOPS=y -# CONFIG_RCU_CPU_STALL_VERBOSE is not set -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO_MANAGER=m -# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set -CONFIG_CRYPTO_NULL=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set diff --git a/buildroot/board/raspberrypi/post-build.sh b/buildroot/board/raspberrypi/post-build.sh new file mode 100755 index 000000000..5e5eb7110 --- /dev/null +++ b/buildroot/board/raspberrypi/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty1 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot/board/raspberrypi/post-image.sh b/buildroot/board/raspberrypi/post-image.sh new file mode 100755 index 000000000..9dbd98ef9 --- /dev/null +++ b/buildroot/board/raspberrypi/post-image.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)" +BOARD_NAME="$(basename ${BOARD_DIR})" +GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +for arg in "$@" +do + case "${arg}" in + --add-miniuart-bt-overlay) + if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then + echo "Adding 'dtoverlay=miniuart-bt' to config.txt (fixes ttyAMA0 serial console)." + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" + +# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console +dtoverlay=miniuart-bt +__EOF__ + fi + ;; + --aarch64) + # Run a 64bits kernel (armv8) + sed -e '/^kernel=/s,=.*,=Image,' -i "${BINARIES_DIR}/rpi-firmware/config.txt" + if ! grep -qE '^arm_64bit=1' "${BINARIES_DIR}/rpi-firmware/config.txt"; then + cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt" + +# enable 64bits support +arm_64bit=1 +__EOF__ + fi + ;; + --gpu_mem_256=*|--gpu_mem_512=*|--gpu_mem_1024=*) + # Set GPU memory + gpu_mem="${arg:2}" + sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt" + ;; + esac + +done + +# Pass an empty rootpath. genimage makes a full copy of the given rootpath to +# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk +# space. We don't rely on genimage to build the rootfs image, just to insert a +# pre-built one in the disk image. + +trap 'rm -rf "${ROOTPATH_TMP}"' EXIT +ROOTPATH_TMP="$(mktemp -d)" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${ROOTPATH_TMP}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $? diff --git a/buildroot/board/raspberrypi/readme.txt b/buildroot/board/raspberrypi/readme.txt index b4c1e6f8a..8b3de6d25 100644 --- a/buildroot/board/raspberrypi/readme.txt +++ b/buildroot/board/raspberrypi/readme.txt @@ -1,15 +1,14 @@ -RaspberryPi +Raspberry Pi Intro ===== -To be able to use your RaspberryPi board with the images generated by -Buildroot, you have to choose whether you will use: - - * Volatile rootfs in RAM (the rootfs is an initramfs) or - * Persistent rootfs on the SDCard - -Also, a good source of information is http://elinux.org/R-Pi_Hub +These instructions apply to all models of the Raspberry Pi: + - the original models A and B, + - the "enhanced" models A+ and B+, + - the model B2 (aka Raspberry Pi 2) + - the model B3 (aka Raspberry Pi 3). + - the model B4 (aka Raspberry Pi 4). How to build it =============== @@ -17,25 +16,28 @@ How to build it Configure Buildroot ------------------- -The raspberrypi_defconfig configuration is a minimal configuration with -all that is required to bring the Raspberry Pi. You should base your -work on this defconfig: +There are two RaspberryPi defconfig files in Buildroot, one for each +major variant, which you should base your work on: + +For models A, B, A+ or B+: $ make raspberrypi_defconfig -Alternatively, if you want to test support for the Device Tree: +For model Zero (model A+ in smaller form factor): - $ make raspberrypi_dt_defconfig + $ make raspberrypi0_defconfig -If you want to use a persistent rootfs, skip to "Build the rootfs", below. +For model 2 B: -For a volatile rootfs, you have to slightly adjust the configuration: + $ make raspberrypi2_defconfig - $ make menuconfig - * Select "Filesystem images" - * Select "initial RAM filesystem linked into linux kernel" +For model 3 B and B+: -You may also deselect "tar the root filesystem". + $ make raspberrypi3_defconfig + +For model 4 B: + + $ make raspberrypi4_defconfig Build the rootfs ---------------- @@ -47,7 +49,7 @@ You may now build your rootfs with: $ make -(This may take a while; consider getting yourself a coffee ;-) ) +(This may take a while, consider getting yourself a coffee ;-) ) Result of the build ------------------- @@ -55,88 +57,43 @@ Result of the build After building, you should obtain this tree: output/images/ - +-- rootfs.tar [0] + +-- bcm2708-rpi-b.dtb [1] + +-- bcm2708-rpi-b-plus.dtb [1] + +-- bcm2709-rpi-2-b.dtb [1] + +-- bcm2710-rpi-3-b.dtb [1] + +-- bcm2710-rpi-3-b-plus.dtb [1] + +-- bcm2711-rpi-4-b.dtb [1] + +-- boot.vfat + +-- rootfs.ext4 +-- rpi-firmware/ - | +-- bcm2708-rpi-b.dtb [1] - | +-- bcm2708-rpi-b-plus.dtb [1] | +-- bootcode.bin + | +-- cmdline.txt | +-- config.txt | +-- fixup.dat - | `-- start.elf + | +-- start.elf + | `-- overlays/ [2] + +-- sdcard.img `-- zImage -[0] Note for Volatile: rootfs.tar will only be there if you kept - "tar the root filesystem" option selected in "Filesystem images". - -[1] The DTBs (Device Tree Blobs) will only be present if you setup - Buildroot to install the DTBs from the rpi-firmware package, and - will only be used if your kernel has support for the Device Tree. - -Prepare you SDCard -================== - -For more information, visit -http://elinux.org/RPi_Advanced_Setup#Advanced_SD_card_setup - -In summary, your SDCard must have first partition in fat32 and marked bootable. - -Create the required partitions: - - for a persistent rootfs, 10MiB is enough memory for the boot fat32 - partition, and a second partition is required for the root filesystem - - for a volatile rootfs, 50MiB is required for the boot fat32 partition - -Note: You can create any number of partitions you desire, the only requirement -is that the first partition must be using fat32 and be bootable. - -Mount the partitions (adjust 'sdX' to match your SDcard device): - - $ sudo mount /dev/sdX1 /mnt/mountpointboot - $ sudo mount /dev/sdX2 /mnt/mountpointroot (only for persistent rootfs) - -Install the binaries to the SDCard ----------------------------------- - -At the root of the boot partition, the RaspberryPi must find the following -files: - - * bcm2708-rpi-b.dtb [2] - * bcm2708-rpi-b-plus.dtb [2] - * bootcode.bin - * config.txt - * fixup.dat - * start.elf - * zImage - -[2] Only needed if your kernel has support for the Device Tree. - -For example: - - $ cp output/images/rpi-firmware/* /mnt/mountpointboot - -Install your kernel with: - - $ cp output/images/zImage /mnt/mountpointboot - -Note: The kernel image file name is defined in config.txt like this: -kernel=zImage - -If you use a volatile rootfs, Skip to "Finish", below. For a persistent -rootfs, there are further steps to do. - -Extract (as root!) the contents of the rootfs.tar archive into the second -partition you created above: +[1] Not all of them will be present, depending on the RaspberryPi + model you are using. - $ sudo tar xf ./output/images/rootfs.tar -C /mnt/mountpointroot +[2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed + to enable the RPi3 serial console otherwise occupied by the bluetooth + chip). Alternative would be to disable the serial console in cmdline.txt + and /etc/inittab. -Finish -====== +How to write the SD card +======================== -Unmount all the partitions: +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. - $ sudo umount /mnt/mountpointboot - $ sudo umount /mnt/mountpointroot (only for persistent rootfs) +Copy the bootable "sdcard.img" onto an SD card with "dd": -And eject your SDcard from your computer SDcard reader. + $ sudo dd if=output/images/sdcard.img of=/dev/sdX Insert the SDcard into your Raspberry Pi, and power it up. Your new system -should come up, now. +should come up now and start two consoles: one on the serial port on +the P1 header, one on the HDMI output where you can login using a USB +keyboard. diff --git a/buildroot/board/raspberrypi0 b/buildroot/board/raspberrypi0 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi0 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi0w b/buildroot/board/raspberrypi0w new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi0w @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi2 b/buildroot/board/raspberrypi2 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi2 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi3 b/buildroot/board/raspberrypi3 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi3 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi3-64 b/buildroot/board/raspberrypi3-64 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi3-64 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi4 b/buildroot/board/raspberrypi4 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi4 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/raspberrypi4-64 b/buildroot/board/raspberrypi4-64 new file mode 120000 index 000000000..fcdafc81e --- /dev/null +++ b/buildroot/board/raspberrypi4-64 @@ -0,0 +1 @@ +raspberrypi \ No newline at end of file diff --git a/buildroot/board/roseapplepi/genimage.cfg b/buildroot/board/roseapplepi/genimage.cfg new file mode 100644 index 000000000..4d40e65bb --- /dev/null +++ b/buildroot/board/roseapplepi/genimage.cfg @@ -0,0 +1,43 @@ +# Minimal SD card image for the Roseapple Pi +# +image boot.vfat { + vfat { + files = { + "uEnv.txt", + "uImage" + } + file kernel.dtb { + image = "actduino_bubble_gum_sdboot_linux.dtb" + } + } + size = 10M +} + +image sdcard.img { + hdimage { + } + + partition s500-bootloader { + in-partition-table = "no" + image = "s500-bootloader.bin" + offset = 0x200200 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-dtb.img" + offset = 0x300000 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 512M + } +} diff --git a/buildroot/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch b/buildroot/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch new file mode 100644 index 000000000..79e8c800d --- /dev/null +++ b/buildroot/board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch @@ -0,0 +1,31 @@ +[PATCH] unbreak xhci-trace compilation + +When commit 84a99f6fc5d4 (xhci: add traces for debug messages in +xhci_address_device) was backported to the owl tree as part of commit +5b2ea66f15396 (usb: add owl usb driver), the specific CFLAGS needed for +xhci-trace.c were missed, causing build breakage: + + CC drivers/usb/host/xhci-trace.o +In file included from drivers/usb/host/xhci-trace.h:151:0, + from drivers/usb/host/xhci-trace.c:15: +include/trace/define_trace.h:79:43: fatal error: ./xhci-trace.h: No such file or directory + +Signed-off-by: Peter Korsgaard +--- + drivers/usb/host/Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +Index: linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile +=================================================================== +--- linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.orig/drivers/usb/host/Makefile ++++ linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile +@@ -4,6 +4,9 @@ + + ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG + ++# tell define_trace.h where to find the xhci trace header ++CFLAGS_xhci-trace.o := -I$(src) ++ + isp1760-y := isp1760-hcd.o isp1760-if.o + + fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o diff --git a/buildroot/board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch b/buildroot/board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch new file mode 100644 index 000000000..8d3c703e3 --- /dev/null +++ b/buildroot/board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch @@ -0,0 +1,99 @@ +From 96b4fb75d15be65edc5494579e4a944534042f99 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 13 Oct 2014 15:51:05 -0700 +Subject: [PATCH] kernel: add support for gcc 5 + +We're missing include/linux/compiler-gcc5.h which is required now +because gcc branched off to v5 in trunk. + +Just copy the relevant bits out of include/linux/compiler-gcc4.h, +no new code is added as of now. + +This fixes a build error when using gcc 5. + +Signed-off-by: Sasha Levin +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +(cherry picked from commit 71458cfc782eafe4b27656e078d379a34e472adf) +Signed-off-by: Peter Korsgaard +--- + include/linux/compiler-gcc5.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc5.h + +diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h +new file mode 100644 +index 0000000..cdd1cc2 +--- /dev/null ++++ b/include/linux/compiler-gcc5.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.10.2 + diff --git a/buildroot/board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/buildroot/board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch new file mode 100644 index 000000000..da38f2667 --- /dev/null +++ b/buildroot/board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch @@ -0,0 +1,54 @@ +From 8ac9a3f6dbf00d861134bea3f2c930defed6311a Mon Sep 17 00:00:00 2001 +From: Behan Webster +Date: Wed, 24 Sep 2014 01:06:46 +0100 +Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h + +With compilers which follow the C99 standard (like modern versions of gcc and +clang), "extern inline" does the wrong thing (emits code for an externally +linkable version of the inline function). In this case using static inline +and removing the NULL version of return_address in return_address.c does +the right thing. + +Signed-off-by: Behan Webster +Reviewed-by: Mark Charlebois +Acked-by: Steven Rostedt +Signed-off-by: Russell King +(cherry picked from commit aeea3592a13bf12861943e44fc48f1f270941f8d) +Signed-off-by: Peter Korsgaard +--- + arch/arm/include/asm/ftrace.h | 2 +- + arch/arm/kernel/return_address.c | 5 ----- + 2 files changed, 1 insertion(+), 6 deletions(-) + +diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h +index f89515a..2bb8cac 100644 +--- a/arch/arm/include/asm/ftrace.h ++++ b/arch/arm/include/asm/ftrace.h +@@ -45,7 +45,7 @@ void *return_address(unsigned int); + + #else + +-extern inline void *return_address(unsigned int level) ++static inline void *return_address(unsigned int level) + { + return NULL; + } +diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c +index 2f8f523..a3b587f 100755 +--- a/arch/arm/kernel/return_address.c ++++ b/arch/arm/kernel/return_address.c +@@ -63,11 +63,6 @@ void *return_address(unsigned int level) + //#warning "TODO: return_address should use unwind tables" + //#endif + +-void *return_address(unsigned int level) +-{ +- return NULL; +-} +- + #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ + + EXPORT_SYMBOL_GPL(return_address); +-- +2.10.2 + diff --git a/buildroot/board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch b/buildroot/board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch new file mode 100644 index 000000000..d76e2851b --- /dev/null +++ b/buildroot/board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch @@ -0,0 +1,121 @@ +From ef34609395c72a1e777ef9c3fb6ce60aa92976bb Mon Sep 17 00:00:00 2001 +From: Marco Franceschetti +Date: Sun, 13 Mar 2016 09:44:54 +0100 +Subject: [PATCH] Fix compile errors with gcc5 + +(cherry picked from commit e824d45043efd49607f66c89c921b07c1523bf9e) +Signed-off-by: Peter Korsgaard +--- + drivers/net/wireless/actions/rtl8188etv/include/ieee80211.h | 6 +++--- + drivers/net/wireless/actions/rtl8723bs/include/ieee80211.h | 6 +++--- + drivers/net/wireless/actions/rtl8723bs_vq0/include/ieee80211.h | 6 +++--- + drivers/net/wireless/actions/rtl8723bu/include/ieee80211.h | 6 +++--- + 4 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/wireless/actions/rtl8188etv/include/ieee80211.h b/drivers/net/wireless/actions/rtl8188etv/include/ieee80211.h +index fc293c4..0898cd4 100755 +--- a/drivers/net/wireless/actions/rtl8188etv/include/ieee80211.h ++++ b/drivers/net/wireless/actions/rtl8188etv/include/ieee80211.h +@@ -1314,18 +1314,18 @@ enum ieee80211_state { + (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ + (((Addr[5]) & 0xff) == 0xff)) + #else +-extern __inline int is_multicast_mac_addr(const u8 *addr) ++static __inline int is_multicast_mac_addr(const u8 *addr) + { + return ((addr[0] != 0xff) && (0x01 & addr[0])); + } + +-extern __inline int is_broadcast_mac_addr(const u8 *addr) ++static __inline int is_broadcast_mac_addr(const u8 *addr) + { + return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ + (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); + } + +-extern __inline int is_zero_mac_addr(const u8 *addr) ++static __inline int is_zero_mac_addr(const u8 *addr) + { + return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ + (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); +diff --git a/drivers/net/wireless/actions/rtl8723bs/include/ieee80211.h b/drivers/net/wireless/actions/rtl8723bs/include/ieee80211.h +index 09475ef..56e0f5a 100755 +--- a/drivers/net/wireless/actions/rtl8723bs/include/ieee80211.h ++++ b/drivers/net/wireless/actions/rtl8723bs/include/ieee80211.h +@@ -1318,18 +1318,18 @@ enum ieee80211_state { + (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ + (((Addr[5]) & 0xff) == 0xff)) + #else +-extern __inline int is_multicast_mac_addr(const u8 *addr) ++static __inline int is_multicast_mac_addr(const u8 *addr) + { + return ((addr[0] != 0xff) && (0x01 & addr[0])); + } + +-extern __inline int is_broadcast_mac_addr(const u8 *addr) ++static __inline int is_broadcast_mac_addr(const u8 *addr) + { + return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ + (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); + } + +-extern __inline int is_zero_mac_addr(const u8 *addr) ++static __inline int is_zero_mac_addr(const u8 *addr) + { + return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ + (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); +diff --git a/drivers/net/wireless/actions/rtl8723bs_vq0/include/ieee80211.h b/drivers/net/wireless/actions/rtl8723bs_vq0/include/ieee80211.h +index 5dfc421..95144b6 100755 +--- a/drivers/net/wireless/actions/rtl8723bs_vq0/include/ieee80211.h ++++ b/drivers/net/wireless/actions/rtl8723bs_vq0/include/ieee80211.h +@@ -1314,18 +1314,18 @@ enum ieee80211_state { + (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ + (((Addr[5]) & 0xff) == 0xff)) + #else +-extern __inline int is_multicast_mac_addr(const u8 *addr) ++static __inline int is_multicast_mac_addr(const u8 *addr) + { + return ((addr[0] != 0xff) && (0x01 & addr[0])); + } + +-extern __inline int is_broadcast_mac_addr(const u8 *addr) ++static __inline int is_broadcast_mac_addr(const u8 *addr) + { + return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ + (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); + } + +-extern __inline int is_zero_mac_addr(const u8 *addr) ++static __inline int is_zero_mac_addr(const u8 *addr) + { + return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ + (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); +diff --git a/drivers/net/wireless/actions/rtl8723bu/include/ieee80211.h b/drivers/net/wireless/actions/rtl8723bu/include/ieee80211.h +index 09475ef..56e0f5a 100755 +--- a/drivers/net/wireless/actions/rtl8723bu/include/ieee80211.h ++++ b/drivers/net/wireless/actions/rtl8723bu/include/ieee80211.h +@@ -1318,18 +1318,18 @@ enum ieee80211_state { + (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ + (((Addr[5]) & 0xff) == 0xff)) + #else +-extern __inline int is_multicast_mac_addr(const u8 *addr) ++static __inline int is_multicast_mac_addr(const u8 *addr) + { + return ((addr[0] != 0xff) && (0x01 & addr[0])); + } + +-extern __inline int is_broadcast_mac_addr(const u8 *addr) ++static __inline int is_broadcast_mac_addr(const u8 *addr) + { + return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ + (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); + } + +-extern __inline int is_zero_mac_addr(const u8 *addr) ++static __inline int is_zero_mac_addr(const u8 *addr) + { + return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ + (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); +-- +2.10.2 + diff --git a/buildroot/board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch b/buildroot/board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch new file mode 100644 index 000000000..791dd930c --- /dev/null +++ b/buildroot/board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch @@ -0,0 +1,363 @@ +From 21be6b635320321216dde9201fa57a3aed60ee12 Mon Sep 17 00:00:00 2001 +From: Joe Perches +Date: Thu, 25 Jun 2015 15:01:02 -0700 +Subject: [PATCH] compiler-gcc: integrate the various compiler-gcc[345].h files + +As gcc major version numbers are going to advance rather rapidly in the +future, there's no real value in separate files for each compiler +version. + +Deduplicate some of the macros #defined in each file too. + +Neaten comments using normal kernel commenting style. + +Signed-off-by: Joe Perches +Cc: Andi Kleen +Cc: Michal Marek +Cc: Segher Boessenkool +Cc: Sasha Levin +Cc: Anton Blanchard +Cc: Alan Modra +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +(cherry picked from commit cb984d101b30eb7478d32df56a0023e4603cba7f) +Signed-off-by: Peter Korsgaard +--- + include/linux/compiler-gcc.h | 120 ++++++++++++++++++++++++++++++++++++++++-- + include/linux/compiler-gcc3.h | 23 -------- + include/linux/compiler-gcc4.h | 88 ------------------------------- + include/linux/compiler-gcc5.h | 66 ----------------------- + 4 files changed, 116 insertions(+), 181 deletions(-) + delete mode 100644 include/linux/compiler-gcc3.h + delete mode 100644 include/linux/compiler-gcc4.h + delete mode 100644 include/linux/compiler-gcc5.h + +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index 24545cd90a25..0c5d746850c2 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -97,10 +97,122 @@ + #define __maybe_unused __attribute__((unused)) + #define __always_unused __attribute__((unused)) + +-#define __gcc_header(x) #x +-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) +-#define gcc_header(x) _gcc_header(x) +-#include gcc_header(__GNUC__) ++/* gcc version specific checks */ ++ ++#if GCC_VERSION < 30200 ++# error Sorry, your compiler is too old - please upgrade it. ++#endif ++ ++#if GCC_VERSION < 30300 ++# define __used __attribute__((__unused__)) ++#else ++# define __used __attribute__((__used__)) ++#endif ++ ++#ifdef CONFIG_GCOV_KERNEL ++# if GCC_VERSION < 30400 ++# error "GCOV profiling support for gcc versions below 3.4 not included" ++# endif /* __GNUC_MINOR__ */ ++#endif /* CONFIG_GCOV_KERNEL */ ++ ++#if GCC_VERSION >= 30400 ++#define __must_check __attribute__((warn_unused_result)) ++#endif ++ ++#if GCC_VERSION >= 40000 ++ ++/* GCC 4.1.[01] miscompiles __weak */ ++#ifdef __KERNEL__ ++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 ++# error Your version of gcc miscompiles the __weak directive ++# endif ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __compiler_offsetof(a, b) \ ++ __builtin_offsetof(a, b) ++ ++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 ++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) ++#endif ++ ++#if GCC_VERSION >= 40300 ++/* Mark functions as cold. gcc will assume any path leading to a call ++ * to them will be unlikely. This means a lot of manual unlikely()s ++ * are unnecessary now for any paths leading to the usual suspects ++ * like BUG(), printk(), panic() etc. [but let's keep them for now for ++ * older compilers] ++ * ++ * Early snapshots of gcc 4.3 don't support this and we can't detect this ++ * in the preprocessor, but we can live with this because they're unreleased. ++ * Maketime probing would be overkill here. ++ * ++ * gcc also has a __attribute__((__hot__)) to move hot functions into ++ * a special section, but I don't see any sense in this right now in ++ * the kernel context ++ */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++#endif /* GCC_VERSION >= 40300 */ ++ ++#if GCC_VERSION >= 40500 ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++#endif /* GCC_VERSION >= 40500 */ ++ ++#if GCC_VERSION >= 40600 ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++#endif ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#if GCC_VERSION >= 40400 ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#endif ++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ ++ ++#if GCC_VERSION >= 50000 ++#define KASAN_ABI_VERSION 4 ++#elif GCC_VERSION >= 40902 ++#define KASAN_ABI_VERSION 3 ++#endif ++ ++#endif /* gcc version >= 40000 specific checks */ + + #if !defined(__noclone) + #define __noclone /* not needed */ +diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h +deleted file mode 100644 +index 7d89febe4d79..000000000000 +--- a/include/linux/compiler-gcc3.h ++++ /dev/null +@@ -1,23 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#if GCC_VERSION < 30200 +-# error Sorry, your compiler is too old - please upgrade it. +-#endif +- +-#if GCC_VERSION >= 30300 +-# define __used __attribute__((__used__)) +-#else +-# define __used __attribute__((__unused__)) +-#endif +- +-#if GCC_VERSION >= 30400 +-#define __must_check __attribute__((warn_unused_result)) +-#endif +- +-#ifdef CONFIG_GCOV_KERNEL +-# if GCC_VERSION < 30400 +-# error "GCOV profiling support for gcc versions below 3.4 not included" +-# endif /* __GNUC_MINOR__ */ +-#endif /* CONFIG_GCOV_KERNEL */ +diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h +deleted file mode 100644 +index 2507fd2a1eb4..000000000000 +--- a/include/linux/compiler-gcc4.h ++++ /dev/null +@@ -1,88 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-/* GCC 4.1.[01] miscompiles __weak */ +-#ifdef __KERNEL__ +-# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 +-# error Your version of gcc miscompiles the __weak directive +-# endif +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) +- +-#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 +-# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) +-#endif +- +-#if GCC_VERSION >= 40300 +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +-#endif /* GCC_VERSION >= 40300 */ +- +-#if GCC_VERSION >= 40500 +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-#endif /* GCC_VERSION >= 40500 */ +- +-#if GCC_VERSION >= 40600 +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +-#endif +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * Fixed in GCC 4.8.2 and later versions. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#if GCC_VERSION >= 40400 +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#endif +-#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h +deleted file mode 100644 +index cdd1cc202d51..000000000000 +--- a/include/linux/compiler-gcc5.h ++++ /dev/null +@@ -1,66 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) +- +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +- +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * Fixed in GCC 4.8.2 and later versions. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.11.0 + diff --git a/buildroot/board/roseapplepi/patches/uboot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch b/buildroot/board/roseapplepi/patches/uboot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch new file mode 100644 index 000000000..ae19a4903 --- /dev/null +++ b/buildroot/board/roseapplepi/patches/uboot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch @@ -0,0 +1,809 @@ +From 9b2c282b348dfe966bbba967dc7a45ce817cce50 Mon Sep 17 00:00:00 2001 +From: Tom Rini +Date: Mon, 29 Feb 2016 11:34:15 -0500 +Subject: [PATCH] compiler*.h: sync include/linux/compiler*.h with Linux + 4.5-rc6 + +Copy these from Linux v4.5-rc6 tag. + +This is needed so that we can keep up with newer gcc versions. Note +that we don't have the uapi/ hierarchy from the kernel so continue to +use + +Signed-off-by: Tom Rini +Signed-off-by: Peter Korsgaard +--- + include/linux/compiler-gcc.h | 259 ++++++++++++++++++++++++++++++++--------- + include/linux/compiler-gcc3.h | 23 ---- + include/linux/compiler-gcc4.h | 88 -------------- + include/linux/compiler-gcc5.h | 65 ----------- + include/linux/compiler-intel.h | 5 + + include/linux/compiler.h | 178 ++++++++++++++++++++++++++-- + 6 files changed, 383 insertions(+), 235 deletions(-) + delete mode 100644 include/linux/compiler-gcc3.h + delete mode 100644 include/linux/compiler-gcc4.h + delete mode 100644 include/linux/compiler-gcc5.h + +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index e057bd2a84..22ab246fee 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -5,14 +5,28 @@ + /* + * Common definitions for all gcc versions go here. + */ +-#define GCC_VERSION (__GNUC__ * 10000 \ +- + __GNUC_MINOR__ * 100 \ +- + __GNUC_PATCHLEVEL__) +- ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) + + /* Optimization barrier */ ++ + /* The "volatile" is due to gcc bugs */ + #define barrier() __asm__ __volatile__("": : :"memory") ++/* ++ * This version is i.e. to prevent dead stores elimination on @ptr ++ * where gcc and llvm may behave differently when otherwise using ++ * normal barrier(): while gcc behavior gets along with a normal ++ * barrier(), llvm needs an explicit input variable to be assumed ++ * clobbered. The issue is as follows: while the inline asm might ++ * access any memory it wants, the compiler could have fit all of ++ * @ptr into memory registers instead, and since @ptr never escaped ++ * from that, it proofed that the inline asm wasn't touching any of ++ * it. This version works well with both compilers, i.e. we're telling ++ * the compiler that the inline asm absolutely may see the contents ++ * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 ++ */ ++#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") + + /* + * This macro obfuscates arithmetic on a variable address so that gcc +@@ -32,58 +46,63 @@ + * the inline assembly constraint from =g to =r, in this particular + * case either is valid. + */ +-#define RELOC_HIDE(ptr, off) \ +- ({ unsigned long __ptr; \ +- __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ +- (typeof(ptr)) (__ptr + (off)); }) ++#define RELOC_HIDE(ptr, off) \ ++({ \ ++ unsigned long __ptr; \ ++ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ ++ (typeof(ptr)) (__ptr + (off)); \ ++}) + + /* Make the optimizer believe the variable can be manipulated arbitrarily. */ +-#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var)) ++#define OPTIMIZER_HIDE_VAR(var) \ ++ __asm__ ("" : "=r" (var) : "0" (var)) + + #ifdef __CHECKER__ +-#define __must_be_array(arr) 0 ++#define __must_be_array(a) 0 + #else + /* &a[0] degrades to a pointer: a different type from an array */ +-#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ++#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) + #endif + + /* + * Force always-inline if the user requests it so via the .config, + * or if gcc is too old: + */ +-#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ ++#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ + !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) +-# define inline inline __attribute__((always_inline)) notrace +-# define __inline__ __inline__ __attribute__((always_inline)) notrace +-# define __inline __inline __attribute__((always_inline)) notrace ++#define inline inline __attribute__((always_inline)) notrace ++#define __inline__ __inline__ __attribute__((always_inline)) notrace ++#define __inline __inline __attribute__((always_inline)) notrace + #else + /* A lot of inline functions can cause havoc with function tracing */ +-# define inline inline notrace +-# define __inline__ __inline__ notrace +-# define __inline __inline notrace ++#define inline inline notrace ++#define __inline__ __inline__ notrace ++#define __inline __inline notrace + #endif + +-#define __deprecated __attribute__((deprecated)) +-#ifndef __packed +-#define __packed __attribute__((packed)) +-#endif +-#ifndef __weak +-#define __weak __attribute__((weak)) +-#endif ++#define __always_inline inline __attribute__((always_inline)) ++#define noinline __attribute__((noinline)) ++ ++#define __deprecated __attribute__((deprecated)) ++#define __packed __attribute__((packed)) ++#define __weak __attribute__((weak)) ++#define __alias(symbol) __attribute__((alias(#symbol))) + + /* +- * it doesn't make sense on ARM (currently the only user of __naked) to trace +- * naked functions because then mcount is called without stack and frame pointer +- * being set up and there is no chance to restore the lr register to the value +- * before mcount was called. ++ * it doesn't make sense on ARM (currently the only user of __naked) ++ * to trace naked functions because then mcount is called without ++ * stack and frame pointer being set up and there is no chance to ++ * restore the lr register to the value before mcount was called. ++ * ++ * The asm() bodies of naked functions often depend on standard calling ++ * conventions, therefore they must be noinline and noclone. + * +- * The asm() bodies of naked functions often depend on standard calling conventions, +- * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce +- * this, so we must do so ourselves. See GCC PR44290. ++ * GCC 4.[56] currently fail to enforce this, so we must do so ourselves. ++ * See GCC PR44290. + */ +-#define __naked __attribute__((naked)) noinline __noclone notrace ++#define __naked __attribute__((naked)) noinline __noclone notrace + +-#define __noreturn __attribute__((noreturn)) ++#define __noreturn __attribute__((noreturn)) + + /* + * From the GCC manual: +@@ -95,34 +114,170 @@ + * would be. + * [...] + */ +-#ifndef __pure +-#define __pure __attribute__((pure)) ++#define __pure __attribute__((pure)) ++#define __aligned(x) __attribute__((aligned(x))) ++#define __printf(a, b) __attribute__((format(printf, a, b))) ++#define __scanf(a, b) __attribute__((format(scanf, a, b))) ++#define __attribute_const__ __attribute__((__const__)) ++#define __maybe_unused __attribute__((unused)) ++#define __always_unused __attribute__((unused)) ++ ++/* gcc version specific checks */ ++ ++#if GCC_VERSION < 30200 ++# error Sorry, your compiler is too old - please upgrade it. ++#endif ++ ++#if GCC_VERSION < 30300 ++# define __used __attribute__((__unused__)) ++#else ++# define __used __attribute__((__used__)) ++#endif ++ ++#ifdef CONFIG_GCOV_KERNEL ++# if GCC_VERSION < 30400 ++# error "GCOV profiling support for gcc versions below 3.4 not included" ++# endif /* __GNUC_MINOR__ */ ++#endif /* CONFIG_GCOV_KERNEL */ ++ ++#if GCC_VERSION >= 30400 ++#define __must_check __attribute__((warn_unused_result)) ++#endif ++ ++#if GCC_VERSION >= 40000 ++ ++/* GCC 4.1.[01] miscompiles __weak */ ++#ifdef __KERNEL__ ++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 ++# error Your version of gcc miscompiles the __weak directive ++# endif ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __compiler_offsetof(a, b) \ ++ __builtin_offsetof(a, b) ++ ++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 ++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) ++#endif ++ ++#if GCC_VERSION >= 40300 ++/* Mark functions as cold. gcc will assume any path leading to a call ++ * to them will be unlikely. This means a lot of manual unlikely()s ++ * are unnecessary now for any paths leading to the usual suspects ++ * like BUG(), printk(), panic() etc. [but let's keep them for now for ++ * older compilers] ++ * ++ * Early snapshots of gcc 4.3 don't support this and we can't detect this ++ * in the preprocessor, but we can live with this because they're unreleased. ++ * Maketime probing would be overkill here. ++ * ++ * gcc also has a __attribute__((__hot__)) to move hot functions into ++ * a special section, but I don't see any sense in this right now in ++ * the kernel context ++ */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++#endif /* GCC_VERSION >= 40300 */ ++ ++#if GCC_VERSION >= 40500 ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++#endif /* GCC_VERSION >= 40500 */ ++ ++#if GCC_VERSION >= 40600 ++/* ++ * When used with Link Time Optimization, gcc can optimize away C functions or ++ * variables which are referenced only from assembly code. __visible tells the ++ * optimizer that something else uses this function or variable, thus preventing ++ * this. ++ */ ++#define __visible __attribute__((externally_visible)) + #endif +-#ifndef __aligned +-#define __aligned(x) __attribute__((aligned(x))) ++ ++ ++#if GCC_VERSION >= 40900 && !defined(__CHECKER__) ++/* ++ * __assume_aligned(n, k): Tell the optimizer that the returned ++ * pointer can be assumed to be k modulo n. The second argument is ++ * optional (default 0), so we use a variadic macro to make the ++ * shorthand. ++ * ++ * Beware: Do not apply this to functions which may return ++ * ERR_PTRs. Also, it is probably unwise to apply it to functions ++ * returning extra information in the low bits (but in that case the ++ * compiler should see some alignment anyway, when the return value is ++ * massaged by 'flags = ptr & 3; ptr &= ~3;'). ++ */ ++#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) + #endif +-#define __printf(a, b) __attribute__((format(printf, a, b))) +-#define __scanf(a, b) __attribute__((format(scanf, a, b))) +-#define noinline __attribute__((noinline)) +-#define __attribute_const__ __attribute__((__const__)) +-#define __maybe_unused __attribute__((unused)) +-#define __always_unused __attribute__((unused)) + +-#define __gcc_header(x) #x +-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) +-#define gcc_header(x) _gcc_header(x) +-#include gcc_header(__GNUC__) ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#if GCC_VERSION >= 40400 ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#endif ++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ ++ ++#if GCC_VERSION >= 50000 ++#define KASAN_ABI_VERSION 4 ++#elif GCC_VERSION >= 40902 ++#define KASAN_ABI_VERSION 3 ++#endif ++ ++#if GCC_VERSION >= 40902 ++/* ++ * Tell the compiler that address safety instrumentation (KASAN) ++ * should not be applied to that function. ++ * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 ++ */ ++#define __no_sanitize_address __attribute__((no_sanitize_address)) ++#endif ++ ++#endif /* gcc version >= 40000 specific checks */ + + #if !defined(__noclone) + #define __noclone /* not needed */ + #endif + ++#if !defined(__no_sanitize_address) ++#define __no_sanitize_address ++#endif ++ + /* + * A trick to suppress uninitialized variable warning without generating any + * code + */ + #define uninitialized_var(x) x = x +- +-#ifndef __always_inline +-#define __always_inline inline __attribute__((always_inline)) +-#endif +diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h +deleted file mode 100644 +index 7d89febe4d..0000000000 +--- a/include/linux/compiler-gcc3.h ++++ /dev/null +@@ -1,23 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#if GCC_VERSION < 30200 +-# error Sorry, your compiler is too old - please upgrade it. +-#endif +- +-#if GCC_VERSION >= 30300 +-# define __used __attribute__((__used__)) +-#else +-# define __used __attribute__((__unused__)) +-#endif +- +-#if GCC_VERSION >= 30400 +-#define __must_check __attribute__((warn_unused_result)) +-#endif +- +-#ifdef CONFIG_GCOV_KERNEL +-# if GCC_VERSION < 30400 +-# error "GCOV profiling support for gcc versions below 3.4 not included" +-# endif /* __GNUC_MINOR__ */ +-#endif /* CONFIG_GCOV_KERNEL */ +diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h +deleted file mode 100644 +index 2507fd2a1e..0000000000 +--- a/include/linux/compiler-gcc4.h ++++ /dev/null +@@ -1,88 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-/* GCC 4.1.[01] miscompiles __weak */ +-#ifdef __KERNEL__ +-# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 +-# error Your version of gcc miscompiles the __weak directive +-# endif +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) +- +-#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 +-# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) +-#endif +- +-#if GCC_VERSION >= 40300 +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +-#endif /* GCC_VERSION >= 40300 */ +- +-#if GCC_VERSION >= 40500 +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-#endif /* GCC_VERSION >= 40500 */ +- +-#if GCC_VERSION >= 40600 +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +-#endif +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * Fixed in GCC 4.8.2 and later versions. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#if GCC_VERSION >= 40400 +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#endif +-#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h +deleted file mode 100644 +index c8c5659525..0000000000 +--- a/include/linux/compiler-gcc5.h ++++ /dev/null +@@ -1,65 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) +- +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +- +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h +index ba147a1727..d4c71132d0 100644 +--- a/include/linux/compiler-intel.h ++++ b/include/linux/compiler-intel.h +@@ -13,9 +13,14 @@ + /* Intel ECC compiler doesn't support gcc specific asm stmts. + * It uses intrinsics to do the equivalent things. + */ ++#undef barrier ++#undef barrier_data + #undef RELOC_HIDE + #undef OPTIMIZER_HIDE_VAR + ++#define barrier() __memory_barrier() ++#define barrier_data(ptr) barrier() ++ + #define RELOC_HIDE(ptr, off) \ + ({ unsigned long __ptr; \ + __ptr = (unsigned long) (ptr); \ +diff --git a/include/linux/compiler.h b/include/linux/compiler.h +index d5ad7b1118..020ad16a04 100644 +--- a/include/linux/compiler.h ++++ b/include/linux/compiler.h +@@ -17,6 +17,7 @@ + # define __release(x) __context__(x,-1) + # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) + # define __percpu __attribute__((noderef, address_space(3))) ++# define __pmem __attribute__((noderef, address_space(5))) + #ifdef CONFIG_SPARSE_RCU_POINTER + # define __rcu __attribute__((noderef, address_space(4))) + #else +@@ -42,6 +43,7 @@ extern void __chk_io_ptr(const volatile void __iomem *); + # define __cond_lock(x,c) (c) + # define __percpu + # define __rcu ++# define __pmem + #endif + + /* Indirect macros required for expanded argument pasting, eg. __LINE__. */ +@@ -54,7 +56,11 @@ extern void __chk_io_ptr(const volatile void __iomem *); + #include + #endif + ++#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) ++#define notrace __attribute__((hotpatch(0,0))) ++#else + #define notrace __attribute__((no_instrument_function)) ++#endif + + /* Intel compiler defines __GNUC__. So we will overwrite implementations + * coming from above header files here +@@ -138,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + */ + #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) + #define __trace_if(cond) \ +- if (__builtin_constant_p((cond)) ? !!(cond) : \ ++ if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ + ({ \ + int ______r; \ + static struct ftrace_branch_data \ +@@ -165,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + # define barrier() __memory_barrier() + #endif + ++#ifndef barrier_data ++# define barrier_data(ptr) barrier() ++#endif ++ + /* Unreachable code */ + #ifndef unreachable + # define unreachable() do { } while (1) +@@ -186,6 +196,126 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__) + #endif + ++#include ++ ++#define __READ_ONCE_SIZE \ ++({ \ ++ switch (size) { \ ++ case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \ ++ case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \ ++ case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \ ++ case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \ ++ default: \ ++ barrier(); \ ++ __builtin_memcpy((void *)res, (const void *)p, size); \ ++ barrier(); \ ++ } \ ++}) ++ ++static __always_inline ++void __read_once_size(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++ ++#ifdef CONFIG_KASAN ++/* ++ * This function is not 'inline' because __no_sanitize_address confilcts ++ * with inlining. Attempt to inline it may cause a build failure. ++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 ++ * '__maybe_unused' allows us to avoid defined-but-not-used warnings. ++ */ ++static __no_sanitize_address __maybe_unused ++void __read_once_size_nocheck(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++#else ++static __always_inline ++void __read_once_size_nocheck(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++#endif ++ ++static __always_inline void __write_once_size(volatile void *p, void *res, int size) ++{ ++ switch (size) { ++ case 1: *(volatile __u8 *)p = *(__u8 *)res; break; ++ case 2: *(volatile __u16 *)p = *(__u16 *)res; break; ++ case 4: *(volatile __u32 *)p = *(__u32 *)res; break; ++ case 8: *(volatile __u64 *)p = *(__u64 *)res; break; ++ default: ++ barrier(); ++ __builtin_memcpy((void *)p, (const void *)res, size); ++ barrier(); ++ } ++} ++ ++/* ++ * Prevent the compiler from merging or refetching reads or writes. The ++ * compiler is also forbidden from reordering successive instances of ++ * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the ++ * compiler is aware of some particular ordering. One way to make the ++ * compiler aware of ordering is to put the two invocations of READ_ONCE, ++ * WRITE_ONCE or ACCESS_ONCE() in different C statements. ++ * ++ * In contrast to ACCESS_ONCE these two macros will also work on aggregate ++ * data types like structs or unions. If the size of the accessed data ++ * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) ++ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a ++ * compile-time warning. ++ * ++ * Their two major use cases are: (1) Mediating communication between ++ * process-level code and irq/NMI handlers, all running on the same CPU, ++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise ++ * mutilate accesses that either do not require ordering or that interact ++ * with an explicit memory barrier or atomic instruction that provides the ++ * required ordering. ++ */ ++ ++#define __READ_ONCE(x, check) \ ++({ \ ++ union { typeof(x) __val; char __c[1]; } __u; \ ++ if (check) \ ++ __read_once_size(&(x), __u.__c, sizeof(x)); \ ++ else \ ++ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ++ __u.__val; \ ++}) ++#define READ_ONCE(x) __READ_ONCE(x, 1) ++ ++/* ++ * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need ++ * to hide memory access from KASAN. ++ */ ++#define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0) ++ ++#define WRITE_ONCE(x, val) \ ++({ \ ++ union { typeof(x) __val; char __c[1]; } __u = \ ++ { .__val = (__force typeof(x)) (val) }; \ ++ __write_once_size(&(x), __u.__c, sizeof(x)); \ ++ __u.__val; \ ++}) ++ ++/** ++ * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering ++ * @cond: boolean expression to wait for ++ * ++ * Equivalent to using smp_load_acquire() on the condition variable but employs ++ * the control dependency of the wait to reduce the barrier on many platforms. ++ * ++ * The control dependency provides a LOAD->STORE order, the additional RMB ++ * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order, ++ * aka. ACQUIRE. ++ */ ++#define smp_cond_acquire(cond) do { \ ++ while (!(cond)) \ ++ cpu_relax(); \ ++ smp_rmb(); /* ctrl + rmb := acquire */ \ ++} while (0) ++ + #endif /* __KERNEL__ */ + + #endif /* __ASSEMBLY__ */ +@@ -304,6 +434,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + #define __visible + #endif + ++/* ++ * Assume alignment of return value. ++ */ ++#ifndef __assume_aligned ++#define __assume_aligned(a, ...) ++#endif ++ ++ + /* Are two types/vars the same type (ignoring qualifiers)? */ + #ifndef __same_type + # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) +@@ -311,7 +449,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + + /* Is this type a native word size -- useful for atomic operations */ + #ifndef __native_word +-# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ++# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) + #endif + + /* Compile time object size, -1 for unknown */ +@@ -373,12 +511,38 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + * to make the compiler aware of ordering is to put the two invocations of + * ACCESS_ONCE() in different C statements. + * +- * This macro does absolutely -nothing- to prevent the CPU from reordering, +- * merging, or refetching absolutely anything at any time. Its main intended +- * use is to mediate communication between process-level code and irq/NMI +- * handlers, all running on the same CPU. ++ * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE ++ * on a union member will work as long as the size of the member matches the ++ * size of the union and the size is smaller than word size. ++ * ++ * The major use cases of ACCESS_ONCE used to be (1) Mediating communication ++ * between process-level code and irq/NMI handlers, all running on the same CPU, ++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise ++ * mutilate accesses that either do not require ordering or that interact ++ * with an explicit memory barrier or atomic instruction that provides the ++ * required ordering. ++ * ++ * If possible use READ_ONCE()/WRITE_ONCE() instead. ++ */ ++#define __ACCESS_ONCE(x) ({ \ ++ __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \ ++ (volatile typeof(x) *)&(x); }) ++#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x)) ++ ++/** ++ * lockless_dereference() - safely load a pointer for later dereference ++ * @p: The pointer to load ++ * ++ * Similar to rcu_dereference(), but for situations where the pointed-to ++ * object's lifetime is managed by something other than RCU. That ++ * "something other" might be reference counting or simple immortality. + */ +-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) ++#define lockless_dereference(p) \ ++({ \ ++ typeof(p) _________p1 = READ_ONCE(p); \ ++ smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ ++ (_________p1); \ ++}) + + /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ + #ifdef CONFIG_KPROBES +-- +2.11.0 + diff --git a/buildroot/board/roseapplepi/post-build.sh b/buildroot/board/roseapplepi/post-build.sh new file mode 100755 index 000000000..ffdd19138 --- /dev/null +++ b/buildroot/board/roseapplepi/post-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +cp $BOARD_DIR/uEnv.txt $BINARIES_DIR/uEnv.txt diff --git a/buildroot/board/roseapplepi/uEnv.txt b/buildroot/board/roseapplepi/uEnv.txt new file mode 100755 index 000000000..f9646e498 --- /dev/null +++ b/buildroot/board/roseapplepi/uEnv.txt @@ -0,0 +1,3 @@ +# no ramdisk +ramdisk_addr_r=- +bootargs=clk_ignore_unused root=/dev/mmcblk0p2 diff --git a/buildroot/board/sheevaplug/readme.txt b/buildroot/board/sheevaplug/readme.txt new file mode 100644 index 000000000..e0ed2684c --- /dev/null +++ b/buildroot/board/sheevaplug/readme.txt @@ -0,0 +1,36 @@ +Sheevaplug +========== + +Once the build process is finished you will have the following files +in the output/images/ directory: + +- u-boot.kwb +- uImage.kirkwood-sheevaplug +- rootfs.jffs2 + +Copy these to a TFTP server, connect ethernet and mini-USB cable and +power up the board. Stop the board in U-Boot and update U-Boot by +executing: + +setenv serverip +setenv bootfile +bootp +nand erase 0x0 0x80000 +nand write $fileaddr 0x0 0x80000 +reset + +Once the new U-Boot boots up, stop it again and update Linux kernel +and rootfs by: + +setenv serverip +setenv bootfile +bootp +nand erase.part kernel +nand write $fileaddr kernel 0x400000 + +setenv bootfile +bootp +nand erase.part rootfs +nand write $fileaddr rootfs $filesize + +reset diff --git a/buildroot/board/sifive/hifive-unleashed/genimage.cfg b/buildroot/board/sifive/hifive-unleashed/genimage.cfg new file mode 100644 index 000000000..8eebc5235 --- /dev/null +++ b/buildroot/board/sifive/hifive-unleashed/genimage.cfg @@ -0,0 +1,17 @@ +image sdcard.img { + hdimage { + gpt = true + } + + partition bootloader { + image = "fw_payload.bin" + offset = 1M + size = 32M + partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985 + } + + partition rootfs { + image = "rootfs.ext4" + partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + } +} diff --git a/buildroot/board/sifive/hifive-unleashed/linux.config.fragment b/buildroot/board/sifive/hifive-unleashed/linux.config.fragment new file mode 100644 index 000000000..f4f384088 --- /dev/null +++ b/buildroot/board/sifive/hifive-unleashed/linux.config.fragment @@ -0,0 +1,16 @@ +CONFIG_HZ_100=y +CONFIG_CMDLINE="earlycon=sbi root=/dev/mmcblk0p2 rootwait" +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_SERIAL_SIFIVE=y +CONFIG_SERIAL_SIFIVE_CONSOLE=y +CONFIG_SPI=y +CONFIG_SPI_SIFIVE=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_SIFIVE=y +CONFIG_MMC=y +CONFIG_MMC_SPI=y +CONFIG_CLK_U54_PRCI=y +CONFIG_CLK_GEMGXL_MGMT=y +CONFIG_PWM=y +CONFIG_PWM_SIFIVE=y diff --git a/buildroot/board/sifive/hifive-unleashed/readme.txt b/buildroot/board/sifive/hifive-unleashed/readme.txt new file mode 100644 index 000000000..8d3fa6357 --- /dev/null +++ b/buildroot/board/sifive/hifive-unleashed/readme.txt @@ -0,0 +1,75 @@ +SiFive HiFive Unleashed +======================= + +This file describes how to use the pre-defined Buildroot +configuration for the SiFive HiFive Unleashed board. + +Further information about the HiFive Unleashed board can be found +at https://www.sifive.com/boards/hifive-unleashed + +Building +======== + +Configure Buildroot using the default board configuration: + + $ make hifive_unleashed_defconfig + +Customise the build as necessary: + + $ make menuconfig + +Start the build: + + $ make + +Result of the build +=================== + +Once the build has finished you will have the following files: + + output/images/ + +-- fw_jump.bin + +-- fw_jump.elf + +-- fw_payload.bin + +-- fw_payload.elf + +-- Image + +-- rootfs.ext2 + +-- rootfs.ext4 + +-- rootfs.tar + +-- sdcard.img + + +Creating a bootable SD card with genimage +========================================= + +Buildroot builds a SD card image for you. All you need to do is dd the +image to your SD card, which can be done with the following command: + + $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=4096 + +Booting the SD card on the board +================================ + +Make sure that the all DIP switches are set to the off position for +default boot mode (MSEL mode = 1111), insert the SD card and power +up the board. + +Connect the USB cable and open minicom (/dev/ttyUSB1, 115200, 8N1). + +See the 'SiFive HiFive Unleashed Getting Started Guide' for +more details (https://www.sifive.com/documentation). + +You will get a warning reported by fdisk when you examine the SD card. +This is because the genimage.cfg file doesn't specify the SD card size +(as people will naturally have different sized cards), so the +secondary GPT header is placed after the rootfs rather than at the end +of the disk where it is expected to be. + +You will see something like this at boot time: + +[ 2.318722] GPT:Primary header thinks Alt. header is not at the end of the disk. +[ 2.325390] GPT:190496 != 122142719 +[ 2.328843] GPT:Alternate GPT header not at the end of the disk. +[ 2.334824] GPT:190496 != 122142719 +[ 2.338302] GPT: Use GNU Parted to correct GPT errors. +[ 2.343456] mmcblk0: p1 p2 diff --git a/buildroot/board/sinovoip/m2-plus/boot.cmd b/buildroot/board/sinovoip/m2-plus/boot.cmd new file mode 100644 index 000000000..d22464a1c --- /dev/null +++ b/buildroot/board/sinovoip/m2-plus/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait + +mmc dev 0 +fatload mmc 0 $kernel_addr_r zImage +fatload mmc 0 $fdt_addr_r sun8i-h3-bananapi-m2-plus.dtb + +bootz $kernel_addr_r - $fdt_addr_r diff --git a/buildroot/board/sinovoip/m2-plus/genimage.cfg b/buildroot/board/sinovoip/m2-plus/genimage.cfg new file mode 100644 index 000000000..cde0669e7 --- /dev/null +++ b/buildroot/board/sinovoip/m2-plus/genimage.cfg @@ -0,0 +1,33 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "sun8i-h3-bananapi-m2-plus.dtb", + "boot.scr" + } + } + size = 64M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-sunxi-with-spl.bin" + offset = 8192 + size = 1040384 # 1MB - 8192 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/solidrun/clearfog/extlinux.conf b/buildroot/board/solidrun/clearfog/extlinux.conf new file mode 100644 index 000000000..f35974e3e --- /dev/null +++ b/buildroot/board/solidrun/clearfog/extlinux.conf @@ -0,0 +1,4 @@ +label Clearfog Linux + kernel /boot/zImage + devicetree /boot/armada-388-clearfog-base.dtb + append console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait diff --git a/buildroot/board/solidrun/clearfog/genimage.cfg b/buildroot/board/solidrun/clearfog/genimage.cfg new file mode 100644 index 000000000..8963619cc --- /dev/null +++ b/buildroot/board/solidrun/clearfog/genimage.cfg @@ -0,0 +1,16 @@ +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot-spl.kwb" + offset = 512 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + } +} diff --git a/buildroot/board/solidrun/clearfog/linux.fragment b/buildroot/board/solidrun/clearfog/linux.fragment new file mode 100644 index 000000000..b7ed5b00d --- /dev/null +++ b/buildroot/board/solidrun/clearfog/linux.fragment @@ -0,0 +1 @@ +CONFIG_SENSORS_MCP3021=y diff --git a/buildroot/board/solidrun/clearfog/post-build.sh b/buildroot/board/solidrun/clearfog/post-build.sh new file mode 100755 index 000000000..1f5ff6a61 --- /dev/null +++ b/buildroot/board/solidrun/clearfog/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/solidrun/clearfog/readme.txt b/buildroot/board/solidrun/clearfog/readme.txt new file mode 100644 index 000000000..60bf95329 --- /dev/null +++ b/buildroot/board/solidrun/clearfog/readme.txt @@ -0,0 +1,61 @@ +********************** +SolidRun Clearfog Base +********************** + +This file documents Buildroot's support for the Clearfog Base by Solid Run. + +Vendor's documentation: +https://wiki.solid-run.com/doku.php?id=products:a38x:documents + +Warning for eMMC variant of the MicroSoM +======================================== + +If you bought a MicroSoM version that includes an on-board eMMC flash, the +built-in microSD card slot *WILL NOT WORK*. The Internet says that you have to +upload the first bootloader via UART. This manual does not cover these steps; +only MicroSoMs without the eMMC are supported. + +Build +===== + +Start with the default Buildroot's configuration for Clearfog: + + make solidrun_clearfog_defconfig + +Build all components: + + make + +The results of the build are available in ./output/images. + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a microSD card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ conv=fdatasync + +*** WARNING! The dd command will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/solidrun/clearfog/genimage.cfg. + +Boot the Clearfog board +======================= + +Here's how to boot the board: + +- Set up the DIP switches for microSD boot. The correct values are: + 1: off, 2: off, 3: ON, 4: ON, 5: ON. In this scheme, switch #1" is closer to + the ethernet ports and #5 is closer to the microSD card, "ON" means towards + the SOM, and "off" means towards the SFP cage. +- Connect to the board's console over the microUSB port. +- Insert the SD card into the slot on the board (pins up). +- Power up the board. diff --git a/buildroot/board/solidrun/clearfog_gt_8k/extlinux.conf b/buildroot/board/solidrun/clearfog_gt_8k/extlinux.conf new file mode 100644 index 000000000..aae0c0d5f --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/extlinux.conf @@ -0,0 +1,4 @@ +label Clearfog GT-8K Linux + kernel /boot/Image + devicetree /boot/armada-8040-clearfog-gt-8k.dtb + append console=ttyS0,115200n8 root=/dev/mmcblk1p1 rootwait diff --git a/buildroot/board/solidrun/clearfog_gt_8k/genimage.cfg b/buildroot/board/solidrun/clearfog_gt_8k/genimage.cfg new file mode 120000 index 000000000..0cc2754ff --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/genimage.cfg @@ -0,0 +1 @@ +../macchiatobin/genimage.cfg \ No newline at end of file diff --git a/buildroot/board/solidrun/clearfog_gt_8k/linux-extras.config b/buildroot/board/solidrun/clearfog_gt_8k/linux-extras.config new file mode 100644 index 000000000..24f4f5542 --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/linux-extras.config @@ -0,0 +1,6 @@ +CONFIG_MARVELL_PHY=y +CONFIG_SFP=y +CONFIG_IPV6=y +CONFIG_BRIDGE=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_MV88E6XXX=y diff --git a/buildroot/board/solidrun/clearfog_gt_8k/post-build-mainline.sh b/buildroot/board/solidrun/clearfog_gt_8k/post-build-mainline.sh new file mode 120000 index 000000000..a8c9a5243 --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/post-build-mainline.sh @@ -0,0 +1 @@ +../macchiatobin/post-build-mainline.sh \ No newline at end of file diff --git a/buildroot/board/solidrun/clearfog_gt_8k/readme.txt b/buildroot/board/solidrun/clearfog_gt_8k/readme.txt new file mode 100644 index 000000000..1648ffa38 --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/readme.txt @@ -0,0 +1,61 @@ +Intro +===== + +The default configuration described below will allow you to start +experimenting with the buildroot environment for the SolidRun Clearfog GT-8K +based on the Marvell Armada 8040 SoC. + +This default configuration will bring up the board and allow shell command +line access through the serial console. + +How to build +============ + + $ make solidrun_clearfog_gt_8k_defconfig + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image file named +"sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync + +How to boot the board +===================== + +The Clearfog GT-8K can be setup to load the bootloader from different sources +including eMMC, SPI flash, and SD-card. + +To select boot from SD-card the DIP switches in SW6 (at the bottom of the +board) should be configured as follows: + + SW6: 11010 + +Insert the micro SDcard in the Cleargfog GT-8K and power it up. + +Serial console +============== + +The serial console is accessible at the J27 pins header (TTL UART) with the +following pinout (pin #1 is marked with triangle on the PCB): + + pin #1: Ground + pin #2: Armada 8040 Rx + pin #3: Armada 8040 Tx + +Enable the switch (yellow) Ethernet ports +========================================= + +To enable the Clearfog GT-8K internal switch port make sure to load the +'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default): + + modprobe mv88e6xxx + ifconfig eth2 up + +Then you can configure each switch port separately. These port are named +'lan1' to 'lan4' by default. 'lan1' is closest to the USB port, while 'lan4' +is closest to the blue Ethernet port. diff --git a/buildroot/board/solidrun/clearfog_gt_8k/uboot-fragment.config b/buildroot/board/solidrun/clearfog_gt_8k/uboot-fragment.config new file mode 120000 index 000000000..996c4aa6b --- /dev/null +++ b/buildroot/board/solidrun/clearfog_gt_8k/uboot-fragment.config @@ -0,0 +1 @@ +../macchiatobin/uboot-fragment.config \ No newline at end of file diff --git a/buildroot/board/solidrun/macchiatobin/extlinux.conf b/buildroot/board/solidrun/macchiatobin/extlinux.conf new file mode 100644 index 000000000..1008af1af --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/extlinux.conf @@ -0,0 +1,4 @@ +label Macchiatobin Linux + kernel /boot/Image + devicetree /boot/armada-8040-mcbin.dtb + append console=ttyS0,115200n8 root=/dev/mmcblk1p1 rootwait diff --git a/buildroot/board/solidrun/macchiatobin/genimage.cfg b/buildroot/board/solidrun/macchiatobin/genimage.cfg new file mode 100644 index 000000000..fdcda368a --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/genimage.cfg @@ -0,0 +1,16 @@ +image sdcard.img { + hdimage { + } + + partition uboot { + in-partition-table = "no" + image = "flash-image.bin" + offset = 0x200000 + } + + partition rootfs { + partition-type = 0x83 + offset = 0x2200000 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/solidrun/macchiatobin/linux-extras.config b/buildroot/board/solidrun/macchiatobin/linux-extras.config new file mode 100644 index 000000000..29fd63062 --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/linux-extras.config @@ -0,0 +1,3 @@ +CONFIG_MARVELL_PHY=y +CONFIG_MARVELL_10G_PHY=y +CONFIG_SFP=y diff --git a/buildroot/board/solidrun/macchiatobin/post-build-mainline.sh b/buildroot/board/solidrun/macchiatobin/post-build-mainline.sh new file mode 100755 index 000000000..1f5ff6a61 --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/post-build-mainline.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf diff --git a/buildroot/board/solidrun/macchiatobin/post-build.sh b/buildroot/board/solidrun/macchiatobin/post-build.sh new file mode 100755 index 000000000..9c1b5b883 --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/post-build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D ${BOARD_DIR}/uEnv-example.txt ${TARGET_DIR}/boot/uEnv-example.txt diff --git a/buildroot/board/solidrun/macchiatobin/readme.txt b/buildroot/board/solidrun/macchiatobin/readme.txt new file mode 100644 index 000000000..7412951aa --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/readme.txt @@ -0,0 +1,79 @@ +Intro +===== + +This default configuration will allow you to start experimenting with +the buildroot environment for the MacchiatoBin board based on the +Marvell Armada 8040 SoC. Documentation for the board hardware and +software is available on the wiki at: http://wiki.macchiatobin.net + +This default configuration will bring up the board and allow access +through the serial console. + +How to build +============ + +Default configuration provides the following BSP versions: + - Linux v5.6.3 (mainline) + - U-Boot v2020.01 (mainline) + - ATF v1.5-18.12.2 (Marvell) + +To build images run the following commands: + + $ make solidrun_macchiatobin_defconfig + $ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image +called "sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync + $ sudo sync + +How to boot the board +===================== + +The MacchiatoBin board can be setup to load the bootloader from +different sources including eMMC, SPI flash, and SD-card. + +On Rev 1.2 board to select boot from SD-card the DIP switches +SW1 and SW2 should be configured as follows: + +SW2: 01110 +SW1: 1xxxx + +The upcoming Rev 1.3 board will have a single pins header J1 instead +of the SW1/2 DIP switches. To boot from SD-card the setting of J1 +jumpers should match the DIP switches of Rev v1.2 board +from left to right: + +J1: 011101xxxx + +Insert the micro SDcard in the MacchiatoBin board and power it up. +The serial console is accessible at the micro-USB Type-B connector +marked CON9. The serial line settings are 115200 8N1. + +U-Boot environment +================== + +By default current configuration provides U-Boot that keeps environment +in SD/eMMC. However, if needed, u-boot-fragment.config can be tweaked +so that U-Boot will keep environment in SPI flash. On the first boot +SPI flash may be empty or it may contain a stale environment that +prevents proper boot. Then the following commands can be used +to boot the board: + +=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt +=> env import -t 0x01700000 $filesize +=> boot + +The example environment from uEnv-example.txt can be written to +SPI flash using the following commands: + +=> env default -f -a +=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt +=> env import -t 0x01700000 $filesize +=> saveenv diff --git a/buildroot/board/solidrun/macchiatobin/uEnv-example.txt b/buildroot/board/solidrun/macchiatobin/uEnv-example.txt new file mode 100644 index 000000000..1967e2bad --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/uEnv-example.txt @@ -0,0 +1,7 @@ +bootargs=console=ttyS0,115200 root=/dev/mmcblk1p1 rw rootwait +fdt_addr=0x1000000 +fdt_high=0xffffffffffffffff +fdt_name=boot/armada-8040-mcbin.dtb +kernel_addr=0x2000000 +image_name=boot/Image +bootcmd=mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name; ext4load mmc 1:1 $fdt_addr $fdt_name; booti $kernel_addr - $fdt_addr diff --git a/buildroot/board/solidrun/macchiatobin/uboot-fragment.config b/buildroot/board/solidrun/macchiatobin/uboot-fragment.config new file mode 100644 index 000000000..717a09424 --- /dev/null +++ b/buildroot/board/solidrun/macchiatobin/uboot-fragment.config @@ -0,0 +1,2 @@ +CONFIG_ENV_IS_IN_MMC=y +# CONFIG_ENV_IS_IN_SPI_FLASH is not set diff --git a/buildroot/board/solidrun/mx6cubox/boot.scr.txt b/buildroot/board/solidrun/mx6cubox/boot.scr.txt new file mode 100644 index 000000000..7a8aa4bd5 --- /dev/null +++ b/buildroot/board/solidrun/mx6cubox/boot.scr.txt @@ -0,0 +1,7 @@ +setenv finduuid "part uuid mmc 0:1 uuid" +run finduuid +run findfdt +setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4" +load mmc 0:1 ${fdt_addr} boot/${fdtfile} +load mmc 0:1 ${loadaddr} boot/zImage +bootz ${loadaddr} - ${fdt_addr} diff --git a/buildroot/board/solidrun/mx6cubox/genimage.cfg b/buildroot/board/solidrun/mx6cubox/genimage.cfg new file mode 100644 index 000000000..490986ac8 --- /dev/null +++ b/buildroot/board/solidrun/mx6cubox/genimage.cfg @@ -0,0 +1,29 @@ +# Minimal SD card image for the MX6 Cubox/Hummingboard +# +# U-Boot SPL and u-boot.img are flashed in the first 1MB raw partition. +# A single root filesystem partition is used (Ext4 in this case). +# + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1K + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.img" + offset = 69K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + size = 512M + } +} diff --git a/buildroot/board/solidrun/mx6cubox/post-build.sh b/buildroot/board/solidrun/mx6cubox/post-build.sh new file mode 100755 index 000000000..6ddc11370 --- /dev/null +++ b/buildroot/board/solidrun/mx6cubox/post-build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -d -m 755 $TARGET_DIR/boot + +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ + -n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr diff --git a/buildroot/board/solidrun/mx6cubox/post-image.sh b/buildroot/board/solidrun/mx6cubox/post-image.sh new file mode 100755 index 000000000..b4ac4608f --- /dev/null +++ b/buildroot/board/solidrun/mx6cubox/post-image.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" diff --git a/buildroot/board/solidrun/mx6cubox/readme.txt b/buildroot/board/solidrun/mx6cubox/readme.txt new file mode 100644 index 000000000..630ab6c75 --- /dev/null +++ b/buildroot/board/solidrun/mx6cubox/readme.txt @@ -0,0 +1,18 @@ +Solidrun's MX6 Cubox/Hummingboard + +https://www.solid-run.com/freescale-imx6-family/hummingboard/ + +https://www.solid-run.com/freescale-imx6-family/cubox-i/ + +To build a minimal support for these boards: + + $ make mx6cubox_defconfig + $ make + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on an SD card: + +dd if=output/images/sdcard.img of=/dev/ + +For details about the medium image layout, see the definition in +board/solidrun/mx6cubox/genimage.cfg. diff --git a/buildroot/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh b/buildroot/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh new file mode 100755 index 000000000..e324afe59 --- /dev/null +++ b/buildroot/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Kernel is built without devpts support +sed -i '/^devpts/d' ${TARGET_DIR}/etc/fstab + +# Kernel is built without network support +rm -f ${TARGET_DIR}/etc/init.d/S40network +rm -rf ${TARGET_DIR}/etc/network/ diff --git a/buildroot/board/stmicroelectronics/common/stm32mp157/genimage.cfg b/buildroot/board/stmicroelectronics/common/stm32mp157/genimage.cfg new file mode 100644 index 000000000..d1ce530cc --- /dev/null +++ b/buildroot/board/stmicroelectronics/common/stm32mp157/genimage.cfg @@ -0,0 +1,23 @@ +image sdcard.img { + hdimage { + gpt = "true" + } + + partition fsbl1 { + image = "u-boot-spl.stm32" + } + + partition fsbl2 { + image = "u-boot-spl.stm32" + } + + partition ssbl { + image = "u-boot.img" + } + + partition rootfs { + image = "rootfs.ext4" + partition-type = 0x83 + bootable = "yes" + } +} diff --git a/buildroot/board/stmicroelectronics/stm32f429-disco/flash.sh b/buildroot/board/stmicroelectronics/stm32f429-disco/flash.sh new file mode 100755 index 000000000..b19e0a601 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f429-disco/flash.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +OUTPUT_DIR=$1 +BOARD_NAME=${2:-stm32f429discovery} + +if ! test -d "${OUTPUT_DIR}" ; then + echo "ERROR: no output directory specified." + echo "Usage: $0 OUTPUT_DIR BOARD_NAME" + echo "" + echo "Arguments:" + echo " OUTPUT_DIR The Buildroot output directory." + echo " BOARD_NAME One of the available boards among:" + echo " stm32f429discovery, stm32f429disc1" + exit 1 +fi + +${OUTPUT_DIR}/host/bin/openocd -f board/${BOARD_NAME}.cfg \ + -c "init" \ + -c "reset init" \ + -c "flash probe 0" \ + -c "flash info 0" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429i-disco.bin 0x08000000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429-disco.dtb 0x08004000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "reset run" \ + -c "shutdown" diff --git a/buildroot/board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch b/buildroot/board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch new file mode 100644 index 000000000..d6d5c61aa --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch @@ -0,0 +1,32 @@ +From ded9afa688184b3240a92c2b8f114c545a09bc3f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 12 Mar 2016 23:14:41 +0100 +Subject: [PATCH] ARM: stm32f249-disco: don't force init= in /chosen/bootargs + +There is no reason to override the kernel's default init= value, as +this breaks userspace that assumes the kernel default of /init is +used. Since stm32 is often used with a minimal bootloader +(afboot-stm32) that doesn't provide any mechanism to override the DTB, +we need to adjust the kernel command line in the Device Tree source. + +Signed-off-by: Thomas Petazzoni +--- + arch/arm/boot/dts/stm32f429-disco.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts +index f0b731d..2bae81c 100644 +--- a/arch/arm/boot/dts/stm32f429-disco.dts ++++ b/arch/arm/boot/dts/stm32f429-disco.dts +@@ -53,7 +53,7 @@ + compatible = "st,stm32f429i-disco", "st,stm32f429"; + + chosen { +- bootargs = "root=/dev/ram rdinit=/linuxrc"; ++ bootargs = "root=/dev/ram"; + stdout-path = "serial0:115200n8"; + }; + +-- +2.6.4 + diff --git a/buildroot/board/stmicroelectronics/stm32f429-disco/readme.txt b/buildroot/board/stmicroelectronics/stm32f429-disco/readme.txt new file mode 100644 index 000000000..f512cb2e9 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f429-disco/readme.txt @@ -0,0 +1,37 @@ +STM32F429 Discovery +=================== + +This tutorial describes how to use the predefined Buildroot +configuration for the STM32F429 Discovery evaluation platform. + +Supported HW +------------ + + - STM32F429I-DISCO evaluation board + - STM32F429I-DISC1 evaluation board + +Building +-------- + + make stm32f429_disco_defconfig + make + +Wire the UART +------------- + +Use a USB to TTL adapter, and connect: + + - RX to PA9 + - TX to PA10 + - GND to one of the GND available on the board + +The UART is configured at 115200. + +Flashing +-------- + + ./board/stmicroelectronics/stm32f429-disco/flash.sh output/ \ + {stm32f429discovery|stm32f429disc1} + +It will flash the minimal bootloader, the Device Tree Blob, and the +kernel image which includes the root filesystem as initramfs. diff --git a/buildroot/board/stmicroelectronics/stm32f469-disco/flash.sh b/buildroot/board/stmicroelectronics/stm32f469-disco/flash.sh new file mode 100755 index 000000000..0ec0beb2d --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f469-disco/flash.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +OUTPUT_DIR=$1 + +if ! test -d "${OUTPUT_DIR}" ; then + echo "ERROR: no output directory specified." + echo "Usage: $0 OUTPUT_DIR" + exit 1 +fi + +${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ + -c "init" \ + -c "reset init" \ + -c "flash probe 0" \ + -c "flash info 0" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469i-disco.bin 0x08000000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469-disco.dtb 0x08004000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "reset run" \ + -c "shutdown" diff --git a/buildroot/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch b/buildroot/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch new file mode 100644 index 000000000..750e477df --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch @@ -0,0 +1,33 @@ +From c8f8f33c2f0460a34c9545b01a7972a7ed2df0e9 Mon Sep 17 00:00:00 2001 +From: Christophe Priouzeau +Date: Mon, 29 May 2017 13:38:16 +0200 +Subject: [PATCH] ARM: stm32f249-disco: don't force init= in /chosen/bootargs + +There is no reason to override the kernel's default init= value, as +this breaks userspace that assumes the kernel default of /init is +used. Since stm32 is often used with a minimal bootloader +(afboot-stm32) that doesn't provide any mechanism to override the DTB, +we need to adjust the kernel command line in the Device Tree source. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Christophe Priouzeau +--- + arch/arm/boot/dts/stm32f469-disco.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts +index 0dd56ef..93ee1b2 100644 +--- a/arch/arm/boot/dts/stm32f469-disco.dts ++++ b/arch/arm/boot/dts/stm32f469-disco.dts +@@ -53,7 +53,7 @@ + compatible = "st,stm32f469i-disco", "st,stm32f469"; + + chosen { +- bootargs = "root=/dev/ram rdinit=/linuxrc"; ++ bootargs = "root=/dev/ram"; + stdout-path = "serial0:115200n8"; + }; + +-- +2.7.4 + diff --git a/buildroot/board/stmicroelectronics/stm32f469-disco/readme.txt b/buildroot/board/stmicroelectronics/stm32f469-disco/readme.txt new file mode 100644 index 000000000..888bff08a --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32f469-disco/readme.txt @@ -0,0 +1,19 @@ +STM32F469 Discovery +=================== + +This tutorial describes how to use the predefined Buildroot +configuration for the STM32F469 Discovery evaluation platform. + +Building +-------- + + make stm32f469_disco_defconfig + make + +Flashing +-------- + + ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + +It will flash the minimal bootloader, the Device Tree Blob, and the +kernel image which includes the root filesystem as initramfs. diff --git a/buildroot/board/stmicroelectronics/stm32mp157a-dk1/linux.config b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/linux.config new file mode 100644 index 000000000..95c834e43 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/linux.config @@ -0,0 +1,182 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_USELIB=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_BLK_DEV_INITRD=y +CONFIG_ARCH_STM32=y +CONFIG_ARM_THUMBEE=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_754327=y +CONFIG_ARM_ERRATA_764369=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_ERRATA_798181=y +CONFIG_SMP=y +CONFIG_MCPM=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_SECCOMP=y +# CONFIG_ATAGS is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_ARM_CRYPTO=y +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_CMDLINE_PARTITION=y +CONFIG_CMA=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_CAN=y +CONFIG_CAN_M_CAN=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 +CONFIG_SIMPLE_PM_BUS=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_STM32_FMC2=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_SRAM=y +CONFIG_EEPROM_AT24=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_KS8851=y +CONFIG_SMSC911X=y +CONFIG_STMMAC_ETH=y +CONFIG_DWMAC_DWC_QOS_ETH=y +CONFIG_MDIO_BITBANG=y +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_STPMIC1_ONKEY=y +CONFIG_SERIAL_STM32=y +CONFIG_SERIAL_STM32_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_HW_RANDOM=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_STM32F7=y +CONFIG_SPI=y +CONFIG_SPI_STM32=y +CONFIG_SPI_STM32_QSPI=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_STMFX=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_WATCHDOG=y +CONFIG_STPMIC1_WATCHDOG=y +CONFIG_MFD_STM32_LPTIMER=y +CONFIG_MFD_STPMIC1=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_STM32_VREFBUF=y +CONFIG_REGULATOR_STM32_PWR=y +CONFIG_REGULATOR_STPMIC1=y +CONFIG_DRM=y +CONFIG_DRM_STM=y +CONFIG_DRM_STM_DSI=y +# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set +# CONFIG_DRM_SII902X is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_DWC2=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_ISP1760=y +CONFIG_USB_HSIC_USB3503=y +CONFIG_USB_GPIO_VBUS=y +CONFIG_USB_ISP1301=y +CONFIG_USB_ULPI=y +CONFIG_TYPEC=y +CONFIG_TYPEC_STUSB=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_ARMMMCI=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_DW=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_STM32=y +CONFIG_DMADEVICES=y +CONFIG_STM32_DMA=y +CONFIG_STM32_DMAMUX=y +CONFIG_STM32_MDMA=y +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_STM32=y +CONFIG_STM32_IPCC=y +CONFIG_REMOTEPROC=y +CONFIG_STM32_RPROC=y +CONFIG_RPMSG_VIRTIO=y +CONFIG_RPMSG_TTY=y +CONFIG_IIO=y +CONFIG_IIO_SW_TRIGGER=y +CONFIG_SD_ADC_MODULATOR=y +CONFIG_STM32_ADC_CORE=y +CONFIG_STM32_ADC=y +CONFIG_STM32_ADC_TEMP=y +CONFIG_STM32_DFSDM_ADC=y +CONFIG_STM32_LPTIMER_CNT=y +CONFIG_STM32_DAC=y +CONFIG_IIO_HRTIMER_TRIGGER=y +CONFIG_IIO_STM32_LPTIMER_TRIGGER=y +CONFIG_PWM=y +CONFIG_PWM_STM32=y +CONFIG_PWM_STM32_LP=y +CONFIG_PHY_STM32_USBPHYC=y +CONFIG_NVMEM_STM32_ROMEM=y +CONFIG_EXT4_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PRINTK_TIME=y diff --git a/buildroot/board/stmicroelectronics/stm32mp157a-dk1/overlay/boot/extlinux/extlinux.conf b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/overlay/boot/extlinux/extlinux.conf new file mode 100644 index 000000000..437e80fde --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label stm32mp157a-dk1-buildroot + kernel /boot/zImage + devicetree /boot/stm32mp157a-dk1.dtb + append root=/dev/mmcblk0p4 rootwait diff --git a/buildroot/board/stmicroelectronics/stm32mp157a-dk1/readme.txt b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/readme.txt new file mode 100644 index 000000000..060f71d5d --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/readme.txt @@ -0,0 +1,38 @@ +STM32MP157A Discovery Kit v1 + +Intro +===== + +This configuration supports the STM32MP157 Discovery Kit 1 (DK1) +platform: + + https://www.st.com/en/evaluation-tools/stm32mp157a-dk1.html + +How to build +============ + + $ make stm32mp157a_dk1_defconfig + $ make + +How to write the microSD card +============================= + +Once the build process is finished you will have an image called +"sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an microSD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Boot the board +============== + + (1) Insert the microSD card in connector CN15 + + (2) Plug a micro-USB cable in connector CN11 and run your serial + communication program on /dev/ttyACM0. + + (3) Plug a USB-C cable in CN6 to power-up the board. + + (4) The system will start, with the console on UART, but also visible + on the screen. diff --git a/buildroot/board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config new file mode 100644 index 000000000..a278ce9e2 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config @@ -0,0 +1 @@ +# CONFIG_STM32MP_WATCHDOG is not set diff --git a/buildroot/board/stmicroelectronics/stm32mp157c-dk2/linux.config b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/linux.config new file mode 100644 index 000000000..878a0c39f --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/linux.config @@ -0,0 +1,182 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_USELIB=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_BLK_DEV_INITRD=y +CONFIG_ARCH_STM32=y +CONFIG_ARM_THUMBEE=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_ERRATA_430973=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_754327=y +CONFIG_ARM_ERRATA_764369=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_ERRATA_798181=y +CONFIG_SMP=y +CONFIG_MCPM=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_SECCOMP=y +# CONFIG_ATAGS is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_ARM_CRYPTO=y +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_CMDLINE_PARTITION=y +CONFIG_CMA=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_CAN=y +CONFIG_CAN_M_CAN=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=128 +CONFIG_SIMPLE_PM_BUS=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_STM32_FMC2=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_SRAM=y +CONFIG_EEPROM_AT24=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +CONFIG_KS8851=y +CONFIG_SMSC911X=y +CONFIG_STMMAC_ETH=y +CONFIG_DWMAC_DWC_QOS_ETH=y +CONFIG_MDIO_BITBANG=y +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_STPMIC1_ONKEY=y +CONFIG_SERIAL_STM32=y +CONFIG_SERIAL_STM32_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_HW_RANDOM=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_STM32F7=y +CONFIG_SPI=y +CONFIG_SPI_STM32=y +CONFIG_SPI_STM32_QSPI=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_STMFX=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_WATCHDOG=y +CONFIG_STPMIC1_WATCHDOG=y +CONFIG_MFD_STM32_LPTIMER=y +CONFIG_MFD_STPMIC1=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_STM32_VREFBUF=y +CONFIG_REGULATOR_STM32_PWR=y +CONFIG_REGULATOR_STPMIC1=y +CONFIG_DRM=y +CONFIG_DRM_STM=y +CONFIG_DRM_STM_DSI=y +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y +CONFIG_DRM_SII902X=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_DWC2=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_ISP1760=y +CONFIG_USB_HSIC_USB3503=y +CONFIG_USB_GPIO_VBUS=y +CONFIG_USB_ISP1301=y +CONFIG_USB_ULPI=y +CONFIG_TYPEC=y +CONFIG_TYPEC_STUSB=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_ARMMMCI=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_DW=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_STM32=y +CONFIG_DMADEVICES=y +CONFIG_STM32_DMA=y +CONFIG_STM32_DMAMUX=y +CONFIG_STM32_MDMA=y +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_STM32=y +CONFIG_STM32_IPCC=y +CONFIG_REMOTEPROC=y +CONFIG_STM32_RPROC=y +CONFIG_RPMSG_VIRTIO=y +CONFIG_RPMSG_TTY=y +CONFIG_IIO=y +CONFIG_IIO_SW_TRIGGER=y +CONFIG_SD_ADC_MODULATOR=y +CONFIG_STM32_ADC_CORE=y +CONFIG_STM32_ADC=y +CONFIG_STM32_ADC_TEMP=y +CONFIG_STM32_DFSDM_ADC=y +CONFIG_STM32_LPTIMER_CNT=y +CONFIG_STM32_DAC=y +CONFIG_IIO_HRTIMER_TRIGGER=y +CONFIG_IIO_STM32_LPTIMER_TRIGGER=y +CONFIG_PWM=y +CONFIG_PWM_STM32=y +CONFIG_PWM_STM32_LP=y +CONFIG_PHY_STM32_USBPHYC=y +CONFIG_NVMEM_STM32_ROMEM=y +CONFIG_EXT4_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_PRINTK_TIME=y diff --git a/buildroot/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf new file mode 100644 index 000000000..5b7f56ee7 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label stm32mp157c-dk2-buildroot + kernel /boot/zImage + devicetree /boot/stm32mp157c-dk2.dtb + append root=/dev/mmcblk0p4 rootwait diff --git a/buildroot/board/stmicroelectronics/stm32mp157c-dk2/readme.txt b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/readme.txt new file mode 100644 index 000000000..8edc3e8bb --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/readme.txt @@ -0,0 +1,38 @@ +STM32MP157C Discovery Kit v2 + +Intro +===== + +This configuration supports the STM32MP157C Discovery Kit 2 (DK2) +platform: + + https://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html + +How to build +============ + + $ make stm32mp157c_dk2_defconfig + $ make + +How to write the microSD card +============================= + +Once the build process is finished you will have an image called +"sdcard.img" in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an microSD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Boot the board +============== + + (1) Insert the microSD card in connector CN15 + + (2) Plug a micro-USB cable in connector CN11 and run your serial + communication program on /dev/ttyACM0. + + (3) Plug a USB-C cable in CN6 to power-up the board. + + (4) The system will start, with the console on UART, but also visible + on the screen. diff --git a/buildroot/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config new file mode 100644 index 000000000..a278ce9e2 --- /dev/null +++ b/buildroot/board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config @@ -0,0 +1 @@ +# CONFIG_STM32MP_WATCHDOG is not set diff --git a/buildroot/board/synopsys/axs10x/post-build.sh b/buildroot/board/synopsys/axs10x/post-build.sh new file mode 100755 index 000000000..f23c8a99b --- /dev/null +++ b/buildroot/board/synopsys/axs10x/post-build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -u +set -e + +# Add a console on tty0 +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty0::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ +tty0::respawn:/sbin/getty 115200 tty0' ${TARGET_DIR}/etc/inittab +fi diff --git a/buildroot/board/synopsys/hsdk/genimage.cfg b/buildroot/board/synopsys/hsdk/genimage.cfg new file mode 100644 index 000000000..9103b2029 --- /dev/null +++ b/buildroot/board/synopsys/hsdk/genimage.cfg @@ -0,0 +1,27 @@ +image boot.vfat { + vfat { + files = { + "uImage" + } + file uboot.env { + image = "uboot-env.bin" + } + } + size = 20M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/synopsys/hsdk/linux.fragment b/buildroot/board/synopsys/hsdk/linux.fragment new file mode 100644 index 000000000..aaca08e01 --- /dev/null +++ b/buildroot/board/synopsys/hsdk/linux.fragment @@ -0,0 +1,3 @@ +CONFIG_INITRAMFS_SOURCE="" +CONFIG_ARC_UBOOT_SUPPORT=y +CONFIG_USB=y diff --git a/buildroot/board/synopsys/hsdk/readme.txt b/buildroot/board/synopsys/hsdk/readme.txt new file mode 100644 index 000000000..f4c650111 --- /dev/null +++ b/buildroot/board/synopsys/hsdk/readme.txt @@ -0,0 +1,33 @@ +Synopsys, Inc. +ARC HS Development Kit (HSDK) + +https://embarc.org/platforms.html + +How to build it +=============== + +Select the default configuration for the target: +$ make snps_archs38_hsdk_defconfig + +Optional: modify the configuration: +$ make menuconfig + +Build: +$ make + +Result of the build +=================== +output/images/ +├── boot.vfat +├── rootfs.ext2 +├── sdcard.img +├── u-boot +├── u-boot.bin +├── uboot-env.bin +└── uImage + +To copy the image file to the sdcard use dd: +$ dd if=output/images/sdcard.img of=/dev/XXX + +2018, Evgeniy Didin + diff --git a/buildroot/board/synopsys/hsdk/uboot.env.txt b/buildroot/board/synopsys/hsdk/uboot.env.txt new file mode 100644 index 000000000..216f0c904 --- /dev/null +++ b/buildroot/board/synopsys/hsdk/uboot.env.txt @@ -0,0 +1,9 @@ +baudrate=115200 +bootargs=root=/dev/mmcblk0p2 rootwait +bootcmd=fatload mmc 0:1; bootm +bootdelay=2 +bootfile=uImage +loadaddr=0x82000000 +stderr=serial0@f0005000 +stdin=serial0@f0005000 +stdout=serial0@f0005000 diff --git a/buildroot/board/synopsys/vdk/linux-vdk-aarch64-defconfig b/buildroot/board/synopsys/vdk/linux-vdk-aarch64-defconfig new file mode 100644 index 000000000..8109e1692 --- /dev/null +++ b/buildroot/board/synopsys/vdk/linux-vdk-aarch64-defconfig @@ -0,0 +1,143 @@ +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_CC_STACKPROTECTOR_REGULAR=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_SCHED_SMT=y +CONFIG_NR_CPUS=8 +CONFIG_PREEMPT=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y +CONFIG_CMDLINE="console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9 root=/dev/vda" +CONFIG_CMDLINE_FORCE=y +CONFIG_BINFMT_MISC=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_ARM_BIG_LITTLE_CPUFREQ=y +CONFIG_ARM_DT_BL_CPUFREQ=y +CONFIG_ARM_SPCI_CPUFREQ=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_SYN_COOKIES=y +CONFIG_NETWORK_PHY_TIMESTAMPING=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_VEXPRESS_CONFIG=y +CONFIG_CONNECTOR=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_VIRTIO_BLK=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_DEV_DM=y +CONFIG_NETDEVICES=y +CONFIG_STMMAC_ETH=m +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y +CONFIG_SERIO_AMBAKMI=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_RESET_VEXPRESS=y +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_SYNOPSYS=y +CONFIG_USB_OHCI_HCD=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_ULPI=y +CONFIG_USB_DUMMY_HCD=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_ARMMMCI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_SWITCH=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_COMMON_CLK_VERSATILE=y +CONFIG_CLK_SP810=y +CONFIG_CLK_VEXPRESS_OSC=y +CONFIG_COMMON_CLK_SCPI=y +CONFIG_MAILBOX=y +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_BTRFS_FS=m +CONFIG_QFMT_V2=y +CONFIG_AUTOFS4_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_HUGETLBFS=m +CONFIG_ECRYPT_FS=m +CONFIG_CRAMFS=m +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +CONFIG_FUNCTION_TRACER=y +CONFIG_STRICT_DEVMEM=y +CONFIG_SECURITY=y +CONFIG_SECURITY_NETWORK_XFRM=y +CONFIG_LSM_MMAP_MIN_ADDR=0 + diff --git a/buildroot/board/synopsys/vdk/readme.txt b/buildroot/board/synopsys/vdk/readme.txt new file mode 100644 index 000000000..980464734 --- /dev/null +++ b/buildroot/board/synopsys/vdk/readme.txt @@ -0,0 +1,65 @@ +Synopsys VDK Software Development Platform + +Intro +===== + +The Virtualizer Development Kit (VDK) Family for ARM Cortex Products +consists of a set of virtual prototypes that provide a virtualizer for +the ARM core variants. The VDK is a standalone package that runs on an +host computer. + +Buildroot will generate the kernel image and a minimal root filesystem. + +How to build it +=============== + +Configure Buildroot +------------------- + +Configuring Buildroot is pretty simple, just execute: + + $ make snps_aarch64_vdk_defconfig + +Build the rootfs and kernel +--------------------------- + +Note: you will need to have access to the network, since Buildroot will +download the packages' sources. + +You may now build your rootfs with: + + $ make + +(This may take a while) + +Result of the build +------------------- + +After building, you should obtain this tree: + + output/images/ + -- rootfs.ext2 + -- Image + +Installing your rootfs and Image +================================ + +Now copy the content of the output/images folder to the VDK' skins +folder: + + $ cp rootfs.ext2 Image /skins/Vanilla-Cortex/ARMv8 + + +Starting the VDK +================================ + +Go the VDK' installation root and execute the 'start' script: + + $ cd + $ ./start.sh + +The VP Explorer application will be executed, starting the simulation +automatically. + +For more information about Synopsys' VDK please check: +http://www.synopsys.com/Prototyping/VirtualPrototyping/Pages/default.aspx diff --git a/buildroot/board/technexion/imx6ulpico/readme.txt b/buildroot/board/technexion/imx6ulpico/readme.txt new file mode 100644 index 000000000..7eab3f6b8 --- /dev/null +++ b/buildroot/board/technexion/imx6ulpico/readme.txt @@ -0,0 +1,70 @@ +***************************** +Technexion i.MX6UL Pico board +***************************** + +This file documents the Buildroot support for the Technexion i.MX6UL Pico board. + +Build +===== + +First, configure Buildroot for the i.MX6UL Pico board: + + make imx6ulpico_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx6ul-pico-hobbit.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +In the U-Boot prompt lauch: + +=> ums 0 mmc 0 + +This will mount the eMMC content in the host PC as a mass storage device. + +To determine the device associated to the eMMC card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on the eMMC card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX6UL Pico board +========================= + +To boot your newly created system: +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Using Wifi +========== + +# modprobe brcmfmac +# iwconfig wlan0 essid ACCESSPOINTNAME +# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf +(enter the wifi password and press enter) +# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf & +# udhcpc -i wlan0 +# ping buildroot.org + +Enjoy! diff --git a/buildroot/board/technexion/imx6ulpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt b/buildroot/board/technexion/imx6ulpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt new file mode 100644 index 000000000..4716c7ef2 --- /dev/null +++ b/buildroot/board/technexion/imx6ulpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt @@ -0,0 +1,102 @@ +# Sample NVRAM for BCM94339 WLCSP with eTR,iPA, and eLNA. +sromrev=11 +boardrev=0x1100 +boardtype=0x06c9 +boardflags=0x10081401 +boardflags2=0x00000000 +boardflags3=0x08001188 +#boardnum=57410 +macaddr=00:90:4c:c5:12:38 +ccode=0 +regrev=0 +antswitch=0 +pdgain2g=7 +pdgain5g=7 +tworangetssi2g=0 +tworangetssi5g=0 +vendid=0x14e4 +devid=0x43ae +manfid=0x2d0 +#prodid=0x052e +nocrc=1 +otpimagesize=502 +xtalfreq=37400 +extpagain2g=2 +pdetrange2g=2 +extpagain5g=2 +pdetrange5g=2 +rxgains2gelnagaina0=2 +rxgains2gtrisoa0=6 +rxgains2gtrelnabypa0=1 +rxgains5gelnagaina0=4 +rxgains5gtrisoa0=4 +rxgains5gtrelnabypa0=1 +rxchain=1 +txchain=1 +aa2g=1 +aa5g=1 +tssipos5g=0 +tssipos2g=0 +pa2ga0=0xFF47,0x17B5,0xFD2B +pa2gccka0=0xFF5F,0x1B46,0xFCCC +pa5ga0=0xff54,0x16ec,0xfd45,0xff52,0x16a1,0xfd4d,0xff46,0x15b7,0xfd5a,0xff56,0x156d,0xfd79 +pa5gbw40a0=0xff59,0x17ca,0xfd30,0xff42,0x163d,0xfd4b,0xff31,0x152e,0xfd55,0xff60,0x16d8,0xfd54 +pa5gbw80a0=0xff56,0x1740,0xfd3f,0xff50,0x1738,0xfd3d,0xff4d,0x16b4,0xfd42,0xff58,0x1634,0xfd60 +# Default Target Power for 2G -- 17dBm(11)/14dBm(54)/13dBm(MCS7)/12dBm(MCS8)/12dBm(MCS9) +maxp2ga0=74 +maxp5ga0=74,74,74,74 +cckbw202gpo=0x0000 +cckbw20ul2gpo=0x0000 +mcsbw202gpo=0xaa888888 +mcsbw402gpo=0xaa888888 +dot11agofdmhrbw202gpo=0x6666 +ofdmlrbw202gpo=0x0066 +tssifloor2g=500 +# Default Target Power for 5G -- 14dBm(54)/13dBm(MCS7)/12dBm(MCS8)/12dBm(MCS9) +mcsbw205glpo=0xaa866666 +mcsbw405glpo=0xaa866666 +mcsbw805glpo=0xaa866666 +mcsbw205gmpo=0xaa866666 +mcsbw405gmpo=0xaa866666 +mcsbw805gmpo=0xaa866666 +mcsbw205ghpo=0xaa866666 +mcsbw405ghpo=0xaa866666 +mcsbw805ghpo=0xaa866666 +mcslr5glpo=0x0000 +mcslr5gmpo=0x0000 +mcslr5ghpo=0x0000 +sb20in40hrpo=0x0 +sb20in80and160hr5glpo=0x0 +sb40and80hr5glpo=0x0 +sb20in80and160hr5gmpo=0x0 +sb40and80hr5gmpo=0x0 +sb20in80and160hr5ghpo=0x0 +sb40and80hr5ghpo=0x0 +sb20in40lrpo=0x0 +sb20in80and160lr5glpo=0x0 +sb40and80lr5glpo=0x0 +sb20in80and160lr5gmpo=0x0 +sb40and80lr5gmpo=0x0 +sb20in80and160lr5ghpo=0x0 +sb40and80lr5ghpo=0x0 +dot11agduphrpo=0x0 +dot11agduplrpo=0x0 +phycal_tempdelta=25 +cckdigfilttype=2 +swctrlmap_5g=0x00080008,0x00500010,0x00100008,0x000000,0x078 +swctrlmap_2g=0x00010001,0x00220002,0x00020001,0x042202,0x1ff +swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +# +#GPIO 0 for SDIO HW OOB interruption +#muxenab=0x10 +#sd_gpout=0 +#sd_oobonly=1 +# +rssicorrnorm_c0=-2,0 +rssicorrnorm5g_c0=3,5,2,3,4,2,2,3,1,2,3,1 +## ED threshold level to address the new ETSI requirement - 10/31/2013 +ed_thresh2g=-77 +ed_thresh5g=-77 +# +paparambwver=1 diff --git a/buildroot/board/technexion/imx7dpico/readme.txt b/buildroot/board/technexion/imx7dpico/readme.txt new file mode 100644 index 000000000..53197d458 --- /dev/null +++ b/buildroot/board/technexion/imx7dpico/readme.txt @@ -0,0 +1,124 @@ +**************************** +Technexion i.MX7D Pico board +**************************** + +This file documents the Buildroot support for the Technexion i.MX7D Pico board. + +Build +===== + +First, configure Buildroot for the i.MX7D Pico board: + + make imx7dpico_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx7d-pico.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot-dtb.img + - SPL + - zImage + +Flash U-Boot and SPL +===== + +Note: This method is convenient for development purposes. +If the eMMC has already a U-Boot flashed with DFU support then +the user can go to step 2 below in order to update U-Boot. + +Put pico board in USB download mode (refer to the PICO-iMX7D Quick Start Guide +page 3) + +Connect a USB to serial adapter between the host PC and pico. + +Connect a USB cable between the OTG pico port and the host PC. + +Note: Some computers may be a bit strict with USB current draw and will +shut down their ports if the draw is too high. The solution for that is +to use an externally powered USB hub between the board and the host computer. + +Open a terminal program such as minicom. + +Copy SPL and u-boot-dtb.img to the imx_usb_loader folder. + +Load the SPL binary via USB: + +$ sudo ./imx_usb SPL + +Load the u-boot-dtb.img binary via USB: + +$ sudo ./imx_usb u-boot-dtb.img + +Then U-Boot starts and its messages appear in the console program. + +Use the default environment variables: + +=> env default -f -a +=> saveenv + +Run the DFU agent so we can flash the new images using dfu-util tool: + +=> dfu 0 mmc 0 + +Flash SPL and u-boot-dtb.img into the eMMC running the following commands on a PC: + +$ sudo dfu-util -D SPL -a spl + +$ sudo dfu-util -D u-boot-dtb.img -a u-boot + +Remove power from the pico board. + +Put pico board into normal boot mode. + +Power up the board and the new updated U-Boot should boot from eMMC. + +Flash the eMMC +============== + +In the U-Boot prompt lauch: + +=> ums 0 mmc 0 + +This will mount the eMMC content in the host PC as a mass storage device. + +To determine the device associated to the eMMC card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on the eMMC card. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the eMMC content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX7D Pico board +========================== + +To boot your newly created system: +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Using Wifi +========== + +# modprobe brcmfmac +# iwconfig wlan0 essid ACCESSPOINTNAME +# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf +(enter the wifi password and press enter) +# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf & +# udhcpc -i wlan0 +# ping buildroot.org + +Enjoy! diff --git a/buildroot/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf b/buildroot/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf new file mode 100644 index 000000000..4824aff07 --- /dev/null +++ b/buildroot/board/technexion/imx7dpico/rootfs_overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +Label imx7d-pico-buildroot + kernel /boot/zImage + devicetree /boot/imx7d-pico-pi.dtb + append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate} \ No newline at end of file diff --git a/buildroot/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt b/buildroot/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt new file mode 100644 index 000000000..1ddd92950 --- /dev/null +++ b/buildroot/board/technexion/imx7dpico/rootfs_overlay/lib/firmware/brcm/brcmfmac4339-sdio.txt @@ -0,0 +1,99 @@ +#AP6335_NVRAM_V1.5_03112014 +NVRAMRev=$Rev: 410316 $ +sromrev=11 +boardrev=0x1203 +boardtype=0x06c5 +boardflags=0x00000c01 +boardflags2=0x00002000 +boardflags3=0x101188 +macaddr=00:90:4c:c5:12:38 +ccode=0 +regrev=0 +antswitch=0 +pdgain2g=7 +pdgain5g=7 +tworangetssi2g=0 +tworangetssi5g=0 +femctrl=7 +pcieingress_war=15 +vendid=0x14e4 +devid=0x43ae +manfid=0x2d0 +nocrc=1 +otpimagesize=502 +xtalfreq=37400 +extpagain2g=2 +pdetrange2g=2 +extpagain5g=2 +pdetrange5g=2 +rxgains2gelnagaina0=0 +rxgains2gtrisoa0=7 +rxgains2gtrelnabypa0=0 +rxgains5gelnagaina0=0 +rxgains5gtrisoa0=11 +rxgains5gtrelnabypa0=0 +rxchain=1 +txchain=1 +aa2g=1 +aa5g=1 +tssipos5g=0 +tssipos2g=0 +pa2ga0=-161,6269,-723 +pa2gccka0=-116,7568,-852 +pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pdoffset40ma0=0 +pdoffset80ma0=0 +pdoffsetcckma0=0 +maxp2ga0=75 +maxp5ga0=64,64,72,72 +cckbw202gpo=0x0000 +cckbw20ul2gpo=0x0 +mcsbw202gpo=0x99445533 +mcsbw402gpo=0x99775533 +dot11agofdmhrbw202gpo=0x2233 +ofdmlrbw202gpo=0x0000 +tssifloor2g=500 +mcsbw205glpo=0x66333330 +mcsbw405glpo=0x66665530 +mcsbw805glpo=0xAA555530 +mcsbw1605glpo=0x99555530 +mcsbw205gmpo=0x99BB5530 +mcsbw405gmpo=0x99BB5530 +mcsbw805gmpo=0xEE555530 +mcsbw1605gmpo=0x99555530 +mcsbw205ghpo=0x99995530 +mcsbw405ghpo=0x99BB5530 +mcsbw805ghpo=0xEE555530 +mcsbw1605ghpo=0x99555530 +mcslr5glpo=0x0000 +mcslr5gmpo=0x0000 +mcslr5ghpo=0x0000 +sb20in40hrrpo=0x0 +sb20in80and160hr5glpo=0x0 +sb40and80hr5glpo=0x0 +sb20in80and160hr5gmpo=0x0 +sb40and80hr5gmpo=0x0 +sb20in80and160hr5ghpo=0x0 +sb40and80hr5ghpo=0x0 +sb20in40lrpo=0x0 +sb20in80and160lr5glpo=0x0 +sb40and80lr5glpo=0x0 +sb20in80and160lr5gmpo=0x0 +sb40and80lr5gmpo=0x0 +sb20in80and160lr5ghpo=0x0 +sb40and80lr5ghpo=0x0 +dot11agduphrpo=0x0 +dot11agduplrpo=0x0 +phycal_tempdelta=25 +cckdigfilttype=2 +pacalidx2g=65 +dacrate2g=160 +swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038 +swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff +swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +rssicorrnorm_c0=3,3 +rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2 +muxenab=0x10 diff --git a/buildroot/board/technexion/imx8mmpico/readme.txt b/buildroot/board/technexion/imx8mmpico/readme.txt new file mode 100644 index 000000000..3095d67b2 --- /dev/null +++ b/buildroot/board/technexion/imx8mmpico/readme.txt @@ -0,0 +1,96 @@ +********************************* +Technexion i.MX8M Mini Pico board +********************************* + +This file documents the Buildroot support for the Technexion i.MX8M +Mini Pico board. The Pico i.MX8M Mini system-on-module [1] is present +in development kits like the Pico Pi i.MX8M Mini [2]. + +Build +===== + +First, configure Buildroot for the i.MX8M Mini Pico board: + + make imx8mmpico_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - Image + - imx8-boot-sd.bin + - imx8mm-pico-pi.dtb + - imx8mm-pico-pi-ili9881c.dtb + - imx8mm-pico-pi-sn65dsi84-hj070na.dtb + - lpddr4_pmu_train_fw.bin + - rootfs.ext2 + - rootfs.ext4 + - sdcard.img + - u-boot.imx + +Flashing sdcard.img on the eMMC +=============================== + +i.MX8M Mini Pico board does not have a SD card slot. The storage is an +eMMC. An easy way to flash the eMMC is to use the u-boot ums +command. The boards are sold pre-flashed with such a u-boot. It is +assumed here that the board has already a working u-boot on eMMC and +jumpers are set to boot on eMMC. See [3]. + +Jumper configuration for eMMC boot: +J1: jumper on pins 4 and 6. +J2: jumper on pins 2 and 4. + +In case the board was flashed with a wrong u-boot, or the eMMC is +erased, u-boot can be loaded by USB Serial Download boot mode, using +imx-usb-loader. See [3] and [4]. + +For flashing: +- Plug the micro USB cable from the Debug USB Port, to your computer +- Plug the USB Type C to your computer, this will power up the board + +In the U-Boot prompt launch: + +=> ums 0 mmc 1 + +This will mount the eMMC content in the host PC as a mass storage device. + +To determine the device associated to the eMMC card have a look in the +/proc/partitions file: + + cat /proc/partitions + +If your system automatically mount some device partitions, make sure +to unmount them. + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on the eMMC. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the eMMC content. Use with care! *** + +This operation can take several minutes, depending on the image +size. When tested, a 2MB/s transfer rate was observed. + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX8M Mini Pico board +=============================== + +To boot your newly created system: +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board, with USB Type C connector. + +Enjoy! + +[1]. https://www.technexion.com/products/system-on-modules/pico/pico-compute-modules/detail/PICO-IMX8M-MINI +[2]. https://www.technexion.com/products/pico-evaluation-kits/detail/PICOPIIMX8MM1GDEV +[3]. https://www.technexion.com/support/knowledgebase/boot-configuration-settings-for-pico-baseboards/ +[4]. https://www.technexion.com/support/knowledgebase/loading-bootable-software-images-onto-the-emmc-of-picosom-on-pico-pi/ diff --git a/buildroot/board/technexion/imx8mpico/readme.txt b/buildroot/board/technexion/imx8mpico/readme.txt new file mode 100644 index 000000000..1a04e4457 --- /dev/null +++ b/buildroot/board/technexion/imx8mpico/readme.txt @@ -0,0 +1,95 @@ +**************************** +Technexion i.MX8M Pico board +**************************** + +This file documents the Buildroot support for the Technexion i.MX8M +Pico board. The Pico i.MX8M system-on-module [1] is present in +development kits like the Pico Pi i.MX8M [2]. + +Build +===== + +First, configure Buildroot for the i.MX8M Pico board: + + make imx8mpico_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - bl31.bin + - boot.vfat + - Image + - imx8-boot-sd.bin + - lpddr4_pmu_train_fw.bin + - pico-8m-dcss-ili9881c.dtb + - pico-8m.dtb + - rootfs.ext4 + - sdcard.img + - signed_hdmi_imx8m.bin + - u-boot.imx + +Flashing sdcard.img on the eMMC +=============================== + +i.MX8M Pico board does not have a SD card slot. The storage is an +eMMC. An easy way to flash the eMMC is to use the u-boot ums +command. The boards are sold pre-flashed with such a u-boot. It is +assumed here that the board has already a working u-boot on eMMC and +jumpers are set to boot on eMMC. See [3]. + +Jumper configuration for eMMC boot: +J1: jumper on pins 4 and 6. +J2: jumper on pins 2 and 4. + +In case the board was flashed with a wrong u-boot, or the eMMC is +erased, u-boot can be loaded by USB Serial Download boot mode, using +imx-usb-loader. See [3] and [4]. + +For flashing: +- Plug the micro USB cable from the Debug USB Port, to your computer +- Plug the USB Type C to your computer, this will power up the board + +In the U-Boot prompt launch: + +=> ums 0 mmc 0 + +This will mount the eMMC content in the host PC as a mass storage device. + +To determine the device associated to the eMMC card have a look in the +/proc/partitions file: + + cat /proc/partitions + +If your system automatically mount some device partitions, make sure +to unmount them. + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on the eMMC. Launch the following +command as root: + + dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the eMMC content. Use with care! *** + +This operation can take several minutes, depending on the image +size. When tested, a 2MB/s transfer rate was observed. + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX8M Pico board +========================== + +To boot your newly created system: +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board, with USB Type C connector. + +Enjoy! + +[1]. https://www.technexion.com/products/system-on-modules/pico/pico-compute-modules/detail/PICO-IMX8M +[2]. https://www.technexion.com/products/system-on-modules/pico-evaluation-kits/detail/PICO-PI-IMX8M-BASIC +[3]. https://www.technexion.com/support/knowledgebase/boot-configuration-settings-for-pico-baseboards/ +[4]. https://www.technexion.com/support/knowledgebase/loading-bootable-software-images-onto-the-emmc-of-picosom-on-pico-pi/ diff --git a/buildroot/board/technologic/ts4900/genimage.cfg b/buildroot/board/technologic/ts4900/genimage.cfg new file mode 100644 index 000000000..7e580eb27 --- /dev/null +++ b/buildroot/board/technologic/ts4900/genimage.cfg @@ -0,0 +1,10 @@ +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 256M + } +} diff --git a/buildroot/board/technologic/ts4900/post-image.sh b/buildroot/board/technologic/ts4900/post-image.sh new file mode 100755 index 000000000..cb966d883 --- /dev/null +++ b/buildroot/board/technologic/ts4900/post-image.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright (C) 2015-2016 Savoir-Faire Linux +# Post image generation script. + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG=$BOARD_DIR/genimage.cfg +GENIMAGE_TMP=$BUILD_DIR/.genimage_tmp + +rm -rf $GENIMAGE_TMP + +${HOST_DIR}/bin/genimage \ + --config ${GENIMAGE_CFG} \ + --rootpath $TARGET_DIR \ + --tmppath $GENIMAGE_TMP \ + --inputpath $BINARIES_DIR \ + --outputpath $BINARIES_DIR diff --git a/buildroot/board/technologic/ts4900/readme.txt b/buildroot/board/technologic/ts4900/readme.txt new file mode 100644 index 000000000..679454fde --- /dev/null +++ b/buildroot/board/technologic/ts4900/readme.txt @@ -0,0 +1,52 @@ +Technologic Systems TS-4900 +=========================== + +This document explains how to set up a basic Buildroot system for the +Technologic Systems TS-4900 System on Module. + +The TS-4900 is a TS-SOCKET macrocontroller board based on the +Freescale i.MX6 Single or Quad Core ARM Cortex-A9 CPU clocked at +1GHz. The TS-4900 features Gigabit Ethernet, SATA II Port, PCI Express +Bus, high speed USB host and device (OTG), and microSD card. +More details on the board here: + http://wiki.embeddedarm.com/wiki/TS-4900 + +The TS-4900 is not currently supported by mainline Linux, so a +Technologic Systems Linux is used based on Linux 4.1. +The default U-boot configuration flashed scans the SD card to find the +0x83 partition type, corresponding to the rootfs. Then it will load +both uImage and dts from the /boot directory. +To build the default configuration you only have to: + + $ make ts4900_defconfig + $ make + +The output looks like: +output/images/ +├── imx6q-ts4900.dtb +├── rootfs.ext2 +├── rootfs.tar +├── sdcard.img +└── uImage + +Since both the uImage and the dts are contained in the /boot +directory, the provided post-image script generates an image file +containing only one partition for the rootfs: + + $ fdisk output/images/sdcard.img + Device Boot Start End Blocks Id System +output/images/sdcard.img1 1 524288 262144 83 Linux + +This image can be directly written to an SD card. + + $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 + +In order to test the image on TS-4900 board, a TS baseboard, such as +the TS-9xxx series, is needed to provide power, console header, RJ45 +connector etc. + +The bootloader comes pre-flashed on the board on an SPI flash. Since +updating the bootloader is risky and not trivial, it is not included +in the Buildroot defconfig. Refer to +http://wiki.embeddedarm.com/wiki/TS-4900#U-Boot for details on which +U-Boot config to use and how to flash it. diff --git a/buildroot/board/ts/ts5x00/fs-overlay/boot/syslinux/syslinux.cfg b/buildroot/board/technologic/ts5500/fs-overlay/boot/syslinux/syslinux.cfg similarity index 100% rename from buildroot/board/ts/ts5x00/fs-overlay/boot/syslinux/syslinux.cfg rename to buildroot/board/technologic/ts5500/fs-overlay/boot/syslinux/syslinux.cfg diff --git a/buildroot/board/technologic/ts5500/linux-4.14.config b/buildroot/board/technologic/ts5500/linux-4.14.config new file mode 100644 index 000000000..eb81596e2 --- /dev/null +++ b/buildroot/board/technologic/ts5500/linux-4.14.config @@ -0,0 +1,111 @@ +# CONFIG_CROSS_MEMORY_ATTACH is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_MELAN=y +CONFIG_X86_GENERIC=y +CONFIG_X86_REBOOTFIXUPS=y +CONFIG_NOHIGHMEM=y +# CONFIG_COMPACTION is not set +# CONFIG_BOUNCE is not set +# CONFIG_RELOCATABLE is not set +# CONFIG_SUSPEND is not set +# CONFIG_ACPI is not set +CONFIG_CPU_IDLE=y +CONFIG_TS5500=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_BLK_DEV is not set +CONFIG_BLK_DEV_SD=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_ATA=y +# CONFIG_ATA_VERBOSE_ERROR is not set +# CONFIG_SATA_PMP is not set +CONFIG_ATA_GENERIC=y +CONFIG_PATA_LEGACY=y +CONFIG_NETDEVICES=y +# CONFIG_NET_CORE is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +CONFIG_NET_TULIP=y +CONFIG_DM9102=y +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y +CONFIG_DAVICOM_PHY=y +# CONFIG_WLAN is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIOLIB=y +CONFIG_GPIO_TS5500=y +CONFIG_SENSORS_MAX197=y +CONFIG_WATCHDOG=y +CONFIG_SC520_WDT=y +CONFIG_USB=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +# CONFIG_X86_PLATFORM_DEVICES is not set +# CONFIG_IOMMU_SUPPORT is not set +# CONFIG_DMIID is not set +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=y +CONFIG_NLS_UTF8=y +# CONFIG_VIRTUALIZATION is not set +CONFIG_XZ_DEC=y diff --git a/buildroot/board/technologic/ts5500/readme.txt b/buildroot/board/technologic/ts5500/readme.txt new file mode 100644 index 000000000..1e73ab3ea --- /dev/null +++ b/buildroot/board/technologic/ts5500/readme.txt @@ -0,0 +1,52 @@ +Technologic Systems TS-5x00 SBCs +================================ + +This document explains how to set up a basic Buildroot system for the +Technologic Systems TS-5x00 serie of x86-based Single Board Computers. + +TS-5x00 Single Board Computers are based on the AMD Elan520 processor. For more +information please have a look at http://wiki.embeddedarm.com/wiki/#AMD + +The kernel configuration works for any AMD Elan520-based SBCs, but the support +is enhanced for the TS-5500 and TS-5400 models (on-board devices registration +and additional sysfs attributes under /sys/devices/platform/). + +To build the default configuration you only have to: + + $ make ts5500_defconfig + $ make + +You will need a Compact Flash card of sufficient size and the first or only +partition configured as Linux type, with the bootable flag. + +You can transfer the system on the partition then optionally resize it with: + + # dd if=output/images/rootfs.ext4 of=/dev/sdX1 + # resize2fs /dev/sdX1 + +Or you can just extract the root filesystem to the partition with: + + # mount /dev/sdX1 /mnt + # tar -pxf output/images/rootfs.tar -C /mnt + # umount /mnt + +To install the bootloader, you will need to copy the MBR: + + # cat output/images/syslinux/mbr.bin > /dev/sdX + +Then install SYSLINUX in the mounted partition: + + # mount /dev/sdX1 /mnt + # output/host/sbin/extlinux --install /mnt/boot/syslinux + # umount /mnt + +IMPORTANT: In order for the board to boot the Compact Flash with a recent +config, the BIOS must use Logical Block Addressing (LBA). You can do it by +choosing "Ide 0: AUTOCONFIG, LBA" under "IDE DRIVE GEOMETRY" in the "Basic CMOS +Configuration" screen. Also, don't forget to set the 'active' (or 'bootable') +flag on partition 1. For details about the CMOS setup, please see: +http://wiki.embeddedarm.com/wiki/TS-5500#System_BIOS_Setup_Screens + +Connect a terminal program to the rs232 connector marked "COM2" +with baudrate set to 115200, insert the Compact Flash card into the socket, +power up the board, and enjoy. diff --git a/buildroot/board/technologic/ts7680/genimage.cfg b/buildroot/board/technologic/ts7680/genimage.cfg new file mode 100644 index 000000000..70b1dac64 --- /dev/null +++ b/buildroot/board/technologic/ts7680/genimage.cfg @@ -0,0 +1,14 @@ +image sdcard.img { + hdimage { + } + + partition unused { + size = 512 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 256M + } +} diff --git a/buildroot/board/technologic/ts7680/readme.txt b/buildroot/board/technologic/ts7680/readme.txt new file mode 100644 index 000000000..43d5d135e --- /dev/null +++ b/buildroot/board/technologic/ts7680/readme.txt @@ -0,0 +1,50 @@ +Technologic Systems TS-7680 SBC +=============================== + +This document explains how to set up a basic Buildroot system for +the Technologic Systems TS-7680 Single Board Computer. + +The TS-7680 SBC is based on the Freescale i.MX286 ARM ARM926EJ-S +running at 454MHz. The TS-7680 features are 10/100 Ethernet ports, +Wi-Fi, microSD card, eMMC, NOR Flash, USB host port, CAN ports, +relays and ADC/DAC. More details on the board here: +https://wiki.embeddedarm.com/wiki/TS-7680 + +The TS-7680 uses a 4.9 Linux kernel provided by Technologic Systems. + +To build the default configuration you only have to run: + + $ make ts7680_defconfig + $ make + +The output looks like: +output/images +├── imx28-ts7680.dtb +├── rootfs.ext2 +├── rootfs.ext4 -> rootfs.ext2 +├── rootfs.tar +├── sdcard.img +└── uImage + +The provided genimage configuration generates an image file containing +two partitions. The first one is unused, but mandatory as the +TS-7680 built-in bootloader loads the Linux uImage from the /boot +directory in the second partition. The second partition contains the +rootfs with the Linux uImage into the /boot directory. + + $ fdisk output/images/sdcard.img + output/images/sdcard.img1 1 1 1 512B 0 Empty + output/images/sdcard.img2 2 524289 524288 256M 83 Linux + +This image can be directly written to an SD card. + + $ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 + +To boot with Buildroot, insert this SD card on the board, make sure +the SD jumper is present and the U-Boot jumper is not. + +The bootloader comes pre-flashed on the board on an SPI flash. Since +updating the bootloader is risky and not trivial, it is not included +in the Buildroot defconfig. Refer to +https://wiki.embeddedarm.com/wiki/TS-7680#U-Boot for details on +which U-Boot config to use and how to flash it. diff --git a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch b/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch deleted file mode 100644 index 155154603..000000000 --- a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch +++ /dev/null @@ -1,88 +0,0 @@ -From b5e57a9f158a293b1151638336478af8a5aad0f0 Mon Sep 17 00:00:00 2001 -From: Jean-Christophe PLAGNIOL-VILLARD -Date: Wed, 14 Nov 2012 19:16:35 +0800 -Subject: [PATCH 1/5] watchdog: add keep alive support - -this will allow to ping the watchdog via poller - -Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD ---- - drivers/watchdog/Kconfig | 1 + - drivers/watchdog/wd_core.c | 21 +++++++++++++++++++++ - include/watchdog.h | 2 ++ - 3 files changed, 24 insertions(+) - -diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 2e2900c..0b4dc84 100644 ---- a/drivers/watchdog/Kconfig -+++ b/drivers/watchdog/Kconfig -@@ -4,6 +4,7 @@ config WATCHDOG_IMX_RESET_SOURCE - - menuconfig WATCHDOG - bool "Watchdog support" -+ select GENERIC_POLLER - help - Many platforms support a watchdog to keep track of a working machine. - This framework provides routines to handle these watchdogs. -diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c -index 3d0cfc6..a1b9e28 100644 ---- a/drivers/watchdog/wd_core.c -+++ b/drivers/watchdog/wd_core.c -@@ -17,18 +17,39 @@ - #include - #include - #include -+#include - - /* - * Note: this simple framework supports one watchdog only. - */ - static struct watchdog *watchdog; - -+static void watchdog_poller_func(struct poller_struct *poller) -+{ -+ watchdog->keep_alive(watchdog); -+} -+ -+static struct poller_struct watchdog_poller = { -+ .func = watchdog_poller_func, -+}; -+ - int watchdog_register(struct watchdog *wd) - { - if (watchdog != NULL) - return -EBUSY; - - watchdog = wd; -+ -+ if (watchdog->keep_alive) { -+ int ret; -+ -+ ret = poller_register(&watchdog_poller); -+ if (ret) { -+ watchdog = NULL; -+ return ret; -+ } -+ } -+ - return 0; - } - EXPORT_SYMBOL(watchdog_register); -diff --git a/include/watchdog.h b/include/watchdog.h -index 3e2d08e..d5ecf2f 100644 ---- a/include/watchdog.h -+++ b/include/watchdog.h -@@ -13,8 +13,10 @@ - #ifndef INCLUDE_WATCHDOG_H - # define INCLUDE_WATCHDOG_H - -+ - struct watchdog { - int (*set_timeout)(struct watchdog *, unsigned); -+ void (*keep_alive)(struct watchdog *); - }; - - int watchdog_register(struct watchdog *); --- -1.8.1.4 - diff --git a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch b/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch deleted file mode 100644 index 1ca87695a..000000000 --- a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch +++ /dev/null @@ -1,228 +0,0 @@ -From e1d54ffb987c346c45c20968be34c50c62a91c07 Mon Sep 17 00:00:00 2001 -From: Jean-Christophe PLAGNIOL-VILLARD -Date: Wed, 14 Nov 2012 19:17:47 +0800 -Subject: [PATCH 2/5] watchdog: add at91sam9 watchdog support - -with keep alive support - -Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD ---- - drivers/watchdog/Kconfig | 7 +++ - drivers/watchdog/Makefile | 1 + - drivers/watchdog/at91sam9_wdt.c | 131 ++++++++++++++++++++++++++++++++++++++++ - drivers/watchdog/at91sam9_wdt.h | 38 ++++++++++++ - 4 files changed, 177 insertions(+) - create mode 100644 drivers/watchdog/at91sam9_wdt.c - create mode 100644 drivers/watchdog/at91sam9_wdt.h - -diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 0b4dc84..98a21d7 100644 ---- a/drivers/watchdog/Kconfig -+++ b/drivers/watchdog/Kconfig -@@ -11,6 +11,13 @@ menuconfig WATCHDOG - - if WATCHDOG - -+config WATCHDOG_AT91SAM9X -+ tristate "AT91SAM9X / AT91CAP9 watchdog" -+ depends on ARCH_AT91 -+ help -+ Watchdog timer embedded into AT91SAM9X and AT91CAP9 chips. This will -+ reboot your system when the timeout is reached. -+ - config WATCHDOG_MXS28 - bool "i.MX28" - depends on ARCH_IMX28 -diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile -index f522b88..3d15d52 100644 ---- a/drivers/watchdog/Makefile -+++ b/drivers/watchdog/Makefile -@@ -1,3 +1,4 @@ - obj-$(CONFIG_WATCHDOG) += wd_core.o -+obj-$(CONFIG_WATCHDOG_AT91SAM9X) += at91sam9_wdt.o - obj-$(CONFIG_WATCHDOG_MXS28) += im28wd.o - obj-$(CONFIG_WATCHDOG_IMX_RESET_SOURCE) += imxwd.o -diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c -new file mode 100644 -index 0000000..203d83a ---- /dev/null -+++ b/drivers/watchdog/at91sam9_wdt.c -@@ -0,0 +1,131 @@ -+/* -+ * (c) 2012 Juergen Beisert -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Note: this driver works for the i.MX28 SoC. It might work for the -+ * i.MX23 Soc as well, but is not tested yet. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "at91sam9_wdt.h" -+ -+struct at91sam9_wdt { -+ struct watchdog wdt; -+ void __iomem *base; -+}; -+ -+#define to_at91sam9_wdt(h) container_of(h, struct at91sam9_wdt, wdt) -+ -+#define wdt_read(at91wdt, field) \ -+ __raw_readl(at91wdt->base + field) -+#define wdt_write(at91wdt, field, val) \ -+ __raw_writel((val), at91wdt->base + field) -+ -+static void at91sam9_wdt_keep_alive(struct watchdog *wdt) -+{ -+ struct at91sam9_wdt *at91wdt = to_at91sam9_wdt(wdt); -+ -+ wdt_write(at91wdt, AT91_WDT_CR, AT91_WDT_KEY | AT91_WDT_WDRSTT); -+} -+ -+static int at91sam9_wdt_settimeout(struct watchdog *wdt, unsigned int timeout) -+{ -+ struct at91sam9_wdt *at91wdt = to_at91sam9_wdt(wdt); -+ unsigned int reg; -+ unsigned int mr; -+ -+ /* Check if disabled */ -+ mr = wdt_read(at91wdt, AT91_WDT_MR); -+ if (mr & AT91_WDT_WDDIS) { -+ pr_err("sorry, watchdog is disabled\n"); -+ return -EIO; -+ } -+ -+ if (!timeout) { -+ wdt_write(at91wdt, AT91_WDT_MR, AT91_WDT_WDDIS); -+ return 0; -+ } -+ -+ /* -+ * All counting occurs at SLOW_CLOCK / 128 = 256 Hz -+ * -+ * Since WDV is a 12-bit counter, the maximum period is -+ * 4096 / 256 = 16 seconds. -+ */ -+ reg = AT91_WDT_WDRSTEN /* causes watchdog reset */ -+ /* | AT91_WDT_WDRPROC causes processor reset only */ -+ | AT91_WDT_WDDBGHLT /* disabled in debug mode */ -+ | AT91_WDT_WDD /* restart at any time */ -+ | (timeout & AT91_WDT_WDV); /* timer value */ -+ wdt_write(at91wdt, AT91_WDT_MR, reg); -+ -+ return 0; -+} -+ -+static int at91sam9_wdt_probe(struct device_d *dev) -+{ -+ struct at91sam9_wdt *priv; -+ struct watchdog *wdt; -+ int ret; -+ unsigned int mr; -+ -+ priv = xzalloc(sizeof(struct at91sam9_wdt)); -+ priv->base = dev_request_mem_region(dev, 0); -+ wdt = &priv->wdt; -+ -+ wdt->set_timeout = at91sam9_wdt_settimeout; -+ wdt->keep_alive = at91sam9_wdt_keep_alive; -+ -+ /* Check if disabled */ -+ mr = wdt_read(priv, AT91_WDT_MR); -+ if (mr & AT91_WDT_WDDIS) { -+ dev_err(dev, "sorry, watchdog is disabled\n"); -+ ret = -EIO; -+ goto err; -+ } -+ -+ ret = watchdog_register(wdt); -+ if (ret != 0) -+ goto err; -+ -+ dev->priv = priv; -+ return 0; -+ -+err: -+ free(priv); -+ return ret; -+} -+ -+static void at91sam9_wdt_remove(struct device_d *dev) -+{ -+ struct at91sam9_wdt *priv= dev->priv; -+ watchdog_deregister(&priv->wdt); -+ free(priv); -+} -+ -+static struct driver_d at91sam9_wdt_driver = { -+ .name = "at91sam9_wdt", -+ .probe = at91sam9_wdt_probe, -+ .remove = at91sam9_wdt_remove, -+}; -+ -+static int at91sam9_wdt_init(void) -+{ -+ return platform_driver_register(&at91sam9_wdt_driver); -+} -+coredevice_initcall(at91sam9_wdt_init); -diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h -new file mode 100644 -index 0000000..2b68c1a ---- /dev/null -+++ b/drivers/watchdog/at91sam9_wdt.h -@@ -0,0 +1,38 @@ -+/* -+ * drivers/watchdog/at91sam9_wdt.h -+ * -+ * Copyright (C) 2007 Andrew Victor -+ * Copyright (C) 2007 Atmel Corporation. -+ * -+ * Watchdog Timer (WDT) - System peripherals regsters. -+ * Based on AT91SAM9261 datasheet revision D. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ */ -+ -+#ifndef AT91_WDT_H -+#define AT91_WDT_H -+ -+#define AT91_WDT_CR 0x00 /* Watchdog Control Register */ -+#define AT91_WDT_WDRSTT (1 << 0) /* Restart */ -+#define AT91_WDT_KEY (0xa5 << 24) /* KEY Password */ -+ -+#define AT91_WDT_MR 0x04 /* Watchdog Mode Register */ -+#define AT91_WDT_WDV (0xfff << 0) /* Counter Value */ -+#define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */ -+#define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */ -+#define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */ -+#define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */ -+#define AT91_WDT_WDD (0xfff << 16) /* Delta Value */ -+#define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */ -+#define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */ -+ -+#define AT91_WDT_SR 0x08 /* Watchdog Status Register */ -+#define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */ -+#define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */ -+ -+ -+#endif --- -1.8.1.4 - diff --git a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch b/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch deleted file mode 100644 index bf9720030..000000000 --- a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3338bcb05479f1149420d4a0ea3904cb9e42eef5 Mon Sep 17 00:00:00 2001 -From: Jean-Christophe PLAGNIOL-VILLARD -Date: Wed, 14 Nov 2012 19:18:22 +0800 -Subject: [PATCH 3/5] at91sam9260/9g20: add wathdog support - -Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD ---- - arch/arm/mach-at91/at91sam9260_devices.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c -index 1c375ee..5885f91 100644 ---- a/arch/arm/mach-at91/at91sam9260_devices.c -+++ b/arch/arm/mach-at91/at91sam9260_devices.c -@@ -10,6 +10,7 @@ - * - */ - #include -+#include - #include - #include - #include -@@ -397,3 +398,14 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) - #else - void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {} - #endif -+ -+#ifdef CONFIG_WATCHDOG_AT91SAM9X -+static int at91_add_device_watchdog(void) -+{ -+ add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL, -+ AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL); -+ -+ return 0; -+} -+coredevice_initcall(at91_add_device_watchdog); -+#endif --- -1.8.1.4 - diff --git a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch b/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch deleted file mode 100644 index cdfd026ad..000000000 --- a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e03bf0e3ad24898019b89eb9a6935d159c60268f Mon Sep 17 00:00:00 2001 -From: Fabio Porcedda -Date: Thu, 17 Jan 2013 11:32:35 +0100 -Subject: [PATCH 4/5] at91sam9260/9g20: fix wathdog support - -Signed-off-by: Fabio Porcedda ---- - arch/arm/mach-at91/at91sam9260_devices.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c -index 5885f91..df675d2 100644 ---- a/arch/arm/mach-at91/at91sam9260_devices.c -+++ b/arch/arm/mach-at91/at91sam9260_devices.c -@@ -403,7 +403,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {} - static int at91_add_device_watchdog(void) - { - add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL, -- AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL); -+ AT91_BASE_WDT, 16, IORESOURCE_MEM, NULL); - - return 0; - } --- -1.8.1.4 - diff --git a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch b/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch deleted file mode 100644 index 837e8c632..000000000 --- a/buildroot/board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 98c96ea36a4b3bb9b92dde849db5e8d6918b5168 Mon Sep 17 00:00:00 2001 -From: Fabio Porcedda -Date: Thu, 17 Jan 2013 11:32:59 +0100 -Subject: [PATCH 5/5] watchdog: enable for evk-pro3 - -Signed-off-by: Fabio Porcedda ---- - arch/arm/configs/telit_evk_pro3_defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig -index 050d176..436cecf 100644 ---- a/arch/arm/configs/telit_evk_pro3_defconfig -+++ b/arch/arm/configs/telit_evk_pro3_defconfig -@@ -68,6 +68,8 @@ CONFIG_MCI_ATMEL=y - CONFIG_LED=y - CONFIG_LED_GPIO=y - CONFIG_LED_TRIGGERS=y -+CONFIG_WATCHDOG=y -+CONFIG_WATCHDOG_AT91SAM9X=y - CONFIG_FS_TFTP=y - CONFIG_FS_FAT=y - CONFIG_FS_FAT_LFN=y --- -1.8.1.4 - diff --git a/buildroot/board/telit/evk-pro3/linux-3.9.config b/buildroot/board/telit/evk-pro3/linux-3.9.config deleted file mode 100644 index 99c2f2d2b..000000000 --- a/buildroot/board/telit/evk-pro3/linux-3.9.config +++ /dev/null @@ -1,201 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_SOC_AT91SAM9260=y -CONFIG_SOC_AT91SAM9263=y -CONFIG_SOC_AT91SAM9G45=y -CONFIG_SOC_AT91SAM9X5=y -CONFIG_SOC_AT91SAM9N12=y -CONFIG_MACH_AT91SAM_DT=y -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y -CONFIG_AT91_TIMER_HZ=128 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT_6RD=y -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_PROC_DEVICETREE=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_ATMEL_PWM=y -CONFIG_ATMEL_TCLIB=y -CONFIG_EEPROM_93CX6=m -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_MACB=y -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_DAVICOM_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_PINCTRL_AT91=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_AT91SAM9X_WATCHDOG=y -CONFIG_SSB=m -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_ATMEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_ATMEL_LCDC=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_FONT_MINI_4x6=y -CONFIG_LOGO=y -# CONFIG_HID_SUPPORT is not set -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_GADGET=y -CONFIG_USB_AT91=m -CONFIG_USB_ATMEL_USBA=m -CONFIG_USB_ETH=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_ACM_MS=m -CONFIG_USB_G_MULTI=m -CONFIG_USB_G_MULTI_CDC=y -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_RTC_DRV_AT91SAM9=y -CONFIG_DMADEVICES=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_FANOTIFY=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_CRC_ITU_T=m -CONFIG_CRC7=m -CONFIG_AVERAGE=y diff --git a/buildroot/board/telit/evk-pro3/readme.txt b/buildroot/board/telit/evk-pro3/readme.txt deleted file mode 100644 index ace9dd4c1..000000000 --- a/buildroot/board/telit/evk-pro3/readme.txt +++ /dev/null @@ -1,28 +0,0 @@ -Buildroot board support for Telit EVK-PRO3 with Telit GE863-PRO3 - -Official site: - http://www.telit.com/en/products.php?p_id=3&p_ac=show&p=10 - -Build images: - make telit_evk_pro3_defconfig - make - - images built: - - output/images/barebox.bin - - output/images/zImage - - output/images/rootfs.ubi - - -Flash built images: - The first time you need to bootstrap from Telit Official Release 221.07.1007, - at the U-Boot prompt type: - U-Boot> loadb - send buildroot/output/images/barebox.bin - U-Boot> go 0x20200000 - - flash updated images using barebox through tftp: - barebox:/ erase dev/self0; cp /mnt/tftp/barebox.bin /dev/self0 - barebox:/ erase /dev/nand0.kernel.bb; cp /mnt/tftp/zImage /dev/nand0.kernel.bb - barebox:/ erase /dev/nand0.rootfs.bb; cp /mnt/tftp/rootfs.ubi /dev/nand0.rootfs.bb - barebox:/ erase dev/env0 - barebox:/ reset diff --git a/buildroot/board/toradex/apalis-imx6/genimage.cfg b/buildroot/board/toradex/apalis-imx6/genimage.cfg new file mode 100644 index 000000000..fe359bd93 --- /dev/null +++ b/buildroot/board/toradex/apalis-imx6/genimage.cfg @@ -0,0 +1,15 @@ +# Minimal SD card image for the Toradex Apalis i.MX6 COM +# +# It does not need a boot section for a bootloader since it is booted +# from its internal flash memory (eMMC). + +image sdcard.img { + hdimage { + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + size = 512M + } +} diff --git a/buildroot/board/toradex/apalis-imx6/post-image.sh b/buildroot/board/toradex/apalis-imx6/post-image.sh new file mode 100755 index 000000000..2b49f9d3d --- /dev/null +++ b/buildroot/board/toradex/apalis-imx6/post-image.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +GENIMAGE_CFG="$(dirname $0)/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +# copy the uEnv.txt to the output/images directory +cp board/toradex/apalis-imx6/uEnv.txt $BINARIES_DIR/uEnv.txt + +rm -rf "${GENIMAGE_TMP}" + +# generate rootfs.img +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +RET=${?} +exit ${RET} diff --git a/buildroot/board/toradex/apalis-imx6/readme.txt b/buildroot/board/toradex/apalis-imx6/readme.txt new file mode 100644 index 000000000..feddad641 --- /dev/null +++ b/buildroot/board/toradex/apalis-imx6/readme.txt @@ -0,0 +1,53 @@ +Toradex Apalis i.MX6 Computer on Module + +Intro +===== + +The Apalis iMX6 is a small form-factor Computer on Module that comes +in both quad core and dual core versions based on Freescale i.MX6Q and +Freescale i.MX6D SoCs respectively. The Cortex A9 quad core and dual +core CPU peaks at 1 GHz for commercial temperature variant, while the +industrial temperature variant has a peak frequency of 800 MHz. + +https://www.toradex.com/computer-on-modules/apalis-arm-family/freescale-imx-6 + +It supports two carrier boards: + +Apalis Evaluation Board +https://www.toradex.com/products/carrier-boards/apalis-evaluation-board + +Ixora Carrier Board +https://www.toradex.com/products/carrier-boards/ixora-carrier-board + +How to build it +=============== + +Configure Buildroot: + + $ make toradex_apalis_imx6_defconfig + +Compile everything and build the rootfs image: + + $ make + +How to boot the image +===================== + +The board only boots from its internal flash memory eMMC, so the +bootloader image should be copied to it, following the procedures +described in Toradex website. + +http://developer.toradex.com/knowledge-base/flashing-linux-on-imx6-modules + +Buildroot prepares a "sdcard.img" in output/images/ with the kernel +image, device tree and a root filesystem, ready to be dumped on an SD +card. + + $ dd if=output/images/sdcard.img of=/dev/sdX bs=1M + +To boot from the SD card, you should change the U-Boot +environment. Since U-Boot is running from internal eMMC, you will need +to access its command line prompt and manually set the necessary +variables to boot from the external SD card. For convenience, you can +use uEnv.txt provided in output/images/ as a reference to create the +necessary U-Boot variables to boot from the SD card. diff --git a/buildroot/board/toradex/apalis-imx6/uEnv.txt b/buildroot/board/toradex/apalis-imx6/uEnv.txt new file mode 100644 index 000000000..96ab80cfb --- /dev/null +++ b/buildroot/board/toradex/apalis-imx6/uEnv.txt @@ -0,0 +1,6 @@ +boot_file=zImage +fdt_file=imx6q-apalis_v1_0-ixora.dtb +sdargs=ip=off root=/dev/mmcblk1p1 rw,noatime rootfstype=ext4 rootwait +sddtbload=ext2load mmc 2:1 ${fdt_addr_r} boot/${fdt_file} +sdkernelload=ext2load mmc 2:1 ${kernel_addr_r} boot/${boot_file} +bootcmd=run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs}; echo Booting from SD card...; run sddtbload; run sdkernelload; bootz ${kernel_addr_r} - ${fdt_addr_r} diff --git a/buildroot/board/ts/ts5x00/linux-3.17.config b/buildroot/board/ts/ts5x00/linux-3.17.config deleted file mode 100644 index 60cd8a0fe..000000000 --- a/buildroot/board/ts/ts5x00/linux-3.17.config +++ /dev/null @@ -1,113 +0,0 @@ -CONFIG_PARTITION_ADVANCED=y -# CONFIG_X86_EXTENDED_PLATFORM is not set -CONFIG_MELAN=y -CONFIG_X86_GENERIC=y -CONFIG_X86_REBOOTFIXUPS=y -CONFIG_NOHIGHMEM=y -# CONFIG_COMPACTION is not set -# CONFIG_BOUNCE is not set -# CONFIG_CROSS_MEMORY_ATTACH is not set -# CONFIG_RELOCATABLE is not set -# CONFIG_SUSPEND is not set -# CONFIG_ACPI is not set -CONFIG_CPU_IDLE=y -CONFIG_TS5500=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_BLK_DEV is not set -CONFIG_BLK_DEV_SD=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -# CONFIG_ATA_VERBOSE_ERROR is not set -# CONFIG_SATA_PMP is not set -CONFIG_ATA_GENERIC=y -CONFIG_PATA_LEGACY=y -CONFIG_NETDEVICES=y -# CONFIG_NET_CORE is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NET_VENDOR_ADAPTEC is not set -# CONFIG_NET_VENDOR_ALTEON is not set -# CONFIG_NET_VENDOR_AMD is not set -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_ATHEROS is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_BROCADE is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CISCO is not set -CONFIG_NET_TULIP=y -CONFIG_DM9102=y -# CONFIG_NET_VENDOR_DLINK is not set -# CONFIG_NET_VENDOR_EMULEX is not set -# CONFIG_NET_VENDOR_EXAR is not set -# CONFIG_NET_VENDOR_HP is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MELLANOX is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MYRI is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_NVIDIA is not set -# CONFIG_NET_VENDOR_OKI is not set -# CONFIG_NET_PACKET_ENGINE is not set -# CONFIG_NET_VENDOR_QLOGIC is not set -# CONFIG_NET_VENDOR_REALTEK is not set -# CONFIG_NET_VENDOR_RDC is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SILAN is not set -# CONFIG_NET_VENDOR_SIS is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_SUN is not set -# CONFIG_NET_VENDOR_TEHUTI is not set -# CONFIG_NET_VENDOR_TI is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_PHYLIB=y -CONFIG_DAVICOM_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_SERIAL_8250=y -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -CONFIG_GPIOLIB=y -CONFIG_GPIO_TS5500=y -CONFIG_SENSORS_MAX197=y -CONFIG_WATCHDOG=y -CONFIG_SC520_WDT=y -CONFIG_USB=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -# CONFIG_X86_PLATFORM_DEVICES is not set -# CONFIG_IOMMU_SUPPORT is not set -# CONFIG_DMIID is not set -CONFIG_EXT4_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -# CONFIG_VIRTUALIZATION is not set -CONFIG_XZ_DEC=y diff --git a/buildroot/board/ts/ts5x00/readme.txt b/buildroot/board/ts/ts5x00/readme.txt deleted file mode 100644 index 1e5068298..000000000 --- a/buildroot/board/ts/ts5x00/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -Technologic Systems TS-5x00 SBCs -================================ - -This document explains how to set up a basic Buildroot system for the -Technologic Systems TS-5x00 serie of x86-based Single Board Computers. - -TS-5x00 Single Board Computers are based on the AMD Elan520 processor. For more -information please have a look at http://wiki.embeddedarm.com/wiki/#AMD - -The kernel configuration works for any AMD Elan520-based SBCs, but the support -is enhanced for the TS-5500 and TS-5400 models (on-board devices registration -and additional sysfs attributes under /sys/devices/platform/). - -To build the default configuration you only have to: - - $ make ts5x00_defconfig - $ make - -You will need a Compact Flash card of sufficient size and the first or only -partition configured as Linux type, with the bootable flag. - -You can transfer the system on the partition then optionally resize it with: - - # dd if=output/images/rootfs.ext4 of=/dev/sdX1 - # resize2fs /dev/sdX1 - -Or you can just extract the root filesystem to the partition with: - - # mount /dev/sdX1 /mnt - # tar -pxf output/images/rootfs.tar -C /mnt - # umount /mnt - -To install the bootloader, you will need to copy the MBR: - - # cat output/images/syslinux/mbr.bin > /dev/sdX - -Then install SYSLINUX in the mounted partition: - - # mount /dev/sdX1 /mnt - # output/host/sbin/extlinux --install /mnt/boot/syslinux - # umount /mnt - -IMPORTANT: In order for the board to boot the Compact Flash with a recent -config, the BIOS must use Logical Block Addressing (LBA). You can do it by -choosing "Ide 0: AUTOCONFIG, LBA" under "IDE DRIVE GEOMETRY" in the "Basic CMOS -Configuration" screen. Also, don't forget to set the 'active' (or 'bootable') -flag on partition 1. For details about the CMOS setup, please see: -http://wiki.embeddedarm.com/wiki/TS-5500#System_BIOS_Setup_Screens - -Connect a terminal program to the rs232 connector marked "COM2" -with baudrate set to 115200, insert the Compact Flash card into the socket, -power up the board, and enjoy. diff --git a/buildroot/board/udoo/mx6qdl/linux.fragment b/buildroot/board/udoo/mx6qdl/linux.fragment new file mode 100644 index 000000000..1d2509982 --- /dev/null +++ b/buildroot/board/udoo/mx6qdl/linux.fragment @@ -0,0 +1 @@ +# CONFIG_USB is not set diff --git a/buildroot/board/udoo/mx6qdl/readme.txt b/buildroot/board/udoo/mx6qdl/readme.txt new file mode 100644 index 000000000..cf1a61042 --- /dev/null +++ b/buildroot/board/udoo/mx6qdl/readme.txt @@ -0,0 +1,17 @@ +Udoo MX6Q/DL board + +For information about MX6 Udoo boards: +http://www.udoo.org/ + +To build a minimal support for these boards: + + $ make mx6udoo_defconfig + $ make + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a micro SD card: + +dd if=output/images/sdcard.img of=/dev/ + +For details about the medium image layout, see the definition in +board/udoo/mx6qdl/genimage.cfg. diff --git a/buildroot/board/udoo/neo/boot.scr.txt b/buildroot/board/udoo/neo/boot.scr.txt new file mode 100644 index 000000000..7a8aa4bd5 --- /dev/null +++ b/buildroot/board/udoo/neo/boot.scr.txt @@ -0,0 +1,7 @@ +setenv finduuid "part uuid mmc 0:1 uuid" +run finduuid +run findfdt +setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4" +load mmc 0:1 ${fdt_addr} boot/${fdtfile} +load mmc 0:1 ${loadaddr} boot/zImage +bootz ${loadaddr} - ${fdt_addr} diff --git a/buildroot/board/udoo/neo/genimage.cfg b/buildroot/board/udoo/neo/genimage.cfg new file mode 100644 index 000000000..46209120f --- /dev/null +++ b/buildroot/board/udoo/neo/genimage.cfg @@ -0,0 +1,32 @@ +# Minimal SD card image for the MX6SX Udoo Neo board +# +# The SD card must have at least 1 MB free at the beginning. +# U-Boot and its environment are dumped as is. +# A single root filesystem partition is required (Ext4 in this case). +# +# For details about the layout, see: +# http://wiki.wandboard.org/index.php/Boot-process + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1K + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.img" + offset = 69K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + size = 512M + } +} diff --git a/buildroot/board/udoo/neo/post-build.sh b/buildroot/board/udoo/neo/post-build.sh new file mode 100755 index 000000000..6ccd87faf --- /dev/null +++ b/buildroot/board/udoo/neo/post-build.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -d -m 755 $TARGET_DIR/boot +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ + -n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr diff --git a/buildroot/board/udoo/neo/post-image.sh b/buildroot/board/udoo/neo/post-image.sh new file mode 100755 index 000000000..18e76aa40 --- /dev/null +++ b/buildroot/board/udoo/neo/post-image.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + diff --git a/buildroot/board/udoo/neo/readme.txt b/buildroot/board/udoo/neo/readme.txt new file mode 100644 index 000000000..f037ad484 --- /dev/null +++ b/buildroot/board/udoo/neo/readme.txt @@ -0,0 +1,16 @@ +MX6X Udoo Neo board + +http://www.udoo.org/udoo-neo/ + +To build a minimal support for these boards: + + $ make mx6sx_udoo_neo_defconfig + $ make + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on an SD card: + +dd if=output/images/sdcard.img of=/dev/ + +For details about the medium image layout, see the definition in +board/udoo/neo/genimage.cfg. diff --git a/buildroot/board/wandboard/boot.scr.txt b/buildroot/board/wandboard/boot.scr.txt new file mode 100644 index 000000000..7a8aa4bd5 --- /dev/null +++ b/buildroot/board/wandboard/boot.scr.txt @@ -0,0 +1,7 @@ +setenv finduuid "part uuid mmc 0:1 uuid" +run finduuid +run findfdt +setenv bootargs "console=ttymxc0,115200 root=PARTUUID=${uuid} rootwait rootfstype=ext4" +load mmc 0:1 ${fdt_addr} boot/${fdtfile} +load mmc 0:1 ${loadaddr} boot/zImage +bootz ${loadaddr} - ${fdt_addr} diff --git a/buildroot/board/wandboard/genimage.cfg b/buildroot/board/wandboard/genimage.cfg new file mode 100644 index 000000000..ad4a6a55d --- /dev/null +++ b/buildroot/board/wandboard/genimage.cfg @@ -0,0 +1,32 @@ +# Minimal SD card image for the Wandboard +# +# The SD card must have at least 1 MB free at the beginning. +# U-Boot and its environment are dumped as is. +# A single root filesystem partition is required (Ext4 in this case). +# +# For details about the layout, see: +# http://wiki.wandboard.org/index.php/Boot-process + +image sdcard.img { + hdimage { + } + + partition spl { + in-partition-table = "no" + image = "SPL" + offset = 1024 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.img" + offset = 70656 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + offset = 1M + size = 512M + } +} diff --git a/buildroot/board/wandboard/post-build.sh b/buildroot/board/wandboard/post-build.sh new file mode 100755 index 000000000..6ddc11370 --- /dev/null +++ b/buildroot/board/wandboard/post-build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +BOARD_DIR="$(dirname $0)" + +install -d -m 755 $TARGET_DIR/boot + +$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \ + -n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr diff --git a/buildroot/board/wandboard/readme.txt b/buildroot/board/wandboard/readme.txt index 4dd9c2c7f..adc4e5c19 100644 --- a/buildroot/board/wandboard/readme.txt +++ b/buildroot/board/wandboard/readme.txt @@ -1,37 +1,14 @@ -Minimal board support for the Wandboard +Wandboard -Wandboard's homepage is here: http://www.wandboard.org/ +http://www.wandboard.org -This config is only tested with the dual core wandboard. +To build a minimal support for this board: -Installing: + $ make wandboard_defconfig + $ make -You need a micro SD card and a slot/adapter for your development machine. - -Partition the SD card leaving at least 1 MB in front of the first partition. - -Partition layout (example): - -Disk /dev/sdi: 3965 MB, 3965190144 bytes -255 heads, 63 sectors/track, 482 cylinders -Units = cylinders of 16065 * 512 = 8225280 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk identifier: 0x77b47445 - - Device Boot Start End Blocks Id System -/dev/sdi1 2 482 3863632+ 83 Linux - -Copy u-boot and its environment to the SD card: -sudo dd if=output/images/u-boot.imx bs=512 seek=2 of=/dev/sd -sudo dd if=output/images/uboot-env.bin bs=512 seek=768 of=/dev/sd - -Copy the root filesystem: -sudo dd if=output/images/rootfs.ext2 of=/dev/sd1 - -Alternative commands to copy root filesystem: -sudo mkfs.ext4 /dev/sd1 -sudo mount /dev/sd1 /mnt -sudo tar xf output/images/rootfs.tar -C /mnt -sudo umount /mnt +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on an SD card. +For details about the medium image layout, see the definition in +board/wandboard/genimage.cfg. diff --git a/buildroot/board/wandboard/uboot-env.txt b/buildroot/board/wandboard/uboot-env.txt deleted file mode 100644 index 7ca2b1a85..000000000 --- a/buildroot/board/wandboard/uboot-env.txt +++ /dev/null @@ -1,20 +0,0 @@ -baudrate=115200 -bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi -bootdelay=3 -bootscript=echo Running bootscript from mmc ...; source -console=ttymxc0 -ethact=FEC -ethaddr=00:1f:7b:b2:05:ee -ethprime=FEC -loadaddr=0x12000000 -loadbootscript=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script}; -loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage} -mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} -mmcboot=echo Booting from mmc ...; run mmcargs; bootm; -mmcdev=0 -mmcpart=1 -mmcroot=/dev/mmcblk0p1 rootwait rw -netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp -netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi; -script=boot/boot.scr -uimage=boot/uImage diff --git a/buildroot/board/warp7/readme.txt b/buildroot/board/warp7/readme.txt new file mode 100644 index 000000000..aff7a601e --- /dev/null +++ b/buildroot/board/warp7/readme.txt @@ -0,0 +1,118 @@ +***************** +Warp i.MX7S board +***************** + +This file documents the Buildroot support for the Warp i.MX7S board. + +Build +===== + +First, configure Buildroot for the Warp i.MX7S board: + + make warp7_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - imx7s-warp.dtb + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot-dtb.imx + - zImage + +Flash the eMMC image +==================== + +In the U-Boot prompt lauch: + +=> ums 0 mmc 0 + +This will mount the eMMC content in the host PC as a mass storage device. + +To determine the device associated to the eMMC have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped into the eMMC. Launch the following +command: + +sudo dd if=output/images/sdcard.img of=/dev/ + +*** WARNING! This will destroy all the eMMC content. Use it with care! *** + +For details about the medium image layout, see the definition in +board/warp7/genimage.cfg. + +How to recover from a bad eMMC image +==================================== + +In case a bad U-Boot has been flashed to the eMMC and the board no +longer boots, it is possible to recover using the imx_usb_loader utility. + +Put the warp7 board in USB download mode by removing the CPU board +from the base board then putting switch 2 in the upper position. + +Connect a USB to serial adapter between the host PC and warp7 serial +USB port, and also a USB cable between the OTG warp7 port and the host +PC. + +Copy u-boot-dtb.imx to the imx_usb_loader folder. + +Load u-boot-dtb.imx via USB: + +$ sudo ./imx_usb u-boot-dtb.imx + +Then U-Boot should start and its messages will appear in the console program. + +Open a terminal program such as minicom. + +Use the default environment variables: + +=> env default -f -a +=> saveenv + +Run the DFU command: +=> dfu 0 mmc 0 + +Transfer u-boot-dtb.imx that will be flashed into the eMMC: + +$ sudo dfu-util -D u-boot-dtb.imx -a boot + +Then on the U-Boot prompt the following message should be seen after a +successful upgrade: + +#DOWNLOAD ... OK +Ctrl+C to exit ... + +=> ums 0 mmc 0 + +sudo dd if=output/images/sdcard.img of=/dev/ + +Put warp7 back in eMMC boot mode by placing switch 2 in the lower position +and reboot the board. + +Boot the Warp i.MX7S board +========================== + +To boot your newly created system: +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Using Wifi +========== + +# modprobe brcmfmac +# iwconfig wlan0 essid ACCESSPOINTNAME +# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf +(enter the wifi password and press enter) +# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf & +# udhcpc -i wlan0 +# ping buildroot.org + +Enjoy! diff --git a/buildroot/board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt b/buildroot/board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file mode 100644 index 000000000..a1dc20352 --- /dev/null +++ b/buildroot/board/warp7/rootfs_overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt @@ -0,0 +1,42 @@ +# 2.4 GHz, 20 MHz BW mode +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1202 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +nocrc=1 +ag0=0 +aa2g=1 +ccode=ALL +#pa0itssit=0x20 +extpagain2g=0 +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 +maxp2ga0=90 +#txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +papdmode=1 +papdvalidtest=1 +pacalidx2g=48 +papdepsoffset=-22 +papdendidx=58 +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b +#muxenab=0x10 +#BT COEX deferral limit setting +#btc_params 8 45000 +#btc_params 10 20000 +#spurconfig=0x3 diff --git a/buildroot/board/zynq/genimage.cfg b/buildroot/board/zynq/genimage.cfg new file mode 100644 index 000000000..76e61c3a0 --- /dev/null +++ b/buildroot/board/zynq/genimage.cfg @@ -0,0 +1,25 @@ +image boot.vfat { + vfat { + files = { + "boot.bin", + "u-boot.img", + "devicetree.dtb", + "uImage" + } + file uramdisk.image.gz { + image = "rootfs.cpio.uboot" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } +} diff --git a/buildroot/board/zynq/post-image.sh b/buildroot/board/zynq/post-image.sh new file mode 100755 index 000000000..0cf92e0aa --- /dev/null +++ b/buildroot/board/zynq/post-image.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# By default U-Boot loads DTB from a file named "devicetree.dtb", so +# let's use a symlink with that name that points to the *first* +# devicetree listed in the config. + +FIRST_DT=$(sed -n \ + 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \ + ${BR2_CONFIG}) + +[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/devicetree.dtb + +support/scripts/genimage.sh -c board/zynq/genimage.cfg diff --git a/buildroot/board/zynq/readme.txt b/buildroot/board/zynq/readme.txt new file mode 100644 index 000000000..162734963 --- /dev/null +++ b/buildroot/board/zynq/readme.txt @@ -0,0 +1,86 @@ +This is the Buildroot support for Zynq boards. Zynq boards are available from +Xilinx and some third party vendors, but the build procedure is very similar. + +Currently, three boards are natively supported by Buildroot: + - Xilinx ZC706 board (zynq_zc706_defconfig) + - Avnet ZedBoard (zynq_zed_defconfig) + - Avnet MicroZed (zynq_microzed_defconfig) + +Steps to create a working system for a Zynq board: + +1) Configuration (do one of the following) + make zynq_zc706_defconfig (ZC706) + make zynq_zed_defconfig (Zedboard) + make zynq_microzed_defconfig (MicroZed) +2) make +3) All needed files will be available in the output/images directory. + The sdcard.img file is a complete bootable image ready to be written + on the boot medium. To install it, simply copy the image to an SD + card: + + # dd if=output/images/sdcard.img of=/dev/sdX + + Where 'sdX' is the device node of the uSD. +4) boot your board + +You can alter the booting procedure by creating a file uEnv.txt +in the root of the SD card. It is a plain text file in format += one per line: + +kernel_image=myimage +modeboot=myboot +myboot=... + +Note: +The DTB for MicroZed is the same as the one for the Zedboard (zynq-zed.dtb), +and this is the recommended solution, see +https://forums.xilinx.com/t5/Embedded-Linux/Microzed-default-device-tree-dts/td-p/432856. + +References: + - ZC706 information including schematics, reference designs, and manuals are + available from + http://www.xilinx.com/products/boards-and-kits/ek-z7-zc706-g.html. + + - Zedboard/Microzed information including schematics, reference designs, and + manuals are available from http://www.zedboard.org . + +Support for other boards: + +If you want to build a system for other boards based on the same SoC +(for ex. Digilent Zybo board), and the board is already supported by +the upstream kernel and U-Boot, you simply need to change the +following Buildroot options: + + - Kernel Device Tree file name (BR2_LINUX_KERNEL_INTREE_DTS_NAME) + - U-Boot board defconfig (BR2_TARGET_UBOOT_BOARD_DEFCONFIG) + +Custom ps7_init_gpl.c/h support: + +To generate a working boot.bin image, ps7_init_gpl.c/h are required in +the U-Boot source tree. Without those files, boot.bin will be built +successfully but it will not be functional at all. Those files are +output from the Xilinx tools, but for convenience, U-Boot includes the +default ps7_init_gpl.c/h of popular boards. Those files may need to be +updated for any programmable logic customizations which impact +ps7_init (clock/pin setup & mapping/AXI bridge setup/etc). See +board/xilinx/zynq/ directory of U-Boot for natively supported ps7_init +files. If the ps7_init files for your board are not found in U-Boot, +you need to add them by yourself. + +1) Start with a defconfig supported by Buildroot (e.g. Zedboard) + make zynq_zed_defconfig + +2) make uboot-menuconfig + Visit the following menu and enable CONFIG_ZYNQ_CUSTOM_INIT. + + ARM architecture ---> + [*] Use custom ps7_init provided by Xilinx tool + +3) Copy ps7_init_gpl.c/h generated by the Xilinx tools into + output/build/uboot-xilinx-/board/xilinx/zynq/custom_hw_platform/ + +4) make + +Note: The files in step 3 will need to be re-copied after cleaning the +output directory and at this time, there is no way to save them as +part of the buildroot configuration, except as a U-Boot patch. diff --git a/buildroot/board/zynqmp/genimage.cfg b/buildroot/board/zynqmp/genimage.cfg new file mode 100644 index 000000000..30be086d7 --- /dev/null +++ b/buildroot/board/zynqmp/genimage.cfg @@ -0,0 +1,28 @@ +image boot.vfat { + vfat { + files = { + "boot.bin", + "u-boot.bin", + "atf-uboot.ub", + "system.dtb", + "Image" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/buildroot/board/zynqmp/patches/uboot/0001-arm64-zynqmp-zcu106-fix-SPL-MMC-booting.patch b/buildroot/board/zynqmp/patches/uboot/0001-arm64-zynqmp-zcu106-fix-SPL-MMC-booting.patch new file mode 100644 index 000000000..4d85e1bb1 --- /dev/null +++ b/buildroot/board/zynqmp/patches/uboot/0001-arm64-zynqmp-zcu106-fix-SPL-MMC-booting.patch @@ -0,0 +1,52 @@ +From e5d72ed8339eb05285448aad3c89d21e4d18fd29 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Mon, 26 Feb 2018 09:40:34 +0100 +Subject: [PATCH] arm64: zynqmp: zcu106: fix SPL MMC booting + +The U-Boot SPL generated with the current zcu106 defconfig cannot boot +from MMC: + + [...] + U-Boot SPL 2018.01 (Feb 21 2018 - 17:47:14) + EL Level: EL3 + Trying to boot from MMC1 + sdhci_transfer_data: Error detected in status(0x408020)! + spl_load_image_fat_os: error reading image u-boot.bin, err - -2 + spl_load_image_fat: error reading image u-boot.img, err - -6 + SPL: failed to boot from all boot devices + ### ERROR ### Please RESET the board ### + +Fix by lowering the rpll value. The new value for the RPLL_CTRL +register comes from the current psu_init_gpl.c from the HDF file at +https://github.com/xilinx/hdf-examples/tree/01ad8ea5fd1989abf4ea5a072d019a16cb2bc546/zcu106-zynqmp +(generated by Vivado v2017.4). + +RPLL and sdio1_ref clocks before and after this change: + + - Old values: RPLL 1.36 GHz, sdio1_ref 272 MHz + - New values: RPLL 1.16 GHz, sdio1_ref 233 MHz + +Signed-off-by: Luca Ceresoli +Cc: Michal Simek +Upstream-status: accepted upstream in a different form +--- + + board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c b/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c +index 4d18abe000ca..e6fa477e53e7 100644 +--- a/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c ++++ b/board/xilinx/zynqmp/zynqmp-zcu106-revA/psu_init_gpl.c +@@ -10,7 +10,7 @@ + static unsigned long psu_pll_init_data(void) + { + psu_mask_write(0xFF5E0034, 0xFE7FEDEFU, 0x7E4E2C62U); +- psu_mask_write(0xFF5E0030, 0x00717F00U, 0x00013C00U); ++ psu_mask_write(0xFF5E0030, 0x00717F00U, 0x00014600U); + psu_mask_write(0xFF5E0030, 0x00000008U, 0x00000008U); + psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000001U); + psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000000U); +-- +2.7.4 + diff --git a/buildroot/board/zynqmp/patches/uboot/0002-arm64-zynqmp-Enable-booting-to-ATF.patch b/buildroot/board/zynqmp/patches/uboot/0002-arm64-zynqmp-Enable-booting-to-ATF.patch new file mode 100644 index 000000000..487fff681 --- /dev/null +++ b/buildroot/board/zynqmp/patches/uboot/0002-arm64-zynqmp-Enable-booting-to-ATF.patch @@ -0,0 +1,114 @@ +From 5e3cac50cc981e01d9072241035a8d4162560c71 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Mon, 12 Mar 2018 17:18:38 +0100 +Subject: [PATCH] arm64: zynqmp: Enable booting to ATF + +U-Boot is now able to boot to ARM Trusted Firmware (ATF). The boot +flow is SPL(EL3) loads ATF and full u-boot and jump to ATF(EL3) which +pass control to full u-boot(EL2). This has been tested on zcu106, so +enable it in this defconfig. + +To generate an image that triggers this booting flow, you need to pass +'-O arm-trusted-firmware' to mkimage. + +Signed-off-by: Luca Ceresoli +Signed-off-by: Michal Simek +Backported from upstream: http://git.denx.de/?p=u-boot.git;a=commit;h=5e3cac50cc981e01d9072241035a8d4162560c71 +--- + + configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig | 1 + + configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 1 + + configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig | 1 + + configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig | 1 + + configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 1 + + configs/xilinx_zynqmp_zcu102_revA_defconfig | 1 + + configs/xilinx_zynqmp_zcu102_revB_defconfig | 1 + + 7 files changed, 7 insertions(+) + +diff --git a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig +index c5bfa2b12638..488c72258b0e 100644 +--- a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig ++++ b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig +@@ -19,6 +19,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_FASTBOOT=y + CONFIG_FASTBOOT_FLASH=y +diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig +index f86dce403a42..5d501eec0edd 100644 +--- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig ++++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig +@@ -20,6 +20,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_FASTBOOT=y + CONFIG_FASTBOOT_FLASH=y +diff --git a/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig b/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig +index 6e947cf56827..6f7eaebd7676 100644 +--- a/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig ++++ b/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig +@@ -16,6 +16,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_CMD_MEMTEST=y + CONFIG_SYS_ALT_MEMTEST=y +diff --git a/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig b/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig +index 1c934858c61c..7a3806cba4b5 100644 +--- a/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig ++++ b/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig +@@ -17,6 +17,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_CMD_MEMTEST=y + CONFIG_SYS_ALT_MEMTEST=y +diff --git a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig +index e13c7c56f310..e4408f182ca0 100644 +--- a/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig ++++ b/configs/xilinx_zynqmp_zcu102_rev1_0_defconfig +@@ -19,6 +19,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_FASTBOOT=y + CONFIG_FASTBOOT_FLASH=y +diff --git a/configs/xilinx_zynqmp_zcu102_revA_defconfig b/configs/xilinx_zynqmp_zcu102_revA_defconfig +index 5b2cd495ee85..b52f6789fd4b 100644 +--- a/configs/xilinx_zynqmp_zcu102_revA_defconfig ++++ b/configs/xilinx_zynqmp_zcu102_revA_defconfig +@@ -19,6 +19,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_FASTBOOT=y + CONFIG_FASTBOOT_FLASH=y +diff --git a/configs/xilinx_zynqmp_zcu102_revB_defconfig b/configs/xilinx_zynqmp_zcu102_revB_defconfig +index e6530fbfe7ff..80592554f682 100644 +--- a/configs/xilinx_zynqmp_zcu102_revB_defconfig ++++ b/configs/xilinx_zynqmp_zcu102_revB_defconfig +@@ -19,6 +19,7 @@ CONFIG_BOARD_EARLY_INIT_R=y + CONFIG_SPL_OS_BOOT=y + CONFIG_SPL_RAM_SUPPORT=y + CONFIG_SPL_RAM_DEVICE=y ++CONFIG_SPL_ATF=y + CONFIG_SYS_PROMPT="ZynqMP> " + CONFIG_FASTBOOT=y + CONFIG_FASTBOOT_FLASH=y +-- +2.7.4 + diff --git a/buildroot/board/zynqmp/patches/uboot/0003-arm64-zynqmp-accept-an-absolute-path-for-PMUFW_INIT_.patch b/buildroot/board/zynqmp/patches/uboot/0003-arm64-zynqmp-accept-an-absolute-path-for-PMUFW_INIT_.patch new file mode 100644 index 000000000..95ab7b3b7 --- /dev/null +++ b/buildroot/board/zynqmp/patches/uboot/0003-arm64-zynqmp-accept-an-absolute-path-for-PMUFW_INIT_.patch @@ -0,0 +1,68 @@ +From c7df098a71e05dc81cee818747759e8060b59626 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Mon, 4 Jun 2018 12:21:01 +0200 +Subject: [PATCH] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE + +The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus +forcing it to be a relative path inside the U-Boot source tree. Since +the PMUFW is a binary file generated outside of U-Boot, the PMUFW +binary must be copied inside the U-Boot source tree before the +build. + +This generates a few problems: + + * if the source tree is shared among different out-of-tree builds, + they will pollute (and potentially corrupt) each other + * the source tree cannot be read-only + * any buildsystem must add a command to copy the PMUFW binary + * putting an externally-generated binary in the source tree is ugly + as hell + +Avoid these problems by accepting an absolute path for +PMUFW_INIT_FILE. This would be as simple as removing the "$(srctree)/" +prefix, but in order to keep backward compatibility we rather use the +shell and readlink to get the absolute path even when starting from a +relative path. + +Since 'readlink -f' produces an empty string if the file does not +exist, we also add a check to ensure the file configured in +PMUFW_INIT_FILE exists. Otherwise the build would exit successfully, +but produce a boot.bin without PMUFW as if PMUFW_INIT_FILE were empty. + +Tested in the 12 possible combinations of: + - PMUFW_INIT_FILE empty, relative, absolute, non-existing + - building in-tree, in subdir, in other directory + +Signed-off-by: Luca Ceresoli +Cc: Michal Simek +Cc: Simon Glass +Cc: Emmanuel Vadot +Signed-off-by: Michal Simek +Backported from upstream: https://git.denx.de/?p=u-boot.git;a=commit;h=c7df098a71e05dc81cee818747759e8060b59626 +--- + scripts/Makefile.spl | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl +index ef018b5b4056..252f13826d4c 100644 +--- a/scripts/Makefile.spl ++++ b/scripts/Makefile.spl +@@ -167,8 +167,14 @@ ifdef CONFIG_ARCH_ZYNQ + MKIMAGEFLAGS_boot.bin = -T zynqimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) + endif + ifdef CONFIG_ARCH_ZYNQMP ++ifneq ($(CONFIG_PMUFW_INIT_FILE),"") ++spl/boot.bin: zynqmp-check-pmufw ++zynqmp-check-pmufw: FORCE ++ ( cd $(srctree) && test -r $(CONFIG_PMUFW_INIT_FILE) ) \ ++ || ( echo "Cannot read $(CONFIG_PMUFW_INIT_FILE)" && false ) ++endif + MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) \ +- -n $(srctree)/$(CONFIG_PMUFW_INIT_FILE) ++ -n "$(shell cd $(srctree); readlink -f $(CONFIG_PMUFW_INIT_FILE))" + endif + + spl/boot.bin: $(obj)/u-boot-spl.bin FORCE +-- +2.7.4 + diff --git a/buildroot/board/zynqmp/patches/uboot/0004-arm-arm64-zynq-zynqmp-pass-the-PS-init-file-as-a-kco.patch b/buildroot/board/zynqmp/patches/uboot/0004-arm-arm64-zynq-zynqmp-pass-the-PS-init-file-as-a-kco.patch new file mode 100644 index 000000000..b32e16278 --- /dev/null +++ b/buildroot/board/zynqmp/patches/uboot/0004-arm-arm64-zynq-zynqmp-pass-the-PS-init-file-as-a-kco.patch @@ -0,0 +1,175 @@ +From 4c9d54ab5a41d65000c8d249b6fb1b76056f1812 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Wed, 20 Jun 2018 12:11:50 +0200 +Subject: [PATCH] arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig + variable + +U-Boot needs to link ps7_init_gpl.c on Zynq or psu_init_gpl.c on +ZynqMP (PS init for short). The current logic to locate this file for +both platforms is: + + 1. if a board-specific file exists in + board/xilinx/zynq[mp]/$(CONFIG_DEFAULT_DEVICE_TREE)/ps?_init_gpl.c + then use it + 2. otherwise use board/xilinx/zynq/ps?_init_gpl.c + +In the latter case the file does not exist in the U-Boot sources and +must be copied in the source tree from the outside before starting the +build. This is typical when it is generated from Xilinx tools while +developing a custom hardware. However making sure that a +board-specific file is _not_ found (and used) requires some trickery +such as removing or overwriting all PS init files (e.g.: the current +meta-xilinx yocto layer [0]). + +This generates a few problems: + + * if the source tree is shared among different out-of-tree builds, + they will pollute (and potentially corrupt) each other + * the source tree cannot be read-only + * any buildsystem must add a command to copy the PS init file binary + * overwriting or deleting files in the source tree is ugly as hell + +Simplify usage by allowing to pass the path to the desired PS init +file in kconfig variable XILINX_PS_INIT_FILE. It can be an absolute +path or relative to $(srctree). If the variable is set, the +user-specified file will always be used without being copied +around. If the the variable is left empty, for backward compatibility +fall back to the old behaviour. + +Since the issue is the same for Zynq and ZynqMP, add one kconfig +variable in a common place and use it for both. + +Also use the new kconfig help text to document all the ways to give +U-Boot the PS init file. + +Build-tested with all combinations of: + - platform: zynq or zynqmp + - PS init file: from XILINX_PS_INIT_FILE (absolute, relative path, + non-existing), in-tree board-specific, in board/xilinx/zynq[mp]/ + - building in-tree, in subdir, in other directory + +[0] https://github.com/Xilinx/meta-xilinx/blob/b2f74cc7fe5c4881589d5e440a17cb51fc66a7ab/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc#L9 + +Signed-off-by: Luca Ceresoli +Cc: Albert Aribaud +Cc: Michal Simek +Cc: Nathan Rossi +Backported from upstream: https://git.denx.de/?p=u-boot.git;a=commit;h=6da4f67ad09cd8b311d77b2b04e557b7ef65b56c +--- + arch/arm/Kconfig | 1 + + board/xilinx/Kconfig | 41 +++++++++++++++++++++++++++++++++++++++++ + board/xilinx/zynq/Makefile | 10 +++++++++- + board/xilinx/zynqmp/Makefile | 10 +++++++++- + 4 files changed, 60 insertions(+), 2 deletions(-) + create mode 100644 board/xilinx/Kconfig + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 22234cde2ab6..e04979d0ef7e 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1293,4 +1293,5 @@ source "board/technologic/ts4600/Kconfig" + source "board/vscom/baltos/Kconfig" + source "board/woodburn/Kconfig" + source "board/work-microwave/work_92105/Kconfig" ++source "board/xilinx/Kconfig" + source "board/zipitz2/Kconfig" + + source "arch/arm/Kconfig.debug" +diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig +new file mode 100644 +index 000000000000..aa3fa061edef +--- /dev/null ++++ b/board/xilinx/Kconfig +@@ -0,0 +1,41 @@ ++# Copyright (c) 2018, Luca Ceresoli ++# ++# SPDX-License-Identifier: GPL-2.0 ++ ++if ARCH_ZYNQ || ARCH_ZYNQMP ++ ++config XILINX_PS_INIT_FILE ++ string "Zynq/ZynqMP PS init file(s) location" ++ help ++ On Zynq and ZynqMP U-Boot SPL (or U-Boot proper if ++ ZYNQMP_PSU_INIT_ENABLED is set) is responsible for some ++ basic initializations, such as enabling peripherals and ++ configuring pinmuxes. The PS init file (called ++ psu_init_gpl.c on ZynqMP, ps7_init_gpl.c for Zynq-7000) ++ contains the code for such initializations. ++ ++ U-Boot contains PS init files for some boards, but each of ++ them describes only one specific configuration. Users of a ++ different board, or needing a different configuration, can ++ generate custom files using the Xilinx development tools. ++ ++ There are three ways to give a PS init file to U-Boot: ++ ++ 1. Set this variable to the path, either relative to the ++ source tree or absolute, where the psu_init_gpl.c or ++ ps7_init_gpl.c file is located. U-Boot will build this ++ file. ++ ++ 2. If you leave an empty string here, U-Boot will use ++ board/xilinx/zynq/$(CONFIG_DEFAULT_DEVICE_TREE)/ps7_init_gpl.c ++ for Zynq-7000, or ++ board/xilinx/zynqmp/$(CONFIG_DEFAULT_DEVICE_TREE)/psu_init_gpl.c ++ for ZynqMP. ++ ++ 3. If the above file does not exist, U-Boot will use ++ board/xilinx/zynq/ps7_init_gpl.c for Zynq-7000, or ++ board/xilinx/zynqmp/psu_init_gpl.c for ZynqMP. This file ++ is not provided by U-Boot, you have to copy it there ++ before the build. ++ ++endif +diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile +index 5a76a26720cd..03ad5f0532ee 100644 +--- a/board/xilinx/zynq/Makefile ++++ b/board/xilinx/zynq/Makefile +@@ -5,10 +5,18 @@ + + obj-y := board.o + +-hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) ++ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"") ++PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE)) ++init-objs := ps_init_gpl.o ++spl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE) ++ $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^ ++endif + ++ifeq ($(init-objs),) ++hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) + init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\ + $(hw-platform-y)/ps7_init_gpl.o) ++endif + + ifeq ($(init-objs),) + ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),) +diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile +index 05ccd25dcef3..960b81fc5853 100644 +--- a/board/xilinx/zynqmp/Makefile ++++ b/board/xilinx/zynqmp/Makefile +@@ -5,10 +5,18 @@ + + obj-y := zynqmp.o + +-hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) ++ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"") ++PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE)) ++init-objs := ps_init_gpl.o ++spl/board/xilinx/zynqmp/ps_init_gpl.o board/xilinx/zynqmp/ps_init_gpl.o: $(PS_INIT_FILE) ++ $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^ ++endif + ++ifeq ($(init-objs),) ++hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) + init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\ + $(hw-platform-y)/psu_init_gpl.o) ++endif + + ifeq ($(init-objs),) + ifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),) +-- +2.7.4 + diff --git a/buildroot/board/zynqmp/post-image.sh b/buildroot/board/zynqmp/post-image.sh new file mode 100755 index 000000000..b2b99fed0 --- /dev/null +++ b/buildroot/board/zynqmp/post-image.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# By default U-Boot loads DTB from a file named "system.dtb", so +# let's use a symlink with that name that points to the *first* +# devicetree listed in the config. + +FIRST_DT=$(sed -nr \ + -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/([-_/[:alnum:]\\.]*).*"$|\1|p' \ + ${BR2_CONFIG}) + +[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/system.dtb + +support/scripts/genimage.sh -c board/zynqmp/genimage.cfg diff --git a/buildroot/board/zynqmp/readme.txt b/buildroot/board/zynqmp/readme.txt new file mode 100644 index 000000000..da37f4ccc --- /dev/null +++ b/buildroot/board/zynqmp/readme.txt @@ -0,0 +1,51 @@ +******************************** +Xilinx ZCU106 board - ZynqMP SoC +******************************** + +This document describes the Buildroot support for the ZCU106 board by +Xilinx, based on the Zynq UltraScale+ MPSoC (aka ZynqMP). It has been +tested with the EK-U1-ZCU106-ES2 pre-production board. + +How to build it +=============== + +Configure Buildroot: + + $ make zynqmp_zcu106_defconfig + +Compile everything and build the rootfs image: + + $ make + +Result of the build +------------------- + +After building, you should get a tree like this: + + output/images/ + +-- atf-uboot.ub + +-- bl31.bin + +-- boot.bin + +-- boot.vfat + +-- Image + +-- rootfs.ext2 + +-- rootfs.ext4 -> rootfs.ext2 + +-- sdcard.img + +-- system.dtb -> zynqmp-zcu106-revA.dtb + +-- u-boot.bin + `-- zynqmp-zcu106-revA.dtb + +How to write the SD card +======================== + +WARNING! This will destroy all the card content. Use with care! + +The sdcard.img file is a complete bootable image ready to be written +on the boot medium. To install it, simply copy the image to an SD +card: + + # dd if=output/images/sdcard.img of=/dev/sdX + +Where 'sdX' is the device node of the SD. + +Eject the SD card, insert it in the board, and power it up. diff --git a/buildroot/boot/Config.in b/buildroot/boot/Config.in index 54760b9da..b3adbfc8b 100644 --- a/buildroot/boot/Config.in +++ b/buildroot/boot/Config.in @@ -1,17 +1,24 @@ menu "Bootloaders" +source "boot/afboot-stm32/Config.in" source "boot/at91bootstrap/Config.in" source "boot/at91bootstrap3/Config.in" source "boot/at91dataflashboot/Config.in" +source "boot/arm-trusted-firmware/Config.in" source "boot/barebox/Config.in" +source "boot/binaries-marvell/Config.in" source "boot/boot-wrapper-aarch64/Config.in" -source "boot/grub/Config.in" source "boot/grub2/Config.in" source "boot/gummiboot/Config.in" source "boot/lpc32xxcdl/Config.in" +source "boot/mv-ddr-marvell/Config.in" source "boot/mxs-bootlets/Config.in" +source "boot/optee-os/Config.in" +source "boot/opensbi/Config.in" +source "boot/s500-bootloader/Config.in" +source "boot/shim/Config.in" source "boot/syslinux/Config.in" source "boot/uboot/Config.in" -source "boot/xloader/Config.in" +source "boot/vexpress-firmware/Config.in" endmenu diff --git a/buildroot/boot/afboot-stm32/Config.in b/buildroot/boot/afboot-stm32/Config.in new file mode 100644 index 000000000..309b9e049 --- /dev/null +++ b/buildroot/boot/afboot-stm32/Config.in @@ -0,0 +1,7 @@ +config BR2_TARGET_AFBOOT_STM32 + bool "afboot-stm32" + depends on BR2_arm + help + afboot-stm32 is a very small bootloader for STM32 platforms + + https://github.com/mcoquelin-stm32/afboot-stm32 diff --git a/buildroot/boot/afboot-stm32/afboot-stm32.hash b/buildroot/boot/afboot-stm32/afboot-stm32.hash new file mode 100644 index 000000000..75f47295f --- /dev/null +++ b/buildroot/boot/afboot-stm32/afboot-stm32.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9b37b661bd3091ceb5d8dc5a56a2dfc02ae9ebc0c63dad3c4289c9d6b3d3ec89 afboot-stm32-0.2.tar.gz diff --git a/buildroot/boot/afboot-stm32/afboot-stm32.mk b/buildroot/boot/afboot-stm32/afboot-stm32.mk new file mode 100644 index 000000000..0fb473528 --- /dev/null +++ b/buildroot/boot/afboot-stm32/afboot-stm32.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# afboot-stm32 +# +################################################################################ + +AFBOOT_STM32_VERSION = 0.2 +AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,v$(AFBOOT_STM32_VERSION)) +AFBOOT_STM32_INSTALL_IMAGES = YES +AFBOOT_STM32_INSTALL_TARGET = NO + +define AFBOOT_STM32_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all +endef + +define AFBOOT_STM32_INSTALL_IMAGES_CMDS + $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/stm32*.bin +endef + +$(eval $(generic-package)) diff --git a/buildroot/boot/arm-trusted-firmware/Config.in b/buildroot/boot/arm-trusted-firmware/Config.in new file mode 100644 index 000000000..e505dee9d --- /dev/null +++ b/buildroot/boot/arm-trusted-firmware/Config.in @@ -0,0 +1,178 @@ +config BR2_TARGET_ARM_TRUSTED_FIRMWARE + bool "ARM Trusted Firmware (ATF)" + depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A) && \ + BR2_TARGET_UBOOT + help + Enable this option if you want to build the ATF for your ARM + based embedded device. + + https://github.com/ARM-software/arm-trusted-firmware + +if BR2_TARGET_ARM_TRUSTED_FIRMWARE +choice + prompt "ATF Version" + help + Select the specific ATF version you want to use + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION + bool "v2.2" + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION + bool "Custom version" + help + This option allows to use a specific official versions + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT + bool "Custom Git repository" + +endchoice + +if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION + string "URL of custom ATF tarball" + +endif + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE + string "ATF version" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION + string + default "v2.2" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION + default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL + default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \ + if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT + default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE \ + if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION + +if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL + string "URL of custom repository" + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION + string "Custom repository version" + help + Revision to use in the typical format used by Git + E.G. a sha id, a tag, .. + +endif + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM + string "ATF platform" + help + Target plaform to build for. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP + bool "Build FIP image" + help + This option enables building the FIP image (Firmware Image + Package). This is typically the image format used by + platforms were ATF encapsulates the second stage bootloader + (such as U-Boot). + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31 + bool "Build BL31 image" + help + This option enables building the BL31 image. This is + typically used on platforms where another bootloader (e.g + U-Boot) encapsulates ATF BL31. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT + bool "Build BL31 U-Boot image" + select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31 + help + Generates a U-Boot image named atf-uboot.ub containing + bl31.bin. This is used for example by the Xilinx version of + U-Boot SPL to load ATF on the ZynqMP SoC. + +choice + prompt "BL32" + default BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT + help + Select BL32 stage for the trusted firmware + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_DEFAULT + bool "Default" + help + With this option selected, ATF will not use any BL32 stage, + unless if one is explicitly chosen using the SPD (for + AArch64) or AARCH32_SP (for AArch32) variables, which can be + passed through + BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE + bool "OP-TEE OS" + depends on BR2_TARGET_OPTEE_OS + help + This option allows to embed OP-TEE OS as the BL32 part of + the ARM Trusted Firmware boot sequence. + +endchoice + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 + bool "Use U-Boot as BL33" + depends on BR2_TARGET_UBOOT + help + This option allows to embed u-boot.bin as the BL33 part of + the ARM Trusted Firmware. It ensures that the u-boot package + gets built before ATF, and that the appropriate BL33 + variable pointing to u-boot.bin is passed when building ATF. + +if BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE + string "U-Boot BL33 image name" + default "u-boot.bin" + help + Name of the U-Boot BL33 image to include in ATF, it must + have been installed to BINARIES_DIR by the U-Boot package. + +endif + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS + string "Additional ATF make targets" + help + Additional targets for the ATF build + E.G. When using the QorIQ custom ATF repository from NXP, + the target 'pbl' can be used to build the pbl binary. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES + string "Additional ATF build variables" + help + Additional parameters for the ATF build + E.G. 'DEBUG=1 LOG_LEVEL=20' + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG + bool "Build in debug mode" + help + Enable this option to build ATF with DEBUG=1. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES + string "Binary boot images" + default "*.bin" + help + Names of generated image files that are installed in the + output images/ directory. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC + bool "Needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your ATF board configuration + requires the Device Tree compiler to be available. + +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN + bool "Needs arm-none-eabi toolchain" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" + help + Select this option if your ATF board configuration requires + an ARM32 bare metal toolchain to be available. + +endif diff --git a/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.hash b/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.hash new file mode 100644 index 000000000..3cd83d78f --- /dev/null +++ b/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 07e3c058ae2d95c7d516a46fc93565b797e912c3271ddbf29df523b1ab1ee911 arm-trusted-firmware-v2.2.tar.gz +sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164 license.rst diff --git a/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.mk new file mode 100644 index 000000000..a3553e36c --- /dev/null +++ b/buildroot/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -0,0 +1,187 @@ +################################################################################ +# +# arm-trusted-firmware +# +################################################################################ + +ARM_TRUSTED_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION)) + +ifeq ($(ARM_TRUSTED_FIRMWARE_VERSION),custom) +# Handle custom ATF tarballs as specified by the configuration +ARM_TRUSTED_FIRMWARE_TARBALL = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)) +ARM_TRUSTED_FIRMWARE_SITE = $(patsubst %/,%,$(dir $(ARM_TRUSTED_FIRMWARE_TARBALL))) +ARM_TRUSTED_FIRMWARE_SOURCE = $(notdir $(ARM_TRUSTED_FIRMWARE_TARBALL)) +else ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y) +ARM_TRUSTED_FIRMWARE_SITE = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)) +ARM_TRUSTED_FIRMWARE_SITE_METHOD = git +else +# Handle stable official ATF versions +ARM_TRUSTED_FIRMWARE_SITE = $(call github,ARM-software,arm-trusted-firmware,$(ARM_TRUSTED_FIRMWARE_VERSION)) +# The licensing of custom or from-git versions is unknown. +# This is valid only for the official v1.4. +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION),y) +ARM_TRUSTED_FIRMWARE_LICENSE = BSD-3-Clause +ARM_TRUSTED_FIRMWARE_LICENSE_FILES = license.rst +endif +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE) +endif + +ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-a-toolchain +endif + +ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM)) + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += DEBUG=1 +ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/debug +else +ARM_TRUSTED_FIRMWARE_IMG_DIR = $(@D)/build/$(ARM_TRUSTED_FIRMWARE_PLATFORM)/release +endif + +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES)) \ + PLAT=$(ARM_TRUSTED_FIRMWARE_PLATFORM) + +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=7 +else ifeq ($(BR2_ARM_CPU_ARMV8A),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARM_ARCH_MAJOR=8 +endif + +ifeq ($(BR2_arm),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch32 +else ifeq ($(BR2_aarch64),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ARCH=aarch64 +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += optee-os +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \ + BL32=$(BINARIES_DIR)/tee-header_v2.bin \ + BL32_EXTRA1=$(BINARIES_DIR)/tee-pager_v2.bin \ + BL32_EXTRA2=$(BINARIES_DIR)/tee-pageable_v2.bin +ifeq ($(BR2_aarch64),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SPD=opteed +endif +ifeq ($(BR2_arm),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee +endif +endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y) +ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE)) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += uboot +endif + +ifeq ($(BR2_TARGET_VEXPRESS_FIRMWARE),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware +endif + +ifeq ($(BR2_TARGET_BINARIES_MARVELL),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += binaries-marvell +endif + +ifeq ($(BR2_TARGET_MV_DDR_MARVELL),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += MV_DDR_PATH=$(MV_DDR_MARVELL_DIR) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += mv-ddr-marvell +endif + +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y) +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += fip +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-openssl +# fiptool only exists in newer (>= 1.3) versions of ATF, so we build +# it conditionally. We need to explicitly build it as it requires +# OpenSSL, and therefore needs to be passed proper variables to find +# the host OpenSSL. +define ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL + if test -d $(@D)/tools/fiptool; then \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/fiptool \ + $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \ + CPPFLAGS="$(HOST_CPPFLAGS)" \ + LDLIBS="$(HOST_LDFLAGS) -lcrypto" ; \ + fi +endef +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31),y) +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31 +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT),y) +define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD +# Get the entry point address from the elf. + BASE_ADDR=$$($(TARGET_READELF) -h $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf | \ + sed -r '/^ Entry point address:\s*(.*)/!d; s//\1/') && \ + $(MKIMAGE) \ + -A $(MKIMAGE_ARCH) -O arm-trusted-firmware -C none \ + -a $${BASE_ADDR} -e $${BASE_ADDR} \ + -d $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31.bin \ + $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub +endef +define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL + $(INSTALL) -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/atf-uboot.ub \ + $(BINARIES_DIR)/atf-uboot.ub +endef +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += RESET_TO_BL31=1 +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-uboot-tools +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y) +define ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF + $(INSTALL) -D -m 0644 $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/bl31/bl31.elf \ + $(BINARIES_DIR)/bl31.elf +endef +endif + +ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += \ + $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS)) + +define ARM_TRUSTED_FIRMWARE_BUILD_CMDS + $(ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \ + $(ARM_TRUSTED_FIRMWARE_MAKE_TARGETS) + $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_BUILD) +endef + +define ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES_CMDS + $(foreach f,$(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES)), \ + cp -dpf $(ARM_TRUSTED_FIRMWARE_IMG_DIR)/$(f) $(BINARIES_DIR)/ + ) + $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL) + $(ARM_TRUSTED_FIRMWARE_BL31_UBOOT_INSTALL_ELF) +endef + +# Configuration check +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR_BUILDING),yy) + +ifeq ($(ARM_TRUSTED_FIRMWARE_VERSION),custom) +ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION))),) +$(error No tarball location specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION)) +endif +endif + +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT),y) +ifeq ($(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL)),) +$(error No repository specified. Please check BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL) +endif +endif + +endif + +$(eval $(generic-package)) diff --git a/buildroot/boot/at91bootstrap/Config.in b/buildroot/boot/at91bootstrap/Config.in index 57fdeda94..0f6430fd8 100644 --- a/buildroot/boot/at91bootstrap/Config.in +++ b/buildroot/boot/at91bootstrap/Config.in @@ -1,12 +1,14 @@ config BR2_TARGET_AT91BOOTSTRAP - depends on BR2_arm926t bool "AT91 Bootstrap" + depends on BR2_arm926t help AT91Bootstrap is a first level bootloader for the Atmel AT91 devices. It integrates algorithms for: - - Device initialization such as clock configuration, PIO settings... + - Device initialization such as clock configuration, PIO + settings... - Peripheral drivers such as PIO, PMC or SDRAMC... - - Physical media algorithm such as DataFlash, NandFlash, NOR Flash... + - Physical media algorithm such as DataFlash, NandFlash, NOR + Flash... if BR2_TARGET_AT91BOOTSTRAP diff --git a/buildroot/boot/at91bootstrap/at91bootstrap.hash b/buildroot/boot/at91bootstrap/at91bootstrap.hash new file mode 100644 index 000000000..b1f963b82 --- /dev/null +++ b/buildroot/boot/at91bootstrap/at91bootstrap.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 d66192a274247f4baa39fa932eadf903d7add55641d89d30402f967c4f2282a5 AT91Bootstrap1.16.zip diff --git a/buildroot/boot/at91bootstrap/at91bootstrap.mk b/buildroot/boot/at91bootstrap/at91bootstrap.mk index 50bbc2657..c68b56b6e 100644 --- a/buildroot/boot/at91bootstrap/at91bootstrap.mk +++ b/buildroot/boot/at91bootstrap/at91bootstrap.mk @@ -17,15 +17,14 @@ AT91BOOTSTRAP_INSTALL_IMAGES = YES AT91BOOTSTRAP_INSTALL_TARGET = NO define AT91BOOTSTRAP_EXTRACT_CMDS - $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) + $(UNZIP) -d $(BUILD_DIR) $(AT91BOOTSTRAP_DL_DIR)/$(AT91BOOTSTRAP_SOURCE) mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D) rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) endef ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),) define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES - $(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \ - at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch + $(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \*.patch endef AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES @@ -41,11 +40,8 @@ endef $(eval $(generic-package)) -ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y) -# we NEED a board name unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(BR2_TARGET_AT91BOOTSTRAP)$(BR_BUILDING),yy) ifeq ($(AT91BOOTSTRAP_BOARD),) $(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting) endif endif -endif diff --git a/buildroot/boot/at91bootstrap3/Config.in b/buildroot/boot/at91bootstrap3/Config.in index 8ac40ed96..5492ace8f 100644 --- a/buildroot/boot/at91bootstrap3/Config.in +++ b/buildroot/boot/at91bootstrap3/Config.in @@ -1,15 +1,61 @@ config BR2_TARGET_AT91BOOTSTRAP3 - depends on BR2_arm926t || BR2_cortex_a5 bool "AT91 Bootstrap 3" + depends on BR2_arm926t || BR2_cortex_a5 || BR2_cortex_a7 help AT91Bootstrap is a first level bootloader for the Atmel AT91 devices. It integrates algorithms for: - - Device initialization such as clock configuration, PIO settings... + - Device initialization such as clock configuration, PIO + settings... - Peripheral drivers such as PIO, PMC or SDRAMC... - - Physical media algorithm such as DataFlash, NandFlash, NOR Flash... + - Physical media algorithm such as DataFlash, NandFlash, NOR + Flash... + + https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap if BR2_TARGET_AT91BOOTSTRAP3 +choice + + prompt "AT91 Bootstrap 3 version" + +config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION + bool "3.9.2" + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the AT91 Bootstrap 3 + source code from a Git repository. + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL + bool "Custom tarball" + +endchoice + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION + string "URL of custom AT91Bootstrap tarball" + depends on BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL + +if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL + string "URL of custom repository" + +config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION + string "Custom repository version" + help + Revision to use in the typical format used by Git + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_TARGET_AT91BOOTSTRAP3_VERSION + string + default "v3.9.2" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION + default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \ + if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT + default "custom" if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL + config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR string "custom patch dir" help diff --git a/buildroot/boot/at91bootstrap3/at91bootstrap3.hash b/buildroot/boot/at91bootstrap3/at91bootstrap3.hash new file mode 100644 index 000000000..5741b829f --- /dev/null +++ b/buildroot/boot/at91bootstrap3/at91bootstrap3.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 6cf37df482024f3770fe1880f768a675beda16323a90e702860d9e5478105b3f at91bootstrap3-v3.9.2.tar.gz +sha256 732b2a55b5905031d8ae420136ffb5f8889214865784386bf754cffab8d2bc6e main.c diff --git a/buildroot/boot/at91bootstrap3/at91bootstrap3.mk b/buildroot/boot/at91bootstrap3/at91bootstrap3.mk index 098e7bfe3..5cf865c68 100644 --- a/buildroot/boot/at91bootstrap3/at91bootstrap3.mk +++ b/buildroot/boot/at91bootstrap3/at91bootstrap3.mk @@ -4,16 +4,29 @@ # ################################################################################ -AT91BOOTSTRAP3_VERSION = v3.7.1 +AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION)) + +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y) +AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)) +AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL))) +AT91BOOTSTRAP3_SOURCE = $(notdir $(AT91BOOTSTRAP3_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE) +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y) +AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)) +AT91BOOTSTRAP3_SITE_METHOD = git +BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE) +else AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION)) +endif + +AT91BOOTSTRAP3_LICENSE = Atmel License +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y) +AT91BOOTSTRAP3_LICENSE_FILES = main.c +endif AT91BOOTSTRAP3_INSTALL_IMAGES = YES AT91BOOTSTRAP3_INSTALL_TARGET = NO -AT91BOOTSTRAP3_DEFCONFIG = \ - $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)) -AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE = \ - $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)) AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \ $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR)) @@ -21,23 +34,12 @@ AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR) ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),) define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES - $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \ - at91bootstrap3-\*.patch + $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch endef AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES endif -ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) -define AT91BOOTSTRAP3_CONFIGURE_CMDS - $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D) $(AT91BOOTSTRAP3_DEFCONFIG)_defconfig -endef -else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) -define AT91BOOTSTRAP3_CONFIGURE_CMDS - cp $(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE) $(@D)/.config -endef -endif - define AT91BOOTSTRAP3_BUILD_CMDS $(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D) endef @@ -46,19 +48,49 @@ define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS cp $(@D)/binaries/*.bin $(BINARIES_DIR) endef -$(eval $(generic-package)) +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +AT91BOOTSTRAP3_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +AT91BOOTSTRAP3_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)) +endif + +AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig +AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS) # Checks to give errors that the user can understand -ifeq ($(filter source,$(MAKECMDGOALS)),) +# Must be before we call to kconfig-package +ifeq ($(BR_BUILDING),y) + ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) -ifeq ($(AT91BOOTSTRAP3_DEFCONFIG),) +# We must use the user-supplied kconfig value, because +# AT91BOOTSTRAP3_KCONFIG_DEFCONFIG will at least contain +# the trailing _defconfig +ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),) $(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting) endif endif ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) -ifeq ($(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE),) +ifeq ($(AT91BOOTSTRAP3_KCONFIG_FILE),) $(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting) endif endif + +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y) +ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)),) +$(error No custom at91bootstrap3 repository URL specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL setting) +endif +ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION)),) +$(error No custom at91bootstrap3 repository version specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION setting) +endif endif + +ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y) +ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)),) +$(error No custom AT91Bootstrap3 tarball specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION setting) +endif # qstrip BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION +endif # BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL + +endif # BR_BUILDING + +$(eval $(kconfig-package)) diff --git a/buildroot/boot/at91dataflashboot/Config.in b/buildroot/boot/at91dataflashboot/Config.in index 80b57a4ad..4055f9641 100644 --- a/buildroot/boot/at91dataflashboot/Config.in +++ b/buildroot/boot/at91dataflashboot/Config.in @@ -1,3 +1,3 @@ config BR2_TARGET_AT91DATAFLASHBOOT - depends on BR2_arm926t bool "AT91 DataFlashBoot" + depends on BR2_arm926t diff --git a/buildroot/boot/at91dataflashboot/at91dataflashboot.hash b/buildroot/boot/at91dataflashboot/at91dataflashboot.hash new file mode 100644 index 000000000..57df4e538 --- /dev/null +++ b/buildroot/boot/at91dataflashboot/at91dataflashboot.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 2cfeb6a9236e1a743c8010f05e504dbc92169ef42d9a6cf7948954a577bfc386 DataflashBoot-1.05.tar.bz2 diff --git a/buildroot/boot/barebox/Config.in b/buildroot/boot/barebox/Config.in index b4439a72b..bf27481e5 100644 --- a/buildroot/boot/barebox/Config.in +++ b/buildroot/boot/barebox/Config.in @@ -12,7 +12,7 @@ choice Select the specific Barebox version you want to use config BR2_TARGET_BAREBOX_LATEST_VERSION - bool "2015.01.0" + bool "2020.07.0" config BR2_TARGET_BAREBOX_CUSTOM_VERSION bool "Custom version" @@ -40,7 +40,7 @@ endif config BR2_TARGET_BAREBOX_VERSION string - default "2015.01.0" if BR2_TARGET_BAREBOX_LATEST_VERSION + default "2020.07.0" if BR2_TARGET_BAREBOX_LATEST_VERSION default BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE if BR2_TARGET_BAREBOX_CUSTOM_VERSION default "custom" if BR2_TARGET_BAREBOX_CUSTOM_TARBALL default BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION if BR2_TARGET_BAREBOX_CUSTOM_GIT @@ -64,55 +64,22 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION endif +source boot/barebox/barebox/Config.in -choice - prompt "Barebox configuration" - default BR2_TARGET_BAREBOX_USE_DEFCONFIG - -config BR2_TARGET_BAREBOX_USE_DEFCONFIG - bool "Using a defconfig" - -config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG - bool "Using a custom config file" - -endchoice - -config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG - string "board defconfig" - depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG +menuconfig BR2_TARGET_BAREBOX_AUX + bool "Build barebox with an auxiliary config" help - Name of the board for which Barebox should be built, without - the _defconfig suffix. + Build barebox with an auxiliary configuration. + Useful for building an SPL (Secondary Program Loader) in + addition to the traditional TPL (Tertiary Program Loader), + such as the X-Loader or MLO for Texas Instruments + processors. -config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE - string "Configuration file path" - depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG - help - Path to the barebox configuration file - -config BR2_TARGET_BAREBOX_BAREBOXENV - bool "bareboxenv tool in target" - help - Install bareboxenv tool in target. +if BR2_TARGET_BAREBOX_AUX -config BR2_TARGET_BAREBOX_CUSTOM_ENV - bool "Generate an environment image" - help - Generate a custom environment image. This environment will - contain the variables and scripts to be used at boot by - barebox. +source boot/barebox/barebox-aux/Config.in -config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH - string "Environment path" - depends on BR2_TARGET_BAREBOX_CUSTOM_ENV - help - Path to the directory containing the custom barebox - environment. Depending on your setup, it will probably be - based on either the content of the defaultenv or - defaultenv-2 directories in the barebox source code, plus - the additions needed. The output will be an image in the - barebox devfs format, stored in the images directory, with - the same name as the directory name given here. +endif endif diff --git a/buildroot/boot/barebox/barebox-aux/Config.in b/buildroot/boot/barebox/barebox-aux/Config.in new file mode 100644 index 000000000..d39d24f76 --- /dev/null +++ b/buildroot/boot/barebox/barebox-aux/Config.in @@ -0,0 +1,75 @@ +choice + prompt "Barebox configuration" + default BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG + +config BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG + bool "Using a defconfig" + +config BR2_TARGET_BAREBOX_AUX_USE_CUSTOM_CONFIG + bool "Using a custom config file" + +endchoice + +config BR2_TARGET_BAREBOX_AUX_BOARD_DEFCONFIG + string "board defconfig" + depends on BR2_TARGET_BAREBOX_AUX_USE_DEFCONFIG + help + Name of the board for which Barebox should be built, without + the _defconfig suffix. + +config BR2_TARGET_BAREBOX_AUX_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_BAREBOX_AUX_USE_CUSTOM_CONFIG + help + Path to the barebox configuration file + +config BR2_TARGET_BAREBOX_AUX_CONFIG_FRAGMENT_FILES + string "Additional configuration fragment files" + help + A space-separated list of configuration fragment files, + that will be merged to the main Barebox configuration file. + +config BR2_TARGET_BAREBOX_AUX_IMAGE_FILE + string "Image file names" + help + Space-separated list of barebox images which will be copied to + the images directory. + + If left empty, defaults to: + - barebox.bin for barebox versions older than 2012.10. + - barebox-flash-image for later versions. + +config BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV + bool "Generate an environment image" + help + Generate a custom environment image. This environment will + contain the variables and scripts to be used at boot by + barebox. + +config BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV_PATH + string "Environment path" + depends on BR2_TARGET_BAREBOX_AUX_CUSTOM_ENV + help + Path to the directory containing the custom barebox + environment. Depending on your setup, it will probably be + based on either the content of the defaultenv or + defaultenv-2 directories in the barebox source code, plus + the additions needed. The output will be an image in the + barebox devfs format, stored in the images directory, with + the same name as the directory name given here. + +config BR2_TARGET_BAREBOX_AUX_CUSTOM_EMBEDDED_ENV_PATH + string "Embedded environment path" + help + If this option is not empty, it is the path to a custom + embedded barebox environment. This image will be used when + the environment found in the environment sector is + invalid. This option sets the barebox Kconfig option + CONFIG_DEFAULT_ENVIRONMENT_PATH to the specified path. This + way it is possible to use Buildroot variables like + TOPDIR etc. to refer to the custom environment. + + Depending on your setup, the custom embedded environment + will probably be based on either the content of the + defaultenv or defaultenv-2 directories in the barebox source + code. diff --git a/buildroot/boot/barebox/barebox-aux/barebox-aux.hash b/buildroot/boot/barebox/barebox-aux/barebox-aux.hash new file mode 120000 index 000000000..b6462b808 --- /dev/null +++ b/buildroot/boot/barebox/barebox-aux/barebox-aux.hash @@ -0,0 +1 @@ +../barebox.hash \ No newline at end of file diff --git a/buildroot/boot/barebox/barebox-aux/barebox-aux.mk b/buildroot/boot/barebox/barebox-aux/barebox-aux.mk new file mode 100644 index 000000000..fb287d361 --- /dev/null +++ b/buildroot/boot/barebox/barebox-aux/barebox-aux.mk @@ -0,0 +1,8 @@ +################################################################################ +# +# barebox-aux +# +################################################################################ + +# Instantiate the auxiliary barebox package +$(eval $(barebox-package)) diff --git a/buildroot/boot/barebox/barebox.hash b/buildroot/boot/barebox/barebox.hash new file mode 100644 index 000000000..17992be7f --- /dev/null +++ b/buildroot/boot/barebox/barebox.hash @@ -0,0 +1,8 @@ +# From https://www.barebox.org/download/barebox-2020.07.0.tar.bz2.md5 +md5 49f3fba08743d44e84e8d68ed776f05d barebox-2020.07.0.tar.bz2 + +# Locally calculated +sha256 1956620acc39b5c9b035635ff0b1da2c1b72b791612ef55a72e6272a903fbc4c barebox-2020.07.0.tar.bz2 + +# License files, locally computed +sha256 ab1122aa9f9073ad1ec824edcd970b16a6a7881a34a18fd56c080debb2dca5d4 COPYING diff --git a/buildroot/boot/barebox/barebox.mk b/buildroot/boot/barebox/barebox.mk index 0fb7cec09..422f27312 100644 --- a/buildroot/boot/barebox/barebox.mk +++ b/buildroot/boot/barebox/barebox.mk @@ -4,135 +4,166 @@ # ################################################################################ -BAREBOX_VERSION = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION)) +################################################################################ +# inner-barebox-package -- generates the KConfig logic and make targets needed +# to support a barebox package. All barebox packages are built from the same +# source (origin, version and patches). The remainder of the package +# configuration is unique to each barebox package. +# +# argument 1 is the uppercase package name (used for variable name-space) +################################################################################ -ifeq ($(BAREBOX_VERSION),custom) +define inner-barebox-package + +$(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION)) + +ifeq ($$($(1)_VERSION),custom) # Handle custom Barebox tarballs as specified by the configuration -BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION)) -BAREBOX_SITE = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL))) -BAREBOX_SOURCE = $(notdir $(BAREBOX_TARBALL)) -else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y) -BAREBOX_SITE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL)) -BAREBOX_SITE_METHOD = git +$(1)_TARBALL = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION)) +$(1)_SITE = $$(patsubst %/,%,$$(dir $$($(1)_TARBALL))) +$(1)_SOURCE = $$(notdir $$($(1)_TARBALL)) +else ifeq ($$(BR2_TARGET_BAREBOX_CUSTOM_GIT),y) +$(1)_SITE = $$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL)) +$(1)_SITE_METHOD = git +# Override the default value of _SOURCE to 'barebox-*' so that it is not +# downloaded a second time for barebox-aux; also alows avoiding the hash +# check: +$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.gz else # Handle stable official Barebox versions -BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 -BAREBOX_SITE = http://www.barebox.org/download +$(1)_SOURCE = barebox-$$($(1)_VERSION).tar.bz2 +$(1)_SITE = https://www.barebox.org/download +endif + +$(1)_DL_SUBDIR = barebox + +$(1)_DEPENDENCIES = host-lzop +$(1)_LICENSE = GPL-2.0 with exceptions +ifeq ($(BR2_TARGET_BAREBOX_LATEST_VERSION),y) +$(1)_LICENSE_FILES = COPYING endif -BAREBOX_DEPENDENCIES = host-lzop -BAREBOX_LICENSE = GPLv2 with exceptions -BAREBOX_LICENSE_FILES = COPYING +$(1)_CUSTOM_EMBEDDED_ENV_PATH = $$(call qstrip,$$(BR2_TARGET_$(1)_CUSTOM_EMBEDDED_ENV_PATH)) -ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),) -define BAREBOX_APPLY_CUSTOM_PATCHES - $(APPLY_PATCHES) $(@D) \ - $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \ - barebox-$(BAREBOX_VERSION)-\*.patch +ifneq ($$(call qstrip,$$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),) +define $(1)_APPLY_CUSTOM_PATCHES + $$(APPLY_PATCHES) $$(@D) \ + $$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \*.patch endef -BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES +$(1)_POST_PATCH_HOOKS += $(1)_APPLY_CUSTOM_PATCHES endif -BAREBOX_INSTALL_IMAGES = YES -ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) -BAREBOX_INSTALL_TARGET = NO +$(1)_INSTALL_IMAGES = YES +ifneq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) +$(1)_INSTALL_TARGET = NO endif -ifeq ($(KERNEL_ARCH),i386) -BAREBOX_ARCH = x86 -else ifeq ($(KERNEL_ARCH),powerpc) -BAREBOX_ARCH = ppc +ifeq ($$(KERNEL_ARCH),i386) +$(1)_ARCH = x86 +else ifeq ($$(KERNEL_ARCH),x86_64) +$(1)_ARCH = x86 +else ifeq ($$(KERNEL_ARCH),powerpc) +$(1)_ARCH = ppc +else ifeq ($$(KERNEL_ARCH),arm64) +$(1)_ARCH = arm else -BAREBOX_ARCH = $(KERNEL_ARCH) +$(1)_ARCH = $$(KERNEL_ARCH) endif -BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) \ - $(TARGET_CROSS)" - +$(1)_MAKE_FLAGS = ARCH=$$($(1)_ARCH) CROSS_COMPILE="$$(TARGET_CROSS)" +$(1)_MAKE_ENV = $$(TARGET_MAKE_ENV) -ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y) -BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,\ - $(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig -else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) -BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) +ifeq ($$(BR2_TARGET_$(1)_USE_DEFCONFIG),y) +$(1)_KCONFIG_DEFCONFIG = $$(call qstrip,$$(BR2_TARGET_$(1)_BOARD_DEFCONFIG))_defconfig +else ifeq ($$(BR2_TARGET_$(1)_USE_CUSTOM_CONFIG),y) +$(1)_KCONFIG_FILE = $$(call qstrip,$$(BR2_TARGET_$(1)_CUSTOM_CONFIG_FILE)) endif -define BAREBOX_CONFIGURE_CMDS - cp $(BAREBOX_SOURCE_CONFIG) \ - $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig - $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) \ - buildroot_defconfig -endef +$(1)_KCONFIG_FRAGMENT_FILES = $$(call qstrip,$$(BR2_TARGET_$(1)_CONFIG_FRAGMENT_FILES)) +$(1)_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig +$(1)_KCONFIG_OPTS = $$($(1)_MAKE_FLAGS) + +$(1)_KCONFIG_DEPENDENCIES = \ + $(BR2_BISON_HOST_DEPENDENCY) \ + $(BR2_FLEX_HOST_DEPENDENCY) -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) -define BAREBOX_BUILD_BAREBOXENV_CMDS - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \ - $(@D)/scripts/bareboxenv.c +ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) +define $(1)_BUILD_BAREBOXENV_CMDS + $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ + $$(@D)/scripts/bareboxenv.c endef endif -ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y) -BAREBOX_ENV_NAME = $(notdir $(call qstrip,\ - $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH))) -define BAREBOX_BUILD_CUSTOM_ENV - $(@D)/scripts/bareboxenv -s \ - $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \ - $(@D)/$(BAREBOX_ENV_NAME) +ifeq ($$(BR2_TARGET_$(1)_CUSTOM_ENV),y) +$(1)_ENV_NAME = $$(notdir $$(call qstrip,\ + $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH))) +define $(1)_BUILD_CUSTOM_ENV + $$(@D)/scripts/bareboxenv -s \ + $$(call qstrip, $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH)) \ + $$(@D)/$$($(1)_ENV_NAME) endef -define BAREBOX_INSTALL_CUSTOM_ENV - cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR) +define $(1)_INSTALL_CUSTOM_ENV + cp $$(@D)/$$($(1)_ENV_NAME) $$(BINARIES_DIR) endef endif -define BAREBOX_BUILD_CMDS - $(BAREBOX_BUILD_BAREBOXENV_CMDS) - $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) - $(BAREBOX_BUILD_CUSTOM_ENV) +ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),) +define $(1)_KCONFIG_FIXUP_CMDS + $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) + $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") endef +endif -define BAREBOX_INSTALL_IMAGES_CMDS - if test -h $(@D)/barebox-flash-image ; then \ - cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \ +define $(1)_BUILD_CMDS + $$($(1)_BUILD_BAREBOXENV_CMDS) + $$(TARGET_MAKE_ENV) $$(MAKE) $$($(1)_MAKE_FLAGS) -C $$(@D) + $$($(1)_BUILD_CUSTOM_ENV) +endef + +$(1)_IMAGE_FILES = $$(call qstrip,$$(BR2_TARGET_$(1)_IMAGE_FILE)) + +define $(1)_INSTALL_IMAGES_CMDS + if test -n "$$($(1)_IMAGE_FILES)"; then \ + cp -L $$(foreach image,$$($(1)_IMAGE_FILES),$$(@D)/$$(image)) $$(BINARIES_DIR) ; \ + elif test -h $$(@D)/barebox-flash-image ; then \ + cp -L $$(@D)/barebox-flash-image $$(BINARIES_DIR)/barebox.bin ; \ else \ - cp $(@D)/barebox.bin $(BINARIES_DIR);\ + cp $$(@D)/barebox.bin $$(BINARIES_DIR);\ fi - $(BAREBOX_INSTALL_CUSTOM_ENV) + $$($(1)_INSTALL_CUSTOM_ENV) endef -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) -define BAREBOX_INSTALL_TARGET_CMDS - cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin +ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) +define $(1)_INSTALL_TARGET_CMDS + cp $$(@D)/bareboxenv $$(TARGET_DIR)/usr/bin endef endif -$(eval $(generic-package)) - -ifeq ($(BR2_TARGET_BAREBOX),y) -# we NEED a board defconfig file unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(BAREBOX_SOURCE_CONFIG),) -$(error No Barebox config file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings) +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($$(BR2_TARGET_$(1))$$(BR_BUILDING),yy) +# We must use the user-supplied kconfig value, because +# $(1)_KCONFIG_DEFCONFIG will at least contain the +# trailing _defconfig +ifeq ($$(or $$($(1)_KCONFIG_FILE),$$(call qstrip,$$(BR2_TARGET_$(1)_BOARD_DEFCONFIG))),) +$$(error No Barebox config. Check your BR2_TARGET_$(1)_BOARD_DEFCONFIG or BR2_TARGET_$(1)_CUSTOM_CONFIG_FILE settings) endif endif -barebox-menuconfig barebox-xconfig barebox-gconfig barebox-nconfig: barebox-configure - $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \ - $(subst barebox-,,$@) - rm -f $(BAREBOX_DIR)/.stamp_{built,target_installed,images_installed} +$$(eval $$(kconfig-package)) -barebox-savedefconfig: barebox-configure - $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \ - $(subst barebox-,,$@) +endef -ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y) -barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config - cp -f $(BAREBOX_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) +################################################################################ +# barebox-package -- the target generator macro for barebox packages +################################################################################ -barebox-update-defconfig: barebox-savedefconfig - cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE) -else -barebox-update-config: ; -barebox-update-defconfig: ; -endif +barebox-package=$(call inner-barebox-package,$(call UPPERCASE,$(pkgname))) + +include boot/barebox/barebox/barebox.mk +include boot/barebox/barebox-aux/barebox-aux.mk + +ifeq ($(BR2_TARGET_BAREBOX)$(BR2_TARGET_BAREBOX_LATEST_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(BAREBOX_SOURCE) endif diff --git a/buildroot/boot/barebox/barebox/Config.in b/buildroot/boot/barebox/barebox/Config.in new file mode 100644 index 000000000..958e294e4 --- /dev/null +++ b/buildroot/boot/barebox/barebox/Config.in @@ -0,0 +1,80 @@ +choice + prompt "Barebox configuration" + default BR2_TARGET_BAREBOX_USE_DEFCONFIG + +config BR2_TARGET_BAREBOX_USE_DEFCONFIG + bool "Using a defconfig" + +config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG + bool "Using a custom config file" + +endchoice + +config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG + string "board defconfig" + depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG + help + Name of the board for which Barebox should be built, without + the _defconfig suffix. + +config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG + help + Path to the barebox configuration file + +config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES + string "Additional configuration fragment files" + help + A space-separated list of configuration fragment files, + that will be merged to the main Barebox configuration file. + +config BR2_TARGET_BAREBOX_IMAGE_FILE + string "Image file names" + help + Space-separated list of barebox images which will be copied to + the images directory. + + If left empty, defaults to: + - barebox.bin for barebox versions older than 2012.10. + - barebox-flash-image for later versions. + +config BR2_TARGET_BAREBOX_BAREBOXENV + bool "bareboxenv tool in target" + help + Install bareboxenv tool in target. + +config BR2_TARGET_BAREBOX_CUSTOM_ENV + bool "Generate an environment image" + help + Generate a custom environment image. This environment will + contain the variables and scripts to be used at boot by + barebox. + +config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH + string "Environment path" + depends on BR2_TARGET_BAREBOX_CUSTOM_ENV + help + Path to the directory containing the custom barebox + environment. Depending on your setup, it will probably be + based on either the content of the defaultenv or + defaultenv-2 directories in the barebox source code, plus + the additions needed. The output will be an image in the + barebox devfs format, stored in the images directory, with + the same name as the directory name given here. + +config BR2_TARGET_BAREBOX_CUSTOM_EMBEDDED_ENV_PATH + string "Embedded environment path" + help + If this option is not empty, it is the path to a custom + embedded barebox environment. This image will be used when + the environment found in the environment sector is + invalid. This option sets the barebox Kconfig option + CONFIG_DEFAULT_ENVIRONMENT_PATH to the specified path. This + way it is possible to use Buildroot variables like + TOPDIR etc. to refer to the custom environment. + + Depending on your setup, the custom embedded environment + will probably be based on either the content of the + defaultenv or defaultenv-2 directories in the barebox source + code. diff --git a/buildroot/boot/barebox/barebox/barebox.hash b/buildroot/boot/barebox/barebox/barebox.hash new file mode 120000 index 000000000..b6462b808 --- /dev/null +++ b/buildroot/boot/barebox/barebox/barebox.hash @@ -0,0 +1 @@ +../barebox.hash \ No newline at end of file diff --git a/buildroot/boot/barebox/barebox/barebox.mk b/buildroot/boot/barebox/barebox/barebox.mk new file mode 100644 index 000000000..39afb0fcc --- /dev/null +++ b/buildroot/boot/barebox/barebox/barebox.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# barebox +# +################################################################################ + +define BAREBOX_HELP_CMDS + @echo ' barebox-menuconfig - Run barebox menuconfig' + @echo ' barebox-savedefconfig - Run barebox savedefconfig' +endef + +# Instantiate the barebox package +$(eval $(barebox-package)) diff --git a/buildroot/boot/binaries-marvell/Config.in b/buildroot/boot/binaries-marvell/Config.in new file mode 100644 index 000000000..80fbecb27 --- /dev/null +++ b/buildroot/boot/binaries-marvell/Config.in @@ -0,0 +1,12 @@ +config BR2_TARGET_BINARIES_MARVELL + bool "binaries-marvell" + depends on BR2_aarch64 + help + Some systems, including Marvell Armada SoC, have a separate + System Control Processor (SCP) for power management, clocks, + reset and system control. ATF Boot Loader stage 2 (BL2) loads + optional SCP_BL2 image into a platform-specific region + of secure memory. This package downloads and installs such + firmware, which is needed to build ATF. + + https://github.com/MarvellEmbeddedProcessors/binaries-marvell/ diff --git a/buildroot/boot/binaries-marvell/binaries-marvell.hash b/buildroot/boot/binaries-marvell/binaries-marvell.hash new file mode 100644 index 000000000..a7d5928a5 --- /dev/null +++ b/buildroot/boot/binaries-marvell/binaries-marvell.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 d818c95bcd4d5c026238d6e554151184ed7fea15bce1f861f9068b97b4cd320a binaries-marvell-c5d3ef2b63ba66d8717ecbe679fd2e639cde88ee.tar.gz +sha256 e6d08ef60068ee72c68835001a24eb832dcba27cac0dde0f179dfb428be050ca README.md diff --git a/buildroot/boot/binaries-marvell/binaries-marvell.mk b/buildroot/boot/binaries-marvell/binaries-marvell.mk new file mode 100644 index 000000000..1a27fa987 --- /dev/null +++ b/buildroot/boot/binaries-marvell/binaries-marvell.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# binaries-marvell +# +################################################################################ + +# This is version binaries-marvell-armada-18.12 +BINARIES_MARVELL_VERSION = c5d3ef2b63ba66d8717ecbe679fd2e639cde88ee +BINARIES_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(BINARIES_MARVELL_VERSION)) + +BINARIES_MARVELL_LICENSE = GPL-2.0 with freertos-exception-2.0 +BINARIES_MARVELL_LICENSE_FILES = README.md + +BINARIES_MARVELL_INSTALL_IMAGES = YES + +define BINARIES_MARVELL_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2.img $(BINARIES_DIR)/scp-fw.bin +endef + +$(eval $(generic-package)) diff --git a/buildroot/boot/boot-wrapper-aarch64/Config.in b/buildroot/boot/boot-wrapper-aarch64/Config.in index c4e63e23d..cf7389282 100644 --- a/buildroot/boot/boot-wrapper-aarch64/Config.in +++ b/buildroot/boot/boot-wrapper-aarch64/Config.in @@ -11,7 +11,7 @@ config BR2_TARGET_BOOT_WRAPPER_AARCH64 possible to start an Aarch64 kernel inside the available software simulators for the Aarch64 architecture. - git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git + git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git if BR2_TARGET_BOOT_WRAPPER_AARCH64 @@ -32,4 +32,15 @@ config BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS Kernel bootargs to embed inside the image generated by the boot wrapper. +config BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI + bool "Boot secondary SMP cores using PSCI" + help + Boot secondary SMP cores using PSCI firmware calls. If + disabled, the spin-table method is used instead. + +config BR2_TARGET_BOOT_WRAPPER_AARCH64_GICV3 + bool "Enable GICv3 instead of GICv2" + help + Boot using GICv3 instead of GICv2. + endif diff --git a/buildroot/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/buildroot/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk index c56bdeeea..117e11398 100644 --- a/buildroot/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk +++ b/buildroot/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk @@ -4,9 +4,9 @@ # ################################################################################ -BOOT_WRAPPER_AARCH64_VERSION = 4266507a84f8c06452109d38e0350d4759740694 -BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git -BOOT_WRAPPER_AARCH64_LICENSE = BSD3c +BOOT_WRAPPER_AARCH64_VERSION = fd74c8cbd0e17483d2299208cad9742bee605ca7 +BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git +BOOT_WRAPPER_AARCH64_LICENSE = BSD-3-Clause BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES @@ -15,21 +15,23 @@ BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES # Makefile. BOOT_WRAPPER_AARCH64_AUTORECONF = YES -BOOT_WRAPPER_AARCH64_DTB = /arch/arm64/boot/dts/$(basename $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))).dtb - -# Fixup the path to the DTB in configure.ac. In the future, this -# should hopefully be made more configurable by the -# boot-wrapper-aarch64 developers. -define BOOT_WRAPPER_AARCH64_FIX_DTB_NAME - $(SED) 's%^KERN_DTB=.*%KERN_DTB=$(BOOT_WRAPPER_AARCH64_DTB)%' $(@D)/configure.ac -endef - -BOOT_WRAPPER_AARCH64_PRE_PATCH_HOOKS += BOOT_WRAPPER_AARCH64_FIX_DTB_NAME +BOOT_WRAPPER_AARCH64_DTB = $(LINUX_DIR)/arch/arm64/boot/dts/$(basename $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))).dtb BOOT_WRAPPER_AARCH64_CONF_OPTS = \ --with-kernel-dir=$(LINUX_DIR) \ + --with-dtb=$(BOOT_WRAPPER_AARCH64_DTB) \ --with-cmdline=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS) +ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI),y) +BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-psci +else +BOOT_WRAPPER_AARCH64_CONF_OPTS += --disable-psci +endif + +ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_GICV3),y) +BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-gicv3 +endif + # We need to convince the configure script that the Linux kernel tree # exists, as well as the DTB and the kernel Image. Even though those # are available on the build machine, the configure script uses diff --git a/buildroot/boot/grub/Config.in b/buildroot/boot/grub/Config.in deleted file mode 100644 index 4db8642ac..000000000 --- a/buildroot/boot/grub/Config.in +++ /dev/null @@ -1,200 +0,0 @@ -config BR2_TARGET_GRUB - bool "grub" - depends on BR2_i386 || BR2_x86_64 - select BR2_HOSTARCH_NEEDS_IA32_COMPILER - help - The GRand Unified Bootloader for x86 systems. - - Some notes on creating a disk image with Grub installed: - 1. Create an empty disk image - dd if=/dev/zero of=disk.img bs=1M count=32 - 2. Create one primary partition - cfdisk -h 16 -s 63 disk.img - 3. Set up a loop device - sudo losetup -f disk.img - 4. Set up loop devices per partitions - sudo partx -a /dev/loop0 - 5. Create the ext2 filesystem - sudo mkfs.ext2 -L root /dev/loop0p1 - 6. Mount the filesystem - mount /dev/loop0p1 /mnt - 7. Extract the root filesystem - sudo tar -C /mnt -xf output/images/rootfs.tar - 8. Unmount the filesystem, clean up loop device - sudo umount /mnt - sudo partx -d /dev/loop0 - sudo losetup -d /dev/loop0 - 9. Install grub - output/host/sbin/grub --device-map=/dev/null - and in the grub shell, enter: - device (hd0) disk.img - geometry (hd0) 16 63 - root (hd0,0) - setup (hd0) - 10. Image is ready - Can be tested in Qemu, with: - qemu-system-{i386,x86-64} -hda disk.img - -if BR2_TARGET_GRUB - -config BR2_TARGET_GRUB_SPLASH - bool "Splashimage support" - help - Add support for splashimage. - - A splashimage is a 14-color indexed .xpm picture which is - displayed as background for the grub menu. See - http://www.katspace.org/computers/Grub_Splash/ for details - on how to generate a splashimage. - -config BR2_TARGET_GRUB_DISKLESS - bool "diskless support" - help - enable diskless support - -menu "filesystem drivers" - -config BR2_TARGET_GRUB_FS_EXT2 - bool "ext2" - default y - help - Enable support for the ext2 filesystem in Grub - -config BR2_TARGET_GRUB_FS_FAT - bool "FAT" - default y - help - Enable support for the FAT filesystem in Grub. - -config BR2_TARGET_GRUB_FS_ISO9660 - bool "ISO9660" - help - Enable support for the ISO9660 filesystem in Grub. - -config BR2_TARGET_GRUB_FS_JFS - bool "IBM JFS" - help - Enable support for the JFS filesystem in Grub. - -config BR2_TARGET_GRUB_FS_REISERFS - bool "ReiserFS" - help - Enable support for the ReiserFS filesystem in Grub. - -config BR2_TARGET_GRUB_FS_XFS - bool "SGI XFS" - help - Enable support for the XFS filesystem in Grub. - -endmenu - -menu "network drivers" - -config BR2_TARGET_GRUB_3c595 - bool "3Com595 driver" - help - enable 3Com595 driver - -config BR2_TARGET_GRUB_3c90x - bool "3Com90x driver" - help - enable 3Com90x driver - -config BR2_TARGET_GRUB_davicom - bool "Davicom driver" - help - enable Davicom driver - -config BR2_TARGET_GRUB_e1000 - bool "Etherexpress Pro/1000 driver" - help - enable Etherexpress Pro/1000 driver - -config BR2_TARGET_GRUB_eepro100 - bool "Etherexpress Pro/100 driver" - help - enable Etherexpress Pro/100 driver - -config BR2_TARGET_GRUB_epic100 - bool "SMC 83c170 EPIC/100 driver" - help - enable SMC 83c170 EPIC/100 driver - -config BR2_TARGET_GRUB_forcedeth - bool "Nvidia Geforce driver" - help - enable Nvidia Geforce driver - -config BR2_TARGET_GRUB_natsemi - bool "NatSemi DP8381x driver" - help - enable NatSemi DP8381x driver - -config BR2_TARGET_GRUB_ns83820 - bool "NS83820 driver" - help - enable NS83820 driver - -config BR2_TARGET_GRUB_ns8390 - bool "NE2000 PCI driver" - help - enable NE2000 PCI driver - -config BR2_TARGET_GRUB_pcnet32 - bool "AMD Lance/PCI PCNet/32 driver" - help - enable AMD Lance/PCI PCNet/32 driver - -config BR2_TARGET_GRUB_pnic - bool "Bochs Pseudo Nic driver" - help - enable Bochs Pseudo Nic driver - -config BR2_TARGET_GRUB_rtl8139 - bool "Realtek 8139 driver" - help - enable Realtek 8139 driver - -config BR2_TARGET_GRUB_r8169 - bool "Realtek 8169 driver" - help - enable Realtek 8169 driver - -config BR2_TARGET_GRUB_sis900 - bool "SIS 900 and SIS 7016 driver" - help - enable SIS 900 and SIS 7016 driver - -config BR2_TARGET_GRUB_tg3 - bool "Broadcom Tigon3 driver" - help - enable Broadcom Tigon3 driver - -config BR2_TARGET_GRUB_tulip - bool "Tulip driver" - help - enable Tulip driver - -config BR2_TARGET_GRUB_tlan - bool "TI ThunderLAN driver" - help - enable TI ThunderLAN driver - -config BR2_TARGET_GRUB_undi - bool "PXE UNDI driver" - help - enable PXE UNDI driver - -config BR2_TARGET_GRUB_via_rhine - bool "Rhine-I/II driver" - help - enable Rhine-I/II driver - -config BR2_TARGET_GRUB_w89c840 - bool "Winbond W89c840 driver" - help - enable Winbond W89c840 driver - -endmenu - -endif # BR2_TARGET_GRUB diff --git a/buildroot/boot/grub/grub.100-autoreconf.patch b/buildroot/boot/grub/grub.100-autoreconf.patch deleted file mode 100644 index e5dd8343a..000000000 --- a/buildroot/boot/grub/grub.100-autoreconf.patch +++ /dev/null @@ -1,1407 +0,0 @@ -diff -rup grub-0.97.oorig/aclocal.m4 grub-0.97/aclocal.m4 ---- grub-0.97.oorig/aclocal.m4 2005-05-08 04:41:18.000000000 +0200 -+++ grub-0.97/aclocal.m4 2006-03-12 14:00:35.000000000 +0100 -@@ -1,7 +1,7 @@ --# generated automatically by aclocal 1.9.4 -*- Autoconf -*- -+# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 --# Free Software Foundation, Inc. -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -+# 2005 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -11,23 +11,11 @@ - # even the implied warranty of MERCHANTABILITY or FITNESS FOR A - # PARTICULAR PURPOSE. - --# -*- Autoconf -*- --# Copyright (C) 2002, 2003 Free Software Foundation, Inc. --# Generated from amversion.in; do not edit by hand. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - - # AM_AUTOMAKE_VERSION(VERSION) - # ---------------------------- -@@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api - # Call AM_AUTOMAKE_VERSION so it can be traced. - # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -- [AM_AUTOMAKE_VERSION([1.9.4])]) -- --# AM_AUX_DIR_EXPAND -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -+ [AM_AUTOMAKE_VERSION([1.9.6])]) - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# AM_AUX_DIR_EXPAND -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets - # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -@@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl - am_aux_dir=`cd $ac_aux_dir && pwd` - ]) - --# AM_CONDITIONAL -*- Autoconf -*- -+# AM_CONDITIONAL -*- Autoconf -*- - --# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 6 -+# serial 7 - - # AM_CONDITIONAL(NAME, SHELL-CONDITION) - # ------------------------------------- -@@ -149,26 +116,15 @@ AC_CONFIG_COMMANDS_PRE( - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# serial 7 -*- Autoconf -*- - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 - # Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- -+# serial 8 - - # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be - # written in clear, in which case automake, when reading aclocal.m4, -@@ -177,7 +133,6 @@ fi])]) - # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -- - # _AM_DEPENDENCIES(NAME) - # ---------------------- - # See how the compiler implements dependency checking. -@@ -317,27 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_ - AC_SUBST([AMDEPBACKSLASH]) - ]) - --# Generate code to set up dependency tracking. -*- Autoconf -*- -- --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 --# Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# Generate code to set up dependency tracking. -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --#serial 2 -+#serial 3 - - # _AM_OUTPUT_DEPENDENCY_COMMANDS - # ------------------------------ -@@ -396,30 +340,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) - ]) - --# Do all the work for Automake. -*- Autoconf -*- -+# Do all the work for Automake. -*- Autoconf -*- - --# This macro actually does too much some checks are only needed if --# your package does certain things. But this isn't really a big deal. -- --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 - # Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# serial 12 - --# serial 11 -+# This macro actually does too much. Some checks are only needed if -+# your package does certain things. But this isn't really a big deal. - - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) - # AM_INIT_AUTOMAKE([OPTIONS]) -@@ -521,51 +454,27 @@ for _am_header in $config_headers :; do - done - echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ - # AM_PROG_INSTALL_SH - # ------------------ - # Define $install_sh. -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- - AC_DEFUN([AM_PROG_INSTALL_SH], - [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl - install_sh=${install_sh-"$am_aux_dir/install-sh"} - AC_SUBST(install_sh)]) - --# -*- Autoconf -*- --# Copyright (C) 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 1 -+# serial 2 - - # Check whether the underlying file-system supports filenames - # with a leading dot. For instance MS-DOS doesn't. -@@ -580,28 +489,17 @@ fi - rmdir .tst 2>/dev/null - AC_SUBST([am__leading_dot])]) - --# Add --enable-maintainer-mode option to configure. -+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- - # From Jim Meyering - --# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 -+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 - # Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- --# serial 3 -+# serial 4 - - AC_DEFUN([AM_MAINTAINER_MODE], - [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) -@@ -620,26 +518,15 @@ AC_DEFUN([AM_MAINTAINER_MODE], - - AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - --# Check to see how 'make' treats includes. -*- Autoconf -*- -- --# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -+# Check to see how 'make' treats includes. -*- Autoconf -*- - --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 2 -+# serial 3 - - # AM_MAKE_INCLUDE() - # ----------------- -@@ -683,27 +570,16 @@ AC_MSG_RESULT([$_am_result]) - rm -f confinc confmf - ]) - --# -*- Autoconf -*- -- -- --# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 3 -+# serial 4 - - # AM_MISSING_PROG(NAME, PROGRAM) - # ------------------------------ -@@ -729,27 +605,16 @@ else - fi - ]) - -+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ - # AM_PROG_MKDIR_P - # --------------- - # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -- --# Copyright (C) 2003, 2004 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- -+# - # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories - # created by `make install' are always world readable, even if the - # installer happens to have an overly restrictive umask (e.g. 077). -@@ -803,26 +668,15 @@ else - fi - AC_SUBST([mkdir_p])]) - --# Helper functions for option handling. -*- Autoconf -*- -+# Helper functions for option handling. -*- Autoconf -*- - --# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 2 -+# serial 3 - - # _AM_MANGLE_OPTION(NAME) - # ----------------------- -@@ -847,28 +701,16 @@ AC_DEFUN([_AM_SET_OPTIONS], - AC_DEFUN([_AM_IF_OPTION], - [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - --# --# Check to make sure that the build environment is sane. --# -- --# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -+# Check to make sure that the build environment is sane. -*- Autoconf -*- - --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -+# Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - --# serial 3 -+# serial 4 - - # AM_SANITY_CHECK - # --------------- -@@ -911,25 +753,14 @@ Check your system clock]) - fi - AC_MSG_RESULT(yes)]) - --# AM_PROG_INSTALL_STRIP -- --# Copyright (C) 2001, 2003 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - -+# AM_PROG_INSTALL_STRIP -+# --------------------- - # One issue with vendor `install' (even GNU) is that you can't - # specify the program used to strip binaries. This is especially - # annoying in cross-compiling environments, where the build's strip -@@ -952,25 +783,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) - - # Check how to create a tarball. -*- Autoconf -*- - --# Copyright (C) 2004 Free Software Foundation, Inc. -- --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2, or (at your option) --# any later version. -- --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA --# 02111-1307, USA. -- --# serial 1 -+# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. - -+# serial 2 - - # _AM_PROG_TAR(FORMAT) - # -------------------- -Only in grub-0.97/: autom4te.cache -diff -rup grub-0.97.oorig/configure grub-0.97/configure ---- grub-0.97.oorig/configure 2005-05-08 04:48:12.000000000 +0200 -+++ grub-0.97/configure 2006-03-12 14:00:38.000000000 +0100 -@@ -311,7 +311,7 @@ ac_includes_default="\ - # include - #endif" - --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE GRAPHICS_SUPPORT_TRUE GRAPHICS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -914,6 +914,7 @@ Optional Features: - set the default memory location for WD/SMC - --enable-cs-scan=LIST probe for CS89x0 base address using LIST - --enable-diskless enable diskless support -+ --disable-graphics disable graphics terminal support - --disable-hercules disable hercules terminal support - --disable-serial disable serial terminal support - --enable-serial-speed-simulation -@@ -1032,7 +1033,7 @@ esac - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi -- cd $ac_popdir -+ cd "$ac_popdir" - done - fi - -@@ -2631,8 +2632,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2690,8 +2690,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2807,8 +2806,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2862,8 +2860,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2908,8 +2905,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -2953,8 +2949,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3458,8 +3453,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3523,8 +3517,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3595,8 +3588,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -3656,8 +3648,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4095,8 +4086,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4161,8 +4151,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4234,8 +4223,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4300,8 +4288,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4366,8 +4353,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4440,8 +4426,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4506,8 +4491,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4597,8 +4581,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4673,8 +4656,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -4745,8 +4727,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5070,8 +5051,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5241,8 +5221,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5313,8 +5292,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && -- { ac_try='test -z "$ac_c_werror_flag" -- || test ! -s conftest.err' -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -@@ -5966,6 +5944,22 @@ else - fi - - -+# Check whether --enable-graphics or --disable-graphics was given. -+if test "${enable_graphics+set}" = set; then -+ enableval="$enable_graphics" -+ -+fi; -+ -+ -+if test "x$enable_graphics" != xno; then -+ GRAPHICS_SUPPORT_TRUE= -+ GRAPHICS_SUPPORT_FALSE='#' -+else -+ GRAPHICS_SUPPORT_TRUE='#' -+ GRAPHICS_SUPPORT_FALSE= -+fi -+ -+ - # Check whether --enable-hercules or --disable-hercules was given. - if test "${enable_hercules+set}" = set; then - enableval="$enable_hercules" -@@ -6270,6 +6264,13 @@ echo "$as_me: error: conditional \"DISKL - Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } - fi -+if test -z "${GRAPHICS_SUPPORT_TRUE}" && test -z "${GRAPHICS_SUPPORT_FALSE}"; then -+ { { echo "$as_me:$LINENO: error: conditional \"GRAPHICS_SUPPORT\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+echo "$as_me: error: conditional \"GRAPHICS_SUPPORT\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } -+fi - if test -z "${HERCULES_SUPPORT_TRUE}" && test -z "${HERCULES_SUPPORT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HERCULES_SUPPORT\" was never defined. - Usually this means the macro was only invoked conditionally." >&5 -@@ -6907,6 +6908,8 @@ s,@NETBOOT_SUPPORT_TRUE@,$NETBOOT_SUPPOR - s,@NETBOOT_SUPPORT_FALSE@,$NETBOOT_SUPPORT_FALSE,;t t - s,@DISKLESS_SUPPORT_TRUE@,$DISKLESS_SUPPORT_TRUE,;t t - s,@DISKLESS_SUPPORT_FALSE@,$DISKLESS_SUPPORT_FALSE,;t t -+s,@GRAPHICS_SUPPORT_TRUE@,$GRAPHICS_SUPPORT_TRUE,;t t -+s,@GRAPHICS_SUPPORT_FALSE@,$GRAPHICS_SUPPORT_FALSE,;t t - s,@HERCULES_SUPPORT_TRUE@,$HERCULES_SUPPORT_TRUE,;t t - s,@HERCULES_SUPPORT_FALSE@,$HERCULES_SUPPORT_FALSE,;t t - s,@SERIAL_SUPPORT_TRUE@,$SERIAL_SUPPORT_TRUE,;t t -@@ -7088,11 +7091,6 @@ esac - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - -- if test x"$ac_file" != x-; then -- { echo "$as_me:$LINENO: creating $ac_file" >&5 --echo "$as_me: creating $ac_file" >&6;} -- rm -f "$ac_file" -- fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ -@@ -7131,6 +7129,12 @@ echo "$as_me: error: cannot find input f - fi;; - esac - done` || { (exit 1); exit 1; } -+ -+ if test x"$ac_file" != x-; then -+ { echo "$as_me:$LINENO: creating $ac_file" >&5 -+echo "$as_me: creating $ac_file" >&6;} -+ rm -f "$ac_file" -+ fi - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -diff -rup grub-0.97.oorig/docs/Makefile.in grub-0.97/docs/Makefile.in ---- grub-0.97.oorig/docs/Makefile.in 2005-05-08 04:42:34.000000000 +0200 -+++ grub-0.97/docs/Makefile.in 2006-03-12 14:00:43.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -15,8 +15,6 @@ - @SET_MAKE@ - - --SOURCES = $(kernel_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -120,6 +118,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -@@ -304,9 +304,11 @@ kernel-kernel.obj: kernel.c - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && cd $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ -- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -- done; \ -+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ -+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ -+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ -+ done; \ -+ else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ -@@ -371,10 +373,11 @@ multiboot.dvi: multiboot.texi $(multiboo - multiboot.pdf: multiboot.texi $(multiboot_TEXINFOS) - multiboot.html: multiboot.texi $(multiboot_TEXINFOS) - .dvi.ps: -+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - - uninstall-info-am: -- $(PRE_UNINSTALL) -+ @$(PRE_UNINSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ -@@ -390,7 +393,7 @@ uninstall-info-am: - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd "$(DESTDIR)$(infodir)"; then \ -- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ -+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done -@@ -403,10 +406,13 @@ dist-info: $(INFO_DEPS) - $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ -- for file in $$d/$$base*; do \ -- relfile=`expr "$$file" : "$$d/\(.*\)"`; \ -- test -f $(distdir)/$$relfile || \ -- cp -p $$file $(distdir)/$$relfile; \ -+ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ -+ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ -+ if test -f $$file; then \ -+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ -+ test -f $(distdir)/$$relfile || \ -+ cp -p $$file $(distdir)/$$relfile; \ -+ else :; fi; \ - done; \ - done - -diff -rup grub-0.97.oorig/grub/Makefile.in grub-0.97/grub/Makefile.in ---- grub-0.97.oorig/grub/Makefile.in 2005-05-08 04:42:34.000000000 +0200 -+++ grub-0.97/grub/Makefile.in 2006-03-12 14:00:43.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -14,8 +14,6 @@ - - @SET_MAKE@ - --SOURCES = $(grub_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -diff -rup grub-0.97.oorig/lib/Makefile.in grub-0.97/lib/Makefile.in ---- grub-0.97.oorig/lib/Makefile.in 2005-05-08 04:42:35.000000000 +0200 -+++ grub-0.97/lib/Makefile.in 2006-03-12 14:00:44.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -14,8 +14,6 @@ - - @SET_MAKE@ - --SOURCES = $(libcommon_a_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -96,6 +94,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -diff -rup grub-0.97.oorig/Makefile.in grub-0.97/Makefile.in ---- grub-0.97.oorig/Makefile.in 2005-05-08 04:42:40.000000000 +0200 -+++ grub-0.97/Makefile.in 2006-03-12 14:00:49.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -101,6 +101,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -@@ -250,7 +252,13 @@ uninstall-info-am: - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @set fnord $$MAKEFLAGS; amf=$$2; \ -+ @failcom='exit 1'; \ -+ for f in x $$MAKEFLAGS; do \ -+ case $$f in \ -+ *=* | --[!k]*);; \ -+ *k*) failcom='fail=yes';; \ -+ esac; \ -+ done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ -@@ -262,7 +270,7 @@ $(RECURSIVE_TARGETS): - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ -+ || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ -@@ -270,7 +278,13 @@ $(RECURSIVE_TARGETS): - - mostlyclean-recursive clean-recursive distclean-recursive \ - maintainer-clean-recursive: -- @set fnord $$MAKEFLAGS; amf=$$2; \ -+ @failcom='exit 1'; \ -+ for f in x $$MAKEFLAGS; do \ -+ case $$f in \ -+ *=* | --[!k]*);; \ -+ *k*) failcom='fail=yes';; \ -+ esac; \ -+ done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ -@@ -291,7 +305,7 @@ maintainer-clean-recursive: - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ -+ || eval $$failcom; \ - done && test -z "$$fail" - tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ -diff -rup grub-0.97.oorig/netboot/Makefile.in grub-0.97/netboot/Makefile.in ---- grub-0.97.oorig/netboot/Makefile.in 2005-05-08 04:42:35.000000000 +0200 -+++ grub-0.97/netboot/Makefile.in 2006-03-12 14:00:44.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -14,8 +14,6 @@ - - @SET_MAKE@ - --SOURCES = $(libdrivers_a_SOURCES) $(EXTRA_libdrivers_a_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -diff -rup grub-0.97.oorig/stage1/Makefile.in grub-0.97/stage1/Makefile.in ---- grub-0.97.oorig/stage1/Makefile.in 2005-05-08 04:42:36.000000000 +0200 -+++ grub-0.97/stage1/Makefile.in 2006-03-12 14:00:45.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -15,8 +15,6 @@ - @SET_MAKE@ - - --SOURCES = $(stage1_exec_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -diff -rup grub-0.97.oorig/stage2/Makefile.in grub-0.97/stage2/Makefile.in ---- grub-0.97.oorig/stage2/Makefile.in 2005-05-08 04:42:39.000000000 +0200 -+++ grub-0.97/stage2/Makefile.in 2006-03-12 14:00:48.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -18,8 +18,6 @@ - - - --SOURCES = $(libgrub_a_SOURCES) $(diskless_exec_SOURCES) $(e2fs_stage1_5_exec_SOURCES) $(fat_stage1_5_exec_SOURCES) $(ffs_stage1_5_exec_SOURCES) $(iso9660_stage1_5_exec_SOURCES) $(jfs_stage1_5_exec_SOURCES) $(minix_stage1_5_exec_SOURCES) $(nbloader_exec_SOURCES) $(pre_stage2_exec_SOURCES) $(pxeloader_exec_SOURCES) $(reiserfs_stage1_5_exec_SOURCES) $(start_exec_SOURCES) $(start_eltorito_exec_SOURCES) $(ufs2_stage1_5_exec_SOURCES) $(vstafs_stage1_5_exec_SOURCES) $(xfs_stage1_5_exec_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -100,7 +98,7 @@ am_libgrub_a_OBJECTS = libgrub_a-boot.$( - libgrub_a-fsys_xfs.$(OBJEXT) libgrub_a-gunzip.$(OBJEXT) \ - libgrub_a-md5.$(OBJEXT) libgrub_a-serial.$(OBJEXT) \ - libgrub_a-stage2.$(OBJEXT) libgrub_a-terminfo.$(OBJEXT) \ -- libgrub_a-tparm.$(OBJEXT) -+ libgrub_a-tparm.$(OBJEXT) libgrub_a-graphics.$(OBJEXT) - libgrub_a_OBJECTS = $(am_libgrub_a_OBJECTS) - PROGRAMS = $(noinst_PROGRAMS) - am__objects_1 = diskless_exec-asm.$(OBJEXT) \ -@@ -125,7 +123,8 @@ am__objects_1 = diskless_exec-asm.$(OBJE - diskless_exec-serial.$(OBJEXT) \ - diskless_exec-smp-imps.$(OBJEXT) \ - diskless_exec-stage2.$(OBJEXT) \ -- diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT) -+ diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT) \ -+ diskless_exec-graphics.$(OBJEXT) - am_diskless_exec_OBJECTS = $(am__objects_1) - diskless_exec_OBJECTS = $(am_diskless_exec_OBJECTS) - diskless_exec_DEPENDENCIES = ../netboot/libdrivers.a -@@ -217,7 +216,8 @@ am_pre_stage2_exec_OBJECTS = pre_stage2_ - pre_stage2_exec-smp-imps.$(OBJEXT) \ - pre_stage2_exec-stage2.$(OBJEXT) \ - pre_stage2_exec-terminfo.$(OBJEXT) \ -- pre_stage2_exec-tparm.$(OBJEXT) -+ pre_stage2_exec-tparm.$(OBJEXT) \ -+ pre_stage2_exec-graphics.$(OBJEXT) - pre_stage2_exec_OBJECTS = $(am_pre_stage2_exec_OBJECTS) - @NETBOOT_SUPPORT_TRUE@pre_stage2_exec_DEPENDENCIES = \ - @NETBOOT_SUPPORT_TRUE@ ../netboot/libdrivers.a -@@ -344,6 +344,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ -@@ -435,7 +437,7 @@ noinst_HEADERS = apic.h defs.h dir.h dis - fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \ - imgact_aout.h iso9660.h jfs.h mb_header.h mb_info.h md5.h \ - nbi.h pc_slice.h serial.h shared.h smp-imps.h term.h \ -- terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h -+ terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h graphics.h - - EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) - -@@ -448,7 +450,7 @@ libgrub_a_SOURCES = boot.c builtins.c ch - disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \ - fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \ - fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c stage2.c \ -- terminfo.c tparm.c -+ terminfo.c tparm.c graphics.c - - libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ - -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -@@ -479,8 +481,10 @@ START_ELTORITO_LINK = -nostdlib -Wl,-N - - @SERIAL_SUPPORT_TRUE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1 - @HERCULES_SUPPORT_FALSE@HERCULES_FLAGS = - @HERCULES_SUPPORT_TRUE@HERCULES_FLAGS = -DSUPPORT_HERCULES=1 -+@GRAPHICS_SUPPORT_FALSE@GRAPHICS_FLAGS = -+@GRAPHICS_SUPPORT_TRUE@GRAPHICS_FLAGS = -DSUPPORT_GRAPHICS=1 - STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) -+ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS) - - STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 - STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 -@@ -490,7 +494,8 @@ pre_stage2_exec_SOURCES = asm.S bios.c b - cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \ - fsys_fat.c fsys_ffs.c fsys_iso9660.c fsys_jfs.c fsys_minix.c \ - fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c gunzip.c \ -- hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c -+ hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c \ -+ graphics.c - - pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) - pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) -@@ -766,6 +771,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_ufs2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_vstafs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_xfs.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-graphics.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-gunzip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-hercules.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-md5.Po@am__quote@ -@@ -820,6 +826,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_ufs2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_vstafs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_xfs.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-graphics.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-gunzip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-md5.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-serial.Po@am__quote@ -@@ -850,6 +857,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_ufs2.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_vstafs.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_xfs.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-graphics.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-gunzip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-hercules.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-md5.Po@am__quote@ -@@ -1367,6 +1375,20 @@ libgrub_a-tparm.obj: tparm.c - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` - -+libgrub_a-graphics.o: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.o -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c -+ -+libgrub_a-graphics.obj: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.obj -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` -+ - diskless_exec-bios.o: bios.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-bios.o -MD -MP -MF "$(DEPDIR)/diskless_exec-bios.Tpo" -c -o diskless_exec-bios.o `test -f 'bios.c' || echo '$(srcdir)/'`bios.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-bios.Tpo" "$(DEPDIR)/diskless_exec-bios.Po"; else rm -f "$(DEPDIR)/diskless_exec-bios.Tpo"; exit 1; fi -@@ -1731,6 +1753,20 @@ diskless_exec-tparm.obj: tparm.c - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` - -+diskless_exec-graphics.o: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.o -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c -+ -+diskless_exec-graphics.obj: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` -+ - e2fs_stage1_5_exec-common.o: common.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(e2fs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT e2fs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" -c -o e2fs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" "$(DEPDIR)/e2fs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo"; exit 1; fi -@@ -2599,6 +2635,20 @@ pre_stage2_exec-tparm.obj: tparm.c - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` - -+pre_stage2_exec-graphics.o: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.o -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c -+ -+pre_stage2_exec-graphics.obj: graphics.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` -+ - reiserfs_stage1_5_exec-common.o: common.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reiserfs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT reiserfs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" -c -o reiserfs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" "$(DEPDIR)/reiserfs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo"; exit 1; fi -diff -rup grub-0.97.oorig/util/Makefile.in grub-0.97/util/Makefile.in ---- grub-0.97.oorig/util/Makefile.in 2005-05-08 04:42:39.000000000 +0200 -+++ grub-0.97/util/Makefile.in 2006-03-12 14:00:48.000000000 +0100 -@@ -1,8 +1,8 @@ --# Makefile.in generated by automake 1.9.4 from Makefile.am. -+# Makefile.in generated by automake 1.9.6 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004 Free Software Foundation, Inc. -+# 2003, 2004, 2005 Free Software Foundation, Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -15,8 +15,6 @@ - @SET_MAKE@ - - --SOURCES = $(mbchk_SOURCES) -- - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ - VPATH = @srcdir@ -@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ - FSYS_CFLAGS = @FSYS_CFLAGS@ -+GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ -+GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ - GRUB_CFLAGS = @GRUB_CFLAGS@ - GRUB_LIBS = @GRUB_LIBS@ - HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ diff --git a/buildroot/boot/grub/grub.200-fix_mbr_handling.patch b/buildroot/boot/grub/grub.200-fix_mbr_handling.patch deleted file mode 100644 index 21e200f17..000000000 --- a/buildroot/boot/grub/grub.200-fix_mbr_handling.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: b/stage2/disk_io.c -=================================================================== ---- a/stage2/disk_io.c -+++ b/stage2/disk_io.c -@@ -365,7 +365,7 @@ - int - devwrite (unsigned int sector, int sector_count, char *buf) - { --#if defined(GRUB_UTIL) && defined(__linux__) -+#if defined(GRUB_UTIL) && defined(__linux__) && !defined(SUPPORT_LOOPDEV) - if (current_partition != 0xFFFFFF - && is_disk_device (device_map, current_drive)) - { diff --git a/buildroot/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch b/buildroot/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch deleted file mode 100644 index 8ed9d76c3..000000000 --- a/buildroot/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: b/grub/asmstub.c -=================================================================== ---- a/grub/asmstub.c -+++ b/grub/asmstub.c -@@ -18,10 +18,13 @@ - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -+#include -+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) - /* Try to use glibc's transparant LFS support. */ - #define _LARGEFILE_SOURCE 1 - /* lseek becomes synonymous with lseek64. */ - #define _FILE_OFFSET_BITS 64 -+#endif - - /* Simulator entry point. */ - int grub_stage2 (void); -Index: b/lib/device.c -=================================================================== ---- a/lib/device.c -+++ b/lib/device.c -@@ -18,10 +18,13 @@ - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -+#include -+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) - /* Try to use glibc's transparant LFS support. */ - #define _LARGEFILE_SOURCE 1 - /* lseek becomes synonymous with lseek64. */ - #define _FILE_OFFSET_BITS 64 -+#endif - - #include - #include diff --git a/buildroot/boot/grub/grub.400-nic_update2.patch b/buildroot/boot/grub/grub.400-nic_update2.patch deleted file mode 100644 index 5e3c16d46..000000000 --- a/buildroot/boot/grub/grub.400-nic_update2.patch +++ /dev/null @@ -1,47064 +0,0 @@ -Submitted By: Jim Gifford (patches at jg555 dot com) -Date: 2005-08-31 -Initial Package Version: 0.97 -Origin: OpenSolaris, Joe Ciccone, Jim Gifford -Upstream Status: N/A -Description: Adds support for Forcedeth and other NIC's - Fixes for GCC 4.x - Removal of bad network drivers - -Index: b/configure -=================================================================== ---- a/configure -+++ b/configure -@@ -872,47 +872,32 @@ - --disable-packet-retransmission - turn off packet retransmission - --enable-pci-direct access PCI directly instead of using BIOS -- --enable-3c509 enable 3Com509 driver -- --enable-3c529 enable 3Com529 driver - --enable-3c595 enable 3Com595 driver - --enable-3c90x enable 3Com90x driver -- --enable-cs89x0 enable CS89x0 driver - --enable-davicom enable Davicom driver -- --enable-depca enable DEPCA and EtherWORKS driver -- --enable-eepro enable Etherexpress Pro/10 driver -+ --enable-e1000 enable Etherexpress Pro/1000 driver - --enable-eepro100 enable Etherexpress Pro/100 driver - --enable-epic100 enable SMC 83c170 EPIC/100 driver -- --enable-3c507 enable 3Com507 driver -- --enable-exos205 enable EXOS205 driver -- --enable-ni5210 enable Racal-Interlan NI5210 driver -- --enable-lance enable Lance PCI PCNet/32 driver -- --enable-ne2100 enable Novell NE2100 driver -- --enable-ni6510 enable Racal-Interlan NI6510 driver -+ --enable-forcedeth enable Nvidia Geforce driver - --enable-natsemi enable NatSemi DP8381x driver -- --enable-ni5010 enable Racal-Interlan NI5010 driver -- --enable-3c503 enable 3Com503 driver -- --enable-ne enable NE1000/2000 ISA driver -+ --enable-ns83820 enable NS83820 driver - --enable-ns8390 enable NE2000 PCI driver -- --enable-wd enable WD8003/8013, SMC8216/8416 driver -- --enable-otulip enable old Tulip driver -+ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver -+ --enable-pnic enable Bochs Pseudo Nic driver - --enable-rtl8139 enable Realtek 8139 driver -+ --enable-r8169 enable Realtek 8169 driver - --enable-sis900 enable SIS 900 and SIS 7016 driver -- --enable-sk-g16 enable Schneider and Koch G16 driver -- --enable-smc9000 enable SMC9000 driver -- --enable-tiara enable Tiara driver -+ --enable-tg3 enable Broadcom Tigon3 driver - --enable-tulip enable Tulip driver -+ --enable-tlan enable TI ThunderLAN driver -+ --enable-undi enable PXE UNDI driver - --enable-via-rhine enable Rhine-I/II driver -- --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver -- --enable-3c503-shmem use 3c503 shared memory mode -- --enable-3c503-aui use AUI by default on 3c503 cards -+ --enable-w89c840 enable Winbond W89c840 driver - --enable-compex-rl2000-fix - specify this if you have a Compex RL2000 PCI -- --enable-smc9000-scan=LIST -- probe for SMC9000 I/O addresses using LIST - --enable-ne-scan=LIST probe for NE base address using LIST - --enable-wd-default-mem=MEM - set the default memory location for WD/SMC -- --enable-cs-scan=LIST probe for CS89x0 base address using LIST - --enable-diskless enable diskless support - --disable-graphics disable graphics terminal support - --disable-hercules disable hercules terminal support -@@ -5537,7 +5522,7 @@ - - fi; - if test "x$enable_packet_retransmission" != xno; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" -+ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" - fi - - # Check whether --enable-pci-direct or --disable-pci-direct was given. -@@ -5549,26 +5534,6 @@ - NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONFIG_PCI_DIRECT=1" - fi - --# Check whether --enable-3c509 or --disable-3c509 was given. --if test "${enable_3c509+set}" = set; then -- enableval="$enable_3c509" -- --fi; --if test "x$enable_3c509" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" --fi -- --# Check whether --enable-3c529 or --disable-3c529 was given. --if test "${enable_3c529+set}" = set; then -- enableval="$enable_3c529" -- --fi; --if test "x$enable_3c529" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" --fi -- - # Check whether --enable-3c595 or --disable-3c595 was given. - if test "${enable_3c595+set}" = set; then - enableval="$enable_3c595" -@@ -5589,16 +5554,6 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" - fi - --# Check whether --enable-cs89x0 or --disable-cs89x0 was given. --if test "${enable_cs89x0+set}" = set; then -- enableval="$enable_cs89x0" -- --fi; --if test "x$enable_cs89x0" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" --fi -- - # Check whether --enable-davicom or --disable-davicom was given. - if test "${enable_davicom+set}" = set; then - enableval="$enable_davicom" -@@ -5609,24 +5564,14 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" - fi - --# Check whether --enable-depca or --disable-depca was given. --if test "${enable_depca+set}" = set; then -- enableval="$enable_depca" -+# Check whether --enable-e1000 or --disable-e1000 was given. -+if test "${enable_e1000+set}" = set; then -+ enableval="$enable_e1000" - - fi; --if test "x$enable_depca" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" --fi -- --# Check whether --enable-eepro or --disable-eepro was given. --if test "${enable_eepro+set}" = set; then -- enableval="$enable_eepro" -- --fi; --if test "x$enable_eepro" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" -+if test "x$enable_e1000" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" - fi - - # Check whether --enable-eepro100 or --disable-eepro100 was given. -@@ -5649,64 +5594,14 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" - fi - --# Check whether --enable-3c507 or --disable-3c507 was given. --if test "${enable_3c507+set}" = set; then -- enableval="$enable_3c507" -- --fi; --if test "x$enable_3c507" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" --fi -- --# Check whether --enable-exos205 or --disable-exos205 was given. --if test "${enable_exos205+set}" = set; then -- enableval="$enable_exos205" -- --fi; --if test "x$enable_exos205" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" --fi -- --# Check whether --enable-ni5210 or --disable-ni5210 was given. --if test "${enable_ni5210+set}" = set; then -- enableval="$enable_ni5210" -- --fi; --if test "x$enable_ni5210" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" --fi -- --# Check whether --enable-lance or --disable-lance was given. --if test "${enable_lance+set}" = set; then -- enableval="$enable_lance" -- --fi; --if test "x$enable_lance" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" --fi -- --# Check whether --enable-ne2100 or --disable-ne2100 was given. --if test "${enable_ne2100+set}" = set; then -- enableval="$enable_ne2100" -- --fi; --if test "x$enable_ne2100" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" --fi -- --# Check whether --enable-ni6510 or --disable-ni6510 was given. --if test "${enable_ni6510+set}" = set; then -- enableval="$enable_ni6510" -+# Check whether --enable-forcedeth or --disable-forcedeth was given. -+if test "${enable_forcedeth+set}" = set; then -+ enableval="$enable_forcedeth" - - fi; --if test "x$enable_ni6510" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" -+if test "x$enable_forcedeth" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" - fi - - # Check whether --enable-natsemi or --disable-natsemi was given. -@@ -5719,34 +5614,14 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" - fi - --# Check whether --enable-ni5010 or --disable-ni5010 was given. --if test "${enable_ni5010+set}" = set; then -- enableval="$enable_ni5010" -+# Check whether --enable-ns83820 or --disable-ns83820 was given. -+if test "${enable_ns83820+set}" = set; then -+ enableval="$enable_ns83820" - - fi; --if test "x$enable_ni5010" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" --fi -- --# Check whether --enable-3c503 or --disable-3c503 was given. --if test "${enable_3c503+set}" = set; then -- enableval="$enable_3c503" -- --fi; --if test "x$enable_3c503" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" --fi -- --# Check whether --enable-ne or --disable-ne was given. --if test "${enable_ne+set}" = set; then -- enableval="$enable_ne" -- --fi; --if test "x$enable_ne" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" -+if test "x$enable_ns83820" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" - fi - - # Check whether --enable-ns8390 or --disable-ns8390 was given. -@@ -5759,24 +5634,24 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" - fi - --# Check whether --enable-wd or --disable-wd was given. --if test "${enable_wd+set}" = set; then -- enableval="$enable_wd" -+# Check whether --enable-pcnet32 or --disable-pcnet32 was given. -+if test "${enable_pcnet32+set}" = set; then -+ enableval="$enable_pcnet32" - - fi; --if test "x$enable_wd" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" -+if test "x$enable_pcnet32" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" - fi - --# Check whether --enable-otulip or --disable-otulip was given. --if test "${enable_otulip+set}" = set; then -- enableval="$enable_otulip" -+# Check whether --enable-pnic or --disable-pnic was given. -+if test "${enable_pnic+set}" = set; then -+ enableval="$enable_pnic" - - fi; --if test "x$enable_otulip" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" -+if test "x$enable_pnic" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" - fi - - # Check whether --enable-rtl8139 or --disable-rtl8139 was given. -@@ -5789,6 +5664,16 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" - fi - -+# Check whether --enable-r8169 or --disable-r8169 was given. -+if test "${enable_r8169+set}" = set; then -+ enableval="$enable_r8169" -+ -+fi; -+if test "x$enable_r8169" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" -+fi -+ - # Check whether --enable-sis900 or --disable-sis900 was given. - if test "${enable_sis900+set}" = set; then - enableval="$enable_sis900" -@@ -5799,34 +5684,14 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" - fi - --# Check whether --enable-sk-g16 or --disable-sk-g16 was given. --if test "${enable_sk_g16+set}" = set; then -- enableval="$enable_sk_g16" -- --fi; --if test "x$enable_sk_g16" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" --fi -- --# Check whether --enable-smc9000 or --disable-smc9000 was given. --if test "${enable_smc9000+set}" = set; then -- enableval="$enable_smc9000" -- --fi; --if test "x$enable_smc9000" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" --fi -- --# Check whether --enable-tiara or --disable-tiara was given. --if test "${enable_tiara+set}" = set; then -- enableval="$enable_tiara" -+# Check whether --enable-tg3 or --disable-tg3 was given. -+if test "${enable_tg3+set}" = set; then -+ enableval="$enable_tg3" - - fi; --if test "x$enable_tiara" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" -+if test "x$enable_tg3" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" - fi - - # Check whether --enable-tulip or --disable-tulip was given. -@@ -5839,6 +5704,16 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" - fi - -+# Check whether --enable-tlan or --disable-tlan was given. -+if test "${enable_tlan+set}" = set; then -+ enableval="$enable_tlan" -+ -+fi; -+if test "x$enable_tlan" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" -+fi -+ - # Check whether --enable-via-rhine or --disable-via-rhine was given. - if test "${enable_via_rhine+set}" = set; then - enableval="$enable_via_rhine" -@@ -5873,24 +5748,6 @@ - FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" - fi - --# Check whether --enable-3c503-shmem or --disable-3c503-shmem was given. --if test "${enable_3c503_shmem+set}" = set; then -- enableval="$enable_3c503_shmem" -- --fi; --if test "x$enable_3c503_shmem" = xyes; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" --fi -- --# Check whether --enable-3c503-aui or --disable-3c503-aui was given. --if test "${enable_3c503_aui+set}" = set; then -- enableval="$enable_3c503_aui" -- --fi; --if test "x$enable_3c503_aui" = xyes; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" --fi -- - # Check whether --enable-compex-rl2000-fix or --disable-compex-rl2000-fix was given. - if test "${enable_compex_rl2000_fix+set}" = set; then - enableval="$enable_compex_rl2000_fix" -@@ -5900,12 +5757,6 @@ - NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" - fi - --# Check whether --enable-smc9000-scan or --disable-smc9000-scan was given. --if test "${enable_smc9000_scan+set}" = set; then -- enableval="$enable_smc9000_scan" -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan" --fi; -- - # Check whether --enable-ne-scan or --disable-ne-scan was given. - if test "${enable_ne_scan+set}" = set; then - enableval="$enable_ne_scan" -@@ -5922,12 +5773,6 @@ - NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000" - fi; - --# Check whether --enable-cs-scan or --disable-cs-scan was given. --if test "${enable_cs_scan+set}" = set; then -- enableval="$enable_cs_scan" -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan" --fi; -- - # Check whether --enable-diskless or --disable-diskless was given. - if test "${enable_diskless+set}" = set; then - enableval="$enable_diskless" -Index: b/configure.ac -=================================================================== ---- a/configure.ac -+++ b/configure.ac -@@ -344,7 +344,7 @@ - [ --disable-packet-retransmission - turn off packet retransmission]) - if test "x$enable_packet_retransmission" != xno; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" -+ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" - fi - - AC_ARG_ENABLE(pci-direct, -@@ -354,20 +354,6 @@ - fi - - dnl Device drivers. --AC_ARG_ENABLE(3c509, -- [ --enable-3c509 enable 3Com509 driver]) --if test "x$enable_3c509" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" --fi -- --AC_ARG_ENABLE(3c529, -- [ --enable-3c529 enable 3Com529 driver]) --if test "x$enable_3c529" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" --fi -- - AC_ARG_ENABLE(3c595, - [ --enable-3c595 enable 3Com595 driver]) - if test "x$enable_3c595" = xyes; then -@@ -382,13 +368,6 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" - fi - --AC_ARG_ENABLE(cs89x0, -- [ --enable-cs89x0 enable CS89x0 driver]) --if test "x$enable_cs89x0" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" --fi -- - AC_ARG_ENABLE(davicom, - [ --enable-davicom enable Davicom driver]) - if test "x$enable_davicom" = xyes; then -@@ -396,18 +375,11 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" - fi - --AC_ARG_ENABLE(depca, -- [ --enable-depca enable DEPCA and EtherWORKS driver]) --if test "x$enable_depca" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" --fi -- --AC_ARG_ENABLE(eepro, -- [ --enable-eepro enable Etherexpress Pro/10 driver]) --if test "x$enable_eepro" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" -+AC_ARG_ENABLE(e1000, -+ [ --enable-e1000 enable Etherexpress Pro/1000 driver]) -+if test "x$enable_e1000" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" - fi - - AC_ARG_ENABLE(eepro100, -@@ -424,46 +396,11 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" - fi - --AC_ARG_ENABLE(3c507, -- [ --enable-3c507 enable 3Com507 driver]) --if test "x$enable_3c507" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" --fi -- --AC_ARG_ENABLE(exos205, -- [ --enable-exos205 enable EXOS205 driver]) --if test "x$enable_exos205" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" --fi -- --AC_ARG_ENABLE(ni5210, -- [ --enable-ni5210 enable Racal-Interlan NI5210 driver]) --if test "x$enable_ni5210" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" --fi -- --AC_ARG_ENABLE(lance, -- [ --enable-lance enable Lance PCI PCNet/32 driver]) --if test "x$enable_lance" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" --fi -- --AC_ARG_ENABLE(ne2100, -- [ --enable-ne2100 enable Novell NE2100 driver]) --if test "x$enable_ne2100" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" --fi -- --AC_ARG_ENABLE(ni6510, -- [ --enable-ni6510 enable Racal-Interlan NI6510 driver]) --if test "x$enable_ni6510" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" -+AC_ARG_ENABLE(forcedeth, -+ [ --enable-forcedeth enable Nvidia Geforce driver]) -+if test "x$enable_forcedeth" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" - fi - - AC_ARG_ENABLE(natsemi, -@@ -473,25 +410,11 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" - fi - --AC_ARG_ENABLE(ni5010, -- [ --enable-ni5010 enable Racal-Interlan NI5010 driver]) --if test "x$enable_ni5010" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" --fi -- --AC_ARG_ENABLE(3c503, -- [ --enable-3c503 enable 3Com503 driver]) --if test "x$enable_3c503" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" --fi -- --AC_ARG_ENABLE(ne, -- [ --enable-ne enable NE1000/2000 ISA driver]) --if test "x$enable_ne" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" -+AC_ARG_ENABLE(ns83820, -+ [ --enable-ns83820 enable NS83820 driver]) -+if test "x$enable_ns83820" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" - fi - - AC_ARG_ENABLE(ns8390, -@@ -501,18 +424,18 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" - fi - --AC_ARG_ENABLE(wd, -- [ --enable-wd enable WD8003/8013, SMC8216/8416 driver]) --if test "x$enable_wd" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" -+AC_ARG_ENABLE(pcnet32, -+ [ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver]) -+if test "x$enable_pcnet32" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" - fi - --AC_ARG_ENABLE(otulip, -- [ --enable-otulip enable old Tulip driver]) --if test "x$enable_otulip" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" -+AC_ARG_ENABLE(pnic, -+ [ --enable-pnic enable Bochs Pseudo Nic driver]) -+if test "x$enable_pnic" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" - fi - - AC_ARG_ENABLE(rtl8139, -@@ -522,6 +445,13 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" - fi - -+AC_ARG_ENABLE(r8169, -+ [ --enable-r8169 enable Realtek 8169 driver]) -+if test "x$enable_r8169" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" -+fi -+ - AC_ARG_ENABLE(sis900, - [ --enable-sis900 enable SIS 900 and SIS 7016 driver]) - if test "x$enable_sis900" = xyes; then -@@ -529,25 +459,11 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" - fi - --AC_ARG_ENABLE(sk-g16, -- [ --enable-sk-g16 enable Schneider and Koch G16 driver]) --if test "x$enable_sk_g16" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" --fi -- --AC_ARG_ENABLE(smc9000, -- [ --enable-smc9000 enable SMC9000 driver]) --if test "x$enable_smc9000" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" --fi -- --AC_ARG_ENABLE(tiara, -- [ --enable-tiara enable Tiara driver]) --if test "x$enable_tiara" = xyes; then -- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" -- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" -+AC_ARG_ENABLE(tg3, -+ [ --enable-tg3 enable Broadcom Tigon3 driver]) -+if test "x$enable_tg3" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" - fi - - AC_ARG_ENABLE(tulip, -@@ -557,6 +473,13 @@ - NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" - fi - -+AC_ARG_ENABLE(tlan, -+ [ --enable-tlan enable TI ThunderLAN driver]) -+if test "x$enable_tlan" = xyes; then -+ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" -+ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" -+fi -+ - AC_ARG_ENABLE(via-rhine, - [ --enable-via-rhine enable Rhine-I/II driver]) - if test "x$enable_via_rhine" = xyes; then -@@ -565,7 +488,7 @@ - fi - - AC_ARG_ENABLE(w89c840, -- [ --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver]) -+ [ --enable-w89c840 enable Winbond W89c840 driver]) - if test "x$enable_w89c840" = xyes; then - NET_CFLAGS="$NET_CFLAGS -DINCLUDE_W89C840=1" - NETBOOT_DRIVERS="$NETBOOT_DRIVERS w89c840.o" -@@ -577,19 +500,7 @@ - FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" - fi - --dnl Extra options. --AC_ARG_ENABLE(3c503-shmem, -- [ --enable-3c503-shmem use 3c503 shared memory mode]) --if test "x$enable_3c503_shmem" = xyes; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" --fi -- --AC_ARG_ENABLE(3c503-aui, -- [ --enable-3c503-aui use AUI by default on 3c503 cards]) --if test "x$enable_3c503_aui" = xyes; then -- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" --fi -- -+dnl extra flag for ns8390.c - AC_ARG_ENABLE(compex-rl2000-fix, - [ --enable-compex-rl2000-fix - specify this if you have a Compex RL2000 PCI]) -@@ -597,11 +508,6 @@ - NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" - fi - --AC_ARG_ENABLE(smc9000-scan, -- [ --enable-smc9000-scan=LIST -- probe for SMC9000 I/O addresses using LIST], -- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan"]) -- - AC_ARG_ENABLE(ne-scan, - [ --enable-ne-scan=LIST probe for NE base address using LIST], - [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNE_SCAN=$enable_ne_scan"], -@@ -613,10 +519,6 @@ - [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=$enable_wd_default_mem"], - [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000"]) - --AC_ARG_ENABLE(cs-scan, -- [ --enable-cs-scan=LIST probe for CS89x0 base address using LIST], -- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan"]) -- - dnl Diskless - AC_ARG_ENABLE(diskless, - [ --enable-diskless enable diskless support]) -Index: b/netboot/3c509.h -=================================================================== ---- a/netboot/3c509.h -+++ /dev/null -@@ -1,397 +0,0 @@ --/* -- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. -- * -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions are -- * met: 1. Redistributions of source code must retain the above copyright -- * notice, this list of conditions and the following disclaimer. 2. The name -- * of the author may not be used to endorse or promote products derived from -- * this software withough specific prior written permission -- * -- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- * -- * if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by: -- * -- October 2, 1994 -- -- Modified by: Andres Vega Garcia -- -- INRIA - Sophia Antipolis, France -- e-mail: avega@sophia.inria.fr -- finger: avega@pax.inria.fr -- -- */ -- --/* -- * Ethernet software status per interface. -- */ --/* -- * Some global constants -- */ -- --#define TX_INIT_RATE 16 --#define TX_INIT_MAX_RATE 64 --#define RX_INIT_LATENCY 64 --#define RX_INIT_EARLY_THRESH 64 --#define MIN_RX_EARLY_THRESHF 16 /* not less than ether_header */ --#define MIN_RX_EARLY_THRESHL 4 -- --#define EEPROMSIZE 0x40 --#define MAX_EEPROMBUSY 1000 --#define EP_LAST_TAG 0xd7 --#define EP_MAX_BOARDS 16 --#define EP_ID_PORT 0x100 -- --/* -- * some macros to acces long named fields -- */ --#define IS_BASE (eth_nic_base) --#define BASE (eth_nic_base) -- --/* -- * Commands to read/write EEPROM trough EEPROM command register (Window 0, -- * Offset 0xa) -- */ --#define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */ --#define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */ --#define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */ --#define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */ -- --#define EEPROM_BUSY (1<<15) --#define EEPROM_TST_MODE (1<<14) -- --/* -- * Some short functions, worth to let them be a macro -- */ --#define is_eeprom_busy(b) (inw((b)+EP_W0_EEPROM_COMMAND)&EEPROM_BUSY) --#define GO_WINDOW(x) outw(WINDOW_SELECT|(x), BASE+EP_COMMAND) -- --/************************************************************************** -- * -- * These define the EEPROM data structure. They are used in the probe -- * function to verify the existance of the adapter after having sent -- * the ID_Sequence. -- * -- * There are others but only the ones we use are defined here. -- * -- **************************************************************************/ -- --#define EEPROM_NODE_ADDR_0 0x0 /* Word */ --#define EEPROM_NODE_ADDR_1 0x1 /* Word */ --#define EEPROM_NODE_ADDR_2 0x2 /* Word */ --#define EEPROM_PROD_ID 0x3 /* 0x9[0-f]50 */ --#define EEPROM_MFG_ID 0x7 /* 0x6d50 */ --#define EEPROM_ADDR_CFG 0x8 /* Base addr */ --#define EEPROM_RESOURCE_CFG 0x9 /* IRQ. Bits 12-15 */ -- --/************************************************************************** -- * -- * These are the registers for the 3Com 3c509 and their bit patterns when -- * applicable. They have been taken out the the "EtherLink III Parallel -- * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual -- * from 3com. -- * -- **************************************************************************/ -- --#define EP_COMMAND 0x0e /* Write. BASE+0x0e is always a -- * command reg. */ --#define EP_STATUS 0x0e /* Read. BASE+0x0e is always status -- * reg. */ --#define EP_WINDOW 0x0f /* Read. BASE+0x0f is always window -- * reg. */ --/* -- * Window 0 registers. Setup. -- */ --/* Write */ --#define EP_W0_EEPROM_DATA 0x0c --#define EP_W0_EEPROM_COMMAND 0x0a --#define EP_W0_RESOURCE_CFG 0x08 --#define EP_W0_ADDRESS_CFG 0x06 --#define EP_W0_CONFIG_CTRL 0x04 --/* Read */ --#define EP_W0_PRODUCT_ID 0x02 --#define EP_W0_MFG_ID 0x00 -- --/* -- * Window 1 registers. Operating Set. -- */ --/* Write */ --#define EP_W1_TX_PIO_WR_2 0x02 --#define EP_W1_TX_PIO_WR_1 0x00 --/* Read */ --#define EP_W1_FREE_TX 0x0c --#define EP_W1_TX_STATUS 0x0b /* byte */ --#define EP_W1_TIMER 0x0a /* byte */ --#define EP_W1_RX_STATUS 0x08 --#define EP_W1_RX_PIO_RD_2 0x02 --#define EP_W1_RX_PIO_RD_1 0x00 -- --/* -- * Window 2 registers. Station Address Setup/Read -- */ --/* Read/Write */ --#define EP_W2_ADDR_5 0x05 --#define EP_W2_ADDR_4 0x04 --#define EP_W2_ADDR_3 0x03 --#define EP_W2_ADDR_2 0x02 --#define EP_W2_ADDR_1 0x01 --#define EP_W2_ADDR_0 0x00 -- --/* -- * Window 3 registers. FIFO Management. -- */ --/* Read */ --#define EP_W3_FREE_TX 0x0c --#define EP_W3_FREE_RX 0x0a -- --/* -- * Window 4 registers. Diagnostics. -- */ --/* Read/Write */ --#define EP_W4_MEDIA_TYPE 0x0a --#define EP_W4_CTRLR_STATUS 0x08 --#define EP_W4_NET_DIAG 0x06 --#define EP_W4_FIFO_DIAG 0x04 --#define EP_W4_HOST_DIAG 0x02 --#define EP_W4_TX_DIAG 0x00 -- --/* -- * Window 5 Registers. Results and Internal status. -- */ --/* Read */ --#define EP_W5_READ_0_MASK 0x0c --#define EP_W5_INTR_MASK 0x0a --#define EP_W5_RX_FILTER 0x08 --#define EP_W5_RX_EARLY_THRESH 0x06 --#define EP_W5_TX_AVAIL_THRESH 0x02 --#define EP_W5_TX_START_THRESH 0x00 -- --/* -- * Window 6 registers. Statistics. -- */ --/* Read/Write */ --#define TX_TOTAL_OK 0x0c --#define RX_TOTAL_OK 0x0a --#define TX_DEFERRALS 0x08 --#define RX_FRAMES_OK 0x07 --#define TX_FRAMES_OK 0x06 --#define RX_OVERRUNS 0x05 --#define TX_COLLISIONS 0x04 --#define TX_AFTER_1_COLLISION 0x03 --#define TX_AFTER_X_COLLISIONS 0x02 --#define TX_NO_SQE 0x01 --#define TX_CD_LOST 0x00 -- --/**************************************** -- * -- * Register definitions. -- * -- ****************************************/ -- --/* -- * Command register. All windows. -- * -- * 16 bit register. -- * 15-11: 5-bit code for command to be executed. -- * 10-0: 11-bit arg if any. For commands with no args; -- * this can be set to anything. -- */ --#define GLOBAL_RESET (unsigned short) 0x0000 /* Wait at least 1ms -- * after issuing */ --#define WINDOW_SELECT (unsigned short) (0x1<<11) --#define START_TRANSCEIVER (unsigned short) (0x2<<11) /* Read ADDR_CFG reg to -- * determine whether -- * this is needed. If -- * so; wait 800 uSec -- * before using trans- -- * ceiver. */ --#define RX_DISABLE (unsigned short) (0x3<<11) /* state disabled on -- * power-up */ --#define RX_ENABLE (unsigned short) (0x4<<11) --#define RX_RESET (unsigned short) (0x5<<11) --#define RX_DISCARD_TOP_PACK (unsigned short) (0x8<<11) --#define TX_ENABLE (unsigned short) (0x9<<11) --#define TX_DISABLE (unsigned short) (0xa<<11) --#define TX_RESET (unsigned short) (0xb<<11) --#define REQ_INTR (unsigned short) (0xc<<11) --#define SET_INTR_MASK (unsigned short) (0xe<<11) --#define SET_RD_0_MASK (unsigned short) (0xf<<11) --#define SET_RX_FILTER (unsigned short) (0x10<<11) --#define FIL_INDIVIDUAL (unsigned short) (0x1) --#define FIL_GROUP (unsigned short) (0x2) --#define FIL_BRDCST (unsigned short) (0x4) --#define FIL_ALL (unsigned short) (0x8) --#define SET_RX_EARLY_THRESH (unsigned short) (0x11<<11) --#define SET_TX_AVAIL_THRESH (unsigned short) (0x12<<11) --#define SET_TX_START_THRESH (unsigned short) (0x13<<11) --#define STATS_ENABLE (unsigned short) (0x15<<11) --#define STATS_DISABLE (unsigned short) (0x16<<11) --#define STOP_TRANSCEIVER (unsigned short) (0x17<<11) --/* -- * The following C_* acknowledge the various interrupts. Some of them don't -- * do anything. See the manual. -- */ --#define ACK_INTR (unsigned short) (0x6800) --#define C_INTR_LATCH (unsigned short) (ACK_INTR|0x1) --#define C_CARD_FAILURE (unsigned short) (ACK_INTR|0x2) --#define C_TX_COMPLETE (unsigned short) (ACK_INTR|0x4) --#define C_TX_AVAIL (unsigned short) (ACK_INTR|0x8) --#define C_RX_COMPLETE (unsigned short) (ACK_INTR|0x10) --#define C_RX_EARLY (unsigned short) (ACK_INTR|0x20) --#define C_INT_RQD (unsigned short) (ACK_INTR|0x40) --#define C_UPD_STATS (unsigned short) (ACK_INTR|0x80) -- --/* -- * Status register. All windows. -- * -- * 15-13: Window number(0-7). -- * 12: Command_in_progress. -- * 11: reserved. -- * 10: reserved. -- * 9: reserved. -- * 8: reserved. -- * 7: Update Statistics. -- * 6: Interrupt Requested. -- * 5: RX Early. -- * 4: RX Complete. -- * 3: TX Available. -- * 2: TX Complete. -- * 1: Adapter Failure. -- * 0: Interrupt Latch. -- */ --#define S_INTR_LATCH (unsigned short) (0x1) --#define S_CARD_FAILURE (unsigned short) (0x2) --#define S_TX_COMPLETE (unsigned short) (0x4) --#define S_TX_AVAIL (unsigned short) (0x8) --#define S_RX_COMPLETE (unsigned short) (0x10) --#define S_RX_EARLY (unsigned short) (0x20) --#define S_INT_RQD (unsigned short) (0x40) --#define S_UPD_STATS (unsigned short) (0x80) --#define S_5_INTS (S_CARD_FAILURE|S_TX_COMPLETE|\ -- S_TX_AVAIL|S_RX_COMPLETE|S_RX_EARLY) --#define S_COMMAND_IN_PROGRESS (unsigned short) (0x1000) -- --/* -- * FIFO Registers. -- * RX Status. Window 1/Port 08 -- * -- * 15: Incomplete or FIFO empty. -- * 14: 1: Error in RX Packet 0: Incomplete or no error. -- * 13-11: Type of error. -- * 1000 = Overrun. -- * 1011 = Run Packet Error. -- * 1100 = Alignment Error. -- * 1101 = CRC Error. -- * 1001 = Oversize Packet Error (>1514 bytes) -- * 0010 = Dribble Bits. -- * (all other error codes, no errors.) -- * -- * 10-0: RX Bytes (0-1514) -- */ --#define ERR_RX_INCOMPLETE (unsigned short) (0x1<<15) --#define ERR_RX (unsigned short) (0x1<<14) --#define ERR_RX_OVERRUN (unsigned short) (0x8<<11) --#define ERR_RX_RUN_PKT (unsigned short) (0xb<<11) --#define ERR_RX_ALIGN (unsigned short) (0xc<<11) --#define ERR_RX_CRC (unsigned short) (0xd<<11) --#define ERR_RX_OVERSIZE (unsigned short) (0x9<<11) --#define ERR_RX_DRIBBLE (unsigned short) (0x2<<11) -- --/* -- * FIFO Registers. -- * TX Status. Window 1/Port 0B -- * -- * Reports the transmit status of a completed transmission. Writing this -- * register pops the transmit completion stack. -- * -- * Window 1/Port 0x0b. -- * -- * 7: Complete -- * 6: Interrupt on successful transmission requested. -- * 5: Jabber Error (TP Only, TX Reset required. ) -- * 4: Underrun (TX Reset required. ) -- * 3: Maximum Collisions. -- * 2: TX Status Overflow. -- * 1-0: Undefined. -- * -- */ --#define TXS_COMPLETE 0x80 --#define TXS_SUCCES_INTR_REQ 0x40 --#define TXS_JABBER 0x20 --#define TXS_UNDERRUN 0x10 --#define TXS_MAX_COLLISION 0x8 --#define TXS_STATUS_OVERFLOW 0x4 -- --/* -- * Configuration control register. -- * Window 0/Port 04 -- */ --/* Read */ --#define IS_AUI (1<<13) --#define IS_BNC (1<<12) --#define IS_UTP (1<<9) --/* Write */ --#define ENABLE_DRQ_IRQ 0x0001 --#define W0_P4_CMD_RESET_ADAPTER 0x4 --#define W0_P4_CMD_ENABLE_ADAPTER 0x1 --/* -- * Media type and status. -- * Window 4/Port 0A -- */ --#define ENABLE_UTP 0xc0 --#define DISABLE_UTP 0x0 -- --/* -- * Resource control register -- */ -- --#define SET_IRQ(i) ( ((i)<<12) | 0xF00) /* set IRQ i */ -- --/* -- * Receive status register -- */ -- --#define RX_BYTES_MASK (unsigned short) (0x07ff) --#define RX_ERROR 0x4000 --#define RX_INCOMPLETE 0x8000 -- -- --/* -- * Misc defines for various things. -- */ --#define ACTIVATE_ADAPTER_TO_CONFIG 0xff /* to the id_port */ --#define MFG_ID 0x6d50 /* in EEPROM and W0 ADDR_CONFIG */ --#define PROD_ID 0x9150 -- --#define AUI 0x1 --#define BNC 0x2 --#define UTP 0x4 -- --#define RX_BYTES_MASK (unsigned short) (0x07ff) -- -- /* EISA support */ --#define EP_EISA_START 0x1000 --#define EP_EISA_W0 0x0c80 -- --#ifdef INCLUDE_3C529 -- /* MCA support */ --#define MCA_MOTHERBOARD_SETUP_REG 0x94 --#define MCA_ADAPTER_SETUP_REG 0x96 --#define MCA_MAX_SLOT_NR 8 --#define MCA_POS_REG(n) (0x100+(n)) --#endif -- --/* -- * Local variables: -- * c-basic-offset: 8 -- * End: -- */ -Index: b/netboot/3c595.c -=================================================================== ---- a/netboot/3c595.c -+++ b/netboot/3c595.c -@@ -20,6 +20,7 @@ - * - * Copyright (c) 1994 Herb Peyerl - * -+* timlegge 08-24-2003 Add Multicast Support - */ - - /* #define EDEBUG */ -@@ -30,7 +31,7 @@ - #include "3c595.h" - #include "timer.h" - --static unsigned short eth_nic_base, eth_asic_base; -+static unsigned short eth_nic_base; - static unsigned short vx_connector, vx_connectors; - - static struct connector_entry { -@@ -57,14 +58,12 @@ - static void vxgetlink(void); - static void vxsetlink(void); - --#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) -- - /************************************************************************** - ETH_RESET - Reset adapter - ***************************************************************************/ - static void t595_reset(struct nic *nic) - { -- int i, j; -+ int i; - - /*********************************************************** - Reset 3Com 595 card -@@ -133,7 +132,7 @@ - outw(ACK_INTR | 0xff, BASE + VX_COMMAND); - - outw(SET_RX_FILTER | FIL_INDIVIDUAL | -- FIL_BRDCST, BASE + VX_COMMAND); -+ FIL_BRDCST|FIL_MULTICAST, BASE + VX_COMMAND); - - vxsetlink(); - /*{ -@@ -225,10 +224,9 @@ - /************************************************************************** - ETH_POLL - Wait for a frame - ***************************************************************************/ --static int t595_poll(struct nic *nic) -+static int t595_poll(struct nic *nic, int retrieve) - { - /* common variables */ -- unsigned short type = 0; /* used by EDEBUG */ - /* variables for 3C595 */ - short status, cst; - register short rx_fifo; -@@ -262,6 +260,8 @@ - if (rx_fifo==0) - return 0; - -+ if ( ! retrieve ) return 1; -+ - /* read packet */ - #ifdef EDEBUG - printf("[l=%d",rx_fifo); -@@ -300,12 +300,15 @@ - outw(RX_DISCARD_TOP_PACK, BASE + VX_COMMAND); - while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); - #ifdef EDEBUG -+{ -+ unsigned short type = 0; /* used by EDEBUG */ - type = (nic->packet[12]<<8) | nic->packet[13]; - if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+ - nic->packet[5] == 0xFF*ETH_ALEN) - printf(",t=%hX,b]",type); - else - printf(",t=%hX]",type); -+} - #endif - return 1; - } -@@ -382,9 +385,8 @@ - static void - vxsetlink(void) - { -- int i, j, k; -+ int i, j; - char *reason, *warning; -- static short prev_flags; - static char prev_conn = -1; - - if (prev_conn == -1) { -@@ -438,28 +440,47 @@ - GO_WINDOW(1); - } - --static void t595_disable(struct nic *nic) -+static void t595_disable(struct dev *dev) - { -- outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); -- udelay(8000); -- GO_WINDOW(4); -- outw(0, BASE + VX_W4_MEDIA_TYPE); -- GO_WINDOW(1); -+ struct nic *nic = (struct nic *)dev; -+ t595_reset(nic); -+ -+ outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); -+ udelay(8000); -+ GO_WINDOW(4); -+ outw(0, BASE + VX_W4_MEDIA_TYPE); -+ GO_WINDOW(1); -+} -+ -+static void t595_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } - } - - /************************************************************************** - ETH_PROBE - Look for an adapter - ***************************************************************************/ --struct nic *t595_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) -+static int t595_probe(struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; - int i; - unsigned short *p; - -- if (probeaddrs == 0 || probeaddrs[0] == 0) -+ if (pci->ioaddr == 0) - return 0; - /* eth_nic_base = probeaddrs[0] & ~3; */ - eth_nic_base = pci->ioaddr; - -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ - GO_WINDOW(0); - outw(GLOBAL_RESET, BASE + VX_COMMAND); - VX_BUSY_WAIT; -@@ -487,14 +508,40 @@ - printf("Ethernet address: %!\n", nic->node_addr); - - t595_reset(nic); -- nic->reset = t595_reset; -- nic->poll = t595_poll; -+ dev->disable = t595_disable; -+ nic->poll = t595_poll; - nic->transmit = t595_transmit; -- nic->disable = t595_disable; -- return nic; -+ nic->irq = t595_irq; -+ return 1; - - } - -+static struct pci_id t595_nics[] = { -+PCI_ROM(0x10b7, 0x5900, "3c590", "3Com590"), /* Vortex 10Mbps */ -+PCI_ROM(0x10b7, 0x5950, "3c595", "3Com595"), /* Vortex 100baseTx */ -+PCI_ROM(0x10b7, 0x5951, "3c595-1", "3Com595"), /* Vortex 100baseT4 */ -+PCI_ROM(0x10b7, 0x5952, "3c595-2", "3Com595"), /* Vortex 100base-MII */ -+PCI_ROM(0x10b7, 0x9000, "3c900-tpo", "3Com900-TPO"), /* 10 Base TPO */ -+PCI_ROM(0x10b7, 0x9001, "3c900-t4", "3Com900-Combo"), /* 10/100 T4 */ -+PCI_ROM(0x10b7, 0x9004, "3c900b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ -+PCI_ROM(0x10b7, 0x9005, "3c900b-combo", "3Com900B-Combo"), /* 10 Base Combo */ -+PCI_ROM(0x10b7, 0x9006, "3c900b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ -+PCI_ROM(0x10b7, 0x900a, "3c900b-fl", "3Com900B-FL"), /* 10 Base F */ -+PCI_ROM(0x10b7, 0x9800, "3c980-cyclone-1", "3Com980-Cyclone"), /* Cyclone */ -+PCI_ROM(0x10b7, 0x9805, "3c9805-1", "3Com9805"), /* Dual Port Server Cyclone */ -+PCI_ROM(0x10b7, 0x7646, "3csoho100-tx-1", "3CSOHO100-TX"), /* Hurricane */ -+PCI_ROM(0x10b7, 0x4500, "3c450-1", "3Com450 HomePNA Tornado"), -+}; -+ -+struct pci_driver t595_driver = { -+ .type = NIC_DRIVER, -+ .name = "3C595", -+ .probe = t595_probe, -+ .ids = t595_nics, -+ .id_count = sizeof(t595_nics)/sizeof(t595_nics[0]), -+ .class = 0, -+}; -+ - /* - * Local variables: - * c-basic-offset: 8 -Index: b/netboot/3c90x.c -=================================================================== ---- a/netboot/3c90x.c -+++ b/netboot/3c90x.c -@@ -1,7 +1,7 @@ - /* - * 3c90x.c -- This file implements the 3c90x driver for etherboot. Written - * by Greg Beeley, Greg.Beeley@LightSys.org. Modified by Steve Smith, -- * Steve.Smith@Juno.Com -+ * Steve.Smith@Juno.Com. Alignment bug fix Neil Newell (nn@icenoir.net). - * - * This program Copyright (C) 1999 LightSys Technology Services, Inc. - * Portions Copyright (C) 1999 Steve Smith -@@ -31,13 +31,15 @@ - * Re-wrote poll and transmit for - * better error recovery and heavy - * network traffic operation -+ * v2.01 5-26-2003 NN Fixed driver alignment issue which -+ * caused system lockups if driver structures -+ * not 8-byte aligned. - * - */ - - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - #include "timer.h" - - #define XCVR_MAGIC (0x5A00) -@@ -47,9 +49,6 @@ - **/ - #define XMIT_RETRIES 250 - --#undef virt_to_bus --#define virt_to_bus(x) ((unsigned long)x) -- - /*** Register definitions for the 3c905 ***/ - enum Registers - { -@@ -225,7 +224,7 @@ - unsigned int DataAddr; - unsigned int DataLength; - } -- TXD; -+ TXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ - - /*** RX descriptor ***/ - typedef struct -@@ -235,7 +234,7 @@ - unsigned int DataAddr; - unsigned int DataLength; - } -- RXD; -+ RXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ - - /*** Global variables ***/ - static struct -@@ -311,6 +310,7 @@ - } - - -+#if 0 - /*** a3c90x_internal_WriteEepromWord - write a physical word of - *** data to the onboard serial eeprom (not the BIOS prom, but the - *** nvram in the card that stores, among other things, the MAC -@@ -344,8 +344,9 @@ - - return 0; - } -+#endif - -- -+#if 0 - /*** a3c90x_internal_WriteEeprom - write data to the serial eeprom, - *** and re-compute the eeprom checksum. - ***/ -@@ -384,8 +385,7 @@ - - return 0; - } -- -- -+#endif - - /*** a3c90x_reset: exported function that resets the card to its default - *** state. This is so the Linux driver can re-set the card up the way -@@ -393,12 +393,10 @@ - *** not alter the selected transceiver that we used to download the boot - *** image. - ***/ --static void --a3c90x_reset(struct nic *nic) -+static void a3c90x_reset(void) - { -- int cfg; -- - #ifdef CFG_3C90X_PRESERVE_XCVR -+ int cfg; - /** Read the current InternalConfig value. **/ - a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winTxRxOptions3); - cfg = inl(INF_3C90X.IOAddr + regInternalConfig_3_l); -@@ -473,7 +471,7 @@ - *** p - the pointer to the packet data itself. - ***/ - static void --a3c90x_transmit(struct nic *nic, const char *d, unsigned int t, -+a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t, - unsigned int s, const char *p) - { - -@@ -553,7 +551,7 @@ - if (status & 0x02) - { - printf("3C90X: Tx Reclaim Error (%hhX)\n", status); -- a3c90x_reset(NULL); -+ a3c90x_reset(); - } - else if (status & 0x04) - { -@@ -572,18 +570,18 @@ - else if (status & 0x10) - { - printf("3C90X: Tx Underrun (%hhX)\n", status); -- a3c90x_reset(NULL); -+ a3c90x_reset(); - } - else if (status & 0x20) - { - printf("3C90X: Tx Jabber (%hhX)\n", status); -- a3c90x_reset(NULL); -+ a3c90x_reset(); - } - else if ((status & 0x80) != 0x80) - { - printf("3C90X: Internal Error - Incomplete Transmission (%hhX)\n", - status); -- a3c90x_reset(NULL); -+ a3c90x_reset(); - } - } - -@@ -601,7 +599,7 @@ - *** in nic->packetlen. Return 1 if a packet was found. - ***/ - static int --a3c90x_poll(struct nic *nic) -+a3c90x_poll(struct nic *nic, int retrieve) - { - int i, errcode; - -@@ -610,6 +608,8 @@ - return 0; - } - -+ if ( ! retrieve ) return 1; -+ - /** we don't need to acknowledge rxComplete -- the upload engine - ** does it for us. - **/ -@@ -663,34 +663,51 @@ - *** [Ken] - ***/ - static void --a3c90x_disable(struct nic *nic) -- { -+a3c90x_disable(struct dev *dev __unused) -+{ -+ /* reset and disable merge */ -+ a3c90x_reset(); - /* Disable the receiver and transmitter. */ - outw(cmdRxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); - outw(cmdTxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); -- } -- -+} - -+static void a3c90x_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} - - /*** a3c90x_probe: exported routine to probe for the 3c905 card and perform - *** initialization. If this routine is called, the pci functions did find the - *** card. We just have to init it here. - ***/ --struct nic* --a3c90x_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) -- { -+static int a3c90x_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *)dev; - int i, c; - unsigned short eeprom[0x21]; - unsigned int cfg; - unsigned int mopt; -+ unsigned int mstat; - unsigned short linktype; -+#define HWADDR_OFFSET 10 - -- if (probeaddrs == 0 || probeaddrs[0] == 0) -+ if (pci->ioaddr == 0) - return 0; - - adjust_pci_device(pci); - -- INF_3C90X.IOAddr = probeaddrs[0] & ~3; -+ nic->ioaddr = pci->ioaddr & ~3; -+ nic->irqno = 0; -+ -+ INF_3C90X.IOAddr = pci->ioaddr & ~3; - INF_3C90X.CurrentWindow = 255; - switch (a3c90x_internal_ReadEeprom(INF_3C90X.IOAddr, 0x03)) - { -@@ -756,30 +773,45 @@ - "Copyright 1999 LightSys Technology Services, Inc.\n" - "Portions Copyright 1999 Steve Smith\n"); - printf("Provided with ABSOLUTELY NO WARRANTY.\n"); -+#ifdef CFG_3C90X_BOOTROM_FIX -+ if (INF_3C90X.isBrev) -+ { -+ printf("NOTE: 3c905b bootrom fix enabled; has side " -+ "effects. See 3c90x.txt for info.\n"); -+ } -+#endif - printf("-------------------------------------------------------" - "------------------------\n"); - - /** Retrieve the Hardware address and print it on the screen. **/ -- INF_3C90X.HWAddr[0] = eeprom[0]>>8; -- INF_3C90X.HWAddr[1] = eeprom[0]&0xFF; -- INF_3C90X.HWAddr[2] = eeprom[1]>>8; -- INF_3C90X.HWAddr[3] = eeprom[1]&0xFF; -- INF_3C90X.HWAddr[4] = eeprom[2]>>8; -- INF_3C90X.HWAddr[5] = eeprom[2]&0xFF; -+ INF_3C90X.HWAddr[0] = eeprom[HWADDR_OFFSET + 0]>>8; -+ INF_3C90X.HWAddr[1] = eeprom[HWADDR_OFFSET + 0]&0xFF; -+ INF_3C90X.HWAddr[2] = eeprom[HWADDR_OFFSET + 1]>>8; -+ INF_3C90X.HWAddr[3] = eeprom[HWADDR_OFFSET + 1]&0xFF; -+ INF_3C90X.HWAddr[4] = eeprom[HWADDR_OFFSET + 2]>>8; -+ INF_3C90X.HWAddr[5] = eeprom[HWADDR_OFFSET + 2]&0xFF; - printf("MAC Address = %!\n", INF_3C90X.HWAddr); - -+ /* Test if the link is good, if not continue */ -+ a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winDiagnostics4); -+ mstat = inw(INF_3C90X.IOAddr + regMediaStatus_4_w); -+ if((mstat & (1<<11)) == 0) { -+ printf("Valid link not established\n"); -+ return 0; -+ } -+ - /** Program the MAC address into the station address registers **/ - a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winAddressing2); -- outw(htons(eeprom[0]), INF_3C90X.IOAddr + regStationAddress_2_3w); -- outw(htons(eeprom[1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); -- outw(htons(eeprom[2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); -+ outw(htons(eeprom[HWADDR_OFFSET + 0]), INF_3C90X.IOAddr + regStationAddress_2_3w); -+ outw(htons(eeprom[HWADDR_OFFSET + 1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); -+ outw(htons(eeprom[HWADDR_OFFSET + 2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); - outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+0); - outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+2); - outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+4); - - /** Fill in our entry in the etherboot arp table **/ - for(i=0;inode_addr[i] = (eeprom[i/2] >> (8*((i&1)^1))) & 0xff; -+ nic->node_addr[i] = (eeprom[HWADDR_OFFSET + i/2] >> (8*((i&1)^1))) & 0xff; - - /** Read the media options register, print a message and set default - ** xcvr. -@@ -903,8 +935,8 @@ - while (inw(INF_3C90X.IOAddr + regCommandIntStatus_w) & INT_CMDINPROGRESS) - ; - -- /** Set the RX filter = receive only individual pkts & bcast. **/ -- a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x04); -+ /** Set the RX filter = receive only individual pkts & multicast & bcast. **/ -+ a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x02 + 0x04); - a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdRxEnable, 0); - - -@@ -918,12 +950,46 @@ - cmdAcknowledgeInterrupt, 0x661); - - /** Set our exported functions **/ -- nic->reset = a3c90x_reset; -+ dev->disable = a3c90x_disable; - nic->poll = a3c90x_poll; - nic->transmit = a3c90x_transmit; -- nic->disable = a3c90x_disable; -+ nic->irq = a3c90x_irq; - -- return nic; -- } -+ return 1; -+} - - -+static struct pci_id a3c90x_nics[] = { -+/* Original 90x revisions: */ -+PCI_ROM(0x10b7, 0x9000, "3c905-tpo", "3Com900-TPO"), /* 10 Base TPO */ -+PCI_ROM(0x10b7, 0x9001, "3c905-t4", "3Com900-Combo"), /* 10/100 T4 */ -+PCI_ROM(0x10b7, 0x9050, "3c905-tpo100", "3Com905-TX"), /* 100 Base TX / 10/100 TPO */ -+PCI_ROM(0x10b7, 0x9051, "3c905-combo", "3Com905-T4"), /* 100 Base T4 / 10 Base Combo */ -+/* Newer 90xB revisions: */ -+PCI_ROM(0x10b7, 0x9004, "3c905b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ -+PCI_ROM(0x10b7, 0x9005, "3c905b-combo", "3Com900B-Combo"), /* 10 Base Combo */ -+PCI_ROM(0x10b7, 0x9006, "3c905b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ -+PCI_ROM(0x10b7, 0x900a, "3c905b-fl", "3Com900B-FL"), /* 10 Base FL */ -+PCI_ROM(0x10b7, 0x9055, "3c905b-tpo100", "3Com905B-TX"), /* 10/100 TPO */ -+PCI_ROM(0x10b7, 0x9056, "3c905b-t4", "3Com905B-T4"), /* 10/100 T4 */ -+PCI_ROM(0x10b7, 0x9058, "3c905b-9058", "3Com905B-9058"), /* Cyclone 10/100/BNC */ -+PCI_ROM(0x10b7, 0x905a, "3c905b-fx", "3Com905B-FL"), /* 100 Base FX / 10 Base FX */ -+/* Newer 90xC revision: */ -+PCI_ROM(0x10b7, 0x9200, "3c905c-tpo", "3Com905C-TXM"), /* 10/100 TPO (3C905C-TXM) */ -+PCI_ROM(0x10b7, 0x9210, "3c920b-emb-wnm","3Com20B-EMB WNM"), -+PCI_ROM(0x10b7, 0x9800, "3c980", "3Com980-Cyclone"), /* Cyclone */ -+PCI_ROM(0x10b7, 0x9805, "3c9805", "3Com9805"), /* Dual Port Server Cyclone */ -+PCI_ROM(0x10b7, 0x7646, "3csoho100-tx", "3CSOHO100-TX"), /* Hurricane */ -+PCI_ROM(0x10b7, 0x4500, "3c450", "3Com450 HomePNA Tornado"), -+PCI_ROM(0x10b7, 0x1201, "3c982a", "3Com982A"), -+PCI_ROM(0x10b7, 0x1202, "3c982b", "3Com982B"), -+}; -+ -+struct pci_driver a3c90x_driver = { -+ .type = NIC_DRIVER, -+ .name = "3C90X", -+ .probe = a3c90x_probe, -+ .ids = a3c90x_nics, -+ .id_count = sizeof(a3c90x_nics)/sizeof(a3c90x_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/3c90x.txt -=================================================================== ---- a/netboot/3c90x.txt -+++ /dev/null -@@ -1,307 +0,0 @@ -- -- Instructions for use of the 3C90X driver for EtherBoot -- -- Original 3C905B support by: -- Greg Beeley (Greg.Beeley@LightSys.org), -- LightSys Technology Services, Inc. -- February 11, 1999 -- -- Updates for 3C90X family by: -- Steve Smith (steve.smith@juno.com) -- October 1, 1999 -- -- Minor documentation updates by -- Greg Beeley (Greg.Beeley@LightSys.org) -- March 29, 2000 -- --------------------------------------------------------------------------------- -- --I OVERVIEW -- -- The 3c90X series ethernet cards are a group of high-performance busmaster -- DMA cards from 3Com. This particular driver supports both the 3c90x and -- the 3c90xB revision cards. 3C90xC family support has been tested to some -- degree but not extensively. -- -- Here's the licensing information: -- -- This program Copyright (C) 1999 LightSys Technology Services, Inc. -- Portions Copyright (C) 1999 Steve Smith. -- -- This program may be re-distributed in source or binary form, modified, -- sold, or copied for any purpose, provided that the above copyright message -- and this text are included with all source copies or derivative works, and -- provided that the above copyright message and this text are included in the -- documentation of any binary-only distributions. This program is -- distributed WITHOUT ANY WARRANTY, without even the warranty of FITNESS FOR -- A PARTICULAR PURPOSE or MERCHANTABILITY. Please read the associated -- documentation "3c90x.txt" before compiling and using this driver. -- -- --II FLASH PROMS -- -- The 3c90xB cards, according to the 3Com documentation, only accept the -- following flash memory chips: -- -- Atmel AT29C512 (64 kilobyte) -- Atmel AT29C010 (128 kilobyte) -- -- The 3c90x cards, according to the 3Com documentation, accept the -- following flash memory chips capacities: -- -- 64 kb (8 kB) -- 128 kb (16 kB) -- 256 kb (32 kB) and -- 512 kb (64 kB) -- -- Atmel AT29C512 (64 kilobyte) chips are specifically listed for both -- adapters, but flashing on the 3c905b cards would only be supported -- through the Atmel parts. Any device, of the supported size, should -- be supported when programmed by a dedicated PROM programmer (e.g. -- not the card). -- -- To use this driver in such a PROM, visit Atmel's web site and download -- their .PDF file containing a list of their distributors. Contact the -- distributors for pricing information. The prices are quite reasonable -- (about $3 US each for the 64 kB part), and are comparable to what one would -- expect for similarly sized standard EPROMs. And, the flash chips are much -- easier to work with, as they don't need to be UV-erased to be reprogrammed. -- The 3C905B card actually provides a method to program the flash memory -- while it is resident on board the card itself; if someone would like to -- write a small DOS program to do the programming, I can provide the -- information about the registers and so forth. -- -- A utility program, 3c90xutil, is provided with Etherboot in the 'contrib' -- directory that allows for the on-board flashing of the ROM while Linux -- is running. The program has been successfully used under Linux, but I -- have heard problem reports of its use under FreeBSD. Anyone willing to -- make it work under FreeBSD is more than welcome to do so! -- -- You also have the option of using EPROM chips - the 3C905B-TX-NM has been -- successfully tested with 27C256 (32kB) and 27C512 (64kB) chips with a -- specified access time of 100ns and faster. -- -- --III GENERAL USE -- -- Normally, the basic procedure for using this driver is as follows: -- -- 1. Run the 3c90xcfg program on the driver diskette to enable the -- boot PROM and set it to 64k or 128k, as appropriate. -- 2. Build the appropriate 3c90x.fd0 or 3c90x.fd0 floppy image with -- possibly the value CFG_3C90X_XCVR defined to the transceiver type that -- you want to use (i.e., 10/100 rj45, AUI, coax, MII). -- 3. Run the floppy image on the PC to be network booted, to get -- it configured, and to verify that it will boot properly. -- 4. Build the 3c90x.rom or 3c90x.lzrom PROM image and program -- it into the flash or EPROM memory chip. -- 5. Put the PROM in the ethernet card, boot and enable 'boot from -- network first' in the system BIOS, save and reboot. -- -- Here are some issues to be aware of: -- -- 1. If you experience crashes or different behaviour when using the -- boot PROM, add the setting CFG_3C90X_BOOTROM_FIX and go through the -- steps 2-5 above. This works around a bug in some 3c905B cards (see -- below), but has some side-effects which may not be desirable. -- Please note that you have to boot off a floppy (not PROM!) once for -- this fix to take effect. -- 2. The possible need to manually set the CFG_3C90X_XCVR value to -- configure the transceiver type. Values are listed below. -- 3. The possible need to define CFG_3C90X_PRESERVE_XCVR for use in -- operating systems that don't intelligently determine the -- transceiver type. -- -- Some things that are on the 'To-Do' list, perhaps for me, but perhaps -- for any other volunteers out there: -- -- 1. Extend the driver to fully implement the auto-select -- algorithm if the card has multiple media ports. -- 2. Fix any bugs in the code .... -- 3. Extend the driver to support the 3c905c revision cards -- "officially". Right now, the support has been primarily empirical -- and not based on 3c905C documentation. -- -- Now for the details.... -- -- This driver has been tested on roughly 300 systems. The main two -- configuration issues to contend with are: -- -- 1. Ensure that PCI Busmastering is enabled for the adapter (configured -- in the CMOS setup) -- 2. Some systems don't work properly with the adapter when plug and -- play OS is enabled; I always set it to "No" or "Disabled" -- this makes -- it easier and really doesn't adversely affect anything. -- -- Roughly 95% of the systems worked when configured properly. A few -- have issues with booting locally once the boot PROM has been installed -- (this number has been less than 2%). Other configuration issues that -- to check: -- -- 1. Newer BIOS's actually work correctly with the network boot order. -- Set the network adapter first. Most older BIOS's automatically go to -- the network boot PROM first. -- 2. For systems where the adapter was already installed and is just -- having the PROM installed, try setting the "reset configuration data" -- to yes in the CMOS setup if the BIOS isn't seen at first. If your BIOS -- doesn't have this option, remove the card, start the system, shut down, -- install the card and restart (or switch to a different PCI slot). -- 3. Make sure the CMOS security settings aren't preventing a boot. -- -- The 3c905B cards have a significant 'bug' that relates to the flash prom: -- unless the card is set internally to the MII transceiver, it will only -- read the first 8k of the PROM image. Don't ask why -- it seems really -- obscure, but it has to do with the way they mux'd the address lines -- from the PCI bus to the ROM. Unfortunately, most of us are not using -- MII transceivers, and even the .lzrom image ends up being just a little -- bit larger than 8k. Note that the workaround for this is disabled by -- default, because the Windows NT 4.0 driver does not like it (no packets -- are transmitted). -- -- So, the solution that I've used is to internally set the card's nvram -- configuration to use MII when it boots. The 3c905b driver does this -- automatically. This way, the 16k prom image can be loaded into memory, -- and then the 3c905b driver can set the temporary configuration of the -- card to an appropriate value, either configurable by the user or chosen -- by the driver. -- -- To enable the 3c905B bugfix, which is necessary for these cards when -- booting from the Flash ROM, define -DCFG_3C90X_BOOTROM_FIX when building, -- create a floppy image and boot it once. -- Thereafter, the card should accept the larger prom image. -- -- The driver should choose an appropriate transceiver on the card. However, -- if it doesn't on your card or if you need to, for instance, set your -- card to 10mbps when connected to an unmanaged 10/100 hub, you can specify -- which transceiver you want to use. To do this, build the 3c905b.fd0 -- image with -DCFG_3C90X_XCVR=x, where 'x' is one of the following -- values: -- -- 0 10Base-T -- 1 10mbps AUI -- 3 10Base-2 (thinnet/coax) -- 4 100Base-TX -- 5 100Base-FX -- 6 MII -- 8 Auto-negotiation 10Base-T / 100Base-TX (usually the default) -- 9 MII External MAC Mode -- 255 Allow driver to choose an 'appropriate' media port. -- -- Then proceed from step 2 in the above 'general use' instructions. The -- .rom image can be built with CFG_3C90X_XCVR set to a value, but you -- normally don't want to do this, since it is easier to change the -- transceiver type by rebuilding a new floppy, changing the BIOS to floppy -- boot, booting, and then changing the BIOS back to network boot. If -- CFG_3C90X_XCVR is not set in a particular build, it just uses the -- current configuration (either its 'best guess' or whatever the stored -- CFG_3C90X_XCVR value was from the last time it was set). -- -- [[ Note for the more technically inclined: The CFG_3C90X_XCVR value is -- programmed into a register in the card's NVRAM that was reserved for -- LanWorks PROM images to use. When the driver boots, the card comes -- up in MII mode, and the driver checks the LanWorks register to find -- out if the user specified a transceiver type. If it finds that -- information, it uses that, otherwise it picks a transceiver that the -- card has based on the 3c905b's MediaOptions register. This driver isn't -- quite smart enough to always determine which media port is actually -- _connected_; maybe someone else would like to take on that task (it -- actually involves sending a self-directed packet and seeing if it -- comes back. IF it does, that port is connected). ]] -- -- Another issue to keep in mind is that it is possible that some OS'es -- might not be happy with the way I've handled the PROM-image hack with -- setting MII mode on bootup. Linux 2.0.35 does not have this problem. -- Behavior of other systems may vary. The 3com documentation specifically -- says that, at least with the card that I have, the device driver in the -- OS should auto-select the media port, so other drivers should work fine -- with this 'hack'. However, if yours doesn't seem to, you can try defining -- CFG_3C90X_PRESERVE_XCVR when building to cause Etherboot to keep the -- working setting (that allowed the bootp/tftp process) across the eth_reset -- operation. -- -- --IV FOR DEVELOPERS.... -- -- If you would like to fix/extend/etc. this driver, feel free to do so; just -- be sure you can test the modified version on the 3c905B-TX cards that the -- driver was originally designed for. This section of this document gives -- some information that might be relevant to a programmer. -- -- A. Main Entry Point -- -- a3c90x_probe is the main entry point for this driver. It is referred -- to in an array in 'config.c'. -- -- B. Other Important Functions -- -- The functions a3c90x_transmit, a3c90x_poll, a3c90x_reset, and -- a3c90x_disable are static functions that EtherBoot finds out about -- as a result of a3c90x_probe setting entries in the nic structure -- for them. The EtherBoot framework does not use interrupts. It is -- polled. All transmit and receive operations are initiated by the -- etherboot framework, not by an interrupt or by the driver. -- -- C. Internal Functions -- -- The following functions are internal to the driver: -- -- a3c90x_internal_IssueCommand - sends a command to the 3c905b card. -- a3c90x_internal_SetWindow - shifts between one of eight register -- windows onboard the 3c90x. The bottom 16 bytes of the card's -- I/O space are multiplexed among 128 bytes, only 16 of which are -- visible at any one time. This SetWindow function selects one of -- the eight sets. -- a3c90x_internal_ReadEeprom - reads a word (16 bits) from the -- card's onboard nvram. This is NOT the BIOS boot rom. This is -- where the card stores such things as its hardware address. -- a3c90x_internal_WriteEeprom - writes a word (16 bits) to the -- card's nvram, and recomputes the eeprom checksum. -- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the -- card's nvram. Used by the above routine. -- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the -- card's nvram. Used by the above routine. -- -- D. Globals -- -- All global variables are inside a global structure named INF_3C90X. -- So, wherever you see that structure referenced, you know the variable -- is a global. Just keeps things a little neater. -- -- E. Enumerations -- -- There are quite a few enumerated type definitions for registers and -- so forth, many for registers that I didn't even touch in the driver. -- Register types start with 'reg', window numbers (for SetWindow) -- start with 'win', and commands (for IssueCommand) start with 'cmd'. -- Register offsets also include an indication in the name as to the -- size of the register (_b = byte, _w = word, _l = long), and which -- window the register is in, if it is windowed (0-7). -- -- F. Why the 'a3c90x' name? -- -- I had to come up with a letter at the beginning of all of the -- identifiers, since 3com so conveniently had their name start with a -- number. Another driver used 't' (for 'three'?); I chose 'a' for -- no reason at all. -- --Addendum by Jorge L. deLyra , 22Nov2000 re --working around the 3C905 hardware bug mentioned above: -- --Use this floppy to fix any 3COM model 3C905B PCI 10/100 Ethernet cards --that fail to load and run the boot program the first time around. If --they have a "Lucent" rather than a "Broadcom" chipset these cards have --a configuration bug that causes a hang when trying to load the boot --program from the PROM, if you try to use them right out of the box. -- --The boot program in this floppy is the file named 3c905b-tpo100.rom --from Etherboot version 4.6.10, compiled with the bugfix parameter -- -- CFG_3C90X_BOOTROM_FIX -- --You have to take the chip off the card and boot the system once using --this floppy. Once loaded from the floppy, the boot program will access --the card and change some setting in it, correcting the problem. After --that you may use either this boot program or the normal one, compiled --without this bugfix parameter, to boot the machine from the PROM chip. -- --[Any recent Etherboot version should do, not just 4.6.10 - Ed.] -Index: b/netboot/Makefile.am -=================================================================== ---- a/netboot/Makefile.am -+++ b/netboot/Makefile.am -@@ -10,58 +10,72 @@ - - noinst_LIBRARIES = $(LIBDRIVERS) - --libdrivers_a_SOURCES = cards.h config.c etherboot.h \ -- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ -- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h --EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ -- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ -- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ -- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ -- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ -- tiara.c tlan.c tulip.c via-rhine.c w89c840.c -+libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ -+ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ -+ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ -+ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ -+ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ -+ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ -+ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h -+EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ -+ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ -+ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ -+ sundance.c tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ -+ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c \ -+ undi.c undi.h - libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) - # Filled by configure. - libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ - libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) - --EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt -+EXTRA_DIST = README.netboot - - # These below are several special rules for the device drivers. - # We cannot use a simple rule for them... - - # What objects are derived from a driver? --3c509_drivers = 3c509.o 3c529.o -+#3c509_drivers = 3c509.o 3c529.o - 3c595_drivers = 3c595.o - 3c90x_drivers = 3c90x.o --cs89x0_drivers = cs89x0.o -+#cs89x0_drivers = cs89x0.o - davicom_drivers = davicom.o --depca_drivers = depca.o --eepro_drivers = eepro.o -+#depca_drivers = depca.o -+#eepro_drivers = eepro.o -+e1000_drivers = e1000.o - eepro100_drivers = eepro100.o - epic100_drivers = epic100.o - #fa311_drivers = fa311.o --i82586_drivers = 3c507.o exos205.o ni5210.o --lance_drivers = lance.o ne2100.o ni6510.o -+forcedeth_drivers = forcedeth.o -+#i82586_drivers = 3c507.o exos205.o ni5210.o -+#lance_drivers = lance.o ne2100.o ni6510.o - natsemi_drivers = natsemi.o --ni5010_drivers = ni5010.o -+#ni5010_drivers = ni5010.o -+ns83820_drivers = ns83820.o - ns8390_drivers = 3c503.o ne.o ns8390.o wd.o --otulip_drivers = otulip.o -+#otulip_drivers = otulip.o -+pcnet32_drivers = pcnet32.o -+pnic_drivers = pnic.o -+r8169_drivers = r8169.o - rtl8139_drivers = rtl8139.o - sis900_drivers = sis900.o --sk_g16_drivers = sk_g16.o --smc9000_drivers = smc9000.o --tiara_drivers = tiara.o --#tlan_drivers = tlan.o -+#sk_g16_drivers = sk_g16.o -+sundance_driver = sundance.o -+#smc9000_drivers = smc9000.o -+tg3_drivers = tg3.o -+#tiara_drivers = tiara.o -+tlan_drivers = tlan.o - tulip_drivers = tulip.o -+undi_drivers = undi.o - via_rhine_drivers = via_rhine.o - w89c840_drivers = w89c840.o - -+ - # Is it really necessary to specify dependecies explicitly? --$(3c509_drivers): 3c509.c 3c509.h --$(3c509_drivers): %.o: 3c509.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(3c509_drivers): 3c509.c 3c509.h -+#$(3c509_drivers): %.o: 3c509.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(3c595_drivers): 3c595.c 3c595.h - $(3c595_drivers): %.o: 3c595.c -@@ -73,23 +87,28 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(cs89x0_drivers): cs89x0.c cs89x0.h --$(cs89x0_drivers): %.o: cs89x0.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(cs89x0_drivers): cs89x0.c cs89x0.h -+#$(cs89x0_drivers): %.o: cs89x0.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(davicom_drivers): davicom.c - $(davicom_drivers): %.o: davicom.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(depca_drivers): depca.c --$(depca_drivers): %.o: depca.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(depca_drivers): depca.c -+#$(depca_drivers): %.o: depca.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+#$(eepro_drivers): eepro.c -+#$(eepro_drivers): %.o: eepro.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(eepro_drivers): eepro.c --$(eepro_drivers): %.o: eepro.c -+$(e1000_drivers): e1000.c e1000_hw.h -+$(e1000_drivers): %.o: e1000.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -@@ -103,28 +122,38 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -+$(forcedeth_drivers): forcedeth.c -+$(forcedeth_drivers): %.o: forcedeth.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ - #$(fa311_drivers): fa311.c - #$(fa311_drivers): %.o: fa311.c - # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(i82586_drivers): i82586.c --$(i82586_drivers): %.o: i82586.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(i82586_drivers): i82586.c -+#$(i82586_drivers): %.o: i82586.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(lance_drivers): lance.c --$(lance_drivers): %.o: lance.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(lance_drivers): lance.c -+#$(lance_drivers): %.o: lance.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(natsemi_drivers): natsemi.c - $(natsemi_drivers): %.o: natsemi.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(ni5010_drivers): ni5010.c --$(ni5010_drivers): %.o: ni5010.c -+#$(ni5010_drivers): ni5010.c -+#$(ni5010_drivers): %.o: ni5010.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(ns83820_drivers): ns83820.c -+$(ns83820_drivers): %.o: ns83820.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -@@ -133,8 +162,18 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(otulip_drivers): otulip.c otulip.h --$(otulip_drivers): %.o: otulip.c -+#$(otulip_drivers): otulip.c otulip.h -+#$(otulip_drivers): %.o: otulip.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(pcnet32_drivers): pcnet32.c -+$(pcnet32_drivers): %.o: pcnet32.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(pnic_drivers): pnic.c -+$(pnic_drivers): %.o: pnic.c pnic_api.h - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -@@ -143,36 +182,56 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(sis900_drivers): sis900.c --$(sis900_drivers): %.o: sis900.c sis900.h -+$(r8169_drivers): r8169.c -+$(r8169_drivers): %.o: r8169.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(sk_g16_drivers): sk_g16.c sk_g16.h --$(sk_g16_drivers): %.o: sk_g16.c -+$(sis900_drivers): sis900.c sis900.h -+$(sis900_drivers): %.o: sis900.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(smc9000_drivers): smc9000.c smc9000.h --$(smc9000_drivers): %.o: smc9000.c -+#$(sk_g16_drivers): sk_g16.c sk_g16.h -+#$(sk_g16_drivers): %.o: sk_g16.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+#$(smc9000_drivers): smc9000.c smc9000.h -+#$(smc9000_drivers): %.o: smc9000.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(sundance_drivers): sundance.c -+$(sundance_drivers): %.o: sundance.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(tiara_drivers): tiara.c --$(tiara_drivers): %.o: tiara.c -+$(tg3_drivers): tg3.c tg3.h -+$(tg3_drivers): %.o: tg3.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --#$(tlan_drivers): tlan.c --#$(tlan_drivers): %.o: tlan.c -+#$(tiara_drivers): tiara.c -+#$(tiara_drivers): %.o: tiara.c - # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -+$(tlan_drivers): tlan.c tlan.h -+$(tlan_drivers): %.o: tlan.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ - $(tulip_drivers): tulip.c - $(tulip_drivers): %.o: tulip.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -+$(undi_drivers): undi.c undi.h -+$(undi_drivers): %.o: undi.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ - $(via_rhine_drivers): via-rhine.c - $(via_rhine_drivers): %.o: via-rhine.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -@@ -184,36 +243,45 @@ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - # Per-object flags. --3c509_o_CFLAGS = -DINCLUDE_3C509=1 --3c529_o_CFLAGS = -DINCLUDE_3C529=1 -+#3c509_o_CFLAGS = -DINCLUDE_3C509=1 -+#3c529_o_CFLAGS = -DINCLUDE_3C529=1 - 3c595_o_CFLAGS = -DINCLUDE_3C595=1 - 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 --cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 -+#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 - davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 --depca_o_CFLAGS = -DINCLUDE_DEPCA=1 --eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 -+#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 -+#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 -+e1000_o_CFLAGS = -DINCLUDE_E1000=1 - eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 - epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 - #fa311_o_CFLAGS = -DINCLUDE_FA311=1 --3c507_o_CFLAGS = -DINCLUDE_3C507=1 --exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 --ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 --lance_o_CFLAGS = -DINCLUDE_LANCE=1 --ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 --ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 -+forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 -+#3c507_o_CFLAGS = -DINCLUDE_3C507=1 -+#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 -+#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 -+#lance_o_CFLAGS = -DINCLUDE_LANCE=1 -+#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 -+#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 - natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 --ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 --3c503_o_CFLAGS = -DINCLUDE_3C503=1 --ne_o_CFLAGS = -DINCLUDE_NE=1 -+#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 -+#3c503_o_CFLAGS = -DINCLUDE_3C503=1 -+#ne_o_CFLAGS = -DINCLUDE_NE=1 -+ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 - ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 --wd_o_CFLAGS = -DINCLUDE_WD=1 --otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 -+#wd_o_CFLAGS = -DINCLUDE_WD=1 -+#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 -+pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 -+pnic_o_CFLAGS = -DINCLUDE_PNIC=1 -+r8169_o_CFLAGS = -DINCLUDE_R8169=1 - rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 - sis900_o_CFLAGS = -DINCLUDE_SIS900=1 --sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 --smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 --tiara_o_CFLAGS = -DINCLUDE_TIARA=1 --#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 -+#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 -+#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 -+sundance_o_CFLAGS = -DINCLUDE_SUNDANCE=1 -+#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 -+tg3_o_CFLAGS = -DINCLUDE_TG3=1 -+tlan_o_CFLAGS = -DINCLUDE_TLAN=1 - tulip_o_CFLAGS = -DINCLUDE_TULIP=1 -+undi_o_CFLAGS = -DINCLUDE_UNDI=1 - via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 - w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 -Index: b/netboot/Makefile.in -=================================================================== ---- a/netboot/Makefile.in -+++ b/netboot/Makefile.in -@@ -46,18 +46,51 @@ - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = --LIBRARIES = $(noinst_LIBRARIES) - AR = ar - ARFLAGS = cru -+LIBRARIES = $(noinst_LIBRARIES) - libdrivers_a_AR = $(AR) $(ARFLAGS) - am_libdrivers_a_OBJECTS = libdrivers_a-config.$(OBJEXT) \ -- libdrivers_a-fsys_tftp.$(OBJEXT) libdrivers_a-main.$(OBJEXT) \ -- libdrivers_a-misc.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ -- libdrivers_a-timer.$(OBJEXT) -+ libdrivers_a-fsys_tftp.$(OBJEXT) \ -+ libdrivers_a-i386_timer.$(OBJEXT) libdrivers_a-misc.$(OBJEXT) \ -+ libdrivers_a-nic.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ -+ libdrivers_a-pci_io.$(OBJEXT) libdrivers_a-timer.$(OBJEXT) \ -+ libdrivers_a-pic8259.$(OBJEXT) libdrivers_a-basemem.$(OBJEXT) - libdrivers_a_OBJECTS = $(am_libdrivers_a_OBJECTS) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libdrivers_a-3c595.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-3c90x.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-basemem.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-config.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-davicom.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-e1000.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-eepro100.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-epic100.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-forcedeth.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-fsys_tftp.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-i386_timer.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-misc.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-natsemi.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-nic.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns83820.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns8390.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci_io.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pcnet32.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pic8259.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic_api.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-r8169.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-rtl8139.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-sis900.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tg3.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-timer.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tlan.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tulip.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-via-rhine.Po \ -+@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-w89c840.Po - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) -@@ -148,8 +181,6 @@ - am__include = @am__include@ - am__leading_dot = @am__leading_dot@ - am__quote = @am__quote@ --am__tar = @am__tar@ --am__untar = @am__untar@ - bindir = @bindir@ - build = @build@ - build_alias = @build_alias@ -@@ -186,16 +217,19 @@ - # Don't build the netboot support by default. - @NETBOOT_SUPPORT_TRUE@LIBDRIVERS = libdrivers.a - noinst_LIBRARIES = $(LIBDRIVERS) --libdrivers_a_SOURCES = cards.h config.c etherboot.h \ -- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ -- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h -- --EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ -- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ -- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ -- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ -- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ -- tiara.c tlan.c tulip.c via-rhine.c w89c840.c -+libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ -+ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ -+ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ -+ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ -+ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ -+ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ -+ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h -+ -+EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ -+ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ -+ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ -+ tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ -+ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c - - libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) -@@ -203,69 +237,83 @@ - # Filled by configure. - libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ - libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) --EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt -+EXTRA_DIST = README.netboot - - # These below are several special rules for the device drivers. - # We cannot use a simple rule for them... - - # What objects are derived from a driver? --3c509_drivers = 3c509.o 3c529.o -+#3c509_drivers = 3c509.o 3c529.o - 3c595_drivers = 3c595.o - 3c90x_drivers = 3c90x.o --cs89x0_drivers = cs89x0.o -+#cs89x0_drivers = cs89x0.o - davicom_drivers = davicom.o --depca_drivers = depca.o --eepro_drivers = eepro.o -+#depca_drivers = depca.o -+#eepro_drivers = eepro.o -+e1000_drivers = e1000.o - eepro100_drivers = eepro100.o - epic100_drivers = epic100.o - #fa311_drivers = fa311.o --i82586_drivers = 3c507.o exos205.o ni5210.o --lance_drivers = lance.o ne2100.o ni6510.o -+forcedeth_drivers = forcedeth.o -+#i82586_drivers = 3c507.o exos205.o ni5210.o -+#lance_drivers = lance.o ne2100.o ni6510.o - natsemi_drivers = natsemi.o --ni5010_drivers = ni5010.o -+#ni5010_drivers = ni5010.o -+ns83820_drivers = ns83820.o - ns8390_drivers = 3c503.o ne.o ns8390.o wd.o --otulip_drivers = otulip.o -+#otulip_drivers = otulip.o -+pcnet32_drivers = pcnet32.o -+pnic_drivers = pnic.o -+r8169_drivers = r8169.o - rtl8139_drivers = rtl8139.o - sis900_drivers = sis900.o --sk_g16_drivers = sk_g16.o --smc9000_drivers = smc9000.o --tiara_drivers = tiara.o --#tlan_drivers = tlan.o -+#sk_g16_drivers = sk_g16.o -+#smc9000_drivers = smc9000.o -+tg3_drivers = tg3.o -+#tiara_drivers = tiara.o -+tlan_drivers = tlan.o - tulip_drivers = tulip.o - via_rhine_drivers = via_rhine.o - w89c840_drivers = w89c840.o - - # Per-object flags. --3c509_o_CFLAGS = -DINCLUDE_3C509=1 --3c529_o_CFLAGS = -DINCLUDE_3C529=1 -+#3c509_o_CFLAGS = -DINCLUDE_3C509=1 -+#3c529_o_CFLAGS = -DINCLUDE_3C529=1 - 3c595_o_CFLAGS = -DINCLUDE_3C595=1 - 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 --cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 -+#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 - davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 --depca_o_CFLAGS = -DINCLUDE_DEPCA=1 --eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 -+#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 -+#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 -+e1000_o_CFLAGS = -DINCLUDE_E1000=1 - eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 - epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 - #fa311_o_CFLAGS = -DINCLUDE_FA311=1 --3c507_o_CFLAGS = -DINCLUDE_3C507=1 --exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 --ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 --lance_o_CFLAGS = -DINCLUDE_LANCE=1 --ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 --ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 -+forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 -+#3c507_o_CFLAGS = -DINCLUDE_3C507=1 -+#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 -+#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 -+#lance_o_CFLAGS = -DINCLUDE_LANCE=1 -+#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 -+#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 - natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 --ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 --3c503_o_CFLAGS = -DINCLUDE_3C503=1 --ne_o_CFLAGS = -DINCLUDE_NE=1 -+#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 -+#3c503_o_CFLAGS = -DINCLUDE_3C503=1 -+#ne_o_CFLAGS = -DINCLUDE_NE=1 -+ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 - ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 --wd_o_CFLAGS = -DINCLUDE_WD=1 --otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 -+#wd_o_CFLAGS = -DINCLUDE_WD=1 -+#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 -+pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 -+pnic_o_CFLAGS = -DINCLUDE_PNIC=1 -+r8169_o_CFLAGS = -DINCLUDE_R8169=1 - rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 - sis900_o_CFLAGS = -DINCLUDE_SIS900=1 --sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 --smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 --tiara_o_CFLAGS = -DINCLUDE_TIARA=1 --#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 -+#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 -+#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 -+#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 -+tg3_o_CFLAGS = -DINCLUDE_TG3=1 -+tlan_o_CFLAGS = -DINCLUDE_TLAN=1 - tulip_o_CFLAGS = -DINCLUDE_TULIP=1 - via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 - w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 -@@ -316,32 +364,32 @@ - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c509.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c595.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c90x.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-basemem.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-config.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-cs89x0.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-davicom.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-depca.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-e1000.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro100.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-epic100.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fa311.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-forcedeth.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fsys_tftp.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i82586.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-lance.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-main.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i386_timer.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-misc.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-natsemi.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ni5010.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-nic.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns83820.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns8390.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-otulip.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci_io.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pcnet32.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pic8259.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic_api.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-r8169.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-rtl8139.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sis900.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sk_g16.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-smc9000.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tiara.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tg3.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-timer.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tlan.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tulip.Po@am__quote@ -@@ -352,450 +400,513 @@ - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c $< - - .c.obj: - @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - - libdrivers_a-config.o: config.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c - - libdrivers_a-config.obj: config.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi` - - libdrivers_a-fsys_tftp.o: fsys_tftp.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c - - libdrivers_a-fsys_tftp.obj: fsys_tftp.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi` - --libdrivers_a-main.o: main.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c -- --libdrivers_a-main.obj: main.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` -+libdrivers_a-i386_timer.o: i386_timer.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c -+ -+libdrivers_a-i386_timer.obj: i386_timer.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi` - - libdrivers_a-misc.o: misc.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c - - libdrivers_a-misc.obj: misc.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` - -+libdrivers_a-nic.o: nic.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c -+ -+libdrivers_a-nic.obj: nic.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi` -+ - libdrivers_a-pci.o: pci.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c - - libdrivers_a-pci.obj: pci.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi` - -+libdrivers_a-pci_io.o: pci_io.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c -+ -+libdrivers_a-pci_io.obj: pci_io.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi` -+ - libdrivers_a-timer.o: timer.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c - - libdrivers_a-timer.obj: timer.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` - --libdrivers_a-3c509.o: 3c509.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c -- --libdrivers_a-3c509.obj: 3c509.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi` -+libdrivers_a-pic8259.o: pic8259.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c -+ -+libdrivers_a-pic8259.obj: pic8259.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi` -+ -+libdrivers_a-basemem.o: basemem.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c -+ -+libdrivers_a-basemem.obj: basemem.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi` - - libdrivers_a-3c595.o: 3c595.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c - - libdrivers_a-3c595.obj: 3c595.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi` - - libdrivers_a-3c90x.o: 3c90x.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c - - libdrivers_a-3c90x.obj: 3c90x.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi` - --libdrivers_a-cs89x0.o: cs89x0.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c -- --libdrivers_a-cs89x0.obj: cs89x0.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi` -- - libdrivers_a-davicom.o: davicom.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c - - libdrivers_a-davicom.obj: davicom.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi` - --libdrivers_a-depca.o: depca.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c -- --libdrivers_a-depca.obj: depca.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi` -- --libdrivers_a-eepro.o: eepro.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c -- --libdrivers_a-eepro.obj: eepro.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi` -+libdrivers_a-e1000.o: e1000.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c -+ -+libdrivers_a-e1000.obj: e1000.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi` - - libdrivers_a-eepro100.o: eepro100.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c - - libdrivers_a-eepro100.obj: eepro100.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi` - - libdrivers_a-epic100.o: epic100.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c - - libdrivers_a-epic100.obj: epic100.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi` - --libdrivers_a-fa311.o: fa311.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c -- --libdrivers_a-fa311.obj: fa311.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi` -- --libdrivers_a-i82586.o: i82586.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c -- --libdrivers_a-i82586.obj: i82586.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi` -- --libdrivers_a-lance.o: lance.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c -- --libdrivers_a-lance.obj: lance.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi` -- - libdrivers_a-natsemi.o: natsemi.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c - - libdrivers_a-natsemi.obj: natsemi.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi` - --libdrivers_a-ni5010.o: ni5010.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c -- --libdrivers_a-ni5010.obj: ni5010.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi` -- - libdrivers_a-ns8390.o: ns8390.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c - - libdrivers_a-ns8390.obj: ns8390.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi` - --libdrivers_a-otulip.o: otulip.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c -- --libdrivers_a-otulip.obj: otulip.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi` -+libdrivers_a-pcnet32.o: pcnet32.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c -+ -+libdrivers_a-pcnet32.obj: pcnet32.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi` - - libdrivers_a-rtl8139.o: rtl8139.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c - - libdrivers_a-rtl8139.obj: rtl8139.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi` - - libdrivers_a-sis900.o: sis900.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c - - libdrivers_a-sis900.obj: sis900.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi` - --libdrivers_a-sk_g16.o: sk_g16.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c -- --libdrivers_a-sk_g16.obj: sk_g16.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi` -- --libdrivers_a-smc9000.o: smc9000.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c -- --libdrivers_a-smc9000.obj: smc9000.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi` -- --libdrivers_a-tiara.o: tiara.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c -- --libdrivers_a-tiara.obj: tiara.c --@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi`; \ --@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi` -+libdrivers_a-tg3.o: tg3.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c -+ -+libdrivers_a-tg3.obj: tg3.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi` - - libdrivers_a-tlan.o: tlan.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c - - libdrivers_a-tlan.obj: tlan.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi` - - libdrivers_a-tulip.o: tulip.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c - - libdrivers_a-tulip.obj: tulip.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi` - - libdrivers_a-via-rhine.o: via-rhine.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c - - libdrivers_a-via-rhine.obj: via-rhine.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi` - - libdrivers_a-w89c840.o: w89c840.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c - - libdrivers_a-w89c840.obj: w89c840.c - @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi`; \ - @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi` --uninstall-info-am: -+ -+libdrivers_a-r8169.o: r8169.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c -+ -+libdrivers_a-r8169.obj: r8169.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi` -+ -+libdrivers_a-forcedeth.o: forcedeth.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c -+ -+libdrivers_a-forcedeth.obj: forcedeth.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi` -+ -+libdrivers_a-ns83820.o: ns83820.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c -+ -+libdrivers_a-ns83820.obj: ns83820.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi` -+ -+libdrivers_a-pnic.o: pnic.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c -+ -+libdrivers_a-pnic.obj: pnic.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi` -+ -+libdrivers_a-pnic_api.o: pnic_api.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c -+ -+libdrivers_a-pnic_api.obj: pnic_api.c -+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi`; \ -+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi` - - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -@@ -817,11 +928,9 @@ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ -- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -- test -n "$$unique" || unique=$$empty_fix; \ -- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -- $$tags $$unique; \ -- fi -+ test -z "$(ETAGS_ARGS)$$tags$$unique" \ -+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$tags $$unique - ctags: CTAGS - CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -@@ -895,7 +1004,7 @@ - clean-generic: - - distclean-generic: -- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -rm -f $(CONFIG_CLEAN_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" -@@ -962,10 +1071,10 @@ - - - # Is it really necessary to specify dependecies explicitly? --$(3c509_drivers): 3c509.c 3c509.h --$(3c509_drivers): %.o: 3c509.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(3c509_drivers): 3c509.c 3c509.h -+#$(3c509_drivers): %.o: 3c509.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(3c595_drivers): 3c595.c 3c595.h - $(3c595_drivers): %.o: 3c595.c -@@ -977,23 +1086,28 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(cs89x0_drivers): cs89x0.c cs89x0.h --$(cs89x0_drivers): %.o: cs89x0.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(cs89x0_drivers): cs89x0.c cs89x0.h -+#$(cs89x0_drivers): %.o: cs89x0.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(davicom_drivers): davicom.c - $(davicom_drivers): %.o: davicom.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(depca_drivers): depca.c --$(depca_drivers): %.o: depca.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(depca_drivers): depca.c -+#$(depca_drivers): %.o: depca.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(eepro_drivers): eepro.c --$(eepro_drivers): %.o: eepro.c -+#$(eepro_drivers): eepro.c -+#$(eepro_drivers): %.o: eepro.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(e1000_drivers): e1000.c e1000_hw.h -+$(e1000_drivers): %.o: e1000.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -@@ -1007,28 +1121,38 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -+$(forcedeth_drivers): forcedeth.c -+$(forcedeth_drivers): %.o: forcedeth.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ - #$(fa311_drivers): fa311.c - #$(fa311_drivers): %.o: fa311.c - # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(i82586_drivers): i82586.c --$(i82586_drivers): %.o: i82586.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(i82586_drivers): i82586.c -+#$(i82586_drivers): %.o: i82586.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(lance_drivers): lance.c --$(lance_drivers): %.o: lance.c -- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+#$(lance_drivers): lance.c -+#$(lance_drivers): %.o: lance.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - - $(natsemi_drivers): natsemi.c - $(natsemi_drivers): %.o: natsemi.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(ni5010_drivers): ni5010.c --$(ni5010_drivers): %.o: ni5010.c -+#$(ni5010_drivers): ni5010.c -+#$(ni5010_drivers): %.o: ni5010.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(ns83820_drivers): ns83820.c -+$(ns83820_drivers): %.o: ns83820.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -@@ -1037,41 +1161,62 @@ - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(otulip_drivers): otulip.c otulip.h --$(otulip_drivers): %.o: otulip.c -+#$(otulip_drivers): otulip.c otulip.h -+#$(otulip_drivers): %.o: otulip.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+$(pcnet32_drivers): pcnet32.c -+$(pcnet32_drivers): %.o: pcnet32.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(rtl8139_drivers): rtl8139.c --$(rtl8139_drivers): %.o: rtl8139.c -+$(pnic_drivers): pnic.c -+$(pnic_drivers): %.o: pnic.c pnic_api.h - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(sis900_drivers): sis900.c --$(sis900_drivers): %.o: sis900.c sis900.h -+$(rtl8139_drivers): rtl8139.c -+$(rtl8139_drivers): %.o: rtl8139.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(sk_g16_drivers): sk_g16.c sk_g16.h --$(sk_g16_drivers): %.o: sk_g16.c -+$(r8169_drivers): r8169.c -+$(r8169_drivers): %.o: r8169.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(smc9000_drivers): smc9000.c smc9000.h --$(smc9000_drivers): %.o: smc9000.c -+$(sis900_drivers): sis900.c sis900.h -+$(sis900_drivers): %.o: sis900.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --$(tiara_drivers): tiara.c --$(tiara_drivers): %.o: tiara.c -+#$(sk_g16_drivers): sk_g16.c sk_g16.h -+#$(sk_g16_drivers): %.o: sk_g16.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+#$(smc9000_drivers): smc9000.c smc9000.h -+#$(smc9000_drivers): %.o: smc9000.c -+# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ -+ -+$(tg3_drivers): tg3.c tg3.h -+$(tg3_drivers): %.o: tg3.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - --#$(tlan_drivers): tlan.c --#$(tlan_drivers): %.o: tlan.c -+#$(tiara_drivers): tiara.c -+#$(tiara_drivers): %.o: tiara.c - # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ - # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< - -+$(tlan_drivers): tlan.c tlan.h -+$(tlan_drivers): %.o: tlan.c -+ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -+ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< -+ - $(tulip_drivers): tulip.c - $(tulip_drivers): %.o: tulip.c - $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ -Index: b/netboot/basemem.c -=================================================================== ---- /dev/null -+++ b/netboot/basemem.c -@@ -0,0 +1,178 @@ -+#include "etherboot.h" -+#define DEBUG_BASEMEM -+/* Routines to allocate base memory in a BIOS-compatible way, by -+ * updating the Free Base Memory Size counter at 40:13h. -+ * -+ * Michael Brown (mcb30) -+ * $Id: grub-0.95-diskless-patch-2-undi.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ -+ */ -+ -+#define fbms ( ( uint16_t * ) phys_to_virt ( 0x413 ) ) -+#define BASE_MEMORY_MAX ( 640 ) -+#define FREE_BLOCK_MAGIC ( ('!'<<0) + ('F'<<8) + ('R'<<16) + ('E'<<24) ) -+ -+typedef struct free_base_memory_block { -+ uint32_t magic; -+ uint16_t size_kb; -+} free_base_memory_block_t; -+ -+/* Return amount of free base memory in bytes -+ */ -+ -+uint32_t get_free_base_memory ( void ) { -+ return *fbms << 10; -+} -+ -+/* Adjust the real mode stack pointer. We keep the real mode stack at -+ * the top of free base memory, rather than allocating space for it. -+ */ -+ -+inline void adjust_real_mode_stack ( void ) { -+/* real_mode_stack = ( *fbms << 10 ); */ -+} -+ -+/* Allocate N bytes of base memory. Amount allocated will be rounded -+ * up to the nearest kB, since that's the granularity of the BIOS FBMS -+ * counter. Returns NULL if memory cannot be allocated. -+ */ -+ -+void * allot_base_memory ( size_t size ) { -+ uint16_t size_kb = ( size + 1023 ) >> 10; -+ void *ptr = NULL; -+ -+#ifdef DEBUG_BASEMEM -+ printf ( "Trying to allocate %d kB of base memory, %d kB free\n", -+ size_kb, *fbms ); -+#endif -+ -+ /* Free up any unused memory before we start */ -+ free_unused_base_memory(); -+ -+ /* Check available base memory */ -+ if ( size_kb > *fbms ) { return NULL; } -+ -+ /* Reduce available base memory */ -+ *fbms -= size_kb; -+ -+ /* Calculate address of memory allocated */ -+ ptr = phys_to_virt ( *fbms << 10 ); -+ -+#ifdef DEBUG_BASEMEM -+ /* Zero out memory. We do this so that allocation of -+ * already-used space will show up in the form of a crash as -+ * soon as possible. -+ */ -+ memset ( ptr, 0, size_kb << 10 ); -+#endif -+ -+ /* Adjust real mode stack pointer */ -+ adjust_real_mode_stack (); -+ -+ return ptr; -+} -+ -+/* Free base memory allocated by allot_base_memory. The BIOS provides -+ * nothing better than a LIFO mechanism for freeing memory (i.e. it -+ * just has the single "total free memory" counter), but we improve -+ * upon this slightly; as long as you free all the allotted blocks, it -+ * doesn't matter what order you free them in. (This will only work -+ * for blocks that are freed via forget_base_memory()). -+ * -+ * Yes, it's annoying that you have to remember the size of the blocks -+ * you've allotted. However, since our granularity of allocation is -+ * 1K, the alternative is to risk wasting the occasional kB of base -+ * memory, which is a Bad Thing. Really, you should be using as -+ * little base memory as possible, so consider the awkwardness of the -+ * API to be a feature! :-) -+ */ -+ -+void forget_base_memory ( void *ptr, size_t size ) { -+ uint16_t remainder = virt_to_phys(ptr) & 1023; -+ uint16_t size_kb = ( size + remainder + 1023 ) >> 10; -+ free_base_memory_block_t *free_block = -+ ( free_base_memory_block_t * ) ( ptr - remainder ); -+ -+ if ( ( ptr == NULL ) || ( size == 0 ) ) { return; } -+ -+#ifdef DEBUG_BASEMEM -+ printf ( "Trying to free %d bytes base memory at 0x%x\n", -+ size, virt_to_phys ( ptr ) ); -+ if ( remainder > 0 ) { -+ printf ( "WARNING: destructively expanding free block " -+ "downwards to 0x%x\n", -+ virt_to_phys ( ptr - remainder ) ); -+ } -+#endif -+ -+ /* Mark every kilobyte within this block as free. This is -+ * overkill for normal purposes, but helps when something has -+ * allocated base memory with a granularity finer than the -+ * BIOS granularity of 1kB. PXE ROMs tend to do this when -+ * they allocate their own memory. This method allows us to -+ * free their blocks (admittedly in a rather dangerous, -+ * tread-on-anything-either-side sort of way, but there's no -+ * other way to do it). -+ * -+ * Since we're marking every kB as free, there's actually no -+ * need for recording the size of the blocks. However, we -+ * keep this in so that debug messages are friendlier. It -+ * probably adds around 8 bytes to the overall code size. -+ */ -+ while ( size_kb > 0 ) { -+ /* Mark this block as unused */ -+ free_block->magic = FREE_BLOCK_MAGIC; -+ free_block->size_kb = size_kb; -+ /* Move up by 1 kB */ -+ (void *)(free_block += ( 1 << 10 )); -+ size_kb--; -+ } -+ -+ /* Free up unused base memory */ -+ free_unused_base_memory(); -+} -+ -+/* Do the actual freeing of memory. This is split out from -+ * forget_base_memory() so that it may be called separately. It -+ * should be called whenever base memory is deallocated by an external -+ * entity (if we can detect that it has done so) so that we get the -+ * chance to free up our own blocks. -+ */ -+void free_unused_base_memory ( void ) { -+ free_base_memory_block_t *free_block = NULL; -+ -+ /* Try to release memory back to the BIOS. Free all -+ * consecutive blocks marked as free. -+ */ -+ while ( 1 ) { -+ /* Calculate address of next potential free block */ -+ free_block = ( free_base_memory_block_t * ) -+ phys_to_virt ( *fbms << 10 ); -+ -+ /* Stop processing if we're all the way up to 640K or -+ * if this is not a free block -+ */ -+ if ( ( *fbms == BASE_MEMORY_MAX ) || -+ ( free_block->magic != FREE_BLOCK_MAGIC ) ) { -+ break; -+ } -+ -+ /* Return memory to BIOS */ -+ *fbms += free_block->size_kb; -+ -+#ifdef DEBUG_BASEMEM -+ printf ( "Freed %d kB base memory, %d kB now free\n", -+ free_block->size_kb, *fbms ); -+ -+ /* Zero out freed block. We do this in case -+ * the block contained any structures that -+ * might be located by scanning through -+ * memory. -+ */ -+ memset ( free_block, 0, free_block->size_kb << 10 ); -+#endif -+ } -+ -+ /* Adjust real mode stack pointer */ -+ adjust_real_mode_stack (); -+} -+ -Index: b/netboot/big_bswap.h -=================================================================== ---- /dev/null -+++ b/netboot/big_bswap.h -@@ -0,0 +1,17 @@ -+#ifndef ETHERBOOT_BIG_BSWAP_H -+#define ETHERBOOT_BIG_BSWAP_H -+ -+#define ntohl(x) (x) -+#define htonl(x) (x) -+#define ntohs(x) (x) -+#define htons(x) (x) -+#define cpu_to_le32(x) __bswap_32(x) -+#define cpu_to_le16(x) __bswap_16(x) -+#define cpu_to_be32(x) (x) -+#define cpu_to_be16(x) (x) -+#define le32_to_cpu(x) __bswap_32(x) -+#define le16_to_cpu(x) __bswap_16(x) -+#define be32_to_cpu(x) (x) -+#define be16_to_cpu(x) (x) -+ -+#endif /* ETHERBOOT_BIG_BSWAP_H */ -Index: b/netboot/bootp.h -=================================================================== ---- /dev/null -+++ b/netboot/bootp.h -@@ -0,0 +1,182 @@ -+#ifndef _BOOTP_H -+#define _BOOTP_H -+ -+#include "if_ether.h" -+#include "ip.h" -+#include "udp.h" -+ -+#ifndef MAX_BOOTP_RETRIES -+#define MAX_BOOTP_RETRIES 20 -+#endif -+ -+#ifdef ALTERNATE_DHCP_PORTS_1067_1068 -+#undef NON_STANDARD_BOOTP_SERVER -+#define NON_STANDARD_BOOTP_SERVER 1067 -+#undef NON_STANDARD_BOOTP_CLIENT -+#define NON_STANDARD_BOOTP_CLIENT 1068 -+#endif -+ -+#ifdef NON_STANDARD_BOOTP_SERVER -+#define BOOTP_SERVER NON_STANDARD_BOOTP_SERVER -+#else -+#define BOOTP_SERVER 67 -+#endif -+#ifdef NON_STANDARD_BOOTP_CLIENT -+#define BOOTP_CLIENT NON_STANDARD_BOOTP_CLIENT -+#else -+#define BOOTP_CLIENT 68 -+#endif -+ -+#define BOOTP_REQUEST 1 -+#define BOOTP_REPLY 2 -+ -+#define TAG_LEN(p) (*((p)+1)) -+#define RFC1533_COOKIE 99, 130, 83, 99 -+#define RFC1533_PAD 0 -+#define RFC1533_NETMASK 1 -+#define RFC1533_TIMEOFFSET 2 -+#define RFC1533_GATEWAY 3 -+#define RFC1533_TIMESERVER 4 -+#define RFC1533_IEN116NS 5 -+#define RFC1533_DNS 6 -+#define RFC1533_LOGSERVER 7 -+#define RFC1533_COOKIESERVER 8 -+#define RFC1533_LPRSERVER 9 -+#define RFC1533_IMPRESSSERVER 10 -+#define RFC1533_RESOURCESERVER 11 -+#define RFC1533_HOSTNAME 12 -+#define RFC1533_BOOTFILESIZE 13 -+#define RFC1533_MERITDUMPFILE 14 -+#define RFC1533_DOMAINNAME 15 -+#define RFC1533_SWAPSERVER 16 -+#define RFC1533_ROOTPATH 17 -+#define RFC1533_EXTENSIONPATH 18 -+#define RFC1533_IPFORWARDING 19 -+#define RFC1533_IPSOURCEROUTING 20 -+#define RFC1533_IPPOLICYFILTER 21 -+#define RFC1533_IPMAXREASSEMBLY 22 -+#define RFC1533_IPTTL 23 -+#define RFC1533_IPMTU 24 -+#define RFC1533_IPMTUPLATEAU 25 -+#define RFC1533_INTMTU 26 -+#define RFC1533_INTLOCALSUBNETS 27 -+#define RFC1533_INTBROADCAST 28 -+#define RFC1533_INTICMPDISCOVER 29 -+#define RFC1533_INTICMPRESPOND 30 -+#define RFC1533_INTROUTEDISCOVER 31 -+#define RFC1533_INTROUTESOLICIT 32 -+#define RFC1533_INTSTATICROUTES 33 -+#define RFC1533_LLTRAILERENCAP 34 -+#define RFC1533_LLARPCACHETMO 35 -+#define RFC1533_LLETHERNETENCAP 36 -+#define RFC1533_TCPTTL 37 -+#define RFC1533_TCPKEEPALIVETMO 38 -+#define RFC1533_TCPKEEPALIVEGB 39 -+#define RFC1533_NISDOMAIN 40 -+#define RFC1533_NISSERVER 41 -+#define RFC1533_NTPSERVER 42 -+#define RFC1533_VENDOR 43 -+#define RFC1533_NBNS 44 -+#define RFC1533_NBDD 45 -+#define RFC1533_NBNT 46 -+#define RFC1533_NBSCOPE 47 -+#define RFC1533_XFS 48 -+#define RFC1533_XDM 49 -+#ifndef NO_DHCP_SUPPORT -+#define RFC2132_REQ_ADDR 50 -+#define RFC2132_MSG_TYPE 53 -+#define RFC2132_SRV_ID 54 -+#define RFC2132_PARAM_LIST 55 -+#define RFC2132_MAX_SIZE 57 -+#define RFC2132_VENDOR_CLASS_ID 60 -+ -+#define DHCPDISCOVER 1 -+#define DHCPOFFER 2 -+#define DHCPREQUEST 3 -+#define DHCPACK 5 -+#endif /* NO_DHCP_SUPPORT */ -+ -+#define RFC1533_VENDOR_MAJOR 0 -+#define RFC1533_VENDOR_MINOR 0 -+ -+#define RFC1533_VENDOR_MAGIC 128 -+#define RFC1533_VENDOR_ADDPARM 129 -+#define RFC1533_VENDOR_ETHDEV 130 -+#ifdef IMAGE_FREEBSD -+#define RFC1533_VENDOR_HOWTO 132 -+#define RFC1533_VENDOR_KERNEL_ENV 133 -+#endif -+#define RFC1533_VENDOR_ETHERBOOT_ENCAP 150 -+#define RFC1533_VENDOR_MNUOPTS 160 -+#define RFC1533_VENDOR_NIC_DEV_ID 175 -+#define RFC1533_VENDOR_SELECTION 176 -+#define RFC1533_VENDOR_ARCH 177 -+#define RFC1533_VENDOR_MOTD 184 -+#define RFC1533_VENDOR_NUMOFMOTD 8 -+#define RFC1533_VENDOR_IMG 192 -+#define RFC1533_VENDOR_NUMOFIMG 16 -+ -+#define RFC1533_VENDOR_CONFIGFILE 150 -+ -+#define RFC1533_END 255 -+ -+#define BOOTP_VENDOR_LEN 64 -+ -+#define DHCP_OPT_LEN 312 -+ -+/* Format of a bootp packet */ -+struct bootp_t { -+ uint8_t bp_op; -+ uint8_t bp_htype; -+ uint8_t bp_hlen; -+ uint8_t bp_hops; -+ uint32_t bp_xid; -+ uint16_t bp_secs; -+ uint16_t unused; -+ in_addr bp_ciaddr; -+ in_addr bp_yiaddr; -+ in_addr bp_siaddr; -+ in_addr bp_giaddr; -+ uint8_t bp_hwaddr[16]; -+ uint8_t bp_sname[64]; -+ char bp_file[128]; -+ uint8_t bp_vend[BOOTP_VENDOR_LEN]; -+}; -+ -+struct dhcp_t { -+ uint8_t bp_op; -+ uint8_t bp_htype; -+ uint8_t bp_hlen; -+ uint8_t bp_hops; -+ uint32_t bp_xid; -+ uint16_t bp_secs; -+ uint16_t bp_flag; -+ in_addr bp_ciaddr; -+ in_addr bp_yiaddr; -+ in_addr bp_siaddr; -+ in_addr bp_giaddr; -+ uint8_t bp_hwaddr[16]; -+ uint8_t bp_sname[64]; -+ char bp_file[128]; -+ uint8_t bp_vend[DHCP_OPT_LEN]; -+}; -+ -+/* Format of a bootp IP packet */ -+struct bootpip_t -+{ -+ struct iphdr ip; -+ struct udphdr udp; -+ struct bootp_t bp; -+}; -+struct dhcpip_t -+{ -+ struct iphdr ip; -+ struct udphdr udp; -+ struct dhcp_t bp; -+}; -+ -+#define MAX_RFC1533_VENDLEN (ETH_MAX_MTU - sizeof(struct bootpip_t) + BOOTP_VENDOR_LEN) -+ -+#define BOOTP_DATA_ADDR (&bootp_data) -+ -+#endif /* _BOOTP_H */ -Index: b/netboot/byteswap.h -=================================================================== ---- /dev/null -+++ b/netboot/byteswap.h -@@ -0,0 +1,20 @@ -+#ifndef ETHERBOOT_BYTESWAP_H -+#define ETHERBOOT_BYTESWAP_H -+ -+#include "endian.h" -+#include "i386_byteswap.h" -+ -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+#include "little_bswap.h" -+#endif -+#if __BYTE_ORDER == __BIG_ENDIAN -+#include "big_bswap.h" -+#endif -+ -+/* Make routines available to all */ -+#define swap32(x) __bswap_32(x) -+#define swap16(x) __bswap_16(x) -+#define bswap_32(x) __bswap_32(x) -+#define bswap_16(x) __bswap_16(x) -+ -+#endif /* ETHERBOOT_BYTESWAP_H */ -Index: b/netboot/cards.h -=================================================================== ---- a/netboot/cards.h -+++ /dev/null -@@ -1,183 +0,0 @@ --#ifndef CARDS_H --#define CARDS_H -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --#include "nic.h" -- --/* OK, this is how the PCI support hack works: if pci.h is included before -- * this file is included, assume that the driver supports PCI. This means that -- * this file is usually included last. */ -- --#ifdef PCI_H --#define PCI_ARG(x) ,x --#else --#define PCI_ARG(x) --#endif -- --#ifdef INCLUDE_WD --extern struct nic *wd_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C503 --extern struct nic *t503_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_VIA_RHINE --extern struct nic *rhine_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NE --extern struct nic *ne_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NS8390 --extern struct nic *nepci_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C509 --extern struct nic *t509_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C529 --extern struct nic *t529_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C595 --extern struct nic *t595_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C90X --extern struct nic *a3c90x_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_EEPRO --extern struct nic *eepro_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_EEPRO100 --extern struct nic *eepro100_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_EPIC100 --extern struct nic *epic100_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_OTULIP --extern struct nic *otulip_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_TULIP --extern struct nic *tulip_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_DAVICOM --extern struct nic *davicom_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_CS89X0 --extern struct nic *cs89x0_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_LANCE --extern struct nic *lancepci_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NE2100 --extern struct nic *ne2100_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NI6510 --extern struct nic *ni6510_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_SK_G16 --extern struct nic *SK_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_3C507 --extern struct nic *t507_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NI5010 --extern struct nic *ni5010_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NI5210 --extern struct nic *ni5210_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_EXOS205 --extern struct nic *exos205_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_SMC9000 --extern struct nic *smc9000_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_TIARA --extern struct nic *tiara_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_DEPCA --extern struct nic *depca_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_RTL8139 --extern struct nic *rtl8139_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_W89C840 --extern struct nic *w89c840_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_SIS900 --extern struct nic *sis900_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_NATSEMI --extern struct nic *natsemi_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#ifdef INCLUDE_TLAN --extern struct nic *tlan_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --#endif /* CARDS_H */ -Index: b/netboot/config.c -=================================================================== ---- a/netboot/config.c -+++ b/netboot/config.c -@@ -1,598 +1,165 @@ - /* -- * GRUB -- GRand Unified Bootloader -- * Copyright (C) 2001,2002 Free Software Foundation, Inc. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- */ -- --/* Based on "src/config.c" in etherboot-5.0.5. */ -- --/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, or (at - * your option) any later version. - */ - --#define GRUB 1 --#include --#include -+#include "grub.h" -+#include "pci.h" -+#include "isa.h" -+#include "nic.h" - --#undef INCLUDE_PCI --#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || defined(INCLUDE_W89C840) || defined(INCLUDE_DAVICOM) || defined(INCLUDE_SIS900) || defined(INCLUDE_NATSEMI) || defined(INCLUDE_TLAN) -- /* || others later */ --# define INCLUDE_PCI --# include --static unsigned short pci_ioaddrs[16]; -- --static struct pci_device pci_nic_list[] = -+#ifdef CONFIG_PCI -+static int pci_probe(struct dev *dev, const char *type_name) - { --#ifdef INCLUDE_NS8390 -- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, -- "Realtek 8029", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, -- "Winbond NE2000-PCI", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, -- "Compex ReadyLink 2000", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, -- "KTI ET32P2", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, -- "NetVin NV5000SC", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, -- "Holtek HT80232", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_3C90X -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, -- "3Com900-TPO", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, -- "3Com900-Combo", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, -- "3Com905-TX", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, -- "3Com905-T4", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9004, -- "3Com900B-TPO", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9005, -- "3Com900B-Combo", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9006, -- "3Com900B-2/T", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x900A, -- "3Com900B-FL", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, -- "3Com905B-TX", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9056, -- "3Com905B-T4", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x905A, -- "3Com905B-FL", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, -- "3Com905C-TXM", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9800, -- "3Com980-Cyclone", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9805, -- "3Com9805", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x7646, -- "3CSOHO100-TX", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_3C595 -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, -- "3Com590", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, -- "3Com595", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, -- "3Com595", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, -- "3Com595", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, -- "3Com900-TPO", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, -- "3Com900-Combo", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9004, -- "3Com900B-TPO", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9005, -- "3Com900B-Combo", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9006, -- "3Com900B-2/T", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x900A, -- "3Com900B-FL", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9800, -- "3Com980-Cyclone", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x9805, -- "3Com9805", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_3COM, 0x7646, -- "3CSOHO100-TX", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_EEPRO100 -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, -- "Intel EtherExpressPro100", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, -- "Intel EtherExpressPro100 82559ER", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, -- "Intel EtherExpressPro100 ID1029", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, -- "Intel Corporation 82559 InBusiness 10/100", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, -- "Intel EtherExpressPro100 82562EM", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_EPIC100 -- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, -- "SMC EtherPowerII", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_LANCE -- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, -- "AMD Lance/PCI", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, -- "AMD Lance/HomePNA", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_RTL8139 -- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, -- "Realtek 8139", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, -- "DFE530TX+/DFE538TX", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, -- "SMC EZ10/100", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_OTULIP -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, -- "Digital Tulip", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, -- "Digital Tulip Fast", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, -- "Digital Tulip+", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, -- "Digital Tulip 21142", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_TULIP -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, -- "Digital Tulip", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, -- "Digital Tulip Fast", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, -- "Digital Tulip+", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, -- "Digital Tulip 21142", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, -- "Macronix MX987x5", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, -- "LinkSys LNE100TX", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, -- "Netgear FA310TX", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, -- "Davicom 9102", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, -- "Davicom 9009", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, -- "ADMtek Centaur-P", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_ADMTEK, 0x0981, -- "ADMtek AN981 Comet", 0, 0, 0, 0}, -- { 0x125B, 0x1400, -- "ASIX AX88140", 0, 0, 0, 0 }, -- { 0x11F6, 0x9881, -- "Compex RL100-TX", 0, 0, 0, 0 }, --#endif --#ifdef INCLUDE_DAVICOM -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, -- "Davicom 9102", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, -- "Davicom 9009", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_VIA_RHINE -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, -- "VIA 6102", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, -- "VIA 3043", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, -- "VIA 86C100A", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_W89C840 -- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, -- "Winbond W89C840F", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, -- "Compex RL100ATX", 0, 0, 0, 0}, --#endif --#ifdef INCLUDE_SIS900 -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, -- "SIS900", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, -- "SIS7016", 0, 0, 0, 0}, --#endif -- --#ifdef INCLUDE_NATSEMI -- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, -- "DP83815", 0, 0, 0, 0}, --#endif -- --#ifdef INCLUDE_TLAN -- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, -- "OC2326", 0, 0, 0, 0}, -+/* -+ * NIC probing is in pci device order, followed by the -+ * link order of the drivers. A driver that matches -+ * on vendor and device id will supersede a driver -+ * that matches on pci class. -+ * -+ * If you want to probe for another device behind the same pci -+ * device just increment index. And the previous probe call -+ * will be repeated. -+ */ -+ struct pci_probe_state *state = &dev->state.pci; -+ printf("Probing pci %s...\n", type_name); -+ if (dev->how_probe == PROBE_FIRST) { -+ state->advance = 1; -+ state->dev.driver = 0; -+ state->dev.bus = 0; -+ state->dev.devfn = 0; -+ dev->index = -1; -+ } -+ for(;;) { -+ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { -+ find_pci(dev->type, &state->dev); -+ dev->index = -1; -+ } -+ state->advance = 1; -+ -+ if (state->dev.driver == 0) -+ break; -+ -+#if 0 -+ /* FIXME the romaddr code needs a total rethought to be useful */ -+ if (state->dev.romaddr != ((unsigned long) rom.rom_segment << 4)) { -+ continue; -+ } -+#endif -+ if (dev->how_probe != PROBE_AWAKE) { -+ dev->type_index++; -+ } -+ dev->devid.bus_type = PCI_BUS_TYPE; -+ dev->devid.vendor_id = htons(state->dev.vendor); -+ dev->devid.device_id = htons(state->dev.dev_id); -+ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ -+ -+ printf("[%s]", state->dev.name); -+ if (state->dev.driver->probe(dev, &state->dev)) { -+ state->advance = (dev->index == -1); -+ return PROBE_WORKED; -+ } -+ putchar('\n'); -+ } -+ return PROBE_FAILED; -+} - #endif - -- /* other PCI NICs go here */ -- {0, 0, NULL, 0, 0, 0, 0} --}; --#endif /* INCLUDE_*PCI */ -- --#include -- --#ifdef INCLUDE_PCI --struct pci_dispatch_table -+#ifdef CONFIG_ISA -+static int isa_probe(struct dev *dev, const char *type_name) - { -- unsigned short vendor; -- unsigned short dev_id; -- struct nic *(*eth_probe) (struct nic *, unsigned short *, -- struct pci_device *); --}; -- --static struct pci_dispatch_table PCI_NIC[] = --{ --# ifdef INCLUDE_NS8390 -- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, nepci_probe }, -- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, nepci_probe }, -- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, nepci_probe }, -- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, nepci_probe }, -- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, nepci_probe }, -- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, nepci_probe }, --# endif /* INCLUDE_NS8390 */ --# ifdef INCLUDE_3C90X -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9004, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9005, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9006, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x900A, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9056, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x905A, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9800, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x9805, a3c90x_probe }, -- { PCI_VENDOR_ID_3COM, 0x7646, a3c90x_probe }, --# endif /* INCLUDE_3C90X */ --# ifdef INCLUDE_3C595 -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, t595_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, t595_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, t595_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, t595_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, t595_probe }, -- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x9004, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x9005, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x9006, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x900A, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x9800, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x9805, t595_probe }, -- { PCI_VENDOR_ID_3COM, 0x7646, t595_probe }, --# endif /* INCLUDE_3C595 */ --# ifdef INCLUDE_EEPRO100 -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, eepro100_probe }, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, eepro100_probe }, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, eepro100_probe }, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, eepro100_probe }, -- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, eepro100_probe }, --# endif /* INCLUDE_EEPRO100 */ --# ifdef INCLUDE_EPIC100 -- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, epic100_probe }, --# endif /* INCLUDE_EPIC100 */ --# ifdef INCLUDE_LANCE -- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, lancepci_probe }, -- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, lancepci_probe }, --# endif /* INCLUDE_LANCE */ --# ifdef INCLUDE_RTL8139 -- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, rtl8139_probe }, -- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, rtl8139_probe }, -- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, rtl8139_probe }, --# endif /* INCLUDE_RTL8139 */ --# ifdef INCLUDE_OTULIP -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, otulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, otulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, otulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, otulip_probe }, --# endif /* INCLUDE_OTULIP */ --# ifdef INCLUDE_TULIP -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, tulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, tulip_probe }, -- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, tulip_probe }, -- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, tulip_probe }, -- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, tulip_probe }, -- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, tulip_probe }, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, tulip_probe }, -- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, tulip_probe }, -- { PCI_VENDOR_ID_ADMTEK, 0x0981, tulip_probe }, -- { 0x125B, 0x1400, tulip_probe }, -- { 0x11F6, 0x9881, tulip_probe }, --# endif /* INCLUDE_TULIP */ --# ifdef INCLUDE_DAVICOM -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, davicom_probe }, -- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, davicom_probe }, --# endif /* INCLUDE_DAVICOM */ --# ifdef INCLUDE_VIA_RHINE -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, rhine_probe }, -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, rhine_probe }, -- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, rhine_probe }, --# endif /* INCLUDE_VIA_RHINE */ --# ifdef INCLUDE_W89C840 -- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, w89c840_probe }, -- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, w89c840_probe }, --# endif /* INCLUDE_W89C840 */ --# ifdef INCLUDE_SIS900 -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, sis900_probe }, -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, sis900_probe }, --# endif /* INCLUDE_SIS900 */ --# ifdef INCLUDE_NATSEMI -- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, natsemi_probe }, --# endif /* INCLUDE_NATSEMI */ --# ifdef INCLUDE_TLAN -- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, tlan_probe }, --# endif /* INCLUDE_TLAN */ -- { 0, 0, 0 } --}; --#endif /* GRUB && INCLUDE_PCI */ -- --struct dispatch_table --{ -- const char *nic_name; --#ifdef INCLUDE_PCI -- struct nic *(*eth_probe) (struct nic *, unsigned short *, -- struct pci_device *); --#else -- struct nic *(*eth_probe) (struct nic *, unsigned short *); --#endif /* INCLUDE_PCI */ -- unsigned short *probe_ioaddrs; /* for probe overrides */ --}; -- - /* -- * NIC probing is in order of appearance in this table. -+ * NIC probing is in the order the drivers were linked togeter. - * If for some reason you want to change the order, -- * just rearrange the entries (bracketed by the #ifdef/#endif) -+ * just change the order you list the drivers in. - */ --static struct dispatch_table NIC[] = --{ --#ifdef INCLUDE_RTL8139 -- { "RTL8139", rtl8139_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_SIS900 -- { "SIS900", sis900_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_NATSEMI -- { "NATSEMI", natsemi_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_WD -- { "WD", wd_probe, 0 }, --#endif --#ifdef INCLUDE_3C503 -- { "3C503", t503_probe, 0 }, --#endif --#ifdef INCLUDE_NE -- { "NE*000", ne_probe, 0 }, --#endif --#ifdef INCLUDE_3C509 -- { "3C5x9", t509_probe, 0 }, --#endif --#ifdef INCLUDE_3C529 -- { "3C5x9", t529_probe, 0 }, --#endif --#ifdef INCLUDE_3C595 -- { "3C595", t595_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_3C90X -- { "3C90X", a3c90x_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_EEPRO -- { "EEPRO", eepro_probe, 0 }, --#endif --#ifdef INCLUDE_EEPRO100 -- { "EEPRO100", eepro100_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_EPIC100 -- { "EPIC100", epic100_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_OTULIP -- { "OTulip", otulip_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_TULIP -- { "Tulip", tulip_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_DAVICOM -- { "DAVICOM", davicom_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_CS89X0 -- { "CS89x0", cs89x0_probe, 0 }, --#endif --#ifdef INCLUDE_NE2100 -- { "NE2100", ne2100_probe, 0 }, --#endif --#ifdef INCLUDE_NI6510 -- { "NI6510", ni6510_probe, 0 }, --#endif --#ifdef INCLUDE_SK_G16 -- { "SK_G16", SK_probe, 0 }, --#endif --#ifdef INCLUDE_3C507 -- { "3C507", t507_probe, 0 }, --#endif --#ifdef INCLUDE_NI5010 -- { "NI5010", ni5010_probe, 0 }, --#endif --#ifdef INCLUDE_NI5210 -- { "NI5210", ni5210_probe, 0 }, --#endif --#ifdef INCLUDE_EXOS205 -- { "EXOS205", exos205_probe, 0 }, --#endif --#ifdef INCLUDE_SMC9000 -- { "SMC9000", smc9000_probe, 0 }, --#endif --#ifdef INCLUDE_TIARA -- { "TIARA", tiara_probe, 0 }, --#endif --#ifdef INCLUDE_DEPCA -- { "DEPCA", depca_probe, 0 }, --#endif --#ifdef INCLUDE_NS8390 -- { "NE2000/PCI", nepci_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_LANCE -- { "LANCE/PCI", lancepci_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_VIA_RHINE -- { "VIA 86C100", rhine_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_W89C840 -- { "W89C840F", w89c840_probe, pci_ioaddrs }, --#endif --#ifdef INCLUDE_TLAN -- { "Olicom 2326", tlan_probe, pci_ioaddrs }, --#endif -- /* this entry must always be last to mark the end of list */ -- { 0, 0, 0 } --}; -- --#define NIC_TABLE_SIZE (sizeof (NIC) / sizeof (NIC[0])) -- --static int --eth_dummy (struct nic *dummy) --{ -- return 0; -+ struct isa_probe_state *state = &dev->state.isa; -+ printf("Probing isa %s...\n", type_name); -+ if (dev->how_probe == PROBE_FIRST) { -+ state->advance = 0; -+ state->driver = isa_drivers; -+ dev->index = -1; -+ } -+ for(;;) -+ { -+ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { -+ state->driver++; -+ dev->index = -1; -+ } -+ state->advance = 1; -+ -+ if (state->driver >= isa_drivers_end) -+ break; -+ -+ if (state->driver->type != dev->type) -+ continue; -+ -+ if (dev->how_probe != PROBE_AWAKE) { -+ dev->type_index++; -+ } -+ printf("[%s]", state->driver->name); -+ dev->devid.bus_type = ISA_BUS_TYPE; -+ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ -+ /* driver will fill in vendor and device IDs */ -+ if (state->driver->probe(dev, state->driver->ioaddrs)) { -+ state->advance = (dev->index == -1); -+ return PROBE_WORKED; -+ } -+ putchar('\n'); -+ } -+ return PROBE_FAILED; - } -- --static char packet[ETH_FRAME_LEN]; -- --struct nic nic = --{ -- (void (*) (struct nic *)) eth_dummy, /* reset */ -- eth_dummy, /* poll */ -- (void (*) (struct nic *, const char *, -- unsigned int, unsigned int, -- const char *)) eth_dummy, /* transmit */ -- (void (*) (struct nic *)) eth_dummy, /* disable */ --#ifdef T503_AUI -- 1, /* aui */ - #else -- 0, /* no aui */ -+#define isa_probe(d,tn) (PROBE_FAILED) - #endif -- &rom, /* rom_info */ -- arptable[ARP_CLIENT].node, /* node_addr */ -- packet, /* packet */ -- 0, /* packetlen */ -- 0, /* priv_data */ -+static const char *driver_name[] = { -+ "nic", -+ "disk", -+ "floppy", - }; -- --void --eth_reset (void) -+int probe(struct dev *dev) - { -- (*nic.reset) (&nic); --} -+ const char *type_name; - --int --eth_probe (void) --{ -- struct pci_device *p; -- const struct dispatch_table *t; -- static int probed = 0; -+ EnterFunction("probe"); - -- /* If already probed, don't try to probe it any longer. */ -- if (probed) -- return 1; -- -- /* Clear the ready flag. */ -- network_ready = 0; -- /* Clear the ARP table. */ -- grub_memset ((char *) arptable, 0, -- MAX_ARP * sizeof (struct arptable_t)); -- -- p = 0; -- --#ifdef INCLUDE_PCI -- /* In GRUB, the ROM info is initialized here. */ -- rom = *((struct rom_info *) ROM_INFO_LOCATION); -- -- eth_pci_init(pci_nic_list); -- pci_ioaddrs[0] = 0; -- pci_ioaddrs[1] = 0; -- /* at this point we have a list of possible PCI candidates -- we just pick the first one with a non-zero ioaddr */ -- for (p = pci_nic_list; p->vendor != 0; ++p) -- { -- if (p->ioaddr != 0) -- { -- pci_ioaddrs[0] = p->ioaddr; -- break; -+ type_name = ""; -+ if ((dev->type >= 0) && -+ (dev->type < sizeof(driver_name)/sizeof(driver_name[0]))) { -+ type_name = driver_name[dev->type]; - } -- } --#endif -- -- etherboot_printf("Probing..."); -- --#ifdef INCLUDE_PCI -- if (p->vendor) -- { -- struct pci_dispatch_table *pt; -- -- for (pt = PCI_NIC; pt->eth_probe != 0; pt++) -- if (p->vendor == pt->vendor && p->dev_id == pt->dev_id) -- { -- etherboot_printf ("[%s]", p->name); -- if ((pt->eth_probe) (&nic, pci_ioaddrs, p)) -- { -- probed = 1; -- return 1; -- } -- } -- } --#endif /* INCLUDE_PCI */ -- -- for (t = NIC; t->nic_name != 0; ++t) -- { -- etherboot_printf("[%s]", t->nic_name); --#ifdef INCLUDE_PCI -- if ((*t->eth_probe) (&nic, t->probe_ioaddrs, p)) -- { -- probed = 1; -- return 1; -+ if (dev->how_probe == PROBE_FIRST) { -+ dev->to_probe = PROBE_PCI; -+ memset(&dev->state, 0, sizeof(dev->state)); - } --#else -- if ((*t->eth_probe) (&nic, t->probe_ioaddrs)) -- { -- probed = 1; -- return 1; -+ if (dev->to_probe == PROBE_PCI) { -+ dev->how_probe = pci_probe(dev, type_name); -+ if (dev->how_probe == PROBE_FAILED) { -+ dev->to_probe = PROBE_ISA; -+ } -+ } -+ if (dev->to_probe == PROBE_ISA) { -+ dev->how_probe = isa_probe(dev, type_name); -+ if (dev->how_probe == PROBE_FAILED) { -+ dev->to_probe = PROBE_NONE; -+ } -+ } -+ if ((dev->to_probe != PROBE_PCI) && -+ (dev->to_probe != PROBE_ISA)) { -+ dev->how_probe = PROBE_FAILED; -+ - } --#endif /* INCLUDE_PCI */ -- } -- -- return 0; --} -- --int --eth_poll (void) --{ -- return ((*nic.poll) (&nic)); --} - --void --eth_transmit (const char *d, unsigned int t, unsigned int s, const void *p) --{ -- (*nic.transmit) (&nic, d, t, s, p); -- if (t == IP) -- twiddle (); -+ LeaveFunction("probe"); -+ return dev->how_probe; - } - --void --eth_disable (void) -+void disable(struct dev *dev) - { -- (*nic.disable) (&nic); -+ if (dev->disable) { -+ dev->disable(dev); -+ dev->disable = 0; -+ } - } -Index: b/netboot/cpu.h -=================================================================== ---- /dev/null -+++ b/netboot/cpu.h -@@ -0,0 +1,243 @@ -+#ifndef I386_BITS_CPU_H -+#define I386_BITS_CPU_H -+ -+ -+/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */ -+#define CPU_FEATURE_P(CAP, FEATURE) \ -+ (!!(CAP[(X86_FEATURE_##FEATURE)/32] & ((X86_FEATURE_##FEATURE) & 0x1f))) -+ -+#define NCAPINTS 4 /* Currently we have 4 32-bit words worth of info */ -+ -+/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ -+#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ -+#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ -+#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ -+#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ -+#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ -+#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ -+#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ -+#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ -+#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ -+#define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ -+#define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ -+#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ -+#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ -+#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ -+#define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ -+#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ -+#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ -+#define X86_FEATURE_PN (0*32+18) /* Processor serial number */ -+#define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ -+#define X86_FEATURE_DTES (0*32+21) /* Debug Trace Store */ -+#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ -+#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ -+#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ -+ /* of FPU context), and CR4.OSFXSR available */ -+#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ -+#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ -+#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */ -+#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ -+#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ -+#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ -+ -+/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ -+/* Don't duplicate feature flags which are redundant with Intel! */ -+#define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ -+#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ -+#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ -+#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ -+#define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ -+ -+/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ -+#define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */ -+#define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */ -+#define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */ -+ -+/* Other features, Linux-defined mapping, word 3 */ -+/* This range is used for feature bits which conflict or are synthesized */ -+#define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */ -+#define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ -+#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ -+#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ -+ -+#define MAX_X86_VENDOR_ID 16 -+struct cpuinfo_x86 { -+ uint8_t x86; /* CPU family */ -+ uint8_t x86_model; -+ uint8_t x86_mask; -+ -+ int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */ -+ unsigned x86_capability[NCAPINTS]; -+ char x86_vendor_id[MAX_X86_VENDOR_ID]; -+}; -+ -+ -+#define X86_VENDOR_INTEL 0 -+#define X86_VENDOR_CYRIX 1 -+#define X86_VENDOR_AMD 2 -+#define X86_VENDOR_UMC 3 -+#define X86_VENDOR_NEXGEN 4 -+#define X86_VENDOR_CENTAUR 5 -+#define X86_VENDOR_RISE 6 -+#define X86_VENDOR_TRANSMETA 7 -+#define X86_VENDOR_NSC 8 -+#define X86_VENDOR_UNKNOWN 0xff -+ -+/* -+ * EFLAGS bits -+ */ -+#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */ -+#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */ -+#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */ -+#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */ -+#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */ -+#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */ -+#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */ -+#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */ -+#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */ -+#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */ -+#define X86_EFLAGS_NT 0x00004000 /* Nested Task */ -+#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */ -+#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */ -+#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */ -+#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */ -+#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */ -+#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ -+ -+/* -+ * Generic CPUID function -+ */ -+static inline void cpuid(int op, -+ unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) -+{ -+ __asm__("cpuid" -+ : "=a" (*eax), -+ "=b" (*ebx), -+ "=c" (*ecx), -+ "=d" (*edx) -+ : "0" (op)); -+} -+ -+/* -+ * CPUID functions returning a single datum -+ */ -+static inline unsigned int cpuid_eax(unsigned int op) -+{ -+ unsigned int eax; -+ -+ __asm__("cpuid" -+ : "=a" (eax) -+ : "0" (op) -+ : "bx", "cx", "dx"); -+ return eax; -+} -+static inline unsigned int cpuid_ebx(unsigned int op) -+{ -+ unsigned int eax, ebx; -+ -+ __asm__("cpuid" -+ : "=a" (eax), "=b" (ebx) -+ : "0" (op) -+ : "cx", "dx" ); -+ return ebx; -+} -+static inline unsigned int cpuid_ecx(unsigned int op) -+{ -+ unsigned int eax, ecx; -+ -+ __asm__("cpuid" -+ : "=a" (eax), "=c" (ecx) -+ : "0" (op) -+ : "bx", "dx" ); -+ return ecx; -+} -+static inline unsigned int cpuid_edx(unsigned int op) -+{ -+ unsigned int eax, edx; -+ -+ __asm__("cpuid" -+ : "=a" (eax), "=d" (edx) -+ : "0" (op) -+ : "bx", "cx"); -+ return edx; -+} -+ -+/* -+ * Intel CPU features in CR4 -+ */ -+#define X86_CR4_VME 0x0001 /* enable vm86 extensions */ -+#define X86_CR4_PVI 0x0002 /* virtual interrupts flag enable */ -+#define X86_CR4_TSD 0x0004 /* disable time stamp at ipl 3 */ -+#define X86_CR4_DE 0x0008 /* enable debugging extensions */ -+#define X86_CR4_PSE 0x0010 /* enable page size extensions */ -+#define X86_CR4_PAE 0x0020 /* enable physical address extensions */ -+#define X86_CR4_MCE 0x0040 /* Machine check enable */ -+#define X86_CR4_PGE 0x0080 /* enable global pages */ -+#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */ -+#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */ -+#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */ -+ -+ -+#define MSR_K6_EFER 0xC0000080 -+/* EFER bits: */ -+#define _EFER_SCE 0 /* SYSCALL/SYSRET */ -+#define _EFER_LME 8 /* Long mode enable */ -+#define _EFER_LMA 10 /* Long mode active (read-only) */ -+#define _EFER_NX 11 /* No execute enable */ -+ -+#define EFER_SCE (1<<_EFER_SCE) -+#define EFER_LME (1< -- -- * disabled all "advanced" features; this should make the code more reliable -- -- * reorganized the reset function -- -- * always reset the address port, so that autoprobing will continue working -- -- * some cosmetic changes -- -- * 2.5 -- -- Thu Dec 5 21:00:00 1996 Markus Gutschke -- -- * tested the code against a CS8900 card -- -- * lots of minor bug fixes and adjustments -- -- * this is the first release, that actually works! it still requires some -- changes in order to be more tolerant to different environments -- -- * 4 -- -- Fri Nov 22 23:00:00 1996 Markus Gutschke -- -- * read the manuals for the CS89x0 chipsets and took note of all the -- changes that will be neccessary in order to adapt Russel Nelson's code -- to the requirements of a BOOT-Prom -- -- * 6 -- -- Thu Nov 19 22:00:00 1996 Markus Gutschke -- -- * Synched with Russel Nelson's current code (v1.00) -- -- * 2 -- -- Thu Nov 12 18:00:00 1996 Markus Gutschke -- -- * Cleaned up some of the code and tried to optimize the code size. -- -- * 1.5 -- -- Sun Nov 10 16:30:00 1996 Markus Gutschke -- -- * First experimental release. This code compiles fine, but I -- have no way of testing whether it actually works. -- -- * I did not (yet) bother to make the code 16bit aware, so for -- the time being, it will only work for Etherboot/32. -- -- * 12 -- -- */ -- --#include "etherboot.h" --#include "nic.h" --#include "cards.h" --#include "cs89x0.h" -- --static unsigned short eth_nic_base; --static unsigned long eth_mem_start; --static unsigned short eth_irq; --static unsigned short eth_cs_type; /* one of: CS8900, CS8920, CS8920M */ --static unsigned short eth_auto_neg_cnf; --static unsigned short eth_adapter_cnf; --static unsigned short eth_linectl; -- --/************************************************************************* -- CS89x0 - specific routines --**************************************************************************/ -- --static inline int readreg(int portno) --{ -- outw(portno, eth_nic_base + ADD_PORT); -- return inw(eth_nic_base + DATA_PORT); --} -- --static inline void writereg(int portno, int value) --{ -- outw(portno, eth_nic_base + ADD_PORT); -- outw(value, eth_nic_base + DATA_PORT); -- return; --} -- --/************************************************************************* --EEPROM access --**************************************************************************/ -- --static int wait_eeprom_ready(void) --{ -- unsigned long tmo = currticks() + 4*TICKS_PER_SEC; -- -- /* check to see if the EEPROM is ready, a timeout is used - -- just in case EEPROM is ready when SI_BUSY in the -- PP_SelfST is clear */ -- while(readreg(PP_SelfST) & SI_BUSY) { -- if (currticks() >= tmo) -- return -1; } -- return 0; --} -- --static int get_eeprom_data(int off, int len, unsigned short *buffer) --{ -- int i; -- --#ifdef EDEBUG -- printf("\ncs: EEPROM data from %hX for %hX:",off,len); --#endif -- for (i = 0; i < len; i++) { -- if (wait_eeprom_ready() < 0) -- return -1; -- /* Now send the EEPROM read command and EEPROM location -- to read */ -- writereg(PP_EECMD, (off + i) | EEPROM_READ_CMD); -- if (wait_eeprom_ready() < 0) -- return -1; -- buffer[i] = readreg(PP_EEData); --#ifdef EDEBUG -- if (!(i%10)) -- printf("\ncs: "); -- printf("%hX ", buffer[i]); --#endif -- } --#ifdef EDEBUG -- putchar('\n'); --#endif -- -- return(0); --} -- --static int get_eeprom_chksum(int off, int len, unsigned short *buffer) --{ -- int i, cksum; -- -- cksum = 0; -- for (i = 0; i < len; i++) -- cksum += buffer[i]; -- cksum &= 0xffff; -- if (cksum == 0) -- return 0; -- return -1; --} -- --/************************************************************************* --Activate all of the available media and probe for network --**************************************************************************/ -- --static void clrline(void) --{ -- int i; -- -- putchar('\r'); -- for (i = 79; i--; ) putchar(' '); -- printf("\rcs: "); -- return; --} -- --static void control_dc_dc(int on_not_off) --{ -- unsigned int selfcontrol; -- unsigned long tmo = currticks() + TICKS_PER_SEC; -- -- /* control the DC to DC convertor in the SelfControl register. */ -- selfcontrol = HCB1_ENBL; /* Enable the HCB1 bit as an output */ -- if (((eth_adapter_cnf & A_CNF_DC_DC_POLARITY) != 0) ^ on_not_off) -- selfcontrol |= HCB1; -- else -- selfcontrol &= ~HCB1; -- writereg(PP_SelfCTL, selfcontrol); -- -- /* Wait for the DC/DC converter to power up - 1000ms */ -- while (currticks() < tmo); -- -- return; --} -- --static int detect_tp(void) --{ -- unsigned long tmo; -- -- /* Turn on the chip auto detection of 10BT/ AUI */ -- -- clrline(); printf("attempting %s:","TP"); -- -- /* If connected to another full duplex capable 10-Base-T card -- the link pulses seem to be lost when the auto detect bit in -- the LineCTL is set. To overcome this the auto detect bit -- will be cleared whilst testing the 10-Base-T interface. -- This would not be necessary for the sparrow chip but is -- simpler to do it anyway. */ -- writereg(PP_LineCTL, eth_linectl &~ AUI_ONLY); -- control_dc_dc(0); -- -- /* Delay for the hardware to work out if the TP cable is -- present - 150ms */ -- for (tmo = currticks() + 4; currticks() < tmo; ); -- -- if ((readreg(PP_LineST) & LINK_OK) == 0) -- return 0; -- -- if (eth_cs_type != CS8900) { -- -- writereg(PP_AutoNegCTL, eth_auto_neg_cnf & AUTO_NEG_MASK); -- -- if ((eth_auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { -- printf(" negotiating duplex... "); -- while (readreg(PP_AutoNegST) & AUTO_NEG_BUSY) { -- if (currticks() - tmo > 40*TICKS_PER_SEC) { -- printf("time out "); -- break; -- } -- } -- } -- if (readreg(PP_AutoNegST) & FDX_ACTIVE) -- printf("using full duplex"); -- else -- printf("using half duplex"); -- } -- -- return A_CNF_MEDIA_10B_T; --} -- --/* send a test packet - return true if carrier bits are ok */ --static int send_test_pkt(struct nic *nic) --{ -- static unsigned char testpacket[] = { 0,0,0,0,0,0, 0,0,0,0,0,0, -- 0, 46, /*A 46 in network order */ -- 0, 0, /*DSAP=0 & SSAP=0 fields */ -- 0xf3,0 /*Control (Test Req+P bit set)*/ }; -- unsigned long tmo; -- -- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_TX_ON); -- -- memcpy(testpacket, nic->node_addr, ETH_ALEN); -- memcpy(testpacket+ETH_ALEN, nic->node_addr, ETH_ALEN); -- -- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); -- outw(ETH_ZLEN, eth_nic_base + TX_LEN_PORT); -- -- /* Test to see if the chip has allocated memory for the packet */ -- for (tmo = currticks() + 2; -- (readreg(PP_BusST) & READY_FOR_TX_NOW) == 0; ) -- if (currticks() >= tmo) -- return(0); -- -- /* Write the contents of the packet */ -- outsw(eth_nic_base + TX_FRAME_PORT, testpacket, -- (ETH_ZLEN+1)>>1); -- -- printf(" sending test packet "); -- /* wait a couple of timer ticks for packet to be received */ -- for (tmo = currticks() + 2; currticks() < tmo; ); -- -- if ((readreg(PP_TxEvent) & TX_SEND_OK_BITS) == TX_OK) { -- printf("succeeded"); -- return 1; -- } -- printf("failed"); -- return 0; --} -- -- --static int detect_aui(struct nic *nic) --{ -- clrline(); printf("attempting %s:","AUI"); -- control_dc_dc(0); -- -- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); -- -- if (send_test_pkt(nic)) { -- return A_CNF_MEDIA_AUI; } -- else -- return 0; --} -- --static int detect_bnc(struct nic *nic) --{ -- clrline(); printf("attempting %s:","BNC"); -- control_dc_dc(1); -- -- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); -- -- if (send_test_pkt(nic)) { -- return A_CNF_MEDIA_10B_2; } -- else -- return 0; --} -- --/************************************************************************** --ETH_RESET - Reset adapter --***************************************************************************/ -- --static void cs89x0_reset(struct nic *nic) --{ -- int i; -- unsigned long reset_tmo; -- -- writereg(PP_SelfCTL, readreg(PP_SelfCTL) | POWER_ON_RESET); -- -- /* wait for two ticks; that is 2*55ms */ -- for (reset_tmo = currticks() + 2; currticks() < reset_tmo; ); -- -- if (eth_cs_type != CS8900) { -- /* Hardware problem requires PNP registers to be reconfigured -- after a reset */ -- if (eth_irq != 0xFFFF) { -- outw(PP_CS8920_ISAINT, eth_nic_base + ADD_PORT); -- outb(eth_irq, eth_nic_base + DATA_PORT); -- outb(0, eth_nic_base + DATA_PORT + 1); } -- -- if (eth_mem_start) { -- outw(PP_CS8920_ISAMemB, eth_nic_base + ADD_PORT); -- outb((eth_mem_start >> 8) & 0xff, eth_nic_base + DATA_PORT); -- outb((eth_mem_start >> 24) & 0xff, eth_nic_base + DATA_PORT + 1); } } -- -- /* Wait until the chip is reset */ -- for (reset_tmo = currticks() + 2; -- (readreg(PP_SelfST) & INIT_DONE) == 0 && -- currticks() < reset_tmo; ); -- -- /* disable interrupts and memory accesses */ -- writereg(PP_BusCTL, 0); -- -- /* set the ethernet address */ -- for (i=0; i < ETH_ALEN/2; i++) -- writereg(PP_IA+i*2, -- nic->node_addr[i*2] | -- (nic->node_addr[i*2+1] << 8)); -- -- /* receive only error free packets addressed to this card */ -- writereg(PP_RxCTL, DEF_RX_ACCEPT); -- -- /* do not generate any interrupts on receive operations */ -- writereg(PP_RxCFG, 0); -- -- /* do not generate any interrupts on transmit operations */ -- writereg(PP_TxCFG, 0); -- -- /* do not generate any interrupts on buffer operations */ -- writereg(PP_BufCFG, 0); -- -- /* reset address port, so that autoprobing will keep working */ -- outw(PP_ChipID, eth_nic_base + ADD_PORT); -- -- return; --} -- --/************************************************************************** --ETH_TRANSMIT - Transmit a frame --***************************************************************************/ -- --static void cs89x0_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- unsigned long tmo; -- int sr; -- -- /* does this size have to be rounded??? please, -- somebody have a look in the specs */ -- if ((sr = ((s + ETH_HLEN + 1)&~1)) < ETH_ZLEN) -- sr = ETH_ZLEN; -- --retry: -- /* initiate a transmit sequence */ -- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); -- outw(sr, eth_nic_base + TX_LEN_PORT); -- -- /* Test to see if the chip has allocated memory for the packet */ -- if ((readreg(PP_BusST) & READY_FOR_TX_NOW) == 0) { -- /* Oops... this should not happen! */ -- printf("cs: unable to send packet; retrying...\n"); -- for (tmo = currticks() + 5*TICKS_PER_SEC; currticks() < tmo; ); -- cs89x0_reset(nic); -- goto retry; } -- -- /* Write the contents of the packet */ -- outsw(eth_nic_base + TX_FRAME_PORT, d, ETH_ALEN/2); -- outsw(eth_nic_base + TX_FRAME_PORT, nic->node_addr, -- ETH_ALEN/2); -- outw(((t >> 8)&0xFF)|(t << 8), eth_nic_base + TX_FRAME_PORT); -- outsw(eth_nic_base + TX_FRAME_PORT, p, (s+1)/2); -- for (sr = sr/2 - (s+1)/2 - ETH_ALEN - 1; sr-- > 0; -- outw(0, eth_nic_base + TX_FRAME_PORT)); -- -- /* wait for transfer to succeed */ -- for (tmo = currticks()+5*TICKS_PER_SEC; -- (s = readreg(PP_TxEvent)&~0x1F) == 0 && currticks() < tmo;) -- /* nothing */ ; -- if ((s & TX_SEND_OK_BITS) != TX_OK) { -- printf("\ntransmission error %#hX\n", s); -- } -- -- return; --} -- --/************************************************************************** --ETH_POLL - Wait for a frame --***************************************************************************/ -- --static int cs89x0_poll(struct nic *nic) --{ -- int status; -- -- status = readreg(PP_RxEvent); -- -- if ((status & RX_OK) == 0) -- return(0); -- -- status = inw(eth_nic_base + RX_FRAME_PORT); -- nic->packetlen = inw(eth_nic_base + RX_FRAME_PORT); -- insw(eth_nic_base + RX_FRAME_PORT, nic->packet, nic->packetlen >> 1); -- if (nic->packetlen & 1) -- nic->packet[nic->packetlen-1] = inw(eth_nic_base + RX_FRAME_PORT); -- return 1; --} -- --static void cs89x0_disable(struct nic *nic) --{ -- cs89x0_reset(nic); --} -- --/************************************************************************** --ETH_PROBE - Look for an adapter --***************************************************************************/ -- --struct nic *cs89x0_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- static const unsigned int netcard_portlist[] = { --#ifdef CS_SCAN -- CS_SCAN, --#else /* use "conservative" default values for autoprobing */ -- 0x300,0x320,0x340,0x200,0x220,0x240, -- 0x260,0x280,0x2a0,0x2c0,0x2e0, -- /* if that did not work, then be more aggressive */ -- 0x301,0x321,0x341,0x201,0x221,0x241, -- 0x261,0x281,0x2a1,0x2c1,0x2e1, --#endif -- 0}; -- -- int i, result = -1; -- unsigned rev_type = 0, ioaddr, ioidx, isa_cnf, cs_revision; -- unsigned short eeprom_buff[CHKSUM_LEN]; -- -- -- for (ioidx = 0; (ioaddr=netcard_portlist[ioidx++]) != 0; ) { -- /* if they give us an odd I/O address, then do ONE write to -- the address port, to get it back to address zero, where we -- expect to find the EISA signature word. */ -- if (ioaddr & 1) { -- ioaddr &= ~1; -- if ((inw(ioaddr + ADD_PORT) & ADD_MASK) != ADD_SIG) -- continue; -- outw(PP_ChipID, ioaddr + ADD_PORT); -- } -- -- if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) -- continue; -- eth_nic_base = ioaddr; -- -- /* get the chip type */ -- rev_type = readreg(PRODUCT_ID_ADD); -- eth_cs_type = rev_type &~ REVISON_BITS; -- cs_revision = ((rev_type & REVISON_BITS) >> 8) + 'A'; -- -- printf("\ncs: cs89%c0%s rev %c, base %#hX", -- eth_cs_type==CS8900?'0':'2', -- eth_cs_type==CS8920M?"M":"", -- cs_revision, -- eth_nic_base); -- -- /* First check to see if an EEPROM is attached*/ -- if ((readreg(PP_SelfST) & EEPROM_PRESENT) == 0) { -- printf("\ncs: no EEPROM...\n"); -- outw(PP_ChipID, eth_nic_base + ADD_PORT); -- continue; } -- else if (get_eeprom_data(START_EEPROM_DATA,CHKSUM_LEN, -- eeprom_buff) < 0) { -- printf("\ncs: EEPROM read failed...\n"); -- outw(PP_ChipID, eth_nic_base + ADD_PORT); -- continue; } -- else if (get_eeprom_chksum(START_EEPROM_DATA,CHKSUM_LEN, -- eeprom_buff) < 0) { -- printf("\ncs: EEPROM checksum bad...\n"); -- outw(PP_ChipID, eth_nic_base + ADD_PORT); -- continue; } -- -- /* get transmission control word but keep the -- autonegotiation bits */ -- eth_auto_neg_cnf = eeprom_buff[AUTO_NEG_CNF_OFFSET/2]; -- /* Store adapter configuration */ -- eth_adapter_cnf = eeprom_buff[ADAPTER_CNF_OFFSET/2]; -- /* Store ISA configuration */ -- isa_cnf = eeprom_buff[ISA_CNF_OFFSET/2]; -- -- /* store the initial memory base address */ -- eth_mem_start = eeprom_buff[PACKET_PAGE_OFFSET/2] << 8; -- -- printf("%s%s%s, addr ", -- (eth_adapter_cnf & A_CNF_10B_T)?", RJ-45":"", -- (eth_adapter_cnf & A_CNF_AUI)?", AUI":"", -- (eth_adapter_cnf & A_CNF_10B_2)?", BNC":""); -- -- /* If this is a CS8900 then no pnp soft */ -- if (eth_cs_type != CS8900 && -- /* Check if the ISA IRQ has been set */ -- (i = readreg(PP_CS8920_ISAINT) & 0xff, -- (i != 0 && i < CS8920_NO_INTS))) -- eth_irq = i; -- else { -- i = isa_cnf & INT_NO_MASK; -- if (eth_cs_type == CS8900) { -- /* the table that follows is dependent -- upon how you wired up your cs8900 -- in your system. The table is the -- same as the cs8900 engineering demo -- board. irq_map also depends on the -- contents of the table. Also see -- write_irq, which is the reverse -- mapping of the table below. */ -- if (i < 4) i = "\012\013\014\005"[i]; -- else printf("\ncs: BUG: isa_config is %d\n", i); } -- eth_irq = i; } -- -- /* Retrieve and print the ethernet address. */ -- for (i=0; inode_addr[i] = ((unsigned char *)eeprom_buff)[i]; -- } -- printf("%!\n", nic->node_addr); -- -- /* Set the LineCTL quintuplet based on adapter -- configuration read from EEPROM */ -- if ((eth_adapter_cnf & A_CNF_EXTND_10B_2) && -- (eth_adapter_cnf & A_CNF_LOW_RX_SQUELCH)) -- eth_linectl = LOW_RX_SQUELCH; -- else -- eth_linectl = 0; -- -- /* check to make sure that they have the "right" -- hardware available */ -- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { -- case A_CNF_MEDIA_10B_T: result = eth_adapter_cnf & A_CNF_10B_T; -- break; -- case A_CNF_MEDIA_AUI: result = eth_adapter_cnf & A_CNF_AUI; -- break; -- case A_CNF_MEDIA_10B_2: result = eth_adapter_cnf & A_CNF_10B_2; -- break; -- default: result = eth_adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | -- A_CNF_10B_2); -- } -- if (!result) { -- printf("cs: EEPROM is configured for unavailable media\n"); -- error: -- writereg(PP_LineCTL, readreg(PP_LineCTL) & -- ~(SERIAL_TX_ON | SERIAL_RX_ON)); -- outw(PP_ChipID, eth_nic_base + ADD_PORT); -- continue; -- } -- -- /* Initialize the card for probing of the attached media */ -- cs89x0_reset(nic); -- -- /* set the hardware to the configured choice */ -- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { -- case A_CNF_MEDIA_10B_T: -- result = detect_tp(); -- if (!result) { -- clrline(); -- printf("10Base-T (RJ-45%s", -- ") has no cable\n"); } -- /* check "ignore missing media" bit */ -- if (eth_auto_neg_cnf & IMM_BIT) -- /* Yes! I don't care if I see a link pulse */ -- result = A_CNF_MEDIA_10B_T; -- break; -- case A_CNF_MEDIA_AUI: -- result = detect_aui(nic); -- if (!result) { -- clrline(); -- printf("10Base-5 (AUI%s", -- ") has no cable\n"); } -- /* check "ignore missing media" bit */ -- if (eth_auto_neg_cnf & IMM_BIT) -- /* Yes! I don't care if I see a carrrier */ -- result = A_CNF_MEDIA_AUI; -- break; -- case A_CNF_MEDIA_10B_2: -- result = detect_bnc(nic); -- if (!result) { -- clrline(); -- printf("10Base-2 (BNC%s", -- ") has no cable\n"); } -- /* check "ignore missing media" bit */ -- if (eth_auto_neg_cnf & IMM_BIT) -- /* Yes! I don't care if I can xmit a packet */ -- result = A_CNF_MEDIA_10B_2; -- break; -- case A_CNF_MEDIA_AUTO: -- writereg(PP_LineCTL, eth_linectl | AUTO_AUI_10BASET); -- if (eth_adapter_cnf & A_CNF_10B_T) -- if ((result = detect_tp()) != 0) -- break; -- if (eth_adapter_cnf & A_CNF_AUI) -- if ((result = detect_aui(nic)) != 0) -- break; -- if (eth_adapter_cnf & A_CNF_10B_2) -- if ((result = detect_bnc(nic)) != 0) -- break; -- clrline(); printf("no media detected\n"); -- goto error; -- } -- clrline(); -- switch(result) { -- case 0: printf("no network cable attached to configured media\n"); -- goto error; -- case A_CNF_MEDIA_10B_T: printf("using 10Base-T (RJ-45)\n"); -- break; -- case A_CNF_MEDIA_AUI: printf("using 10Base-5 (AUI)\n"); -- break; -- case A_CNF_MEDIA_10B_2: printf("using 10Base-2 (BNC)\n"); -- break; -- } -- -- /* Turn on both receive and transmit operations */ -- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_RX_ON | -- SERIAL_TX_ON); -- -- break; -- } -- -- if (ioaddr == 0) -- return (0); -- nic->reset = cs89x0_reset; -- nic->poll = cs89x0_poll; -- nic->transmit = cs89x0_transmit; -- nic->disable = cs89x0_disable; -- return (nic); --} -- --/* -- * Local variables: -- * c-basic-offset: 8 -- * End: -- */ -- -Index: b/netboot/cs89x0.h -=================================================================== ---- a/netboot/cs89x0.h -+++ b/netboot/cs89x0.h -@@ -16,464 +16,3 @@ - -- quote from email - **/ - --/* Copyright, 1988-1992, Russell Nelson, Crynwr Software -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, version 1. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -- --#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ -- /* offset 2h -> Model/Product Number */ -- /* offset 3h -> Chip Revision Number */ -- --#define PP_ISAIOB 0x0020 /* IO base address */ --#define PP_CS8900_ISAINT 0x0022 /* ISA interrupt select */ --#define PP_CS8920_ISAINT 0x0370 /* ISA interrupt select */ --#define PP_CS8900_ISADMA 0x0024 /* ISA Rec DMA channel */ --#define PP_CS8920_ISADMA 0x0374 /* ISA Rec DMA channel */ --#define PP_ISASOF 0x0026 /* ISA DMA offset */ --#define PP_DmaFrameCnt 0x0028 /* ISA DMA Frame count */ --#define PP_DmaByteCnt 0x002A /* ISA DMA Byte count */ --#define PP_CS8900_ISAMemB 0x002C /* Memory base */ --#define PP_CS8920_ISAMemB 0x0348 /* */ -- --#define PP_ISABootBase 0x0030 /* Boot Prom base */ --#define PP_ISABootMask 0x0034 /* Boot Prom Mask */ -- --/* EEPROM data and command registers */ --#define PP_EECMD 0x0040 /* NVR Interface Command register */ --#define PP_EEData 0x0042 /* NVR Interface Data Register */ --#define PP_DebugReg 0x0044 /* Debug Register */ -- --#define PP_RxCFG 0x0102 /* Rx Bus config */ --#define PP_RxCTL 0x0104 /* Receive Control Register */ --#define PP_TxCFG 0x0106 /* Transmit Config Register */ --#define PP_TxCMD 0x0108 /* Transmit Command Register */ --#define PP_BufCFG 0x010A /* Bus configuration Register */ --#define PP_LineCTL 0x0112 /* Line Config Register */ --#define PP_SelfCTL 0x0114 /* Self Command Register */ --#define PP_BusCTL 0x0116 /* ISA bus control Register */ --#define PP_TestCTL 0x0118 /* Test Register */ --#define PP_AutoNegCTL 0x011C /* Auto Negotiation Ctrl */ -- --#define PP_ISQ 0x0120 /* Interrupt Status */ --#define PP_RxEvent 0x0124 /* Rx Event Register */ --#define PP_TxEvent 0x0128 /* Tx Event Register */ --#define PP_BufEvent 0x012C /* Bus Event Register */ --#define PP_RxMiss 0x0130 /* Receive Miss Count */ --#define PP_TxCol 0x0132 /* Transmit Collision Count */ --#define PP_LineST 0x0134 /* Line State Register */ --#define PP_SelfST 0x0136 /* Self State register */ --#define PP_BusST 0x0138 /* Bus Status */ --#define PP_TDR 0x013C /* Time Domain Reflectometry */ --#define PP_AutoNegST 0x013E /* Auto Neg Status */ --#define PP_TxCommand 0x0144 /* Tx Command */ --#define PP_TxLength 0x0146 /* Tx Length */ --#define PP_LAF 0x0150 /* Hash Table */ --#define PP_IA 0x0158 /* Physical Address Register */ -- --#define PP_RxStatus 0x0400 /* Receive start of frame */ --#define PP_RxLength 0x0402 /* Receive Length of frame */ --#define PP_RxFrame 0x0404 /* Receive frame pointer */ --#define PP_TxFrame 0x0A00 /* Transmit frame pointer */ -- --/* Primary I/O Base Address. If no I/O base is supplied by the user, then this */ --/* can be used as the default I/O base to access the PacketPage Area. */ --#define DEFAULTIOBASE 0x0300 --#define FIRST_IO 0x020C /* First I/O port to check */ --#define LAST_IO 0x037C /* Last I/O port to check (+10h) */ --#define ADD_MASK 0x3000 /* Mask it use of the ADD_PORT register */ --#define ADD_SIG 0x3000 /* Expected ID signature */ -- --#define CHIP_EISA_ID_SIG 0x630E /* Product ID Code for Crystal Chip (CS8900 spec 4.3) */ -- --#ifdef IBMEIPKT --#define EISA_ID_SIG 0x4D24 /* IBM */ --#define PART_NO_SIG 0x1010 /* IBM */ --#define MONGOOSE_BIT 0x0000 /* IBM */ --#else --#define EISA_ID_SIG 0x630E /* PnP Vendor ID (same as chip id for Crystal board) */ --#define PART_NO_SIG 0x4000 /* ID code CS8920 board (PnP Vendor Product code) */ --#define MONGOOSE_BIT 0x2000 /* PART_NO_SIG + MONGOOSE_BUT => ID of mongoose */ --#endif -- --#define PRODUCT_ID_ADD 0x0002 /* Address of product ID */ -- --/* Mask to find out the types of registers */ --#define REG_TYPE_MASK 0x001F -- --/* Eeprom Commands */ --#define ERSE_WR_ENBL 0x00F0 --#define ERSE_WR_DISABLE 0x0000 -- --/* Defines Control/Config register quintuplet numbers */ --#define RX_BUF_CFG 0x0003 --#define RX_CONTROL 0x0005 --#define TX_CFG 0x0007 --#define TX_COMMAND 0x0009 --#define BUF_CFG 0x000B --#define LINE_CONTROL 0x0013 --#define SELF_CONTROL 0x0015 --#define BUS_CONTROL 0x0017 --#define TEST_CONTROL 0x0019 -- --/* Defines Status/Count registers quintuplet numbers */ --#define RX_EVENT 0x0004 --#define TX_EVENT 0x0008 --#define BUF_EVENT 0x000C --#define RX_MISS_COUNT 0x0010 --#define TX_COL_COUNT 0x0012 --#define LINE_STATUS 0x0014 --#define SELF_STATUS 0x0016 --#define BUS_STATUS 0x0018 --#define TDR 0x001C -- --/* PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write */ --#define SKIP_1 0x0040 --#define RX_STREAM_ENBL 0x0080 --#define RX_OK_ENBL 0x0100 --#define RX_DMA_ONLY 0x0200 --#define AUTO_RX_DMA 0x0400 --#define BUFFER_CRC 0x0800 --#define RX_CRC_ERROR_ENBL 0x1000 --#define RX_RUNT_ENBL 0x2000 --#define RX_EXTRA_DATA_ENBL 0x4000 -- --/* PP_RxCTL - Receive Control bit definition - Read/write */ --#define RX_IA_HASH_ACCEPT 0x0040 --#define RX_PROM_ACCEPT 0x0080 --#define RX_OK_ACCEPT 0x0100 --#define RX_MULTCAST_ACCEPT 0x0200 --#define RX_IA_ACCEPT 0x0400 --#define RX_BROADCAST_ACCEPT 0x0800 --#define RX_BAD_CRC_ACCEPT 0x1000 --#define RX_RUNT_ACCEPT 0x2000 --#define RX_EXTRA_DATA_ACCEPT 0x4000 --#define RX_ALL_ACCEPT (RX_PROM_ACCEPT|RX_BAD_CRC_ACCEPT|RX_RUNT_ACCEPT|RX_EXTRA_DATA_ACCEPT) --/* Default receive mode - individually addressed, broadcast, and error free */ --#define DEF_RX_ACCEPT (RX_IA_ACCEPT | RX_BROADCAST_ACCEPT | RX_OK_ACCEPT) -- --/* PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write */ --#define TX_LOST_CRS_ENBL 0x0040 --#define TX_SQE_ERROR_ENBL 0x0080 --#define TX_OK_ENBL 0x0100 --#define TX_LATE_COL_ENBL 0x0200 --#define TX_JBR_ENBL 0x0400 --#define TX_ANY_COL_ENBL 0x0800 --#define TX_16_COL_ENBL 0x8000 -- --/* PP_TxCMD - Transmit Command bit definition - Read-only */ --#define TX_START_4_BYTES 0x0000 --#define TX_START_64_BYTES 0x0040 --#define TX_START_128_BYTES 0x0080 --#define TX_START_ALL_BYTES 0x00C0 --#define TX_FORCE 0x0100 --#define TX_ONE_COL 0x0200 --#define TX_TWO_PART_DEFF_DISABLE 0x0400 --#define TX_NO_CRC 0x1000 --#define TX_RUNT 0x2000 -- --/* PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write */ --#define GENERATE_SW_INTERRUPT 0x0040 --#define RX_DMA_ENBL 0x0080 --#define READY_FOR_TX_ENBL 0x0100 --#define TX_UNDERRUN_ENBL 0x0200 --#define RX_MISS_ENBL 0x0400 --#define RX_128_BYTE_ENBL 0x0800 --#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000 --#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000 --#define RX_DEST_MATCH_ENBL 0x8000 -- --/* PP_LineCTL - Line Control bit definition - Read/write */ --#define SERIAL_RX_ON 0x0040 --#define SERIAL_TX_ON 0x0080 --#define AUI_ONLY 0x0100 --#define AUTO_AUI_10BASET 0x0200 --#define MODIFIED_BACKOFF 0x0800 --#define NO_AUTO_POLARITY 0x1000 --#define TWO_PART_DEFDIS 0x2000 --#define LOW_RX_SQUELCH 0x4000 -- --/* PP_SelfCTL - Software Self Control bit definition - Read/write */ --#define POWER_ON_RESET 0x0040 --#define SW_STOP 0x0100 --#define SLEEP_ON 0x0200 --#define AUTO_WAKEUP 0x0400 --#define HCB0_ENBL 0x1000 --#define HCB1_ENBL 0x2000 --#define HCB0 0x4000 --#define HCB1 0x8000 -- --/* PP_BusCTL - ISA Bus Control bit definition - Read/write */ --#define RESET_RX_DMA 0x0040 --#define MEMORY_ON 0x0400 --#define DMA_BURST_MODE 0x0800 --#define IO_CHANNEL_READY_ON 0x1000 --#define RX_DMA_SIZE_64K 0x2000 --#define ENABLE_IRQ 0x8000 -- --/* PP_TestCTL - Test Control bit definition - Read/write */ --#define LINK_OFF 0x0080 --#define ENDEC_LOOPBACK 0x0200 --#define AUI_LOOPBACK 0x0400 --#define BACKOFF_OFF 0x0800 --#define FAST_TEST 0x8000 -- --/* PP_RxEvent - Receive Event Bit definition - Read-only */ --#define RX_IA_HASHED 0x0040 --#define RX_DRIBBLE 0x0080 --#define RX_OK 0x0100 --#define RX_HASHED 0x0200 --#define RX_IA 0x0400 --#define RX_BROADCAST 0x0800 --#define RX_CRC_ERROR 0x1000 --#define RX_RUNT 0x2000 --#define RX_EXTRA_DATA 0x4000 -- --#define HASH_INDEX_MASK 0x0FC00 -- --/* PP_TxEvent - Transmit Event Bit definition - Read-only */ --#define TX_LOST_CRS 0x0040 --#define TX_SQE_ERROR 0x0080 --#define TX_OK 0x0100 --#define TX_LATE_COL 0x0200 --#define TX_JBR 0x0400 --#define TX_16_COL 0x8000 --#define TX_SEND_OK_BITS (TX_OK|TX_LOST_CRS) --#define TX_COL_COUNT_MASK 0x7800 -- --/* PP_BufEvent - Buffer Event Bit definition - Read-only */ --#define SW_INTERRUPT 0x0040 --#define RX_DMA 0x0080 --#define READY_FOR_TX 0x0100 --#define TX_UNDERRUN 0x0200 --#define RX_MISS 0x0400 --#define RX_128_BYTE 0x0800 --#define TX_COL_OVRFLW 0x1000 --#define RX_MISS_OVRFLW 0x2000 --#define RX_DEST_MATCH 0x8000 -- --/* PP_LineST - Ethernet Line Status bit definition - Read-only */ --#define LINK_OK 0x0080 --#define AUI_ON 0x0100 --#define TENBASET_ON 0x0200 --#define POLARITY_OK 0x1000 --#define CRS_OK 0x4000 -- --/* PP_SelfST - Chip Software Status bit definition */ --#define ACTIVE_33V 0x0040 --#define INIT_DONE 0x0080 --#define SI_BUSY 0x0100 --#define EEPROM_PRESENT 0x0200 --#define EEPROM_OK 0x0400 --#define EL_PRESENT 0x0800 --#define EE_SIZE_64 0x1000 -- --/* PP_BusST - ISA Bus Status bit definition */ --#define TX_BID_ERROR 0x0080 --#define READY_FOR_TX_NOW 0x0100 -- --/* PP_AutoNegCTL - Auto Negotiation Control bit definition */ --#define RE_NEG_NOW 0x0040 --#define ALLOW_FDX 0x0080 --#define AUTO_NEG_ENABLE 0x0100 --#define NLP_ENABLE 0x0200 --#define FORCE_FDX 0x8000 --#define AUTO_NEG_BITS (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE) --#define AUTO_NEG_MASK (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE|ALLOW_FDX|RE_NEG_NOW) -- --/* PP_AutoNegST - Auto Negotiation Status bit definition */ --#define AUTO_NEG_BUSY 0x0080 --#define FLP_LINK 0x0100 --#define FLP_LINK_GOOD 0x0800 --#define LINK_FAULT 0x1000 --#define HDX_ACTIVE 0x4000 --#define FDX_ACTIVE 0x8000 -- --/* The following block defines the ISQ event types */ --#define ISQ_RECEIVER_EVENT 0x04 --#define ISQ_TRANSMITTER_EVENT 0x08 --#define ISQ_BUFFER_EVENT 0x0c --#define ISQ_RX_MISS_EVENT 0x10 --#define ISQ_TX_COL_EVENT 0x12 -- --#define ISQ_EVENT_MASK 0x003F /* ISQ mask to find out type of event */ --#define ISQ_HIST 16 /* small history buffer */ --#define AUTOINCREMENT 0x8000 /* Bit mask to set bit-15 for autoincrement */ -- --#define TXRXBUFSIZE 0x0600 --#define RXDMABUFSIZE 0x8000 --#define RXDMASIZE 0x4000 --#define TXRX_LENGTH_MASK 0x07FF -- --/* rx options bits */ --#define RCV_WITH_RXON 1 /* Set SerRx ON */ --#define RCV_COUNTS 2 /* Use Framecnt1 */ --#define RCV_PONG 4 /* Pong respondent */ --#define RCV_DONG 8 /* Dong operation */ --#define RCV_POLLING 0x10 /* Poll RxEvent */ --#define RCV_ISQ 0x20 /* Use ISQ, int */ --#define RCV_AUTO_DMA 0x100 /* Set AutoRxDMAE */ --#define RCV_DMA 0x200 /* Set RxDMA only */ --#define RCV_DMA_ALL 0x400 /* Copy all DMA'ed */ --#define RCV_FIXED_DATA 0x800 /* Every frame same */ --#define RCV_IO 0x1000 /* Use ISA IO only */ --#define RCV_MEMORY 0x2000 /* Use ISA Memory */ -- --#define RAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ --#define PKT_START PP_TxFrame /* Start of packet RAM */ -- --#define RX_FRAME_PORT 0x0000 --#define TX_FRAME_PORT RX_FRAME_PORT --#define TX_CMD_PORT 0x0004 --#define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ --#define TX_AFTER_381 0x0020 /* Tx packet after 381 bytes copied */ --#define TX_AFTER_ALL 0x0060 /* Tx packet after all bytes copied */ --#define TX_LEN_PORT 0x0006 --#define ISQ_PORT 0x0008 --#define ADD_PORT 0x000A --#define DATA_PORT 0x000C -- --#define EEPROM_WRITE_EN 0x00F0 --#define EEPROM_WRITE_DIS 0x0000 --#define EEPROM_WRITE_CMD 0x0100 --#define EEPROM_READ_CMD 0x0200 -- --/* Receive Header */ --/* Description of header of each packet in receive area of memory */ --#define RBUF_EVENT_LOW 0 /* Low byte of RxEvent - status of received frame */ --#define RBUF_EVENT_HIGH 1 /* High byte of RxEvent - status of received frame */ --#define RBUF_LEN_LOW 2 /* Length of received data - low byte */ --#define RBUF_LEN_HI 3 /* Length of received data - high byte */ --#define RBUF_HEAD_LEN 4 /* Length of this header */ -- --#define CHIP_READ 0x1 /* Used to mark state of the repins code (chip or dma) */ --#define DMA_READ 0x2 /* Used to mark state of the repins code (chip or dma) */ -- --/* for bios scan */ --/* */ --#ifdef CSDEBUG --/* use these values for debugging bios scan */ --#define BIOS_START_SEG 0x00000 --#define BIOS_OFFSET_INC 0x0010 --#else --#define BIOS_START_SEG 0x0c000 --#define BIOS_OFFSET_INC 0x0200 --#endif -- --#define BIOS_LAST_OFFSET 0x0fc00 -- --/* Byte offsets into the EEPROM configuration buffer */ --#define ISA_CNF_OFFSET 0x6 --#define TX_CTL_OFFSET (ISA_CNF_OFFSET + 8) /* 8900 eeprom */ --#define AUTO_NEG_CNF_OFFSET (ISA_CNF_OFFSET + 8) /* 8920 eeprom */ -- -- /* the assumption here is that the bits in the eeprom are generally */ -- /* in the same position as those in the autonegctl register. */ -- /* Of course the IMM bit is not in that register so it must be */ -- /* masked out */ --#define EE_FORCE_FDX 0x8000 --#define EE_NLP_ENABLE 0x0200 --#define EE_AUTO_NEG_ENABLE 0x0100 --#define EE_ALLOW_FDX 0x0080 --#define EE_AUTO_NEG_CNF_MASK (EE_FORCE_FDX|EE_NLP_ENABLE|EE_AUTO_NEG_ENABLE|EE_ALLOW_FDX) -- --#define IMM_BIT 0x0040 /* ignore missing media */ -- --#define ADAPTER_CNF_OFFSET (AUTO_NEG_CNF_OFFSET + 2) --#define A_CNF_10B_T 0x0001 --#define A_CNF_AUI 0x0002 --#define A_CNF_10B_2 0x0004 --#define A_CNF_MEDIA_TYPE 0x0060 --#define A_CNF_MEDIA_AUTO 0x0000 --#define A_CNF_MEDIA_10B_T 0x0020 --#define A_CNF_MEDIA_AUI 0x0040 --#define A_CNF_MEDIA_10B_2 0x0060 --#define A_CNF_DC_DC_POLARITY 0x0080 --#define A_CNF_NO_AUTO_POLARITY 0x2000 --#define A_CNF_LOW_RX_SQUELCH 0x4000 --#define A_CNF_EXTND_10B_2 0x8000 -- --#define PACKET_PAGE_OFFSET 0x8 -- --/* Bit definitions for the ISA configuration word from the EEPROM */ --#define INT_NO_MASK 0x000F --#define DMA_NO_MASK 0x0070 --#define ISA_DMA_SIZE 0x0200 --#define ISA_AUTO_RxDMA 0x0400 --#define ISA_RxDMA 0x0800 --#define DMA_BURST 0x1000 --#define STREAM_TRANSFER 0x2000 --#define ANY_ISA_DMA (ISA_AUTO_RxDMA | ISA_RxDMA) -- --/* DMA controller registers */ --#define DMA_BASE 0x00 /* DMA controller base */ --#define DMA_BASE_2 0x0C0 /* DMA controller base */ -- --#define DMA_STAT 0x0D0 /* DMA controller status register */ --#define DMA_MASK 0x0D4 /* DMA controller mask register */ --#define DMA_MODE 0x0D6 /* DMA controller mode register */ --#define DMA_RESETFF 0x0D8 /* DMA controller first/last flip flop */ -- --/* DMA data */ --#define DMA_DISABLE 0x04 /* Disable channel n */ --#define DMA_ENABLE 0x00 /* Enable channel n */ --/* Demand transfers, incr. address, auto init, writes, ch. n */ --#define DMA_RX_MODE 0x14 --/* Demand transfers, incr. address, auto init, reads, ch. n */ --#define DMA_TX_MODE 0x18 -- --#define DMA_SIZE (16*1024) /* Size of dma buffer - 16k */ -- --#define CS8900 0x0000 --#define CS8920 0x4000 --#define CS8920M 0x6000 --#define REVISON_BITS 0x1F00 --#define EEVER_NUMBER 0x12 --#define CHKSUM_LEN 0x14 --#define CHKSUM_VAL 0x0000 --#define START_EEPROM_DATA 0x001c /* Offset into eeprom for start of data */ --#define IRQ_MAP_EEPROM_DATA 0x0046 /* Offset into eeprom for the IRQ map */ --#define IRQ_MAP_LEN 0x0004 /* No of bytes to read for the IRQ map */ --#define PNP_IRQ_FRMT 0x0022 /* PNP small item IRQ format */ --#define CS8900_IRQ_MAP 0x1c20 /* This IRQ map is fixed */ -- --#define CS8920_NO_INTS 0x0F /* Max CS8920 interrupt select # */ -- --#define PNP_ADD_PORT 0x0279 --#define PNP_WRITE_PORT 0x0A79 -- --#define GET_PNP_ISA_STRUCT 0x40 --#define PNP_ISA_STRUCT_LEN 0x06 --#define PNP_CSN_CNT_OFF 0x01 --#define PNP_RD_PORT_OFF 0x02 --#define PNP_FUNCTION_OK 0x00 --#define PNP_WAKE 0x03 --#define PNP_RSRC_DATA 0x04 --#define PNP_RSRC_READY 0x01 --#define PNP_STATUS 0x05 --#define PNP_ACTIVATE 0x30 --#define PNP_CNF_IO_H 0x60 --#define PNP_CNF_IO_L 0x61 --#define PNP_CNF_INT 0x70 --#define PNP_CNF_DMA 0x74 --#define PNP_CNF_MEM 0x48 -- --#define BIT0 1 --#define BIT15 0x8000 -- --/* -- * Local variables: -- * c-basic-offset: 8 -- * End: -- */ -- -Index: b/netboot/cs89x0.txt -=================================================================== ---- a/netboot/cs89x0.txt -+++ /dev/null -@@ -1,26 +0,0 @@ --Permission is granted to distribute the enclosed cs89x0.[ch] driver --only in conjunction with the Etherboot package. The code is --ordinarily distributed under the GPL. -- --Russ Nelson, January 2000 -- --CREDITS -- --I want to thank -- -- Mike Cruse -- for providing an evaluation NIC and for sponsoring the -- development of this driver. -- -- Randall Sears -- Deva Bodas -- Andreas Kraemer -- Wolfgang Krause <100303.2673@compuserve.com> -- for excellent technical support and for providing the required -- programming information. I appreciate Crystal Semiconductor's -- commitment towards free software. -- -- Russell Nelson -- for writing the Linux device driver for the CS89x0 -- chipset. Russel's code is very well designed and simplified my -- job a lot. -Index: b/netboot/davicom.c -=================================================================== ---- a/netboot/davicom.c -+++ b/netboot/davicom.c -@@ -1,12 +1,12 @@ -+#ifdef ALLMULTI -+#error multicast support is not yet implemented -+#endif - /* - DAVICOM DM9009/DM9102/DM9102A Etherboot Driver V1.00 - -- This driver was ported from Marty Conner's Tulip Etherboot driver. -- Thanks Marty Connor (mdc@thinguin.org) -- You can get Tulip driver source file from this URL: -+ This driver was ported from Marty Connor's Tulip Etherboot driver. -+ Thanks Marty Connor (mdc@etherboot.org) - -- "http://etherboot.sourceforge..net/#Distribution" -- - This davicom etherboot driver supports DM9009/DM9102/DM9102A/ - DM9102A+DM9801/DM9102A+DM9802 NICs. - -@@ -36,7 +36,6 @@ - register(CR6) - */ - -- - /*********************************************************************/ - /* Declarations */ - /*********************************************************************/ -@@ -44,7 +43,6 @@ - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - - #undef DAVICOM_DEBUG - #undef DAVICOM_DEBUG_WHERE -@@ -99,8 +97,10 @@ - #define eeprom_delay() inl(ee_addr) - - /* helpful macro if on a big_endian machine for changing byte order. -- not strictly needed on Intel */ -+ not strictly needed on Intel -+ Already defined in Etherboot includes - #define le16_to_cpu(val) (val) -+*/ - - /* transmit and receive descriptor format */ - struct txdesc { -@@ -138,20 +138,12 @@ - /* transmit descriptor and buffer */ - #define NTXD 2 - static struct txdesc txd[NTXD] __attribute__ ((aligned(4))); --#ifdef USE_LOWMEM_BUFFER --#define txb ((char *)0x10000 - BUFLEN) --#else - static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); --#endif - - /* receive descriptor(s) and buffer(s) */ - #define NRXD 4 - static struct rxdesc rxd[NRXD] __attribute__ ((aligned(4))); --#ifdef USE_LOWMEM_BUFFER --#define rxb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) --#else - static unsigned char rxb[NRXD * BUFLEN] __attribute__ ((aligned(4))); --#endif - static int rxd_tail; - static int TxPtr; - -@@ -161,15 +153,13 @@ - /*********************************************************************/ - static void whereami(const char *str); - static int read_eeprom(unsigned long ioaddr, int location, int addr_len); --struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, -- struct pci_device *pci); -+static int davicom_probe(struct dev *dev, struct pci_device *pci); - static void davicom_init_chain(struct nic *nic); /* Sten 10/9 */ - static void davicom_reset(struct nic *nic); - static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, - unsigned int s, const char *p); --static int davicom_poll(struct nic *nic); --static void davicom_disable(struct nic *nic); --static void whereami (const char *str); -+static int davicom_poll(struct nic *nic, int retrieve); -+static void davicom_disable(struct dev *dev); - #ifdef DAVICOM_DEBUG - static void davicom_more(void); - #endif /* DAVICOM_DEBUG */ -@@ -184,13 +174,10 @@ - /*********************************************************************/ - /* Utility Routines */ - /*********************************************************************/ -- --static inline void whereami (const char *str) -+static inline void whereami(const char *str) - { --#ifdef DAVICOM_DEBUG_WHERE - printf("%s\n", str); - /* sleep(2); */ --#endif - } - - #ifdef DAVICOM_DEBUG -@@ -360,7 +347,7 @@ - /* - Sense media mode and set CR6 - */ --static void davicom_media_chk(struct nic * nic) -+static void davicom_media_chk(struct nic * nic __unused) - { - unsigned long to, csr6; - -@@ -446,8 +433,8 @@ - /* Sten: Set 2 TX descriptor but use one TX buffer because - it transmit a packet and wait complete every time. */ - for (i=0; ipacketlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; -@@ -627,10 +615,13 @@ - /*********************************************************************/ - /* eth_disable - Disable the interface */ - /*********************************************************************/ --static void davicom_disable(struct nic *nic) -+static void davicom_disable(struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; - whereami("davicom_disable\n"); - -+ davicom_reset(nic); -+ - /* disable interrupts */ - outl(0x00000000, ioaddr + CSR7); - -@@ -640,24 +631,43 @@ - /* Clear the missed-packet counter. */ - (volatile unsigned long)inl(ioaddr + CSR8); - } -+ -+ -+/*********************************************************************/ -+/* eth_irq - enable, disable and force interrupts */ -+/*********************************************************************/ -+static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ - - /*********************************************************************/ - /* eth_probe - Look for an adapter */ - /*********************************************************************/ --struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, -- struct pci_device *pci) -+static int davicom_probe(struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; - unsigned int i; -- u32 l1, l2; - - whereami("davicom_probe\n"); - -- if (io_addrs == 0 || *io_addrs == 0) -+ if (pci->ioaddr == 0) - return 0; - - vendor = pci->vendor; - dev_id = pci->dev_id; -- ioaddr = *io_addrs; -+ ioaddr = pci->ioaddr & ~3; -+ -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; - - /* wakeup chip */ - pcibios_write_config_dword(pci->bus, pci->devfn, 0x40, 0x00000000); -@@ -683,10 +693,26 @@ - /* initialize device */ - davicom_reset(nic); - -- nic->reset = davicom_reset; -+ dev->disable = davicom_disable; - nic->poll = davicom_poll; - nic->transmit = davicom_transmit; -- nic->disable = davicom_disable; -+ nic->irq = davicom_irq; - -- return nic; -+ return 1; - } -+ -+static struct pci_id davicom_nics[] = { -+PCI_ROM(0x1282, 0x9100, "davicom9100", "Davicom 9100"), -+PCI_ROM(0x1282, 0x9102, "davicom9102", "Davicom 9102"), -+PCI_ROM(0x1282, 0x9009, "davicom9009", "Davicom 9009"), -+PCI_ROM(0x1282, 0x9132, "davicom9132", "Davicom 9132"), /* Needs probably some fixing */ -+}; -+ -+struct pci_driver davicom_driver = { -+ .type = NIC_DRIVER, -+ .name = "DAVICOM", -+ .probe = davicom_probe, -+ .ids = davicom_nics, -+ .id_count = sizeof(davicom_nics)/sizeof(davicom_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/depca.c -=================================================================== ---- a/netboot/depca.c -+++ /dev/null -@@ -1,752 +0,0 @@ --/* Etherboot: depca.h merged, comments from Linux driver retained */ --/* depca.c: A DIGITAL DEPCA & EtherWORKS ethernet driver for linux. -- -- Written 1994, 1995 by David C. Davies. -- -- -- Copyright 1994 David C. Davies -- and -- United States Government -- (as represented by the Director, National Security Agency). -- -- Copyright 1995 Digital Equipment Corporation. -- -- -- This software may be used and distributed according to the terms of -- the GNU Public License, incorporated herein by reference. -- -- This driver is written for the Digital Equipment Corporation series -- of DEPCA and EtherWORKS ethernet cards: -- -- DEPCA (the original) -- DE100 -- DE101 -- DE200 Turbo -- DE201 Turbo -- DE202 Turbo (TP BNC) -- DE210 -- DE422 (EISA) -- -- The driver has been tested on DE100, DE200 and DE202 cards in a -- relatively busy network. The DE422 has been tested a little. -- -- This driver will NOT work for the DE203, DE204 and DE205 series of -- cards, since they have a new custom ASIC in place of the AMD LANCE -- chip. See the 'ewrk3.c' driver in the Linux source tree for running -- those cards. -- -- I have benchmarked the driver with a DE100 at 595kB/s to (542kB/s from) -- a DECstation 5000/200. -- -- The author may be reached at davies@maniac.ultranet.com -- -- ========================================================================= -- -- The driver was originally based on the 'lance.c' driver from Donald -- Becker which is included with the standard driver distribution for -- linux. V0.4 is a complete re-write with only the kernel interface -- remaining from the original code. -- -- 1) Lance.c code in /linux/drivers/net/ -- 2) "Ethernet/IEEE 802.3 Family. 1992 World Network Data Book/Handbook", -- AMD, 1992 [(800) 222-9323]. -- 3) "Am79C90 CMOS Local Area Network Controller for Ethernet (C-LANCE)", -- AMD, Pub. #17881, May 1993. -- 4) "Am79C960 PCnet-ISA(tm), Single-Chip Ethernet Controller for ISA", -- AMD, Pub. #16907, May 1992 -- 5) "DEC EtherWORKS LC Ethernet Controller Owners Manual", -- Digital Equipment corporation, 1990, Pub. #EK-DE100-OM.003 -- 6) "DEC EtherWORKS Turbo Ethernet Controller Owners Manual", -- Digital Equipment corporation, 1990, Pub. #EK-DE200-OM.003 -- 7) "DEPCA Hardware Reference Manual", Pub. #EK-DEPCA-PR -- Digital Equipment Corporation, 1989 -- 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual", -- Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001 -- -- -- Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this -- driver. -- -- The original DEPCA card requires that the ethernet ROM address counter -- be enabled to count and has an 8 bit NICSR. The ROM counter enabling is -- only done when a 0x08 is read as the first address octet (to minimise -- the chances of writing over some other hardware's I/O register). The -- NICSR accesses have been changed to byte accesses for all the cards -- supported by this driver, since there is only one useful bit in the MSB -- (remote boot timeout) and it is not used. Also, there is a maximum of -- only 48kB network RAM for this card. My thanks to Torbjorn Lindh for -- help debugging all this (and holding my feet to the fire until I got it -- right). -- -- The DE200 series boards have on-board 64kB RAM for use as a shared -- memory network buffer. Only the DE100 cards make use of a 2kB buffer -- mode which has not been implemented in this driver (only the 32kB and -- 64kB modes are supported [16kB/48kB for the original DEPCA]). -- -- At the most only 2 DEPCA cards can be supported on the ISA bus because -- there is only provision for two I/O base addresses on each card (0x300 -- and 0x200). The I/O address is detected by searching for a byte sequence -- in the Ethernet station address PROM at the expected I/O address for the -- Ethernet PROM. The shared memory base address is 'autoprobed' by -- looking for the self test PROM and detecting the card name. When a -- second DEPCA is detected, information is placed in the base_addr -- variable of the next device structure (which is created if necessary), -- thus enabling ethif_probe initialization for the device. More than 2 -- EISA cards can be supported, but care will be needed assigning the -- shared memory to ensure that each slot has the correct IRQ, I/O address -- and shared memory address assigned. -- -- ************************************************************************ -- -- NOTE: If you are using two ISA DEPCAs, it is important that you assign -- the base memory addresses correctly. The driver autoprobes I/O 0x300 -- then 0x200. The base memory address for the first device must be less -- than that of the second so that the auto probe will correctly assign the -- I/O and memory addresses on the same card. I can't think of a way to do -- this unambiguously at the moment, since there is nothing on the cards to -- tie I/O and memory information together. -- -- I am unable to test 2 cards together for now, so this code is -- unchecked. All reports, good or bad, are welcome. -- -- ************************************************************************ -- -- The board IRQ setting must be at an unused IRQ which is auto-probed -- using Donald Becker's autoprobe routines. DEPCA and DE100 board IRQs are -- {2,3,4,5,7}, whereas the DE200 is at {5,9,10,11,15}. Note that IRQ2 is -- really IRQ9 in machines with 16 IRQ lines. -- -- No 16MB memory limitation should exist with this driver as DMA is not -- used and the common memory area is in low memory on the network card (my -- current system has 20MB and I've not had problems yet). -- -- The ability to load this driver as a loadable module has been added. To -- utilise this ability, you have to do <8 things: -- -- 0) have a copy of the loadable modules code installed on your system. -- 1) copy depca.c from the /linux/drivers/net directory to your favourite -- temporary directory. -- 2) if you wish, edit the source code near line 1530 to reflect the I/O -- address and IRQ you're using (see also 5). -- 3) compile depca.c, but include -DMODULE in the command line to ensure -- that the correct bits are compiled (see end of source code). -- 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a -- kernel with the depca configuration turned off and reboot. -- 5) insmod depca.o [irq=7] [io=0x200] [mem=0xd0000] [adapter_name=DE100] -- [Alan Cox: Changed the code to allow command line irq/io assignments] -- [Dave Davies: Changed the code to allow command line mem/name -- assignments] -- 6) run the net startup bits for your eth?? interface manually -- (usually /etc/rc.inet[12] at boot time). -- 7) enjoy! -- -- Note that autoprobing is not allowed in loadable modules - the system is -- already up and running and you're messing with interrupts. -- -- To unload a module, turn off the associated interface -- 'ifconfig eth?? down' then 'rmmod depca'. -- -- To assign a base memory address for the shared memory when running as a -- loadable module, see 5 above. To include the adapter name (if you have -- no PROM but know the card name) also see 5 above. Note that this last -- option will not work with kernel built-in depca's. -- -- The shared memory assignment for a loadable module makes sense to avoid -- the 'memory autoprobe' picking the wrong shared memory (for the case of -- 2 depca's in a PC). -- -- ************************************************************************ -- Support for MCA EtherWORKS cards added 11-3-98. -- Verified to work with up to 2 DE212 cards in a system (although not -- fully stress-tested). -- -- Currently known bugs/limitations: -- -- Note: with the MCA stuff as a module, it trusts the MCA configuration, -- not the command line for IRQ and memory address. You can -- specify them if you want, but it will throw your values out. -- You still have to pass the IO address it was configured as -- though. -- -- ************************************************************************ -- TO DO: -- ------ -- -- -- Revision History -- ---------------- -- -- Version Date Description -- -- 0.1 25-jan-94 Initial writing. -- 0.2 27-jan-94 Added LANCE TX hardware buffer chaining. -- 0.3 1-feb-94 Added multiple DEPCA support. -- 0.31 4-feb-94 Added DE202 recognition. -- 0.32 19-feb-94 Tidy up. Improve multi-DEPCA support. -- 0.33 25-feb-94 Fix DEPCA ethernet ROM counter enable. -- Add jabber packet fix from murf@perftech.com -- and becker@super.org -- 0.34 7-mar-94 Fix DEPCA max network memory RAM & NICSR access. -- 0.35 8-mar-94 Added DE201 recognition. Tidied up. -- 0.351 30-apr-94 Added EISA support. Added DE422 recognition. -- 0.36 16-may-94 DE422 fix released. -- 0.37 22-jul-94 Added MODULE support -- 0.38 15-aug-94 Added DBR ROM switch in depca_close(). -- Multi DEPCA bug fix. -- 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0. -- 0.381 12-dec-94 Added DE101 recognition, fix multicast bug. -- 0.382 9-feb-95 Fix recognition bug reported by . -- 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by -- -- 0.384 17-mar-95 Fix a ring full bug reported by -- 0.385 3-apr-95 Fix a recognition bug reported by -- -- 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility -- 0.40 25-May-95 Rewrite for portability & updated. -- ALPHA support from -- 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from -- suggestion by -- 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable -- modules. -- Add 'adapter_name' for loadable modules when no PROM. -- Both above from a suggestion by -- . -- Add new multicasting code. -- 0.421 22-Apr-96 Fix alloc_device() bug -- 0.422 29-Apr-96 Fix depca_hw_init() bug -- 0.423 7-Jun-96 Fix module load bug -- 0.43 16-Aug-96 Update alloc_device() to conform to de4x5.c -- 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug -- reported by -- 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards -- by -- 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. -- 0.5 14-Nov-98 Re-spin for 2.1.x kernels. -- 0.51 27-Jun-99 Correct received packet length for CRC from -- report by -- -- ========================================================================= --*/ -- --#include "etherboot.h" --#include "nic.h" --#include "cards.h" -- --/* --** I/O addresses. Note that the 2k buffer option is not supported in --** this driver. --*/ --#define DEPCA_NICSR ioaddr+0x00 /* Network interface CSR */ --#define DEPCA_RBI ioaddr+0x02 /* RAM buffer index (2k buffer mode) */ --#define DEPCA_DATA ioaddr+0x04 /* LANCE registers' data port */ --#define DEPCA_ADDR ioaddr+0x06 /* LANCE registers' address port */ --#define DEPCA_HBASE ioaddr+0x08 /* EISA high memory base address reg. */ --#define DEPCA_PROM ioaddr+0x0c /* Ethernet address ROM data port */ --#define DEPCA_CNFG ioaddr+0x0c /* EISA Configuration port */ --#define DEPCA_RBSA ioaddr+0x0e /* RAM buffer starting address (2k buff.) */ -- --/* --** These are LANCE registers addressable through DEPCA_ADDR --*/ --#define CSR0 0 --#define CSR1 1 --#define CSR2 2 --#define CSR3 3 -- --/* --** NETWORK INTERFACE CSR (NI_CSR) bit definitions --*/ -- --#define TO 0x0100 /* Time Out for remote boot */ --#define SHE 0x0080 /* SHadow memory Enable */ --#define BS 0x0040 /* Bank Select */ --#define BUF 0x0020 /* BUFfer size (1->32k, 0->64k) */ --#define RBE 0x0010 /* Remote Boot Enable (1->net boot) */ --#define AAC 0x0008 /* Address ROM Address Counter (1->enable) */ --#define _128KB 0x0008 /* 128kB Network RAM (1->enable) */ --#define IM 0x0004 /* Interrupt Mask (1->mask) */ --#define IEN 0x0002 /* Interrupt tristate ENable (1->enable) */ --#define LED 0x0001 /* LED control */ -- --/* --** Control and Status Register 0 (CSR0) bit definitions --*/ -- --#define ERR 0x8000 /* Error summary */ --#define BABL 0x4000 /* Babble transmitter timeout error */ --#define CERR 0x2000 /* Collision Error */ --#define MISS 0x1000 /* Missed packet */ --#define MERR 0x0800 /* Memory Error */ --#define RINT 0x0400 /* Receiver Interrupt */ --#define TINT 0x0200 /* Transmit Interrupt */ --#define IDON 0x0100 /* Initialization Done */ --#define INTR 0x0080 /* Interrupt Flag */ --#define INEA 0x0040 /* Interrupt Enable */ --#define RXON 0x0020 /* Receiver on */ --#define TXON 0x0010 /* Transmitter on */ --#define TDMD 0x0008 /* Transmit Demand */ --#define STOP 0x0004 /* Stop */ --#define STRT 0x0002 /* Start */ --#define INIT 0x0001 /* Initialize */ --#define INTM 0xff00 /* Interrupt Mask */ --#define INTE 0xfff0 /* Interrupt Enable */ -- --/* --** CONTROL AND STATUS REGISTER 3 (CSR3) --*/ -- --#define BSWP 0x0004 /* Byte SWaP */ --#define ACON 0x0002 /* ALE control */ --#define BCON 0x0001 /* Byte CONtrol */ -- --/* --** Initialization Block Mode Register --*/ -- --#define PROM 0x8000 /* Promiscuous Mode */ --#define EMBA 0x0080 /* Enable Modified Back-off Algorithm */ --#define INTL 0x0040 /* Internal Loopback */ --#define DRTY 0x0020 /* Disable Retry */ --#define COLL 0x0010 /* Force Collision */ --#define DTCR 0x0008 /* Disable Transmit CRC */ --#define LOOP 0x0004 /* Loopback */ --#define DTX 0x0002 /* Disable the Transmitter */ --#define DRX 0x0001 /* Disable the Receiver */ -- --/* --** Receive Message Descriptor 1 (RMD1) bit definitions. --*/ -- --#define R_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ --#define R_ERR 0x4000 /* Error Summary */ --#define R_FRAM 0x2000 /* Framing Error */ --#define R_OFLO 0x1000 /* Overflow Error */ --#define R_CRC 0x0800 /* CRC Error */ --#define R_BUFF 0x0400 /* Buffer Error */ --#define R_STP 0x0200 /* Start of Packet */ --#define R_ENP 0x0100 /* End of Packet */ -- --/* --** Transmit Message Descriptor 1 (TMD1) bit definitions. --*/ -- --#define T_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ --#define T_ERR 0x4000 /* Error Summary */ --#define T_ADD_FCS 0x2000 /* More the 1 retry needed to Xmit */ --#define T_MORE 0x1000 /* >1 retry to transmit packet */ --#define T_ONE 0x0800 /* 1 try needed to transmit the packet */ --#define T_DEF 0x0400 /* Deferred */ --#define T_STP 0x02000000 /* Start of Packet */ --#define T_ENP 0x01000000 /* End of Packet */ --#define T_FLAGS 0xff000000 /* TX Flags Field */ -- --/* --** Transmit Message Descriptor 3 (TMD3) bit definitions. --*/ -- --#define TMD3_BUFF 0x8000 /* BUFFer error */ --#define TMD3_UFLO 0x4000 /* UnderFLOw error */ --#define TMD3_RES 0x2000 /* REServed */ --#define TMD3_LCOL 0x1000 /* Late COLlision */ --#define TMD3_LCAR 0x0800 /* Loss of CARrier */ --#define TMD3_RTRY 0x0400 /* ReTRY error */ -- --/* --** Ethernet PROM defines --*/ --#define PROBE_LENGTH 32 -- --/* --** Set the number of Tx and Rx buffers. Ensure that the memory requested --** here is <= to the amount of shared memory set up by the board switches. --** The number of descriptors MUST BE A POWER OF 2. --** --** total_memory = NUM_RX_DESC*(8+RX_BUFF_SZ) + NUM_TX_DESC*(8+TX_BUFF_SZ) --*/ --#define NUM_RX_DESC 2 /* Number of RX descriptors */ --#define NUM_TX_DESC 2 /* Number of TX descriptors */ --#define RX_BUFF_SZ 1536 /* Buffer size for each Rx buffer */ --#define TX_BUFF_SZ 1536 /* Buffer size for each Tx buffer */ -- --/* --** ISA Bus defines --*/ --#define DEPCA_IO_PORTS {0x300, 0x200, 0} -- --#ifndef DEPCA_MODEL --#define DEPCA_MODEL DEPCA --#endif -- --static enum { -- DEPCA, DE100, DE101, DE200, DE201, DE202, DE210, DE212, DE422, unknown --} adapter = DEPCA_MODEL; -- --/* --** Name <-> Adapter mapping --*/ -- --static char *adapter_name[] = { -- "DEPCA", -- "DE100","DE101", -- "DE200","DE201","DE202", -- "DE210","DE212", -- "DE422", -- "" --}; -- --#ifndef DEPCA_RAM_BASE --#define DEPCA_RAM_BASE 0xd0000 --#endif -- --/* --** Memory Alignment. Each descriptor is 4 longwords long. To force a --** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and --** DESC_ALIGN. ALIGN aligns the start address of the private memory area --** and hence the RX descriptor ring's first entry. --*/ --#define ALIGN4 ((u32)4 - 1) /* 1 longword align */ --#define ALIGN8 ((u32)8 - 1) /* 2 longword (quadword) align */ --#define ALIGN ALIGN8 /* Keep the LANCE happy... */ -- --typedef long s32; --typedef unsigned long u32; --typedef short s16; --typedef unsigned short u16; --typedef char s8; --typedef unsigned char u8; -- --/* --** The DEPCA Rx and Tx ring descriptors. --*/ --struct depca_rx_desc { -- volatile s32 base; -- s16 buf_length; /* This length is negative 2's complement! */ -- s16 msg_length; /* This length is "normal". */ --}; -- --struct depca_tx_desc { -- volatile s32 base; -- s16 length; /* This length is negative 2's complement! */ -- s16 misc; /* Errors and TDR info */ --}; -- --#define LA_MASK 0x0000ffff /* LANCE address mask for mapping network RAM -- to LANCE memory address space */ -- --/* --** The Lance initialization block, described in databook, in common memory. --*/ --struct depca_init { -- u16 mode; /* Mode register */ -- u8 phys_addr[ETH_ALEN]; /* Physical ethernet address */ -- u8 mcast_table[8]; /* Multicast Hash Table. */ -- u32 rx_ring; /* Rx ring base pointer & ring length */ -- u32 tx_ring; /* Tx ring base pointer & ring length */ --}; -- --struct depca_private { -- struct depca_rx_desc *rx_ring; -- struct depca_tx_desc *tx_ring; -- struct depca_init init_block; /* Shadow init block */ -- char *rx_memcpy[NUM_RX_DESC]; -- char *tx_memcpy[NUM_TX_DESC]; -- u32 bus_offset; /* ISA bus address offset */ -- u32 sh_mem; /* address of shared mem */ -- u32 dma_buffs; /* Rx & Tx buffer start */ -- int rx_cur, tx_cur; /* Next free ring entry */ -- int txRingMask, rxRingMask; -- s32 rx_rlen, tx_rlen; -- /* log2([rt]xRingMask+1) for the descriptors */ --}; -- --static Address mem_start = DEPCA_RAM_BASE; --static Address mem_len, offset; --static unsigned short ioaddr = 0; --static struct depca_private lp; -- --/* --** Miscellaneous defines... --*/ --#define STOP_DEPCA \ -- outw(CSR0, DEPCA_ADDR);\ -- outw(STOP, DEPCA_DATA) -- --/* Initialize the lance Rx and Tx descriptor rings. */ --static void depca_init_ring(struct nic *nic) --{ -- int i; -- u32 p; -- -- lp.rx_cur = lp.tx_cur = 0; -- /* Initialize the base addresses and length of each buffer in the ring */ -- for (i = 0; i <= lp.rxRingMask; i++) { -- writel((p = lp.dma_buffs + i * RX_BUFF_SZ) | R_OWN, &lp.rx_ring[i].base); -- writew(-RX_BUFF_SZ, &lp.rx_ring[i].buf_length); -- lp.rx_memcpy[i] = (char *) (p + lp.bus_offset); -- } -- for (i = 0; i <= lp.txRingMask; i++) { -- writel((p = lp.dma_buffs + (i + lp.txRingMask + 1) * TX_BUFF_SZ) & 0x00ffffff, &lp.tx_ring[i].base); -- lp.tx_memcpy[i] = (char *) (p + lp.bus_offset); -- } -- -- /* Set up the initialization block */ -- lp.init_block.rx_ring = ((u32) ((u32) lp.rx_ring) & LA_MASK) | lp.rx_rlen; -- lp.init_block.tx_ring = ((u32) ((u32) lp.tx_ring) & LA_MASK) | lp.tx_rlen; -- for (i = 0; i < ETH_ALEN; i++) -- lp.init_block.phys_addr[i] = nic->node_addr[i]; -- lp.init_block.mode = 0x0000; /* Enable the Tx and Rx */ -- memset(lp.init_block.mcast_table, 0, sizeof(lp.init_block.mcast_table)); --} -- --static void LoadCSRs(void) --{ -- outw(CSR1, DEPCA_ADDR); /* initialisation block address LSW */ -- outw((u16) (lp.sh_mem & LA_MASK), DEPCA_DATA); -- outw(CSR2, DEPCA_ADDR); /* initialisation block address MSW */ -- outw((u16) ((lp.sh_mem & LA_MASK) >> 16), DEPCA_DATA); -- outw(CSR3, DEPCA_ADDR); /* ALE control */ -- outw(ACON, DEPCA_DATA); -- outw(CSR0, DEPCA_ADDR); /* Point back to CSR0 */ --} -- --static int InitRestartDepca(void) --{ -- int i; -- -- /* Copy the shadow init_block to shared memory */ -- memcpy_toio((char *)lp.sh_mem, &lp.init_block, sizeof(struct depca_init)); -- outw(CSR0, DEPCA_ADDR); /* point back to CSR0 */ -- outw(INIT, DEPCA_DATA); /* initialise DEPCA */ -- -- for (i = 0; i < 100 && !(inw(DEPCA_DATA) & IDON); i++) -- ; -- if (i < 100) { -- /* clear IDON by writing a 1, and start LANCE */ -- outw(IDON | STRT, DEPCA_DATA); -- } else { -- printf("DEPCA not initialised\n"); -- return (1); -- } -- return (0); --} -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void depca_reset(struct nic *nic) --{ -- s16 nicsr; -- int i, j; -- -- STOP_DEPCA; -- nicsr = inb(DEPCA_NICSR); -- nicsr = ((nicsr & ~SHE & ~RBE & ~IEN) | IM); -- outb(nicsr, DEPCA_NICSR); -- if (inw(DEPCA_DATA) != STOP) -- { -- printf("depca: Cannot stop NIC\n"); -- return; -- } -- -- /* Initialisation block */ -- lp.sh_mem = mem_start; -- mem_start += sizeof(struct depca_init); -- /* Tx & Rx descriptors (aligned to a quadword boundary) */ -- mem_start = (mem_start + ALIGN) & ~ALIGN; -- lp.rx_ring = (struct depca_rx_desc *) mem_start; -- mem_start += (sizeof(struct depca_rx_desc) * NUM_RX_DESC); -- lp.tx_ring = (struct depca_tx_desc *) mem_start; -- mem_start += (sizeof(struct depca_tx_desc) * NUM_TX_DESC); -- -- lp.bus_offset = mem_start & 0x00ff0000; -- /* LANCE re-mapped start address */ -- lp.dma_buffs = mem_start & LA_MASK; -- -- /* Finish initialising the ring information. */ -- lp.rxRingMask = NUM_RX_DESC - 1; -- lp.txRingMask = NUM_TX_DESC - 1; -- -- /* Calculate Tx/Rx RLEN size for the descriptors. */ -- for (i = 0, j = lp.rxRingMask; j > 0; i++) { -- j >>= 1; -- } -- lp.rx_rlen = (s32) (i << 29); -- for (i = 0, j = lp.txRingMask; j > 0; i++) { -- j >>= 1; -- } -- lp.tx_rlen = (s32) (i << 29); -- -- /* Load the initialisation block */ -- depca_init_ring(nic); -- LoadCSRs(); -- InitRestartDepca(); --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int depca_poll(struct nic *nic) --{ -- int entry; -- u32 status; -- -- entry = lp.rx_cur; -- if ((status = readl(&lp.rx_ring[entry].base) & R_OWN)) -- return (0); -- memcpy(nic->packet, lp.rx_memcpy[entry], nic->packetlen = lp.rx_ring[entry].msg_length); -- lp.rx_ring[entry].base |= R_OWN; -- lp.rx_cur = (++lp.rx_cur) & lp.rxRingMask; -- return (1); --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void depca_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- int entry, len; -- char *mem; -- -- /* send the packet to destination */ -- /* -- ** Caution: the right order is important here... dont -- ** setup the ownership rights until all the other -- ** information is in place -- */ -- mem = lp.tx_memcpy[entry = lp.tx_cur]; -- memcpy_toio(mem, d, ETH_ALEN); -- memcpy_toio(mem + ETH_ALEN, nic->node_addr, ETH_ALEN); -- mem[ETH_ALEN * 2] = t >> 8; -- mem[ETH_ALEN * 2 + 1] = t; -- memcpy_toio(mem + ETH_HLEN, p, s); -- s += ETH_HLEN; -- len = (s < ETH_ZLEN ? ETH_ZLEN : s); -- /* clean out flags */ -- writel(readl(&lp.tx_ring[entry].base) & ~T_FLAGS, &lp.tx_ring[entry].base); -- /* clears other error flags */ -- writew(0x0000, &lp.tx_ring[entry].misc); -- /* packet length in buffer */ -- writew(-len, &lp.tx_ring[entry].length); -- /* start and end of packet, ownership */ -- writel(readl(&lp.tx_ring[entry].base) | (T_STP|T_ENP|T_OWN), &lp.tx_ring[entry].base); -- /* update current pointers */ -- lp.tx_cur = (++lp.tx_cur) & lp.txRingMask; --} -- --/************************************************************************** --DISABLE - Turn off ethernet interface --***************************************************************************/ --static void depca_disable(struct nic *nic) --{ -- STOP_DEPCA; --} -- --/* --** Look for a special sequence in the Ethernet station address PROM that --** is common across all DEPCA products. Note that the original DEPCA needs --** its ROM address counter to be initialized and enabled. Only enable --** if the first address octet is a 0x08 - this minimises the chances of --** messing around with some other hardware, but it assumes that this DEPCA --** card initialized itself correctly. --** --** Search the Ethernet address ROM for the signature. Since the ROM address --** counter can start at an arbitrary point, the search must include the entire --** probe sequence length plus the (length_of_the_signature - 1). --** Stop the search IMMEDIATELY after the signature is found so that the --** PROM address counter is correctly positioned at the start of the --** ethernet address for later read out. --*/ --static int depca_probe1(struct nic *nic) --{ -- u8 data, nicsr; -- /* This is only correct for little endian machines, but then -- Etherboot doesn't work on anything but a PC */ -- u8 sig[] = { 0xFF, 0x00, 0x55, 0xAA, 0xFF, 0x00, 0x55, 0xAA }; -- int i, j; -- long sum, chksum; -- -- data = inb(DEPCA_PROM); /* clear counter on DEPCA */ -- data = inb(DEPCA_PROM); /* read data */ -- if (data == 0x8) { -- nicsr = inb(DEPCA_NICSR); -- nicsr |= AAC; -- outb(nicsr, DEPCA_NICSR); -- } -- for (i = 0, j = 0; j < (int)sizeof(sig) && i < PROBE_LENGTH+((int)sizeof(sig))-1; ++i) { -- data = inb(DEPCA_PROM); -- if (data == sig[j]) /* track signature */ -- ++j; -- else -- j = (data == sig[0]) ? 1 : 0; -- } -- if (j != sizeof(sig)) -- return (0); -- /* put the card in its initial state */ -- STOP_DEPCA; -- nicsr = ((inb(DEPCA_NICSR) & ~SHE & ~RBE & ~IEN) | IM); -- outb(nicsr, DEPCA_NICSR); -- if (inw(DEPCA_DATA) != STOP) -- return (0); -- memcpy((char *)mem_start, sig, sizeof(sig)); -- if (memcmp((char *)mem_start, sig, sizeof(sig)) != 0) -- return (0); -- for (i = 0, j = 0, sum = 0; j < 3; j++) { -- sum <<= 1; -- if (sum > 0xFFFF) -- sum -= 0xFFFF; -- sum += (u8)(nic->node_addr[i++] = inb(DEPCA_PROM)); -- sum += (u16)((nic->node_addr[i++] = inb(DEPCA_PROM)) << 8); -- if (sum > 0xFFFF) -- sum -= 0xFFFF; -- } -- if (sum == 0xFFFF) -- sum = 0; -- chksum = (u8)inb(DEPCA_PROM); -- chksum |= (u16)(inb(DEPCA_PROM) << 8); -- mem_len = (adapter == DEPCA) ? (48 << 10) : (64 << 10); -- offset = 0; -- if (nicsr & BUF) { -- offset = 0x8000; -- nicsr &= ~BS; -- mem_len -= (32 << 10); -- } -- if (adapter != DEPCA) /* enable shadow RAM */ -- outb(nicsr |= SHE, DEPCA_NICSR); -- printf("%s base %#hX, memory [%#hX-%#hX], addr %!", -- adapter_name[adapter], ioaddr, mem_start, mem_start + mem_len, -- nic->node_addr); -- if (sum != chksum) -- printf(" (bad checksum)"); -- putchar('\n'); -- return (1); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ --struct nic *depca_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- static unsigned short base[] = DEPCA_IO_PORTS; -- int i; -- -- if (probe_addrs == 0 || probe_addrs[0] == 0) -- probe_addrs = base; /* Use defaults */ -- for (i = 0; (ioaddr = base[i]) != 0; ++i) { -- if (depca_probe1(nic)) -- break; -- } -- if (ioaddr == 0) -- return (0); -- depca_reset(nic); -- /* point to NIC specific routines */ -- nic->reset = depca_reset; -- nic->poll = depca_poll; -- nic->transmit = depca_transmit; -- nic->disable = depca_disable; -- return (nic); --} -Index: b/netboot/dev.h -=================================================================== ---- /dev/null -+++ b/netboot/dev.h -@@ -0,0 +1,83 @@ -+#ifndef _DEV_H -+#define _DEV_H -+ -+#include "isa.h" -+#include "pci.h" -+ -+/* Need to check the packing of this struct if Etherboot is ported */ -+struct dev_id -+{ -+ unsigned short vendor_id; -+ unsigned short device_id; -+ unsigned char bus_type; -+#define PCI_BUS_TYPE 1 -+#define ISA_BUS_TYPE 2 -+}; -+ -+/* Dont use sizeof, that will include the padding */ -+#define DEV_ID_SIZE 8 -+ -+ -+struct pci_probe_state -+{ -+#ifdef CONFIG_PCI -+ struct pci_device dev; -+ int advance; -+#else -+ int dummy; -+#endif -+}; -+struct isa_probe_state -+{ -+#ifdef CONFIG_ISA -+ const struct isa_driver *driver; -+ int advance; -+#else -+ int dummy; -+#endif -+}; -+ -+union probe_state -+{ -+ struct pci_probe_state pci; -+ struct isa_probe_state isa; -+}; -+ -+struct dev -+{ -+ void (*disable)P((struct dev *)); -+ struct dev_id devid; /* device ID string (sent to DHCP server) */ -+ int index; /* Index of next device on this controller to probe */ -+ int type; /* Type of device I am probing for */ -+ int how_probe; /* First, next or awake */ -+ int to_probe; /* Flavor of device I am probing */ -+ int failsafe; /* Failsafe probe requested */ -+ int type_index; /* Index of this device (within type) */ -+#define PROBE_NONE 0 -+#define PROBE_PCI 1 -+#define PROBE_ISA 2 -+ union probe_state state; -+}; -+ -+ -+#define NIC_DRIVER 0 -+#define DISK_DRIVER 1 -+#define FLOPPY_DRIVER 2 -+ -+#define BRIDGE_DRIVER 1000 -+ -+#define PROBE_FIRST (-1) -+#define PROBE_NEXT 0 -+#define PROBE_AWAKE 1 /* After calling disable bring up the same device */ -+ -+/* The probe result codes are selected -+ * to allow them to be fed back into the probe -+ * routine and get a successful probe. -+ */ -+#define PROBE_FAILED PROBE_FIRST -+#define PROBE_WORKED PROBE_NEXT -+ -+extern int probe(struct dev *dev); -+extern void disable(struct dev *dev); -+ -+#endif /* _DEV_H */ -Index: b/netboot/e1000.c -=================================================================== ---- /dev/null -+++ b/netboot/e1000.c -@@ -0,0 +1,3682 @@ -+/************************************************************************** -+Etherboot - BOOTP/TFTP Bootstrap Program -+Inter Pro 1000 for Etherboot -+Drivers are port from Intel's Linux driver e1000-4.3.15 -+ -+***************************************************************************/ -+/******************************************************************************* -+ -+ -+ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU General Public License as published by the Free -+ Software Foundation; either version 2 of the License, or (at your option) -+ any later version. -+ -+ This program is distributed in the hope that it will be useful, but WITHOUT -+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ more details. -+ -+ You should have received a copy of the GNU General Public License along with -+ this program; if not, write to the Free Software Foundation, Inc., 59 -+ Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ The full GNU General Public License is included in this distribution in the -+ file called LICENSE. -+ -+ Contact Information: -+ Linux NICS -+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -+ -+*******************************************************************************/ -+/* -+ * Copyright (C) Archway Digital Solutions. -+ * -+ * written by Chrsitopher Li or -+ * 2/9/2002 -+ * -+ * Copyright (C) Linux Networx. -+ * Massive upgrade to work with the new intel gigabit NICs. -+ * -+ * -+ * Support for 82541ei & 82547ei chips from Intel's Linux driver 5.1.13 added by -+ * Georg Baum , sponsored by PetaMem GmbH and linkLINE Communications, Inc. -+ * -+ * 01/2004: Updated to Linux driver 5.2.22 by Georg Baum -+ */ -+ -+/* to get some global routines like printf */ -+#include "etherboot.h" -+/* to get the interface to the body of the program */ -+#include "nic.h" -+/* to get the PCI support functions, if this is a PCI NIC */ -+#include "pci.h" -+#include "timer.h" -+ -+typedef unsigned char *dma_addr_t; -+ -+typedef enum { -+ FALSE = 0, -+ TRUE = 1 -+} boolean_t; -+ -+#define DEBUG 0 -+ -+ -+/* Some pieces of code are disabled with #if 0 ... #endif. -+ * They are not deleted to show where the etherboot driver differs -+ * from the linux driver below the function level. -+ * Some member variables of the hw struct have been eliminated -+ * and the corresponding inplace checks inserted instead. -+ * Pieces such as LED handling that we definitely don't need are deleted. -+ * -+ * The following defines should not be needed normally, -+ * but may be helpful for debugging purposes. */ -+ -+/* Define this if you want to program the transmission control register -+ * the way the Linux driver does it. */ -+#undef LINUX_DRIVER_TCTL -+ -+/* Define this to behave more like the Linux driver. */ -+#undef LINUX_DRIVER -+ -+#include "e1000_hw.h" -+ -+/* NIC specific static variables go here */ -+static struct e1000_hw hw; -+static char tx_pool[128 + 16]; -+static char rx_pool[128 + 16]; -+static char packet[2096]; -+ -+static struct e1000_tx_desc *tx_base; -+static struct e1000_rx_desc *rx_base; -+ -+static int tx_tail; -+static int rx_tail, rx_last; -+ -+/* Function forward declarations */ -+static int e1000_setup_link(struct e1000_hw *hw); -+static int e1000_setup_fiber_serdes_link(struct e1000_hw *hw); -+static int e1000_setup_copper_link(struct e1000_hw *hw); -+static int e1000_phy_setup_autoneg(struct e1000_hw *hw); -+static void e1000_config_collision_dist(struct e1000_hw *hw); -+static int e1000_config_mac_to_phy(struct e1000_hw *hw); -+static int e1000_config_fc_after_link_up(struct e1000_hw *hw); -+static int e1000_check_for_link(struct e1000_hw *hw); -+static int e1000_wait_autoneg(struct e1000_hw *hw); -+static void e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t *speed, uint16_t *duplex); -+static int e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); -+static int e1000_read_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); -+static int e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); -+static int e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); -+static void e1000_phy_hw_reset(struct e1000_hw *hw); -+static int e1000_phy_reset(struct e1000_hw *hw); -+static int e1000_detect_gig_phy(struct e1000_hw *hw); -+ -+/* Printing macros... */ -+ -+#define E1000_ERR(args...) printf("e1000: " args) -+ -+#if DEBUG >= 3 -+#define E1000_DBG(args...) printf("e1000: " args) -+#else -+#define E1000_DBG(args...) -+#endif -+ -+#define MSGOUT(S, A, B) printk(S "\n", A, B) -+#if DEBUG >= 2 -+#define DEBUGFUNC(F) DEBUGOUT(F "\n"); -+#else -+#define DEBUGFUNC(F) -+#endif -+#if DEBUG >= 1 -+#define DEBUGOUT(S) printf(S) -+#define DEBUGOUT1(S,A) printf(S,A) -+#define DEBUGOUT2(S,A,B) printf(S,A,B) -+#define DEBUGOUT3(S,A,B,C) printf(S,A,B,C) -+#define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S,A,B,C,D,E,F,G) -+#else -+#define DEBUGOUT(S) -+#define DEBUGOUT1(S,A) -+#define DEBUGOUT2(S,A,B) -+#define DEBUGOUT3(S,A,B,C) -+#define DEBUGOUT7(S,A,B,C,D,E,F,G) -+#endif -+ -+#define E1000_WRITE_REG(a, reg, value) ( \ -+ ((a)->mac_type >= e1000_82543) ? \ -+ (writel((value), ((a)->hw_addr + E1000_##reg))) : \ -+ (writel((value), ((a)->hw_addr + E1000_82542_##reg)))) -+ -+#define E1000_READ_REG(a, reg) ( \ -+ ((a)->mac_type >= e1000_82543) ? \ -+ readl((a)->hw_addr + E1000_##reg) : \ -+ readl((a)->hw_addr + E1000_82542_##reg)) -+ -+#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \ -+ ((a)->mac_type >= e1000_82543) ? \ -+ writel((value), ((a)->hw_addr + E1000_##reg + ((offset) << 2))) : \ -+ writel((value), ((a)->hw_addr + E1000_82542_##reg + ((offset) << 2)))) -+ -+#define E1000_READ_REG_ARRAY(a, reg, offset) ( \ -+ ((a)->mac_type >= e1000_82543) ? \ -+ readl((a)->hw_addr + E1000_##reg + ((offset) << 2)) : \ -+ readl((a)->hw_addr + E1000_82542_##reg + ((offset) << 2))) -+ -+#define E1000_WRITE_FLUSH(a) {uint32_t x; x = E1000_READ_REG(a, STATUS);} -+ -+uint32_t -+e1000_io_read(struct e1000_hw *hw __unused, uint32_t port) -+{ -+ return inl(port); -+} -+ -+void -+e1000_io_write(struct e1000_hw *hw __unused, uint32_t port, uint32_t value) -+{ -+ outl(value, port); -+} -+ -+static inline void e1000_pci_set_mwi(struct e1000_hw *hw) -+{ -+ pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word); -+} -+ -+static inline void e1000_pci_clear_mwi(struct e1000_hw *hw) -+{ -+ pci_write_config_word(hw->pdev, PCI_COMMAND, -+ hw->pci_cmd_word & ~PCI_COMMAND_INVALIDATE); -+} -+ -+/****************************************************************************** -+ * Raises the EEPROM's clock input. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * eecd - EECD's current value -+ *****************************************************************************/ -+static void -+e1000_raise_ee_clk(struct e1000_hw *hw, -+ uint32_t *eecd) -+{ -+ /* Raise the clock input to the EEPROM (by setting the SK bit), and then -+ * wait microseconds. -+ */ -+ *eecd = *eecd | E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, *eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(hw->eeprom.delay_usec); -+} -+ -+/****************************************************************************** -+ * Lowers the EEPROM's clock input. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * eecd - EECD's current value -+ *****************************************************************************/ -+static void -+e1000_lower_ee_clk(struct e1000_hw *hw, -+ uint32_t *eecd) -+{ -+ /* Lower the clock input to the EEPROM (by clearing the SK bit), and then -+ * wait 50 microseconds. -+ */ -+ *eecd = *eecd & ~E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, *eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(hw->eeprom.delay_usec); -+} -+ -+/****************************************************************************** -+ * Shift data bits out to the EEPROM. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * data - data to send to the EEPROM -+ * count - number of bits to shift out -+ *****************************************************************************/ -+static void -+e1000_shift_out_ee_bits(struct e1000_hw *hw, -+ uint16_t data, -+ uint16_t count) -+{ -+ struct e1000_eeprom_info *eeprom = &hw->eeprom; -+ uint32_t eecd; -+ uint32_t mask; -+ -+ /* We need to shift "count" bits out to the EEPROM. So, value in the -+ * "data" parameter will be shifted out to the EEPROM one bit at a time. -+ * In order to do this, "data" must be broken down into bits. -+ */ -+ mask = 0x01 << (count - 1); -+ eecd = E1000_READ_REG(hw, EECD); -+ if (eeprom->type == e1000_eeprom_microwire) { -+ eecd &= ~E1000_EECD_DO; -+ } else if (eeprom->type == e1000_eeprom_spi) { -+ eecd |= E1000_EECD_DO; -+ } -+ do { -+ /* A "1" is shifted out to the EEPROM by setting bit "DI" to a "1", -+ * and then raising and then lowering the clock (the SK bit controls -+ * the clock input to the EEPROM). A "0" is shifted out to the EEPROM -+ * by setting "DI" to "0" and then raising and then lowering the clock. -+ */ -+ eecd &= ~E1000_EECD_DI; -+ -+ if(data & mask) -+ eecd |= E1000_EECD_DI; -+ -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ -+ udelay(eeprom->delay_usec); -+ -+ e1000_raise_ee_clk(hw, &eecd); -+ e1000_lower_ee_clk(hw, &eecd); -+ -+ mask = mask >> 1; -+ -+ } while(mask); -+ -+ /* We leave the "DI" bit set to "0" when we leave this routine. */ -+ eecd &= ~E1000_EECD_DI; -+ E1000_WRITE_REG(hw, EECD, eecd); -+} -+ -+/****************************************************************************** -+ * Shift data bits in from the EEPROM -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static uint16_t -+e1000_shift_in_ee_bits(struct e1000_hw *hw, -+ uint16_t count) -+{ -+ uint32_t eecd; -+ uint32_t i; -+ uint16_t data; -+ -+ /* In order to read a register from the EEPROM, we need to shift 'count' -+ * bits in from the EEPROM. Bits are "shifted in" by raising the clock -+ * input to the EEPROM (setting the SK bit), and then reading the value of -+ * the "DO" bit. During this "shifting in" process the "DI" bit should -+ * always be clear. -+ */ -+ -+ eecd = E1000_READ_REG(hw, EECD); -+ -+ eecd &= ~(E1000_EECD_DO | E1000_EECD_DI); -+ data = 0; -+ -+ for(i = 0; i < count; i++) { -+ data = data << 1; -+ e1000_raise_ee_clk(hw, &eecd); -+ -+ eecd = E1000_READ_REG(hw, EECD); -+ -+ eecd &= ~(E1000_EECD_DI); -+ if(eecd & E1000_EECD_DO) -+ data |= 1; -+ -+ e1000_lower_ee_clk(hw, &eecd); -+ } -+ -+ return data; -+} -+ -+/****************************************************************************** -+ * Prepares EEPROM for access -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This -+ * function should be called before issuing a command to the EEPROM. -+ *****************************************************************************/ -+static int32_t -+e1000_acquire_eeprom(struct e1000_hw *hw) -+{ -+ struct e1000_eeprom_info *eeprom = &hw->eeprom; -+ uint32_t eecd, i=0; -+ -+ eecd = E1000_READ_REG(hw, EECD); -+ -+ /* Request EEPROM Access */ -+ if(hw->mac_type > e1000_82544) { -+ eecd |= E1000_EECD_REQ; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ eecd = E1000_READ_REG(hw, EECD); -+ while((!(eecd & E1000_EECD_GNT)) && -+ (i < E1000_EEPROM_GRANT_ATTEMPTS)) { -+ i++; -+ udelay(5); -+ eecd = E1000_READ_REG(hw, EECD); -+ } -+ if(!(eecd & E1000_EECD_GNT)) { -+ eecd &= ~E1000_EECD_REQ; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ DEBUGOUT("Could not acquire EEPROM grant\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ } -+ -+ /* Setup EEPROM for Read/Write */ -+ -+ if (eeprom->type == e1000_eeprom_microwire) { -+ /* Clear SK and DI */ -+ eecd &= ~(E1000_EECD_DI | E1000_EECD_SK); -+ E1000_WRITE_REG(hw, EECD, eecd); -+ -+ /* Set CS */ -+ eecd |= E1000_EECD_CS; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ } else if (eeprom->type == e1000_eeprom_spi) { -+ /* Clear SK and CS */ -+ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); -+ E1000_WRITE_REG(hw, EECD, eecd); -+ udelay(1); -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Returns EEPROM to a "standby" state -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_standby_eeprom(struct e1000_hw *hw) -+{ -+ struct e1000_eeprom_info *eeprom = &hw->eeprom; -+ uint32_t eecd; -+ -+ eecd = E1000_READ_REG(hw, EECD); -+ -+ if(eeprom->type == e1000_eeprom_microwire) { -+ -+ /* Deselect EEPROM */ -+ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ -+ /* Clock high */ -+ eecd |= E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ -+ /* Select EEPROM */ -+ eecd |= E1000_EECD_CS; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ -+ /* Clock low */ -+ eecd &= ~E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ } else if(eeprom->type == e1000_eeprom_spi) { -+ /* Toggle CS to flush commands */ -+ eecd |= E1000_EECD_CS; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ eecd &= ~E1000_EECD_CS; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(eeprom->delay_usec); -+ } -+} -+ -+/****************************************************************************** -+ * Terminates a command by inverting the EEPROM's chip select pin -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_release_eeprom(struct e1000_hw *hw) -+{ -+ uint32_t eecd; -+ -+ eecd = E1000_READ_REG(hw, EECD); -+ -+ if (hw->eeprom.type == e1000_eeprom_spi) { -+ eecd |= E1000_EECD_CS; /* Pull CS high */ -+ eecd &= ~E1000_EECD_SK; /* Lower SCK */ -+ -+ E1000_WRITE_REG(hw, EECD, eecd); -+ -+ udelay(hw->eeprom.delay_usec); -+ } else if(hw->eeprom.type == e1000_eeprom_microwire) { -+ /* cleanup eeprom */ -+ -+ /* CS on Microwire is active-high */ -+ eecd &= ~(E1000_EECD_CS | E1000_EECD_DI); -+ -+ E1000_WRITE_REG(hw, EECD, eecd); -+ -+ /* Rising edge of clock */ -+ eecd |= E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(hw->eeprom.delay_usec); -+ -+ /* Falling edge of clock */ -+ eecd &= ~E1000_EECD_SK; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ E1000_WRITE_FLUSH(hw); -+ udelay(hw->eeprom.delay_usec); -+ } -+ -+ /* Stop requesting EEPROM access */ -+ if(hw->mac_type > e1000_82544) { -+ eecd &= ~E1000_EECD_REQ; -+ E1000_WRITE_REG(hw, EECD, eecd); -+ } -+} -+ -+/****************************************************************************** -+ * Reads a 16 bit word from the EEPROM. -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static int32_t -+e1000_spi_eeprom_ready(struct e1000_hw *hw) -+{ -+ uint16_t retry_count = 0; -+ uint8_t spi_stat_reg; -+ -+ /* Read "Status Register" repeatedly until the LSB is cleared. The -+ * EEPROM will signal that the command has been completed by clearing -+ * bit 0 of the internal status register. If it's not cleared within -+ * 5 milliseconds, then error out. -+ */ -+ retry_count = 0; -+ do { -+ e1000_shift_out_ee_bits(hw, EEPROM_RDSR_OPCODE_SPI, -+ hw->eeprom.opcode_bits); -+ spi_stat_reg = (uint8_t)e1000_shift_in_ee_bits(hw, 8); -+ if (!(spi_stat_reg & EEPROM_STATUS_RDY_SPI)) -+ break; -+ -+ udelay(5); -+ retry_count += 5; -+ -+ } while(retry_count < EEPROM_MAX_RETRY_SPI); -+ -+ /* ATMEL SPI write time could vary from 0-20mSec on 3.3V devices (and -+ * only 0-5mSec on 5V devices) -+ */ -+ if(retry_count >= EEPROM_MAX_RETRY_SPI) { -+ DEBUGOUT("SPI EEPROM Status error\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Reads a 16 bit word from the EEPROM. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * offset - offset of word in the EEPROM to read -+ * data - word read from the EEPROM -+ * words - number of words to read -+ *****************************************************************************/ -+static int -+e1000_read_eeprom(struct e1000_hw *hw, -+ uint16_t offset, -+ uint16_t words, -+ uint16_t *data) -+{ -+ struct e1000_eeprom_info *eeprom = &hw->eeprom; -+ uint32_t i = 0; -+ -+ DEBUGFUNC("e1000_read_eeprom"); -+ -+ /* A check for invalid values: offset too large, too many words, and not -+ * enough words. -+ */ -+ if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) || -+ (words == 0)) { -+ DEBUGOUT("\"words\" parameter out of bounds\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ -+ /* Prepare the EEPROM for reading */ -+ if(e1000_acquire_eeprom(hw) != E1000_SUCCESS) -+ return -E1000_ERR_EEPROM; -+ -+ if(eeprom->type == e1000_eeprom_spi) { -+ uint16_t word_in; -+ uint8_t read_opcode = EEPROM_READ_OPCODE_SPI; -+ -+ if(e1000_spi_eeprom_ready(hw)) { -+ e1000_release_eeprom(hw); -+ return -E1000_ERR_EEPROM; -+ } -+ -+ e1000_standby_eeprom(hw); -+ -+ /* Some SPI eeproms use the 8th address bit embedded in the opcode */ -+ if((eeprom->address_bits == 8) && (offset >= 128)) -+ read_opcode |= EEPROM_A8_OPCODE_SPI; -+ -+ /* Send the READ command (opcode + addr) */ -+ e1000_shift_out_ee_bits(hw, read_opcode, eeprom->opcode_bits); -+ e1000_shift_out_ee_bits(hw, (uint16_t)(offset*2), eeprom->address_bits); -+ -+ /* Read the data. The address of the eeprom internally increments with -+ * each byte (spi) being read, saving on the overhead of eeprom setup -+ * and tear-down. The address counter will roll over if reading beyond -+ * the size of the eeprom, thus allowing the entire memory to be read -+ * starting from any offset. */ -+ for (i = 0; i < words; i++) { -+ word_in = e1000_shift_in_ee_bits(hw, 16); -+ data[i] = (word_in >> 8) | (word_in << 8); -+ } -+ } else if(eeprom->type == e1000_eeprom_microwire) { -+ for (i = 0; i < words; i++) { -+ /* Send the READ command (opcode + addr) */ -+ e1000_shift_out_ee_bits(hw, EEPROM_READ_OPCODE_MICROWIRE, -+ eeprom->opcode_bits); -+ e1000_shift_out_ee_bits(hw, (uint16_t)(offset + i), -+ eeprom->address_bits); -+ -+ /* Read the data. For microwire, each word requires the overhead -+ * of eeprom setup and tear-down. */ -+ data[i] = e1000_shift_in_ee_bits(hw, 16); -+ e1000_standby_eeprom(hw); -+ } -+ } -+ -+ /* End this read operation */ -+ e1000_release_eeprom(hw); -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Verifies that the EEPROM has a valid checksum -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Reads the first 64 16 bit words of the EEPROM and sums the values read. -+ * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is -+ * valid. -+ *****************************************************************************/ -+static int -+e1000_validate_eeprom_checksum(struct e1000_hw *hw) -+{ -+ uint16_t checksum = 0; -+ uint16_t i, eeprom_data; -+ -+ DEBUGFUNC("e1000_validate_eeprom_checksum"); -+ -+ for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) { -+ if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) { -+ DEBUGOUT("EEPROM Read Error\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ checksum += eeprom_data; -+ } -+ -+ if(checksum == (uint16_t) EEPROM_SUM) -+ return E1000_SUCCESS; -+ else { -+ DEBUGOUT("EEPROM Checksum Invalid\n"); -+ return -E1000_ERR_EEPROM; -+ } -+} -+ -+/****************************************************************************** -+ * Reads the adapter's MAC address from the EEPROM and inverts the LSB for the -+ * second function of dual function devices -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static int -+e1000_read_mac_addr(struct e1000_hw *hw) -+{ -+ uint16_t offset; -+ uint16_t eeprom_data; -+ int i; -+ -+ DEBUGFUNC("e1000_read_mac_addr"); -+ -+ for(i = 0; i < NODE_ADDRESS_SIZE; i += 2) { -+ offset = i >> 1; -+ if(e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) { -+ DEBUGOUT("EEPROM Read Error\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ hw->mac_addr[i] = eeprom_data & 0xff; -+ hw->mac_addr[i+1] = (eeprom_data >> 8) & 0xff; -+ } -+ if(((hw->mac_type == e1000_82546) || (hw->mac_type == e1000_82546_rev_3)) && -+ (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) -+ /* Invert the last bit if this is the second device */ -+ hw->mac_addr[5] ^= 1; -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Initializes receive address filters. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Places the MAC address in receive address register 0 and clears the rest -+ * of the receive addresss registers. Clears the multicast table. Assumes -+ * the receiver is in reset when the routine is called. -+ *****************************************************************************/ -+static void -+e1000_init_rx_addrs(struct e1000_hw *hw) -+{ -+ uint32_t i; -+ uint32_t addr_low; -+ uint32_t addr_high; -+ -+ DEBUGFUNC("e1000_init_rx_addrs"); -+ -+ /* Setup the receive address. */ -+ DEBUGOUT("Programming MAC Address into RAR[0]\n"); -+ addr_low = (hw->mac_addr[0] | -+ (hw->mac_addr[1] << 8) | -+ (hw->mac_addr[2] << 16) | (hw->mac_addr[3] << 24)); -+ -+ addr_high = (hw->mac_addr[4] | -+ (hw->mac_addr[5] << 8) | E1000_RAH_AV); -+ -+ E1000_WRITE_REG_ARRAY(hw, RA, 0, addr_low); -+ E1000_WRITE_REG_ARRAY(hw, RA, 1, addr_high); -+ -+ /* Zero out the other 15 receive addresses. */ -+ DEBUGOUT("Clearing RAR[1-15]\n"); -+ for(i = 1; i < E1000_RAR_ENTRIES; i++) { -+ E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); -+ E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); -+ } -+} -+ -+/****************************************************************************** -+ * Clears the VLAN filer table -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_clear_vfta(struct e1000_hw *hw) -+{ -+ uint32_t offset; -+ -+ for(offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) -+ E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0); -+} -+ -+/****************************************************************************** -+* Writes a value to one of the devices registers using port I/O (as opposed to -+* memory mapped I/O). Only 82544 and newer devices support port I/O. * -+* hw - Struct containing variables accessed by shared code -+* offset - offset to write to * value - value to write -+*****************************************************************************/ -+void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value){ -+ uint32_t io_addr = hw->io_base; -+ uint32_t io_data = hw->io_base + 4; -+ e1000_io_write(hw, io_addr, offset); -+ e1000_io_write(hw, io_data, value); -+} -+ -+/****************************************************************************** -+ * Set the phy type member in the hw struct. -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static int32_t -+e1000_set_phy_type(struct e1000_hw *hw) -+{ -+ DEBUGFUNC("e1000_set_phy_type"); -+ -+ switch(hw->phy_id) { -+ case M88E1000_E_PHY_ID: -+ case M88E1000_I_PHY_ID: -+ case M88E1011_I_PHY_ID: -+ hw->phy_type = e1000_phy_m88; -+ break; -+ case IGP01E1000_I_PHY_ID: -+ hw->phy_type = e1000_phy_igp; -+ break; -+ default: -+ /* Should never have loaded on this device */ -+ hw->phy_type = e1000_phy_undefined; -+ return -E1000_ERR_PHY_TYPE; -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * IGP phy init script - initializes the GbE PHY -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_phy_init_script(struct e1000_hw *hw) -+{ -+ DEBUGFUNC("e1000_phy_init_script"); -+ -+#if 0 -+ /* See e1000_sw_init() of the Linux driver */ -+ if(hw->phy_init_script) { -+#else -+ if((hw->mac_type == e1000_82541) || -+ (hw->mac_type == e1000_82547) || -+ (hw->mac_type == e1000_82541_rev_2) || -+ (hw->mac_type == e1000_82547_rev_2)) { -+#endif -+ mdelay(20); -+ -+ e1000_write_phy_reg(hw,0x0000,0x0140); -+ -+ mdelay(5); -+ -+ if(hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547) { -+ e1000_write_phy_reg(hw, 0x1F95, 0x0001); -+ -+ e1000_write_phy_reg(hw, 0x1F71, 0xBD21); -+ -+ e1000_write_phy_reg(hw, 0x1F79, 0x0018); -+ -+ e1000_write_phy_reg(hw, 0x1F30, 0x1600); -+ -+ e1000_write_phy_reg(hw, 0x1F31, 0x0014); -+ -+ e1000_write_phy_reg(hw, 0x1F32, 0x161C); -+ -+ e1000_write_phy_reg(hw, 0x1F94, 0x0003); -+ -+ e1000_write_phy_reg(hw, 0x1F96, 0x003F); -+ -+ e1000_write_phy_reg(hw, 0x2010, 0x0008); -+ } else { -+ e1000_write_phy_reg(hw, 0x1F73, 0x0099); -+ } -+ -+ e1000_write_phy_reg(hw, 0x0000, 0x3300); -+ -+ -+ if(hw->mac_type == e1000_82547) { -+ uint16_t fused, fine, coarse; -+ -+ /* Move to analog registers page */ -+ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused); -+ -+ if(!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) { -+ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_FUSE_STATUS, &fused); -+ -+ fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK; -+ coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK; -+ -+ if(coarse > IGP01E1000_ANALOG_FUSE_COARSE_THRESH) { -+ coarse -= IGP01E1000_ANALOG_FUSE_COARSE_10; -+ fine -= IGP01E1000_ANALOG_FUSE_FINE_1; -+ } else if(coarse == IGP01E1000_ANALOG_FUSE_COARSE_THRESH) -+ fine -= IGP01E1000_ANALOG_FUSE_FINE_10; -+ -+ fused = (fused & IGP01E1000_ANALOG_FUSE_POLY_MASK) | -+ (fine & IGP01E1000_ANALOG_FUSE_FINE_MASK) | -+ (coarse & IGP01E1000_ANALOG_FUSE_COARSE_MASK); -+ -+ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_CONTROL, fused); -+ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_BYPASS, -+ IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL); -+ } -+ } -+ } -+} -+ -+/****************************************************************************** -+ * Set the mac type member in the hw struct. -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static int -+e1000_set_mac_type(struct e1000_hw *hw) -+{ -+ DEBUGFUNC("e1000_set_mac_type"); -+ -+ switch (hw->device_id) { -+ case E1000_DEV_ID_82542: -+ switch (hw->revision_id) { -+ case E1000_82542_2_0_REV_ID: -+ hw->mac_type = e1000_82542_rev2_0; -+ break; -+ case E1000_82542_2_1_REV_ID: -+ hw->mac_type = e1000_82542_rev2_1; -+ break; -+ default: -+ /* Invalid 82542 revision ID */ -+ return -E1000_ERR_MAC_TYPE; -+ } -+ break; -+ case E1000_DEV_ID_82543GC_FIBER: -+ case E1000_DEV_ID_82543GC_COPPER: -+ hw->mac_type = e1000_82543; -+ break; -+ case E1000_DEV_ID_82544EI_COPPER: -+ case E1000_DEV_ID_82544EI_FIBER: -+ case E1000_DEV_ID_82544GC_COPPER: -+ case E1000_DEV_ID_82544GC_LOM: -+ hw->mac_type = e1000_82544; -+ break; -+ case E1000_DEV_ID_82540EM: -+ case E1000_DEV_ID_82540EM_LOM: -+ case E1000_DEV_ID_82540EP: -+ case E1000_DEV_ID_82540EP_LOM: -+ case E1000_DEV_ID_82540EP_LP: -+ hw->mac_type = e1000_82540; -+ break; -+ case E1000_DEV_ID_82545EM_COPPER: -+ case E1000_DEV_ID_82545EM_FIBER: -+ hw->mac_type = e1000_82545; -+ break; -+ case E1000_DEV_ID_82545GM_COPPER: -+ case E1000_DEV_ID_82545GM_FIBER: -+ case E1000_DEV_ID_82545GM_SERDES: -+ hw->mac_type = e1000_82545_rev_3; -+ break; -+ case E1000_DEV_ID_82546EB_COPPER: -+ case E1000_DEV_ID_82546EB_FIBER: -+ case E1000_DEV_ID_82546EB_QUAD_COPPER: -+ hw->mac_type = e1000_82546; -+ break; -+ case E1000_DEV_ID_82546GB_COPPER: -+ case E1000_DEV_ID_82546GB_FIBER: -+ case E1000_DEV_ID_82546GB_SERDES: -+ hw->mac_type = e1000_82546_rev_3; -+ break; -+ case E1000_DEV_ID_82541EI: -+ case E1000_DEV_ID_82541EI_MOBILE: -+ hw->mac_type = e1000_82541; -+ break; -+ case E1000_DEV_ID_82541ER: -+ case E1000_DEV_ID_82541GI: -+ case E1000_DEV_ID_82541GI_MOBILE: -+ hw->mac_type = e1000_82541_rev_2; -+ break; -+ case E1000_DEV_ID_82547EI: -+ hw->mac_type = e1000_82547; -+ break; -+ case E1000_DEV_ID_82547GI: -+ hw->mac_type = e1000_82547_rev_2; -+ break; -+ default: -+ /* Should never have loaded on this device */ -+ return -E1000_ERR_MAC_TYPE; -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/***************************************************************************** -+ * Set media type and TBI compatibility. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * **************************************************************************/ -+static void -+e1000_set_media_type(struct e1000_hw *hw) -+{ -+ uint32_t status; -+ -+ DEBUGFUNC("e1000_set_media_type"); -+ -+ if(hw->mac_type != e1000_82543) { -+ /* tbi_compatibility is only valid on 82543 */ -+ hw->tbi_compatibility_en = FALSE; -+ } -+ -+ switch (hw->device_id) { -+ case E1000_DEV_ID_82545GM_SERDES: -+ case E1000_DEV_ID_82546GB_SERDES: -+ hw->media_type = e1000_media_type_internal_serdes; -+ break; -+ default: -+ if(hw->mac_type >= e1000_82543) { -+ status = E1000_READ_REG(hw, STATUS); -+ if(status & E1000_STATUS_TBIMODE) { -+ hw->media_type = e1000_media_type_fiber; -+ /* tbi_compatibility not valid on fiber */ -+ hw->tbi_compatibility_en = FALSE; -+ } else { -+ hw->media_type = e1000_media_type_copper; -+ } -+ } else { -+ /* This is an 82542 (fiber only) */ -+ hw->media_type = e1000_media_type_fiber; -+ } -+ } -+} -+ -+/****************************************************************************** -+ * Reset the transmit and receive units; mask and clear all interrupts. -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_reset_hw(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ uint32_t ctrl_ext; -+ uint32_t icr; -+ uint32_t manc; -+ -+ DEBUGFUNC("e1000_reset_hw"); -+ -+ /* For 82542 (rev 2.0), disable MWI before issuing a device reset */ -+ if(hw->mac_type == e1000_82542_rev2_0) { -+ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); -+ e1000_pci_clear_mwi(hw); -+ } -+ -+ /* Clear interrupt mask to stop board from generating interrupts */ -+ DEBUGOUT("Masking off all interrupts\n"); -+ E1000_WRITE_REG(hw, IMC, 0xffffffff); -+ -+ /* Disable the Transmit and Receive units. Then delay to allow -+ * any pending transactions to complete before we hit the MAC with -+ * the global reset. -+ */ -+ E1000_WRITE_REG(hw, RCTL, 0); -+ E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP); -+ E1000_WRITE_FLUSH(hw); -+ -+ /* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */ -+ hw->tbi_compatibility_on = FALSE; -+ -+ /* Delay to allow any outstanding PCI transactions to complete before -+ * resetting the device -+ */ -+ mdelay(10); -+ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ -+ /* Must reset the PHY before resetting the MAC */ -+ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { -+ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_PHY_RST)); -+ mdelay(5); -+ } -+ -+ /* Issue a global reset to the MAC. This will reset the chip's -+ * transmit, receive, DMA, and link units. It will not effect -+ * the current PCI configuration. The global reset bit is self- -+ * clearing, and should clear within a microsecond. -+ */ -+ DEBUGOUT("Issuing a global reset to MAC\n"); -+ -+ switch(hw->mac_type) { -+ case e1000_82544: -+ case e1000_82540: -+ case e1000_82545: -+ case e1000_82546: -+ case e1000_82541: -+ case e1000_82541_rev_2: -+ /* These controllers can't ack the 64-bit write when issuing the -+ * reset, so use IO-mapping as a workaround to issue the reset */ -+ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST)); -+ break; -+ case e1000_82545_rev_3: -+ case e1000_82546_rev_3: -+ /* Reset is performed on a shadow of the control register */ -+ E1000_WRITE_REG(hw, CTRL_DUP, (ctrl | E1000_CTRL_RST)); -+ break; -+ default: -+ E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST)); -+ break; -+ } -+ -+ /* After MAC reset, force reload of EEPROM to restore power-on settings to -+ * device. Later controllers reload the EEPROM automatically, so just wait -+ * for reload to complete. -+ */ -+ switch(hw->mac_type) { -+ case e1000_82542_rev2_0: -+ case e1000_82542_rev2_1: -+ case e1000_82543: -+ case e1000_82544: -+ /* Wait for reset to complete */ -+ udelay(10); -+ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); -+ ctrl_ext |= E1000_CTRL_EXT_EE_RST; -+ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); -+ E1000_WRITE_FLUSH(hw); -+ /* Wait for EEPROM reload */ -+ mdelay(2); -+ break; -+ case e1000_82541: -+ case e1000_82541_rev_2: -+ case e1000_82547: -+ case e1000_82547_rev_2: -+ /* Wait for EEPROM reload */ -+ mdelay(20); -+ break; -+ default: -+ /* Wait for EEPROM reload (it happens automatically) */ -+ mdelay(5); -+ break; -+ } -+ -+ /* Disable HW ARPs on ASF enabled adapters */ -+ if(hw->mac_type >= e1000_82540) { -+ manc = E1000_READ_REG(hw, MANC); -+ manc &= ~(E1000_MANC_ARP_EN); -+ E1000_WRITE_REG(hw, MANC, manc); -+ } -+ -+ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { -+ e1000_phy_init_script(hw); -+ } -+ -+ /* Clear interrupt mask to stop board from generating interrupts */ -+ DEBUGOUT("Masking off all interrupts\n"); -+ E1000_WRITE_REG(hw, IMC, 0xffffffff); -+ -+ /* Clear any pending interrupt events. */ -+ icr = E1000_READ_REG(hw, ICR); -+ -+ /* If MWI was previously enabled, reenable it. */ -+ if(hw->mac_type == e1000_82542_rev2_0) { -+#ifdef LINUX_DRIVER -+ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) -+#endif -+ e1000_pci_set_mwi(hw); -+ } -+} -+ -+/****************************************************************************** -+ * Performs basic configuration of the adapter. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Assumes that the controller has previously been reset and is in a -+ * post-reset uninitialized state. Initializes the receive address registers, -+ * multicast table, and VLAN filter table. Calls routines to setup link -+ * configuration and flow control settings. Clears all on-chip counters. Leaves -+ * the transmit and receive units disabled and uninitialized. -+ *****************************************************************************/ -+static int -+e1000_init_hw(struct e1000_hw *hw) -+{ -+ uint32_t ctrl, status; -+ uint32_t i; -+ int32_t ret_val; -+ uint16_t pcix_cmd_word; -+ uint16_t pcix_stat_hi_word; -+ uint16_t cmd_mmrbc; -+ uint16_t stat_mmrbc; -+ e1000_bus_type bus_type = e1000_bus_type_unknown; -+ -+ DEBUGFUNC("e1000_init_hw"); -+ -+ /* Set the media type and TBI compatibility */ -+ e1000_set_media_type(hw); -+ -+ /* Disabling VLAN filtering. */ -+ DEBUGOUT("Initializing the IEEE VLAN\n"); -+ E1000_WRITE_REG(hw, VET, 0); -+ -+ e1000_clear_vfta(hw); -+ -+ /* For 82542 (rev 2.0), disable MWI and put the receiver into reset */ -+ if(hw->mac_type == e1000_82542_rev2_0) { -+ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); -+ e1000_pci_clear_mwi(hw); -+ E1000_WRITE_REG(hw, RCTL, E1000_RCTL_RST); -+ E1000_WRITE_FLUSH(hw); -+ mdelay(5); -+ } -+ -+ /* Setup the receive address. This involves initializing all of the Receive -+ * Address Registers (RARs 0 - 15). -+ */ -+ e1000_init_rx_addrs(hw); -+ -+ /* For 82542 (rev 2.0), take the receiver out of reset and enable MWI */ -+ if(hw->mac_type == e1000_82542_rev2_0) { -+ E1000_WRITE_REG(hw, RCTL, 0); -+ E1000_WRITE_FLUSH(hw); -+ mdelay(1); -+#ifdef LINUX_DRIVER -+ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) -+#endif -+ e1000_pci_set_mwi(hw); -+ } -+ -+ /* Zero out the Multicast HASH table */ -+ DEBUGOUT("Zeroing the MTA\n"); -+ for(i = 0; i < E1000_MC_TBL_SIZE; i++) -+ E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); -+ -+#if 0 -+ /* Set the PCI priority bit correctly in the CTRL register. This -+ * determines if the adapter gives priority to receives, or if it -+ * gives equal priority to transmits and receives. -+ */ -+ if(hw->dma_fairness) { -+ ctrl = E1000_READ_REG(hw, CTRL); -+ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PRIOR); -+ } -+#endif -+ -+ switch(hw->mac_type) { -+ case e1000_82545_rev_3: -+ case e1000_82546_rev_3: -+ break; -+ default: -+ if (hw->mac_type >= e1000_82543) { -+ /* See e1000_get_bus_info() of the Linux driver */ -+ status = E1000_READ_REG(hw, STATUS); -+ bus_type = (status & E1000_STATUS_PCIX_MODE) ? -+ e1000_bus_type_pcix : e1000_bus_type_pci; -+ } -+ -+ /* Workaround for PCI-X problem when BIOS sets MMRBC incorrectly. */ -+ if(bus_type == e1000_bus_type_pcix) { -+ pci_read_config_word(hw->pdev, PCIX_COMMAND_REGISTER, &pcix_cmd_word); -+ pci_read_config_word(hw->pdev, PCIX_STATUS_REGISTER_HI, &pcix_stat_hi_word); -+ cmd_mmrbc = (pcix_cmd_word & PCIX_COMMAND_MMRBC_MASK) >> -+ PCIX_COMMAND_MMRBC_SHIFT; -+ stat_mmrbc = (pcix_stat_hi_word & PCIX_STATUS_HI_MMRBC_MASK) >> -+ PCIX_STATUS_HI_MMRBC_SHIFT; -+ if(stat_mmrbc == PCIX_STATUS_HI_MMRBC_4K) -+ stat_mmrbc = PCIX_STATUS_HI_MMRBC_2K; -+ if(cmd_mmrbc > stat_mmrbc) { -+ pcix_cmd_word &= ~PCIX_COMMAND_MMRBC_MASK; -+ pcix_cmd_word |= stat_mmrbc << PCIX_COMMAND_MMRBC_SHIFT; -+ pci_write_config_word(hw->pdev, PCIX_COMMAND_REGISTER, pcix_cmd_word); -+ } -+ } -+ break; -+ } -+ -+ /* Call a subroutine to configure the link and setup flow control. */ -+ ret_val = e1000_setup_link(hw); -+ -+ /* Set the transmit descriptor write-back policy */ -+ if(hw->mac_type > e1000_82544) { -+ ctrl = E1000_READ_REG(hw, TXDCTL); -+ ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB; -+ E1000_WRITE_REG(hw, TXDCTL, ctrl); -+ } -+ -+#if 0 -+ /* Clear all of the statistics registers (clear on read). It is -+ * important that we do this after we have tried to establish link -+ * because the symbol error count will increment wildly if there -+ * is no link. -+ */ -+ e1000_clear_hw_cntrs(hw); -+#endif -+ -+ return ret_val; -+} -+ -+/****************************************************************************** -+ * Adjust SERDES output amplitude based on EEPROM setting. -+ * -+ * hw - Struct containing variables accessed by shared code. -+ *****************************************************************************/ -+static int32_t -+e1000_adjust_serdes_amplitude(struct e1000_hw *hw) -+{ -+ uint16_t eeprom_data; -+ int32_t ret_val; -+ -+ DEBUGFUNC("e1000_adjust_serdes_amplitude"); -+ -+ if(hw->media_type != e1000_media_type_internal_serdes) -+ return E1000_SUCCESS; -+ -+ switch(hw->mac_type) { -+ case e1000_82545_rev_3: -+ case e1000_82546_rev_3: -+ break; -+ default: -+ return E1000_SUCCESS; -+ } -+ -+ if ((ret_val = e1000_read_eeprom(hw, EEPROM_SERDES_AMPLITUDE, 1, -+ &eeprom_data))) { -+ return ret_val; -+ } -+ -+ if(eeprom_data != EEPROM_RESERVED_WORD) { -+ /* Adjust SERDES output amplitude only. */ -+ eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; -+ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, -+ eeprom_data))) -+ return ret_val; -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Configures flow control and link settings. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Determines which flow control settings to use. Calls the apropriate media- -+ * specific link configuration function. Configures the flow control settings. -+ * Assuming the adapter has a valid link partner, a valid link should be -+ * established. Assumes the hardware has previously been reset and the -+ * transmitter and receiver are not enabled. -+ *****************************************************************************/ -+static int -+e1000_setup_link(struct e1000_hw *hw) -+{ -+ uint32_t ctrl_ext; -+ int32_t ret_val; -+ uint16_t eeprom_data; -+ -+ DEBUGFUNC("e1000_setup_link"); -+ -+ /* Read and store word 0x0F of the EEPROM. This word contains bits -+ * that determine the hardware's default PAUSE (flow control) mode, -+ * a bit that determines whether the HW defaults to enabling or -+ * disabling auto-negotiation, and the direction of the -+ * SW defined pins. If there is no SW over-ride of the flow -+ * control setting, then the variable hw->fc will -+ * be initialized based on a value in the EEPROM. -+ */ -+ if(e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data) < 0) { -+ DEBUGOUT("EEPROM Read Error\n"); -+ return -E1000_ERR_EEPROM; -+ } -+ -+ if(hw->fc == e1000_fc_default) { -+ if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == 0) -+ hw->fc = e1000_fc_none; -+ else if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == -+ EEPROM_WORD0F_ASM_DIR) -+ hw->fc = e1000_fc_tx_pause; -+ else -+ hw->fc = e1000_fc_full; -+ } -+ -+ /* We want to save off the original Flow Control configuration just -+ * in case we get disconnected and then reconnected into a different -+ * hub or switch with different Flow Control capabilities. -+ */ -+ if(hw->mac_type == e1000_82542_rev2_0) -+ hw->fc &= (~e1000_fc_tx_pause); -+ -+#if 0 -+ /* See e1000_sw_init() of the Linux driver */ -+ if((hw->mac_type < e1000_82543) && (hw->report_tx_early == 1)) -+#else -+ if((hw->mac_type < e1000_82543) && (hw->mac_type >= e1000_82543)) -+#endif -+ hw->fc &= (~e1000_fc_rx_pause); -+ -+#if 0 -+ hw->original_fc = hw->fc; -+#endif -+ -+ DEBUGOUT1("After fix-ups FlowControl is now = %x\n", hw->fc); -+ -+ /* Take the 4 bits from EEPROM word 0x0F that determine the initial -+ * polarity value for the SW controlled pins, and setup the -+ * Extended Device Control reg with that info. -+ * This is needed because one of the SW controlled pins is used for -+ * signal detection. So this should be done before e1000_setup_pcs_link() -+ * or e1000_phy_setup() is called. -+ */ -+ if(hw->mac_type == e1000_82543) { -+ ctrl_ext = ((eeprom_data & EEPROM_WORD0F_SWPDIO_EXT) << -+ SWDPIO__EXT_SHIFT); -+ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); -+ } -+ -+ /* Call the necessary subroutine to configure the link. */ -+ ret_val = (hw->media_type == e1000_media_type_copper) ? -+ e1000_setup_copper_link(hw) : -+ e1000_setup_fiber_serdes_link(hw); -+ if (ret_val < 0) { -+ return ret_val; -+ } -+ -+ /* Initialize the flow control address, type, and PAUSE timer -+ * registers to their default values. This is done even if flow -+ * control is disabled, because it does not hurt anything to -+ * initialize these registers. -+ */ -+ DEBUGOUT("Initializing the Flow Control address, type and timer regs\n"); -+ -+ E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW); -+ E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH); -+ E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE); -+#if 0 -+ E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time); -+#else -+ E1000_WRITE_REG(hw, FCTTV, FC_DEFAULT_TX_TIMER); -+#endif -+ -+ /* Set the flow control receive threshold registers. Normally, -+ * these registers will be set to a default threshold that may be -+ * adjusted later by the driver's runtime code. However, if the -+ * ability to transmit pause frames in not enabled, then these -+ * registers will be set to 0. -+ */ -+ if(!(hw->fc & e1000_fc_tx_pause)) { -+ E1000_WRITE_REG(hw, FCRTL, 0); -+ E1000_WRITE_REG(hw, FCRTH, 0); -+ } else { -+ /* We need to set up the Receive Threshold high and low water marks -+ * as well as (optionally) enabling the transmission of XON frames. -+ */ -+#if 0 -+ if(hw->fc_send_xon) { -+ E1000_WRITE_REG(hw, FCRTL, (hw->fc_low_water | E1000_FCRTL_XONE)); -+ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); -+ } else { -+ E1000_WRITE_REG(hw, FCRTL, hw->fc_low_water); -+ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); -+ } -+#else -+ E1000_WRITE_REG(hw, FCRTL, (FC_DEFAULT_LO_THRESH | E1000_FCRTL_XONE)); -+ E1000_WRITE_REG(hw, FCRTH, FC_DEFAULT_HI_THRESH); -+#endif -+ } -+ return ret_val; -+} -+ -+/****************************************************************************** -+ * Sets up link for a fiber based or serdes based adapter -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Manipulates Physical Coding Sublayer functions in order to configure -+ * link. Assumes the hardware has been previously reset and the transmitter -+ * and receiver are not enabled. -+ *****************************************************************************/ -+static int -+e1000_setup_fiber_serdes_link(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ uint32_t status; -+ uint32_t txcw = 0; -+ uint32_t i; -+ uint32_t signal = 0; -+ int32_t ret_val; -+ -+ DEBUGFUNC("e1000_setup_fiber_serdes_link"); -+ -+ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be -+ * set when the optics detect a signal. On older adapters, it will be -+ * cleared when there is a signal. This applies to fiber media only. -+ * If we're on serdes media, adjust the output amplitude to value set in -+ * the EEPROM. -+ */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ if(hw->media_type == e1000_media_type_fiber) -+ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; -+ -+ if((ret_val = e1000_adjust_serdes_amplitude(hw))) -+ return ret_val; -+ -+ /* Take the link out of reset */ -+ ctrl &= ~(E1000_CTRL_LRST); -+ -+#if 0 -+ /* Adjust VCO speed to improve BER performance */ -+ if((ret_val = e1000_set_vco_speed(hw))) -+ return ret_val; -+#endif -+ -+ e1000_config_collision_dist(hw); -+ -+ /* Check for a software override of the flow control settings, and setup -+ * the device accordingly. If auto-negotiation is enabled, then software -+ * will have to set the "PAUSE" bits to the correct value in the Tranmsit -+ * Config Word Register (TXCW) and re-start auto-negotiation. However, if -+ * auto-negotiation is disabled, then software will have to manually -+ * configure the two flow control enable bits in the CTRL register. -+ * -+ * The possible values of the "fc" parameter are: -+ * 0: Flow control is completely disabled -+ * 1: Rx flow control is enabled (we can receive pause frames, but -+ * not send pause frames). -+ * 2: Tx flow control is enabled (we can send pause frames but we do -+ * not support receiving pause frames). -+ * 3: Both Rx and TX flow control (symmetric) are enabled. -+ */ -+ switch (hw->fc) { -+ case e1000_fc_none: -+ /* Flow control is completely disabled by a software over-ride. */ -+ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD); -+ break; -+ case e1000_fc_rx_pause: -+ /* RX Flow control is enabled and TX Flow control is disabled by a -+ * software over-ride. Since there really isn't a way to advertise -+ * that we are capable of RX Pause ONLY, we will advertise that we -+ * support both symmetric and asymmetric RX PAUSE. Later, we will -+ * disable the adapter's ability to send PAUSE frames. -+ */ -+ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); -+ break; -+ case e1000_fc_tx_pause: -+ /* TX Flow control is enabled, and RX Flow control is disabled, by a -+ * software over-ride. -+ */ -+ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_ASM_DIR); -+ break; -+ case e1000_fc_full: -+ /* Flow control (both RX and TX) is enabled by a software over-ride. */ -+ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); -+ break; -+ default: -+ DEBUGOUT("Flow control param set incorrectly\n"); -+ return -E1000_ERR_CONFIG; -+ break; -+ } -+ -+ /* Since auto-negotiation is enabled, take the link out of reset (the link -+ * will be in reset, because we previously reset the chip). This will -+ * restart auto-negotiation. If auto-neogtiation is successful then the -+ * link-up status bit will be set and the flow control enable bits (RFCE -+ * and TFCE) will be set according to their negotiated value. -+ */ -+ DEBUGOUT("Auto-negotiation enabled\n"); -+ -+ E1000_WRITE_REG(hw, TXCW, txcw); -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ E1000_WRITE_FLUSH(hw); -+ -+ hw->txcw = txcw; -+ mdelay(1); -+ -+ /* If we have a signal (the cable is plugged in) then poll for a "Link-Up" -+ * indication in the Device Status Register. Time-out if a link isn't -+ * seen in 500 milliseconds seconds (Auto-negotiation should complete in -+ * less than 500 milliseconds even if the other end is doing it in SW). -+ * For internal serdes, we just assume a signal is present, then poll. -+ */ -+ if(hw->media_type == e1000_media_type_internal_serdes || -+ (E1000_READ_REG(hw, CTRL) & E1000_CTRL_SWDPIN1) == signal) { -+ DEBUGOUT("Looking for Link\n"); -+ for(i = 0; i < (LINK_UP_TIMEOUT / 10); i++) { -+ mdelay(10); -+ status = E1000_READ_REG(hw, STATUS); -+ if(status & E1000_STATUS_LU) break; -+ } -+ if(i == (LINK_UP_TIMEOUT / 10)) { -+ DEBUGOUT("Never got a valid link from auto-neg!!!\n"); -+ hw->autoneg_failed = 1; -+ /* AutoNeg failed to achieve a link, so we'll call -+ * e1000_check_for_link. This routine will force the link up if -+ * we detect a signal. This will allow us to communicate with -+ * non-autonegotiating link partners. -+ */ -+ if((ret_val = e1000_check_for_link(hw))) { -+ DEBUGOUT("Error while checking for link\n"); -+ return ret_val; -+ } -+ hw->autoneg_failed = 0; -+ } else { -+ hw->autoneg_failed = 0; -+ DEBUGOUT("Valid Link Found\n"); -+ } -+ } else { -+ DEBUGOUT("No Signal Detected\n"); -+ } -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+* Detects which PHY is present and the speed and duplex -+* -+* hw - Struct containing variables accessed by shared code -+******************************************************************************/ -+static int -+e1000_setup_copper_link(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ int32_t ret_val; -+ uint16_t i; -+ uint16_t phy_data; -+ -+ DEBUGFUNC("e1000_setup_copper_link"); -+ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ /* With 82543, we need to force speed and duplex on the MAC equal to what -+ * the PHY speed and duplex configuration is. In addition, we need to -+ * perform a hardware reset on the PHY to take it out of reset. -+ */ -+ if(hw->mac_type > e1000_82543) { -+ ctrl |= E1000_CTRL_SLU; -+ ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ } else { -+ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX | E1000_CTRL_SLU); -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ e1000_phy_hw_reset(hw); -+ } -+ -+ /* Make sure we have a valid PHY */ -+ if((ret_val = e1000_detect_gig_phy(hw))) { -+ DEBUGOUT("Error, did not detect valid phy.\n"); -+ return ret_val; -+ } -+ DEBUGOUT1("Phy ID = %x \n", hw->phy_id); -+ -+ if(hw->mac_type <= e1000_82543 || -+ hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547 || -+#if 0 -+ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) -+ hw->phy_reset_disable = FALSE; -+ -+ if(!hw->phy_reset_disable) { -+#else -+ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) { -+#endif -+ if (hw->phy_type == e1000_phy_igp) { -+ -+ if((ret_val = e1000_phy_reset(hw))) { -+ DEBUGOUT("Error Resetting the PHY\n"); -+ return ret_val; -+ } -+ -+ /* Wait 10ms for MAC to configure PHY from eeprom settings */ -+ mdelay(15); -+ -+#if 0 -+ /* disable lplu d3 during driver init */ -+ if((ret_val = e1000_set_d3_lplu_state(hw, FALSE))) { -+ DEBUGOUT("Error Disabling LPLU D3\n"); -+ return ret_val; -+ } -+ -+ /* Configure mdi-mdix settings */ -+ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, -+ &phy_data))) -+ return ret_val; -+ -+ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { -+ hw->dsp_config_state = e1000_dsp_config_disabled; -+ /* Force MDI for IGP B-0 PHY */ -+ phy_data &= ~(IGP01E1000_PSCR_AUTO_MDIX | -+ IGP01E1000_PSCR_FORCE_MDI_MDIX); -+ hw->mdix = 1; -+ -+ } else { -+ hw->dsp_config_state = e1000_dsp_config_enabled; -+ phy_data &= ~IGP01E1000_PSCR_AUTO_MDIX; -+ -+ switch (hw->mdix) { -+ case 1: -+ phy_data &= ~IGP01E1000_PSCR_FORCE_MDI_MDIX; -+ break; -+ case 2: -+ phy_data |= IGP01E1000_PSCR_FORCE_MDI_MDIX; -+ break; -+ case 0: -+ default: -+ phy_data |= IGP01E1000_PSCR_AUTO_MDIX; -+ break; -+ } -+ } -+ if((ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, -+ phy_data))) -+ return ret_val; -+ -+ /* set auto-master slave resolution settings */ -+ e1000_ms_type phy_ms_setting = hw->master_slave; -+ -+ if(hw->ffe_config_state == e1000_ffe_config_active) -+ hw->ffe_config_state = e1000_ffe_config_enabled; -+ -+ if(hw->dsp_config_state == e1000_dsp_config_activated) -+ hw->dsp_config_state = e1000_dsp_config_enabled; -+#endif -+ -+ /* when autonegotiation advertisment is only 1000Mbps then we -+ * should disable SmartSpeed and enable Auto MasterSlave -+ * resolution as hardware default. */ -+ if(hw->autoneg_advertised == ADVERTISE_1000_FULL) { -+ /* Disable SmartSpeed */ -+ if((ret_val = e1000_read_phy_reg(hw, -+ IGP01E1000_PHY_PORT_CONFIG, -+ &phy_data))) -+ return ret_val; -+ phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED; -+ if((ret_val = e1000_write_phy_reg(hw, -+ IGP01E1000_PHY_PORT_CONFIG, -+ phy_data))) -+ return ret_val; -+ /* Set auto Master/Slave resolution process */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, -+ &phy_data))) -+ return ret_val; -+ phy_data &= ~CR_1000T_MS_ENABLE; -+ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, -+ phy_data))) -+ return ret_val; -+ } -+ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, -+ &phy_data))) -+ return ret_val; -+ -+#if 0 -+ /* load defaults for future use */ -+ hw->original_master_slave = (phy_data & CR_1000T_MS_ENABLE) ? -+ ((phy_data & CR_1000T_MS_VALUE) ? -+ e1000_ms_force_master : -+ e1000_ms_force_slave) : -+ e1000_ms_auto; -+ -+ switch (phy_ms_setting) { -+ case e1000_ms_force_master: -+ phy_data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE); -+ break; -+ case e1000_ms_force_slave: -+ phy_data |= CR_1000T_MS_ENABLE; -+ phy_data &= ~(CR_1000T_MS_VALUE); -+ break; -+ case e1000_ms_auto: -+ phy_data &= ~CR_1000T_MS_ENABLE; -+ default: -+ break; -+ } -+#endif -+ -+ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, -+ phy_data))) -+ return ret_val; -+ } else { -+ /* Enable CRS on TX. This must be set for half-duplex operation. */ -+ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, -+ &phy_data))) -+ return ret_val; -+ -+ phy_data |= M88E1000_PSCR_ASSERT_CRS_ON_TX; -+ -+ /* Options: -+ * MDI/MDI-X = 0 (default) -+ * 0 - Auto for all speeds -+ * 1 - MDI mode -+ * 2 - MDI-X mode -+ * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) -+ */ -+#if 0 -+ phy_data &= ~M88E1000_PSCR_AUTO_X_MODE; -+ -+ switch (hw->mdix) { -+ case 1: -+ phy_data |= M88E1000_PSCR_MDI_MANUAL_MODE; -+ break; -+ case 2: -+ phy_data |= M88E1000_PSCR_MDIX_MANUAL_MODE; -+ break; -+ case 3: -+ phy_data |= M88E1000_PSCR_AUTO_X_1000T; -+ break; -+ case 0: -+ default: -+#endif -+ phy_data |= M88E1000_PSCR_AUTO_X_MODE; -+#if 0 -+ break; -+ } -+#endif -+ -+ /* Options: -+ * disable_polarity_correction = 0 (default) -+ * Automatic Correction for Reversed Cable Polarity -+ * 0 - Disabled -+ * 1 - Enabled -+ */ -+ phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL; -+ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, -+ phy_data))) -+ return ret_val; -+ -+ /* Force TX_CLK in the Extended PHY Specific Control Register -+ * to 25MHz clock. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, -+ &phy_data))) -+ return ret_val; -+ -+ phy_data |= M88E1000_EPSCR_TX_CLK_25; -+ -+#ifdef LINUX_DRIVER -+ if (hw->phy_revision < M88E1011_I_REV_4) { -+#endif -+ /* Configure Master and Slave downshift values */ -+ phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | -+ M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); -+ phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | -+ M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X); -+ if((ret_val = e1000_write_phy_reg(hw, -+ M88E1000_EXT_PHY_SPEC_CTRL, -+ phy_data))) -+ return ret_val; -+ } -+ -+ /* SW Reset the PHY so all changes take effect */ -+ if((ret_val = e1000_phy_reset(hw))) { -+ DEBUGOUT("Error Resetting the PHY\n"); -+ return ret_val; -+#ifdef LINUX_DRIVER -+ } -+#endif -+ } -+ -+ /* Options: -+ * autoneg = 1 (default) -+ * PHY will advertise value(s) parsed from -+ * autoneg_advertised and fc -+ * autoneg = 0 -+ * PHY will be set to 10H, 10F, 100H, or 100F -+ * depending on value parsed from forced_speed_duplex. -+ */ -+ -+ /* Is autoneg enabled? This is enabled by default or by software -+ * override. If so, call e1000_phy_setup_autoneg routine to parse the -+ * autoneg_advertised and fc options. If autoneg is NOT enabled, then -+ * the user should have provided a speed/duplex override. If so, then -+ * call e1000_phy_force_speed_duplex to parse and set this up. -+ */ -+ /* Perform some bounds checking on the hw->autoneg_advertised -+ * parameter. If this variable is zero, then set it to the default. -+ */ -+ hw->autoneg_advertised &= AUTONEG_ADVERTISE_SPEED_DEFAULT; -+ -+ /* If autoneg_advertised is zero, we assume it was not defaulted -+ * by the calling code so we set to advertise full capability. -+ */ -+ if(hw->autoneg_advertised == 0) -+ hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT; -+ -+ DEBUGOUT("Reconfiguring auto-neg advertisement params\n"); -+ if((ret_val = e1000_phy_setup_autoneg(hw))) { -+ DEBUGOUT("Error Setting up Auto-Negotiation\n"); -+ return ret_val; -+ } -+ DEBUGOUT("Restarting Auto-Neg\n"); -+ -+ /* Restart auto-negotiation by setting the Auto Neg Enable bit and -+ * the Auto Neg Restart bit in the PHY control register. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) -+ return ret_val; -+ -+ phy_data |= (MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG); -+ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) -+ return ret_val; -+ -+#if 0 -+ /* Does the user want to wait for Auto-Neg to complete here, or -+ * check at a later time (for example, callback routine). -+ */ -+ if(hw->wait_autoneg_complete) { -+ if((ret_val = e1000_wait_autoneg(hw))) { -+ DEBUGOUT("Error while waiting for autoneg to complete\n"); -+ return ret_val; -+ } -+ } -+#else -+ /* If we do not wait for autonegotiation to complete I -+ * do not see a valid link status. -+ */ -+ if((ret_val = e1000_wait_autoneg(hw))) { -+ DEBUGOUT("Error while waiting for autoneg to complete\n"); -+ return ret_val; -+ } -+#endif -+ } /* !hw->phy_reset_disable */ -+ -+ /* Check link status. Wait up to 100 microseconds for link to become -+ * valid. -+ */ -+ for(i = 0; i < 10; i++) { -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ -+ if(phy_data & MII_SR_LINK_STATUS) { -+ /* We have link, so we need to finish the config process: -+ * 1) Set up the MAC to the current PHY speed/duplex -+ * if we are on 82543. If we -+ * are on newer silicon, we only need to configure -+ * collision distance in the Transmit Control Register. -+ * 2) Set up flow control on the MAC to that established with -+ * the link partner. -+ */ -+ if(hw->mac_type >= e1000_82544) { -+ e1000_config_collision_dist(hw); -+ } else { -+ if((ret_val = e1000_config_mac_to_phy(hw))) { -+ DEBUGOUT("Error configuring MAC to PHY settings\n"); -+ return ret_val; -+ } -+ } -+ if((ret_val = e1000_config_fc_after_link_up(hw))) { -+ DEBUGOUT("Error Configuring Flow Control\n"); -+ return ret_val; -+ } -+#if 0 -+ if(hw->phy_type == e1000_phy_igp) { -+ if((ret_val = e1000_config_dsp_after_link_change(hw, TRUE))) { -+ DEBUGOUT("Error Configuring DSP after link up\n"); -+ return ret_val; -+ } -+ } -+#endif -+ DEBUGOUT("Valid link established!!!\n"); -+ return E1000_SUCCESS; -+ } -+ udelay(10); -+ } -+ -+ DEBUGOUT("Unable to establish link!!!\n"); -+ return -E1000_ERR_NOLINK; -+} -+ -+/****************************************************************************** -+* Configures PHY autoneg and flow control advertisement settings -+* -+* hw - Struct containing variables accessed by shared code -+******************************************************************************/ -+static int -+e1000_phy_setup_autoneg(struct e1000_hw *hw) -+{ -+ int32_t ret_val; -+ uint16_t mii_autoneg_adv_reg; -+ uint16_t mii_1000t_ctrl_reg; -+ -+ DEBUGFUNC("e1000_phy_setup_autoneg"); -+ -+ /* Read the MII Auto-Neg Advertisement Register (Address 4). */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, -+ &mii_autoneg_adv_reg))) -+ return ret_val; -+ -+ /* Read the MII 1000Base-T Control Register (Address 9). */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg))) -+ return ret_val; -+ -+ /* Need to parse both autoneg_advertised and fc and set up -+ * the appropriate PHY registers. First we will parse for -+ * autoneg_advertised software override. Since we can advertise -+ * a plethora of combinations, we need to check each bit -+ * individually. -+ */ -+ -+ /* First we clear all the 10/100 mb speed bits in the Auto-Neg -+ * Advertisement Register (Address 4) and the 1000 mb speed bits in -+ * the 1000Base-T Control Register (Address 9). -+ */ -+ mii_autoneg_adv_reg &= ~REG4_SPEED_MASK; -+ mii_1000t_ctrl_reg &= ~REG9_SPEED_MASK; -+ -+ DEBUGOUT1("autoneg_advertised %x\n", hw->autoneg_advertised); -+ -+ /* Do we want to advertise 10 Mb Half Duplex? */ -+ if(hw->autoneg_advertised & ADVERTISE_10_HALF) { -+ DEBUGOUT("Advertise 10mb Half duplex\n"); -+ mii_autoneg_adv_reg |= NWAY_AR_10T_HD_CAPS; -+ } -+ -+ /* Do we want to advertise 10 Mb Full Duplex? */ -+ if(hw->autoneg_advertised & ADVERTISE_10_FULL) { -+ DEBUGOUT("Advertise 10mb Full duplex\n"); -+ mii_autoneg_adv_reg |= NWAY_AR_10T_FD_CAPS; -+ } -+ -+ /* Do we want to advertise 100 Mb Half Duplex? */ -+ if(hw->autoneg_advertised & ADVERTISE_100_HALF) { -+ DEBUGOUT("Advertise 100mb Half duplex\n"); -+ mii_autoneg_adv_reg |= NWAY_AR_100TX_HD_CAPS; -+ } -+ -+ /* Do we want to advertise 100 Mb Full Duplex? */ -+ if(hw->autoneg_advertised & ADVERTISE_100_FULL) { -+ DEBUGOUT("Advertise 100mb Full duplex\n"); -+ mii_autoneg_adv_reg |= NWAY_AR_100TX_FD_CAPS; -+ } -+ -+ /* We do not allow the Phy to advertise 1000 Mb Half Duplex */ -+ if(hw->autoneg_advertised & ADVERTISE_1000_HALF) { -+ DEBUGOUT("Advertise 1000mb Half duplex requested, request denied!\n"); -+ } -+ -+ /* Do we want to advertise 1000 Mb Full Duplex? */ -+ if(hw->autoneg_advertised & ADVERTISE_1000_FULL) { -+ DEBUGOUT("Advertise 1000mb Full duplex\n"); -+ mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS; -+ } -+ -+ /* Check for a software override of the flow control settings, and -+ * setup the PHY advertisement registers accordingly. If -+ * auto-negotiation is enabled, then software will have to set the -+ * "PAUSE" bits to the correct value in the Auto-Negotiation -+ * Advertisement Register (PHY_AUTONEG_ADV) and re-start auto-negotiation. -+ * -+ * The possible values of the "fc" parameter are: -+ * 0: Flow control is completely disabled -+ * 1: Rx flow control is enabled (we can receive pause frames -+ * but not send pause frames). -+ * 2: Tx flow control is enabled (we can send pause frames -+ * but we do not support receiving pause frames). -+ * 3: Both Rx and TX flow control (symmetric) are enabled. -+ * other: No software override. The flow control configuration -+ * in the EEPROM is used. -+ */ -+ switch (hw->fc) { -+ case e1000_fc_none: /* 0 */ -+ /* Flow control (RX & TX) is completely disabled by a -+ * software over-ride. -+ */ -+ mii_autoneg_adv_reg &= ~(NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); -+ break; -+ case e1000_fc_rx_pause: /* 1 */ -+ /* RX Flow control is enabled, and TX Flow control is -+ * disabled, by a software over-ride. -+ */ -+ /* Since there really isn't a way to advertise that we are -+ * capable of RX Pause ONLY, we will advertise that we -+ * support both symmetric and asymmetric RX PAUSE. Later -+ * (in e1000_config_fc_after_link_up) we will disable the -+ *hw's ability to send PAUSE frames. -+ */ -+ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); -+ break; -+ case e1000_fc_tx_pause: /* 2 */ -+ /* TX Flow control is enabled, and RX Flow control is -+ * disabled, by a software over-ride. -+ */ -+ mii_autoneg_adv_reg |= NWAY_AR_ASM_DIR; -+ mii_autoneg_adv_reg &= ~NWAY_AR_PAUSE; -+ break; -+ case e1000_fc_full: /* 3 */ -+ /* Flow control (both RX and TX) is enabled by a software -+ * over-ride. -+ */ -+ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); -+ break; -+ default: -+ DEBUGOUT("Flow control param set incorrectly\n"); -+ return -E1000_ERR_CONFIG; -+ } -+ -+ if((ret_val = e1000_write_phy_reg(hw, PHY_AUTONEG_ADV, -+ mii_autoneg_adv_reg))) -+ return ret_val; -+ -+ DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); -+ -+ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg))) -+ return ret_val; -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+* Sets the collision distance in the Transmit Control register -+* -+* hw - Struct containing variables accessed by shared code -+* -+* Link should have been established previously. Reads the speed and duplex -+* information from the Device Status register. -+******************************************************************************/ -+static void -+e1000_config_collision_dist(struct e1000_hw *hw) -+{ -+ uint32_t tctl; -+ -+ tctl = E1000_READ_REG(hw, TCTL); -+ -+ tctl &= ~E1000_TCTL_COLD; -+ tctl |= E1000_COLLISION_DISTANCE << E1000_COLD_SHIFT; -+ -+ E1000_WRITE_REG(hw, TCTL, tctl); -+ E1000_WRITE_FLUSH(hw); -+} -+ -+/****************************************************************************** -+* Sets MAC speed and duplex settings to reflect the those in the PHY -+* -+* hw - Struct containing variables accessed by shared code -+* mii_reg - data to write to the MII control register -+* -+* The contents of the PHY register containing the needed information need to -+* be passed in. -+******************************************************************************/ -+static int -+e1000_config_mac_to_phy(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ int32_t ret_val; -+ uint16_t phy_data; -+ -+ DEBUGFUNC("e1000_config_mac_to_phy"); -+ -+ /* Read the Device Control Register and set the bits to Force Speed -+ * and Duplex. -+ */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); -+ ctrl &= ~(E1000_CTRL_SPD_SEL | E1000_CTRL_ILOS); -+ -+ /* Set up duplex in the Device Control and Transmit Control -+ * registers depending on negotiated values. -+ */ -+ if (hw->phy_type == e1000_phy_igp) { -+ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS, -+ &phy_data))) -+ return ret_val; -+ -+ if(phy_data & IGP01E1000_PSSR_FULL_DUPLEX) ctrl |= E1000_CTRL_FD; -+ else ctrl &= ~E1000_CTRL_FD; -+ -+ e1000_config_collision_dist(hw); -+ -+ /* Set up speed in the Device Control register depending on -+ * negotiated values. -+ */ -+ if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == -+ IGP01E1000_PSSR_SPEED_1000MBPS) -+ ctrl |= E1000_CTRL_SPD_1000; -+ else if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == -+ IGP01E1000_PSSR_SPEED_100MBPS) -+ ctrl |= E1000_CTRL_SPD_100; -+ } else { -+ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, -+ &phy_data))) -+ return ret_val; -+ -+ if(phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; -+ else ctrl &= ~E1000_CTRL_FD; -+ -+ e1000_config_collision_dist(hw); -+ -+ /* Set up speed in the Device Control register depending on -+ * negotiated values. -+ */ -+ if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS) -+ ctrl |= E1000_CTRL_SPD_1000; -+ else if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS) -+ ctrl |= E1000_CTRL_SPD_100; -+ } -+ /* Write the configured values back to the Device Control Reg. */ -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Forces the MAC's flow control settings. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Sets the TFCE and RFCE bits in the device control register to reflect -+ * the adapter settings. TFCE and RFCE need to be explicitly set by -+ * software when a Copper PHY is used because autonegotiation is managed -+ * by the PHY rather than the MAC. Software must also configure these -+ * bits when link is forced on a fiber connection. -+ *****************************************************************************/ -+static int -+e1000_force_mac_fc(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ -+ DEBUGFUNC("e1000_force_mac_fc"); -+ -+ /* Get the current configuration of the Device Control Register */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ -+ /* Because we didn't get link via the internal auto-negotiation -+ * mechanism (we either forced link or we got link via PHY -+ * auto-neg), we have to manually enable/disable transmit an -+ * receive flow control. -+ * -+ * The "Case" statement below enables/disable flow control -+ * according to the "hw->fc" parameter. -+ * -+ * The possible values of the "fc" parameter are: -+ * 0: Flow control is completely disabled -+ * 1: Rx flow control is enabled (we can receive pause -+ * frames but not send pause frames). -+ * 2: Tx flow control is enabled (we can send pause frames -+ * frames but we do not receive pause frames). -+ * 3: Both Rx and TX flow control (symmetric) is enabled. -+ * other: No other values should be possible at this point. -+ */ -+ -+ switch (hw->fc) { -+ case e1000_fc_none: -+ ctrl &= (~(E1000_CTRL_TFCE | E1000_CTRL_RFCE)); -+ break; -+ case e1000_fc_rx_pause: -+ ctrl &= (~E1000_CTRL_TFCE); -+ ctrl |= E1000_CTRL_RFCE; -+ break; -+ case e1000_fc_tx_pause: -+ ctrl &= (~E1000_CTRL_RFCE); -+ ctrl |= E1000_CTRL_TFCE; -+ break; -+ case e1000_fc_full: -+ ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE); -+ break; -+ default: -+ DEBUGOUT("Flow control param set incorrectly\n"); -+ return -E1000_ERR_CONFIG; -+ } -+ -+ /* Disable TX Flow Control for 82542 (rev 2.0) */ -+ if(hw->mac_type == e1000_82542_rev2_0) -+ ctrl &= (~E1000_CTRL_TFCE); -+ -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Configures flow control settings after link is established -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Should be called immediately after a valid link has been established. -+ * Forces MAC flow control settings if link was forced. When in MII/GMII mode -+ * and autonegotiation is enabled, the MAC flow control settings will be set -+ * based on the flow control negotiated by the PHY. In TBI mode, the TFCE -+ * and RFCE bits will be automaticaly set to the negotiated flow control mode. -+ *****************************************************************************/ -+static int -+e1000_config_fc_after_link_up(struct e1000_hw *hw) -+{ -+ int32_t ret_val; -+ uint16_t mii_status_reg; -+ uint16_t mii_nway_adv_reg; -+ uint16_t mii_nway_lp_ability_reg; -+ uint16_t speed; -+ uint16_t duplex; -+ -+ DEBUGFUNC("e1000_config_fc_after_link_up"); -+ -+ /* Check for the case where we have fiber media and auto-neg failed -+ * so we had to force link. In this case, we need to force the -+ * configuration of the MAC to match the "fc" parameter. -+ */ -+ if(((hw->media_type == e1000_media_type_fiber) && (hw->autoneg_failed)) || -+ ((hw->media_type == e1000_media_type_internal_serdes) && (hw->autoneg_failed))) { -+ if((ret_val = e1000_force_mac_fc(hw))) { -+ DEBUGOUT("Error forcing flow control settings\n"); -+ return ret_val; -+ } -+ } -+ -+ /* Check for the case where we have copper media and auto-neg is -+ * enabled. In this case, we need to check and see if Auto-Neg -+ * has completed, and if so, how the PHY and link partner has -+ * flow control configured. -+ */ -+ if(hw->media_type == e1000_media_type_copper) { -+ /* Read the MII Status Register and check to see if AutoNeg -+ * has completed. We read this twice because this reg has -+ * some "sticky" (latched) bits. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) -+ return ret_val; -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) -+ return ret_val; -+ -+ if(mii_status_reg & MII_SR_AUTONEG_COMPLETE) { -+ /* The AutoNeg process has completed, so we now need to -+ * read both the Auto Negotiation Advertisement Register -+ * (Address 4) and the Auto_Negotiation Base Page Ability -+ * Register (Address 5) to determine how flow control was -+ * negotiated. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, -+ &mii_nway_adv_reg))) -+ return ret_val; -+ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, -+ &mii_nway_lp_ability_reg))) -+ return ret_val; -+ -+ /* Two bits in the Auto Negotiation Advertisement Register -+ * (Address 4) and two bits in the Auto Negotiation Base -+ * Page Ability Register (Address 5) determine flow control -+ * for both the PHY and the link partner. The following -+ * table, taken out of the IEEE 802.3ab/D6.0 dated March 25, -+ * 1999, describes these PAUSE resolution bits and how flow -+ * control is determined based upon these settings. -+ * NOTE: DC = Don't Care -+ * -+ * LOCAL DEVICE | LINK PARTNER -+ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | NIC Resolution -+ *-------|---------|-------|---------|-------------------- -+ * 0 | 0 | DC | DC | e1000_fc_none -+ * 0 | 1 | 0 | DC | e1000_fc_none -+ * 0 | 1 | 1 | 0 | e1000_fc_none -+ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause -+ * 1 | 0 | 0 | DC | e1000_fc_none -+ * 1 | DC | 1 | DC | e1000_fc_full -+ * 1 | 1 | 0 | 0 | e1000_fc_none -+ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause -+ * -+ */ -+ /* Are both PAUSE bits set to 1? If so, this implies -+ * Symmetric Flow Control is enabled at both ends. The -+ * ASM_DIR bits are irrelevant per the spec. -+ * -+ * For Symmetric Flow Control: -+ * -+ * LOCAL DEVICE | LINK PARTNER -+ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result -+ *-------|---------|-------|---------|-------------------- -+ * 1 | DC | 1 | DC | e1000_fc_full -+ * -+ */ -+ if((mii_nway_adv_reg & NWAY_AR_PAUSE) && -+ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE)) { -+ /* Now we need to check if the user selected RX ONLY -+ * of pause frames. In this case, we had to advertise -+ * FULL flow control because we could not advertise RX -+ * ONLY. Hence, we must now check to see if we need to -+ * turn OFF the TRANSMISSION of PAUSE frames. -+ */ -+#if 0 -+ if(hw->original_fc == e1000_fc_full) { -+ hw->fc = e1000_fc_full; -+#else -+ if(hw->fc == e1000_fc_full) { -+#endif -+ DEBUGOUT("Flow Control = FULL.\r\n"); -+ } else { -+ hw->fc = e1000_fc_rx_pause; -+ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); -+ } -+ } -+ /* For receiving PAUSE frames ONLY. -+ * -+ * LOCAL DEVICE | LINK PARTNER -+ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result -+ *-------|---------|-------|---------|-------------------- -+ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause -+ * -+ */ -+ else if(!(mii_nway_adv_reg & NWAY_AR_PAUSE) && -+ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && -+ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && -+ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { -+ hw->fc = e1000_fc_tx_pause; -+ DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n"); -+ } -+ /* For transmitting PAUSE frames ONLY. -+ * -+ * LOCAL DEVICE | LINK PARTNER -+ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result -+ *-------|---------|-------|---------|-------------------- -+ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause -+ * -+ */ -+ else if((mii_nway_adv_reg & NWAY_AR_PAUSE) && -+ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && -+ !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && -+ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { -+ hw->fc = e1000_fc_rx_pause; -+ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); -+ } -+ /* Per the IEEE spec, at this point flow control should be -+ * disabled. However, we want to consider that we could -+ * be connected to a legacy switch that doesn't advertise -+ * desired flow control, but can be forced on the link -+ * partner. So if we advertised no flow control, that is -+ * what we will resolve to. If we advertised some kind of -+ * receive capability (Rx Pause Only or Full Flow Control) -+ * and the link partner advertised none, we will configure -+ * ourselves to enable Rx Flow Control only. We can do -+ * this safely for two reasons: If the link partner really -+ * didn't want flow control enabled, and we enable Rx, no -+ * harm done since we won't be receiving any PAUSE frames -+ * anyway. If the intent on the link partner was to have -+ * flow control enabled, then by us enabling RX only, we -+ * can at least receive pause frames and process them. -+ * This is a good idea because in most cases, since we are -+ * predominantly a server NIC, more times than not we will -+ * be asked to delay transmission of packets than asking -+ * our link partner to pause transmission of frames. -+ */ -+#if 0 -+ else if(hw->original_fc == e1000_fc_none || -+ hw->original_fc == e1000_fc_tx_pause) { -+#else -+ else if(hw->fc == e1000_fc_none) -+ DEBUGOUT("Flow Control = NONE.\r\n"); -+ else if(hw->fc == e1000_fc_tx_pause) { -+#endif -+ hw->fc = e1000_fc_none; -+ DEBUGOUT("Flow Control = NONE.\r\n"); -+ } else { -+ hw->fc = e1000_fc_rx_pause; -+ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); -+ } -+ -+ /* Now we need to do one last check... If we auto- -+ * negotiated to HALF DUPLEX, flow control should not be -+ * enabled per IEEE 802.3 spec. -+ */ -+ e1000_get_speed_and_duplex(hw, &speed, &duplex); -+ -+ if(duplex == HALF_DUPLEX) -+ hw->fc = e1000_fc_none; -+ -+ /* Now we call a subroutine to actually force the MAC -+ * controller to use the correct flow control settings. -+ */ -+ if((ret_val = e1000_force_mac_fc(hw))) { -+ DEBUGOUT("Error forcing flow control settings\n"); -+ return ret_val; -+ } -+ } else { -+ DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n"); -+ } -+ } -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Checks to see if the link status of the hardware has changed. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * -+ * Called by any function that needs to check the link status of the adapter. -+ *****************************************************************************/ -+static int -+e1000_check_for_link(struct e1000_hw *hw) -+{ -+ uint32_t rxcw; -+ uint32_t ctrl; -+ uint32_t status; -+ uint32_t rctl; -+ uint32_t signal = 0; -+ int32_t ret_val; -+ uint16_t phy_data; -+ uint16_t lp_capability; -+ -+ DEBUGFUNC("e1000_check_for_link"); -+ -+ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be -+ * set when the optics detect a signal. On older adapters, it will be -+ * cleared when there is a signal. This applies to fiber media only. -+ */ -+ if(hw->media_type == e1000_media_type_fiber) -+ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; -+ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ status = E1000_READ_REG(hw, STATUS); -+ rxcw = E1000_READ_REG(hw, RXCW); -+ -+ /* If we have a copper PHY then we only want to go out to the PHY -+ * registers to see if Auto-Neg has completed and/or if our link -+ * status has changed. The get_link_status flag will be set if we -+ * receive a Link Status Change interrupt or we have Rx Sequence -+ * Errors. -+ */ -+#if 0 -+ if((hw->media_type == e1000_media_type_copper) && hw->get_link_status) { -+#else -+ if(hw->media_type == e1000_media_type_copper) { -+#endif -+ /* First we want to see if the MII Status Register reports -+ * link. If so, then we want to get the current speed/duplex -+ * of the PHY. -+ * Read the register twice since the link bit is sticky. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ -+ if(phy_data & MII_SR_LINK_STATUS) { -+#if 0 -+ hw->get_link_status = FALSE; -+#endif -+ } else { -+ /* No link detected */ -+ return -E1000_ERR_NOLINK; -+ } -+ -+ /* We have a M88E1000 PHY and Auto-Neg is enabled. If we -+ * have Si on board that is 82544 or newer, Auto -+ * Speed Detection takes care of MAC speed/duplex -+ * configuration. So we only need to configure Collision -+ * Distance in the MAC. Otherwise, we need to force -+ * speed/duplex on the MAC to the current PHY speed/duplex -+ * settings. -+ */ -+ if(hw->mac_type >= e1000_82544) -+ e1000_config_collision_dist(hw); -+ else { -+ if((ret_val = e1000_config_mac_to_phy(hw))) { -+ DEBUGOUT("Error configuring MAC to PHY settings\n"); -+ return ret_val; -+ } -+ } -+ -+ /* Configure Flow Control now that Auto-Neg has completed. First, we -+ * need to restore the desired flow control settings because we may -+ * have had to re-autoneg with a different link partner. -+ */ -+ if((ret_val = e1000_config_fc_after_link_up(hw))) { -+ DEBUGOUT("Error configuring flow control\n"); -+ return ret_val; -+ } -+ -+ /* At this point we know that we are on copper and we have -+ * auto-negotiated link. These are conditions for checking the link -+ * parter capability register. We use the link partner capability to -+ * determine if TBI Compatibility needs to be turned on or off. If -+ * the link partner advertises any speed in addition to Gigabit, then -+ * we assume that they are GMII-based, and TBI compatibility is not -+ * needed. If no other speeds are advertised, we assume the link -+ * partner is TBI-based, and we turn on TBI Compatibility. -+ */ -+ if(hw->tbi_compatibility_en) { -+ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, -+ &lp_capability))) -+ return ret_val; -+ if(lp_capability & (NWAY_LPAR_10T_HD_CAPS | -+ NWAY_LPAR_10T_FD_CAPS | -+ NWAY_LPAR_100TX_HD_CAPS | -+ NWAY_LPAR_100TX_FD_CAPS | -+ NWAY_LPAR_100T4_CAPS)) { -+ /* If our link partner advertises anything in addition to -+ * gigabit, we do not need to enable TBI compatibility. -+ */ -+ if(hw->tbi_compatibility_on) { -+ /* If we previously were in the mode, turn it off. */ -+ rctl = E1000_READ_REG(hw, RCTL); -+ rctl &= ~E1000_RCTL_SBP; -+ E1000_WRITE_REG(hw, RCTL, rctl); -+ hw->tbi_compatibility_on = FALSE; -+ } -+ } else { -+ /* If TBI compatibility is was previously off, turn it on. For -+ * compatibility with a TBI link partner, we will store bad -+ * packets. Some frames have an additional byte on the end and -+ * will look like CRC errors to to the hardware. -+ */ -+ if(!hw->tbi_compatibility_on) { -+ hw->tbi_compatibility_on = TRUE; -+ rctl = E1000_READ_REG(hw, RCTL); -+ rctl |= E1000_RCTL_SBP; -+ E1000_WRITE_REG(hw, RCTL, rctl); -+ } -+ } -+ } -+ } -+ /* If we don't have link (auto-negotiation failed or link partner cannot -+ * auto-negotiate), the cable is plugged in (we have signal), and our -+ * link partner is not trying to auto-negotiate with us (we are receiving -+ * idles or data), we need to force link up. We also need to give -+ * auto-negotiation time to complete, in case the cable was just plugged -+ * in. The autoneg_failed flag does this. -+ */ -+ else if((((hw->media_type == e1000_media_type_fiber) && -+ ((ctrl & E1000_CTRL_SWDPIN1) == signal)) || -+ (hw->media_type == e1000_media_type_internal_serdes)) && -+ (!(status & E1000_STATUS_LU)) && -+ (!(rxcw & E1000_RXCW_C))) { -+ if(hw->autoneg_failed == 0) { -+ hw->autoneg_failed = 1; -+ return 0; -+ } -+ DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n"); -+ -+ /* Disable auto-negotiation in the TXCW register */ -+ E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); -+ -+ /* Force link-up and also force full-duplex. */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD); -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ -+ /* Configure Flow Control after forcing link up. */ -+ if((ret_val = e1000_config_fc_after_link_up(hw))) { -+ DEBUGOUT("Error configuring flow control\n"); -+ return ret_val; -+ } -+ } -+ /* If we are forcing link and we are receiving /C/ ordered sets, re-enable -+ * auto-negotiation in the TXCW register and disable forced link in the -+ * Device Control register in an attempt to auto-negotiate with our link -+ * partner. -+ */ -+ else if(((hw->media_type == e1000_media_type_fiber) || -+ (hw->media_type == e1000_media_type_internal_serdes)) && -+ (ctrl & E1000_CTRL_SLU) && -+ (rxcw & E1000_RXCW_C)) { -+ DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n"); -+ E1000_WRITE_REG(hw, TXCW, hw->txcw); -+ E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); -+ } -+#if 0 -+ /* If we force link for non-auto-negotiation switch, check link status -+ * based on MAC synchronization for internal serdes media type. -+ */ -+ else if((hw->media_type == e1000_media_type_internal_serdes) && -+ !(E1000_TXCW_ANE & E1000_READ_REG(hw, TXCW))) { -+ /* SYNCH bit and IV bit are sticky. */ -+ udelay(10); -+ if(E1000_RXCW_SYNCH & E1000_READ_REG(hw, RXCW)) { -+ if(!(rxcw & E1000_RXCW_IV)) { -+ hw->serdes_link_down = FALSE; -+ DEBUGOUT("SERDES: Link is up.\n"); -+ } -+ } else { -+ hw->serdes_link_down = TRUE; -+ DEBUGOUT("SERDES: Link is down.\n"); -+ } -+ } -+#endif -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+ * Detects the current speed and duplex settings of the hardware. -+ * -+ * hw - Struct containing variables accessed by shared code -+ * speed - Speed of the connection -+ * duplex - Duplex setting of the connection -+ *****************************************************************************/ -+static void -+e1000_get_speed_and_duplex(struct e1000_hw *hw, -+ uint16_t *speed, -+ uint16_t *duplex) -+{ -+ uint32_t status; -+ -+ DEBUGFUNC("e1000_get_speed_and_duplex"); -+ -+ if(hw->mac_type >= e1000_82543) { -+ status = E1000_READ_REG(hw, STATUS); -+ if(status & E1000_STATUS_SPEED_1000) { -+ *speed = SPEED_1000; -+ DEBUGOUT("1000 Mbs, "); -+ } else if(status & E1000_STATUS_SPEED_100) { -+ *speed = SPEED_100; -+ DEBUGOUT("100 Mbs, "); -+ } else { -+ *speed = SPEED_10; -+ DEBUGOUT("10 Mbs, "); -+ } -+ -+ if(status & E1000_STATUS_FD) { -+ *duplex = FULL_DUPLEX; -+ DEBUGOUT("Full Duplex\r\n"); -+ } else { -+ *duplex = HALF_DUPLEX; -+ DEBUGOUT(" Half Duplex\r\n"); -+ } -+ } else { -+ DEBUGOUT("1000 Mbs, Full Duplex\r\n"); -+ *speed = SPEED_1000; -+ *duplex = FULL_DUPLEX; -+ } -+} -+ -+/****************************************************************************** -+* Blocks until autoneg completes or times out (~4.5 seconds) -+* -+* hw - Struct containing variables accessed by shared code -+******************************************************************************/ -+static int -+e1000_wait_autoneg(struct e1000_hw *hw) -+{ -+ int32_t ret_val; -+ uint16_t i; -+ uint16_t phy_data; -+ -+ DEBUGFUNC("e1000_wait_autoneg"); -+ DEBUGOUT("Waiting for Auto-Neg to complete.\n"); -+ -+ /* We will wait for autoneg to complete or 4.5 seconds to expire. */ -+ for(i = PHY_AUTO_NEG_TIME; i > 0; i--) { -+ /* Read the MII Status Register and wait for Auto-Neg -+ * Complete bit to be set. -+ */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) -+ return ret_val; -+ if(phy_data & MII_SR_AUTONEG_COMPLETE) { -+ DEBUGOUT("Auto-Neg complete.\n"); -+ return E1000_SUCCESS; -+ } -+ mdelay(100); -+ } -+ DEBUGOUT("Auto-Neg timedout.\n"); -+ return -E1000_ERR_TIMEOUT; -+} -+ -+/****************************************************************************** -+* Raises the Management Data Clock -+* -+* hw - Struct containing variables accessed by shared code -+* ctrl - Device control register's current value -+******************************************************************************/ -+static void -+e1000_raise_mdi_clk(struct e1000_hw *hw, -+ uint32_t *ctrl) -+{ -+ /* Raise the clock input to the Management Data Clock (by setting the MDC -+ * bit), and then delay 10 microseconds. -+ */ -+ E1000_WRITE_REG(hw, CTRL, (*ctrl | E1000_CTRL_MDC)); -+ E1000_WRITE_FLUSH(hw); -+ udelay(10); -+} -+ -+/****************************************************************************** -+* Lowers the Management Data Clock -+* -+* hw - Struct containing variables accessed by shared code -+* ctrl - Device control register's current value -+******************************************************************************/ -+static void -+e1000_lower_mdi_clk(struct e1000_hw *hw, -+ uint32_t *ctrl) -+{ -+ /* Lower the clock input to the Management Data Clock (by clearing the MDC -+ * bit), and then delay 10 microseconds. -+ */ -+ E1000_WRITE_REG(hw, CTRL, (*ctrl & ~E1000_CTRL_MDC)); -+ E1000_WRITE_FLUSH(hw); -+ udelay(10); -+} -+ -+/****************************************************************************** -+* Shifts data bits out to the PHY -+* -+* hw - Struct containing variables accessed by shared code -+* data - Data to send out to the PHY -+* count - Number of bits to shift out -+* -+* Bits are shifted out in MSB to LSB order. -+******************************************************************************/ -+static void -+e1000_shift_out_mdi_bits(struct e1000_hw *hw, -+ uint32_t data, -+ uint16_t count) -+{ -+ uint32_t ctrl; -+ uint32_t mask; -+ -+ /* We need to shift "count" number of bits out to the PHY. So, the value -+ * in the "data" parameter will be shifted out to the PHY one bit at a -+ * time. In order to do this, "data" must be broken down into bits. -+ */ -+ mask = 0x01; -+ mask <<= (count - 1); -+ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ -+ /* Set MDIO_DIR and MDC_DIR direction bits to be used as output pins. */ -+ ctrl |= (E1000_CTRL_MDIO_DIR | E1000_CTRL_MDC_DIR); -+ -+ while(mask) { -+ /* A "1" is shifted out to the PHY by setting the MDIO bit to "1" and -+ * then raising and lowering the Management Data Clock. A "0" is -+ * shifted out to the PHY by setting the MDIO bit to "0" and then -+ * raising and lowering the clock. -+ */ -+ if(data & mask) ctrl |= E1000_CTRL_MDIO; -+ else ctrl &= ~E1000_CTRL_MDIO; -+ -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ E1000_WRITE_FLUSH(hw); -+ -+ udelay(10); -+ -+ e1000_raise_mdi_clk(hw, &ctrl); -+ e1000_lower_mdi_clk(hw, &ctrl); -+ -+ mask = mask >> 1; -+ } -+} -+ -+/****************************************************************************** -+* Shifts data bits in from the PHY -+* -+* hw - Struct containing variables accessed by shared code -+* -+* Bits are shifted in in MSB to LSB order. -+******************************************************************************/ -+static uint16_t -+e1000_shift_in_mdi_bits(struct e1000_hw *hw) -+{ -+ uint32_t ctrl; -+ uint16_t data = 0; -+ uint8_t i; -+ -+ /* In order to read a register from the PHY, we need to shift in a total -+ * of 18 bits from the PHY. The first two bit (turnaround) times are used -+ * to avoid contention on the MDIO pin when a read operation is performed. -+ * These two bits are ignored by us and thrown away. Bits are "shifted in" -+ * by raising the input to the Management Data Clock (setting the MDC bit), -+ * and then reading the value of the MDIO bit. -+ */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ -+ /* Clear MDIO_DIR (SWDPIO1) to indicate this bit is to be used as input. */ -+ ctrl &= ~E1000_CTRL_MDIO_DIR; -+ ctrl &= ~E1000_CTRL_MDIO; -+ -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ E1000_WRITE_FLUSH(hw); -+ -+ /* Raise and Lower the clock before reading in the data. This accounts for -+ * the turnaround bits. The first clock occurred when we clocked out the -+ * last bit of the Register Address. -+ */ -+ e1000_raise_mdi_clk(hw, &ctrl); -+ e1000_lower_mdi_clk(hw, &ctrl); -+ -+ for(data = 0, i = 0; i < 16; i++) { -+ data = data << 1; -+ e1000_raise_mdi_clk(hw, &ctrl); -+ ctrl = E1000_READ_REG(hw, CTRL); -+ /* Check to see if we shifted in a "1". */ -+ if(ctrl & E1000_CTRL_MDIO) data |= 1; -+ e1000_lower_mdi_clk(hw, &ctrl); -+ } -+ -+ e1000_raise_mdi_clk(hw, &ctrl); -+ e1000_lower_mdi_clk(hw, &ctrl); -+ -+ return data; -+} -+ -+/***************************************************************************** -+* Reads the value from a PHY register, if the value is on a specific non zero -+* page, sets the page first. -+* -+* hw - Struct containing variables accessed by shared code -+* reg_addr - address of the PHY register to read -+******************************************************************************/ -+static int -+e1000_read_phy_reg(struct e1000_hw *hw, -+ uint32_t reg_addr, -+ uint16_t *phy_data) -+{ -+ uint32_t ret_val; -+ -+ DEBUGFUNC("e1000_read_phy_reg"); -+ -+ if(hw->phy_type == e1000_phy_igp && -+ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { -+ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, -+ (uint16_t)reg_addr))) -+ return ret_val; -+ } -+ -+ ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, -+ phy_data); -+ -+ return ret_val; -+} -+ -+static int -+e1000_read_phy_reg_ex(struct e1000_hw *hw, -+ uint32_t reg_addr, -+ uint16_t *phy_data) -+{ -+ uint32_t i; -+ uint32_t mdic = 0; -+ const uint32_t phy_addr = 1; -+ -+ DEBUGFUNC("e1000_read_phy_reg_ex"); -+ -+ if(reg_addr > MAX_PHY_REG_ADDRESS) { -+ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); -+ return -E1000_ERR_PARAM; -+ } -+ -+ if(hw->mac_type > e1000_82543) { -+ /* Set up Op-code, Phy Address, and register address in the MDI -+ * Control register. The MAC will take care of interfacing with the -+ * PHY to retrieve the desired data. -+ */ -+ mdic = ((reg_addr << E1000_MDIC_REG_SHIFT) | -+ (phy_addr << E1000_MDIC_PHY_SHIFT) | -+ (E1000_MDIC_OP_READ)); -+ -+ E1000_WRITE_REG(hw, MDIC, mdic); -+ -+ /* Poll the ready bit to see if the MDI read completed */ -+ for(i = 0; i < 64; i++) { -+ udelay(50); -+ mdic = E1000_READ_REG(hw, MDIC); -+ if(mdic & E1000_MDIC_READY) break; -+ } -+ if(!(mdic & E1000_MDIC_READY)) { -+ DEBUGOUT("MDI Read did not complete\n"); -+ return -E1000_ERR_PHY; -+ } -+ if(mdic & E1000_MDIC_ERROR) { -+ DEBUGOUT("MDI Error\n"); -+ return -E1000_ERR_PHY; -+ } -+ *phy_data = (uint16_t) mdic; -+ } else { -+ /* We must first send a preamble through the MDIO pin to signal the -+ * beginning of an MII instruction. This is done by sending 32 -+ * consecutive "1" bits. -+ */ -+ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); -+ -+ /* Now combine the next few fields that are required for a read -+ * operation. We use this method instead of calling the -+ * e1000_shift_out_mdi_bits routine five different times. The format of -+ * a MII read instruction consists of a shift out of 14 bits and is -+ * defined as follows: -+ * -+ * followed by a shift in of 18 bits. This first two bits shifted in -+ * are TurnAround bits used to avoid contention on the MDIO pin when a -+ * READ operation is performed. These two bits are thrown away -+ * followed by a shift in of 16 bits which contains the desired data. -+ */ -+ mdic = ((reg_addr) | (phy_addr << 5) | -+ (PHY_OP_READ << 10) | (PHY_SOF << 12)); -+ -+ e1000_shift_out_mdi_bits(hw, mdic, 14); -+ -+ /* Now that we've shifted out the read command to the MII, we need to -+ * "shift in" the 16-bit value (18 total bits) of the requested PHY -+ * register address. -+ */ -+ *phy_data = e1000_shift_in_mdi_bits(hw); -+ } -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+* Writes a value to a PHY register -+* -+* hw - Struct containing variables accessed by shared code -+* reg_addr - address of the PHY register to write -+* data - data to write to the PHY -+******************************************************************************/ -+static int -+e1000_write_phy_reg(struct e1000_hw *hw, -+ uint32_t reg_addr, -+ uint16_t phy_data) -+{ -+ uint32_t ret_val; -+ -+ DEBUGFUNC("e1000_write_phy_reg"); -+ -+ if(hw->phy_type == e1000_phy_igp && -+ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { -+ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, -+ (uint16_t)reg_addr))) -+ return ret_val; -+ } -+ -+ ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, -+ phy_data); -+ -+ return ret_val; -+} -+ -+static int -+e1000_write_phy_reg_ex(struct e1000_hw *hw, -+ uint32_t reg_addr, -+ uint16_t phy_data) -+{ -+ uint32_t i; -+ uint32_t mdic = 0; -+ const uint32_t phy_addr = 1; -+ -+ DEBUGFUNC("e1000_write_phy_reg_ex"); -+ -+ if(reg_addr > MAX_PHY_REG_ADDRESS) { -+ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); -+ return -E1000_ERR_PARAM; -+ } -+ -+ if(hw->mac_type > e1000_82543) { -+ /* Set up Op-code, Phy Address, register address, and data intended -+ * for the PHY register in the MDI Control register. The MAC will take -+ * care of interfacing with the PHY to send the desired data. -+ */ -+ mdic = (((uint32_t) phy_data) | -+ (reg_addr << E1000_MDIC_REG_SHIFT) | -+ (phy_addr << E1000_MDIC_PHY_SHIFT) | -+ (E1000_MDIC_OP_WRITE)); -+ -+ E1000_WRITE_REG(hw, MDIC, mdic); -+ -+ /* Poll the ready bit to see if the MDI read completed */ -+ for(i = 0; i < 640; i++) { -+ udelay(5); -+ mdic = E1000_READ_REG(hw, MDIC); -+ if(mdic & E1000_MDIC_READY) break; -+ } -+ if(!(mdic & E1000_MDIC_READY)) { -+ DEBUGOUT("MDI Write did not complete\n"); -+ return -E1000_ERR_PHY; -+ } -+ } else { -+ /* We'll need to use the SW defined pins to shift the write command -+ * out to the PHY. We first send a preamble to the PHY to signal the -+ * beginning of the MII instruction. This is done by sending 32 -+ * consecutive "1" bits. -+ */ -+ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); -+ -+ /* Now combine the remaining required fields that will indicate a -+ * write operation. We use this method instead of calling the -+ * e1000_shift_out_mdi_bits routine for each field in the command. The -+ * format of a MII write instruction is as follows: -+ * . -+ */ -+ mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) | -+ (PHY_OP_WRITE << 12) | (PHY_SOF << 14)); -+ mdic <<= 16; -+ mdic |= (uint32_t) phy_data; -+ -+ e1000_shift_out_mdi_bits(hw, mdic, 32); -+ } -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+* Returns the PHY to the power-on reset state -+* -+* hw - Struct containing variables accessed by shared code -+******************************************************************************/ -+static void -+e1000_phy_hw_reset(struct e1000_hw *hw) -+{ -+ uint32_t ctrl, ctrl_ext; -+ -+ DEBUGFUNC("e1000_phy_hw_reset"); -+ -+ DEBUGOUT("Resetting Phy...\n"); -+ -+ if(hw->mac_type > e1000_82543) { -+ /* Read the device control register and assert the E1000_CTRL_PHY_RST -+ * bit. Then, take it out of reset. -+ */ -+ ctrl = E1000_READ_REG(hw, CTRL); -+ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); -+ E1000_WRITE_FLUSH(hw); -+ mdelay(10); -+ E1000_WRITE_REG(hw, CTRL, ctrl); -+ E1000_WRITE_FLUSH(hw); -+ } else { -+ /* Read the Extended Device Control Register, assert the PHY_RESET_DIR -+ * bit to put the PHY into reset. Then, take it out of reset. -+ */ -+ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); -+ ctrl_ext |= E1000_CTRL_EXT_SDP4_DIR; -+ ctrl_ext &= ~E1000_CTRL_EXT_SDP4_DATA; -+ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); -+ E1000_WRITE_FLUSH(hw); -+ mdelay(10); -+ ctrl_ext |= E1000_CTRL_EXT_SDP4_DATA; -+ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); -+ E1000_WRITE_FLUSH(hw); -+ } -+ udelay(150); -+} -+ -+/****************************************************************************** -+* Resets the PHY -+* -+* hw - Struct containing variables accessed by shared code -+* -+* Sets bit 15 of the MII Control regiser -+******************************************************************************/ -+static int -+e1000_phy_reset(struct e1000_hw *hw) -+{ -+ int32_t ret_val; -+ uint16_t phy_data; -+ -+ DEBUGFUNC("e1000_phy_reset"); -+ -+ if(hw->mac_type != e1000_82541_rev_2) { -+ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) -+ return ret_val; -+ -+ phy_data |= MII_CR_RESET; -+ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) -+ return ret_val; -+ -+ udelay(1); -+ } else e1000_phy_hw_reset(hw); -+ -+ if(hw->phy_type == e1000_phy_igp) -+ e1000_phy_init_script(hw); -+ -+ return E1000_SUCCESS; -+} -+ -+/****************************************************************************** -+* Probes the expected PHY address for known PHY IDs -+* -+* hw - Struct containing variables accessed by shared code -+******************************************************************************/ -+static int -+e1000_detect_gig_phy(struct e1000_hw *hw) -+{ -+ int32_t phy_init_status, ret_val; -+ uint16_t phy_id_high, phy_id_low; -+ boolean_t match = FALSE; -+ -+ DEBUGFUNC("e1000_detect_gig_phy"); -+ -+ /* Read the PHY ID Registers to identify which PHY is onboard. */ -+ if((ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high))) -+ return ret_val; -+ -+ hw->phy_id = (uint32_t) (phy_id_high << 16); -+ udelay(20); -+ if((ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low))) -+ return ret_val; -+ -+ hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK); -+#ifdef LINUX_DRIVER -+ hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK; -+#endif -+ -+ switch(hw->mac_type) { -+ case e1000_82543: -+ if(hw->phy_id == M88E1000_E_PHY_ID) match = TRUE; -+ break; -+ case e1000_82544: -+ if(hw->phy_id == M88E1000_I_PHY_ID) match = TRUE; -+ break; -+ case e1000_82540: -+ case e1000_82545: -+ case e1000_82545_rev_3: -+ case e1000_82546: -+ case e1000_82546_rev_3: -+ if(hw->phy_id == M88E1011_I_PHY_ID) match = TRUE; -+ break; -+ case e1000_82541: -+ case e1000_82541_rev_2: -+ case e1000_82547: -+ case e1000_82547_rev_2: -+ if(hw->phy_id == IGP01E1000_I_PHY_ID) match = TRUE; -+ break; -+ default: -+ DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); -+ return -E1000_ERR_CONFIG; -+ } -+ phy_init_status = e1000_set_phy_type(hw); -+ -+ if ((match) && (phy_init_status == E1000_SUCCESS)) { -+ DEBUGOUT1("PHY ID 0x%X detected\n", hw->phy_id); -+ return E1000_SUCCESS; -+ } -+ DEBUGOUT1("Invalid PHY ID 0x%X\n", hw->phy_id); -+ return -E1000_ERR_PHY; -+} -+ -+/****************************************************************************** -+ * Sets up eeprom variables in the hw struct. Must be called after mac_type -+ * is configured. -+ * -+ * hw - Struct containing variables accessed by shared code -+ *****************************************************************************/ -+static void -+e1000_init_eeprom_params(struct e1000_hw *hw) -+{ -+ struct e1000_eeprom_info *eeprom = &hw->eeprom; -+ uint32_t eecd = E1000_READ_REG(hw, EECD); -+ uint16_t eeprom_size; -+ -+ DEBUGFUNC("e1000_init_eeprom_params"); -+ -+ switch (hw->mac_type) { -+ case e1000_82542_rev2_0: -+ case e1000_82542_rev2_1: -+ case e1000_82543: -+ case e1000_82544: -+ eeprom->type = e1000_eeprom_microwire; -+ eeprom->word_size = 64; -+ eeprom->opcode_bits = 3; -+ eeprom->address_bits = 6; -+ eeprom->delay_usec = 50; -+ break; -+ case e1000_82540: -+ case e1000_82545: -+ case e1000_82545_rev_3: -+ case e1000_82546: -+ case e1000_82546_rev_3: -+ eeprom->type = e1000_eeprom_microwire; -+ eeprom->opcode_bits = 3; -+ eeprom->delay_usec = 50; -+ if(eecd & E1000_EECD_SIZE) { -+ eeprom->word_size = 256; -+ eeprom->address_bits = 8; -+ } else { -+ eeprom->word_size = 64; -+ eeprom->address_bits = 6; -+ } -+ break; -+ case e1000_82541: -+ case e1000_82541_rev_2: -+ case e1000_82547: -+ case e1000_82547_rev_2: -+ if (eecd & E1000_EECD_TYPE) { -+ eeprom->type = e1000_eeprom_spi; -+ if (eecd & E1000_EECD_ADDR_BITS) { -+ eeprom->page_size = 32; -+ eeprom->address_bits = 16; -+ } else { -+ eeprom->page_size = 8; -+ eeprom->address_bits = 8; -+ } -+ } else { -+ eeprom->type = e1000_eeprom_microwire; -+ eeprom->opcode_bits = 3; -+ eeprom->delay_usec = 50; -+ if (eecd & E1000_EECD_ADDR_BITS) { -+ eeprom->word_size = 256; -+ eeprom->address_bits = 8; -+ } else { -+ eeprom->word_size = 64; -+ eeprom->address_bits = 6; -+ } -+ } -+ break; -+ default: -+ eeprom->type = e1000_eeprom_spi; -+ if (eecd & E1000_EECD_ADDR_BITS) { -+ eeprom->page_size = 32; -+ eeprom->address_bits = 16; -+ } else { -+ eeprom->page_size = 8; -+ eeprom->address_bits = 8; -+ } -+ break; -+ } -+ -+ if (eeprom->type == e1000_eeprom_spi) { -+ eeprom->opcode_bits = 8; -+ eeprom->delay_usec = 1; -+ eeprom->word_size = 64; -+ if (e1000_read_eeprom(hw, EEPROM_CFG, 1, &eeprom_size) == 0) { -+ eeprom_size &= EEPROM_SIZE_MASK; -+ -+ switch (eeprom_size) { -+ case EEPROM_SIZE_16KB: -+ eeprom->word_size = 8192; -+ break; -+ case EEPROM_SIZE_8KB: -+ eeprom->word_size = 4096; -+ break; -+ case EEPROM_SIZE_4KB: -+ eeprom->word_size = 2048; -+ break; -+ case EEPROM_SIZE_2KB: -+ eeprom->word_size = 1024; -+ break; -+ case EEPROM_SIZE_1KB: -+ eeprom->word_size = 512; -+ break; -+ case EEPROM_SIZE_512B: -+ eeprom->word_size = 256; -+ break; -+ case EEPROM_SIZE_128B: -+ default: -+ break; -+ } -+ } -+ } -+} -+ -+/** -+ * e1000_reset - Reset the adapter -+ */ -+ -+static int -+e1000_reset(struct e1000_hw *hw) -+{ -+ uint32_t pba; -+ /* Repartition Pba for greater than 9k mtu -+ * To take effect CTRL.RST is required. -+ */ -+ -+ if(hw->mac_type < e1000_82547) { -+ pba = E1000_PBA_48K; -+ } else { -+ pba = E1000_PBA_30K; -+ } -+ E1000_WRITE_REG(hw, PBA, pba); -+ -+ /* flow control settings */ -+#if 0 -+ hw->fc_high_water = FC_DEFAULT_HI_THRESH; -+ hw->fc_low_water = FC_DEFAULT_LO_THRESH; -+ hw->fc_pause_time = FC_DEFAULT_TX_TIMER; -+ hw->fc_send_xon = 1; -+ hw->fc = hw->original_fc; -+#endif -+ -+ e1000_reset_hw(hw); -+ if(hw->mac_type >= e1000_82544) -+ E1000_WRITE_REG(hw, WUC, 0); -+ return e1000_init_hw(hw); -+} -+ -+/** -+ * e1000_sw_init - Initialize general software structures (struct e1000_adapter) -+ * @adapter: board private structure to initialize -+ * -+ * e1000_sw_init initializes the Adapter private data structure. -+ * Fields are initialized based on PCI device information and -+ * OS network device settings (MTU size). -+ **/ -+ -+static int -+e1000_sw_init(struct pci_device *pdev, struct e1000_hw *hw) -+{ -+ int result; -+ -+ /* PCI config space info */ -+ pci_read_config_word(pdev, PCI_VENDOR_ID, &hw->vendor_id); -+ pci_read_config_word(pdev, PCI_DEVICE_ID, &hw->device_id); -+ pci_read_config_byte(pdev, PCI_REVISION, &hw->revision_id); -+#if 0 -+ pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, -+ &hw->subsystem_vendor_id); -+ pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &hw->subsystem_id); -+#endif -+ -+ pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); -+ -+ /* identify the MAC */ -+ -+ result = e1000_set_mac_type(hw); -+ if (result) { -+ E1000_ERR("Unknown MAC Type\n"); -+ return result; -+ } -+ -+ /* initialize eeprom parameters */ -+ -+ e1000_init_eeprom_params(hw); -+ -+#if 0 -+ if((hw->mac_type == e1000_82541) || -+ (hw->mac_type == e1000_82547) || -+ (hw->mac_type == e1000_82541_rev_2) || -+ (hw->mac_type == e1000_82547_rev_2)) -+ hw->phy_init_script = 1; -+#endif -+ -+ e1000_set_media_type(hw); -+ -+#if 0 -+ if(hw->mac_type < e1000_82543) -+ hw->report_tx_early = 0; -+ else -+ hw->report_tx_early = 1; -+ -+ hw->wait_autoneg_complete = FALSE; -+#endif -+ hw->tbi_compatibility_en = TRUE; -+#if 0 -+ hw->adaptive_ifs = TRUE; -+ -+ /* Copper options */ -+ -+ if(hw->media_type == e1000_media_type_copper) { -+ hw->mdix = AUTO_ALL_MODES; -+ hw->disable_polarity_correction = FALSE; -+ hw->master_slave = E1000_MASTER_SLAVE; -+ } -+#endif -+ return E1000_SUCCESS; -+} -+ -+static void fill_rx (void) -+{ -+ struct e1000_rx_desc *rd; -+ rx_last = rx_tail; -+ rd = rx_base + rx_tail; -+ rx_tail = (rx_tail + 1) % 8; -+ memset (rd, 0, 16); -+ rd->buffer_addr = virt_to_bus(&packet); -+ E1000_WRITE_REG (&hw, RDT, rx_tail); -+} -+ -+static void init_descriptor (void) -+{ -+ unsigned long ptr; -+ unsigned long tctl; -+ -+ ptr = virt_to_phys(tx_pool); -+ if (ptr & 0xf) -+ ptr = (ptr + 0x10) & (~0xf); -+ -+ tx_base = phys_to_virt(ptr); -+ -+ E1000_WRITE_REG (&hw, TDBAL, virt_to_bus(tx_base)); -+ E1000_WRITE_REG (&hw, TDBAH, 0); -+ E1000_WRITE_REG (&hw, TDLEN, 128); -+ -+ /* Setup the HW Tx Head and Tail descriptor pointers */ -+ -+ E1000_WRITE_REG (&hw, TDH, 0); -+ E1000_WRITE_REG (&hw, TDT, 0); -+ tx_tail = 0; -+ -+ /* Program the Transmit Control Register */ -+ -+#ifdef LINUX_DRIVER_TCTL -+ tctl = E1000_READ_REG(&hw, TCTL); -+ -+ tctl &= ~E1000_TCTL_CT; -+ tctl |= E1000_TCTL_EN | E1000_TCTL_PSP | -+ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT); -+#else -+ tctl = E1000_TCTL_PSP | E1000_TCTL_EN | -+ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT) | -+ (E1000_HDX_COLLISION_DISTANCE << E1000_COLD_SHIFT); -+#endif -+ -+ E1000_WRITE_REG (&hw, TCTL, tctl); -+ -+ e1000_config_collision_dist(&hw); -+ -+ -+ rx_tail = 0; -+ /* disable receive */ -+ E1000_WRITE_REG (&hw, RCTL, 0); -+ ptr = virt_to_phys(rx_pool); -+ if (ptr & 0xf) -+ ptr = (ptr + 0x10) & (~0xf); -+ rx_base = phys_to_virt(ptr); -+ -+ /* Setup the Base and Length of the Rx Descriptor Ring */ -+ -+ E1000_WRITE_REG (&hw, RDBAL, virt_to_bus(rx_base)); -+ E1000_WRITE_REG (&hw, RDBAH, 0); -+ -+ E1000_WRITE_REG (&hw, RDLEN, 128); -+ -+ /* Setup the HW Rx Head and Tail Descriptor Pointers */ -+ E1000_WRITE_REG (&hw, RDH, 0); -+ E1000_WRITE_REG (&hw, RDT, 0); -+ -+ E1000_WRITE_REG (&hw, RCTL, -+ E1000_RCTL_EN | -+ E1000_RCTL_BAM | -+ E1000_RCTL_SZ_2048 | -+ E1000_RCTL_MPE); -+ fill_rx(); -+} -+ -+ -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int -+e1000_poll (struct nic *nic, int retrieve) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ struct e1000_rx_desc *rd; -+ -+ rd = rx_base + rx_last; -+ if (!rd->status & E1000_RXD_STAT_DD) -+ return 0; -+ -+ if ( ! retrieve ) return 1; -+ -+ // printf("recv: packet %! -> %! len=%d \n", packet+6, packet,rd->Length); -+ memcpy (nic->packet, packet, rd->length); -+ nic->packetlen = rd->length; -+ fill_rx (); -+ return 1; -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void -+e1000_transmit (struct nic *nic, const char *d, /* Destination */ -+ unsigned int type, /* Type */ -+ unsigned int size, /* size */ -+ const char *p) /* Packet */ -+{ -+ /* send the packet to destination */ -+ struct eth_hdr { -+ unsigned char dst_addr[ETH_ALEN]; -+ unsigned char src_addr[ETH_ALEN]; -+ unsigned short type; -+ } hdr; -+ struct e1000_tx_desc *txhd; /* header */ -+ struct e1000_tx_desc *txp; /* payload */ -+ DEBUGFUNC("send"); -+ -+ memcpy (&hdr.dst_addr, d, ETH_ALEN); -+ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); -+ -+ hdr.type = htons (type); -+ txhd = tx_base + tx_tail; -+ tx_tail = (tx_tail + 1) % 8; -+ txp = tx_base + tx_tail; -+ tx_tail = (tx_tail + 1) % 8; -+ -+ txhd->buffer_addr = virt_to_bus (&hdr); -+ txhd->lower.data = sizeof (hdr); -+ txhd->upper.data = 0; -+ -+ txp->buffer_addr = virt_to_bus(p); -+ txp->lower.data = E1000_TXD_CMD_RPS | E1000_TXD_CMD_EOP | E1000_TXD_CMD_IFCS | size; -+ txp->upper.data = 0; -+ -+ E1000_WRITE_REG (&hw, TDT, tx_tail); -+ while (!(txp->upper.data & E1000_TXD_STAT_DD)) { -+ udelay(10); /* give the nic a chance to write to the register */ -+ poll_interruptions(); -+ } -+ DEBUGFUNC("send end"); -+} -+ -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void e1000_disable (struct dev *dev __unused) -+{ -+ /* Clear the transmit ring */ -+ E1000_WRITE_REG (&hw, TDH, 0); -+ E1000_WRITE_REG (&hw, TDT, 0); -+ -+ /* Clear the receive ring */ -+ E1000_WRITE_REG (&hw, RDH, 0); -+ E1000_WRITE_REG (&hw, RDT, 0); -+ -+ /* put the card in its initial state */ -+ E1000_WRITE_REG (&hw, CTRL, E1000_CTRL_RST); -+ -+ /* Turn off the ethernet interface */ -+ E1000_WRITE_REG (&hw, RCTL, 0); -+ E1000_WRITE_REG (&hw, TCTL, 0); -+ mdelay (10); -+ -+ /* Unmap my window to the device */ -+ iounmap(hw.hw_addr); -+} -+ -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void e1000_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+#define IORESOURCE_IO 0x00000100 /* Resource type */ -+#define BAR_0 0 -+#define BAR_1 1 -+#define BAR_5 5 -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+You should omit the last argument struct pci_device * for a non-PCI NIC -+***************************************************************************/ -+static int e1000_probe(struct dev *dev, struct pci_device *p) -+{ -+ struct nic *nic = (struct nic *)dev; -+ unsigned long mmio_start, mmio_len; -+ int ret_val, i; -+ -+ if (p == 0) -+ return 0; -+ /* Initialize hw with default values */ -+ memset(&hw, 0, sizeof(hw)); -+ hw.pdev = p; -+ -+#if 1 -+ /* Are these variables needed? */ -+ hw.fc = e1000_fc_none; -+#if 0 -+ hw.original_fc = e1000_fc_none; -+#endif -+ hw.autoneg_failed = 0; -+#if 0 -+ hw.get_link_status = TRUE; -+#endif -+#endif -+ -+ mmio_start = pci_bar_start(p, PCI_BASE_ADDRESS_0); -+ mmio_len = pci_bar_size(p, PCI_BASE_ADDRESS_0); -+ hw.hw_addr = ioremap(mmio_start, mmio_len); -+ -+ for(i = BAR_1; i <= BAR_5; i++) { -+ if(pci_bar_size(p, i) == 0) -+ continue; -+ if(pci_find_capability(p, i) & IORESOURCE_IO) { -+ hw.io_base = pci_bar_start(p, i); -+ break; -+ } -+ } -+ -+ adjust_pci_device(p); -+ -+ nic->ioaddr = p->ioaddr & ~3; -+ nic->irqno = 0; -+ -+ /* From Matt Hortman */ -+ /* MAC and Phy settings */ -+ -+ /* setup the private structure */ -+ if (e1000_sw_init(p, &hw) < 0) { -+ iounmap(hw.hw_addr); -+ return 0; -+ } -+ -+ /* make sure the EEPROM is good */ -+ -+ if (e1000_validate_eeprom_checksum(&hw) < 0) { -+ printf ("The EEPROM Checksum Is Not Valid\n"); -+ iounmap(hw.hw_addr); -+ return 0; -+ } -+ -+ /* copy the MAC address out of the EEPROM */ -+ -+ e1000_read_mac_addr(&hw); -+ memcpy (nic->node_addr, hw.mac_addr, ETH_ALEN); -+ -+ printf("Ethernet addr: %!\n", nic->node_addr); -+ -+ /* reset the hardware with the new settings */ -+ -+ ret_val = e1000_reset(&hw); -+ if (ret_val < 0) { -+ if ((ret_val == -E1000_ERR_NOLINK) || -+ (ret_val == -E1000_ERR_TIMEOUT)) { -+ E1000_ERR("Valid Link not detected\n"); -+ } else { -+ E1000_ERR("Hardware Initialization Failed\n"); -+ } -+ iounmap(hw.hw_addr); -+ return 0; -+ } -+ init_descriptor(); -+ -+ /* point to NIC specific routines */ -+ dev->disable = e1000_disable; -+ nic->poll = e1000_poll; -+ nic->transmit = e1000_transmit; -+ nic->irq = e1000_irq; -+ -+ return 1; -+} -+ -+static struct pci_id e1000_nics[] = { -+PCI_ROM(0x8086, 0x1000, "e1000-82542", "Intel EtherExpressPro1000"), -+PCI_ROM(0x8086, 0x1001, "e1000-82543gc-fiber", "Intel EtherExpressPro1000 82543GC Fiber"), -+PCI_ROM(0x8086, 0x1004, "e1000-82543gc-copper", "Intel EtherExpressPro1000 82543GC Copper"), -+PCI_ROM(0x8086, 0x1008, "e1000-82544ei-copper", "Intel EtherExpressPro1000 82544EI Copper"), -+PCI_ROM(0x8086, 0x1009, "e1000-82544ei-fiber", "Intel EtherExpressPro1000 82544EI Fiber"), -+PCI_ROM(0x8086, 0x100C, "e1000-82544gc-copper", "Intel EtherExpressPro1000 82544GC Copper"), -+PCI_ROM(0x8086, 0x100D, "e1000-82544gc-lom", "Intel EtherExpressPro1000 82544GC LOM"), -+PCI_ROM(0x8086, 0x100E, "e1000-82540em", "Intel EtherExpressPro1000 82540EM"), -+PCI_ROM(0x8086, 0x100F, "e1000-82545em-copper", "Intel EtherExpressPro1000 82545EM Copper"), -+PCI_ROM(0x8086, 0x1010, "e1000-82546eb-copper", "Intel EtherExpressPro1000 82546EB Copper"), -+PCI_ROM(0x8086, 0x1011, "e1000-82545em-fiber", "Intel EtherExpressPro1000 82545EM Fiber"), -+PCI_ROM(0x8086, 0x1012, "e1000-82546eb-fiber", "Intel EtherExpressPro1000 82546EB Copper"), -+PCI_ROM(0x8086, 0x1013, "e1000-82541ei", "Intel EtherExpressPro1000 82541EI"), -+PCI_ROM(0x8086, 0x1015, "e1000-82540em-lom", "Intel EtherExpressPro1000 82540EM LOM"), -+PCI_ROM(0x8086, 0x1016, "e1000-82540ep-lom", "Intel EtherExpressPro1000 82540EP LOM"), -+PCI_ROM(0x8086, 0x1017, "e1000-82540ep", "Intel EtherExpressPro1000 82540EP"), -+PCI_ROM(0x8086, 0x1018, "e1000-82541ep", "Intel EtherExpressPro1000 82541EP"), -+PCI_ROM(0x8086, 0x1019, "e1000-82547ei", "Intel EtherExpressPro1000 82547EI"), -+PCI_ROM(0x8086, 0x101d, "e1000-82546eb-quad-copper", "Intel EtherExpressPro1000 82546EB Quad Copper"), -+PCI_ROM(0x8086, 0x101e, "e1000-82540ep-lp", "Intel EtherExpressPro1000 82540EP LP"), -+PCI_ROM(0x8086, 0x1026, "e1000-82545gm-copper", "Intel EtherExpressPro1000 82545GM Copper"), -+PCI_ROM(0x8086, 0x1027, "e1000-82545gm-fiber", "Intel EtherExpressPro1000 82545GM Fiber"), -+PCI_ROM(0x8086, 0x1028, "e1000-82545gm-serdes", "Intel EtherExpressPro1000 82545GM SERDES"), -+PCI_ROM(0x8086, 0x1075, "e1000-82547gi", "Intel EtherExpressPro1000 82547GI"), -+PCI_ROM(0x8086, 0x1076, "e1000-82541gi", "Intel EtherExpressPro1000 82541GI"), -+PCI_ROM(0x8086, 0x1077, "e1000-82541gi-mobile", "Intel EtherExpressPro1000 82541GI Mobile"), -+PCI_ROM(0x8086, 0x1078, "e1000-82541er", "Intel EtherExpressPro1000 82541ER"), -+PCI_ROM(0x8086, 0x1079, "e1000-82546gb-copper", "Intel EtherExpressPro1000 82546GB Copper"), -+PCI_ROM(0x8086, 0x107a, "e1000-82546gb-fiber", "Intel EtherExpressPro1000 82546GB Fiber"), -+PCI_ROM(0x8086, 0x107b, "e1000-82546gb-serdes", "Intel EtherExpressPro1000 82546GB SERDES"), -+}; -+ -+struct pci_driver e1000_driver = { -+ .type = NIC_DRIVER, -+ .name = "E1000", -+ .probe = e1000_probe, -+ .ids = e1000_nics, -+ .id_count = sizeof(e1000_nics)/sizeof(e1000_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/e1000_hw.h -=================================================================== ---- /dev/null -+++ b/netboot/e1000_hw.h -@@ -0,0 +1,2058 @@ -+/******************************************************************************* -+ -+ -+ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. -+ -+ This program is free software; you can redistribute it and/or modify it -+ under the terms of the GNU General Public License as published by the Free -+ Software Foundation; either version 2 of the License, or (at your option) -+ any later version. -+ -+ This program is distributed in the hope that it will be useful, but WITHOUT -+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ more details. -+ -+ You should have received a copy of the GNU General Public License along with -+ this program; if not, write to the Free Software Foundation, Inc., 59 -+ Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ The full GNU General Public License is included in this distribution in the -+ file called LICENSE. -+ -+ Contact Information: -+ Linux NICS -+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 -+ -+*******************************************************************************/ -+ -+/* e1000_hw.h -+ * Structures, enums, and macros for the MAC -+ */ -+ -+#ifndef _E1000_HW_H_ -+#define _E1000_HW_H_ -+ -+/* Forward declarations of structures used by the shared code */ -+struct e1000_hw; -+struct e1000_hw_stats; -+ -+/* Enumerated types specific to the e1000 hardware */ -+/* Media Access Controlers */ -+typedef enum { -+ e1000_undefined = 0, -+ e1000_82542_rev2_0, -+ e1000_82542_rev2_1, -+ e1000_82543, -+ e1000_82544, -+ e1000_82540, -+ e1000_82545, -+ e1000_82545_rev_3, -+ e1000_82546, -+ e1000_82546_rev_3, -+ e1000_82541, -+ e1000_82541_rev_2, -+ e1000_82547, -+ e1000_82547_rev_2, -+ e1000_num_macs -+} e1000_mac_type; -+ -+typedef enum { -+ e1000_eeprom_uninitialized = 0, -+ e1000_eeprom_spi, -+ e1000_eeprom_microwire, -+ e1000_num_eeprom_types -+} e1000_eeprom_type; -+ -+/* Media Types */ -+typedef enum { -+ e1000_media_type_copper = 0, -+ e1000_media_type_fiber = 1, -+ e1000_media_type_internal_serdes = 2, -+ e1000_num_media_types -+} e1000_media_type; -+ -+typedef enum { -+ e1000_10_half = 0, -+ e1000_10_full = 1, -+ e1000_100_half = 2, -+ e1000_100_full = 3 -+} e1000_speed_duplex_type; -+ -+/* Flow Control Settings */ -+typedef enum { -+ e1000_fc_none = 0, -+ e1000_fc_rx_pause = 1, -+ e1000_fc_tx_pause = 2, -+ e1000_fc_full = 3, -+ e1000_fc_default = 0xFF -+} e1000_fc_type; -+ -+/* PCI bus types */ -+typedef enum { -+ e1000_bus_type_unknown = 0, -+ e1000_bus_type_pci, -+ e1000_bus_type_pcix, -+ e1000_bus_type_reserved -+} e1000_bus_type; -+ -+/* PCI bus speeds */ -+typedef enum { -+ e1000_bus_speed_unknown = 0, -+ e1000_bus_speed_33, -+ e1000_bus_speed_66, -+ e1000_bus_speed_100, -+ e1000_bus_speed_120, -+ e1000_bus_speed_133, -+ e1000_bus_speed_reserved -+} e1000_bus_speed; -+ -+/* PCI bus widths */ -+typedef enum { -+ e1000_bus_width_unknown = 0, -+ e1000_bus_width_32, -+ e1000_bus_width_64, -+ e1000_bus_width_reserved -+} e1000_bus_width; -+ -+/* PHY status info structure and supporting enums */ -+typedef enum { -+ e1000_cable_length_50 = 0, -+ e1000_cable_length_50_80, -+ e1000_cable_length_80_110, -+ e1000_cable_length_110_140, -+ e1000_cable_length_140, -+ e1000_cable_length_undefined = 0xFF -+} e1000_cable_length; -+ -+typedef enum { -+ e1000_igp_cable_length_10 = 10, -+ e1000_igp_cable_length_20 = 20, -+ e1000_igp_cable_length_30 = 30, -+ e1000_igp_cable_length_40 = 40, -+ e1000_igp_cable_length_50 = 50, -+ e1000_igp_cable_length_60 = 60, -+ e1000_igp_cable_length_70 = 70, -+ e1000_igp_cable_length_80 = 80, -+ e1000_igp_cable_length_90 = 90, -+ e1000_igp_cable_length_100 = 100, -+ e1000_igp_cable_length_110 = 110, -+ e1000_igp_cable_length_120 = 120, -+ e1000_igp_cable_length_130 = 130, -+ e1000_igp_cable_length_140 = 140, -+ e1000_igp_cable_length_150 = 150, -+ e1000_igp_cable_length_160 = 160, -+ e1000_igp_cable_length_170 = 170, -+ e1000_igp_cable_length_180 = 180 -+} e1000_igp_cable_length; -+ -+typedef enum { -+ e1000_10bt_ext_dist_enable_normal = 0, -+ e1000_10bt_ext_dist_enable_lower, -+ e1000_10bt_ext_dist_enable_undefined = 0xFF -+} e1000_10bt_ext_dist_enable; -+ -+typedef enum { -+ e1000_rev_polarity_normal = 0, -+ e1000_rev_polarity_reversed, -+ e1000_rev_polarity_undefined = 0xFF -+} e1000_rev_polarity; -+ -+typedef enum { -+ e1000_downshift_normal = 0, -+ e1000_downshift_activated, -+ e1000_downshift_undefined = 0xFF -+} e1000_downshift; -+ -+typedef enum { -+ e1000_polarity_reversal_enabled = 0, -+ e1000_polarity_reversal_disabled, -+ e1000_polarity_reversal_undefined = 0xFF -+} e1000_polarity_reversal; -+ -+typedef enum { -+ e1000_auto_x_mode_manual_mdi = 0, -+ e1000_auto_x_mode_manual_mdix, -+ e1000_auto_x_mode_auto1, -+ e1000_auto_x_mode_auto2, -+ e1000_auto_x_mode_undefined = 0xFF -+} e1000_auto_x_mode; -+ -+typedef enum { -+ e1000_1000t_rx_status_not_ok = 0, -+ e1000_1000t_rx_status_ok, -+ e1000_1000t_rx_status_undefined = 0xFF -+} e1000_1000t_rx_status; -+ -+typedef enum { -+ e1000_phy_m88 = 0, -+ e1000_phy_igp, -+ e1000_phy_undefined = 0xFF -+} e1000_phy_type; -+ -+typedef enum { -+ e1000_ms_hw_default = 0, -+ e1000_ms_force_master, -+ e1000_ms_force_slave, -+ e1000_ms_auto -+} e1000_ms_type; -+ -+typedef enum { -+ e1000_ffe_config_enabled = 0, -+ e1000_ffe_config_active, -+ e1000_ffe_config_blocked -+} e1000_ffe_config; -+ -+typedef enum { -+ e1000_dsp_config_disabled = 0, -+ e1000_dsp_config_enabled, -+ e1000_dsp_config_activated, -+ e1000_dsp_config_undefined = 0xFF -+} e1000_dsp_config; -+ -+struct e1000_phy_info { -+ e1000_cable_length cable_length; -+ e1000_10bt_ext_dist_enable extended_10bt_distance; -+ e1000_rev_polarity cable_polarity; -+ e1000_downshift downshift; -+ e1000_polarity_reversal polarity_correction; -+ e1000_auto_x_mode mdix_mode; -+ e1000_1000t_rx_status local_rx; -+ e1000_1000t_rx_status remote_rx; -+}; -+ -+struct e1000_phy_stats { -+ uint32_t idle_errors; -+ uint32_t receive_errors; -+}; -+ -+struct e1000_eeprom_info { -+ e1000_eeprom_type type; -+ uint16_t word_size; -+ uint16_t opcode_bits; -+ uint16_t address_bits; -+ uint16_t delay_usec; -+ uint16_t page_size; -+}; -+ -+ -+ -+/* Error Codes */ -+#define E1000_SUCCESS 0 -+#define E1000_ERR_EEPROM 1 -+#define E1000_ERR_PHY 2 -+#define E1000_ERR_CONFIG 3 -+#define E1000_ERR_PARAM 4 -+#define E1000_ERR_MAC_TYPE 5 -+#define E1000_ERR_PHY_TYPE 6 -+#define E1000_ERR_NOLINK 7 -+#define E1000_ERR_TIMEOUT 8 -+ -+#define E1000_READ_REG_IO(a, reg) \ -+ e1000_read_reg_io((a), E1000_##reg) -+#define E1000_WRITE_REG_IO(a, reg, val) \ -+ e1000_write_reg_io((a), E1000_##reg, val) -+ -+/* PCI Device IDs */ -+#define E1000_DEV_ID_82542 0x1000 -+#define E1000_DEV_ID_82543GC_FIBER 0x1001 -+#define E1000_DEV_ID_82543GC_COPPER 0x1004 -+#define E1000_DEV_ID_82544EI_COPPER 0x1008 -+#define E1000_DEV_ID_82544EI_FIBER 0x1009 -+#define E1000_DEV_ID_82544GC_COPPER 0x100C -+#define E1000_DEV_ID_82544GC_LOM 0x100D -+#define E1000_DEV_ID_82540EM 0x100E -+#define E1000_DEV_ID_82540EM_LOM 0x1015 -+#define E1000_DEV_ID_82540EP_LOM 0x1016 -+#define E1000_DEV_ID_82540EP 0x1017 -+#define E1000_DEV_ID_82540EP_LP 0x101E -+#define E1000_DEV_ID_82545EM_COPPER 0x100F -+#define E1000_DEV_ID_82545EM_FIBER 0x1011 -+#define E1000_DEV_ID_82545GM_COPPER 0x1026 -+#define E1000_DEV_ID_82545GM_FIBER 0x1027 -+#define E1000_DEV_ID_82545GM_SERDES 0x1028 -+#define E1000_DEV_ID_82546EB_COPPER 0x1010 -+#define E1000_DEV_ID_82546EB_FIBER 0x1012 -+#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D -+#define E1000_DEV_ID_82541EI 0x1013 -+#define E1000_DEV_ID_82541EI_MOBILE 0x1018 -+#define E1000_DEV_ID_82541ER 0x1078 -+#define E1000_DEV_ID_82547GI 0x1075 -+#define E1000_DEV_ID_82541GI 0x1076 -+#define E1000_DEV_ID_82541GI_MOBILE 0x1077 -+#define E1000_DEV_ID_82546GB_COPPER 0x1079 -+#define E1000_DEV_ID_82546GB_FIBER 0x107A -+#define E1000_DEV_ID_82546GB_SERDES 0x107B -+#define E1000_DEV_ID_82547EI 0x1019 -+ -+#define NODE_ADDRESS_SIZE 6 -+#define ETH_LENGTH_OF_ADDRESS 6 -+ -+/* MAC decode size is 128K - This is the size of BAR0 */ -+#define MAC_DECODE_SIZE (128 * 1024) -+ -+#define E1000_82542_2_0_REV_ID 2 -+#define E1000_82542_2_1_REV_ID 3 -+ -+#define SPEED_10 10 -+#define SPEED_100 100 -+#define SPEED_1000 1000 -+#define HALF_DUPLEX 1 -+#define FULL_DUPLEX 2 -+ -+/* The sizes (in bytes) of a ethernet packet */ -+#define ENET_HEADER_SIZE 14 -+#define MAXIMUM_ETHERNET_FRAME_SIZE 1518 /* With FCS */ -+#define MINIMUM_ETHERNET_FRAME_SIZE 64 /* With FCS */ -+#define ETHERNET_FCS_SIZE 4 -+#define MAXIMUM_ETHERNET_PACKET_SIZE \ -+ (MAXIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) -+#define MINIMUM_ETHERNET_PACKET_SIZE \ -+ (MINIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) -+#define CRC_LENGTH ETHERNET_FCS_SIZE -+#define MAX_JUMBO_FRAME_SIZE 0x3F00 -+ -+ -+/* 802.1q VLAN Packet Sizes */ -+#define VLAN_TAG_SIZE 4 /* 802.3ac tag (not DMAed) */ -+ -+/* Ethertype field values */ -+#define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */ -+#define ETHERNET_IP_TYPE 0x0800 /* IP packets */ -+#define ETHERNET_ARP_TYPE 0x0806 /* Address Resolution Protocol (ARP) */ -+ -+/* Packet Header defines */ -+#define IP_PROTOCOL_TCP 6 -+#define IP_PROTOCOL_UDP 0x11 -+ -+/* This defines the bits that are set in the Interrupt Mask -+ * Set/Read Register. Each bit is documented below: -+ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) -+ * o RXSEQ = Receive Sequence Error -+ */ -+#define POLL_IMS_ENABLE_MASK ( \ -+ E1000_IMS_RXDMT0 | \ -+ E1000_IMS_RXSEQ) -+ -+/* This defines the bits that are set in the Interrupt Mask -+ * Set/Read Register. Each bit is documented below: -+ * o RXT0 = Receiver Timer Interrupt (ring 0) -+ * o TXDW = Transmit Descriptor Written Back -+ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) -+ * o RXSEQ = Receive Sequence Error -+ * o LSC = Link Status Change -+ */ -+#define IMS_ENABLE_MASK ( \ -+ E1000_IMS_RXT0 | \ -+ E1000_IMS_TXDW | \ -+ E1000_IMS_RXDMT0 | \ -+ E1000_IMS_RXSEQ | \ -+ E1000_IMS_LSC) -+ -+/* Number of high/low register pairs in the RAR. The RAR (Receive Address -+ * Registers) holds the directed and multicast addresses that we monitor. We -+ * reserve one of these spots for our directed address, allowing us room for -+ * E1000_RAR_ENTRIES - 1 multicast addresses. -+ */ -+#define E1000_RAR_ENTRIES 15 -+ -+#define MIN_NUMBER_OF_DESCRIPTORS 8 -+#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 -+ -+/* Receive Descriptor */ -+struct e1000_rx_desc { -+ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ -+ uint16_t length; /* Length of data DMAed into data buffer */ -+ uint16_t csum; /* Packet checksum */ -+ uint8_t status; /* Descriptor status */ -+ uint8_t errors; /* Descriptor Errors */ -+ uint16_t special; -+}; -+ -+/* Receive Decriptor bit definitions */ -+#define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */ -+#define E1000_RXD_STAT_EOP 0x02 /* End of Packet */ -+#define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */ -+#define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */ -+#define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */ -+#define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */ -+#define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */ -+#define E1000_RXD_ERR_CE 0x01 /* CRC Error */ -+#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */ -+#define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */ -+#define E1000_RXD_ERR_CXE 0x10 /* Carrier Extension Error */ -+#define E1000_RXD_ERR_TCPE 0x20 /* TCP/UDP Checksum Error */ -+#define E1000_RXD_ERR_IPE 0x40 /* IP Checksum Error */ -+#define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ -+#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ -+#define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */ -+#define E1000_RXD_SPC_PRI_SHIFT 0x000D /* Priority is in upper 3 of 16 */ -+#define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */ -+#define E1000_RXD_SPC_CFI_SHIFT 0x000C /* CFI is bit 12 */ -+ -+/* mask to determine if packets should be dropped due to frame errors */ -+#define E1000_RXD_ERR_FRAME_ERR_MASK ( \ -+ E1000_RXD_ERR_CE | \ -+ E1000_RXD_ERR_SE | \ -+ E1000_RXD_ERR_SEQ | \ -+ E1000_RXD_ERR_CXE | \ -+ E1000_RXD_ERR_RXE) -+ -+/* Transmit Descriptor */ -+struct e1000_tx_desc { -+ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ -+ union { -+ uint32_t data; -+ struct { -+ uint16_t length; /* Data buffer length */ -+ uint8_t cso; /* Checksum offset */ -+ uint8_t cmd; /* Descriptor control */ -+ } flags; -+ } lower; -+ union { -+ uint32_t data; -+ struct { -+ uint8_t status; /* Descriptor status */ -+ uint8_t css; /* Checksum start */ -+ uint16_t special; -+ } fields; -+ } upper; -+}; -+ -+/* Transmit Descriptor bit definitions */ -+#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */ -+#define E1000_TXD_DTYP_C 0x00000000 /* Context Descriptor */ -+#define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */ -+#define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */ -+#define E1000_TXD_CMD_EOP 0x01000000 /* End of Packet */ -+#define E1000_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ -+#define E1000_TXD_CMD_IC 0x04000000 /* Insert Checksum */ -+#define E1000_TXD_CMD_RS 0x08000000 /* Report Status */ -+#define E1000_TXD_CMD_RPS 0x10000000 /* Report Packet Sent */ -+#define E1000_TXD_CMD_DEXT 0x20000000 /* Descriptor extension (0 = legacy) */ -+#define E1000_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */ -+#define E1000_TXD_CMD_IDE 0x80000000 /* Enable Tidv register */ -+#define E1000_TXD_STAT_DD 0x00000001 /* Descriptor Done */ -+#define E1000_TXD_STAT_EC 0x00000002 /* Excess Collisions */ -+#define E1000_TXD_STAT_LC 0x00000004 /* Late Collisions */ -+#define E1000_TXD_STAT_TU 0x00000008 /* Transmit underrun */ -+#define E1000_TXD_CMD_TCP 0x01000000 /* TCP packet */ -+#define E1000_TXD_CMD_IP 0x02000000 /* IP packet */ -+#define E1000_TXD_CMD_TSE 0x04000000 /* TCP Seg enable */ -+#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */ -+ -+/* Offload Context Descriptor */ -+struct e1000_context_desc { -+ union { -+ uint32_t ip_config; -+ struct { -+ uint8_t ipcss; /* IP checksum start */ -+ uint8_t ipcso; /* IP checksum offset */ -+ uint16_t ipcse; /* IP checksum end */ -+ } ip_fields; -+ } lower_setup; -+ union { -+ uint32_t tcp_config; -+ struct { -+ uint8_t tucss; /* TCP checksum start */ -+ uint8_t tucso; /* TCP checksum offset */ -+ uint16_t tucse; /* TCP checksum end */ -+ } tcp_fields; -+ } upper_setup; -+ uint32_t cmd_and_length; /* */ -+ union { -+ uint32_t data; -+ struct { -+ uint8_t status; /* Descriptor status */ -+ uint8_t hdr_len; /* Header length */ -+ uint16_t mss; /* Maximum segment size */ -+ } fields; -+ } tcp_seg_setup; -+}; -+ -+/* Offload data descriptor */ -+struct e1000_data_desc { -+ uint64_t buffer_addr; /* Address of the descriptor's buffer address */ -+ union { -+ uint32_t data; -+ struct { -+ uint16_t length; /* Data buffer length */ -+ uint8_t typ_len_ext; /* */ -+ uint8_t cmd; /* */ -+ } flags; -+ } lower; -+ union { -+ uint32_t data; -+ struct { -+ uint8_t status; /* Descriptor status */ -+ uint8_t popts; /* Packet Options */ -+ uint16_t special; /* */ -+ } fields; -+ } upper; -+}; -+ -+/* Filters */ -+#define E1000_NUM_UNICAST 16 /* Unicast filter entries */ -+#define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ -+#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ -+ -+ -+/* Receive Address Register */ -+struct e1000_rar { -+ volatile uint32_t low; /* receive address low */ -+ volatile uint32_t high; /* receive address high */ -+}; -+ -+/* Number of entries in the Multicast Table Array (MTA). */ -+#define E1000_NUM_MTA_REGISTERS 128 -+ -+/* IPv4 Address Table Entry */ -+struct e1000_ipv4_at_entry { -+ volatile uint32_t ipv4_addr; /* IP Address (RW) */ -+ volatile uint32_t reserved; -+}; -+ -+/* Four wakeup IP addresses are supported */ -+#define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4 -+#define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX -+#define E1000_IP6AT_SIZE 1 -+ -+/* IPv6 Address Table Entry */ -+struct e1000_ipv6_at_entry { -+ volatile uint8_t ipv6_addr[16]; -+}; -+ -+/* Flexible Filter Length Table Entry */ -+struct e1000_fflt_entry { -+ volatile uint32_t length; /* Flexible Filter Length (RW) */ -+ volatile uint32_t reserved; -+}; -+ -+/* Flexible Filter Mask Table Entry */ -+struct e1000_ffmt_entry { -+ volatile uint32_t mask; /* Flexible Filter Mask (RW) */ -+ volatile uint32_t reserved; -+}; -+ -+/* Flexible Filter Value Table Entry */ -+struct e1000_ffvt_entry { -+ volatile uint32_t value; /* Flexible Filter Value (RW) */ -+ volatile uint32_t reserved; -+}; -+ -+/* Four Flexible Filters are supported */ -+#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4 -+ -+/* Each Flexible Filter is at most 128 (0x80) bytes in length */ -+#define E1000_FLEXIBLE_FILTER_SIZE_MAX 128 -+ -+#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX -+#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX -+#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX -+ -+/* Register Set. (82543, 82544) -+ * -+ * Registers are defined to be 32 bits and should be accessed as 32 bit values. -+ * These registers are physically located on the NIC, but are mapped into the -+ * host memory address space. -+ * -+ * RW - register is both readable and writable -+ * RO - register is read only -+ * WO - register is write only -+ * R/clr - register is read only and is cleared when read -+ * A - register array -+ */ -+#define E1000_CTRL 0x00000 /* Device Control - RW */ -+#define E1000_CTRL_DUP 0x00004 /* Device Control Duplicate (Shadow) - RW */ -+#define E1000_STATUS 0x00008 /* Device Status - RO */ -+#define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */ -+#define E1000_EERD 0x00014 /* EEPROM Read - RW */ -+#define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ -+#define E1000_FLA 0x0001C /* Flash Access - RW */ -+#define E1000_MDIC 0x00020 /* MDI Control - RW */ -+#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ -+#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */ -+#define E1000_FCT 0x00030 /* Flow Control Type - RW */ -+#define E1000_VET 0x00038 /* VLAN Ether Type - RW */ -+#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */ -+#define E1000_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ -+#define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */ -+#define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ -+#define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ -+#define E1000_RCTL 0x00100 /* RX Control - RW */ -+#define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ -+#define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ -+#define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ -+#define E1000_TCTL 0x00400 /* TX Control - RW */ -+#define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ -+#define E1000_TBT 0x00448 /* TX Burst Timer - RW */ -+#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ -+#define E1000_LEDCTL 0x00E00 /* LED Control - RW */ -+#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ -+#define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */ -+#define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */ -+#define E1000_RDBAL 0x02800 /* RX Descriptor Base Address Low - RW */ -+#define E1000_RDBAH 0x02804 /* RX Descriptor Base Address High - RW */ -+#define E1000_RDLEN 0x02808 /* RX Descriptor Length - RW */ -+#define E1000_RDH 0x02810 /* RX Descriptor Head - RW */ -+#define E1000_RDT 0x02818 /* RX Descriptor Tail - RW */ -+#define E1000_RDTR 0x02820 /* RX Delay Timer - RW */ -+#define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ -+#define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ -+#define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ -+#define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ -+#define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ -+#define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ -+#define E1000_TDFHS 0x03420 /* TX Data FIFO Head Saved - RW */ -+#define E1000_TDFTS 0x03428 /* TX Data FIFO Tail Saved - RW */ -+#define E1000_TDFPC 0x03430 /* TX Data FIFO Packet Count - RW */ -+#define E1000_TDBAL 0x03800 /* TX Descriptor Base Address Low - RW */ -+#define E1000_TDBAH 0x03804 /* TX Descriptor Base Address High - RW */ -+#define E1000_TDLEN 0x03808 /* TX Descriptor Length - RW */ -+#define E1000_TDH 0x03810 /* TX Descriptor Head - RW */ -+#define E1000_TDT 0x03818 /* TX Descripotr Tail - RW */ -+#define E1000_TIDV 0x03820 /* TX Interrupt Delay Value - RW */ -+#define E1000_TXDCTL 0x03828 /* TX Descriptor Control - RW */ -+#define E1000_TADV 0x0382C /* TX Interrupt Absolute Delay Val - RW */ -+#define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */ -+#define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */ -+#define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ -+#define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */ -+#define E1000_RXERRC 0x0400C /* Receive Error Count - R/clr */ -+#define E1000_MPC 0x04010 /* Missed Packet Count - R/clr */ -+#define E1000_SCC 0x04014 /* Single Collision Count - R/clr */ -+#define E1000_ECOL 0x04018 /* Excessive Collision Count - R/clr */ -+#define E1000_MCC 0x0401C /* Multiple Collision Count - R/clr */ -+#define E1000_LATECOL 0x04020 /* Late Collision Count - R/clr */ -+#define E1000_COLC 0x04028 /* Collision Count - R/clr */ -+#define E1000_DC 0x04030 /* Defer Count - R/clr */ -+#define E1000_TNCRS 0x04034 /* TX-No CRS - R/clr */ -+#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */ -+#define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */ -+#define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */ -+#define E1000_XONRXC 0x04048 /* XON RX Count - R/clr */ -+#define E1000_XONTXC 0x0404C /* XON TX Count - R/clr */ -+#define E1000_XOFFRXC 0x04050 /* XOFF RX Count - R/clr */ -+#define E1000_XOFFTXC 0x04054 /* XOFF TX Count - R/clr */ -+#define E1000_FCRUC 0x04058 /* Flow Control RX Unsupported Count- R/clr */ -+#define E1000_PRC64 0x0405C /* Packets RX (64 bytes) - R/clr */ -+#define E1000_PRC127 0x04060 /* Packets RX (65-127 bytes) - R/clr */ -+#define E1000_PRC255 0x04064 /* Packets RX (128-255 bytes) - R/clr */ -+#define E1000_PRC511 0x04068 /* Packets RX (255-511 bytes) - R/clr */ -+#define E1000_PRC1023 0x0406C /* Packets RX (512-1023 bytes) - R/clr */ -+#define E1000_PRC1522 0x04070 /* Packets RX (1024-1522 bytes) - R/clr */ -+#define E1000_GPRC 0x04074 /* Good Packets RX Count - R/clr */ -+#define E1000_BPRC 0x04078 /* Broadcast Packets RX Count - R/clr */ -+#define E1000_MPRC 0x0407C /* Multicast Packets RX Count - R/clr */ -+#define E1000_GPTC 0x04080 /* Good Packets TX Count - R/clr */ -+#define E1000_GORCL 0x04088 /* Good Octets RX Count Low - R/clr */ -+#define E1000_GORCH 0x0408C /* Good Octets RX Count High - R/clr */ -+#define E1000_GOTCL 0x04090 /* Good Octets TX Count Low - R/clr */ -+#define E1000_GOTCH 0x04094 /* Good Octets TX Count High - R/clr */ -+#define E1000_RNBC 0x040A0 /* RX No Buffers Count - R/clr */ -+#define E1000_RUC 0x040A4 /* RX Undersize Count - R/clr */ -+#define E1000_RFC 0x040A8 /* RX Fragment Count - R/clr */ -+#define E1000_ROC 0x040AC /* RX Oversize Count - R/clr */ -+#define E1000_RJC 0x040B0 /* RX Jabber Count - R/clr */ -+#define E1000_MGTPRC 0x040B4 /* Management Packets RX Count - R/clr */ -+#define E1000_MGTPDC 0x040B8 /* Management Packets Dropped Count - R/clr */ -+#define E1000_MGTPTC 0x040BC /* Management Packets TX Count - R/clr */ -+#define E1000_TORL 0x040C0 /* Total Octets RX Low - R/clr */ -+#define E1000_TORH 0x040C4 /* Total Octets RX High - R/clr */ -+#define E1000_TOTL 0x040C8 /* Total Octets TX Low - R/clr */ -+#define E1000_TOTH 0x040CC /* Total Octets TX High - R/clr */ -+#define E1000_TPR 0x040D0 /* Total Packets RX - R/clr */ -+#define E1000_TPT 0x040D4 /* Total Packets TX - R/clr */ -+#define E1000_PTC64 0x040D8 /* Packets TX (64 bytes) - R/clr */ -+#define E1000_PTC127 0x040DC /* Packets TX (65-127 bytes) - R/clr */ -+#define E1000_PTC255 0x040E0 /* Packets TX (128-255 bytes) - R/clr */ -+#define E1000_PTC511 0x040E4 /* Packets TX (256-511 bytes) - R/clr */ -+#define E1000_PTC1023 0x040E8 /* Packets TX (512-1023 bytes) - R/clr */ -+#define E1000_PTC1522 0x040EC /* Packets TX (1024-1522 Bytes) - R/clr */ -+#define E1000_MPTC 0x040F0 /* Multicast Packets TX Count - R/clr */ -+#define E1000_BPTC 0x040F4 /* Broadcast Packets TX Count - R/clr */ -+#define E1000_TSCTC 0x040F8 /* TCP Segmentation Context TX - R/clr */ -+#define E1000_TSCTFC 0x040FC /* TCP Segmentation Context TX Fail - R/clr */ -+#define E1000_RXCSUM 0x05000 /* RX Checksum Control - RW */ -+#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ -+#define E1000_RA 0x05400 /* Receive Address - RW Array */ -+#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ -+#define E1000_WUC 0x05800 /* Wakeup Control - RW */ -+#define E1000_WUFC 0x05808 /* Wakeup Filter Control - RW */ -+#define E1000_WUS 0x05810 /* Wakeup Status - RO */ -+#define E1000_MANC 0x05820 /* Management Control - RW */ -+#define E1000_IPAV 0x05838 /* IP Address Valid - RW */ -+#define E1000_IP4AT 0x05840 /* IPv4 Address Table - RW Array */ -+#define E1000_IP6AT 0x05880 /* IPv6 Address Table - RW Array */ -+#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */ -+#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */ -+#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */ -+#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ -+#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ -+ -+/* Register Set (82542) -+ * -+ * Some of the 82542 registers are located at different offsets than they are -+ * in more current versions of the 8254x. Despite the difference in location, -+ * the registers function in the same manner. -+ */ -+#define E1000_82542_CTRL E1000_CTRL -+#define E1000_82542_CTRL_DUP E1000_CTRL_DUP -+#define E1000_82542_STATUS E1000_STATUS -+#define E1000_82542_EECD E1000_EECD -+#define E1000_82542_EERD E1000_EERD -+#define E1000_82542_CTRL_EXT E1000_CTRL_EXT -+#define E1000_82542_FLA E1000_FLA -+#define E1000_82542_MDIC E1000_MDIC -+#define E1000_82542_FCAL E1000_FCAL -+#define E1000_82542_FCAH E1000_FCAH -+#define E1000_82542_FCT E1000_FCT -+#define E1000_82542_VET E1000_VET -+#define E1000_82542_RA 0x00040 -+#define E1000_82542_ICR E1000_ICR -+#define E1000_82542_ITR E1000_ITR -+#define E1000_82542_ICS E1000_ICS -+#define E1000_82542_IMS E1000_IMS -+#define E1000_82542_IMC E1000_IMC -+#define E1000_82542_RCTL E1000_RCTL -+#define E1000_82542_RDTR 0x00108 -+#define E1000_82542_RDBAL 0x00110 -+#define E1000_82542_RDBAH 0x00114 -+#define E1000_82542_RDLEN 0x00118 -+#define E1000_82542_RDH 0x00120 -+#define E1000_82542_RDT 0x00128 -+#define E1000_82542_FCRTH 0x00160 -+#define E1000_82542_FCRTL 0x00168 -+#define E1000_82542_FCTTV E1000_FCTTV -+#define E1000_82542_TXCW E1000_TXCW -+#define E1000_82542_RXCW E1000_RXCW -+#define E1000_82542_MTA 0x00200 -+#define E1000_82542_TCTL E1000_TCTL -+#define E1000_82542_TIPG E1000_TIPG -+#define E1000_82542_TDBAL 0x00420 -+#define E1000_82542_TDBAH 0x00424 -+#define E1000_82542_TDLEN 0x00428 -+#define E1000_82542_TDH 0x00430 -+#define E1000_82542_TDT 0x00438 -+#define E1000_82542_TIDV 0x00440 -+#define E1000_82542_TBT E1000_TBT -+#define E1000_82542_AIT E1000_AIT -+#define E1000_82542_VFTA 0x00600 -+#define E1000_82542_LEDCTL E1000_LEDCTL -+#define E1000_82542_PBA E1000_PBA -+#define E1000_82542_RXDCTL E1000_RXDCTL -+#define E1000_82542_RADV E1000_RADV -+#define E1000_82542_RSRPD E1000_RSRPD -+#define E1000_82542_TXDMAC E1000_TXDMAC -+#define E1000_82542_TDFHS E1000_TDFHS -+#define E1000_82542_TDFTS E1000_TDFTS -+#define E1000_82542_TDFPC E1000_TDFPC -+#define E1000_82542_TXDCTL E1000_TXDCTL -+#define E1000_82542_TADV E1000_TADV -+#define E1000_82542_TSPMT E1000_TSPMT -+#define E1000_82542_CRCERRS E1000_CRCERRS -+#define E1000_82542_ALGNERRC E1000_ALGNERRC -+#define E1000_82542_SYMERRS E1000_SYMERRS -+#define E1000_82542_RXERRC E1000_RXERRC -+#define E1000_82542_MPC E1000_MPC -+#define E1000_82542_SCC E1000_SCC -+#define E1000_82542_ECOL E1000_ECOL -+#define E1000_82542_MCC E1000_MCC -+#define E1000_82542_LATECOL E1000_LATECOL -+#define E1000_82542_COLC E1000_COLC -+#define E1000_82542_DC E1000_DC -+#define E1000_82542_TNCRS E1000_TNCRS -+#define E1000_82542_SEC E1000_SEC -+#define E1000_82542_CEXTERR E1000_CEXTERR -+#define E1000_82542_RLEC E1000_RLEC -+#define E1000_82542_XONRXC E1000_XONRXC -+#define E1000_82542_XONTXC E1000_XONTXC -+#define E1000_82542_XOFFRXC E1000_XOFFRXC -+#define E1000_82542_XOFFTXC E1000_XOFFTXC -+#define E1000_82542_FCRUC E1000_FCRUC -+#define E1000_82542_PRC64 E1000_PRC64 -+#define E1000_82542_PRC127 E1000_PRC127 -+#define E1000_82542_PRC255 E1000_PRC255 -+#define E1000_82542_PRC511 E1000_PRC511 -+#define E1000_82542_PRC1023 E1000_PRC1023 -+#define E1000_82542_PRC1522 E1000_PRC1522 -+#define E1000_82542_GPRC E1000_GPRC -+#define E1000_82542_BPRC E1000_BPRC -+#define E1000_82542_MPRC E1000_MPRC -+#define E1000_82542_GPTC E1000_GPTC -+#define E1000_82542_GORCL E1000_GORCL -+#define E1000_82542_GORCH E1000_GORCH -+#define E1000_82542_GOTCL E1000_GOTCL -+#define E1000_82542_GOTCH E1000_GOTCH -+#define E1000_82542_RNBC E1000_RNBC -+#define E1000_82542_RUC E1000_RUC -+#define E1000_82542_RFC E1000_RFC -+#define E1000_82542_ROC E1000_ROC -+#define E1000_82542_RJC E1000_RJC -+#define E1000_82542_MGTPRC E1000_MGTPRC -+#define E1000_82542_MGTPDC E1000_MGTPDC -+#define E1000_82542_MGTPTC E1000_MGTPTC -+#define E1000_82542_TORL E1000_TORL -+#define E1000_82542_TORH E1000_TORH -+#define E1000_82542_TOTL E1000_TOTL -+#define E1000_82542_TOTH E1000_TOTH -+#define E1000_82542_TPR E1000_TPR -+#define E1000_82542_TPT E1000_TPT -+#define E1000_82542_PTC64 E1000_PTC64 -+#define E1000_82542_PTC127 E1000_PTC127 -+#define E1000_82542_PTC255 E1000_PTC255 -+#define E1000_82542_PTC511 E1000_PTC511 -+#define E1000_82542_PTC1023 E1000_PTC1023 -+#define E1000_82542_PTC1522 E1000_PTC1522 -+#define E1000_82542_MPTC E1000_MPTC -+#define E1000_82542_BPTC E1000_BPTC -+#define E1000_82542_TSCTC E1000_TSCTC -+#define E1000_82542_TSCTFC E1000_TSCTFC -+#define E1000_82542_RXCSUM E1000_RXCSUM -+#define E1000_82542_WUC E1000_WUC -+#define E1000_82542_WUFC E1000_WUFC -+#define E1000_82542_WUS E1000_WUS -+#define E1000_82542_MANC E1000_MANC -+#define E1000_82542_IPAV E1000_IPAV -+#define E1000_82542_IP4AT E1000_IP4AT -+#define E1000_82542_IP6AT E1000_IP6AT -+#define E1000_82542_WUPL E1000_WUPL -+#define E1000_82542_WUPM E1000_WUPM -+#define E1000_82542_FFLT E1000_FFLT -+#define E1000_82542_TDFH 0x08010 -+#define E1000_82542_TDFT 0x08018 -+#define E1000_82542_FFMT E1000_FFMT -+#define E1000_82542_FFVT E1000_FFVT -+ -+/* Statistics counters collected by the MAC */ -+struct e1000_hw_stats { -+ uint64_t crcerrs; -+ uint64_t algnerrc; -+ uint64_t symerrs; -+ uint64_t rxerrc; -+ uint64_t mpc; -+ uint64_t scc; -+ uint64_t ecol; -+ uint64_t mcc; -+ uint64_t latecol; -+ uint64_t colc; -+ uint64_t dc; -+ uint64_t tncrs; -+ uint64_t sec; -+ uint64_t cexterr; -+ uint64_t rlec; -+ uint64_t xonrxc; -+ uint64_t xontxc; -+ uint64_t xoffrxc; -+ uint64_t xofftxc; -+ uint64_t fcruc; -+ uint64_t prc64; -+ uint64_t prc127; -+ uint64_t prc255; -+ uint64_t prc511; -+ uint64_t prc1023; -+ uint64_t prc1522; -+ uint64_t gprc; -+ uint64_t bprc; -+ uint64_t mprc; -+ uint64_t gptc; -+ uint64_t gorcl; -+ uint64_t gorch; -+ uint64_t gotcl; -+ uint64_t gotch; -+ uint64_t rnbc; -+ uint64_t ruc; -+ uint64_t rfc; -+ uint64_t roc; -+ uint64_t rjc; -+ uint64_t mgprc; -+ uint64_t mgpdc; -+ uint64_t mgptc; -+ uint64_t torl; -+ uint64_t torh; -+ uint64_t totl; -+ uint64_t toth; -+ uint64_t tpr; -+ uint64_t tpt; -+ uint64_t ptc64; -+ uint64_t ptc127; -+ uint64_t ptc255; -+ uint64_t ptc511; -+ uint64_t ptc1023; -+ uint64_t ptc1522; -+ uint64_t mptc; -+ uint64_t bptc; -+ uint64_t tsctc; -+ uint64_t tsctfc; -+}; -+ -+/* Structure containing variables used by the shared code (e1000_hw.c) */ -+struct e1000_hw { -+ struct pci_device *pdev; -+ uint8_t *hw_addr; -+ e1000_mac_type mac_type; -+ e1000_phy_type phy_type; -+#if 0 -+ uint32_t phy_init_script; -+#endif -+ e1000_media_type media_type; -+ e1000_fc_type fc; -+#if 0 -+ e1000_bus_speed bus_speed; -+ e1000_bus_width bus_width; -+ e1000_bus_type bus_type; -+#endif -+ struct e1000_eeprom_info eeprom; -+#if 0 -+ e1000_ms_type master_slave; -+ e1000_ms_type original_master_slave; -+ e1000_ffe_config ffe_config_state; -+#endif -+ uint32_t io_base; -+ uint32_t phy_id; -+#ifdef LINUX_DRIVER -+ uint32_t phy_revision; -+#endif -+ uint32_t phy_addr; -+#if 0 -+ uint32_t original_fc; -+#endif -+ uint32_t txcw; -+ uint32_t autoneg_failed; -+#if 0 -+ uint32_t max_frame_size; -+ uint32_t min_frame_size; -+ uint32_t mc_filter_type; -+ uint32_t num_mc_addrs; -+ uint32_t collision_delta; -+ uint32_t tx_packet_delta; -+ uint32_t ledctl_default; -+ uint32_t ledctl_mode1; -+ uint32_t ledctl_mode2; -+ uint16_t phy_spd_default; -+#endif -+ uint16_t autoneg_advertised; -+ uint16_t pci_cmd_word; -+#if 0 -+ uint16_t fc_high_water; -+ uint16_t fc_low_water; -+ uint16_t fc_pause_time; -+ uint16_t current_ifs_val; -+ uint16_t ifs_min_val; -+ uint16_t ifs_max_val; -+ uint16_t ifs_step_size; -+ uint16_t ifs_ratio; -+#endif -+ uint16_t device_id; -+ uint16_t vendor_id; -+#if 0 -+ uint16_t subsystem_id; -+ uint16_t subsystem_vendor_id; -+#endif -+ uint8_t revision_id; -+#if 0 -+ uint8_t autoneg; -+ uint8_t mdix; -+ uint8_t forced_speed_duplex; -+ uint8_t wait_autoneg_complete; -+ uint8_t dma_fairness; -+#endif -+ uint8_t mac_addr[NODE_ADDRESS_SIZE]; -+#if 0 -+ uint8_t perm_mac_addr[NODE_ADDRESS_SIZE]; -+ boolean_t disable_polarity_correction; -+ boolean_t speed_downgraded; -+ e1000_dsp_config dsp_config_state; -+ boolean_t get_link_status; -+ boolean_t serdes_link_down; -+#endif -+ boolean_t tbi_compatibility_en; -+ boolean_t tbi_compatibility_on; -+#if 0 -+ boolean_t phy_reset_disable; -+ boolean_t fc_send_xon; -+ boolean_t fc_strict_ieee; -+ boolean_t report_tx_early; -+ boolean_t adaptive_ifs; -+ boolean_t ifs_params_forced; -+ boolean_t in_ifs_mode; -+#endif -+}; -+ -+ -+#define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ -+#define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ -+ -+/* Register Bit Masks */ -+/* Device Control */ -+#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ -+#define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */ -+#define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */ -+#define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */ -+#define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */ -+#define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */ -+#define E1000_CTRL_ASDE 0x00000020 /* Auto-speed detect enable */ -+#define E1000_CTRL_SLU 0x00000040 /* Set link up (Force Link) */ -+#define E1000_CTRL_ILOS 0x00000080 /* Invert Loss-Of Signal */ -+#define E1000_CTRL_SPD_SEL 0x00000300 /* Speed Select Mask */ -+#define E1000_CTRL_SPD_10 0x00000000 /* Force 10Mb */ -+#define E1000_CTRL_SPD_100 0x00000100 /* Force 100Mb */ -+#define E1000_CTRL_SPD_1000 0x00000200 /* Force 1Gb */ -+#define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */ -+#define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */ -+#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ -+#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ -+#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ -+#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ -+#define E1000_CTRL_SWDPIN3 0x00200000 /* SWDPIN 3 value */ -+#define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */ -+#define E1000_CTRL_SWDPIO1 0x00800000 /* SWDPIN 1 input or output */ -+#define E1000_CTRL_SWDPIO2 0x01000000 /* SWDPIN 2 input or output */ -+#define E1000_CTRL_SWDPIO3 0x02000000 /* SWDPIN 3 input or output */ -+#define E1000_CTRL_RST 0x04000000 /* Global reset */ -+#define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */ -+#define E1000_CTRL_TFCE 0x10000000 /* Transmit flow control enable */ -+#define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */ -+#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */ -+#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */ -+ -+/* Device Status */ -+#define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ -+#define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ -+#define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ -+#define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */ -+#define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */ -+#define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */ -+#define E1000_STATUS_TBIMODE 0x00000020 /* TBI mode */ -+#define E1000_STATUS_SPEED_MASK 0x000000C0 -+#define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */ -+#define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ -+#define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ -+#define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ -+#define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */ -+#define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */ -+#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ -+#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ -+#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ -+ -+/* Constants used to intrepret the masked PCI-X bus speed. */ -+#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ -+#define E1000_STATUS_PCIX_SPEED_100 0x00004000 /* PCI-X bus speed 66-100 MHz */ -+#define E1000_STATUS_PCIX_SPEED_133 0x00008000 /* PCI-X bus speed 100-133 MHz */ -+ -+/* EEPROM/Flash Control */ -+#define E1000_EECD_SK 0x00000001 /* EEPROM Clock */ -+#define E1000_EECD_CS 0x00000002 /* EEPROM Chip Select */ -+#define E1000_EECD_DI 0x00000004 /* EEPROM Data In */ -+#define E1000_EECD_DO 0x00000008 /* EEPROM Data Out */ -+#define E1000_EECD_FWE_MASK 0x00000030 -+#define E1000_EECD_FWE_DIS 0x00000010 /* Disable FLASH writes */ -+#define E1000_EECD_FWE_EN 0x00000020 /* Enable FLASH writes */ -+#define E1000_EECD_FWE_SHIFT 4 -+#define E1000_EECD_REQ 0x00000040 /* EEPROM Access Request */ -+#define E1000_EECD_GNT 0x00000080 /* EEPROM Access Grant */ -+#define E1000_EECD_PRES 0x00000100 /* EEPROM Present */ -+#define E1000_EECD_SIZE 0x00000200 /* EEPROM Size (0=64 word 1=256 word) */ -+#define E1000_EECD_ADDR_BITS 0x00000400 /* EEPROM Addressing bits based on type -+ * (0-small, 1-large) */ -+#define E1000_EECD_TYPE 0x00002000 /* EEPROM Type (1-SPI, 0-Microwire) */ -+#ifndef E1000_EEPROM_GRANT_ATTEMPTS -+#define E1000_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM # attempts to gain grant */ -+#endif -+ -+/* EEPROM Read */ -+#define E1000_EERD_START 0x00000001 /* Start Read */ -+#define E1000_EERD_DONE 0x00000010 /* Read Done */ -+#define E1000_EERD_ADDR_SHIFT 8 -+#define E1000_EERD_ADDR_MASK 0x0000FF00 /* Read Address */ -+#define E1000_EERD_DATA_SHIFT 16 -+#define E1000_EERD_DATA_MASK 0xFFFF0000 /* Read Data */ -+ -+/* SPI EEPROM Status Register */ -+#define EEPROM_STATUS_RDY_SPI 0x01 -+#define EEPROM_STATUS_WEN_SPI 0x02 -+#define EEPROM_STATUS_BP0_SPI 0x04 -+#define EEPROM_STATUS_BP1_SPI 0x08 -+#define EEPROM_STATUS_WPEN_SPI 0x80 -+ -+/* Extended Device Control */ -+#define E1000_CTRL_EXT_GPI0_EN 0x00000001 /* Maps SDP4 to GPI0 */ -+#define E1000_CTRL_EXT_GPI1_EN 0x00000002 /* Maps SDP5 to GPI1 */ -+#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN -+#define E1000_CTRL_EXT_GPI2_EN 0x00000004 /* Maps SDP6 to GPI2 */ -+#define E1000_CTRL_EXT_GPI3_EN 0x00000008 /* Maps SDP7 to GPI3 */ -+#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* Value of SW Defineable Pin 4 */ -+#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* Value of SW Defineable Pin 5 */ -+#define E1000_CTRL_EXT_PHY_INT E1000_CTRL_EXT_SDP5_DATA -+#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* Value of SW Defineable Pin 6 */ -+#define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ -+#define E1000_CTRL_EXT_SDP4_DIR 0x00000100 /* Direction of SDP4 0=in 1=out */ -+#define E1000_CTRL_EXT_SDP5_DIR 0x00000200 /* Direction of SDP5 0=in 1=out */ -+#define E1000_CTRL_EXT_SDP6_DIR 0x00000400 /* Direction of SDP6 0=in 1=out */ -+#define E1000_CTRL_EXT_SDP7_DIR 0x00000800 /* Direction of SDP7 0=in 1=out */ -+#define E1000_CTRL_EXT_ASDCHK 0x00001000 /* Initiate an ASD sequence */ -+#define E1000_CTRL_EXT_EE_RST 0x00002000 /* Reinitialize from EEPROM */ -+#define E1000_CTRL_EXT_IPS 0x00004000 /* Invert Power State */ -+#define E1000_CTRL_EXT_SPD_BYPS 0x00008000 /* Speed Select Bypass */ -+#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 -+#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 -+#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 -+#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 -+#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 -+#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 -+#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 -+#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 -+ -+/* MDI Control */ -+#define E1000_MDIC_DATA_MASK 0x0000FFFF -+#define E1000_MDIC_REG_MASK 0x001F0000 -+#define E1000_MDIC_REG_SHIFT 16 -+#define E1000_MDIC_PHY_MASK 0x03E00000 -+#define E1000_MDIC_PHY_SHIFT 21 -+#define E1000_MDIC_OP_WRITE 0x04000000 -+#define E1000_MDIC_OP_READ 0x08000000 -+#define E1000_MDIC_READY 0x10000000 -+#define E1000_MDIC_INT_EN 0x20000000 -+#define E1000_MDIC_ERROR 0x40000000 -+ -+/* LED Control */ -+#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F -+#define E1000_LEDCTL_LED0_MODE_SHIFT 0 -+#define E1000_LEDCTL_LED0_IVRT 0x00000040 -+#define E1000_LEDCTL_LED0_BLINK 0x00000080 -+#define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00 -+#define E1000_LEDCTL_LED1_MODE_SHIFT 8 -+#define E1000_LEDCTL_LED1_IVRT 0x00004000 -+#define E1000_LEDCTL_LED1_BLINK 0x00008000 -+#define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000 -+#define E1000_LEDCTL_LED2_MODE_SHIFT 16 -+#define E1000_LEDCTL_LED2_IVRT 0x00400000 -+#define E1000_LEDCTL_LED2_BLINK 0x00800000 -+#define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000 -+#define E1000_LEDCTL_LED3_MODE_SHIFT 24 -+#define E1000_LEDCTL_LED3_IVRT 0x40000000 -+#define E1000_LEDCTL_LED3_BLINK 0x80000000 -+ -+#define E1000_LEDCTL_MODE_LINK_10_1000 0x0 -+#define E1000_LEDCTL_MODE_LINK_100_1000 0x1 -+#define E1000_LEDCTL_MODE_LINK_UP 0x2 -+#define E1000_LEDCTL_MODE_ACTIVITY 0x3 -+#define E1000_LEDCTL_MODE_LINK_ACTIVITY 0x4 -+#define E1000_LEDCTL_MODE_LINK_10 0x5 -+#define E1000_LEDCTL_MODE_LINK_100 0x6 -+#define E1000_LEDCTL_MODE_LINK_1000 0x7 -+#define E1000_LEDCTL_MODE_PCIX_MODE 0x8 -+#define E1000_LEDCTL_MODE_FULL_DUPLEX 0x9 -+#define E1000_LEDCTL_MODE_COLLISION 0xA -+#define E1000_LEDCTL_MODE_BUS_SPEED 0xB -+#define E1000_LEDCTL_MODE_BUS_SIZE 0xC -+#define E1000_LEDCTL_MODE_PAUSED 0xD -+#define E1000_LEDCTL_MODE_LED_ON 0xE -+#define E1000_LEDCTL_MODE_LED_OFF 0xF -+ -+/* Receive Address */ -+#define E1000_RAH_AV 0x80000000 /* Receive descriptor valid */ -+ -+/* Interrupt Cause Read */ -+#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */ -+#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */ -+#define E1000_ICR_LSC 0x00000004 /* Link Status Change */ -+#define E1000_ICR_RXSEQ 0x00000008 /* rx sequence error */ -+#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ -+#define E1000_ICR_RXO 0x00000040 /* rx overrun */ -+#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ -+#define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */ -+#define E1000_ICR_RXCFG 0x00000400 /* RX /c/ ordered set */ -+#define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */ -+#define E1000_ICR_GPI_EN1 0x00001000 /* GP Int 1 */ -+#define E1000_ICR_GPI_EN2 0x00002000 /* GP Int 2 */ -+#define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */ -+#define E1000_ICR_TXD_LOW 0x00008000 -+#define E1000_ICR_SRPD 0x00010000 -+ -+/* Interrupt Cause Set */ -+#define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ -+#define E1000_ICS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ -+#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ -+#define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ -+#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ -+#define E1000_ICS_RXO E1000_ICR_RXO /* rx overrun */ -+#define E1000_ICS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ -+#define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */ -+#define E1000_ICS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ -+#define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ -+#define E1000_ICS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ -+#define E1000_ICS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ -+#define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ -+#define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW -+#define E1000_ICS_SRPD E1000_ICR_SRPD -+ -+/* Interrupt Mask Set */ -+#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ -+#define E1000_IMS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ -+#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */ -+#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ -+#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ -+#define E1000_IMS_RXO E1000_ICR_RXO /* rx overrun */ -+#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ -+#define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */ -+#define E1000_IMS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ -+#define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ -+#define E1000_IMS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ -+#define E1000_IMS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ -+#define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ -+#define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW -+#define E1000_IMS_SRPD E1000_ICR_SRPD -+ -+/* Interrupt Mask Clear */ -+#define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ -+#define E1000_IMC_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ -+#define E1000_IMC_LSC E1000_ICR_LSC /* Link Status Change */ -+#define E1000_IMC_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ -+#define E1000_IMC_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ -+#define E1000_IMC_RXO E1000_ICR_RXO /* rx overrun */ -+#define E1000_IMC_RXT0 E1000_ICR_RXT0 /* rx timer intr */ -+#define E1000_IMC_MDAC E1000_ICR_MDAC /* MDIO access complete */ -+#define E1000_IMC_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ -+#define E1000_IMC_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ -+#define E1000_IMC_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ -+#define E1000_IMC_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ -+#define E1000_IMC_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ -+#define E1000_IMC_TXD_LOW E1000_ICR_TXD_LOW -+#define E1000_IMC_SRPD E1000_ICR_SRPD -+ -+/* Receive Control */ -+#define E1000_RCTL_RST 0x00000001 /* Software reset */ -+#define E1000_RCTL_EN 0x00000002 /* enable */ -+#define E1000_RCTL_SBP 0x00000004 /* store bad packet */ -+#define E1000_RCTL_UPE 0x00000008 /* unicast promiscuous enable */ -+#define E1000_RCTL_MPE 0x00000010 /* multicast promiscuous enab */ -+#define E1000_RCTL_LPE 0x00000020 /* long packet enable */ -+#define E1000_RCTL_LBM_NO 0x00000000 /* no loopback mode */ -+#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ -+#define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */ -+#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ -+#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ -+#define E1000_RCTL_RDMTS_QUAT 0x00000100 /* rx desc min threshold size */ -+#define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* rx desc min threshold size */ -+#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ -+#define E1000_RCTL_MO_0 0x00000000 /* multicast offset 11:0 */ -+#define E1000_RCTL_MO_1 0x00001000 /* multicast offset 12:1 */ -+#define E1000_RCTL_MO_2 0x00002000 /* multicast offset 13:2 */ -+#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ -+#define E1000_RCTL_MDR 0x00004000 /* multicast desc ring 0 */ -+#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ -+/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */ -+#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */ -+#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */ -+#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */ -+#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */ -+/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */ -+#define E1000_RCTL_SZ_16384 0x00010000 /* rx buffer size 16384 */ -+#define E1000_RCTL_SZ_8192 0x00020000 /* rx buffer size 8192 */ -+#define E1000_RCTL_SZ_4096 0x00030000 /* rx buffer size 4096 */ -+#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */ -+#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */ -+#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */ -+#define E1000_RCTL_DPF 0x00400000 /* discard pause frames */ -+#define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */ -+#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ -+ -+/* Receive Descriptor */ -+#define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ -+#define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ -+#define E1000_RDLEN_LEN 0x0007ff80 /* descriptor length */ -+#define E1000_RDH_RDH 0x0000ffff /* receive descriptor head */ -+#define E1000_RDT_RDT 0x0000ffff /* receive descriptor tail */ -+ -+/* Flow Control */ -+#define E1000_FCRTH_RTH 0x0000FFF8 /* Mask Bits[15:3] for RTH */ -+#define E1000_FCRTH_XFCE 0x80000000 /* External Flow Control Enable */ -+#define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */ -+#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ -+ -+/* Receive Descriptor Control */ -+#define E1000_RXDCTL_PTHRESH 0x0000003F /* RXDCTL Prefetch Threshold */ -+#define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ -+#define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */ -+#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */ -+ -+/* Transmit Descriptor Control */ -+#define E1000_TXDCTL_PTHRESH 0x000000FF /* TXDCTL Prefetch Threshold */ -+#define E1000_TXDCTL_HTHRESH 0x0000FF00 /* TXDCTL Host Threshold */ -+#define E1000_TXDCTL_WTHRESH 0x00FF0000 /* TXDCTL Writeback Threshold */ -+#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */ -+#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */ -+#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ -+ -+/* Transmit Configuration Word */ -+#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */ -+#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */ -+#define E1000_TXCW_PAUSE 0x00000080 /* TXCW sym pause request */ -+#define E1000_TXCW_ASM_DIR 0x00000100 /* TXCW astm pause direction */ -+#define E1000_TXCW_PAUSE_MASK 0x00000180 /* TXCW pause request mask */ -+#define E1000_TXCW_RF 0x00003000 /* TXCW remote fault */ -+#define E1000_TXCW_NP 0x00008000 /* TXCW next page */ -+#define E1000_TXCW_CW 0x0000ffff /* TxConfigWord mask */ -+#define E1000_TXCW_TXC 0x40000000 /* Transmit Config control */ -+#define E1000_TXCW_ANE 0x80000000 /* Auto-neg enable */ -+ -+/* Receive Configuration Word */ -+#define E1000_RXCW_CW 0x0000ffff /* RxConfigWord mask */ -+#define E1000_RXCW_NC 0x04000000 /* Receive config no carrier */ -+#define E1000_RXCW_IV 0x08000000 /* Receive config invalid */ -+#define E1000_RXCW_CC 0x10000000 /* Receive config change */ -+#define E1000_RXCW_C 0x20000000 /* Receive config */ -+#define E1000_RXCW_SYNCH 0x40000000 /* Receive config synch */ -+#define E1000_RXCW_ANC 0x80000000 /* Auto-neg complete */ -+ -+/* Transmit Control */ -+#define E1000_TCTL_RST 0x00000001 /* software reset */ -+#define E1000_TCTL_EN 0x00000002 /* enable tx */ -+#define E1000_TCTL_BCE 0x00000004 /* busy check enable */ -+#define E1000_TCTL_PSP 0x00000008 /* pad short packets */ -+#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */ -+#define E1000_TCTL_COLD 0x003ff000 /* collision distance */ -+#define E1000_TCTL_SWXOFF 0x00400000 /* SW Xoff transmission */ -+#define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */ -+#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ -+#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ -+ -+/* Receive Checksum Control */ -+#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ -+#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ -+#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ -+#define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */ -+ -+/* Definitions for power management and wakeup registers */ -+/* Wake Up Control */ -+#define E1000_WUC_APME 0x00000001 /* APM Enable */ -+#define E1000_WUC_PME_EN 0x00000002 /* PME Enable */ -+#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */ -+#define E1000_WUC_APMPME 0x00000008 /* Assert PME on APM Wakeup */ -+#define E1000_WUC_SPM 0x80000000 /* Enable SPM */ -+ -+/* Wake Up Filter Control */ -+#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */ -+#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */ -+#define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ -+#define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ -+#define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ -+#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ -+#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */ -+#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */ -+#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */ -+#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */ -+#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */ -+#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */ -+#define E1000_WUFC_ALL_FILTERS 0x000F00FF /* Mask for all wakeup filters */ -+#define E1000_WUFC_FLX_OFFSET 16 /* Offset to the Flexible Filters bits */ -+#define E1000_WUFC_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ -+ -+/* Wake Up Status */ -+#define E1000_WUS_LNKC 0x00000001 /* Link Status Changed */ -+#define E1000_WUS_MAG 0x00000002 /* Magic Packet Received */ -+#define E1000_WUS_EX 0x00000004 /* Directed Exact Received */ -+#define E1000_WUS_MC 0x00000008 /* Directed Multicast Received */ -+#define E1000_WUS_BC 0x00000010 /* Broadcast Received */ -+#define E1000_WUS_ARP 0x00000020 /* ARP Request Packet Received */ -+#define E1000_WUS_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Received */ -+#define E1000_WUS_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Received */ -+#define E1000_WUS_FLX0 0x00010000 /* Flexible Filter 0 Match */ -+#define E1000_WUS_FLX1 0x00020000 /* Flexible Filter 1 Match */ -+#define E1000_WUS_FLX2 0x00040000 /* Flexible Filter 2 Match */ -+#define E1000_WUS_FLX3 0x00080000 /* Flexible Filter 3 Match */ -+#define E1000_WUS_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ -+ -+/* Management Control */ -+#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */ -+#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */ -+#define E1000_MANC_R_ON_FORCE 0x00000004 /* Reset on Force TCO - RO */ -+#define E1000_MANC_RMCP_EN 0x00000100 /* Enable RCMP 026Fh Filtering */ -+#define E1000_MANC_0298_EN 0x00000200 /* Enable RCMP 0298h Filtering */ -+#define E1000_MANC_IPV4_EN 0x00000400 /* Enable IPv4 */ -+#define E1000_MANC_IPV6_EN 0x00000800 /* Enable IPv6 */ -+#define E1000_MANC_SNAP_EN 0x00001000 /* Accept LLC/SNAP */ -+#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ -+#define E1000_MANC_NEIGHBOR_EN 0x00004000 /* Enable Neighbor Discovery -+ * Filtering */ -+#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ -+#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ -+#define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ -+#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ -+#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ -+#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ -+#define E1000_MANC_SMB_DATA_IN 0x08000000 /* SMBus Data In */ -+#define E1000_MANC_SMB_DATA_OUT 0x10000000 /* SMBus Data Out */ -+#define E1000_MANC_SMB_CLK_OUT 0x20000000 /* SMBus Clock Out */ -+ -+#define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ -+#define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ -+ -+/* Wake Up Packet Length */ -+#define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */ -+ -+#define E1000_MDALIGN 4096 -+ -+/* EEPROM Commands - Microwire */ -+#define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ -+#define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ -+#define EEPROM_ERASE_OPCODE_MICROWIRE 0x7 /* EEPROM erase opcode */ -+#define EEPROM_EWEN_OPCODE_MICROWIRE 0x13 /* EEPROM erase/write enable */ -+#define EEPROM_EWDS_OPCODE_MICROWIRE 0x10 /* EEPROM erast/write disable */ -+ -+/* EEPROM Commands - SPI */ -+#define EEPROM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ -+#define EEPROM_READ_OPCODE_SPI 0x3 /* EEPROM read opcode */ -+#define EEPROM_WRITE_OPCODE_SPI 0x2 /* EEPROM write opcode */ -+#define EEPROM_A8_OPCODE_SPI 0x8 /* opcode bit-3 = address bit-8 */ -+#define EEPROM_WREN_OPCODE_SPI 0x6 /* EEPROM set Write Enable latch */ -+#define EEPROM_WRDI_OPCODE_SPI 0x4 /* EEPROM reset Write Enable latch */ -+#define EEPROM_RDSR_OPCODE_SPI 0x5 /* EEPROM read Status register */ -+#define EEPROM_WRSR_OPCODE_SPI 0x1 /* EEPROM write Status register */ -+ -+/* EEPROM Size definitions */ -+#define EEPROM_SIZE_16KB 0x1800 -+#define EEPROM_SIZE_8KB 0x1400 -+#define EEPROM_SIZE_4KB 0x1000 -+#define EEPROM_SIZE_2KB 0x0C00 -+#define EEPROM_SIZE_1KB 0x0800 -+#define EEPROM_SIZE_512B 0x0400 -+#define EEPROM_SIZE_128B 0x0000 -+#define EEPROM_SIZE_MASK 0x1C00 -+ -+/* EEPROM Word Offsets */ -+#define EEPROM_COMPAT 0x0003 -+#define EEPROM_ID_LED_SETTINGS 0x0004 -+#define EEPROM_SERDES_AMPLITUDE 0x0006 /* For SERDES output amplitude adjustment. */ -+#define EEPROM_INIT_CONTROL1_REG 0x000A -+#define EEPROM_INIT_CONTROL2_REG 0x000F -+#define EEPROM_INIT_CONTROL3_PORT_B 0x0014 -+#define EEPROM_INIT_CONTROL3_PORT_A 0x0024 -+#define EEPROM_CFG 0x0012 -+#define EEPROM_FLASH_VERSION 0x0032 -+#define EEPROM_CHECKSUM_REG 0x003F -+ -+/* Word definitions for ID LED Settings */ -+#define ID_LED_RESERVED_0000 0x0000 -+#define ID_LED_RESERVED_FFFF 0xFFFF -+#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \ -+ (ID_LED_OFF1_OFF2 << 8) | \ -+ (ID_LED_DEF1_DEF2 << 4) | \ -+ (ID_LED_DEF1_DEF2)) -+#define ID_LED_DEF1_DEF2 0x1 -+#define ID_LED_DEF1_ON2 0x2 -+#define ID_LED_DEF1_OFF2 0x3 -+#define ID_LED_ON1_DEF2 0x4 -+#define ID_LED_ON1_ON2 0x5 -+#define ID_LED_ON1_OFF2 0x6 -+#define ID_LED_OFF1_DEF2 0x7 -+#define ID_LED_OFF1_ON2 0x8 -+#define ID_LED_OFF1_OFF2 0x9 -+ -+#define IGP_ACTIVITY_LED_MASK 0xFFFFF0FF -+#define IGP_ACTIVITY_LED_ENABLE 0x0300 -+#define IGP_LED3_MODE 0x07000000 -+ -+ -+/* Mask bits for SERDES amplitude adjustment in Word 6 of the EEPROM */ -+#define EEPROM_SERDES_AMPLITUDE_MASK 0x000F -+ -+/* Mask bits for fields in Word 0x0a of the EEPROM */ -+#define EEPROM_WORD0A_ILOS 0x0010 -+#define EEPROM_WORD0A_SWDPIO 0x01E0 -+#define EEPROM_WORD0A_LRST 0x0200 -+#define EEPROM_WORD0A_FD 0x0400 -+#define EEPROM_WORD0A_66MHZ 0x0800 -+ -+/* Mask bits for fields in Word 0x0f of the EEPROM */ -+#define EEPROM_WORD0F_PAUSE_MASK 0x3000 -+#define EEPROM_WORD0F_PAUSE 0x1000 -+#define EEPROM_WORD0F_ASM_DIR 0x2000 -+#define EEPROM_WORD0F_ANE 0x0800 -+#define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 -+ -+/* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ -+#define EEPROM_SUM 0xBABA -+ -+/* EEPROM Map defines (WORD OFFSETS)*/ -+#define EEPROM_NODE_ADDRESS_BYTE_0 0 -+#define EEPROM_PBA_BYTE_1 8 -+ -+#define EEPROM_RESERVED_WORD 0xFFFF -+ -+/* EEPROM Map Sizes (Byte Counts) */ -+#define PBA_SIZE 4 -+ -+/* Collision related configuration parameters */ -+#define E1000_COLLISION_THRESHOLD 16 -+#define E1000_CT_SHIFT 4 -+#define E1000_COLLISION_DISTANCE 64 -+#define E1000_FDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE -+#define E1000_HDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE -+#define E1000_COLD_SHIFT 12 -+ -+/* Number of Transmit and Receive Descriptors must be a multiple of 8 */ -+#define REQ_TX_DESCRIPTOR_MULTIPLE 8 -+#define REQ_RX_DESCRIPTOR_MULTIPLE 8 -+ -+/* Default values for the transmit IPG register */ -+#define DEFAULT_82542_TIPG_IPGT 10 -+#define DEFAULT_82543_TIPG_IPGT_FIBER 9 -+#define DEFAULT_82543_TIPG_IPGT_COPPER 8 -+ -+#define E1000_TIPG_IPGT_MASK 0x000003FF -+#define E1000_TIPG_IPGR1_MASK 0x000FFC00 -+#define E1000_TIPG_IPGR2_MASK 0x3FF00000 -+ -+#define DEFAULT_82542_TIPG_IPGR1 2 -+#define DEFAULT_82543_TIPG_IPGR1 8 -+#define E1000_TIPG_IPGR1_SHIFT 10 -+ -+#define DEFAULT_82542_TIPG_IPGR2 10 -+#define DEFAULT_82543_TIPG_IPGR2 6 -+#define E1000_TIPG_IPGR2_SHIFT 20 -+ -+#define E1000_TXDMAC_DPP 0x00000001 -+ -+/* Adaptive IFS defines */ -+#define TX_THRESHOLD_START 8 -+#define TX_THRESHOLD_INCREMENT 10 -+#define TX_THRESHOLD_DECREMENT 1 -+#define TX_THRESHOLD_STOP 190 -+#define TX_THRESHOLD_DISABLE 0 -+#define TX_THRESHOLD_TIMER_MS 10000 -+#define MIN_NUM_XMITS 1000 -+#define IFS_MAX 80 -+#define IFS_STEP 10 -+#define IFS_MIN 40 -+#define IFS_RATIO 4 -+ -+/* PBA constants */ -+#define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ -+#define E1000_PBA_22K 0x0016 -+#define E1000_PBA_24K 0x0018 -+#define E1000_PBA_30K 0x001E -+#define E1000_PBA_40K 0x0028 -+#define E1000_PBA_48K 0x0030 /* 48KB, default RX allocation */ -+ -+/* Flow Control Constants */ -+#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 -+#define FLOW_CONTROL_ADDRESS_HIGH 0x00000100 -+#define FLOW_CONTROL_TYPE 0x8808 -+ -+/* The historical defaults for the flow control values are given below. */ -+#define FC_DEFAULT_HI_THRESH (0x8000) /* 32KB */ -+#define FC_DEFAULT_LO_THRESH (0x4000) /* 16KB */ -+#define FC_DEFAULT_TX_TIMER (0x100) /* ~130 us */ -+ -+/* PCIX Config space */ -+#define PCIX_COMMAND_REGISTER 0xE6 -+#define PCIX_STATUS_REGISTER_LO 0xE8 -+#define PCIX_STATUS_REGISTER_HI 0xEA -+ -+#define PCIX_COMMAND_MMRBC_MASK 0x000C -+#define PCIX_COMMAND_MMRBC_SHIFT 0x2 -+#define PCIX_STATUS_HI_MMRBC_MASK 0x0060 -+#define PCIX_STATUS_HI_MMRBC_SHIFT 0x5 -+#define PCIX_STATUS_HI_MMRBC_4K 0x3 -+#define PCIX_STATUS_HI_MMRBC_2K 0x2 -+ -+ -+/* Number of bits required to shift right the "pause" bits from the -+ * EEPROM (bits 13:12) to the "pause" (bits 8:7) field in the TXCW register. -+ */ -+#define PAUSE_SHIFT 5 -+ -+/* Number of bits required to shift left the "SWDPIO" bits from the -+ * EEPROM (bits 8:5) to the "SWDPIO" (bits 25:22) field in the CTRL register. -+ */ -+#define SWDPIO_SHIFT 17 -+ -+/* Number of bits required to shift left the "SWDPIO_EXT" bits from the -+ * EEPROM word F (bits 7:4) to the bits 11:8 of The Extended CTRL register. -+ */ -+#define SWDPIO__EXT_SHIFT 4 -+ -+/* Number of bits required to shift left the "ILOS" bit from the EEPROM -+ * (bit 4) to the "ILOS" (bit 7) field in the CTRL register. -+ */ -+#define ILOS_SHIFT 3 -+ -+ -+#define RECEIVE_BUFFER_ALIGN_SIZE (256) -+ -+/* Number of milliseconds we wait for auto-negotiation to complete */ -+#define LINK_UP_TIMEOUT 500 -+ -+#define E1000_TX_BUFFER_SIZE ((uint32_t)1514) -+ -+/* The carrier extension symbol, as received by the NIC. */ -+#define CARRIER_EXTENSION 0x0F -+ -+/* TBI_ACCEPT macro definition: -+ * -+ * This macro requires: -+ * adapter = a pointer to struct e1000_hw -+ * status = the 8 bit status field of the RX descriptor with EOP set -+ * error = the 8 bit error field of the RX descriptor with EOP set -+ * length = the sum of all the length fields of the RX descriptors that -+ * make up the current frame -+ * last_byte = the last byte of the frame DMAed by the hardware -+ * max_frame_length = the maximum frame length we want to accept. -+ * min_frame_length = the minimum frame length we want to accept. -+ * -+ * This macro is a conditional that should be used in the interrupt -+ * handler's Rx processing routine when RxErrors have been detected. -+ * -+ * Typical use: -+ * ... -+ * if (TBI_ACCEPT) { -+ * accept_frame = TRUE; -+ * e1000_tbi_adjust_stats(adapter, MacAddress); -+ * frame_length--; -+ * } else { -+ * accept_frame = FALSE; -+ * } -+ * ... -+ */ -+ -+#define TBI_ACCEPT(adapter, status, errors, length, last_byte) \ -+ ((adapter)->tbi_compatibility_on && \ -+ (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \ -+ ((last_byte) == CARRIER_EXTENSION) && \ -+ (((status) & E1000_RXD_STAT_VP) ? \ -+ (((length) > ((adapter)->min_frame_size - VLAN_TAG_SIZE)) && \ -+ ((length) <= ((adapter)->max_frame_size + 1))) : \ -+ (((length) > (adapter)->min_frame_size) && \ -+ ((length) <= ((adapter)->max_frame_size + VLAN_TAG_SIZE + 1))))) -+ -+ -+/* Structures, enums, and macros for the PHY */ -+ -+/* Bit definitions for the Management Data IO (MDIO) and Management Data -+ * Clock (MDC) pins in the Device Control Register. -+ */ -+#define E1000_CTRL_PHY_RESET_DIR E1000_CTRL_SWDPIO0 -+#define E1000_CTRL_PHY_RESET E1000_CTRL_SWDPIN0 -+#define E1000_CTRL_MDIO_DIR E1000_CTRL_SWDPIO2 -+#define E1000_CTRL_MDIO E1000_CTRL_SWDPIN2 -+#define E1000_CTRL_MDC_DIR E1000_CTRL_SWDPIO3 -+#define E1000_CTRL_MDC E1000_CTRL_SWDPIN3 -+#define E1000_CTRL_PHY_RESET_DIR4 E1000_CTRL_EXT_SDP4_DIR -+#define E1000_CTRL_PHY_RESET4 E1000_CTRL_EXT_SDP4_DATA -+ -+/* PHY 1000 MII Register/Bit Definitions */ -+/* PHY Registers defined by IEEE */ -+#define PHY_CTRL 0x00 /* Control Register */ -+#define PHY_STATUS 0x01 /* Status Regiser */ -+#define PHY_ID1 0x02 /* Phy Id Reg (word 1) */ -+#define PHY_ID2 0x03 /* Phy Id Reg (word 2) */ -+#define PHY_AUTONEG_ADV 0x04 /* Autoneg Advertisement */ -+#define PHY_LP_ABILITY 0x05 /* Link Partner Ability (Base Page) */ -+#define PHY_AUTONEG_EXP 0x06 /* Autoneg Expansion Reg */ -+#define PHY_NEXT_PAGE_TX 0x07 /* Next Page TX */ -+#define PHY_LP_NEXT_PAGE 0x08 /* Link Partner Next Page */ -+#define PHY_1000T_CTRL 0x09 /* 1000Base-T Control Reg */ -+#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */ -+#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */ -+ -+/* M88E1000 Specific Registers */ -+#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ -+#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */ -+#define M88E1000_INT_ENABLE 0x12 /* Interrupt Enable Register */ -+#define M88E1000_INT_STATUS 0x13 /* Interrupt Status Register */ -+#define M88E1000_EXT_PHY_SPEC_CTRL 0x14 /* Extended PHY Specific Control */ -+#define M88E1000_RX_ERR_CNTR 0x15 /* Receive Error Counter */ -+ -+#define M88E1000_PHY_EXT_CTRL 0x1A /* PHY extend control register */ -+#define M88E1000_PHY_PAGE_SELECT 0x1D /* Reg 29 for page number setting */ -+#define M88E1000_PHY_GEN_CONTROL 0x1E /* Its meaning depends on reg 29 */ -+#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */ -+#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */ -+ -+#define IGP01E1000_IEEE_REGS_PAGE 0x0000 -+#define IGP01E1000_IEEE_RESTART_AUTONEG 0x3300 -+#define IGP01E1000_IEEE_FORCE_GIGA 0x0140 -+ -+/* IGP01E1000 Specific Registers */ -+#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* PHY Specific Port Config Register */ -+#define IGP01E1000_PHY_PORT_STATUS 0x11 /* PHY Specific Status Register */ -+#define IGP01E1000_PHY_PORT_CTRL 0x12 /* PHY Specific Control Register */ -+#define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health Register */ -+#define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO Register */ -+#define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality Register */ -+#define IGP01E1000_PHY_PAGE_SELECT 0x1F /* PHY Page Select Core Register */ -+ -+/* IGP01E1000 AGC Registers - stores the cable length values*/ -+#define IGP01E1000_PHY_AGC_A 0x1172 -+#define IGP01E1000_PHY_AGC_B 0x1272 -+#define IGP01E1000_PHY_AGC_C 0x1472 -+#define IGP01E1000_PHY_AGC_D 0x1872 -+ -+/* IGP01E1000 DSP Reset Register */ -+#define IGP01E1000_PHY_DSP_RESET 0x1F33 -+#define IGP01E1000_PHY_DSP_SET 0x1F71 -+#define IGP01E1000_PHY_DSP_FFE 0x1F35 -+ -+#define IGP01E1000_PHY_CHANNEL_NUM 4 -+#define IGP01E1000_PHY_AGC_PARAM_A 0x1171 -+#define IGP01E1000_PHY_AGC_PARAM_B 0x1271 -+#define IGP01E1000_PHY_AGC_PARAM_C 0x1471 -+#define IGP01E1000_PHY_AGC_PARAM_D 0x1871 -+ -+#define IGP01E1000_PHY_EDAC_MU_INDEX 0xC000 -+#define IGP01E1000_PHY_EDAC_SIGN_EXT_9_BITS 0x8000 -+ -+#define IGP01E1000_PHY_ANALOG_TX_STATE 0x2890 -+#define IGP01E1000_PHY_ANALOG_CLASS_A 0x2000 -+#define IGP01E1000_PHY_FORCE_ANALOG_ENABLE 0x0004 -+#define IGP01E1000_PHY_DSP_FFE_CM_CP 0x0069 -+ -+#define IGP01E1000_PHY_DSP_FFE_DEFAULT 0x002A -+/* IGP01E1000 PCS Initialization register - stores the polarity status when -+ * speed = 1000 Mbps. */ -+#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4 -+#define IGP01E1000_PHY_PCS_CTRL_REG 0x00B5 -+ -+#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 -+ -+#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ -+#define MAX_PHY_MULTI_PAGE_REG 0xF /*Registers that are equal on all pages*/ -+/* PHY Control Register */ -+#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ -+#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */ -+#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */ -+#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */ -+#define MII_CR_ISOLATE 0x0400 /* Isolate PHY from MII */ -+#define MII_CR_POWER_DOWN 0x0800 /* Power down */ -+#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ -+#define MII_CR_SPEED_SELECT_LSB 0x2000 /* bits 6,13: 10=1000, 01=100, 00=10 */ -+#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ -+#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */ -+ -+/* PHY Status Register */ -+#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */ -+#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */ -+#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */ -+#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */ -+#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */ -+#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */ -+#define MII_SR_PREAMBLE_SUPPRESS 0x0040 /* Preamble may be suppressed */ -+#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */ -+#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */ -+#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */ -+#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */ -+#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */ -+#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */ -+#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */ -+#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */ -+ -+/* Autoneg Advertisement Register */ -+#define NWAY_AR_SELECTOR_FIELD 0x0001 /* indicates IEEE 802.3 CSMA/CD */ -+#define NWAY_AR_10T_HD_CAPS 0x0020 /* 10T Half Duplex Capable */ -+#define NWAY_AR_10T_FD_CAPS 0x0040 /* 10T Full Duplex Capable */ -+#define NWAY_AR_100TX_HD_CAPS 0x0080 /* 100TX Half Duplex Capable */ -+#define NWAY_AR_100TX_FD_CAPS 0x0100 /* 100TX Full Duplex Capable */ -+#define NWAY_AR_100T4_CAPS 0x0200 /* 100T4 Capable */ -+#define NWAY_AR_PAUSE 0x0400 /* Pause operation desired */ -+#define NWAY_AR_ASM_DIR 0x0800 /* Asymmetric Pause Direction bit */ -+#define NWAY_AR_REMOTE_FAULT 0x2000 /* Remote Fault detected */ -+#define NWAY_AR_NEXT_PAGE 0x8000 /* Next Page ability supported */ -+ -+/* Link Partner Ability Register (Base Page) */ -+#define NWAY_LPAR_SELECTOR_FIELD 0x0000 /* LP protocol selector field */ -+#define NWAY_LPAR_10T_HD_CAPS 0x0020 /* LP is 10T Half Duplex Capable */ -+#define NWAY_LPAR_10T_FD_CAPS 0x0040 /* LP is 10T Full Duplex Capable */ -+#define NWAY_LPAR_100TX_HD_CAPS 0x0080 /* LP is 100TX Half Duplex Capable */ -+#define NWAY_LPAR_100TX_FD_CAPS 0x0100 /* LP is 100TX Full Duplex Capable */ -+#define NWAY_LPAR_100T4_CAPS 0x0200 /* LP is 100T4 Capable */ -+#define NWAY_LPAR_PAUSE 0x0400 /* LP Pause operation desired */ -+#define NWAY_LPAR_ASM_DIR 0x0800 /* LP Asymmetric Pause Direction bit */ -+#define NWAY_LPAR_REMOTE_FAULT 0x2000 /* LP has detected Remote Fault */ -+#define NWAY_LPAR_ACKNOWLEDGE 0x4000 /* LP has rx'd link code word */ -+#define NWAY_LPAR_NEXT_PAGE 0x8000 /* Next Page ability supported */ -+ -+/* Autoneg Expansion Register */ -+#define NWAY_ER_LP_NWAY_CAPS 0x0001 /* LP has Auto Neg Capability */ -+#define NWAY_ER_PAGE_RXD 0x0002 /* LP is 10T Half Duplex Capable */ -+#define NWAY_ER_NEXT_PAGE_CAPS 0x0004 /* LP is 10T Full Duplex Capable */ -+#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008 /* LP is 100TX Half Duplex Capable */ -+#define NWAY_ER_PAR_DETECT_FAULT 0x0010 /* LP is 100TX Full Duplex Capable */ -+ -+/* Next Page TX Register */ -+#define NPTX_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ -+#define NPTX_TOGGLE 0x0800 /* Toggles between exchanges -+ * of different NP -+ */ -+#define NPTX_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg -+ * 0 = cannot comply with msg -+ */ -+#define NPTX_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ -+#define NPTX_NEXT_PAGE 0x8000 /* 1 = addition NP will follow -+ * 0 = sending last NP -+ */ -+ -+/* Link Partner Next Page Register */ -+#define LP_RNPR_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ -+#define LP_RNPR_TOGGLE 0x0800 /* Toggles between exchanges -+ * of different NP -+ */ -+#define LP_RNPR_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg -+ * 0 = cannot comply with msg -+ */ -+#define LP_RNPR_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ -+#define LP_RNPR_ACKNOWLDGE 0x4000 /* 1 = ACK / 0 = NO ACK */ -+#define LP_RNPR_NEXT_PAGE 0x8000 /* 1 = addition NP will follow -+ * 0 = sending last NP -+ */ -+ -+/* 1000BASE-T Control Register */ -+#define CR_1000T_ASYM_PAUSE 0x0080 /* Advertise asymmetric pause bit */ -+#define CR_1000T_HD_CAPS 0x0100 /* Advertise 1000T HD capability */ -+#define CR_1000T_FD_CAPS 0x0200 /* Advertise 1000T FD capability */ -+#define CR_1000T_REPEATER_DTE 0x0400 /* 1=Repeater/switch device port */ -+ /* 0=DTE device */ -+#define CR_1000T_MS_VALUE 0x0800 /* 1=Configure PHY as Master */ -+ /* 0=Configure PHY as Slave */ -+#define CR_1000T_MS_ENABLE 0x1000 /* 1=Master/Slave manual config value */ -+ /* 0=Automatic Master/Slave config */ -+#define CR_1000T_TEST_MODE_NORMAL 0x0000 /* Normal Operation */ -+#define CR_1000T_TEST_MODE_1 0x2000 /* Transmit Waveform test */ -+#define CR_1000T_TEST_MODE_2 0x4000 /* Master Transmit Jitter test */ -+#define CR_1000T_TEST_MODE_3 0x6000 /* Slave Transmit Jitter test */ -+#define CR_1000T_TEST_MODE_4 0x8000 /* Transmitter Distortion test */ -+ -+/* 1000BASE-T Status Register */ -+#define SR_1000T_IDLE_ERROR_CNT 0x00FF /* Num idle errors since last read */ -+#define SR_1000T_ASYM_PAUSE_DIR 0x0100 /* LP asymmetric pause direction bit */ -+#define SR_1000T_LP_HD_CAPS 0x0400 /* LP is 1000T HD capable */ -+#define SR_1000T_LP_FD_CAPS 0x0800 /* LP is 1000T FD capable */ -+#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */ -+#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */ -+#define SR_1000T_MS_CONFIG_RES 0x4000 /* 1=Local TX is Master, 0=Slave */ -+#define SR_1000T_MS_CONFIG_FAULT 0x8000 /* Master/Slave config fault */ -+#define SR_1000T_REMOTE_RX_STATUS_SHIFT 12 -+#define SR_1000T_LOCAL_RX_STATUS_SHIFT 13 -+#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT 5 -+#define FFE_IDLE_ERR_COUNT_TIMEOUT_20 20 -+#define FFE_IDLE_ERR_COUNT_TIMEOUT_100 100 -+ -+/* Extended Status Register */ -+#define IEEE_ESR_1000T_HD_CAPS 0x1000 /* 1000T HD capable */ -+#define IEEE_ESR_1000T_FD_CAPS 0x2000 /* 1000T FD capable */ -+#define IEEE_ESR_1000X_HD_CAPS 0x4000 /* 1000X HD capable */ -+#define IEEE_ESR_1000X_FD_CAPS 0x8000 /* 1000X FD capable */ -+ -+#define PHY_TX_POLARITY_MASK 0x0100 /* register 10h bit 8 (polarity bit) */ -+#define PHY_TX_NORMAL_POLARITY 0 /* register 10h bit 8 (normal polarity) */ -+ -+#define AUTO_POLARITY_DISABLE 0x0010 /* register 11h bit 4 */ -+ /* (0=enable, 1=disable) */ -+ -+/* M88E1000 PHY Specific Control Register */ -+#define M88E1000_PSCR_JABBER_DISABLE 0x0001 /* 1=Jabber Function disabled */ -+#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reversal enabled */ -+#define M88E1000_PSCR_SQE_TEST 0x0004 /* 1=SQE Test enabled */ -+#define M88E1000_PSCR_CLK125_DISABLE 0x0010 /* 1=CLK125 low, -+ * 0=CLK125 toggling -+ */ -+#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */ -+ /* Manual MDI configuration */ -+#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */ -+#define M88E1000_PSCR_AUTO_X_1000T 0x0040 /* 1000BASE-T: Auto crossover, -+ * 100BASE-TX/10BASE-T: -+ * MDI Mode -+ */ -+#define M88E1000_PSCR_AUTO_X_MODE 0x0060 /* Auto crossover enabled -+ * all speeds. -+ */ -+#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE 0x0080 -+ /* 1=Enable Extended 10BASE-T distance -+ * (Lower 10BASE-T RX Threshold) -+ * 0=Normal 10BASE-T RX Threshold */ -+#define M88E1000_PSCR_MII_5BIT_ENABLE 0x0100 -+ /* 1=5-Bit interface in 100BASE-TX -+ * 0=MII interface in 100BASE-TX */ -+#define M88E1000_PSCR_SCRAMBLER_DISABLE 0x0200 /* 1=Scrambler disable */ -+#define M88E1000_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force link good */ -+#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit */ -+ -+#define M88E1000_PSCR_POLARITY_REVERSAL_SHIFT 1 -+#define M88E1000_PSCR_AUTO_X_MODE_SHIFT 5 -+#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE_SHIFT 7 -+ -+/* M88E1000 PHY Specific Status Register */ -+#define M88E1000_PSSR_JABBER 0x0001 /* 1=Jabber */ -+#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */ -+#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */ -+#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */ -+#define M88E1000_PSSR_CABLE_LENGTH 0x0380 /* 0=<50M;1=50-80M;2=80-110M; -+ * 3=110-140M;4=>140M */ -+#define M88E1000_PSSR_LINK 0x0400 /* 1=Link up, 0=Link down */ -+#define M88E1000_PSSR_SPD_DPLX_RESOLVED 0x0800 /* 1=Speed & Duplex resolved */ -+#define M88E1000_PSSR_PAGE_RCVD 0x1000 /* 1=Page received */ -+#define M88E1000_PSSR_DPLX 0x2000 /* 1=Duplex 0=Half Duplex */ -+#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */ -+#define M88E1000_PSSR_10MBS 0x0000 /* 00=10Mbs */ -+#define M88E1000_PSSR_100MBS 0x4000 /* 01=100Mbs */ -+#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */ -+ -+#define M88E1000_PSSR_REV_POLARITY_SHIFT 1 -+#define M88E1000_PSSR_DOWNSHIFT_SHIFT 5 -+#define M88E1000_PSSR_MDIX_SHIFT 6 -+#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7 -+ -+/* M88E1000 Extended PHY Specific Control Register */ -+#define M88E1000_EPSCR_FIBER_LOOPBACK 0x4000 /* 1=Fiber loopback */ -+#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000 /* 1=Lost lock detect enabled. -+ * Will assert lost lock and bring -+ * link down if idle not seen -+ * within 1ms in 1000BASE-T -+ */ -+/* Number of times we will attempt to autonegotiate before downshifting if we -+ * are the master */ -+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00 -+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000 -+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400 -+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800 -+#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00 -+/* Number of times we will attempt to autonegotiate before downshifting if we -+ * are the slave */ -+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300 -+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_DIS 0x0000 -+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100 -+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_2X 0x0200 -+#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_3X 0x0300 -+#define M88E1000_EPSCR_TX_CLK_2_5 0x0060 /* 2.5 MHz TX_CLK */ -+#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ -+#define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ -+ -+/* IGP01E1000 Specific Port Config Register - R/W */ -+#define IGP01E1000_PSCFR_AUTO_MDIX_PAR_DETECT 0x0010 -+#define IGP01E1000_PSCFR_PRE_EN 0x0020 -+#define IGP01E1000_PSCFR_SMART_SPEED 0x0080 -+#define IGP01E1000_PSCFR_DISABLE_TPLOOPBACK 0x0100 -+#define IGP01E1000_PSCFR_DISABLE_JABBER 0x0400 -+#define IGP01E1000_PSCFR_DISABLE_TRANSMIT 0x2000 -+ -+/* IGP01E1000 Specific Port Status Register - R/O */ -+#define IGP01E1000_PSSR_AUTONEG_FAILED 0x0001 /* RO LH SC */ -+#define IGP01E1000_PSSR_POLARITY_REVERSED 0x0002 -+#define IGP01E1000_PSSR_CABLE_LENGTH 0x007C -+#define IGP01E1000_PSSR_FULL_DUPLEX 0x0200 -+#define IGP01E1000_PSSR_LINK_UP 0x0400 -+#define IGP01E1000_PSSR_MDIX 0x0800 -+#define IGP01E1000_PSSR_SPEED_MASK 0xC000 /* speed bits mask */ -+#define IGP01E1000_PSSR_SPEED_10MBPS 0x4000 -+#define IGP01E1000_PSSR_SPEED_100MBPS 0x8000 -+#define IGP01E1000_PSSR_SPEED_1000MBPS 0xC000 -+#define IGP01E1000_PSSR_CABLE_LENGTH_SHIFT 0x0002 /* shift right 2 */ -+#define IGP01E1000_PSSR_MDIX_SHIFT 0x000B /* shift right 11 */ -+ -+/* IGP01E1000 Specific Port Control Register - R/W */ -+#define IGP01E1000_PSCR_TP_LOOPBACK 0x0001 -+#define IGP01E1000_PSCR_CORRECT_NC_SCMBLR 0x0200 -+#define IGP01E1000_PSCR_TEN_CRS_SELECT 0x0400 -+#define IGP01E1000_PSCR_FLIP_CHIP 0x0800 -+#define IGP01E1000_PSCR_AUTO_MDIX 0x1000 -+#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0-MDI, 1-MDIX */ -+ -+/* IGP01E1000 Specific Port Link Health Register */ -+#define IGP01E1000_PLHR_SS_DOWNGRADE 0x8000 -+#define IGP01E1000_PLHR_GIG_SCRAMBLER_ERROR 0x4000 -+#define IGP01E1000_PLHR_GIG_REM_RCVR_NOK 0x0800 /* LH */ -+#define IGP01E1000_PLHR_IDLE_ERROR_CNT_OFLOW 0x0400 /* LH */ -+#define IGP01E1000_PLHR_DATA_ERR_1 0x0200 /* LH */ -+#define IGP01E1000_PLHR_DATA_ERR_0 0x0100 -+#define IGP01E1000_PLHR_AUTONEG_FAULT 0x0010 -+#define IGP01E1000_PLHR_AUTONEG_ACTIVE 0x0008 -+#define IGP01E1000_PLHR_VALID_CHANNEL_D 0x0004 -+#define IGP01E1000_PLHR_VALID_CHANNEL_C 0x0002 -+#define IGP01E1000_PLHR_VALID_CHANNEL_B 0x0001 -+#define IGP01E1000_PLHR_VALID_CHANNEL_A 0x0000 -+ -+/* IGP01E1000 Channel Quality Register */ -+#define IGP01E1000_MSE_CHANNEL_D 0x000F -+#define IGP01E1000_MSE_CHANNEL_C 0x00F0 -+#define IGP01E1000_MSE_CHANNEL_B 0x0F00 -+#define IGP01E1000_MSE_CHANNEL_A 0xF000 -+ -+/* IGP01E1000 DSP reset macros */ -+#define DSP_RESET_ENABLE 0x0 -+#define DSP_RESET_DISABLE 0x2 -+#define E1000_MAX_DSP_RESETS 10 -+ -+/* IGP01E1000 AGC Registers */ -+ -+#define IGP01E1000_AGC_LENGTH_SHIFT 7 /* Coarse - 13:11, Fine - 10:7 */ -+ -+/* 7 bits (3 Coarse + 4 Fine) --> 128 optional values */ -+#define IGP01E1000_AGC_LENGTH_TABLE_SIZE 128 -+ -+/* The precision of the length is +/- 10 meters */ -+#define IGP01E1000_AGC_RANGE 10 -+ -+/* IGP01E1000 PCS Initialization register */ -+/* bits 3:6 in the PCS registers stores the channels polarity */ -+#define IGP01E1000_PHY_POLARITY_MASK 0x0078 -+ -+/* IGP01E1000 GMII FIFO Register */ -+#define IGP01E1000_GMII_FLEX_SPD 0x10 /* Enable flexible speed -+ * on Link-Up */ -+#define IGP01E1000_GMII_SPD 0x20 /* Enable SPD */ -+ -+/* IGP01E1000 Analog Register */ -+#define IGP01E1000_ANALOG_SPARE_FUSE_STATUS 0x20D1 -+#define IGP01E1000_ANALOG_FUSE_STATUS 0x20D0 -+#define IGP01E1000_ANALOG_FUSE_CONTROL 0x20DC -+#define IGP01E1000_ANALOG_FUSE_BYPASS 0x20DE -+ -+#define IGP01E1000_ANALOG_FUSE_POLY_MASK 0xF000 -+#define IGP01E1000_ANALOG_FUSE_FINE_MASK 0x0F80 -+#define IGP01E1000_ANALOG_FUSE_COARSE_MASK 0x0070 -+#define IGP01E1000_ANALOG_SPARE_FUSE_ENABLED 0x0100 -+#define IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL 0x0002 -+ -+#define IGP01E1000_ANALOG_FUSE_COARSE_THRESH 0x0040 -+#define IGP01E1000_ANALOG_FUSE_COARSE_10 0x0010 -+#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 -+#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 -+ -+/* Bit definitions for valid PHY IDs. */ -+#define M88E1000_E_PHY_ID 0x01410C50 -+#define M88E1000_I_PHY_ID 0x01410C30 -+#define M88E1011_I_PHY_ID 0x01410C20 -+#define IGP01E1000_I_PHY_ID 0x02A80380 -+#define M88E1000_12_PHY_ID M88E1000_E_PHY_ID -+#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID -+#define M88E1011_I_REV_4 0x04 -+ -+/* Miscellaneous PHY bit definitions. */ -+#define PHY_PREAMBLE 0xFFFFFFFF -+#define PHY_SOF 0x01 -+#define PHY_OP_READ 0x02 -+#define PHY_OP_WRITE 0x01 -+#define PHY_TURNAROUND 0x02 -+#define PHY_PREAMBLE_SIZE 32 -+#define MII_CR_SPEED_1000 0x0040 -+#define MII_CR_SPEED_100 0x2000 -+#define MII_CR_SPEED_10 0x0000 -+#define E1000_PHY_ADDRESS 0x01 -+#define PHY_AUTO_NEG_TIME 45 /* 4.5 Seconds */ -+#define PHY_FORCE_TIME 20 /* 2.0 Seconds */ -+#define PHY_REVISION_MASK 0xFFFFFFF0 -+#define DEVICE_SPEED_MASK 0x00000300 /* Device Ctrl Reg Speed Mask */ -+#define REG4_SPEED_MASK 0x01E0 -+#define REG9_SPEED_MASK 0x0300 -+#define ADVERTISE_10_HALF 0x0001 -+#define ADVERTISE_10_FULL 0x0002 -+#define ADVERTISE_100_HALF 0x0004 -+#define ADVERTISE_100_FULL 0x0008 -+#define ADVERTISE_1000_HALF 0x0010 -+#define ADVERTISE_1000_FULL 0x0020 -+#define AUTONEG_ADVERTISE_SPEED_DEFAULT 0x002F /* Everything but 1000-Half */ -+#define AUTONEG_ADVERTISE_10_100_ALL 0x000F /* All 10/100 speeds*/ -+#define AUTONEG_ADVERTISE_10_ALL 0x0003 /* 10Mbps Full & Half speeds*/ -+ -+#endif /* _E1000_HW_H_ */ -Index: b/netboot/eepro.c -=================================================================== ---- a/netboot/eepro.c -+++ /dev/null -@@ -1,586 +0,0 @@ --/************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program --Intel EEPRO/10 NIC driver for Etherboot --Adapted from Linux eepro.c from kernel 2.2.17 -- --This board accepts a 32 pin EEPROM (29C256), however a test with a --27C010 shows that this EPROM also works in the socket, but it's not clear --how repeatably. The two top address pins appear to be held low, thus --the bottom 32kB of the 27C010 is visible in the CPU's address space. --To be sure you could put 4 copies of the code in the 27C010, then --it doesn't matter whether the extra lines are held low or high, just --hopefully not floating as CMOS chips don't like floating inputs. -- --Be careful with seating the EPROM as the socket on my board actually --has 34 pins, the top row of 2 are not used. --***************************************************************************/ -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --/* to get some global routines like printf */ --#include "etherboot.h" --/* to get the interface to the body of the program */ --#include "nic.h" --/* to get our own prototype */ --#include "cards.h" --/* we use timer2 for microsecond waits */ --#include "timer.h" -- --#undef DEBUG /* only after include files */ -- --/* Different 82595 chips */ --#define LAN595 0 --#define LAN595TX 1 --#define LAN595FX 2 --#define LAN595FX_10ISA 3 -- --#define SLOW_DOWN inb(0x80); -- --/* The station (ethernet) address prefix, used for IDing the board. */ --#define SA_ADDR0 0x00 /* Etherexpress Pro/10 */ --#define SA_ADDR1 0xaa --#define SA_ADDR2 0x00 -- --#define GetBit(x,y) ((x & (1<>y) -- --/* EEPROM Word 0: */ --#define ee_PnP 0 /* Plug 'n Play enable bit */ --#define ee_Word1 1 /* Word 1? */ --#define ee_BusWidth 2 /* 8/16 bit */ --#define ee_FlashAddr 3 /* Flash Address */ --#define ee_FlashMask 0x7 /* Mask */ --#define ee_AutoIO 6 /* */ --#define ee_reserved0 7 /* =0! */ --#define ee_Flash 8 /* Flash there? */ --#define ee_AutoNeg 9 /* Auto Negotiation enabled? */ --#define ee_IO0 10 /* IO Address LSB */ --#define ee_IO0Mask 0x /*...*/ --#define ee_IO1 15 /* IO MSB */ -- --/* EEPROM Word 1: */ --#define ee_IntSel 0 /* Interrupt */ --#define ee_IntMask 0x7 --#define ee_LI 3 /* Link Integrity 0= enabled */ --#define ee_PC 4 /* Polarity Correction 0= enabled */ --#define ee_TPE_AUI 5 /* PortSelection 1=TPE */ --#define ee_Jabber 6 /* Jabber prevention 0= enabled */ --#define ee_AutoPort 7 /* Auto Port Selection 1= Disabled */ --#define ee_SMOUT 8 /* SMout Pin Control 0= Input */ --#define ee_PROM 9 /* Flash EPROM / PROM 0=Flash */ --#define ee_reserved1 10 /* .. 12 =0! */ --#define ee_AltReady 13 /* Alternate Ready, 0=normal */ --#define ee_reserved2 14 /* =0! */ --#define ee_Duplex 15 -- --/* Word2,3,4: */ --#define ee_IA5 0 /*bit start for individual Addr Byte 5 */ --#define ee_IA4 8 /*bit start for individual Addr Byte 5 */ --#define ee_IA3 0 /*bit start for individual Addr Byte 5 */ --#define ee_IA2 8 /*bit start for individual Addr Byte 5 */ --#define ee_IA1 0 /*bit start for individual Addr Byte 5 */ --#define ee_IA0 8 /*bit start for individual Addr Byte 5 */ -- --/* Word 5: */ --#define ee_BNC_TPE 0 /* 0=TPE */ --#define ee_BootType 1 /* 00=None, 01=IPX, 10=ODI, 11=NDIS */ --#define ee_BootTypeMask 0x3 --#define ee_NumConn 3 /* Number of Connections 0= One or Two */ --#define ee_FlashSock 4 /* Presence of Flash Socket 0= Present */ --#define ee_PortTPE 5 --#define ee_PortBNC 6 --#define ee_PortAUI 7 --#define ee_PowerMgt 10 /* 0= disabled */ --#define ee_CP 13 /* Concurrent Processing */ --#define ee_CPMask 0x7 -- --/* Word 6: */ --#define ee_Stepping 0 /* Stepping info */ --#define ee_StepMask 0x0F --#define ee_BoardID 4 /* Manucaturer Board ID, reserved */ --#define ee_BoardMask 0x0FFF -- --/* Word 7: */ --#define ee_INT_TO_IRQ 0 /* int to IRQ Mapping = 0x1EB8 for Pro/10+ */ --#define ee_FX_INT2IRQ 0x1EB8 /* the _only_ mapping allowed for FX chips */ -- --/*..*/ --#define ee_SIZE 0x40 /* total EEprom Size */ --#define ee_Checksum 0xBABA /* initial and final value for adding checksum */ -- -- --/* Card identification via EEprom: */ --#define ee_addr_vendor 0x10 /* Word offset for EISA Vendor ID */ --#define ee_addr_id 0x11 /* Word offset for Card ID */ --#define ee_addr_SN 0x12 /* Serial Number */ --#define ee_addr_CRC_8 0x14 /* CRC over last thee Bytes */ -- -- --#define ee_vendor_intel0 0x25 /* Vendor ID Intel */ --#define ee_vendor_intel1 0xD4 --#define ee_id_eepro10p0 0x10 /* ID for eepro/10+ */ --#define ee_id_eepro10p1 0x31 -- --/* now this section could be used by both boards: the oldies and the ee10: -- * ee10 uses tx buffer before of rx buffer and the oldies the inverse. -- * (aris) -- */ --#define RAM_SIZE 0x8000 -- --#define RCV_HEADER 8 --#define RCV_DEFAULT_RAM 0x6000 --#define RCV_RAM rcv_ram -- --static unsigned rcv_ram = RCV_DEFAULT_RAM; -- --#define XMT_HEADER 8 --#define XMT_RAM (RAM_SIZE - RCV_RAM) -- --#define XMT_START ((rcv_start + RCV_RAM) % RAM_SIZE) -- --#define RCV_LOWER_LIMIT (rcv_start >> 8) --#define RCV_UPPER_LIMIT (((rcv_start + RCV_RAM) - 2) >> 8) --#define XMT_LOWER_LIMIT (XMT_START >> 8) --#define XMT_UPPER_LIMIT (((XMT_START + XMT_RAM) - 2) >> 8) -- --#define RCV_START_PRO 0x00 --#define RCV_START_10 XMT_RAM -- /* by default the old driver */ --static unsigned rcv_start = RCV_START_PRO; -- --#define RCV_DONE 0x0008 --#define RX_OK 0x2000 --#define RX_ERROR 0x0d81 -- --#define TX_DONE_BIT 0x0080 --#define CHAIN_BIT 0x8000 --#define XMT_STATUS 0x02 --#define XMT_CHAIN 0x04 --#define XMT_COUNT 0x06 -- --#define BANK0_SELECT 0x00 --#define BANK1_SELECT 0x40 --#define BANK2_SELECT 0x80 -- --/* Bank 0 registers */ --#define COMMAND_REG 0x00 /* Register 0 */ --#define MC_SETUP 0x03 --#define XMT_CMD 0x04 --#define DIAGNOSE_CMD 0x07 --#define RCV_ENABLE_CMD 0x08 --#define RCV_DISABLE_CMD 0x0a --#define STOP_RCV_CMD 0x0b --#define RESET_CMD 0x0e --#define POWER_DOWN_CMD 0x18 --#define RESUME_XMT_CMD 0x1c --#define SEL_RESET_CMD 0x1e --#define STATUS_REG 0x01 /* Register 1 */ --#define RX_INT 0x02 --#define TX_INT 0x04 --#define EXEC_STATUS 0x30 --#define ID_REG 0x02 /* Register 2 */ --#define R_ROBIN_BITS 0xc0 /* round robin counter */ --#define ID_REG_MASK 0x2c --#define ID_REG_SIG 0x24 --#define AUTO_ENABLE 0x10 --#define INT_MASK_REG 0x03 /* Register 3 */ --#define RX_STOP_MASK 0x01 --#define RX_MASK 0x02 --#define TX_MASK 0x04 --#define EXEC_MASK 0x08 --#define ALL_MASK 0x0f --#define IO_32_BIT 0x10 --#define RCV_BAR 0x04 /* The following are word (16-bit) registers */ --#define RCV_STOP 0x06 -- --#define XMT_BAR_PRO 0x0a --#define XMT_BAR_10 0x0b --static unsigned xmt_bar = XMT_BAR_PRO; -- --#define HOST_ADDRESS_REG 0x0c --#define IO_PORT 0x0e --#define IO_PORT_32_BIT 0x0c -- --/* Bank 1 registers */ --#define REG1 0x01 --#define WORD_WIDTH 0x02 --#define INT_ENABLE 0x80 --#define INT_NO_REG 0x02 --#define RCV_LOWER_LIMIT_REG 0x08 --#define RCV_UPPER_LIMIT_REG 0x09 -- --#define XMT_LOWER_LIMIT_REG_PRO 0x0a --#define XMT_UPPER_LIMIT_REG_PRO 0x0b --#define XMT_LOWER_LIMIT_REG_10 0x0b --#define XMT_UPPER_LIMIT_REG_10 0x0a --static unsigned xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO; --static unsigned xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO; -- --/* Bank 2 registers */ --#define XMT_Chain_Int 0x20 /* Interrupt at the end of the transmit chain */ --#define XMT_Chain_ErrStop 0x40 /* Interrupt at the end of the chain even if there are errors */ --#define RCV_Discard_BadFrame 0x80 /* Throw bad frames away, and continue to receive others */ --#define REG2 0x02 --#define PRMSC_Mode 0x01 --#define Multi_IA 0x20 --#define REG3 0x03 --#define TPE_BIT 0x04 --#define BNC_BIT 0x20 --#define REG13 0x0d --#define FDX 0x00 --#define A_N_ENABLE 0x02 -- --#define I_ADD_REG0 0x04 --#define I_ADD_REG1 0x05 --#define I_ADD_REG2 0x06 --#define I_ADD_REG3 0x07 --#define I_ADD_REG4 0x08 --#define I_ADD_REG5 0x09 -- --#define EEPROM_REG_PRO 0x0a --#define EEPROM_REG_10 0x0b --static unsigned eeprom_reg = EEPROM_REG_PRO; -- --#define EESK 0x01 --#define EECS 0x02 --#define EEDI 0x04 --#define EEDO 0x08 -- --/* The horrible routine to read a word from the serial EEPROM. */ --/* IMPORTANT - the 82595 will be set to Bank 0 after the eeprom is read */ -- --/* The delay between EEPROM clock transitions. */ --#define eeprom_delay() { udelay(40); } --#define EE_READ_CMD (6 << 6) -- --/* do a full reset */ --#define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(40); -- --/* do a nice reset */ --#define eepro_sel_reset(ioaddr) { \ -- outb(SEL_RESET_CMD, ioaddr); \ -- SLOW_DOWN; \ -- SLOW_DOWN; \ -- } -- --/* clear all interrupts */ --#define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG) -- --/* enable rx */ --#define eepro_en_rx(ioaddr) outb(RCV_ENABLE_CMD, ioaddr) -- --/* disable rx */ --#define eepro_dis_rx(ioaddr) outb(RCV_DISABLE_CMD, ioaddr) -- --/* switch bank */ --#define eepro_sw2bank0(ioaddr) outb(BANK0_SELECT, ioaddr) --#define eepro_sw2bank1(ioaddr) outb(BANK1_SELECT, ioaddr) --#define eepro_sw2bank2(ioaddr) outb(BANK2_SELECT, ioaddr) -- --static unsigned int rx_start, tx_start; --static int tx_last; --static unsigned tx_end; --static int eepro = 0; --static unsigned short ioaddr = 0; --static unsigned int mem_start, mem_end = RCV_DEFAULT_RAM / 1024; -- --#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void eepro_reset(struct nic *nic) --{ -- int temp_reg, i; -- -- /* put the card in its initial state */ -- eepro_sw2bank2(ioaddr); /* be careful, bank2 now */ -- temp_reg = inb(ioaddr + eeprom_reg); --#ifdef DEBUG -- printf("Stepping %d\n", temp_reg >> 5); --#endif -- if (temp_reg & 0x10) /* check the TurnOff Enable bit */ -- outb(temp_reg & 0xEF, ioaddr + eeprom_reg); -- for (i = 0; i < ETH_ALEN; i++) /* fill the MAC address */ -- outb(nic->node_addr[i], ioaddr + I_ADD_REG0 + i); -- temp_reg = inb(ioaddr + REG1); -- /* setup Transmit Chaining and discard bad RCV frames */ -- outb(temp_reg | XMT_Chain_Int | XMT_Chain_ErrStop -- | RCV_Discard_BadFrame, ioaddr + REG1); -- temp_reg = inb(ioaddr + REG2); /* match broadcast */ -- outb(temp_reg | 0x14, ioaddr + REG2); -- temp_reg = inb(ioaddr + REG3); -- outb(temp_reg & 0x3F, ioaddr + REG3); /* clear test mode */ -- /* set the receiving mode */ -- eepro_sw2bank1(ioaddr); /* be careful, bank1 now */ -- /* initialise the RCV and XMT upper and lower limits */ -- outb(RCV_LOWER_LIMIT, ioaddr + RCV_LOWER_LIMIT_REG); -- outb(RCV_UPPER_LIMIT, ioaddr + RCV_UPPER_LIMIT_REG); -- outb(XMT_LOWER_LIMIT, ioaddr + xmt_lower_limit_reg); -- outb(XMT_UPPER_LIMIT, ioaddr + xmt_upper_limit_reg); -- eepro_sw2bank0(ioaddr); /* Switch back to bank 0 */ -- eepro_clear_int(ioaddr); -- /* Initialise RCV */ -- outw(rx_start = (RCV_LOWER_LIMIT << 8), ioaddr + RCV_BAR); -- outw(((RCV_UPPER_LIMIT << 8) | 0xFE), ioaddr + RCV_STOP); -- /* Intialise XMT */ -- outw((XMT_LOWER_LIMIT << 8), ioaddr + xmt_bar); -- eepro_sel_reset(ioaddr); -- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); -- tx_last = 0; -- eepro_en_rx(ioaddr); --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int eepro_poll(struct nic *nic) --{ -- int i; -- unsigned int rcv_car = rx_start; -- unsigned int rcv_event, rcv_status, rcv_next_frame, rcv_size; -- -- /* return true if there's an ethernet packet ready to read */ -- /* nic->packet should contain data on return */ -- /* nic->packetlen should contain length of data */ --#if 0 -- if ((inb(ioaddr + STATUS_REG) & 0x40) == 0) -- return (0); -- outb(0x40, ioaddr + STATUS_REG); --#endif -- outw(rcv_car, ioaddr + HOST_ADDRESS_REG); -- rcv_event = inw(ioaddr + IO_PORT); -- if (rcv_event != RCV_DONE) -- return (0); -- rcv_status = inw(ioaddr + IO_PORT); -- rcv_next_frame = inw(ioaddr + IO_PORT); -- rcv_size = inw(ioaddr + IO_PORT); --#if 0 -- printf("%hX %hX %d %hhX\n", rcv_status, rcv_next_frame, rcv_size, -- inb(ioaddr + STATUS_REG)); --#endif -- if ((rcv_status & (RX_OK|RX_ERROR)) != RX_OK) { -- printf("Receive error %hX\n", rcv_status); -- return (0); -- } -- rcv_size &= 0x3FFF; -- insw(ioaddr + IO_PORT, nic->packet, ((rcv_size + 3) >> 1)); --#if 0 -- for (i = 0; i < 48; i++) { -- printf("%hhX", nic->packet[i]); -- putchar(i % 16 == 15 ? '\n' : ' '); -- } --#endif -- nic->packetlen = rcv_size; -- rcv_car = rx_start + RCV_HEADER + rcv_size; -- rx_start = rcv_next_frame; -- if (rcv_car == 0) -- rcv_car = ((RCV_UPPER_LIMIT << 8) | 0xff); -- outw(rcv_car - 1, ioaddr + RCV_STOP); -- return (1); --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void eepro_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- unsigned int status, tx_available, last, end, length; -- unsigned short type; -- int boguscount = 20; -- -- length = s + ETH_HLEN; -- if (tx_end > tx_start) -- tx_available = XMT_RAM - (tx_end - tx_start); -- else if (tx_end < tx_start) -- tx_available = tx_start - tx_end; -- else -- tx_available = XMT_RAM; -- last = tx_end; -- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; -- if (end >= (XMT_UPPER_LIMIT << 8)) { -- last = (XMT_LOWER_LIMIT << 8); -- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; -- } -- outw(last, ioaddr + HOST_ADDRESS_REG); -- outw(XMT_CMD, ioaddr + IO_PORT); -- outw(0, ioaddr + IO_PORT); -- outw(end, ioaddr + IO_PORT); -- outw(length, ioaddr + IO_PORT); -- outsw(ioaddr + IO_PORT, d, ETH_ALEN / 2); -- outsw(ioaddr + IO_PORT, nic->node_addr, ETH_ALEN / 2); -- type = htons(t); -- outsw(ioaddr + IO_PORT, &type, sizeof(type) / 2); -- outsw(ioaddr + IO_PORT, p, (s + 3) >> 1); -- /* A dummy read to flush the DRAM write pipeline */ -- status = inw(ioaddr + IO_PORT); -- outw(last, ioaddr + xmt_bar); -- outb(XMT_CMD, ioaddr); -- tx_start = last; -- tx_last = last; -- tx_end = end; --#if 0 -- printf("%d %d\n", tx_start, tx_end); --#endif -- while (boguscount > 0) { -- if (((status = inw(ioaddr + IO_PORT)) & TX_DONE_BIT) == 0) { -- udelay(40); -- boguscount--; -- continue; -- } --#if DEBUG -- if ((status & 0x2000) == 0) -- printf("Transmit status %hX\n", status); --#endif -- } --} -- --/************************************************************************** --DISABLE - Turn off ethernet interface --***************************************************************************/ --static void eepro_disable(struct nic *nic) --{ -- eepro_sw2bank0(ioaddr); /* Switch to bank 0 */ -- /* Flush the Tx and disable Rx */ -- outb(STOP_RCV_CMD, ioaddr); -- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); -- tx_last = 0; -- /* Reset the 82595 */ -- eepro_full_reset(ioaddr); --} -- --static int read_eeprom(int location) --{ -- int i; -- unsigned short retval = 0; -- int ee_addr = ioaddr + eeprom_reg; -- int read_cmd = location | EE_READ_CMD; -- int ctrl_val = EECS; -- -- if (eepro == LAN595FX_10ISA) { -- eepro_sw2bank1(ioaddr); -- outb(0x00, ioaddr + STATUS_REG); -- } -- eepro_sw2bank2(ioaddr); -- outb(ctrl_val, ee_addr); -- /* shift the read command bits out */ -- for (i = 8; i >= 0; i--) { -- short outval = (read_cmd & (1 << i)) ? ctrl_val | EEDI : ctrl_val; -- outb(outval, ee_addr); -- outb(outval | EESK, ee_addr); /* EEPROM clock tick */ -- eeprom_delay(); -- outb(outval, ee_addr); /* finish EEPROM clock tick */ -- eeprom_delay(); -- } -- outb(ctrl_val, ee_addr); -- for (i = 16; i > 0; i--) { -- outb(ctrl_val | EESK, ee_addr); -- eeprom_delay(); -- retval = (retval << 1) | ((inb(ee_addr) & EEDO) ? 1 : 0); -- outb(ctrl_val, ee_addr); -- eeprom_delay(); -- } -- /* terminate the EEPROM access */ -- ctrl_val &= ~EECS; -- outb(ctrl_val | EESK, ee_addr); -- eeprom_delay(); -- outb(ctrl_val, ee_addr); -- eeprom_delay(); -- eepro_sw2bank0(ioaddr); -- return (retval); --} -- --static int eepro_probe1(struct nic *nic) --{ -- int i, id, counter, l_eepro = 0; -- union { -- unsigned char caddr[ETH_ALEN]; -- unsigned short saddr[ETH_ALEN/2]; -- } station_addr; -- char *name; -- -- id = inb(ioaddr + ID_REG); -- if ((id & ID_REG_MASK) != ID_REG_SIG) -- return (0); -- counter = id & R_ROBIN_BITS; -- if (((id = inb(ioaddr + ID_REG)) & R_ROBIN_BITS) != (counter + 0x40)) -- return (0); -- /* yes the 82595 has been found */ -- station_addr.saddr[2] = read_eeprom(2); -- if (station_addr.saddr[2] == 0x0000 || station_addr.saddr[2] == 0xFFFF) { -- l_eepro = 3; -- eepro = LAN595FX_10ISA; -- eeprom_reg= EEPROM_REG_10; -- rcv_start = RCV_START_10; -- xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_10; -- xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_10; -- station_addr.saddr[2] = read_eeprom(2); -- } -- station_addr.saddr[1] = read_eeprom(3); -- station_addr.saddr[0] = read_eeprom(4); -- if (l_eepro) -- name = "Intel EtherExpress 10 ISA"; -- else if (read_eeprom(7) == ee_FX_INT2IRQ) { -- name = "Intel EtherExpress Pro/10+ ISA"; -- l_eepro = 2; -- } else if (station_addr.saddr[0] == SA_ADDR1) { -- name = "Intel EtherExpress Pro/10 ISA"; -- l_eepro = 1; -- } else { -- l_eepro = 0; -- name = "Intel 82595-based LAN card"; -- } -- station_addr.saddr[0] = swap16(station_addr.saddr[0]); -- station_addr.saddr[1] = swap16(station_addr.saddr[1]); -- station_addr.saddr[2] = swap16(station_addr.saddr[2]); -- for (i = 0; i < ETH_ALEN; i++) { -- nic->node_addr[i] = station_addr.caddr[i]; -- } -- printf("\n%s ioaddr %#hX, addr %!", name, ioaddr, nic->node_addr); -- mem_start = RCV_LOWER_LIMIT << 8; -- if ((mem_end & 0x3F) < 3 || (mem_end & 0x3F) > 29) -- mem_end = RCV_UPPER_LIMIT << 8; -- else { -- mem_end = mem_end * 1024 + (RCV_LOWER_LIMIT << 8); -- rcv_ram = mem_end - (RCV_LOWER_LIMIT << 8); -- } -- printf(", Rx mem %dK, if %s\n", (mem_end - mem_start) >> 10, -- GetBit(read_eeprom(5), ee_BNC_TPE) ? "BNC" : "TP"); -- return (1); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ --struct nic *eepro_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- unsigned short *p; -- /* same probe list as the Linux driver */ -- static unsigned short ioaddrs[] = { -- 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360, 0}; -- -- if (probe_addrs == 0 || probe_addrs[0] == 0) -- probe_addrs = ioaddrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { -- if (eepro_probe1(nic)) -- break; -- } -- if (*p == 0) -- return (0); -- eepro_reset(nic); -- /* point to NIC specific routines */ -- nic->reset = eepro_reset; -- nic->poll = eepro_poll; -- nic->transmit = eepro_transmit; -- nic->disable = eepro_disable; -- return (nic); --} -Index: b/netboot/eepro100.c -=================================================================== ---- a/netboot/eepro100.c -+++ b/netboot/eepro100.c -@@ -80,8 +80,8 @@ - * - * Caveats: - * -- * The etherboot framework moves the code to the 32k segment from -- * 0x98000 to 0xa0000. There is just a little room between the end of -+ * The Etherboot framework moves the code to the 48k segment from -+ * 0x94000 to 0xa0000. There is just a little room between the end of - * this driver and the 0xa0000 address. If you compile in too many - * features, this will overflow. - * The number under "hex" in the output of size that scrolls by while -@@ -92,17 +92,13 @@ - /* The etherboot authors seem to dislike the argument ordering in - * outb macros that Linux uses. I disklike the confusion that this - * has caused even more.... This file uses the Linux argument ordering. */ --/* Sorry not us. It's inherted code from FreeBSD. [The authors] */ -+/* Sorry not us. It's inherited code from FreeBSD. [The authors] */ - - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - #include "timer.h" - --#undef virt_to_bus --#define virt_to_bus(x) ((unsigned long)x) -- - static int ioaddr; - - typedef unsigned char u8; -@@ -121,6 +117,18 @@ - SCBEarlyRx = 20, /* Early receive byte count. */ - }; - -+enum SCBCmdBits { -+ SCBMaskCmdDone=0x8000, SCBMaskRxDone=0x4000, SCBMaskCmdIdle=0x2000, -+ SCBMaskRxSuspend=0x1000, SCBMaskEarlyRx=0x0800, SCBMaskFlowCtl=0x0400, -+ SCBTriggerIntr=0x0200, SCBMaskAll=0x0100, -+ /* The rest are Rx and Tx commands. */ -+ CUStart=0x0010, CUResume=0x0020, CUStatsAddr=0x0040, CUShowStats=0x0050, -+ CUCmdBase=0x0060, /* CU Base address (set to zero) . */ -+ CUDumpStats=0x0070, /* Dump then reset stats counters. */ -+ RxStart=0x0001, RxResume=0x0002, RxAbort=0x0004, RxAddrLoad=0x0006, -+ RxResumeNoResources=0x0007, -+}; -+ - static int do_eeprom_cmd(int cmd, int cmd_len); - void hd(void *where, int n); - -@@ -139,8 +147,6 @@ - #define EE_WRITE_1 0x4806 - #define EE_ENB (0x4800 | EE_CS) - --#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) -- - /* The EEPROM commands include the alway-set leading bit. */ - #define EE_READ_CMD 6 - -@@ -184,9 +190,18 @@ - Typically this takes 0 ticks. */ - static inline void wait_for_cmd_done(int cmd_ioaddr) - { -- short wait = 100; -- do ; -- while(inb(cmd_ioaddr) && --wait >= 0); -+ int wait = 0; -+ int delayed_cmd; -+ -+ do -+ if (inb(cmd_ioaddr) == 0) return; -+ while(++wait <= 100); -+ delayed_cmd = inb(cmd_ioaddr); -+ do -+ if (inb(cmd_ioaddr) == 0) break; -+ while(++wait <= 10000); -+ printf("Command %2.2x was not immediately accepted, %d ticks!\n", -+ delayed_cmd, wait); - } - - /* Elements of the dump_statistics block. This block must be lword aligned. */ -@@ -212,35 +227,30 @@ - - /* A speedo3 TX buffer descriptor with two buffers... */ - static struct TxFD { -- volatile s16 status; -- s16 command; -- u32 link; /* void * */ -- u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ -- s32 count; /* # of TBD (=2), Tx start thresh., etc. */ -- /* This constitutes two "TBD" entries: hdr and data */ -- u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ -- s32 tx_buf_size0; /* Length of Tx hdr. */ -- u32 tx_buf_addr1; /* void *, data to be transmitted. */ -- s32 tx_buf_size1; /* Length of Tx data. */ -+ volatile s16 status; -+ s16 command; -+ u32 link; /* void * */ -+ u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ -+ s32 count; /* # of TBD (=2), Tx start thresh., etc. */ -+ /* This constitutes two "TBD" entries: hdr and data */ -+ u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ -+ s32 tx_buf_size0; /* Length of Tx hdr. */ -+ u32 tx_buf_addr1; /* void *, data to be transmitted. */ -+ s32 tx_buf_size1; /* Length of Tx data. */ - } txfd; - - struct RxFD { /* Receive frame descriptor. */ -- volatile s16 status; -- s16 command; -- u32 link; /* struct RxFD * */ -- u32 rx_buf_addr; /* void * */ -- u16 count; -- u16 size; -- char packet[1518]; -+ volatile s16 status; -+ s16 command; -+ u32 link; /* struct RxFD * */ -+ u32 rx_buf_addr; /* void * */ -+ u16 count; -+ u16 size; -+ char packet[1518]; - }; - --#ifdef USE_LOWMEM_BUFFER --#define rxfd ((struct RxFD *)(0x10000 - sizeof(struct RxFD))) --#define ACCESS(x) x-> --#else - static struct RxFD rxfd; - #define ACCESS(x) x. --#endif - - static int congenb = 0; /* Enable congestion control in the DP83840. */ - static int txfifo = 8; /* Tx FIFO threshold in 4 byte units, 0-15 */ -@@ -256,8 +266,7 @@ - u32 link; - unsigned char data[22]; - } confcmd = { -- 0, CmdConfigure, -- (u32) & txfd, -+ 0, 0, 0, /* filled in later */ - {22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1, /* 1=Use MII 0=Use AUI */ - 0, 0x2E, 0, 0x60, 0, - 0xf2, 0x48, 0, 0x40, 0xf2, 0x80, /* 0x40=Force full-duplex */ -@@ -276,19 +285,20 @@ - - static int mdio_write(int phy_id, int location, int value) - { -- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ -+ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ - -- outl(0x04000000 | (location<<16) | (phy_id<<21) | value, -- ioaddr + SCBCtrlMDI); -- do { -- udelay(16); -- -- val = inl(ioaddr + SCBCtrlMDI); -- if (--boguscnt < 0) { -- printf(" mdio_write() timed out with val = %X.\n", val); -- } -- } while (! (val & 0x10000000)); -- return val & 0xffff; -+ outl(0x04000000 | (location<<16) | (phy_id<<21) | value, -+ ioaddr + SCBCtrlMDI); -+ do { -+ udelay(16); -+ -+ val = inl(ioaddr + SCBCtrlMDI); -+ if (--boguscnt < 0) { -+ printf(" mdio_write() timed out with val = %X.\n", val); -+ break; -+ } -+ } while (! (val & 0x10000000)); -+ return val & 0xffff; - } - - /* Support function: mdio_read -@@ -298,17 +308,19 @@ - */ - static int mdio_read(int phy_id, int location) - { -- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ -- outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); -- do { -- udelay(16); -- -- val = inl(ioaddr + SCBCtrlMDI); -- if (--boguscnt < 0) { -- printf( " mdio_read() timed out with val = %X.\n", val); -- } -- } while (! (val & 0x10000000)); -- return val & 0xffff; -+ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ -+ outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); -+ do { -+ udelay(16); -+ -+ val = inl(ioaddr + SCBCtrlMDI); -+ -+ if (--boguscnt < 0) { -+ printf( " mdio_read() timed out with val = %X.\n", val); -+ break; -+ } -+ } while (! (val & 0x10000000)); -+ return val & 0xffff; - } - - /* The fixes for the code were kindly provided by Dragan Stancevic -@@ -340,25 +352,26 @@ - return retval; - } - -+#if 0 - static inline void whereami (const char *str) - { --#if 0 - printf ("%s\n", str); - sleep (2); --#endif - } -+#else -+#define whereami(s) -+#endif - --/* function: eepro100_reset -- * resets the card. This is used to allow Etherboot to probe the card again -- * from a "virginal" state.... -- * Arguments: none -- * -- * returns: void. -- */ -- --static void eepro100_reset(struct nic *nic) -+static void eepro100_irq(struct nic *nic __unused, irq_action_t action __unused) - { -- outl(0, ioaddr + SCBPort); -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } - } - - /* function: eepro100_transmit -@@ -373,61 +386,87 @@ - - static void eepro100_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) - { -- struct eth_hdr { -- unsigned char dst_addr[ETH_ALEN]; -- unsigned char src_addr[ETH_ALEN]; -- unsigned short type; -- } hdr; -- unsigned short status; -- int to; -- int s1, s2; -- -- status = inw(ioaddr + SCBStatus); -- /* Acknowledge all of the current interrupt sources ASAP. */ -- outw(status & 0xfc00, ioaddr + SCBStatus); -+ struct eth_hdr { -+ unsigned char dst_addr[ETH_ALEN]; -+ unsigned char src_addr[ETH_ALEN]; -+ unsigned short type; -+ } hdr; -+ unsigned short status; -+ int s1, s2; -+ -+ status = inw(ioaddr + SCBStatus); -+ /* Acknowledge all of the current interrupt sources ASAP. */ -+ outw(status & 0xfc00, ioaddr + SCBStatus); - - #ifdef DEBUG -- printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", -- t, s, status, inw (ioaddr + SCBCmd)); -+ printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", -+ t, s, status, inw (ioaddr + SCBCmd)); - #endif - -- memcpy (&hdr.dst_addr, d, ETH_ALEN); -- memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); -+ memcpy (&hdr.dst_addr, d, ETH_ALEN); -+ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); - -- hdr.type = htons (t); -+ hdr.type = htons (t); - -- txfd.status = 0; -- txfd.command = CmdSuspend | CmdTx | CmdTxFlex; -- txfd.link = virt_to_bus (&txfd); -- txfd.count = 0x02208000; -- txfd.tx_desc_addr = (u32)&txfd.tx_buf_addr0; -+ txfd.status = 0; -+ txfd.command = CmdSuspend | CmdTx | CmdTxFlex; -+ txfd.link = virt_to_bus (&txfd); -+ txfd.count = 0x02208000; -+ txfd.tx_desc_addr = virt_to_bus(&txfd.tx_buf_addr0); - -- txfd.tx_buf_addr0 = virt_to_bus (&hdr); -- txfd.tx_buf_size0 = sizeof (hdr); -+ txfd.tx_buf_addr0 = virt_to_bus (&hdr); -+ txfd.tx_buf_size0 = sizeof (hdr); - -- txfd.tx_buf_addr1 = virt_to_bus (p); -- txfd.tx_buf_size1 = s; -+ txfd.tx_buf_addr1 = virt_to_bus (p); -+ txfd.tx_buf_size1 = s; - - #ifdef DEBUG -- printf ("txfd: \n"); -- hd (&txfd, sizeof (txfd)); -+ printf ("txfd: \n"); -+ hd (&txfd, sizeof (txfd)); - #endif - -- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); -- outw(INT_MASK | CU_START, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -- -- s1 = inw (ioaddr + SCBStatus); -- load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ -- while (!txfd.status && timer2_running()) -- /* Wait */; -- s2 = inw (ioaddr + SCBStatus); -+ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); -+ outw(INT_MASK | CU_START, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ -+ s1 = inw (ioaddr + SCBStatus); -+ load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ -+ while (!txfd.status && timer2_running()) -+ /* Wait */; -+ s2 = inw (ioaddr + SCBStatus); - - #ifdef DEBUG -- printf ("s1 = %hX, s2 = %hX.\n", s1, s2); -+ printf ("s1 = %hX, s2 = %hX.\n", s1, s2); - #endif - } - -+/* -+ * Sometimes the receiver stops making progress. This routine knows how to -+ * get it going again, without losing packets or being otherwise nasty like -+ * a chip reset would be. Previously the driver had a whole sequence -+ * of if RxSuspended, if it's no buffers do one thing, if it's no resources, -+ * do another, etc. But those things don't really matter. Separate logic -+ * in the ISR provides for allocating buffers--the other half of operation -+ * is just making sure the receiver is active. speedo_rx_soft_reset does that. -+ * This problem with the old, more involved algorithm is shown up under -+ * ping floods on the order of 60K packets/second on a 100Mbps fdx network. -+ */ -+static void -+speedo_rx_soft_reset(void) -+{ -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ /* -+ * Put the hardware into a known state. -+ */ -+ outb(RX_ABORT, ioaddr + SCBCmd); -+ -+ ACCESS(rxfd)rx_buf_addr = 0xffffffff; -+ -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ -+ outb(RX_START, ioaddr + SCBCmd); -+} -+ - /* function: eepro100_poll / eth_poll - * This recieves a packet from the network. - * -@@ -440,34 +479,87 @@ - * returns the length of the packet in nic->packetlen. - */ - --static int eepro100_poll(struct nic *nic) -+static int eepro100_poll(struct nic *nic, int retrieve) - { -- if (!ACCESS(rxfd)status) -- return 0; -+ unsigned int status; -+ status = inw(ioaddr + SCBStatus); - -- /* Ok. We got a packet. Now restart the reciever.... */ -- ACCESS(rxfd)status = 0; -- ACCESS(rxfd)command = 0xc000; -- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -- outw(INT_MASK | RX_START, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -+ if (!ACCESS(rxfd)status) -+ return 0; -+ -+ /* There is a packet ready */ -+ if ( ! retrieve ) return 1; -+ -+ /* -+ * The chip may have suspended reception for various reasons. -+ * Check for that, and re-prime it should this be the case. -+ */ -+ switch ((status >> 2) & 0xf) { -+ case 0: /* Idle */ -+ break; -+ case 1: /* Suspended */ -+ case 2: /* No resources (RxFDs) */ -+ case 9: /* Suspended with no more RBDs */ -+ case 10: /* No resources due to no RBDs */ -+ case 12: /* Ready with no RBDs */ -+ speedo_rx_soft_reset(); -+ break; -+ case 3: case 5: case 6: case 7: case 8: -+ case 11: case 13: case 14: case 15: -+ /* these are all reserved values */ -+ break; -+ } -+ -+ /* Ok. We got a packet. Now restart the reciever.... */ -+ ACCESS(rxfd)status = 0; -+ ACCESS(rxfd)command = 0xc000; -+ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -+ outw(INT_MASK | RX_START, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); - - #ifdef DEBUG -- printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); -+ printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); - #endif -- nic->packetlen = ACCESS(rxfd)count & 0x3fff; -- memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); -+ nic->packetlen = ACCESS(rxfd)count & 0x3fff; -+ memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); - #ifdef DEBUG -- hd (nic->packet, 0x30); -+ hd (nic->packet, 0x30); - #endif -- return 1; -+ return 1; - } - --static void eepro100_disable(struct nic *nic) -+/* function: eepro100_disable -+ * resets the card. This is used to allow Etherboot or Linux -+ * to probe the card again from a "virginal" state.... -+ * Arguments: none -+ * -+ * returns: void. -+ */ -+static void eepro100_disable(struct dev *dev __unused) - { -- /* See if this PartialReset solves the problem with interfering with -- kernel operation after Etherboot hands over. - Ken 20001102 */ -- outl(2, ioaddr + SCBPort); -+/* from eepro100_reset */ -+ outl(0, ioaddr + SCBPort); -+/* from eepro100_disable */ -+ /* See if this PartialReset solves the problem with interfering with -+ kernel operation after Etherboot hands over. - Ken 20001102 */ -+ outl(2, ioaddr + SCBPort); -+ -+ /* The following is from the Intel e100 driver. -+ * This hopefully solves the problem with hanging hard DOS images. */ -+ -+ /* wait for the reset to take effect */ -+ udelay(20); -+ -+ /* Mask off our interrupt line -- it is unmasked after reset */ -+ { -+ u16 intr_status; -+ /* Disable interrupts on our PCI board by setting the mask bit */ -+ outw(INT_MASK, ioaddr + SCBCmd); -+ intr_status = inw(ioaddr + SCBStatus); -+ /* ack and clear intrs */ -+ outw(intr_status, ioaddr + SCBStatus); -+ inw(ioaddr + SCBStatus); -+ } - } - - /* exported function: eepro100_probe / eth_probe -@@ -478,25 +570,30 @@ - * leaves the 82557 initialized, and ready to recieve packets. - */ - --struct nic *eepro100_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *p) -+static int eepro100_probe(struct dev *dev, struct pci_device *p) - { -+ struct nic *nic = (struct nic *)dev; - unsigned short sum = 0; - int i; - int read_cmd, ee_size; -- unsigned short value; - int options; -- int promisc; -+ int rx_mode; - - /* we cache only the first few words of the EEPROM data - be careful not to access beyond this array */ - unsigned short eeprom[16]; - -- if (probeaddrs == 0 || probeaddrs[0] == 0) -+ if (p->ioaddr == 0) - return 0; -- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ -+ ioaddr = p->ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ -+ nic->ioaddr = ioaddr; - - adjust_pci_device(p); - -+ /* Copy IRQ from PCI information */ -+ /* nic->irqno = pci->irq; */ -+ nic->irqno = 0; -+ - if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000) - == 0xffe0000) { - ee_size = 0x100; -@@ -513,123 +610,138 @@ - sum += value; - } - -- for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; -- } -- printf ("Ethernet addr: %!\n", nic->node_addr); -- -- if (sum != 0xBABA) -- printf("eepro100: Invalid EEPROM checksum %#hX, " -- "check settings before activating this device!\n", sum); -- outl(0, ioaddr + SCBPort); -- udelay (10000); -- -- whereami ("Got eeprom."); -- -- outl(virt_to_bus(&lstats), ioaddr + SCBPointer); -- outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -- -- whereami ("set stats addr."); -- /* INIT RX stuff. */ -- -- /* Base = 0 */ -- outl(0, ioaddr + SCBPointer); -- outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -- -- whereami ("set rx base addr."); -- -- ACCESS(rxfd)status = 0x0001; -- ACCESS(rxfd)command = 0x0000; -- ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); -- ACCESS(rxfd)rx_buf_addr = (int) &nic->packet; -- ACCESS(rxfd)count = 0; -- ACCESS(rxfd)size = 1528; -- -- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -- outw(INT_MASK | RX_START, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -- -- whereami ("started RX process."); -- -- /* Start the reciever.... */ -- ACCESS(rxfd)status = 0; -- ACCESS(rxfd)command = 0xc000; -- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -- outw(INT_MASK | RX_START, ioaddr + SCBCmd); -- -- /* INIT TX stuff. */ -- -- /* Base = 0 */ -- outl(0, ioaddr + SCBPointer); -- outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -- -- whereami ("set TX base addr."); -- -- txfd.command = (CmdIASetup); -- txfd.status = 0x0000; -- txfd.link = virt_to_bus (&confcmd); -- -- { -- char *t = (char *)&txfd.tx_desc_addr; -+ for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; -+ } -+ printf ("Ethernet addr: %!\n", nic->node_addr); - -- for (i=0;inode_addr[i]; -- } -+ if (sum != 0xBABA) -+ printf("eepro100: Invalid EEPROM checksum %#hX, " -+ "check settings before activating this device!\n", sum); -+ outl(0, ioaddr + SCBPort); -+ udelay (10000); -+ whereami ("Got eeprom."); -+ -+ /* Base = 0 */ -+ outl(0, ioaddr + SCBPointer); -+ outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ whereami ("set rx base addr."); -+ -+ outl(virt_to_bus(&lstats), ioaddr + SCBPointer); -+ outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ whereami ("set stats addr."); -+ -+ /* INIT RX stuff. */ -+ ACCESS(rxfd)status = 0x0001; -+ ACCESS(rxfd)command = 0x0000; -+ ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); -+ ACCESS(rxfd)rx_buf_addr = virt_to_bus(&nic->packet); -+ ACCESS(rxfd)count = 0; -+ ACCESS(rxfd)size = 1528; -+ -+ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -+ outw(INT_MASK | RX_START, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ -+ whereami ("started RX process."); -+ -+ /* Start the reciever.... */ -+ ACCESS(rxfd)status = 0; -+ ACCESS(rxfd)command = 0xc000; -+ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); -+ outw(INT_MASK | RX_START, ioaddr + SCBCmd); -+ -+ /* INIT TX stuff. */ -+ -+ /* Base = 0 */ -+ outl(0, ioaddr + SCBPointer); -+ outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ -+ whereami ("set TX base addr."); -+ -+ txfd.command = (CmdIASetup); -+ txfd.status = 0x0000; -+ txfd.link = virt_to_bus (&confcmd); -+ -+ { -+ char *t = (char *)&txfd.tx_desc_addr; -+ -+ for (i=0;inode_addr[i]; -+ } - - #ifdef DEBUG -- printf ("Setup_eaddr:\n"); -- hd (&txfd, 0x20); -+ printf ("Setup_eaddr:\n"); -+ hd (&txfd, 0x20); - #endif -- /* options = 0x40; */ /* 10mbps half duplex... */ -- options = 0x00; /* Autosense */ -- -- promisc = 0; -- -- if ( ((eeprom[6]>>8) & 0x3f) == DP83840 -- || ((eeprom[6]>>8) & 0x3f) == DP83840A) { -- int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; -- if (congenb) -- mdi_reg23 |= 0x0100; -- printf(" DP83840 specific setup, setting register 23 to %hX.\n", -- mdi_reg23); -- mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); -- } -- whereami ("Done DP8340 special setup."); -- if (options != 0) { -- mdio_write(eeprom[6] & 0x1f, 0, -- ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ -- ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ -- whereami ("set mdio_register."); -- } -+ /* options = 0x40; */ /* 10mbps half duplex... */ -+ options = 0x00; /* Autosense */ - -- confcmd.command = CmdSuspend | CmdConfigure; -- confcmd.status = 0x0000; -- confcmd.link = virt_to_bus (&txfd); -- confcmd.data[1] = (txfifo << 4) | rxfifo; -- confcmd.data[4] = rxdmacount; -- confcmd.data[5] = txdmacount + 0x80; -- confcmd.data[15] = promisc ? 0x49: 0x48; -- confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; -- confcmd.data[21] = promisc ? 0x0D: 0x05; -+#ifdef PROMISC -+ rx_mode = 3; -+#elif ALLMULTI -+ rx_mode = 1; -+#else -+ rx_mode = 0; -+#endif - -- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); -- outw(INT_MASK | CU_START, ioaddr + SCBCmd); -- wait_for_cmd_done(ioaddr + SCBCmd); -+ if ( ((eeprom[6]>>8) & 0x3f) == DP83840 -+ || ((eeprom[6]>>8) & 0x3f) == DP83840A) { -+ int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; -+ if (congenb) -+ mdi_reg23 |= 0x0100; -+ printf(" DP83840 specific setup, setting register 23 to %hX.\n", -+ mdi_reg23); -+ mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); -+ } -+ whereami ("Done DP8340 special setup."); -+ if (options != 0) { -+ mdio_write(eeprom[6] & 0x1f, 0, -+ ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ -+ ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ -+ whereami ("set mdio_register."); -+ } - -- whereami ("started TX thingy (config, iasetup)."); -+ confcmd.command = CmdSuspend | CmdConfigure; -+ confcmd.status = 0x0000; -+ confcmd.link = virt_to_bus (&txfd); -+ confcmd.data[1] = (txfifo << 4) | rxfifo; -+ confcmd.data[4] = rxdmacount; -+ confcmd.data[5] = txdmacount + 0x80; -+ confcmd.data[15] = (rx_mode & 2) ? 0x49: 0x48; -+ confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; -+ confcmd.data[21] = (rx_mode & 1) ? 0x0D: 0x05; -+ -+ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); -+ outw(INT_MASK | CU_START, ioaddr + SCBCmd); -+ wait_for_cmd_done(ioaddr + SCBCmd); -+ -+ whereami ("started TX thingy (config, iasetup)."); -+ -+ load_timer2(10*TICKS_PER_MS); -+ while (!txfd.status && timer2_running()) -+ /* Wait */; -+ -+ /* Read the status register once to disgard stale data */ -+ mdio_read(eeprom[6] & 0x1f, 1); -+ /* Check to see if the network cable is plugged in. -+ * This allows for faster failure if there is nothing -+ * we can do. -+ */ -+ if (!(mdio_read(eeprom[6] & 0x1f, 1) & (1 << 2))) { -+ printf("Valid link not established\n"); -+ eepro100_disable(dev); -+ return 0; -+ } - -- load_timer2(10*TICKS_PER_MS); -- while (!txfd.status && timer2_running()) -- /* Wait */; -- -- nic->reset = eepro100_reset; -- nic->poll = eepro100_poll; -- nic->transmit = eepro100_transmit; -- nic->disable = eepro100_disable; -- return nic; -+ dev->disable = eepro100_disable; -+ nic->poll = eepro100_poll; -+ nic->transmit = eepro100_transmit; -+ nic->irq = eepro100_irq; -+ return 1; - } - - /*********************************************************************/ -@@ -639,16 +751,59 @@ - /* Hexdump a number of bytes from memory... */ - void hd (void *where, int n) - { -- int i; -+ int i; - -- while (n > 0) { -- printf ("%X ", where); -- for (i=0;i < ( (n>16)?16:n);i++) -- printf (" %hhX", ((char *)where)[i]); -- printf ("\n"); -- n -= 16; -- where += 16; -- } -+ while (n > 0) { -+ printf ("%X ", where); -+ for (i=0;i < ( (n>16)?16:n);i++) -+ printf (" %hhX", ((char *)where)[i]); -+ printf ("\n"); -+ n -= 16; -+ where += 16; -+ } - } - #endif - -+static struct pci_id eepro100_nics[] = { -+PCI_ROM(0x8086, 0x1029, "id1029", "Intel EtherExpressPro100 ID1029"), -+PCI_ROM(0x8086, 0x1030, "id1030", "Intel EtherExpressPro100 ID1030"), -+PCI_ROM(0x8086, 0x1031, "82801cam", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), -+PCI_ROM(0x8086, 0x1032, "eepro100-1032", "Intel PRO/100 VE Network Connection"), -+PCI_ROM(0x8086, 0x1033, "eepro100-1033", "Intel PRO/100 VM Network Connection"), -+PCI_ROM(0x8086, 0x1034, "eepro100-1034", "Intel PRO/100 VM Network Connection"), -+PCI_ROM(0x8086, 0x1035, "eepro100-1035", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), -+PCI_ROM(0x8086, 0x1036, "eepro100-1036", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), -+PCI_ROM(0x8086, 0x1037, "eepro100-1037", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), -+PCI_ROM(0x8086, 0x1038, "id1038", "Intel PRO/100 VM Network Connection"), -+PCI_ROM(0x8086, 0x1039, "82562et", "Intel PRO100 VE 82562ET"), -+PCI_ROM(0x8086, 0x103a, "id103a", "Intel Corporation 82559 InBusiness 10/100"), -+PCI_ROM(0x8086, 0x103b, "82562etb", "Intel PRO100 VE 82562ETB"), -+PCI_ROM(0x8086, 0x103c, "eepro100-103c", "Intel PRO/100 VM Network Connection"), -+PCI_ROM(0x8086, 0x103d, "eepro100-103d", "Intel PRO/100 VE Network Connection"), -+PCI_ROM(0x8086, 0x103e, "eepro100-103e", "Intel PRO/100 VM Network Connection"), -+PCI_ROM(0x8086, 0x1059, "82551qm", "Intel PRO/100 M Mobile Connection"), -+PCI_ROM(0x8086, 0x1209, "82559er", "Intel EtherExpressPro100 82559ER"), -+PCI_ROM(0x8086, 0x1227, "82865", "Intel 82865 EtherExpress PRO/100A"), -+PCI_ROM(0x8086, 0x1228, "82556", "Intel 82556 EtherExpress PRO/100 Smart"), -+PCI_ROM(0x8086, 0x1229, "eepro100", "Intel EtherExpressPro100"), -+PCI_ROM(0x8086, 0x2449, "82562em", "Intel EtherExpressPro100 82562EM"), -+PCI_ROM(0x8086, 0x2459, "82562-1", "Intel 82562 based Fast Ethernet Connection"), -+PCI_ROM(0x8086, 0x245d, "82562-2", "Intel 82562 based Fast Ethernet Connection"), -+PCI_ROM(0x8086, 0x1050, "82562ez", "Intel 82562EZ Network Connection"), -+PCI_ROM(0x8086, 0x5200, "eepro100-5200", "Intel EtherExpress PRO/100 Intelligent Server"), -+PCI_ROM(0x8086, 0x5201, "eepro100-5201", "Intel EtherExpress PRO/100 Intelligent Server"), -+}; -+ -+/* Cards with device ids 0x1030 to 0x103F, 0x2449, 0x2459 or 0x245D might need -+ * a workaround for hardware bug on 10 mbit half duplex (see linux driver eepro100.c) -+ * 2003/03/17 gbaum */ -+ -+ -+struct pci_driver eepro100_driver = { -+ .type = NIC_DRIVER, -+ .name = "EEPRO100", -+ .probe = eepro100_probe, -+ .ids = eepro100_nics, -+ .id_count = sizeof(eepro100_nics)/sizeof(eepro100_nics[0]), -+ .class = 0 -+}; -Index: b/netboot/elf.h -=================================================================== ---- /dev/null -+++ b/netboot/elf.h -@@ -0,0 +1,234 @@ -+#ifndef ELF_H -+#define ELF_H -+ -+#define EI_NIDENT 16 /* Size of e_ident array. */ -+ -+/* Values for e_type. */ -+#define ET_NONE 0 /* No file type */ -+#define ET_REL 1 /* Relocatable file */ -+#define ET_EXEC 2 /* Executable file */ -+#define ET_DYN 3 /* Shared object file */ -+#define ET_CORE 4 /* Core file */ -+ -+/* Values for e_machine (architecute). */ -+#define EM_NONE 0 /* No machine */ -+#define EM_M32 1 /* AT&T WE 32100 */ -+#define EM_SPARC 2 /* SUN SPARC */ -+#define EM_386 3 /* Intel 80386+ */ -+#define EM_68K 4 /* Motorola m68k family */ -+#define EM_88K 5 /* Motorola m88k family */ -+#define EM_486 6 /* Perhaps disused */ -+#define EM_860 7 /* Intel 80860 */ -+#define EM_MIPS 8 /* MIPS R3000 big-endian */ -+#define EM_S370 9 /* IBM System/370 */ -+#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ -+ -+#define EM_PARISC 15 /* HPPA */ -+#define EM_VPP500 17 /* Fujitsu VPP500 */ -+#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ -+#define EM_960 19 /* Intel 80960 */ -+#define EM_PPC 20 /* PowerPC */ -+#define EM_PPC64 21 /* PowerPC 64-bit */ -+#define EM_S390 22 /* IBM S390 */ -+ -+#define EM_V800 36 /* NEC V800 series */ -+#define EM_FR20 37 /* Fujitsu FR20 */ -+#define EM_RH32 38 /* TRW RH-32 */ -+#define EM_RCE 39 /* Motorola RCE */ -+#define EM_ARM 40 /* ARM */ -+#define EM_FAKE_ALPHA 41 /* Digital Alpha */ -+#define EM_SH 42 /* Hitachi SH */ -+#define EM_SPARCV9 43 /* SPARC v9 64-bit */ -+#define EM_TRICORE 44 /* Siemens Tricore */ -+#define EM_ARC 45 /* Argonaut RISC Core */ -+#define EM_H8_300 46 /* Hitachi H8/300 */ -+#define EM_H8_300H 47 /* Hitachi H8/300H */ -+#define EM_H8S 48 /* Hitachi H8S */ -+#define EM_H8_500 49 /* Hitachi H8/500 */ -+#define EM_IA_64 50 /* Intel Merced */ -+#define EM_MIPS_X 51 /* Stanford MIPS-X */ -+#define EM_COLDFIRE 52 /* Motorola Coldfire */ -+#define EM_68HC12 53 /* Motorola M68HC12 */ -+#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ -+#define EM_PCP 55 /* Siemens PCP */ -+#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ -+#define EM_NDR1 57 /* Denso NDR1 microprocessor */ -+#define EM_STARCORE 58 /* Motorola Start*Core processor */ -+#define EM_ME16 59 /* Toyota ME16 processor */ -+#define EM_ST100 60 /* STMicroelectronic ST100 processor */ -+#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ -+#define EM_X86_64 62 /* AMD x86-64 architecture */ -+#define EM_PDSP 63 /* Sony DSP Processor */ -+ -+#define EM_FX66 66 /* Siemens FX66 microcontroller */ -+#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ -+#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ -+#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ -+#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ -+#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ -+#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ -+#define EM_SVX 73 /* Silicon Graphics SVx */ -+#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */ -+#define EM_VAX 75 /* Digital VAX */ -+#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ -+#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */ -+#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ -+#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ -+#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ -+#define EM_HUANY 81 /* Harvard University machine-independent object files */ -+#define EM_PRISM 82 /* SiTera Prism */ -+#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ -+#define EM_FR30 84 /* Fujitsu FR30 */ -+#define EM_D10V 85 /* Mitsubishi D10V */ -+#define EM_D30V 86 /* Mitsubishi D30V */ -+#define EM_V850 87 /* NEC v850 */ -+#define EM_M32R 88 /* Mitsubishi M32R */ -+#define EM_MN10300 89 /* Matsushita MN10300 */ -+#define EM_MN10200 90 /* Matsushita MN10200 */ -+#define EM_PJ 91 /* picoJava */ -+#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ -+#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ -+#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ -+#define EM_NUM 95 -+ -+/* Values for p_type. */ -+#define PT_NULL 0 /* Unused entry. */ -+#define PT_LOAD 1 /* Loadable segment. */ -+#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ -+#define PT_INTERP 3 /* Pathname of interpreter. */ -+#define PT_NOTE 4 /* Auxiliary information. */ -+#define PT_SHLIB 5 /* Reserved (not used). */ -+#define PT_PHDR 6 /* Location of program header itself. */ -+ -+/* Values for p_flags. */ -+#define PF_X 0x1 /* Executable. */ -+#define PF_W 0x2 /* Writable. */ -+#define PF_R 0x4 /* Readable. */ -+ -+ -+#define ELF_PROGRAM_RETURNS_BIT 0x8000000 /* e_flags bit 31 */ -+ -+#define EI_MAG0 0 -+#define ELFMAG0 0x7f -+ -+#define EI_MAG1 1 -+#define ELFMAG1 'E' -+ -+#define EI_MAG2 2 -+#define ELFMAG2 'L' -+ -+#define EI_MAG3 3 -+#define ELFMAG3 'F' -+ -+#define ELFMAG "\177ELF" -+ -+#define EI_CLASS 4 /* File class byte index */ -+#define ELFCLASSNONE 0 /* Invalid class */ -+#define ELFCLASS32 1 /* 32-bit objects */ -+#define ELFCLASS64 2 /* 64-bit objects */ -+ -+#define EI_DATA 5 /* Data encodeing byte index */ -+#define ELFDATANONE 0 /* Invalid data encoding */ -+#define ELFDATA2LSB 1 /* 2's complement little endian */ -+#define ELFDATA2MSB 2 /* 2's complement big endian */ -+ -+#define EI_VERSION 6 /* File version byte index */ -+ /* Value must be EV_CURRENT */ -+ -+#define EV_NONE 0 /* Invalid ELF Version */ -+#define EV_CURRENT 1 /* Current version */ -+ -+#define ELF32_PHDR_SIZE (8*4) /* Size of an elf program header */ -+ -+#ifndef ASSEMBLY -+/* -+ * ELF definitions common to all 32-bit architectures. -+ */ -+ -+typedef uint32_t Elf32_Addr; -+typedef uint16_t Elf32_Half; -+typedef uint32_t Elf32_Off; -+typedef int32_t Elf32_Sword; -+typedef uint32_t Elf32_Word; -+typedef uint32_t Elf32_Size; -+ -+typedef uint64_t Elf64_Addr; -+typedef uint16_t Elf64_Half; -+typedef uint64_t Elf64_Off; -+typedef int32_t Elf64_Sword; -+typedef uint32_t Elf64_Word; -+typedef uint64_t Elf64_Size; -+ -+/* -+ * ELF header. -+ */ -+typedef struct { -+ unsigned char e_ident[EI_NIDENT]; /* File identification. */ -+ Elf32_Half e_type; /* File type. */ -+ Elf32_Half e_machine; /* Machine architecture. */ -+ Elf32_Word e_version; /* ELF format version. */ -+ Elf32_Addr e_entry; /* Entry point. */ -+ Elf32_Off e_phoff; /* Program header file offset. */ -+ Elf32_Off e_shoff; /* Section header file offset. */ -+ Elf32_Word e_flags; /* Architecture-specific flags. */ -+ Elf32_Half e_ehsize; /* Size of ELF header in bytes. */ -+ Elf32_Half e_phentsize; /* Size of program header entry. */ -+ Elf32_Half e_phnum; /* Number of program header entries. */ -+ Elf32_Half e_shentsize; /* Size of section header entry. */ -+ Elf32_Half e_shnum; /* Number of section header entries. */ -+ Elf32_Half e_shstrndx; /* Section name strings section. */ -+} Elf32_Ehdr; -+ -+typedef struct { -+ unsigned char e_ident[EI_NIDENT]; /* File identification. */ -+ Elf64_Half e_type; /* File type. */ -+ Elf64_Half e_machine; /* Machine architecture. */ -+ Elf64_Word e_version; /* ELF format version. */ -+ Elf64_Addr e_entry; /* Entry point. */ -+ Elf64_Off e_phoff; /* Program header file offset. */ -+ Elf64_Off e_shoff; /* Section header file offset. */ -+ Elf64_Word e_flags; /* Architecture-specific flags. */ -+ Elf64_Half e_ehsize; /* Size of ELF header in bytes. */ -+ Elf64_Half e_phentsize; /* Size of program header entry. */ -+ Elf64_Half e_phnum; /* Number of program header entries. */ -+ Elf64_Half e_shentsize; /* Size of section header entry. */ -+ Elf64_Half e_shnum; /* Number of section header entries. */ -+ Elf64_Half e_shstrndx; /* Section name strings section. */ -+} Elf64_Ehdr; -+ -+/* -+ * Program header. -+ */ -+typedef struct { -+ Elf32_Word p_type; /* Entry type. */ -+ Elf32_Off p_offset; /* File offset of contents. */ -+ Elf32_Addr p_vaddr; /* Virtual address (not used). */ -+ Elf32_Addr p_paddr; /* Physical address. */ -+ Elf32_Size p_filesz; /* Size of contents in file. */ -+ Elf32_Size p_memsz; /* Size of contents in memory. */ -+ Elf32_Word p_flags; /* Access permission flags. */ -+ Elf32_Size p_align; /* Alignment in memory and file. */ -+} Elf32_Phdr; -+ -+typedef struct { -+ Elf64_Word p_type; /* Entry type. */ -+ Elf64_Word p_flags; /* Access permission flags. */ -+ Elf64_Off p_offset; /* File offset of contents. */ -+ Elf64_Addr p_vaddr; /* Virtual address (not used). */ -+ Elf64_Addr p_paddr; /* Physical address. */ -+ Elf64_Size p_filesz; /* Size of contents in file. */ -+ Elf64_Size p_memsz; /* Size of contents in memory. */ -+ Elf64_Size p_align; /* Alignment in memory and file. */ -+} Elf64_Phdr; -+ -+/* Standardized Elf image notes for booting... The name for all of these is ELFBoot */ -+ -+ -+/* ELF Defines for the current architecture */ -+#include "i386_elf.h" -+ -+#endif /* ASSEMBLY */ -+ -+//#include "elf_boot.h" -+ -+#endif /* ELF_H */ -Index: b/netboot/endian.h -=================================================================== ---- /dev/null -+++ b/netboot/endian.h -@@ -0,0 +1,19 @@ -+#ifndef ETHERBOOT_ENDIAN_H -+#define ETHERBOOT_ENDIAN_H -+ -+/* Definitions for byte order, according to significance of bytes, -+ from low addresses to high addresses. The value is what you get by -+ putting '4' in the most significant byte, '3' in the second most -+ significant byte, '2' in the second least significant byte, and '1' -+ in the least significant byte, and then writing down one digit for -+ each byte, starting with the byte at the lowest address at the left, -+ and proceeding to the byte with the highest address at the right. */ -+ -+#define __LITTLE_ENDIAN 1234 -+#define __BIG_ENDIAN 4321 -+#define __PDP_ENDIAN 3412 -+ -+#include "i386_endian.h" -+ -+ -+#endif /* ETHERBOOT_ENDIAN_H */ -Index: b/netboot/epic100.c -=================================================================== ---- a/netboot/epic100.c -+++ b/netboot/epic100.c -@@ -1,15 +1,18 @@ -+ - /* epic100.c: A SMC 83c170 EPIC/100 fast ethernet driver for Etherboot */ - -+/* 05/06/2003 timlegge Fixed relocation and implemented Multicast */ - #define LINUX_OUT_MACROS - - #include "etherboot.h" -+#include "pci.h" - #include "nic.h" --#include "cards.h" - #include "timer.h" - #include "epic100.h" - --#undef virt_to_bus --#define virt_to_bus(x) ((unsigned long)x) -+/* Condensed operations for readability */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) - - #define TX_RING_SIZE 2 /* use at least 2 buffers for TX */ - #define RX_RING_SIZE 2 -@@ -26,23 +29,18 @@ - - /* The EPIC100 Rx and Tx buffer descriptors. */ - struct epic_rx_desc { -- unsigned short status; -- unsigned short rxlength; -- unsigned long bufaddr; -- unsigned short buflength; -- unsigned short control; -- unsigned long next; -+ unsigned long status; -+ unsigned long bufaddr; -+ unsigned long buflength; -+ unsigned long next; - }; -- - /* description of the tx descriptors control bits commonly used */ - #define TD_STDFLAGS TD_LASTDESC - - struct epic_tx_desc { -- unsigned short status; -- unsigned short txlength; -- unsigned long bufaddr; -- unsigned short buflength; -- unsigned short control; -+ unsigned long status; -+ unsigned long bufaddr; -+ unsigned long buflength; - unsigned long next; - }; - -@@ -51,12 +49,15 @@ - - static void epic100_open(void); - static void epic100_init_ring(void); --static void epic100_disable(struct nic *nic); --static int epic100_poll(struct nic *nic); -+static void epic100_disable(struct dev *dev); -+static int epic100_poll(struct nic *nic, int retrieve); - static void epic100_transmit(struct nic *nic, const char *destaddr, - unsigned int type, unsigned int len, const char *data); -+#ifdef DEBUG_EEPROM - static int read_eeprom(int location); -+#endif - static int mii_read(int phy_id, int location); -+static void epic100_irq(struct nic *nic, irq_action_t action); - - static int ioaddr; - -@@ -69,6 +70,7 @@ - static int mmctl ; - static int mmdata ; - static int lan0 ; -+static int mc0 ; - static int rxcon ; - static int txcon ; - static int prcdar ; -@@ -80,37 +82,27 @@ - static unsigned short eeprom[64]; - #endif - static signed char phys[4]; /* MII device addresses. */ --static struct epic_rx_desc rx_ring[RX_RING_SIZE]; --static struct epic_tx_desc tx_ring[TX_RING_SIZE]; --#ifdef USE_LOWMEM_BUFFER --#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) --#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) --#else --static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; --static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; --#endif -+static struct epic_rx_desc rx_ring[RX_RING_SIZE] -+ __attribute__ ((aligned(4))); -+static struct epic_tx_desc tx_ring[TX_RING_SIZE] -+ __attribute__ ((aligned(4))); -+static unsigned char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; -+static unsigned char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; - - /***********************************************************************/ - /* Externally visible functions */ - /***********************************************************************/ - -- static void --epic100_reset(struct nic *nic) --{ -- /* Soft reset the chip. */ -- outl(GC_SOFT_RESET, genctl); --} - -- struct nic* --epic100_probe(struct nic *nic, unsigned short *probeaddrs) -+ static int -+epic100_probe(struct dev *dev, struct pci_device *pci) - { -- unsigned short sum = 0; -- unsigned short value; -+ struct nic *nic = (struct nic *)dev; - int i; - unsigned short* ap; - unsigned int phy, phy_idx; - -- if (probeaddrs == 0 || probeaddrs[0] == 0) -+ if (pci->ioaddr == 0) - return 0; - - /* Ideally we would detect all network cards in slot order. That would -@@ -118,7 +110,9 @@ - well with the current structure. So instead we detect just the - Epic cards in slot order. */ - -- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ -+ ioaddr = pci->ioaddr; -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; - - /* compute all used static epic100 registers address */ - command = ioaddr + COMMAND; /* Control Register */ -@@ -130,6 +124,7 @@ - mmctl = ioaddr + MMCTL; /* MII Management Interface Control */ - mmdata = ioaddr + MMDATA; /* MII Management Interface Data */ - lan0 = ioaddr + LAN0; /* MAC address. (0x40-0x48) */ -+ mc0 = ioaddr + MC0; /* Multicast Control */ - rxcon = ioaddr + RXCON; /* Receive Control */ - txcon = ioaddr + TXCON; /* Transmit Control */ - prcdar = ioaddr + PRCDAR; /* PCI Receive Current Descr Address */ -@@ -160,11 +155,15 @@ - } - - #ifdef DEBUG_EEPROM -+{ -+ unsigned short sum = 0; -+ unsigned short value; - for (i = 0; i < 64; i++) { - value = read_eeprom(i); - eeprom[i] = value; - sum += value; - } -+} - - #if (EPIC_DEBUG > 1) - printf("EEPROM contents\n"); -@@ -202,15 +201,26 @@ - - epic100_open(); - -- nic->reset = epic100_reset; -+ dev->disable = epic100_disable; - nic->poll = epic100_poll; - nic->transmit = epic100_transmit; -- nic->disable = epic100_disable; -+ nic->irq = epic100_irq; - -- return nic; -+ return 1; - } - -- static void -+static void set_rx_mode(void) -+{ -+ unsigned char mc_filter[8]; -+ int i; -+ memset(mc_filter, 0xff, sizeof(mc_filter)); -+ outl(0x0C, rxcon); -+ for(i = 0; i < 4; i++) -+ outw(((unsigned short *)mc_filter)[i], mc0 + i*4); -+ return; -+} -+ -+ static void - epic100_open(void) - { - int mii_reg5; -@@ -237,11 +247,11 @@ - outl(tmp, txcon); - - /* Give adress of RX and TX ring to the chip */ -- outl(virt_to_bus(&rx_ring), prcdar); -- outl(virt_to_bus(&tx_ring), ptcdar); -+ outl(virt_to_le32desc(&rx_ring), prcdar); -+ outl(virt_to_le32desc(&tx_ring), ptcdar); - - /* Start the chip's Rx process: receive unicast and broadcast */ -- outl(0x04, rxcon); -+ set_rx_mode(); - outl(CR_START_RX | CR_QUEUE_RX, command); - - putchar('\n'); -@@ -252,34 +262,30 @@ - epic100_init_ring(void) - { - int i; -- char* p; - - cur_rx = cur_tx = 0; - -- p = &rx_packet[0]; - for (i = 0; i < RX_RING_SIZE; i++) { -- rx_ring[i].status = RRING_OWN; /* Owned by Epic chip */ -- rx_ring[i].buflength = PKT_BUF_SZ; -- rx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); -- rx_ring[i].control = 0; -- rx_ring[i].next = virt_to_bus(&(rx_ring[i + 1]) ); -+ rx_ring[i].status = cpu_to_le32(RRING_OWN); /* Owned by Epic chip */ -+ rx_ring[i].buflength = cpu_to_le32(PKT_BUF_SZ); -+ rx_ring[i].bufaddr = virt_to_bus(&rx_packet[i * PKT_BUF_SZ]); -+ rx_ring[i].next = virt_to_le32desc(&rx_ring[i + 1]) ; - } - /* Mark the last entry as wrapping the ring. */ -- rx_ring[i-1].next = virt_to_bus(&rx_ring[0]); -+ rx_ring[i-1].next = virt_to_le32desc(&rx_ring[0]); - - /* - *The Tx buffer descriptor is filled in as needed, - * but we do need to clear the ownership bit. - */ -- p = &tx_packet[0]; - - for (i = 0; i < TX_RING_SIZE; i++) { -- tx_ring[i].status = 0; /* Owned by CPU */ -- tx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); -- tx_ring[i].control = TD_STDFLAGS; -- tx_ring[i].next = virt_to_bus(&(tx_ring[i + 1]) ); -+ tx_ring[i].status = 0x0000; /* Owned by CPU */ -+ tx_ring[i].buflength = 0x0000 | cpu_to_le32(TD_STDFLAGS << 16); -+ tx_ring[i].bufaddr = virt_to_bus(&tx_packet[i * PKT_BUF_SZ]); -+ tx_ring[i].next = virt_to_le32desc(&tx_ring[i + 1]); - } -- tx_ring[i-1].next = virt_to_bus(&tx_ring[0]); -+ tx_ring[i-1].next = virt_to_le32desc(&tx_ring[0]); - } - - /* function: epic100_transmit -@@ -296,7 +302,7 @@ - unsigned int len, const char *data) - { - unsigned short nstype; -- char* txp; -+ unsigned char *txp; - int entry; - - /* Calculate the next Tx descriptor entry. */ -@@ -310,7 +316,7 @@ - return; - } - -- txp = (char*)tx_ring[entry].bufaddr; -+ txp = tx_packet + (entry * PKT_BUF_SZ); - - memcpy(txp, destaddr, ETH_ALEN); - memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); -@@ -319,26 +325,29 @@ - memcpy(txp + ETH_HLEN, data, len); - - len += ETH_HLEN; -- -+ len &= 0x0FFF; -+ while(len < ETH_ZLEN) -+ txp[len++] = '\0'; - /* - * Caution: the write order is important here, - * set the base address with the "ownership" - * bits last. - */ -- tx_ring[entry].txlength = (len >= 60 ? len : 60); -- tx_ring[entry].buflength = len; -- tx_ring[entry].status = TRING_OWN; /* Pass ownership to the chip. */ -+ -+ tx_ring[entry].buflength |= cpu_to_le32(len); -+ tx_ring[entry].status = cpu_to_le32(len << 16) | -+ cpu_to_le32(TRING_OWN); /* Pass ownership to the chip. */ - - cur_tx++; - - /* Trigger an immediate transmit demand. */ -- outl(CR_QUEUE_TX, command); -- -+ outl(CR_QUEUE_TX, command); -+ - load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ -- while ((tx_ring[entry].status & TRING_OWN) && timer2_running()) -+ while ((le32_to_cpu(tx_ring[entry].status) & (TRING_OWN)) && timer2_running()) - /* Wait */; - -- if ((tx_ring[entry].status & TRING_OWN) != 0) -+ if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0) - printf("Oops, transmitter timeout, status=%hX\n", - tx_ring[entry].status); - } -@@ -356,17 +365,19 @@ - */ - - static int --epic100_poll(struct nic *nic) -+epic100_poll(struct nic *nic, int retrieve) - { - int entry; -- int status; - int retcode; -- -+ int status; - entry = cur_rx % RX_RING_SIZE; - -- if ((status = rx_ring[entry].status & RRING_OWN) == RRING_OWN) -+ if ((rx_ring[entry].status & cpu_to_le32(RRING_OWN)) == RRING_OWN) - return (0); - -+ if ( ! retrieve ) return 1; -+ -+ status = le32_to_cpu(rx_ring[entry].status); - /* We own the next entry, it's a new packet. Send it up. */ - - #if (EPIC_DEBUG > 4) -@@ -383,8 +394,8 @@ - retcode = 0; - } else { - /* Omit the four octet CRC from the length. */ -- nic->packetlen = rx_ring[entry].rxlength - 4; -- memcpy(nic->packet, (char*)rx_ring[entry].bufaddr, nic->packetlen); -+ nic->packetlen = le32_to_cpu((rx_ring[entry].buflength))- 4; -+ memcpy(nic->packet, &rx_packet[entry * PKT_BUF_SZ], nic->packetlen); - retcode = 1; - } - -@@ -395,17 +406,30 @@ - rx_ring[entry].status = RRING_OWN; - - /* Restart Receiver */ -- outl(CR_START_RX | CR_QUEUE_RX, command); -+ outl(CR_START_RX | CR_QUEUE_RX, command); - - return retcode; - } - - - static void --epic100_disable(struct nic *nic) -+epic100_disable(struct dev *dev __unused) - { -+ /* Soft reset the chip. */ -+ outl(GC_SOFT_RESET, genctl); - } - -+static void epic100_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} - - #ifdef DEBUG_EEPROM - /* Serial EEPROM section. */ -@@ -479,3 +503,18 @@ - break; - return inw(mmdata); - } -+ -+ -+static struct pci_id epic100_nics[] = { -+PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII"), /* SMC 83c170 EPIC/100 */ -+PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175"), -+}; -+ -+struct pci_driver epic100_driver = { -+ .type = NIC_DRIVER, -+ .name = "EPIC100", -+ .probe = epic100_probe, -+ .ids = epic100_nics, -+ .id_count = sizeof(epic100_nics)/sizeof(epic100_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/etherboot.h -=================================================================== ---- a/netboot/etherboot.h -+++ b/netboot/etherboot.h -@@ -1,6 +1,6 @@ - /* - * GRUB -- GRand Unified Bootloader -- * Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. -+ * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -17,528 +17,40 @@ - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - --/* RULE: You must define the macro ``GRUB'' when including this header -- file in GRUB code. */ -+#ifndef ETHERBOOT_H -+#define ETHERBOOT_H - --/* Based on "src/etherboot.h" in etherboot-5.0.5. */ -- --/************************************************************************** --ETHERBOOT - BOOTP/TFTP Bootstrap Program -- --Author: Martin Renters -- Date: Dec/93 -- --**************************************************************************/ -- --/* Include GRUB-specific macros and prototypes here. */ --#include -- --/* FIXME: For now, enable the DHCP support. Perhaps I should segregate -- the DHCP support from the BOOTP support, and permit both to -- co-exist. */ --#undef NO_DHCP_SUPPORT -- --/* In GRUB, the relocated address in Etherboot doesn't have any sense. -- Just define it as a bogus value. */ --#define RELOC 0 -- --/* FIXME: Should be an option. */ --#define BACKOFF_LIMIT 7 -- --#include -- --#define CTRL_C 3 -- --#ifndef MAX_TFTP_RETRIES --# define MAX_TFTP_RETRIES 20 -+#include "shared.h" -+#include "osdep.h" -+#include "if_ether.h" -+#include "in.h" -+ -+/* Link configuration time in tenths of a second */ -+#ifndef VALID_LINK_TIMEOUT -+#define VALID_LINK_TIMEOUT 100 /* 10.0 seconds */ - #endif - --#ifndef MAX_BOOTP_RETRIES --# define MAX_BOOTP_RETRIES 20 --#endif -- --#define MAX_BOOTP_EXTLEN (ETH_FRAME_LEN - ETH_HLEN - \ -- sizeof (struct bootp_t)) -- --#ifndef MAX_ARP_RETRIES --# define MAX_ARP_RETRIES 20 --#endif -- --#ifndef MAX_RPC_RETRIES --# define MAX_RPC_RETRIES 20 --#endif -- --#define TICKS_PER_SEC 18 -- --/* Inter-packet retry in ticks */ --#define TIMEOUT (10 * TICKS_PER_SEC) -- --/* These settings have sense only if compiled with -DCONGESTED */ --/* total retransmission timeout in ticks */ --#define TFTP_TIMEOUT (30 * TICKS_PER_SEC) --/* packet retransmission timeout in ticks */ --#define TFTP_REXMT (3 * TICKS_PER_SEC) -- - #ifndef NULL - # define NULL ((void *) 0) - #endif - --/* -- I'm moving towards the defined names in linux/if_ether.h for clarity. -- The confusion between 60/64 and 1514/1518 arose because the NS8390 -- counts the 4 byte frame checksum in the incoming packet, but not -- in the outgoing packet. 60/1514 are the correct numbers for most -- if not all of the other NIC controllers. I will be retiring the -- 64/1518 defines in the lead-up to 5.0. --*/ -- --#define ETH_ALEN 6 /* Size of Ethernet address */ --#define ETH_HLEN 14 /* Size of ethernet header */ --#define ETH_ZLEN 60 /* Minimum packet */ --/*#define ETH_MIN_PACKET 64*/ --#define ETH_FRAME_LEN 1514 /* Maximum packet */ --/*#define ETH_MAX_PACKET 1518*/ --/* Because some DHCP/BOOTP servers don't treat the maximum length the same -- as Etherboot, subtract the size of an IP header and that of an UDP -- header. */ --#define ETH_MAX_MTU (ETH_FRAME_LEN - ETH_HLEN \ -- - sizeof (struct iphdr) \ -- - sizeof (struct udphdr)) -- --#define ARP_CLIENT 0 --#define ARP_SERVER 1 --#define ARP_GATEWAY 2 --#define ARP_ROOTSERVER 3 --#define ARP_SWAPSERVER 4 --#define MAX_ARP ARP_SWAPSERVER+1 -- --#define RARP_REQUEST 3 --#define RARP_REPLY 4 -- --#define IP 0x0800 --#define ARP 0x0806 --#define RARP 0x8035 -- --#define BOOTP_SERVER 67 --#define BOOTP_CLIENT 68 --#define TFTP_PORT 69 --#define SUNRPC_PORT 111 -- --#define IP_UDP 17 --/* Same after going through htonl */ --#define IP_BROADCAST 0xFFFFFFFF -- --#define ARP_REQUEST 1 --#define ARP_REPLY 2 -- --#define BOOTP_REQUEST 1 --#define BOOTP_REPLY 2 -- --#define TAG_LEN(p) (*((p) + 1)) --#define RFC1533_COOKIE 99, 130, 83, 99 --#define RFC1533_PAD 0 --#define RFC1533_NETMASK 1 --#define RFC1533_TIMEOFFSET 2 --#define RFC1533_GATEWAY 3 --#define RFC1533_TIMESERVER 4 --#define RFC1533_IEN116NS 5 --#define RFC1533_DNS 6 --#define RFC1533_LOGSERVER 7 --#define RFC1533_COOKIESERVER 8 --#define RFC1533_LPRSERVER 9 --#define RFC1533_IMPRESSSERVER 10 --#define RFC1533_RESOURCESERVER 11 --#define RFC1533_HOSTNAME 12 --#define RFC1533_BOOTFILESIZE 13 --#define RFC1533_MERITDUMPFILE 14 --#define RFC1533_DOMAINNAME 15 --#define RFC1533_SWAPSERVER 16 --#define RFC1533_ROOTPATH 17 --#define RFC1533_EXTENSIONPATH 18 --#define RFC1533_IPFORWARDING 19 --#define RFC1533_IPSOURCEROUTING 20 --#define RFC1533_IPPOLICYFILTER 21 --#define RFC1533_IPMAXREASSEMBLY 22 --#define RFC1533_IPTTL 23 --#define RFC1533_IPMTU 24 --#define RFC1533_IPMTUPLATEAU 25 --#define RFC1533_INTMTU 26 --#define RFC1533_INTLOCALSUBNETS 27 --#define RFC1533_INTBROADCAST 28 --#define RFC1533_INTICMPDISCOVER 29 --#define RFC1533_INTICMPRESPOND 30 --#define RFC1533_INTROUTEDISCOVER 31 --#define RFC1533_INTROUTESOLICIT 32 --#define RFC1533_INTSTATICROUTES 33 --#define RFC1533_LLTRAILERENCAP 34 --#define RFC1533_LLARPCACHETMO 35 --#define RFC1533_LLETHERNETENCAP 36 --#define RFC1533_TCPTTL 37 --#define RFC1533_TCPKEEPALIVETMO 38 --#define RFC1533_TCPKEEPALIVEGB 39 --#define RFC1533_NISDOMAIN 40 --#define RFC1533_NISSERVER 41 --#define RFC1533_NTPSERVER 42 --#define RFC1533_VENDOR 43 --#define RFC1533_NBNS 44 --#define RFC1533_NBDD 45 --#define RFC1533_NBNT 46 --#define RFC1533_NBSCOPE 47 --#define RFC1533_XFS 48 --#define RFC1533_XDM 49 --#ifndef NO_DHCP_SUPPORT --#define RFC2132_REQ_ADDR 50 --#define RFC2132_MSG_TYPE 53 --#define RFC2132_SRV_ID 54 --#define RFC2132_PARAM_LIST 55 --#define RFC2132_MAX_SIZE 57 --#define RFC2132_VENDOR_CLASS_ID 60 -- --#define DHCPDISCOVER 1 --#define DHCPOFFER 2 --#define DHCPREQUEST 3 --#define DHCPACK 5 --#endif /* NO_DHCP_SUPPORT */ -- --#define RFC1533_VENDOR_MAJOR 0 --#define RFC1533_VENDOR_MINOR 0 -- --#define RFC1533_VENDOR_MAGIC 128 --#define RFC1533_VENDOR_ADDPARM 129 --#define RFC1533_VENDOR_MNUOPTS 160 --#define RFC1533_VENDOR_SELECTION 176 --#define RFC1533_VENDOR_MOTD 184 --#define RFC1533_VENDOR_NUMOFMOTD 8 --#define RFC1533_VENDOR_IMG 192 --#define RFC1533_VENDOR_NUMOFIMG 16 -- --#define RFC1533_VENDOR_CONFIGFILE 150 -- --#define RFC1533_END 255 -- --#define BOOTP_VENDOR_LEN 64 --#ifndef NO_DHCP_SUPPORT --#define DHCP_OPT_LEN 312 --#endif /* NO_DHCP_SUPPORT */ -- --#define TFTP_DEFAULTSIZE_PACKET 512 --#define TFTP_MAX_PACKET 1432 /* 512 */ -- --#define TFTP_RRQ 1 --#define TFTP_WRQ 2 --#define TFTP_DATA 3 --#define TFTP_ACK 4 --#define TFTP_ERROR 5 --#define TFTP_OACK 6 -- --#define TFTP_CODE_EOF 1 --#define TFTP_CODE_MORE 2 --#define TFTP_CODE_ERROR 3 --#define TFTP_CODE_BOOT 4 --#define TFTP_CODE_CFG 5 -- --#define AWAIT_ARP 0 --#define AWAIT_BOOTP 1 --#define AWAIT_TFTP 2 --#define AWAIT_RARP 3 --#define AWAIT_RPC 4 --#define AWAIT_QDRAIN 5 /* drain queue, process ARP requests */ -- --typedef struct --{ -- unsigned long s_addr; --} --in_addr; -- --struct arptable_t --{ -- in_addr ipaddr; -- unsigned char node[6]; --}; -- --/* -- * A pity sipaddr and tipaddr are not longword aligned or we could use -- * in_addr. No, I don't want to use #pragma packed. -- */ --struct arprequest --{ -- unsigned short hwtype; -- unsigned short protocol; -- char hwlen; -- char protolen; -- unsigned short opcode; -- char shwaddr[6]; -- char sipaddr[4]; -- char thwaddr[6]; -- char tipaddr[4]; --}; -- --struct iphdr --{ -- char verhdrlen; -- char service; -- unsigned short len; -- unsigned short ident; -- unsigned short frags; -- char ttl; -- char protocol; -- unsigned short chksum; -- in_addr src; -- in_addr dest; --}; -- --struct udphdr --{ -- unsigned short src; -- unsigned short dest; -- unsigned short len; -- unsigned short chksum; --}; -- --/* Format of a bootp packet. */ --struct bootp_t --{ -- char bp_op; -- char bp_htype; -- char bp_hlen; -- char bp_hops; -- unsigned long bp_xid; -- unsigned short bp_secs; -- unsigned short unused; -- in_addr bp_ciaddr; -- in_addr bp_yiaddr; -- in_addr bp_siaddr; -- in_addr bp_giaddr; -- char bp_hwaddr[16]; -- char bp_sname[64]; -- char bp_file[128]; --#ifdef NO_DHCP_SUPPORT -- char bp_vend[BOOTP_VENDOR_LEN]; --#else -- char bp_vend[DHCP_OPT_LEN]; --#endif /* NO_DHCP_SUPPORT */ --}; -- --/* Format of a bootp IP packet. */ --struct bootpip_t --{ -- struct iphdr ip; -- struct udphdr udp; -- struct bootp_t bp; --}; -- --/* Format of bootp packet with extensions. */ --struct bootpd_t --{ -- struct bootp_t bootp_reply; -- unsigned char bootp_extension[MAX_BOOTP_EXTLEN]; --}; -- --struct tftp_t --{ -- struct iphdr ip; -- struct udphdr udp; -- unsigned short opcode; -- union -- { -- char rrq[TFTP_DEFAULTSIZE_PACKET]; -- -- struct -- { -- unsigned short block; -- char download[TFTP_MAX_PACKET]; -- } -- data; -- -- struct -- { -- unsigned short block; -- } -- ack; -- -- struct -- { -- unsigned short errcode; -- char errmsg[TFTP_DEFAULTSIZE_PACKET]; -- } -- err; -- -- struct -- { -- char data[TFTP_DEFAULTSIZE_PACKET+2]; -- } -- oack; -- } -- u; --}; -- --/* Define a smaller tftp packet solely for making requests to conserve stack -- 512 bytes should be enough. */ --struct tftpreq_t --{ -- struct iphdr ip; -- struct udphdr udp; -- unsigned short opcode; -- union -- { -- char rrq[512]; -- -- struct -- { -- unsigned short block; -- } -- ack; -- -- struct -- { -- unsigned short errcode; -- char errmsg[512-2]; -- } -- err; -- } -- u; --}; -- --#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) -- --struct rpc_t --{ -- struct iphdr ip; -- struct udphdr udp; -- union -- { -- char data[300]; /* longest RPC call must fit!!!! */ -- -- struct -- { -- long id; -- long type; -- long rpcvers; -- long prog; -- long vers; -- long proc; -- long data[1]; -- } -- call; -- -- struct -- { -- long id; -- long type; -- long rstatus; -- long verifier; -- long v2; -- long astatus; -- long data[1]; -- } -- reply; -- } -- u; --}; -- --#define PROG_PORTMAP 100000 --#define PROG_NFS 100003 --#define PROG_MOUNT 100005 -- --#define MSG_CALL 0 --#define MSG_REPLY 1 -- --#define PORTMAP_GETPORT 3 -- --#define MOUNT_ADDENTRY 1 --#define MOUNT_UMOUNTALL 4 -- --#define NFS_LOOKUP 4 --#define NFS_READ 6 -- --#define NFS_FHSIZE 32 -- --#define NFSERR_PERM 1 --#define NFSERR_NOENT 2 --#define NFSERR_ACCES 13 -- --/* Block size used for NFS read accesses. A RPC reply packet (including all -- * headers) must fit within a single Ethernet frame to avoid fragmentation. -- * Chosen to be a power of two, as most NFS servers are optimized for this. */ --#define NFS_READ_SIZE 1024 -- --#define FLOPPY_BOOT_LOCATION 0x7c00 --/* Must match offsets in loader.S */ --#define ROM_SEGMENT 0x1fa --#define ROM_LENGTH 0x1fc -- --#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION + ROM_SEGMENT) --/* at end of floppy boot block */ -- --struct rom_info --{ -- unsigned short rom_segment; -- unsigned short rom_length; --}; -- --static inline int --rom_address_ok (struct rom_info *rom, int assigned_rom_segment) --{ -- return (assigned_rom_segment < 0xC000 -- || assigned_rom_segment == rom->rom_segment); --} -- --/* Define a type for passing info to a loaded program. */ --struct ebinfo --{ -- unsigned char major, minor; /* Version */ -- unsigned short flags; /* Bit flags */ --}; -- --/*************************************************************************** --External prototypes --***************************************************************************/ --/* main.c */ --extern void print_network_configuration (void); --extern int ifconfig (char *ip, char *sm, char *gw, char *svr); --extern int udp_transmit (unsigned long destip, unsigned int srcsock, -- unsigned int destsock, int len, const void *buf); --extern int await_reply (int type, int ival, void *ptr, int timeout); --extern int decode_rfc1533 (unsigned char *, int, int, int); --extern long rfc2131_sleep_interval (int base, int exp); --extern void cleanup (void); --extern int rarp (void); --extern int bootp (void); --extern void cleanup_net (void); -- --/* config.c */ --extern void print_config (void); --extern void eth_reset (void); --extern int eth_probe (void); --extern int eth_poll (void); --extern void eth_transmit (const char *d, unsigned int t, -- unsigned int s, const void *p); --extern void eth_disable (void); -- --/* misc.c */ --extern void twiddle (void); --extern void sleep (int secs); --extern int getdec (char **s); --extern void etherboot_printf (const char *, ...); --extern int etherboot_sprintf (char *, const char *, ...); --extern int inet_aton (char *p, in_addr *i); -- --/*************************************************************************** --External variables --***************************************************************************/ --/* main.c */ --extern int ip_abort; --extern int network_ready; --extern struct rom_info rom; --extern struct arptable_t arptable[MAX_ARP]; -- --/* config.c */ --extern struct nic nic; -+#define gateA20_set() gateA20(1) -+#define gateA20_unset() gateA20(0) -+#define EBDEBUG 0 -+/* The 'rom_info' maybe arch depended. It must be moved to some other -+ * place */ -+struct rom_info { -+ unsigned short rom_segment; -+ unsigned short rom_length; -+}; -+ -+extern void poll_interruptions P((void)); -+ -+/* For UNDI drivers */ -+extern void fake_irq ( uint8_t irq ); -+extern void _trivial_irq_handler_start; -+extern uint32_t get_free_base_memory ( void ); -+extern void forget_base_memory ( void*, size_t ); -+extern void free_unused_base_memory ( void ); - --/* Local hack - define some macros to use etherboot source files "as is". */ --#ifndef GRUB --# undef printf --# define printf etherboot_printf --# undef sprintf --# define sprintf etherboot_sprintf --#endif /* GRUB */ -+#endif /* ETHERBOOT_H */ -Index: b/netboot/fa311.c -=================================================================== ---- a/netboot/fa311.c -+++ /dev/null -@@ -1,421 +0,0 @@ --/* -- Driver for the National Semiconductor DP83810 Ethernet controller. -- -- Portions Copyright (C) 2001 Inprimis Technologies, Inc. -- http://www.inprimis.com/ -- -- This driver is based (heavily) on the Linux driver for this chip -- which is copyright 1999-2001 by Donald Becker. -- -- This software has no warranties expressed or implied for any -- purpose. -- -- This software may be used and distributed according to the terms of -- the GNU General Public License (GPL), incorporated herein by reference. -- Drivers based on or derived from this code fall under the GPL and must -- retain the authorship, copyright and license notice. This file is not -- a complete program and may only be used when the entire operating -- system is licensed under the GPL. License for under other terms may be -- available. Contact the original author for details. -- -- The original author may be reached as becker@scyld.com, or at -- Scyld Computing Corporation -- 410 Severn Ave., Suite 210 -- Annapolis MD 21403 --*/ -- -- --typedef unsigned char u8; --typedef signed char s8; --typedef unsigned short u16; --typedef signed short s16; --typedef unsigned int u32; --typedef signed int s32; -- --#include "etherboot.h" --#include "nic.h" --#include "pci.h" -- --#undef virt_to_bus --#define virt_to_bus(x) ((unsigned long)x) --#define cpu_to_le32(val) (val) --#define le32_to_cpu(val) (val) --#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) --#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) -- --#define TX_RING_SIZE 1 --#define RX_RING_SIZE 4 --#define TIME_OUT 1000000 --#define PKT_BUF_SZ 1536 -- --/* Offsets to the device registers. */ --enum register_offsets { -- ChipCmd=0x00, ChipConfig=0x04, EECtrl=0x08, PCIBusCfg=0x0C, -- IntrStatus=0x10, IntrMask=0x14, IntrEnable=0x18, -- TxRingPtr=0x20, TxConfig=0x24, -- RxRingPtr=0x30, RxConfig=0x34, -- WOLCmd=0x40, PauseCmd=0x44, RxFilterAddr=0x48, RxFilterData=0x4C, -- BootRomAddr=0x50, BootRomData=0x54, StatsCtrl=0x5C, StatsData=0x60, -- RxPktErrs=0x60, RxMissed=0x68, RxCRCErrs=0x64, --}; -- --/* Bit in ChipCmd. */ --enum ChipCmdBits { -- ChipReset=0x100, RxReset=0x20, TxReset=0x10, RxOff=0x08, RxOn=0x04, -- TxOff=0x02, TxOn=0x01, --}; -- --/* Bits in the interrupt status/mask registers. */ --enum intr_status_bits { -- IntrRxDone=0x0001, IntrRxIntr=0x0002, IntrRxErr=0x0004, IntrRxEarly=0x0008, -- IntrRxIdle=0x0010, IntrRxOverrun=0x0020, -- IntrTxDone=0x0040, IntrTxIntr=0x0080, IntrTxErr=0x0100, -- IntrTxIdle=0x0200, IntrTxUnderrun=0x0400, -- StatsMax=0x0800, LinkChange=0x4000, WOLPkt=0x2000, -- RxResetDone=0x1000000, TxResetDone=0x2000000, -- IntrPCIErr=0x00f00000, IntrNormalSummary=0x0251, IntrAbnormalSummary=0xED20, --}; -- --/* Bits in the RxMode register. */ --enum rx_mode_bits { -- AcceptErr=0x20, AcceptRunt=0x10, AcceptBroadcast=0xC0000000, -- AcceptMulticast=0x00200000, AcceptAllMulticast=0x20000000, -- AcceptAllPhys=0x10000000, AcceptMyPhys=0x08000000, --}; -- --/* Bits in network_desc.status */ --enum desc_status_bits { -- DescOwn=0x80000000, DescMore=0x40000000, DescIntr=0x20000000, -- DescNoCRC=0x10000000, -- DescPktOK=0x08000000, RxTooLong=0x00400000, --}; -- --/* The Rx and Tx buffer descriptors. */ --struct netdev_desc { -- u32 next_desc; -- s32 cmd_status; -- u32 addr; --}; -- --static struct FA311_DEV { -- unsigned int ioaddr; -- unsigned short vendor; -- unsigned short device; -- unsigned int cur_rx; -- unsigned int cur_tx; -- unsigned int rx_buf_sz; -- volatile struct netdev_desc *rx_head_desc; -- volatile struct netdev_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned (4))); -- volatile struct netdev_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned (4))); --} fa311_dev; -- --static int eeprom_read(long ioaddr, int location); --static void init_ring(struct FA311_DEV *dev); --static void fa311_reset(struct nic *nic); --static int fa311_poll(struct nic *nic); --static void fa311_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); --static void fa311_disable(struct nic *nic); -- --static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE] __attribute__ ((aligned (4))); --static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE] __attribute__ ((aligned (4))); -- --struct nic * fa311_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) --{ --int prev_eedata; --int i; --int duplex; --int tx_config; --int rx_config; --unsigned char macaddr[6]; --unsigned char mactest; --unsigned char pci_bus = 0; --struct FA311_DEV* dev = &fa311_dev; -- -- if (io_addrs == 0 || *io_addrs == 0) -- return (0); -- memset(dev, 0, sizeof(*dev)); -- dev->vendor = pci->vendor; -- dev->device = pci->dev_id; -- dev->ioaddr = pci->membase; -- -- /* Work around the dropped serial bit. */ -- prev_eedata = eeprom_read(dev->ioaddr, 6); -- for (i = 0; i < 3; i++) { -- int eedata = eeprom_read(dev->ioaddr, i + 7); -- macaddr[i*2] = (eedata << 1) + (prev_eedata >> 15); -- macaddr[i*2+1] = eedata >> 7; -- prev_eedata = eedata; -- } -- mactest = 0; -- for (i = 0; i < 6; i++) -- mactest |= macaddr[i]; -- if (mactest == 0) -- return (0); -- for (i = 0; i < 6; i++) -- nic->node_addr[i] = macaddr[i]; -- printf("%! ", nic->node_addr); -- -- adjust_pci_device(pci); -- -- fa311_reset(nic); -- -- nic->reset = fa311_reset; -- nic->disable = fa311_disable; -- nic->poll = fa311_poll; -- nic->transmit = fa311_transmit; -- -- init_ring(dev); -- -- writel(virt_to_bus(dev->rx_ring), dev->ioaddr + RxRingPtr); -- writel(virt_to_bus(dev->tx_ring), dev->ioaddr + TxRingPtr); -- -- for (i = 0; i < 6; i += 2) -- { -- writel(i, dev->ioaddr + RxFilterAddr); -- writew(macaddr[i] + (macaddr[i+1] << 8), -- dev->ioaddr + RxFilterData); -- } -- -- /* Initialize other registers. */ -- /* Configure for standard, in-spec Ethernet. */ -- if (readl(dev->ioaddr + ChipConfig) & 0x20000000) -- { /* Full duplex */ -- tx_config = 0xD0801002; -- rx_config = 0x10000020; -- } -- else -- { -- tx_config = 0x10801002; -- rx_config = 0x0020; -- } -- writel(tx_config, dev->ioaddr + TxConfig); -- writel(rx_config, dev->ioaddr + RxConfig); -- -- duplex = readl(dev->ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; -- if (duplex) { -- rx_config |= 0x10000000; -- tx_config |= 0xC0000000; -- } else { -- rx_config &= ~0x10000000; -- tx_config &= ~0xC0000000; -- } -- writew(tx_config, dev->ioaddr + TxConfig); -- writew(rx_config, dev->ioaddr + RxConfig); -- -- writel(AcceptBroadcast | AcceptAllMulticast | AcceptMyPhys, -- dev->ioaddr + RxFilterAddr); -- -- writel(RxOn | TxOn, dev->ioaddr + ChipCmd); -- writel(4, dev->ioaddr + StatsCtrl); /* Clear Stats */ -- return nic; -- --} -- --static void fa311_reset(struct nic *nic) --{ --u32 chip_config; --struct FA311_DEV* dev = &fa311_dev; -- -- /* Reset the chip to erase previous misconfiguration. */ -- outl(ChipReset, dev->ioaddr + ChipCmd); -- -- if ((readl(dev->ioaddr + ChipConfig) & 0xe000) != 0xe000) -- { -- chip_config = readl(dev->ioaddr + ChipConfig); -- } --} -- --static int fa311_poll(struct nic *nic) --{ --s32 desc_status; --int to; --int entry; --int retcode; --struct FA311_DEV* dev = &fa311_dev; -- -- retcode = 0; -- entry = dev->cur_rx; -- to = TIME_OUT; -- while (to != 0) -- { -- desc_status = dev->rx_ring[entry].cmd_status; -- if ((desc_status & DescOwn) != 0) -- break; -- else -- --to; -- } -- if (to != 0) -- { -- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ -- /* driver owns the next entry it's a new packet. Send it up. */ -- if ((desc_status & (DescMore|DescPktOK|RxTooLong)) == DescPktOK) -- { -- nic->packetlen = (desc_status & 0x0fff) - 4; /* Omit CRC size. */ -- memcpy(nic->packet, (char*)(dev->rx_ring[entry].addr), nic->packetlen); -- retcode = 1; -- } -- /* Give the descriptor back to the chip */ -- dev->rx_ring[entry].cmd_status = cpu_to_le32(dev->rx_buf_sz); -- dev->cur_rx++; -- if (dev->cur_rx >= RX_RING_SIZE) -- dev->cur_rx = 0; -- dev->rx_head_desc = &dev->rx_ring[dev->cur_rx]; -- } -- /* Restart Rx engine if stopped. */ -- writel(RxOn, dev->ioaddr + ChipCmd); -- return retcode; --} -- --static void fa311_transmit(struct nic *nic, const char *destaddr, unsigned int type, unsigned int len, const char *data) --{ --unsigned short nstype; --s32 desc_status; --int to; --int entry; --char* txp; --unsigned char* s; --struct FA311_DEV* dev = &fa311_dev; -- -- /* Calculate the next Tx descriptor entry. */ -- entry = dev->cur_tx; -- txp = (char*)(dev->tx_ring[entry].addr); -- -- memcpy(txp, destaddr, ETH_ALEN); -- memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); -- nstype = htons(type); -- memcpy(txp + 12, (char*)&nstype, 2); -- memcpy(txp + ETH_HLEN, data, len); -- len += ETH_HLEN; -- /* pad frame */ -- if (len < ETH_ZLEN) -- { -- s = (unsigned char*)(txp+len); -- while (s < (unsigned char*)(txp+ETH_ZLEN)) -- *s++ = 0; -- len = ETH_ZLEN; -- } -- dev->tx_ring[entry].cmd_status = cpu_to_le32(DescOwn | len); -- dev->cur_tx++; -- if (dev->cur_tx >= TX_RING_SIZE) -- dev->cur_tx = 0; -- -- /* Wake the potentially-idle transmit channel. */ -- writel(TxOn, dev->ioaddr + ChipCmd); -- -- /* wait for tranmission to complete */ -- to = TIME_OUT; -- while (to != 0) -- { -- desc_status = dev->tx_ring[entry].cmd_status; -- if ((desc_status & DescOwn) == 0) -- break; -- else -- --to; -- } -- -- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ -- return; --} -- --static void fa311_disable(struct nic *nic) --{ --struct FA311_DEV* dev = &fa311_dev; -- -- /* Stop the chip's Tx and Rx processes. */ -- writel(RxOff | TxOff, dev->ioaddr + ChipCmd); --} -- -- --/* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. -- The EEPROM code is for the common 93c06/46 EEPROMs with 6 bit addresses. */ -- --/* Delay between EEPROM clock transitions. -- No extra delay is needed with 33Mhz PCI, but future 66Mhz access may need -- a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that -- made udelay() unreliable. -- The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is -- depricated. --*/ --#define eeprom_delay(ee_addr) inl(ee_addr) -- --enum EEPROM_Ctrl_Bits { -- EE_ShiftClk=0x04, EE_DataIn=0x01, EE_ChipSelect=0x08, EE_DataOut=0x02, --}; --#define EE_Write0 (EE_ChipSelect) --#define EE_Write1 (EE_ChipSelect | EE_DataIn) -- --/* The EEPROM commands include the alway-set leading bit. */ --enum EEPROM_Cmds { -- EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), --}; -- -- --static int eeprom_read(long addr, int location) --{ -- int i; -- int retval = 0; -- int ee_addr = addr + EECtrl; -- int read_cmd = location | EE_ReadCmd; -- writel(EE_Write0, ee_addr); -- -- /* Shift the read command bits out. */ -- for (i = 10; i >= 0; i--) { -- short dataval = (read_cmd & (1 << i)) ? EE_Write1 : EE_Write0; -- writel(dataval, ee_addr); -- eeprom_delay(ee_addr); -- writel(dataval | EE_ShiftClk, ee_addr); -- eeprom_delay(ee_addr); -- } -- writel(EE_ChipSelect, ee_addr); -- eeprom_delay(ee_addr); -- -- for (i = 0; i < 16; i++) { -- writel(EE_ChipSelect | EE_ShiftClk, ee_addr); -- eeprom_delay(ee_addr); -- retval |= (readl(ee_addr) & EE_DataOut) ? 1 << i : 0; -- writel(EE_ChipSelect, ee_addr); -- eeprom_delay(ee_addr); -- } -- -- /* Terminate the EEPROM access. */ -- writel(EE_Write0, ee_addr); -- writel(0, ee_addr); -- return retval; --} -- --/* Initialize the Rx and Tx rings, along with various 'dev' bits. */ --static void init_ring(struct FA311_DEV *dev) --{ -- int i; -- -- dev->cur_rx = 0; -- dev->cur_tx = 0; -- -- dev->rx_buf_sz = PKT_BUF_SZ; -- dev->rx_head_desc = &dev->rx_ring[0]; -- -- /* Initialize all Rx descriptors. */ -- for (i = 0; i < RX_RING_SIZE; i++) { -- dev->rx_ring[i].next_desc = virt_to_le32desc(&dev->rx_ring[i+1]); -- dev->rx_ring[i].cmd_status = DescOwn; -- } -- /* Mark the last entry as wrapping the ring. */ -- dev->rx_ring[i-1].next_desc = virt_to_le32desc(&dev->rx_ring[0]); -- -- /* Fill in the Rx buffers. Handle allocation failure gracefully. */ -- for (i = 0; i < RX_RING_SIZE; i++) { -- dev->rx_ring[i].addr = (u32)(&rx_packet[PKT_BUF_SZ * i]); -- dev->rx_ring[i].cmd_status = cpu_to_le32(dev->rx_buf_sz); -- } -- -- for (i = 0; i < TX_RING_SIZE; i++) { -- dev->tx_ring[i].next_desc = virt_to_le32desc(&dev->tx_ring[i+1]); -- dev->tx_ring[i].cmd_status = 0; -- } -- dev->tx_ring[i-1].next_desc = virt_to_le32desc(&dev->tx_ring[0]); -- -- for (i = 0; i < TX_RING_SIZE; i++) -- dev->tx_ring[i].addr = (u32)(&tx_packet[PKT_BUF_SZ * i]); -- return; --} -- -Index: b/netboot/forcedeth.c -=================================================================== ---- /dev/null -+++ b/netboot/forcedeth.c -@@ -0,0 +1,1039 @@ -+/************************************************************************** -+* forcedeth.c -- Etherboot device driver for the NVIDIA nForce -+* media access controllers. -+* -+* Note: This driver is based on the Linux driver that was based on -+* a cleanroom reimplementation which was based on reverse -+* engineered documentation written by Carl-Daniel Hailfinger -+* and Andrew de Quincey. It's neither supported nor endorsed -+* by NVIDIA Corp. Use at your own risk. -+* -+* Written 2004 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code based on: -+* forcedeth: Ethernet driver for NVIDIA nForce media access controllers: -+* -+* (C) 2003 Manfred Spraul -+* See Linux Driver for full information -+* -+* Linux Driver Version 0.22, 19 Jan 2004 -+* -+* -+* REVISION HISTORY: -+* ================ -+* v1.0 01-31-2004 timlegge Initial port of Linux driver -+* v1.1 02-03-2004 timlegge Large Clean up, first release -+* -+* Indent Options: indent -kr -i8 -+***************************************************************************/ -+ -+/* to get some global routines like printf */ -+#include "etherboot.h" -+/* to get the interface to the body of the program */ -+#include "nic.h" -+/* to get the PCI support functions, if this is a PCI NIC */ -+#include "pci.h" -+/* Include timer support functions */ -+#include "timer.h" -+ -+#define drv_version "v1.1" -+#define drv_date "02-03-2004" -+ -+//#define TFTM_DEBUG -+#ifdef TFTM_DEBUG -+#define dprintf(x) printf x -+#else -+#define dprintf(x) -+#endif -+ -+typedef unsigned char u8; -+typedef signed char s8; -+typedef unsigned short u16; -+typedef signed short s16; -+typedef unsigned int u32; -+typedef signed int s32; -+ -+/* Condensed operations for readability. */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) -+ -+unsigned long BASE; -+/* NIC specific static variables go here */ -+ -+ -+/* -+ * Hardware access: -+ */ -+ -+#define DEV_NEED_LASTPACKET1 0x0001 -+#define DEV_IRQMASK_1 0x0002 -+#define DEV_IRQMASK_2 0x0004 -+#define DEV_NEED_TIMERIRQ 0x0008 -+ -+enum { -+ NvRegIrqStatus = 0x000, -+#define NVREG_IRQSTAT_MIIEVENT 0040 -+#define NVREG_IRQSTAT_MASK 0x1ff -+ NvRegIrqMask = 0x004, -+#define NVREG_IRQ_RX 0x0002 -+#define NVREG_IRQ_RX_NOBUF 0x0004 -+#define NVREG_IRQ_TX_ERR 0x0008 -+#define NVREG_IRQ_TX2 0x0010 -+#define NVREG_IRQ_TIMER 0x0020 -+#define NVREG_IRQ_LINK 0x0040 -+#define NVREG_IRQ_TX1 0x0100 -+#define NVREG_IRQMASK_WANTED_1 0x005f -+#define NVREG_IRQMASK_WANTED_2 0x0147 -+#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) -+ -+ NvRegUnknownSetupReg6 = 0x008, -+#define NVREG_UNKSETUP6_VAL 3 -+ -+/* -+ * NVREG_POLL_DEFAULT is the interval length of the timer source on the nic -+ * NVREG_POLL_DEFAULT=97 would result in an interval length of 1 ms -+ */ -+ NvRegPollingInterval = 0x00c, -+#define NVREG_POLL_DEFAULT 970 -+ NvRegMisc1 = 0x080, -+#define NVREG_MISC1_HD 0x02 -+#define NVREG_MISC1_FORCE 0x3b0f3c -+ -+ NvRegTransmitterControl = 0x084, -+#define NVREG_XMITCTL_START 0x01 -+ NvRegTransmitterStatus = 0x088, -+#define NVREG_XMITSTAT_BUSY 0x01 -+ -+ NvRegPacketFilterFlags = 0x8c, -+#define NVREG_PFF_ALWAYS 0x7F0008 -+#define NVREG_PFF_PROMISC 0x80 -+#define NVREG_PFF_MYADDR 0x20 -+ -+ NvRegOffloadConfig = 0x90, -+#define NVREG_OFFLOAD_HOMEPHY 0x601 -+#define NVREG_OFFLOAD_NORMAL 0x5ee -+ NvRegReceiverControl = 0x094, -+#define NVREG_RCVCTL_START 0x01 -+ NvRegReceiverStatus = 0x98, -+#define NVREG_RCVSTAT_BUSY 0x01 -+ -+ NvRegRandomSeed = 0x9c, -+#define NVREG_RNDSEED_MASK 0x00ff -+#define NVREG_RNDSEED_FORCE 0x7f00 -+ -+ NvRegUnknownSetupReg1 = 0xA0, -+#define NVREG_UNKSETUP1_VAL 0x16070f -+ NvRegUnknownSetupReg2 = 0xA4, -+#define NVREG_UNKSETUP2_VAL 0x16 -+ NvRegMacAddrA = 0xA8, -+ NvRegMacAddrB = 0xAC, -+ NvRegMulticastAddrA = 0xB0, -+#define NVREG_MCASTADDRA_FORCE 0x01 -+ NvRegMulticastAddrB = 0xB4, -+ NvRegMulticastMaskA = 0xB8, -+ NvRegMulticastMaskB = 0xBC, -+ -+ NvRegTxRingPhysAddr = 0x100, -+ NvRegRxRingPhysAddr = 0x104, -+ NvRegRingSizes = 0x108, -+#define NVREG_RINGSZ_TXSHIFT 0 -+#define NVREG_RINGSZ_RXSHIFT 16 -+ NvRegUnknownTransmitterReg = 0x10c, -+ NvRegLinkSpeed = 0x110, -+#define NVREG_LINKSPEED_FORCE 0x10000 -+#define NVREG_LINKSPEED_10 10 -+#define NVREG_LINKSPEED_100 100 -+#define NVREG_LINKSPEED_1000 1000 -+ NvRegUnknownSetupReg5 = 0x130, -+#define NVREG_UNKSETUP5_BIT31 (1<<31) -+ NvRegUnknownSetupReg3 = 0x134, -+#define NVREG_UNKSETUP3_VAL1 0x200010 -+ NvRegTxRxControl = 0x144, -+#define NVREG_TXRXCTL_KICK 0x0001 -+#define NVREG_TXRXCTL_BIT1 0x0002 -+#define NVREG_TXRXCTL_BIT2 0x0004 -+#define NVREG_TXRXCTL_IDLE 0x0008 -+#define NVREG_TXRXCTL_RESET 0x0010 -+ NvRegMIIStatus = 0x180, -+#define NVREG_MIISTAT_ERROR 0x0001 -+#define NVREG_MIISTAT_LINKCHANGE 0x0008 -+#define NVREG_MIISTAT_MASK 0x000f -+#define NVREG_MIISTAT_MASK2 0x000f -+ NvRegUnknownSetupReg4 = 0x184, -+#define NVREG_UNKSETUP4_VAL 8 -+ -+ NvRegAdapterControl = 0x188, -+#define NVREG_ADAPTCTL_START 0x02 -+#define NVREG_ADAPTCTL_LINKUP 0x04 -+#define NVREG_ADAPTCTL_PHYVALID 0x4000 -+#define NVREG_ADAPTCTL_RUNNING 0x100000 -+#define NVREG_ADAPTCTL_PHYSHIFT 24 -+ NvRegMIISpeed = 0x18c, -+#define NVREG_MIISPEED_BIT8 (1<<8) -+#define NVREG_MIIDELAY 5 -+ NvRegMIIControl = 0x190, -+#define NVREG_MIICTL_INUSE 0x10000 -+#define NVREG_MIICTL_WRITE 0x08000 -+#define NVREG_MIICTL_ADDRSHIFT 5 -+ NvRegMIIData = 0x194, -+ NvRegWakeUpFlags = 0x200, -+#define NVREG_WAKEUPFLAGS_VAL 0x7770 -+#define NVREG_WAKEUPFLAGS_BUSYSHIFT 24 -+#define NVREG_WAKEUPFLAGS_ENABLESHIFT 16 -+#define NVREG_WAKEUPFLAGS_D3SHIFT 12 -+#define NVREG_WAKEUPFLAGS_D2SHIFT 8 -+#define NVREG_WAKEUPFLAGS_D1SHIFT 4 -+#define NVREG_WAKEUPFLAGS_D0SHIFT 0 -+#define NVREG_WAKEUPFLAGS_ACCEPT_MAGPAT 0x01 -+#define NVREG_WAKEUPFLAGS_ACCEPT_WAKEUPPAT 0x02 -+#define NVREG_WAKEUPFLAGS_ACCEPT_LINKCHANGE 0x04 -+ -+ NvRegPatternCRC = 0x204, -+ NvRegPatternMask = 0x208, -+ NvRegPowerCap = 0x268, -+#define NVREG_POWERCAP_D3SUPP (1<<30) -+#define NVREG_POWERCAP_D2SUPP (1<<26) -+#define NVREG_POWERCAP_D1SUPP (1<<25) -+ NvRegPowerState = 0x26c, -+#define NVREG_POWERSTATE_POWEREDUP 0x8000 -+#define NVREG_POWERSTATE_VALID 0x0100 -+#define NVREG_POWERSTATE_MASK 0x0003 -+#define NVREG_POWERSTATE_D0 0x0000 -+#define NVREG_POWERSTATE_D1 0x0001 -+#define NVREG_POWERSTATE_D2 0x0002 -+#define NVREG_POWERSTATE_D3 0x0003 -+}; -+ -+ -+ -+#define NV_TX_LASTPACKET (1<<0) -+#define NV_TX_RETRYERROR (1<<3) -+#define NV_TX_LASTPACKET1 (1<<8) -+#define NV_TX_DEFERRED (1<<10) -+#define NV_TX_CARRIERLOST (1<<11) -+#define NV_TX_LATECOLLISION (1<<12) -+#define NV_TX_UNDERFLOW (1<<13) -+#define NV_TX_ERROR (1<<14) -+#define NV_TX_VALID (1<<15) -+ -+#define NV_RX_DESCRIPTORVALID (1<<0) -+#define NV_RX_MISSEDFRAME (1<<1) -+#define NV_RX_SUBSTRACT1 (1<<3) -+#define NV_RX_ERROR1 (1<<7) -+#define NV_RX_ERROR2 (1<<8) -+#define NV_RX_ERROR3 (1<<9) -+#define NV_RX_ERROR4 (1<<10) -+#define NV_RX_CRCERR (1<<11) -+#define NV_RX_OVERFLOW (1<<12) -+#define NV_RX_FRAMINGERR (1<<13) -+#define NV_RX_ERROR (1<<14) -+#define NV_RX_AVAIL (1<<15) -+ -+/* Miscelaneous hardware related defines: */ -+#define NV_PCI_REGSZ 0x270 -+ -+/* various timeout delays: all in usec */ -+#define NV_TXRX_RESET_DELAY 4 -+#define NV_TXSTOP_DELAY1 10 -+#define NV_TXSTOP_DELAY1MAX 500000 -+#define NV_TXSTOP_DELAY2 100 -+#define NV_RXSTOP_DELAY1 10 -+#define NV_RXSTOP_DELAY1MAX 500000 -+#define NV_RXSTOP_DELAY2 100 -+#define NV_SETUP5_DELAY 5 -+#define NV_SETUP5_DELAYMAX 50000 -+#define NV_POWERUP_DELAY 5 -+#define NV_POWERUP_DELAYMAX 5000 -+#define NV_MIIBUSY_DELAY 50 -+#define NV_MIIPHY_DELAY 10 -+#define NV_MIIPHY_DELAYMAX 10000 -+ -+#define NV_WAKEUPPATTERNS 5 -+#define NV_WAKEUPMASKENTRIES 4 -+ -+/* General driver defaults */ -+#define NV_WATCHDOG_TIMEO (2*HZ) -+#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ -+ -+#define RX_RING 4 -+#define TX_RING 2 -+/* limited to 1 packet until we understand NV_TX_LASTPACKET */ -+#define TX_LIMIT_STOP 10 -+#define TX_LIMIT_START 5 -+ -+/* rx/tx mac addr + type + vlan + align + slack*/ -+#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) -+/* even more slack */ -+#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) -+ -+#define OOM_REFILL (1+HZ/20) -+#define POLL_WAIT (1+HZ/100) -+ -+struct ring_desc { -+ u32 PacketBuffer; -+ u16 Length; -+ u16 Flags; -+}; -+ -+ -+/* Define the TX Descriptor */ -+static struct ring_desc tx_ring[TX_RING]; -+ -+/* Create a static buffer of size RX_BUF_SZ for each -+TX Descriptor. All descriptors point to a -+part of this buffer */ -+static unsigned char txb[TX_RING * RX_NIC_BUFSIZE]; -+ -+/* Define the TX Descriptor */ -+static struct ring_desc rx_ring[RX_RING]; -+ -+/* Create a static buffer of size RX_BUF_SZ for each -+RX Descriptor All descriptors point to a -+part of this buffer */ -+static unsigned char rxb[RX_RING * RX_NIC_BUFSIZE]; -+ -+/* Private Storage for the NIC */ -+struct forcedeth_private { -+ /* General data: -+ * Locking: spin_lock(&np->lock); */ -+ int in_shutdown; -+ u32 linkspeed; -+ int duplex; -+ int phyaddr; -+ -+ /* General data: RO fields */ -+ u8 *ring_addr; -+ u32 orig_mac[2]; -+ u32 irqmask; -+ /* rx specific fields. -+ * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); -+ */ -+ struct ring_desc *rx_ring; -+ unsigned int cur_rx, refill_rx; -+ struct sk_buff *rx_skbuff[RX_RING]; -+ u32 rx_dma[RX_RING]; -+ unsigned int rx_buf_sz; -+ -+ /* -+ * tx specific fields. -+ */ -+ struct ring_desc *tx_ring; -+ unsigned int next_tx, nic_tx; -+ struct sk_buff *tx_skbuff[TX_RING]; -+ u32 tx_dma[TX_RING]; -+ u16 tx_flags; -+} npx; -+ -+static struct forcedeth_private *np; -+ -+static inline void pci_push(u8 * base) -+{ -+ /* force out pending posted writes */ -+ readl(base); -+} -+static int reg_delay(int offset, u32 mask, -+ u32 target, int delay, int delaymax, const char *msg) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ pci_push(base); -+ do { -+ udelay(delay); -+ delaymax -= delay; -+ if (delaymax < 0) { -+ if (msg) -+ printf(msg); -+ return 1; -+ } -+ } while ((readl(base + offset) & mask) != target); -+ return 0; -+} -+ -+#define MII_READ (-1) -+#define MII_PHYSID1 0x02 /* PHYS ID 1 */ -+#define MII_PHYSID2 0x03 /* PHYS ID 2 */ -+#define MII_BMCR 0x00 /* Basic mode control register */ -+#define MII_BMSR 0x01 /* Basic mode status register */ -+#define MII_ADVERTISE 0x04 /* Advertisement control reg */ -+#define MII_LPA 0x05 /* Link partner ability reg */ -+ -+#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ -+ -+/* Link partner ability register. */ -+#define LPA_SLCT 0x001f /* Same as advertise selector */ -+#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ -+#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ -+#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ -+#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ -+#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ -+#define LPA_RESV 0x1c00 /* Unused... */ -+#define LPA_RFAULT 0x2000 /* Link partner faulted */ -+#define LPA_LPACK 0x4000 /* Link partner acked us */ -+#define LPA_NPAGE 0x8000 /* Next page bit */ -+ -+/* mii_rw: read/write a register on the PHY. -+ * -+ * Caller must guarantee serialization -+ */ -+static int mii_rw(struct nic *nic __unused, int addr, int miireg, -+ int value) -+{ -+ u8 *base = (u8 *) BASE; -+ int was_running; -+ u32 reg; -+ int retval; -+ -+ writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); -+ was_running = 0; -+ reg = readl(base + NvRegAdapterControl); -+ if (reg & NVREG_ADAPTCTL_RUNNING) { -+ was_running = 1; -+ writel(reg & ~NVREG_ADAPTCTL_RUNNING, -+ base + NvRegAdapterControl); -+ } -+ reg = readl(base + NvRegMIIControl); -+ if (reg & NVREG_MIICTL_INUSE) { -+ writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); -+ udelay(NV_MIIBUSY_DELAY); -+ } -+ -+ reg = -+ NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; -+ if (value != MII_READ) { -+ writel(value, base + NvRegMIIData); -+ reg |= NVREG_MIICTL_WRITE; -+ } -+ writel(reg, base + NvRegMIIControl); -+ -+ if (reg_delay(NvRegMIIControl, NVREG_MIICTL_INUSE, 0, -+ NV_MIIPHY_DELAY, NV_MIIPHY_DELAYMAX, NULL)) { -+ dprintf(("mii_rw of reg %d at PHY %d timed out.\n", -+ miireg, addr)); -+ retval = -1; -+ } else if (value != MII_READ) { -+ /* it was a write operation - fewer failures are detectable */ -+ dprintf(("mii_rw wrote 0x%x to reg %d at PHY %d\n", -+ value, miireg, addr)); -+ retval = 0; -+ } else if (readl(base + NvRegMIIStatus) & NVREG_MIISTAT_ERROR) { -+ dprintf(("mii_rw of reg %d at PHY %d failed.\n", -+ miireg, addr)); -+ retval = -1; -+ } else { -+ /* FIXME: why is that required? */ -+ udelay(50); -+ retval = readl(base + NvRegMIIData); -+ dprintf(("mii_rw read from reg %d at PHY %d: 0x%x.\n", -+ miireg, addr, retval)); -+ } -+ if (was_running) { -+ reg = readl(base + NvRegAdapterControl); -+ writel(reg | NVREG_ADAPTCTL_RUNNING, -+ base + NvRegAdapterControl); -+ } -+ return retval; -+} -+ -+static void start_rx(struct nic *nic __unused) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ dprintf(("start_rx\n")); -+ /* Already running? Stop it. */ -+ if (readl(base + NvRegReceiverControl) & NVREG_RCVCTL_START) { -+ writel(0, base + NvRegReceiverControl); -+ pci_push(base); -+ } -+ writel(np->linkspeed, base + NvRegLinkSpeed); -+ pci_push(base); -+ writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); -+ pci_push(base); -+} -+ -+static void stop_rx(void) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ dprintf(("stop_rx\n")); -+ writel(0, base + NvRegReceiverControl); -+ reg_delay(NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, -+ NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, -+ "stop_rx: ReceiverStatus remained busy"); -+ -+ udelay(NV_RXSTOP_DELAY2); -+ writel(0, base + NvRegLinkSpeed); -+} -+ -+static void start_tx(struct nic *nic __unused) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ dprintf(("start_tx\n")); -+ writel(NVREG_XMITCTL_START, base + NvRegTransmitterControl); -+ pci_push(base); -+} -+ -+static void stop_tx(void) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ dprintf(("stop_tx\n")); -+ writel(0, base + NvRegTransmitterControl); -+ reg_delay(NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, -+ NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, -+ "stop_tx: TransmitterStatus remained busy"); -+ -+ udelay(NV_TXSTOP_DELAY2); -+ writel(0, base + NvRegUnknownTransmitterReg); -+} -+ -+ -+static void txrx_reset(struct nic *nic __unused) -+{ -+ u8 *base = (u8 *) BASE; -+ -+ dprintf(("txrx_reset\n")); -+ writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, -+ base + NvRegTxRxControl); -+ pci_push(base); -+ udelay(NV_TXRX_RESET_DELAY); -+ writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); -+ pci_push(base); -+} -+ -+/* -+ * alloc_rx: fill rx ring entries. -+ * Return 1 if the allocations for the skbs failed and the -+ * rx engine is without Available descriptors -+ */ -+static int alloc_rx(struct nic *nic __unused) -+{ -+ unsigned int refill_rx = np->refill_rx; -+ int i; -+ //while (np->cur_rx != refill_rx) { -+ for (i = 0; i < RX_RING; i++) { -+ //int nr = refill_rx % RX_RING; -+ rx_ring[i].PacketBuffer = -+ virt_to_le32desc(&rxb[i * RX_NIC_BUFSIZE]); -+ rx_ring[i].Length = cpu_to_le16(RX_NIC_BUFSIZE); -+ wmb(); -+ rx_ring[i].Flags = cpu_to_le16(NV_RX_AVAIL); -+ /* printf("alloc_rx: Packet %d marked as Available\n", -+ refill_rx); */ -+ refill_rx++; -+ } -+ np->refill_rx = refill_rx; -+ if (np->cur_rx - refill_rx == RX_RING) -+ return 1; -+ return 0; -+} -+ -+static int update_linkspeed(struct nic *nic) -+{ -+ int adv, lpa, newdup; -+ u32 newls; -+ adv = mii_rw(nic, np->phyaddr, MII_ADVERTISE, MII_READ); -+ lpa = mii_rw(nic, np->phyaddr, MII_LPA, MII_READ); -+ dprintf(("update_linkspeed: PHY advertises 0x%hX, lpa 0x%hX.\n", -+ adv, lpa)); -+ -+ /* FIXME: handle parallel detection properly, handle gigabit ethernet */ -+ lpa = lpa & adv; -+ if (lpa & LPA_100FULL) { -+ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; -+ newdup = 1; -+ } else if (lpa & LPA_100HALF) { -+ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; -+ newdup = 0; -+ } else if (lpa & LPA_10FULL) { -+ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; -+ newdup = 1; -+ } else if (lpa & LPA_10HALF) { -+ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; -+ newdup = 0; -+ } else { -+ printf("bad ability %hX - falling back to 10HD.\n", lpa); -+ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; -+ newdup = 0; -+ } -+ if (np->duplex != newdup || np->linkspeed != newls) { -+ np->duplex = newdup; -+ np->linkspeed = newls; -+ return 1; -+ } -+ return 0; -+} -+ -+ -+ -+static int init_ring(struct nic *nic) -+{ -+ int i; -+ -+ np->next_tx = np->nic_tx = 0; -+ for (i = 0; i < TX_RING; i++) { -+ tx_ring[i].Flags = 0; -+ } -+ -+ np->cur_rx = 0; -+ np->refill_rx = 0; -+ for (i = 0; i < RX_RING; i++) { -+ rx_ring[i].Flags = 0; -+ } -+ return alloc_rx(nic); -+} -+ -+static void set_multicast(struct nic *nic) -+{ -+ -+ u8 *base = (u8 *) BASE; -+ u32 addr[2]; -+ u32 mask[2]; -+ u32 pff; -+ u32 alwaysOff[2]; -+ u32 alwaysOn[2]; -+ -+ memset(addr, 0, sizeof(addr)); -+ memset(mask, 0, sizeof(mask)); -+ -+ pff = NVREG_PFF_MYADDR; -+ -+ alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; -+ -+ addr[0] = alwaysOn[0]; -+ addr[1] = alwaysOn[1]; -+ mask[0] = alwaysOn[0] | alwaysOff[0]; -+ mask[1] = alwaysOn[1] | alwaysOff[1]; -+ -+ addr[0] |= NVREG_MCASTADDRA_FORCE; -+ pff |= NVREG_PFF_ALWAYS; -+ stop_rx(); -+ writel(addr[0], base + NvRegMulticastAddrA); -+ writel(addr[1], base + NvRegMulticastAddrB); -+ writel(mask[0], base + NvRegMulticastMaskA); -+ writel(mask[1], base + NvRegMulticastMaskB); -+ writel(pff, base + NvRegPacketFilterFlags); -+ start_rx(nic); -+} -+ -+/************************************************************************** -+RESET - Reset the NIC to prepare for use -+***************************************************************************/ -+static int forcedeth_reset(struct nic *nic) -+{ -+ u8 *base = (u8 *) BASE; -+ int ret, oom, i; -+ ret = 0; -+ dprintf(("forcedeth: open\n")); -+ -+ /* 1) erase previous misconfiguration */ -+ /* 4.1-1: stop adapter: ignored, 4.3 seems to be overkill */ -+ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); -+ writel(0, base + NvRegMulticastAddrB); -+ writel(0, base + NvRegMulticastMaskA); -+ writel(0, base + NvRegMulticastMaskB); -+ writel(0, base + NvRegPacketFilterFlags); -+ writel(0, base + NvRegAdapterControl); -+ writel(0, base + NvRegLinkSpeed); -+ writel(0, base + NvRegUnknownTransmitterReg); -+ txrx_reset(nic); -+ writel(0, base + NvRegUnknownSetupReg6); -+ -+ /* 2) initialize descriptor rings */ -+ np->in_shutdown = 0; -+ oom = init_ring(nic); -+ -+ /* 3) set mac address */ -+ { -+ u32 mac[2]; -+ -+ mac[0] = -+ (nic->node_addr[0] << 0) + (nic->node_addr[1] << 8) + -+ (nic->node_addr[2] << 16) + (nic->node_addr[3] << 24); -+ mac[1] = -+ (nic->node_addr[4] << 0) + (nic->node_addr[5] << 8); -+ -+ writel(mac[0], base + NvRegMacAddrA); -+ writel(mac[1], base + NvRegMacAddrB); -+ } -+ -+ /* 4) continue setup */ -+ np->linkspeed = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; -+ np->duplex = 0; -+ writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); -+ writel(0, base + NvRegTxRxControl); -+ pci_push(base); -+ writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); -+ -+ reg_delay(NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, -+ NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, -+ NV_SETUP5_DELAYMAX, -+ "open: SetupReg5, Bit 31 remained off\n"); -+ writel(0, base + NvRegUnknownSetupReg4); -+ -+ /* 5) Find a suitable PHY */ -+ writel(NVREG_MIISPEED_BIT8 | NVREG_MIIDELAY, base + NvRegMIISpeed); -+ for (i = 1; i < 32; i++) { -+ int id1, id2; -+ -+ id1 = mii_rw(nic, i, MII_PHYSID1, MII_READ); -+ if (id1 < 0) -+ continue; -+ id2 = mii_rw(nic, i, MII_PHYSID2, MII_READ); -+ if (id2 < 0) -+ continue; -+ dprintf(("open: Found PHY %04x:%04x at address %d.\n", -+ id1, id2, i)); -+ np->phyaddr = i; -+ -+ update_linkspeed(nic); -+ -+ break; -+ } -+ if (i == 32) { -+ printf("open: failing due to lack of suitable PHY.\n"); -+ ret = -1; -+ goto out_drain; -+ } -+ -+ printf("%d-Mbs Link, %s-Duplex\n", -+ np->linkspeed & NVREG_LINKSPEED_10 ? 10 : 100, -+ np->duplex ? "Full" : "Half"); -+ /* 6) continue setup */ -+ writel(NVREG_MISC1_FORCE | (np->duplex ? 0 : NVREG_MISC1_HD), -+ base + NvRegMisc1); -+ writel(readl(base + NvRegTransmitterStatus), -+ base + NvRegTransmitterStatus); -+ writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); -+ writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); -+ -+ writel(readl(base + NvRegReceiverStatus), -+ base + NvRegReceiverStatus); -+ -+ /* FIXME: I cheated and used the calculator to get a random number */ -+ i = 75963081; -+ writel(NVREG_RNDSEED_FORCE | (i & NVREG_RNDSEED_MASK), -+ base + NvRegRandomSeed); -+ writel(NVREG_UNKSETUP1_VAL, base + NvRegUnknownSetupReg1); -+ writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); -+ writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); -+ writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); -+ writel((np-> -+ phyaddr << NVREG_ADAPTCTL_PHYSHIFT) | -+ NVREG_ADAPTCTL_PHYVALID, base + NvRegAdapterControl); -+ writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); -+ writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); -+ -+ /* 7) start packet processing */ -+ writel((u32) virt_to_le32desc(&rx_ring[0]), -+ base + NvRegRxRingPhysAddr); -+ writel((u32) virt_to_le32desc(&tx_ring[0]), -+ base + NvRegTxRingPhysAddr); -+ -+ -+ writel(((RX_RING - 1) << NVREG_RINGSZ_RXSHIFT) + -+ ((TX_RING - 1) << NVREG_RINGSZ_TXSHIFT), -+ base + NvRegRingSizes); -+ -+ i = readl(base + NvRegPowerState); -+ if ((i & NVREG_POWERSTATE_POWEREDUP) == 0) { -+ writel(NVREG_POWERSTATE_POWEREDUP | i, -+ base + NvRegPowerState); -+ } -+ pci_push(base); -+ udelay(10); -+ writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, -+ base + NvRegPowerState); -+ writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); -+ -+ writel(0, base + NvRegIrqMask); -+ pci_push(base); -+ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); -+ pci_push(base); -+ writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); -+ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); -+ pci_push(base); -+/* -+ writel(np->irqmask, base + NvRegIrqMask); -+*/ -+ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); -+ writel(0, base + NvRegMulticastAddrB); -+ writel(0, base + NvRegMulticastMaskA); -+ writel(0, base + NvRegMulticastMaskB); -+ writel(NVREG_PFF_ALWAYS | NVREG_PFF_MYADDR, -+ base + NvRegPacketFilterFlags); -+ -+ set_multicast(nic); -+ //start_rx(nic); -+ start_tx(nic); -+ -+ if (! -+ (mii_rw(nic, np->phyaddr, MII_BMSR, MII_READ) & -+ BMSR_ANEGCOMPLETE)) { -+ printf("no link during initialization.\n"); -+ } -+ -+ udelay(10000); -+ out_drain: -+ return ret; -+} -+ -+//extern void hex_dump(const char *data, const unsigned int len); -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int forcedeth_poll(struct nic *nic, int retrieve) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ -+ struct ring_desc *prd; -+ int len; -+ int i; -+ -+ i = np->cur_rx % RX_RING; -+ prd = &rx_ring[i]; -+ -+ if ( ! (prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID)) ) { -+ return 0; -+ } -+ -+ if ( ! retrieve ) return 1; -+ -+ /* got a valid packet - forward it to the network core */ -+ len = cpu_to_le16(prd->Length); -+ nic->packetlen = len; -+ //hex_dump(rxb + (i * RX_NIC_BUFSIZE), len); -+ memcpy(nic->packet, rxb + -+ (i * RX_NIC_BUFSIZE), nic->packetlen); -+ -+ wmb(); -+ np->cur_rx++; -+ alloc_rx(nic); -+ return 1; -+} -+ -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void forcedeth_transmit(struct nic *nic, const char *d, /* Destination */ -+ unsigned int t, /* Type */ -+ unsigned int s, /* size */ -+ const char *p) -+{ /* Packet */ -+ /* send the packet to destination */ -+ u8 *ptxb; -+ u16 nstype; -+ //u16 status; -+ u8 *base = (u8 *) BASE; -+ int nr = np->next_tx % TX_RING; -+ -+ /* point to the current txb incase multiple tx_rings are used */ -+ ptxb = txb + (nr * RX_NIC_BUFSIZE); -+ //np->tx_skbuff[nr] = ptxb; -+ -+ /* copy the packet to ring buffer */ -+ memcpy(ptxb, d, ETH_ALEN); /* dst */ -+ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -+ nstype = htons((u16) t); /* type */ -+ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ -+ memcpy(ptxb + ETH_HLEN, p, s); -+ -+ s += ETH_HLEN; -+ while (s < ETH_ZLEN) /* pad to min length */ -+ ptxb[s++] = '\0'; -+ -+ tx_ring[nr].PacketBuffer = (u32) virt_to_le32desc(ptxb); -+ tx_ring[nr].Length = cpu_to_le16(s - 1); -+ -+ wmb(); -+ tx_ring[nr].Flags = np->tx_flags; -+ -+ writel(NVREG_TXRXCTL_KICK, base + NvRegTxRxControl); -+ pci_push(base); -+ tx_ring[nr].Flags = np->tx_flags; -+ np->next_tx++; -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void forcedeth_disable(struct dev *dev __unused) -+{ -+ /* put the card in its initial state */ -+ /* This function serves 3 purposes. -+ * This disables DMA and interrupts so we don't receive -+ * unexpected packets or interrupts from the card after -+ * etherboot has finished. -+ * This frees resources so etherboot may use -+ * this driver on another interface -+ * This allows etherboot to reinitialize the interface -+ * if something is something goes wrong. -+ */ -+ u8 *base = (u8 *) BASE; -+ np->in_shutdown = 1; -+ stop_tx(); -+ stop_rx(); -+ -+ /* disable interrupts on the nic or we will lock up */ -+ writel(0, base + NvRegIrqMask); -+ pci_push(base); -+ dprintf(("Irqmask is zero again\n")); -+ -+ /* specia op:o write back the misordered MAC address - otherwise -+ * the next probe_nic would see a wrong address. -+ */ -+ writel(np->orig_mac[0], base + NvRegMacAddrA); -+ writel(np->orig_mac[1], base + NvRegMacAddrB); -+} -+ -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void forcedeth_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+***************************************************************************/ -+#define IORESOURCE_MEM 0x00000200 -+#define board_found 1 -+#define valid_link 0 -+static int forcedeth_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *) dev; -+ unsigned long addr; -+ int sz; -+ u8 *base; -+ -+ if (pci->ioaddr == 0) -+ return 0; -+ -+ printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n", -+ pci->name, pci->vendor, pci->dev_id); -+ -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ /* point to private storage */ -+ np = &npx; -+ -+ adjust_pci_device(pci); -+ -+ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_0); -+ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_0); -+ -+ /* BASE is used throughout to address the card */ -+ BASE = (unsigned long) ioremap(addr, sz); -+ if (!BASE) -+ return 0; -+ //rx_ring[0] = rx_ring; -+ //tx_ring[0] = tx_ring; -+ -+ /* read the mac address */ -+ base = (u8 *) BASE; -+ np->orig_mac[0] = readl(base + NvRegMacAddrA); -+ np->orig_mac[1] = readl(base + NvRegMacAddrB); -+ -+ nic->node_addr[0] = (np->orig_mac[1] >> 8) & 0xff; -+ nic->node_addr[1] = (np->orig_mac[1] >> 0) & 0xff; -+ nic->node_addr[2] = (np->orig_mac[0] >> 24) & 0xff; -+ nic->node_addr[3] = (np->orig_mac[0] >> 16) & 0xff; -+ nic->node_addr[4] = (np->orig_mac[0] >> 8) & 0xff; -+ nic->node_addr[5] = (np->orig_mac[0] >> 0) & 0xff; -+#ifdef LINUX -+ if (!is_valid_ether_addr(dev->dev_addr)) { -+ /* -+ * Bad mac address. At least one bios sets the mac address -+ * to 01:23:45:67:89:ab -+ */ -+ printk(KERN_ERR -+ "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n", -+ pci_name(pci_dev), dev->dev_addr[0], -+ dev->dev_addr[1], dev->dev_addr[2], -+ dev->dev_addr[3], dev->dev_addr[4], -+ dev->dev_addr[5]); -+ printk(KERN_ERR -+ "Please complain to your hardware vendor. Switching to a random MAC.\n"); -+ dev->dev_addr[0] = 0x00; -+ dev->dev_addr[1] = 0x00; -+ dev->dev_addr[2] = 0x6c; -+ get_random_bytes(&dev->dev_addr[3], 3); -+ } -+#endif -+ printf("%s: MAC Address %!, ", pci->name, nic->node_addr); -+ -+ np->tx_flags = -+ cpu_to_le16(NV_TX_LASTPACKET | NV_TX_LASTPACKET1 | -+ NV_TX_VALID); -+ switch (pci->dev_id) { -+ case 0x01C3: // nforce -+ np->irqmask = NVREG_IRQMASK_WANTED_2; -+ np->irqmask |= NVREG_IRQ_TIMER; -+ break; -+ case 0x0066: // nforce2 -+ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); -+ np->irqmask = NVREG_IRQMASK_WANTED_2; -+ np->irqmask |= NVREG_IRQ_TIMER; -+ break; -+ case 0x00D6: // nforce3 -+ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); -+ np->irqmask = NVREG_IRQMASK_WANTED_2; -+ np->irqmask |= NVREG_IRQ_TIMER; -+ -+ } -+ dprintf(("%s: forcedeth.c: subsystem: %hX:%hX bound to %s\n", -+ pci->name, pci->vendor, pci->dev_id, pci->name)); -+ -+ forcedeth_reset(nic); -+// if (board_found && valid_link) -+ /* point to NIC specific routines */ -+ dev->disable = forcedeth_disable; -+ nic->poll = forcedeth_poll; -+ nic->transmit = forcedeth_transmit; -+ nic->irq = forcedeth_irq; -+ return 1; -+// } -+ /* else */ -+} -+ -+static struct pci_id forcedeth_nics[] = { -+ PCI_ROM(0x10de, 0x01C3, "nforce", "nForce Ethernet Controller"), -+ PCI_ROM(0x10de, 0x0066, "nforce2", "nForce2 Ethernet Controller"), -+ PCI_ROM(0x10de, 0x00D6, "nforce3", "nForce3 Ethernet Controller"), -+}; -+ -+struct pci_driver forcedeth_driver = { -+ .type = NIC_DRIVER, -+ .name = "forcedeth", -+ .probe = forcedeth_probe, -+ .ids = forcedeth_nics, -+ .id_count = sizeof(forcedeth_nics) / sizeof(forcedeth_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/fsys_tftp.c -=================================================================== ---- a/netboot/fsys_tftp.c -+++ b/netboot/fsys_tftp.c -@@ -29,14 +29,15 @@ - /* #define TFTP_DEBUG 1 */ - - #include -+#include - --#define GRUB 1 --#include --#include -+#include "grub.h" -+#include "tftp.h" -+#include "nic.h" - - static int retry; - static unsigned short iport = 2000; --static unsigned short oport; -+static unsigned short oport = 0; - static unsigned short block, prevblock; - static int bcounter; - static struct tftp_t tp, saved_tp; -@@ -46,6 +47,172 @@ - static unsigned short len, saved_len; - static char *buf; - -+/** -+ * tftp_read -+ * -+ * Read file with _name_, data handled by _fnc_. In fact, grub never -+ * use it, we just use it to read dhcp config file. -+ */ -+static int await_tftp(int ival, void *ptr __unused, -+ unsigned short ptype __unused, struct iphdr *ip, -+ struct udphdr *udp) -+{ -+ if (!udp) { -+ return 0; -+ } -+ if (arptable[ARP_CLIENT].ipaddr.s_addr != ip->dest.s_addr) -+ return 0; -+ if (ntohs(udp->dest) != ival) -+ return 0; -+ return 1; -+} -+ -+int tftp_file_read(const char *name, int (*fnc)(unsigned char *, unsigned int, unsigned int, int)) -+{ -+ struct tftpreq_t tp; -+ struct tftp_t *tr; -+ int rc; -+ -+ retry = 0; -+ block = 0; -+ prevblock = 0; -+ bcounter = 0; -+ -+ -+ rx_qdrain(); -+ -+ tp.opcode = htons(TFTP_RRQ); -+ /* Warning: the following assumes the layout of bootp_t. -+ But that's fixed by the IP, UDP and BOOTP specs. */ -+ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + -+ sprintf((char *)tp.u.rrq, "%s%coctet%cblksize%c%d", -+ name, 0, 0, 0, TFTP_MAX_PACKET) + 1; -+ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++iport, -+ TFTP_PORT, len, &tp)) -+ return (0); -+ for (;;) -+ { -+ long timeout; -+#ifdef CONGESTED -+ timeout = rfc2131_sleep_interval(block?TFTP_REXMT: TIMEOUT, retry); -+#else -+ timeout = rfc2131_sleep_interval(TIMEOUT, retry); -+#endif -+ if (!await_reply(await_tftp, iport, NULL, timeout)) -+ { -+ if (!block && retry++ < MAX_TFTP_RETRIES) -+ { /* maybe initial request was lost */ -+ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, -+ ++iport, TFTP_PORT, len, &tp)) -+ return (0); -+ continue; -+ } -+#ifdef CONGESTED -+ if (block && ((retry += TFTP_REXMT) < TFTP_TIMEOUT)) -+ { /* we resend our last ack */ -+#ifdef MDEBUG -+ printf("\n"); -+#endif -+ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, -+ iport, oport, -+ TFTP_MIN_PACKET, &tp); -+ continue; -+ } -+#endif -+ break; /* timeout */ -+ } -+ tr = (struct tftp_t *)&nic.packet[ETH_HLEN]; -+ if (tr->opcode == ntohs(TFTP_ERROR)) -+ { -+ printf("TFTP error %d (%s)\n", -+ ntohs(tr->u.err.errcode), -+ tr->u.err.errmsg); -+ break; -+ } -+ -+ if (tr->opcode == ntohs(TFTP_OACK)) { -+ char *p = tr->u.oack.data, *e; -+ -+ if (prevblock) /* shouldn't happen */ -+ continue; /* ignore it */ -+ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 2; -+ if (len > TFTP_MAX_PACKET) -+ goto noak; -+ e = p + len; -+ while (*p != '\0' && p < e) { -+/* if (!strcasecmp("blksize", p)) { */ -+ if (!grub_strcmp("blksize", p)) { -+ p += 8; -+/* if ((packetsize = strtoul(p, &p, 10)) < */ -+ if ((packetsize = getdec(&p)) < TFTP_DEFAULTSIZE_PACKET) -+ goto noak; -+ while (p < e && *p) p++; -+ if (p < e) -+ p++; -+ } -+ else { -+ noak: -+ tp.opcode = htons(TFTP_ERROR); -+ tp.u.err.errcode = 8; -+/* -+ * Warning: the following assumes the layout of bootp_t. -+ * But that's fixed by the IP, UDP and BOOTP specs. -+ */ -+ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + sizeof(tp.u.err.errcode) + -+/* -+ * Normally bad form to omit the format string, but in this case -+ * the string we are copying from is fixed. sprintf is just being -+ * used as a strcpy and strlen. -+ */ -+ sprintf((char *)tp.u.err.errmsg, -+ "RFC1782 error") + 1; -+ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, -+ iport, ntohs(tr->udp.src), -+ len, &tp); -+ return (0); -+ } -+ } -+ if (p > e) -+ goto noak; -+ block = tp.u.ack.block = 0; /* this ensures, that */ -+ /* the packet does not get */ -+ /* processed as data! */ -+ } -+ else if (tr->opcode == htons(TFTP_DATA)) { -+ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 4; -+ if (len > packetsize) /* shouldn't happen */ -+ continue; /* ignore it */ -+ block = ntohs(tp.u.ack.block = tr->u.data.block); } -+ else {/* neither TFTP_OACK nor TFTP_DATA */ -+ break; -+ } -+ -+ if ((block || bcounter) && (block != (unsigned short)(prevblock+1))) { -+ /* Block order should be continuous */ -+ tp.u.ack.block = htons(block = prevblock); -+ } -+ tp.opcode = htons(TFTP_ACK); -+ oport = ntohs(tr->udp.src); -+ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, iport, -+ oport, TFTP_MIN_PACKET, &tp); /* ack */ -+ if ((unsigned short)(block-prevblock) != 1) { -+ /* Retransmission or OACK, don't process via callback -+ * and don't change the value of prevblock. */ -+ continue; -+ } -+ prevblock = block; -+ retry = 0; /* It's the right place to zero the timer? */ -+ if ((rc = fnc(tr->u.data.download, -+ ++bcounter, len, len < packetsize)) <= 0) -+ return(rc); -+ if (len < packetsize) { /* End of data --- fnc should not have returned */ -+ printf("tftp download complete, but\n"); -+ return (1); -+ } -+ } -+ return (0); -+} -+ - /* Fill the buffer by receiving the data via the TFTP protocol. */ - static int - buf_fill (int abort) -@@ -65,9 +232,9 @@ - timeout = rfc2131_sleep_interval (TIMEOUT, retry); - #endif - -- if (! await_reply (AWAIT_TFTP, iport, NULL, timeout)) -+ if (! await_reply (await_tftp, iport, NULL, timeout)) - { -- if (ip_abort) -+ if (user_abort) - return 0; - - if (! block && retry++ < MAX_TFTP_RETRIES) -@@ -270,13 +437,7 @@ - buf_read = 0; - saved_filepos = 0; - -- /* Clear out the Rx queue first. It contains nothing of interest, -- * except possibly ARP requests from the DHCP/TFTP server. We use -- * polling throughout Etherboot, so some time may have passed since we -- * last polled the receive queue, which may now be filled with -- * broadcast packets. This will cause the reply to the packets we are -- * about to send to be lost immediately. Not very clever. */ -- await_reply (AWAIT_QDRAIN, 0, NULL, 0); -+ rx_qdrain(); - - #ifdef TFTP_DEBUG - grub_printf ("send_rrq ()\n"); -Index: b/netboot/grub.h -=================================================================== ---- /dev/null -+++ b/netboot/grub.h -@@ -0,0 +1,171 @@ -+#ifndef GRUB_H -+#define GRUB_H -+ -+#include "osdep.h" -+#include "byteswap.h" -+#include "in.h" -+#include "ip.h" -+#include "udp.h" -+#include "if_ether.h" -+#include "latch.h" -+#include "io.h" -+#include "nic.h" -+#include -+ -+#define K_ESC '\033' -+#define K_EOF '\04' /* Ctrl-D */ -+#define K_INTR '\03' /* Ctrl-C */ -+ -+#ifndef MAX_RPC_RETRIES -+#define MAX_RPC_RETRIES 20 -+#endif -+ -+ -+/* Inter-packet retry in ticks */ -+#ifndef TIMEOUT -+#define TIMEOUT (10*TICKS_PER_SEC) -+#endif -+ -+#ifndef NULL -+#define NULL ((void *)0) -+#endif -+ -+ -+#define ARP_CLIENT 0 -+#define ARP_SERVER 1 -+#define ARP_GATEWAY 2 -+#define MAX_ARP ARP_GATEWAY+1 -+ -+#define IGMP_SERVER 0 -+#define MAX_IGMP IGMP_SERVER+1 -+ -+#define RARP_REQUEST 3 -+#define RARP_REPLY 4 -+ -+ -+#define MULTICAST_MASK 0xF0000000 -+#define MULTICAST_NETWORK 0xE0000000 -+ -+struct arptable_t { -+ in_addr ipaddr; -+ uint8_t node[6]; -+}; -+ -+struct igmptable_t { -+ in_addr group; -+ unsigned long time; -+}; -+ -+#define KERNEL_BUF (BOOTP_DATA_ADDR->bootp_reply.bp_file) -+ -+#define FLOPPY_BOOT_LOCATION 0x7c00 -+/* Must match offsets in loader.S */ -+#define ROM_SEGMENT 0x1fa -+#define ROM_LENGTH 0x1fc -+ -+#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION+ROM_SEGMENT) -+/* at end of floppy boot block */ -+ -+ -+ -+/* Define a type for passing info to a loaded program */ -+struct ebinfo { -+ uint8_t major, minor; /* Version */ -+ uint16_t flags; /* Bit flags */ -+}; -+ -+/*************************************************************************** -+External prototypes -+***************************************************************************/ -+extern void rx_qdrain P((void)); -+extern int tftp P((const char *name, int (*)(unsigned char *, unsigned int, unsigned int, int))); -+extern int ip_transmit P((int len, const void *buf)); -+extern void build_ip_hdr P((unsigned long destip, int ttl, int protocol, -+ int option_len, int len, const void *buf)); -+extern void build_udp_hdr P((unsigned long destip, -+ unsigned int srcsock, unsigned int destsock, int ttl, -+ int len, const void *buf)); -+extern int udp_transmit P((unsigned long destip, unsigned int srcsock, -+ unsigned int destsock, int len, const void *buf)); -+typedef int (*reply_t)(int ival, void *ptr, unsigned short ptype, struct iphdr *ip, struct udphdr *udp); -+extern int await_reply P((reply_t reply, int ival, void *ptr, long timeout)); -+extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int)); -+extern void join_group(int slot, unsigned long group); -+extern void leave_group(int slot); -+#define RAND_MAX 2147483647L -+extern uint16_t ipchksum P((const void *ip, unsigned long len)); -+extern uint16_t add_ipchksums P((unsigned long offset, uint16_t sum, uint16_t new)); -+extern int32_t random P((void)); -+extern long rfc2131_sleep_interval P((long base, int exp)); -+extern long rfc1112_sleep_interval P((long base, int exp)); -+#ifndef DOWNLOAD_PROTO_TFTP -+#define tftp(fname, load_block) 0 -+#endif -+extern void cleanup P((void)); -+ -+/* misc.c */ -+extern void twiddle P((void)); -+extern void sleep P((int secs)); -+extern void interruptible_sleep P((int secs)); -+extern void poll_interruptions P((void)); -+extern int strcasecmp P((const char *a, const char *b)); -+extern char *substr P((const char *a, const char *b)); -+extern unsigned long strtoul P((const char *p, const char **, int base)); -+extern void printf P((const char *, ...)); -+extern int sprintf P((char *, const char *, ...)); -+extern int inet_aton P((char *p, in_addr *i)); -+extern void putchar P((int)); -+extern int getchar P((void)); -+extern int iskey P((void)); -+ -+extern void grub_printf(const char *, ...); -+extern char config_file[128]; -+extern void etherboot_printf(const char *, ...); -+extern int etherboot_sprintf(char *, const char *, ...); -+extern int getdec(char **s); -+extern void cleanup_net(void); -+extern void print_network_configuration (void); -+extern int ifconfig (char *, char *, char *, char *); -+extern struct arptable_t arptable[MAX_ARP]; -+ -+#undef printf -+#undef sprintf -+#define printf etherboot_printf -+#define sprintf etherboot_sprintf -+ -+#ifdef DEBUG -+#define EnterFunction(func) printf("Enter: " func "\n"); -+#define LeaveFunction(func) printf("Leave: " func "\n"); -+#else -+#define EnterFunction(func) -+#define LeaveFunction(func) -+#endif -+ -+/* -+ * Some codes from etherboot use a level in DEBUG. Define it to be -+ * zero means no debug info output, that will make them silence in -+ * compiling. Up it as you want. -+ */ -+#ifndef DEBUG -+# define DEBUG 0 -+#endif -+ -+/*#define RPC_DEBUG*/ -+ -+extern char *hostname; -+ -+extern int hostnamelen; -+/* Whether network is ready */ -+extern int network_ready; -+ -+/* User aborted in await_reply if not zero */ -+extern int user_abort; -+ -+extern int rarp(void); -+extern int grub_eth_probe(void); -+extern int bootp(void); -+ -+extern int dhcp(void); -+ -+extern struct nic nic; -+#endif /* GRUB_H */ -Index: b/netboot/i386_byteswap.h -=================================================================== ---- /dev/null -+++ b/netboot/i386_byteswap.h -@@ -0,0 +1,46 @@ -+#ifndef ETHERBOOT_BITS_BYTESWAP_H -+#define ETHERBOOT_BITS_BYTESWAP_H -+ -+#include "types.h" -+static inline uint16_t __i386_bswap_16(uint16_t x) -+{ -+ __asm__("xchgb %b0,%h0\n\t" -+ : "=q" (x) -+ : "0" (x)); -+ return x; -+} -+ -+static inline uint32_t __i386_bswap_32(uint32_t x) -+{ -+ __asm__("xchgb %b0,%h0\n\t" -+ "rorl $16,%0\n\t" -+ "xchgb %b0,%h0" -+ : "=q" (x) -+ : "0" (x)); -+ return x; -+} -+ -+ -+#define __bswap_constant_16(x) \ -+ ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \ -+ (((uint16_t)(x) & 0xff00) >> 8))) -+ -+#define __bswap_constant_32(x) \ -+ ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \ -+ (((uint32_t)(x) & 0x0000ff00U) << 8) | \ -+ (((uint32_t)(x) & 0x00ff0000U) >> 8) | \ -+ (((uint32_t)(x) & 0xff000000U) >> 24))) -+ -+#define __bswap_16(x) \ -+ (__builtin_constant_p(x) ? \ -+ __bswap_constant_16(x) : \ -+ __i386_bswap_16(x)) -+ -+ -+#define __bswap_32(x) \ -+ (__builtin_constant_p(x) ? \ -+ __bswap_constant_32(x) : \ -+ __i386_bswap_32(x)) -+ -+ -+#endif /* ETHERBOOT_BITS_BYTESWAP_H */ -Index: b/netboot/i386_elf.h -=================================================================== ---- /dev/null -+++ b/netboot/i386_elf.h -@@ -0,0 +1,91 @@ -+#ifndef I386_BITS_ELF_H -+#define I386_BITS_ELF_H -+ -+#include "cpu.h" -+ -+#ifdef CONFIG_X86_64 -+/* ELF Defines for the 64bit version of the current architecture */ -+#define EM_CURRENT_64 EM_X86_64 -+#define EM_CURRENT_64_PRESENT ( \ -+ CPU_FEATURE_P(cpu_info.x86_capability, LM) && \ -+ CPU_FEATURE_P(cpu_info.x86_capability, PAE) && \ -+ CPU_FEATURE_P(cpu_info.x86_capability, PSE)) -+ -+#define ELF_CHECK_X86_64_ARCH(x) \ -+ (EM_CURRENT_64_PRESENT && ((x).e_machine == EM_X86_64)) -+#define __unused_i386 -+#else -+#define ELF_CHECK_X86_64_ARCH(x) 0 -+#define __unused_i386 __unused -+#endif -+ -+ -+/* ELF Defines for the current architecture */ -+#define EM_CURRENT EM_386 -+#define ELFDATA_CURRENT ELFDATA2LSB -+ -+#define ELF_CHECK_I386_ARCH(x) \ -+ (((x).e_machine == EM_386) || ((x).e_machine == EM_486)) -+ -+#define ELF_CHECK_ARCH(x) \ -+ ((ELF_CHECK_I386_ARCH(x) || ELF_CHECK_X86_64_ARCH(x)) && \ -+ ((x).e_entry <= 0xffffffffUL)) -+ -+#ifdef IMAGE_FREEBSD -+/* -+ * FreeBSD has this rather strange "feature" of its design. -+ * At some point in its evolution, FreeBSD started to rely -+ * externally on private/static/debug internal symbol information. -+ * That is, some of the interfaces that software uses to access -+ * and work with the FreeBSD kernel are made available not -+ * via the shared library symbol information (the .DYNAMIC section) -+ * but rather the debug symbols. This means that any symbol, not -+ * just publicly defined symbols can be (and are) used by system -+ * tools to make the system work. (such as top, swapinfo, swapon, -+ * etc) -+ * -+ * Even worse, however, is the fact that standard ELF loaders do -+ * not know how to load the symbols since they are not within -+ * an ELF PT_LOAD section. The kernel needs these symbols to -+ * operate so the following changes/additions to the boot -+ * loading of EtherBoot have been made to get the kernel to load. -+ * All of the changes are within IMAGE_FREEBSD such that the -+ * extra/changed code only compiles when FREEBSD support is -+ * enabled. -+ */ -+ -+/* -+ * Section header for FreeBSD (debug symbol kludge!) support -+ */ -+typedef struct { -+ Elf32_Word sh_name; /* Section name (index into the -+ section header string table). */ -+ Elf32_Word sh_type; /* Section type. */ -+ Elf32_Word sh_flags; /* Section flags. */ -+ Elf32_Addr sh_addr; /* Address in memory image. */ -+ Elf32_Off sh_offset; /* Offset in file. */ -+ Elf32_Size sh_size; /* Size in bytes. */ -+ Elf32_Word sh_link; /* Index of a related section. */ -+ Elf32_Word sh_info; /* Depends on section type. */ -+ Elf32_Size sh_addralign; /* Alignment in bytes. */ -+ Elf32_Size sh_entsize; /* Size of each entry in section. */ -+} Elf32_Shdr; -+ -+/* sh_type */ -+#define SHT_SYMTAB 2 /* symbol table section */ -+#define SHT_STRTAB 3 /* string table section */ -+ -+/* -+ * Module information subtypes (for the metadata that we need to build) -+ */ -+#define MODINFO_END 0x0000 /* End of list */ -+#define MODINFO_NAME 0x0001 /* Name of module (string) */ -+#define MODINFO_TYPE 0x0002 /* Type of module (string) */ -+#define MODINFO_METADATA 0x8000 /* Module-specfic */ -+ -+#define MODINFOMD_SSYM 0x0003 /* start of symbols */ -+#define MODINFOMD_ESYM 0x0004 /* end of symbols */ -+ -+#endif /* IMAGE_FREEBSD */ -+ -+#endif /* I386_BITS_ELF_H */ -Index: b/netboot/i386_endian.h -=================================================================== ---- /dev/null -+++ b/netboot/i386_endian.h -@@ -0,0 +1,6 @@ -+#ifndef ETHERBOOT_BITS_ENDIAN_H -+#define ETHERBOOT_BITS_ENDIAN_H -+ -+#define __BYTE_ORDER __LITTLE_ENDIAN -+ -+#endif /* ETHERBOOT_BITS_ENDIAN_H */ -Index: b/netboot/i386_timer.c -=================================================================== ---- /dev/null -+++ b/netboot/i386_timer.c -@@ -0,0 +1,192 @@ -+/* A couple of routines to implement a low-overhead timer for drivers */ -+ -+ /* -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2, or (at -+ * your option) any later version. -+ */ -+#include "grub.h" -+#include "osdep.h" -+#include "io.h" -+#include "timer.h" -+#include "latch.h" -+ -+void __load_timer2(unsigned int ticks) -+{ -+ /* -+ * Now let's take care of PPC channel 2 -+ * -+ * Set the Gate high, program PPC channel 2 for mode 0, -+ * (interrupt on terminal count mode), binary count, -+ * load 5 * LATCH count, (LSB and MSB) to begin countdown. -+ * -+ * Note some implementations have a bug where the high bits byte -+ * of channel 2 is ignored. -+ */ -+ /* Set up the timer gate, turn off the speaker */ -+ /* Set the Gate high, disable speaker */ -+ outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); -+ /* binary, mode 0, LSB/MSB, Ch 2 */ -+ outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); -+ /* LSB of ticks */ -+ outb(ticks & 0xFF, TIMER2_PORT); -+ /* MSB of ticks */ -+ outb(ticks >> 8, TIMER2_PORT); -+} -+ -+static int __timer2_running(void) -+{ -+ return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); -+} -+ -+#if !defined(CONFIG_TSC_CURRTICKS) -+void setup_timers(void) -+{ -+ return; -+} -+ -+void load_timer2(unsigned int ticks) -+{ -+ return __load_timer2(ticks); -+} -+ -+int timer2_running(void) -+{ -+ return __timer2_running(); -+} -+ -+void ndelay(unsigned int nsecs) -+{ -+ waiton_timer2((nsecs * CLOCK_TICK_RATE)/1000000000); -+} -+void udelay(unsigned int usecs) -+{ -+ waiton_timer2((usecs * TICKS_PER_MS)/1000); -+} -+#endif /* !defined(CONFIG_TSC_CURRTICKS) */ -+ -+#if defined(CONFIG_TSC_CURRTICKS) -+ -+#define rdtsc(low,high) \ -+ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) -+ -+#define rdtscll(val) \ -+ __asm__ __volatile__ ("rdtsc" : "=A" (val)) -+ -+ -+/* Number of clock ticks to time with the rtc */ -+#define LATCH 0xFF -+ -+#define LATCHES_PER_SEC ((CLOCK_TICK_RATE + (LATCH/2))/LATCH) -+#define TICKS_PER_LATCH ((LATCHES_PER_SEC + (TICKS_PER_SEC/2))/TICKS_PER_SEC) -+ -+static void sleep_latch(void) -+{ -+ __load_timer2(LATCH); -+ while(__timer2_running()); -+} -+ -+/* ------ Calibrate the TSC ------- -+ * Time how long it takes to excute a loop that runs in known time. -+ * And find the convertion needed to get to CLOCK_TICK_RATE -+ */ -+ -+ -+static unsigned long long calibrate_tsc(void) -+{ -+ unsigned long startlow, starthigh; -+ unsigned long endlow, endhigh; -+ -+ rdtsc(startlow,starthigh); -+ sleep_latch(); -+ rdtsc(endlow,endhigh); -+ -+ /* 64-bit subtract - gcc just messes up with long longs */ -+ __asm__("subl %2,%0\n\t" -+ "sbbl %3,%1" -+ :"=a" (endlow), "=d" (endhigh) -+ :"g" (startlow), "g" (starthigh), -+ "0" (endlow), "1" (endhigh)); -+ -+ /* Error: ECPUTOOFAST */ -+ if (endhigh) -+ goto bad_ctc; -+ -+ endlow *= TICKS_PER_LATCH; -+ return endlow; -+ -+ /* -+ * The CTC wasn't reliable: we got a hit on the very first read, -+ * or the CPU was so fast/slow that the quotient wouldn't fit in -+ * 32 bits.. -+ */ -+bad_ctc: -+ printf("bad_ctc\n"); -+ return 0; -+} -+ -+static unsigned long clocks_per_tick; -+void setup_timers(void) -+{ -+ if (!clocks_per_tick) { -+ clocks_per_tick = calibrate_tsc(); -+ /* Display the CPU Mhz to easily test if the calibration was bad */ -+ printf("CPU %ld Mhz\n", (clocks_per_tick/1000 * TICKS_PER_SEC)/1000); -+ } -+} -+ -+unsigned long currticks(void) -+{ -+ unsigned long clocks_high, clocks_low; -+ unsigned long currticks; -+ /* Read the Time Stamp Counter */ -+ rdtsc(clocks_low, clocks_high); -+ -+ /* currticks = clocks / clocks_per_tick; */ -+ __asm__("divl %1" -+ :"=a" (currticks) -+ :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); -+ -+ -+ return currticks; -+} -+ -+static unsigned long long timer_timeout; -+static int __timer_running(void) -+{ -+ unsigned long long now; -+ rdtscll(now); -+ return now < timer_timeout; -+} -+ -+void udelay(unsigned int usecs) -+{ -+ unsigned long long now; -+ rdtscll(now); -+ timer_timeout = now + usecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000)); -+ while(__timer_running()); -+} -+void ndelay(unsigned int nsecs) -+{ -+ unsigned long long now; -+ rdtscll(now); -+ timer_timeout = now + nsecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000*1000)); -+ while(__timer_running()); -+} -+ -+void load_timer2(unsigned int timer2_ticks) -+{ -+ unsigned long long now; -+ unsigned long clocks; -+ rdtscll(now); -+ clocks = timer2_ticks * ((clocks_per_tick * TICKS_PER_SEC)/CLOCK_TICK_RATE); -+ timer_timeout = now + clocks; -+} -+ -+int timer2_running(void) -+{ -+ return __timer_running(); -+} -+ -+#endif /* RTC_CURRTICKS */ -Index: b/netboot/i82586.c -=================================================================== ---- a/netboot/i82586.c -+++ /dev/null -@@ -1,825 +0,0 @@ --/************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program --i82586 NIC driver for Etherboot --Ken Yap, January 1998 --***************************************************************************/ -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --#include "etherboot.h" --#include "nic.h" --#include "cards.h" --#include "timer.h" -- --#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) -- --/* Sources of information: -- -- Donald Becker's excellent 3c507 driver in Linux -- Intel 82596 data sheet (yes, 82596; it has a 586 compatibility mode) --*/ -- --/* Code below mostly stolen wholesale from 3c507.c driver in Linux */ -- --/* -- Details of the i82586. -- -- You'll really need the databook to understand the details of this part, -- but the outline is that the i82586 has two separate processing units. -- Both are started from a list of three configuration tables, of which only -- the last, the System Control Block (SCB), is used after reset-time. The SCB -- has the following fields: -- Status word -- Command word -- Tx/Command block addr. -- Rx block addr. -- The command word accepts the following controls for the Tx and Rx units: -- */ -- --#define CUC_START 0x0100 --#define CUC_RESUME 0x0200 --#define CUC_SUSPEND 0x0300 --#define RX_START 0x0010 --#define RX_RESUME 0x0020 --#define RX_SUSPEND 0x0030 -- --/* The Rx unit uses a list of frame descriptors and a list of data buffer -- descriptors. We use full-sized (1518 byte) data buffers, so there is -- a one-to-one pairing of frame descriptors to buffer descriptors. -- -- The Tx ("command") unit executes a list of commands that look like: -- Status word Written by the 82586 when the command is done. -- Command word Command in lower 3 bits, post-command action in upper 3 -- Link word The address of the next command. -- Parameters (as needed). -- -- Some definitions related to the Command Word are: -- */ --#define CMD_EOL 0x8000 /* The last command of the list, stop. */ --#define CMD_SUSP 0x4000 /* Suspend after doing cmd. */ --#define CMD_INTR 0x2000 /* Interrupt after doing cmd. */ -- --enum commands { -- CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3, -- CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7}; -- --/* -- Details of the EtherLink16 Implementation -- -- The 3c507 and NI5210 are generic shared-memory i82586 implementations. -- 3c507: The host can map 16K, 32K, 48K, or 64K of the 64K memory into -- 0x0[CD][08]0000, or all 64K into 0xF[02468]0000. -- NI5210: The host can map 8k or 16k at 0x[CDE][048C]000 but we -- assume 8k because to have 16k you cannot put a ROM on the NIC. -- */ -- --/* Offsets from the base I/O address. */ -- --#ifdef INCLUDE_3C507 -- --#define SA_DATA 0 /* Station address data, or 3Com signature. */ --#define MISC_CTRL 6 /* Switch the SA_DATA banks, and bus config bits. */ --#define RESET_IRQ 10 /* Reset the latched IRQ line. */ --#define I82586_ATTN 11 /* Frob the 82586 Channel Attention line. */ --#define ROM_CONFIG 13 --#define MEM_CONFIG 14 --#define IRQ_CONFIG 15 --#define EL16_IO_EXTENT 16 -- --/* The ID port is used at boot-time to locate the ethercard. */ --#define ID_PORT 0x100 -- --#endif -- --#ifdef INCLUDE_NI5210 -- --#define NI52_RESET 0 /* writing to this address, resets the i82586 */ --#define I82586_ATTN 1 /* channel attention, kick the 586 */ -- --#endif -- --#ifdef INCLUDE_EXOS205 -- --#define EXOS205_RESET 0 /* writing to this address, resets the i82586 */ --#define I82586_ATTN 1 /* channel attention, kick the 586 */ -- --#endif -- --/* Offsets to registers in the mailbox (SCB). */ --#define iSCB_STATUS 0x8 --#define iSCB_CMD 0xA --#define iSCB_CBL 0xC /* Command BLock offset. */ --#define iSCB_RFA 0xE /* Rx Frame Area offset. */ -- --/* Since the 3c507 maps the shared memory window so that the last byte is --at 82586 address FFFF, the first byte is at 82586 address 0, 16K, 32K, or --48K corresponding to window sizes of 64K, 48K, 32K and 16K respectively. --We can account for this be setting the 'SBC Base' entry in the ISCP table --below for all the 16 bit offset addresses, and also adding the 'SCB Base' --value to all 24 bit physical addresses (in the SCP table and the TX and RX --Buffer Descriptors). -- -Mark --*/ -- --/* -- What follows in 'init_words[]' is the "program" that is downloaded to the -- 82586 memory. It's mostly tables and command blocks, and starts at the -- reset address 0xfffff6. This is designed to be similar to the EtherExpress, -- thus the unusual location of the SCB at 0x0008. -- -- Even with the additional "don't care" values, doing it this way takes less -- program space than initializing the individual tables, and I feel it's much -- cleaner. -- -- The databook is particularly useless for the first two structures, I had -- to use the Crynwr driver as an example. -- -- The memory setup is as follows: --*/ -- --#define CONFIG_CMD 0x18 --#define SET_SA_CMD 0x24 --#define SA_OFFSET 0x2A --#define IDLELOOP 0x30 --#define TDR_CMD 0x38 --#define TDR_TIME 0x3C --#define DUMP_CMD 0x40 --#define DIAG_CMD 0x48 --#define SET_MC_CMD 0x4E --#define DUMP_DATA 0x56 /* A 170 byte buffer for dump and Set-MC into. */ -- --#define TX_BUF_START 0x0100 --#define TX_BUF_SIZE (1518+14+20+16) /* packet+header+TBD */ -- --#define RX_BUF_START 0x1000 --#define RX_BUF_SIZE (1518+14+18) /* packet+header+RBD */ --#define RX_BUF_END (mem_end - mem_start - 20) -- --/* -- That's it: only 86 bytes to set up the beast, including every extra -- command available. The 170 byte buffer at DUMP_DATA is shared between the -- Dump command (called only by the diagnostic program) and the SetMulticastList -- command. -- -- To complete the memory setup you only have to write the station address at -- SA_OFFSET and create the Tx & Rx buffer lists. -- -- The Tx command chain and buffer list is setup as follows: -- A Tx command table, with the data buffer pointing to... -- A Tx data buffer descriptor. The packet is in a single buffer, rather than -- chaining together several smaller buffers. -- A NoOp command, which initially points to itself, -- And the packet data. -- -- A transmit is done by filling in the Tx command table and data buffer, -- re-writing the NoOp command, and finally changing the offset of the last -- command to point to the current Tx command. When the Tx command is finished, -- it jumps to the NoOp, when it loops until the next Tx command changes the -- "link offset" in the NoOp. This way the 82586 never has to go through the -- slow restart sequence. -- -- The Rx buffer list is set up in the obvious ring structure. We have enough -- memory (and low enough interrupt latency) that we can avoid the complicated -- Rx buffer linked lists by alway associating a full-size Rx data buffer with -- each Rx data frame. -- -- I currently use one transmit buffer starting at TX_BUF_START (0x0100), and -- use the rest of memory, from RX_BUF_START to RX_BUF_END, for Rx buffers. -- -- */ -- --static unsigned short init_words[] = { -- /* System Configuration Pointer (SCP). */ --#if defined(INCLUDE_3C507) -- 0x0000, /* Set bus size to 16 bits. */ --#else -- 0x0001, /* Set bus size to 8 bits */ --#endif -- 0,0, /* pad words. */ -- 0x0000,0x0000, /* ISCP phys addr, set in init_82586_mem(). */ -- -- /* Intermediate System Configuration Pointer (ISCP). */ -- 0x0001, /* Status word that's cleared when init is done. */ -- 0x0008,0,0, /* SCB offset, (skip, skip) */ -- -- /* System Control Block (SCB). */ -- 0,0xf000|RX_START|CUC_START, /* SCB status and cmd. */ -- CONFIG_CMD, /* Command list pointer, points to Configure. */ -- RX_BUF_START, /* Rx block list. */ -- 0,0,0,0, /* Error count: CRC, align, buffer, overrun. */ -- -- /* 0x0018: Configure command. Change to put MAC data with packet. */ -- 0, CmdConfigure, /* Status, command. */ -- SET_SA_CMD, /* Next command is Set Station Addr. */ -- 0x0804, /* "4" bytes of config data, 8 byte FIFO. */ -- 0x2e40, /* Magic values, including MAC data location. */ -- 0, /* Unused pad word. */ -- -- /* 0x0024: Setup station address command. */ -- 0, CmdSASetup, -- SET_MC_CMD, /* Next command. */ -- 0xaa00,0xb000,0x0bad, /* Station address (to be filled in) */ -- -- /* 0x0030: NOP, looping back to itself. Point to first Tx buffer to Tx. */ -- 0, CmdNOp, IDLELOOP, 0 /* pad */, -- -- /* 0x0038: A unused Time-Domain Reflectometer command. */ -- 0, CmdTDR, IDLELOOP, 0, -- -- /* 0x0040: An unused Dump State command. */ -- 0, CmdDump, IDLELOOP, DUMP_DATA, -- -- /* 0x0048: An unused Diagnose command. */ -- 0, CmdDiagnose, IDLELOOP, -- -- /* 0x004E: An empty set-multicast-list command. */ -- 0, CmdMulticastList, IDLELOOP, 0, --}; -- --/* NIC specific static variables go here */ -- --static unsigned short ioaddr, irq, scb_base; --static Address mem_start, mem_end; --static unsigned short rx_head, rx_tail; -- --#define read_mem(m,s) fmemcpy((char *)s, m, sizeof(s)) -- --static void setup_rx_buffers(struct nic *nic) --{ -- Address write_ptr; -- unsigned short cur_rx_buf; -- static unsigned short rx_cmd[16] = { -- 0x0000, /* Rx status */ -- 0x0000, /* Rx command, only and last */ -- RX_BUF_START, /* Link (will be adjusted) */ -- RX_BUF_START + 22, /* Buffer offset (will be adjusted) */ -- 0x0000, 0x0000, 0x0000, /* Pad for dest addr */ -- 0x0000, 0x0000, 0x0000, /* Pad for source addr */ -- 0x0000, /* Pad for protocol */ -- 0x0000, /* Buffer: Actual count */ -- -1, /* Buffer: Next (none) */ -- RX_BUF_START + 0x20, /* Buffer: Address low (+ scb_base) (will be adjusted) */ -- 0x0000, /* Buffer: Address high */ -- 0x8000 | (RX_BUF_SIZE - 0x20) -- }; -- -- cur_rx_buf = rx_head = RX_BUF_START; -- do { /* While there is room for one more buffer */ -- write_ptr = mem_start + cur_rx_buf; -- /* adjust some contents */ -- rx_cmd[1] = 0x0000; -- rx_cmd[2] = cur_rx_buf + RX_BUF_SIZE; -- rx_cmd[3] = cur_rx_buf + 22; -- rx_cmd[13] = cur_rx_buf + 0x20 + scb_base; -- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(rx_cmd)); -- rx_tail = cur_rx_buf; -- cur_rx_buf += RX_BUF_SIZE; -- } while (cur_rx_buf <= RX_BUF_END - RX_BUF_SIZE); -- /* Terminate the list by setting the EOL bit and wrap ther pointer -- to make the list a ring. */ -- write_ptr = mem_start + rx_tail; -- rx_cmd[1] = 0xC000; -- rx_cmd[2] = rx_head; -- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(unsigned short) * 3); --} -- --static void ack_status(void) --{ -- unsigned short cmd, status; -- unsigned short *shmem = (short *)mem_start; -- -- cmd = (status = shmem[iSCB_STATUS>>1]) & 0xf000; -- if (status & 0x100) /* CU suspended? */ -- cmd |= CUC_RESUME; -- if ((status & 0x200) == 0) /* CU not active? */ -- cmd |= CUC_START; -- if (status & 0x010) /* RU suspended? */ -- cmd |= RX_RESUME; -- else if ((status & 0x040) == 0) /* RU not active? */ -- cmd |= RX_START; -- if (cmd == 0) /* Nothing to do */ -- return; -- shmem[iSCB_CMD>>1] = cmd; --#if defined(DEBUG) -- printf("Status %hX Command %hX\n", status, cmd); --#endif -- outb(0, ioaddr + I82586_ATTN); --} -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ -- --static void i82586_reset(struct nic *nic) --{ -- unsigned long time; -- unsigned short *shmem = (short *)mem_start; -- -- /* put the card in its initial state */ -- --#ifdef INCLUDE_3C507 -- /* Enable loopback to protect the wire while starting up, -- and hold the 586 in reset during the memory initialisation. */ -- outb(0x20, ioaddr + MISC_CTRL); --#endif -- -- /* Fix the ISCP address and base. */ -- init_words[3] = scb_base; -- init_words[7] = scb_base; -- -- /* Write the words at 0xfff6. */ -- /* Write the words at 0x0000. */ -- /* Fill in the station address. */ -- memcpy((char *)(mem_end - 10), (char *)init_words, 10); -- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); -- memcpy((char *)mem_start + SA_OFFSET, nic->node_addr, ETH_ALEN); -- setup_rx_buffers(nic); -- --#ifdef INCLUDE_3C507 -- /* Start the 586 by releasing the reset line, but leave loopback. */ -- outb(0xA0, ioaddr + MISC_CTRL); --#endif -- -- /* This was time consuming to track down; you need to give two channel -- attention signals to reliably start up the i82586. */ -- outb(0, ioaddr + I82586_ATTN); -- time = currticks() + TICKS_PER_SEC; /* allow 1 second to init */ -- while ( -- shmem[iSCB_STATUS>>1] == 0) -- { -- if (currticks() > time) -- { -- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", -- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); -- break; -- } -- } -- /* Issue channel-attn -- the 82586 won't start. */ -- outb(0, ioaddr + I82586_ATTN); -- --#ifdef INCLUDE_3C507 -- /* Disable loopback. */ -- outb(0x80, ioaddr + MISC_CTRL); --#endif --#if defined(DEBUG) -- printf("i82586 status %hX, cmd %hX\n", -- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); --#endif --} -- --/************************************************************************** -- POLL - Wait for a frame -- ***************************************************************************/ --static int i82586_poll(struct nic *nic) --{ -- int status; -- unsigned short rfd_cmd, next_rx_frame, data_buffer_addr, -- frame_status, pkt_len; -- unsigned short *shmem = (short *)mem_start + rx_head; -- -- /* return true if there's an ethernet packet ready to read */ -- if ( -- ((frame_status = shmem[0]) & 0x8000) == 0) -- return (0); /* nope */ -- rfd_cmd = shmem[1]; -- next_rx_frame = shmem[2]; -- data_buffer_addr = shmem[3]; -- pkt_len = shmem[11]; -- status = 0; -- if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22 -- || (pkt_len & 0xC000) != 0xC000) -- printf("\nRx frame corrupt, discarded"); -- else if ((frame_status & 0x2000) == 0) -- printf("\nRx frame had error"); -- else -- { -- /* We have a frame, copy it to our buffer */ -- pkt_len &= 0x3FFF; -- memcpy(nic->packet, (char *)mem_start + rx_head + 0x20, pkt_len); -- /* Only packets not from ourself */ -- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) != 0) -- { -- nic->packetlen = pkt_len; -- status = 1; -- } -- } -- /* Clear the status word and set EOL on Rx frame */ -- shmem[0] = 0; -- shmem[1] = 0xC000; -- *(short *)(mem_start + rx_tail + 2) = 0; -- rx_tail = rx_head; -- rx_head = next_rx_frame; -- ack_status(); -- return (status); --} -- --/************************************************************************** -- TRANSMIT - Transmit a frame -- ***************************************************************************/ --static void i82586_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- Address bptr; -- unsigned short type, z; -- static unsigned short tx_cmd[11] = { -- 0x0, /* Tx status */ -- CmdTx, /* Tx command */ -- TX_BUF_START+16, /* Next command is a NoOp */ -- TX_BUF_START+8, /* Data Buffer offset */ -- 0x8000, /* | with size */ -- 0xffff, /* No next data buffer */ -- TX_BUF_START+22, /* + scb_base */ -- 0x0, /* Buffer address high bits (always zero) */ -- 0x0, /* Nop status */ -- CmdNOp, /* Nop command */ -- TX_BUF_START+16 /* Next is myself */ -- }; -- unsigned short *shmem = (short *)mem_start + TX_BUF_START; -- -- /* send the packet to destination */ -- /* adjust some contents */ -- type = htons(t); -- if (s < ETH_ZLEN) -- s = ETH_ZLEN; -- tx_cmd[4] = (s + ETH_HLEN) | 0x8000; -- tx_cmd[6] = TX_BUF_START + 22 + scb_base; -- bptr = mem_start + TX_BUF_START; -- memcpy((char *)bptr, (char *)tx_cmd, sizeof(tx_cmd)); -- bptr += sizeof(tx_cmd); -- memcpy((char *)bptr, d, ETH_ALEN); -- bptr += ETH_ALEN; -- memcpy((char *)bptr, nic->node_addr, ETH_ALEN); -- bptr += ETH_ALEN; -- memcpy((char *)bptr, (char *)&type, sizeof(type)); -- bptr += sizeof(type); -- memcpy((char *)bptr, p, s); -- /* Change the offset in the IDLELOOP */ -- *(unsigned short *)(mem_start + IDLELOOP + 4) = TX_BUF_START; -- /* Wait for transmit completion */ -- while ( -- (shmem[0] & 0x2000) == 0) -- ; -- /* Change the offset in the IDLELOOP back and -- change the final loop to point here */ -- *(unsigned short *)(mem_start + IDLELOOP + 4) = IDLELOOP; -- *(unsigned short *)(mem_start + TX_BUF_START + 20) = IDLELOOP; -- ack_status(); --} -- --/************************************************************************** -- DISABLE - Turn off ethernet interface -- ***************************************************************************/ --static void i82586_disable(struct nic *nic) --{ -- unsigned short *shmem = (short *)mem_start; -- --#if 0 -- /* Flush the Tx and disable Rx. */ -- shmem[iSCB_CMD>>1] = RX_SUSPEND | CUC_SUSPEND; -- outb(0, ioaddr + I82586_ATTN); --#ifdef INCLUDE_NI5210 -- outb(0, ioaddr + NI52_RESET); --#endif --#endif /* 0 */ --} -- --#ifdef INCLUDE_3C507 -- --static int t507_probe1(struct nic *nic, unsigned short ioaddr) --{ -- int i; -- Address size; -- char mem_config; -- char if_port; -- -- if (inb(ioaddr) != '*' || inb(ioaddr+1) != '3' -- || inb(ioaddr+2) != 'C' || inb(ioaddr+3) != 'O') -- return (0); -- irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; -- mem_config = inb(ioaddr + MEM_CONFIG); -- if (mem_config & 0x20) -- { -- size = 65536L; -- mem_start = 0xf00000L + (mem_config & 0x08 ? 0x080000L -- : (((Address)mem_config & 0x3) << 17)); -- } -- else -- { -- size = ((((Address)mem_config & 0x3) + 1) << 14); -- mem_start = 0x0c0000L + (((Address)mem_config & 0x18) << 12); -- } -- mem_end = mem_start + size; -- scb_base = 65536L - size; -- if_port = inb(ioaddr + ROM_CONFIG) & 0x80; -- /* Get station address */ -- outb(0x01, ioaddr + MISC_CTRL); -- for (i = 0; i < ETH_ALEN; ++i) -- { -- nic->node_addr[i] = inb(ioaddr+i); -- } -- printf("\n3c507 ioaddr %#hX, IRQ %d, mem [%#X-%#X], %sternal xcvr, addr %!\n", -- ioaddr, irq, mem_start, mem_end, if_port ? "in" : "ex", nic->node_addr); -- return (1); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ -- --struct nic *t507_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- static unsigned char init_ID_done = 0; -- unsigned short lrs_state = 0xff; -- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x280, 0 }; -- unsigned short *p; -- int i; -- -- if (init_ID_done == 0) -- { -- /* Send the ID sequence to the ID_PORT to enable the board */ -- outb(0x00, ID_PORT); -- for (i = 0; i < 255; ++i) -- { -- outb(lrs_state, ID_PORT); -- lrs_state <<= 1; -- if (lrs_state & 0x100) -- lrs_state ^= 0xe7; -- } -- outb(0x00, ID_PORT); -- init_ID_done = 1; -- } -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- if (probe_addrs == 0) -- probe_addrs = io_addrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) -- if (t507_probe1(nic, ioaddr)) -- break; -- if (ioaddr != 0) -- { -- /* point to NIC specific routines */ -- i82586_reset(nic); -- nic->reset = i82586_reset; -- nic->poll = i82586_poll; -- nic->transmit = i82586_transmit; -- nic->disable = i82586_disable; -- return nic; -- } -- /* else */ -- { -- return 0; -- } --} -- --#endif -- --#ifdef INCLUDE_NI5210 -- --static int ni5210_probe2(void) --{ -- unsigned short i; -- unsigned short shmem[10]; -- -- /* Fix the ISCP address and base. */ -- init_words[3] = scb_base; -- init_words[7] = scb_base; -- -- /* Write the words at 0xfff6. */ -- /* Write the words at 0x0000. */ -- memcpy((char *)(mem_end - 10), (char *)init_words, 10); -- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); -- if (*(unsigned short *)mem_start != 1) -- return (0); -- outb(0, ioaddr + NI52_RESET); -- outb(0, ioaddr + I82586_ATTN); -- udelay(32); -- i = 50; -- while ( -- shmem[iSCB_STATUS>>1] == 0) -- { -- if (--i == 0) -- { -- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", -- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); -- break; -- } -- } -- /* Issue channel-attn -- the 82586 won't start. */ -- outb(0, ioaddr + I82586_ATTN); -- if (*(unsigned short *)mem_start != 0) -- return (0); -- return (1); --} -- --static int ni5210_probe1(struct nic *nic) --{ -- int i; -- static Address mem_addrs[] = { -- 0xc0000, 0xc4000, 0xc8000, 0xcc000, -- 0xd0000, 0xd4000, 0xd8000, 0xdc000, -- 0xe0000, 0xe4000, 0xe8000, 0xec000, -- 0 }; -- Address *p; -- -- if (inb(ioaddr + 6) != 0x0 || inb(ioaddr + 7) != 0x55) -- return (0); -- scb_base = -8192; /* assume 8k memory */ -- for (p = mem_addrs; (mem_start = *p) != 0; ++p) -- if (mem_end = mem_start + 8192, ni5210_probe2()) -- break; -- if (mem_start == 0) -- return (0); -- /* Get station address */ -- for (i = 0; i < ETH_ALEN; ++i) -- { -- nic->node_addr[i] = inb(ioaddr+i); -- } -- printf("\nNI5210 ioaddr %#hX, mem [%#X-%#X], addr %!\n", -- ioaddr, mem_start, mem_end, nic->node_addr); -- return (1); --} -- --struct nic *ni5210_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- /* missing entries are addresses usually already used */ -- static unsigned short io_addrs[] = { -- 0x200, 0x208, 0x210, 0x218, 0x220, 0x228, 0x230, 0x238, -- 0x240, 0x248, 0x250, 0x258, 0x260, 0x268, 0x270, /*Par*/ -- 0x280, 0x288, 0x290, 0x298, 0x2A0, 0x2A8, 0x2B0, 0x2B8, -- 0x2C0, 0x2C8, 0x2D0, 0x2D8, 0x2E0, 0x2E8, 0x2F0, /*Ser*/ -- 0x300, 0x308, 0x310, 0x318, 0x320, 0x328, 0x330, 0x338, -- 0x340, 0x348, 0x350, 0x358, 0x360, 0x368, 0x370, /*Par*/ -- 0x380, 0x388, 0x390, 0x398, 0x3A0, 0x3A8, /*Vid,Par*/ -- 0x3C0, 0x3C8, 0x3D0, 0x3D8, 0x3E0, 0x3E8, /*Ser*/ -- 0x0 -- }; -- unsigned short *p; -- int i; -- -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- if (probe_addrs == 0) -- probe_addrs = io_addrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) -- if (ni5210_probe1(nic)) -- break; -- if (ioaddr != 0) -- { -- /* point to NIC specific routines */ -- i82586_reset(nic); -- nic->reset = i82586_reset; -- nic->poll = i82586_poll; -- nic->transmit = i82586_transmit; -- nic->disable = i82586_disable; -- return nic; -- } -- /* else */ -- { -- return 0; -- } --} --#endif -- --#ifdef INCLUDE_EXOS205 -- --/* -- * Code to download to I186 in EXOS205 -- */ -- --static unsigned char exos_i186_init[] = --{ --0x08,0x00,0x14,0x00,0x00,0x00,0xaa,0xfa,0x33,0xc0,0xba,0xfe,0xff,0xef,0xb8,0xf8, --0xff,0xe7,0xa0,0xb8,0x7c,0x00,0xe7,0xa4,0xb8,0xbc,0x80,0xe7,0xa8,0x8c,0xc8,0x8e, --0xd8,0xbb,0x2f,0x0e,0xc6,0x07,0xa5,0x33,0xc9,0xeb,0x00,0xeb,0x00,0xeb,0x00,0xe2, --0xf8,0xbe,0x2c,0x0e,0xba,0x02,0x05,0x33,0xdb,0xb9,0x03,0x00,0xec,0x24,0x0f,0x8a, --0xe0,0x02,0xd8,0x42,0x42,0xec,0x02,0xd8,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0, --0x0a,0xc4,0x88,0x04,0x42,0x42,0x46,0xe2,0xe3,0x8a,0xe3,0xd0,0xec,0xd0,0xec,0xd0, --0xec,0xd0,0xec,0x80,0xe3,0x0f,0x02,0xe3,0x80,0xf4,0x05,0xec,0x3a,0xe0,0x74,0x05, --0xc6,0x04,0x5a,0xeb,0xfe,0xc6,0x04,0x55,0x33,0xc0,0x8e,0xd8,0xbe,0x38,0x00,0xc7, --0x04,0xce,0x0e,0x46,0x46,0xc7,0x04,0x00,0xff,0xfb,0xba,0x3c,0x00,0xb8,0x03,0x00, --0xef,0x33,0xdb,0x33,0xc9,0xbd,0x04,0x0f,0x90,0x90,0x90,0x90,0xe2,0xfa,0x43,0x2e, --0x89,0x5e,0x00,0xeb,0xf3,0x52,0xba,0x00,0x06,0xef,0x50,0x53,0x55,0xbd,0xf8,0x0e, --0x2e,0x8b,0x5e,0x00,0x43,0x2e,0x89,0x5e,0x00,0xba,0x22,0x00,0xb8,0x00,0x80,0xef, --0x5d,0x5b,0x58,0x5a,0xcf,0x49,0x4e,0x54,0x52,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00, --0x00,0x4c,0x4f,0x4f,0x50,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xea,0x30,0x0e,0x00,0xff,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,00 --}; -- --/* These offsets are from the end of the i186 download code */ -- --#define OFFSET_SEMA 0x1D1 --#define OFFSET_ADDR 0x1D7 -- --static int exos205_probe2(void) --{ -- unsigned short i; -- unsigned short shmem[10]; -- -- /* Fix the ISCP address and base. */ -- init_words[3] = scb_base; -- init_words[7] = scb_base; -- -- /* Write the words at 0xfff6. */ -- /* Write the words at 0x0000. */ -- memcpy((char *)(mem_end - 10), (char *)init_words, 10); -- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); -- if (*(unsigned short *)mem_start != 1) -- return (0); -- outb(0, ioaddr + EXOS205_RESET); -- outb(0, ioaddr + I82586_ATTN); -- i = 50; -- while ( -- shmem[iSCB_STATUS>>1] == 0) -- { -- if (--i == 0) -- { -- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", -- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); -- break; -- } -- } -- /* Issue channel-attn -- the 82586 won't start. */ -- outb(0, ioaddr + I82586_ATTN); -- if (*(unsigned short *)mem_start != 0) -- return (0); -- return (1); --} -- --static int exos205_probe1(struct nic *nic) --{ -- int i; -- /* If you know the other addresses please let me know */ -- static Address mem_addrs[] = { -- 0xcc000, 0 }; -- Address *p; -- -- scb_base = -16384; /* assume 8k memory */ -- for (p = mem_addrs; (mem_start = *p) != 0; ++p) -- if (mem_end = mem_start + 16384, exos205_probe2()) -- break; -- if (mem_start == 0) -- return (0); -- /* Get station address */ -- for (i = 0; i < ETH_ALEN; ++i) -- { -- nic->node_addr[i] = inb(ioaddr+i); -- } -- printf("\nEXOS205 ioaddr %#hX, mem [%#X-%#X], addr %!\n", -- ioaddr, mem_start, mem_end, nic->node_addr); -- return (1); --} -- --struct nic *exos205_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- /* If you know the other addresses, please let me know */ -- static unsigned short io_addrs[] = { -- 0x310, 0x0 -- }; -- unsigned short *p; -- int i; -- -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- if (probe_addrs == 0) -- probe_addrs = io_addrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) -- if (exos205_probe1(nic)) -- break; -- if (ioaddr != 0) -- { -- /* point to NIC specific routines */ -- i82586_reset(nic); -- nic->reset = i82586_reset; -- nic->poll = i82586_poll; -- nic->transmit = i82586_transmit; -- nic->disable = i82586_disable; -- return nic; -- } -- /* else */ -- { -- return 0; -- } --} -- --#endif -Index: b/netboot/if_arp.h -=================================================================== ---- /dev/null -+++ b/netboot/if_arp.h -@@ -0,0 +1,29 @@ -+#ifndef _IF_ARP_H -+#define _IF_ARP_H -+ -+#include "types.h" -+ -+#define ARP_REQUEST 1 -+#define ARP_REPLY 2 -+ -+#ifndef MAX_ARP_RETRIES -+#define MAX_ARP_RETRIES 20 -+#endif -+ -+/* -+ * A pity sipaddr and tipaddr are not longword aligned or we could use -+ * in_addr. No, I don't want to use #pragma packed. -+ */ -+struct arprequest { -+ uint16_t hwtype; -+ uint16_t protocol; -+ uint8_t hwlen; -+ uint8_t protolen; -+ uint16_t opcode; -+ uint8_t shwaddr[6]; -+ uint8_t sipaddr[4]; -+ uint8_t thwaddr[6]; -+ uint8_t tipaddr[4]; -+}; -+ -+#endif /* _IF_ARP_H */ -Index: b/netboot/if_ether.h -=================================================================== ---- /dev/null -+++ b/netboot/if_ether.h -@@ -0,0 +1,21 @@ -+#ifndef _IF_ETHER_H -+#define _IF_ETHER_H -+ -+/* -+ I'm moving towards the defined names in linux/if_ether.h for clarity. -+ The confusion between 60/64 and 1514/1518 arose because the NS8390 -+ counts the 4 byte frame checksum in the incoming packet, but not -+ in the outgoing packet. 60/1514 are the correct numbers for most -+ if not all of the other NIC controllers. -+*/ -+ -+#define ETH_ALEN 6 /* Size of Ethernet address */ -+#define ETH_HLEN 14 /* Size of ethernet header */ -+#define ETH_ZLEN 60 /* Minimum packet */ -+#define ETH_FRAME_LEN 1514 /* Maximum packet */ -+#define ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ -+#ifndef ETH_MAX_MTU -+#define ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) -+#endif -+ -+#endif /* _IF_ETHER_H */ -Index: b/netboot/igmp.h -=================================================================== ---- /dev/null -+++ b/netboot/igmp.h -@@ -0,0 +1,27 @@ -+#ifndef _IGMP_H -+#define _IGMP_H -+ -+/* Max interval between IGMP packets */ -+#define IGMP_INTERVAL (10*TICKS_PER_SEC) -+#define IGMPv1_ROUTER_PRESENT_TIMEOUT (400*TICKS_PER_SEC) -+ -+#define IGMP_QUERY 0x11 -+#define IGMPv1_REPORT 0x12 -+#define IGMPv2_REPORT 0x16 -+#define IGMP_LEAVE 0x17 -+#define GROUP_ALL_HOSTS 0xe0000001 /* 224.0.0.1 Host byte order */ -+ -+struct igmp { -+ uint8_t type; -+ uint8_t response_time; -+ uint16_t chksum; -+ in_addr group; -+}; -+ -+struct igmp_ip_t { /* Format of an igmp ip packet */ -+ struct iphdr ip; -+ uint8_t router_alert[4]; /* Router alert option */ -+ struct igmp igmp; -+}; -+ -+#endif /* _IGMP_H */ -Index: b/netboot/in.h -=================================================================== ---- /dev/null -+++ b/netboot/in.h -@@ -0,0 +1,21 @@ -+#ifndef _IN_H -+#define _IN_H -+ -+#include "types.h" -+ -+#define IP 0x0800 -+#define ARP 0x0806 -+#define RARP 0x8035 -+ -+#define IP_ICMP 1 -+#define IP_IGMP 2 -+#define IP_UDP 17 -+ -+/* Same after going through htonl */ -+#define IP_BROADCAST 0xFFFFFFFF -+ -+typedef struct { -+ uint32_t s_addr; -+} in_addr; -+ -+#endif /* _IN_H */ -Index: b/netboot/io.h -=================================================================== ---- /dev/null -+++ b/netboot/io.h -@@ -0,0 +1,239 @@ -+#ifndef IO_H -+#define IO_H -+ -+ -+/* Amount of relocation etherboot is experiencing */ -+extern unsigned long virt_offset; -+ -+/* Don't require identity mapped physical memory, -+ * osloader.c is the only valid user at the moment. -+ */ -+unsigned long virt_to_phys(volatile const void *virt_addr); -+void *phys_to_virt(unsigned long phys_addr); -+ -+/* virt_to_bus converts an addresss inside of etherboot [_start, _end] -+ * into a memory access cards can use. -+ */ -+#define virt_to_bus virt_to_phys -+ -+ -+/* bus_to_virt reverses virt_to_bus, the address must be output -+ * from virt_to_bus to be valid. This function does not work on -+ * all bus addresses. -+ */ -+#define bus_to_virt phys_to_virt -+ -+/* ioremap converts a random 32bit bus address into something -+ * etherboot can access. -+ */ -+static inline void *ioremap(unsigned long bus_addr, unsigned long length __unused) -+{ -+ return bus_to_virt(bus_addr); -+} -+ -+/* iounmap cleans up anything ioremap had to setup */ -+static inline void iounmap(void *virt_addr __unused) -+{ -+ return; -+} -+ -+/* -+ * This file contains the definitions for the x86 IO instructions -+ * inb/inw/inl/outb/outw/outl and the "string versions" of the same -+ * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" -+ * versions of the single-IO instructions (inb_p/inw_p/..). -+ * -+ * This file is not meant to be obfuscating: it's just complicated -+ * to (a) handle it all in a way that makes gcc able to optimize it -+ * as well as possible and (b) trying to avoid writing the same thing -+ * over and over again with slight variations and possibly making a -+ * mistake somewhere. -+ */ -+ -+/* -+ * Thanks to James van Artsdalen for a better timing-fix than -+ * the two short jumps: using outb's to a nonexistent port seems -+ * to guarantee better timings even on fast machines. -+ * -+ * On the other hand, I'd like to be sure of a non-existent port: -+ * I feel a bit unsafe about using 0x80 (should be safe, though) -+ * -+ * Linus -+ */ -+ -+#ifdef SLOW_IO_BY_JUMPING -+#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") -+#else -+#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") -+#endif -+ -+#ifdef REALLY_SLOW_IO -+#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } -+#else -+#define SLOW_DOWN_IO __SLOW_DOWN_IO -+#endif -+ -+/* -+ * readX/writeX() are used to access memory mapped devices. On some -+ * architectures the memory mapped IO stuff needs to be accessed -+ * differently. On the x86 architecture, we just read/write the -+ * memory location directly. -+ */ -+#define readb(addr) (*(volatile unsigned char *) (addr)) -+#define readw(addr) (*(volatile unsigned short *) (addr)) -+#define readl(addr) (*(volatile unsigned int *) (addr)) -+ -+#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) -+#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) -+#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) -+ -+#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -+#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) -+ -+/* -+ * Force strict CPU ordering. -+ * And yes, this is required on UP too when we're talking -+ * to devices. -+ * -+ * For now, "wmb()" doesn't actually do anything, as all -+ * Intel CPU's follow what Intel calls a *Processor Order*, -+ * in which all writes are seen in the program order even -+ * outside the CPU. -+ * -+ * I expect future Intel CPU's to have a weaker ordering, -+ * but I'd also expect them to finally get their act together -+ * and add some real memory barriers if so. -+ * -+ * Some non intel clones support out of order store. wmb() ceases to be a -+ * nop for these. -+ */ -+ -+#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") -+#define rmb() mb() -+#define wmb() mb(); -+ -+ -+/* -+ * Talk about misusing macros.. -+ */ -+ -+#define __OUT1(s,x) \ -+extern void __out##s(unsigned x value, unsigned short port); \ -+extern inline void __out##s(unsigned x value, unsigned short port) { -+ -+#define __OUT2(s,s1,s2) \ -+__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" -+ -+#define __OUT(s,s1,x) \ -+__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ -+__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ -+__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ -+__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } -+ -+#define __IN1(s,x) \ -+extern unsigned x __in##s(unsigned short port); \ -+extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; -+ -+#define __IN2(s,s1,s2) \ -+__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" -+ -+#define __IN(s,s1,x,i...) \ -+__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ -+__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ -+__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ -+__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } -+ -+#define __INS(s) \ -+extern void ins##s(unsigned short port, void * addr, unsigned long count); \ -+extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ -+{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ -+: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } -+ -+#define __OUTS(s) \ -+extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ -+extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ -+{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ -+: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } -+ -+__IN(b,"", char) -+__IN(w,"",short) -+__IN(l,"", long) -+ -+__OUT(b,"b",char) -+__OUT(w,"w",short) -+__OUT(l,,int) -+ -+__INS(b) -+__INS(w) -+__INS(l) -+ -+__OUTS(b) -+__OUTS(w) -+__OUTS(l) -+ -+/* -+ * Note that due to the way __builtin_constant_p() works, you -+ * - can't use it inside a inline function (it will never be true) -+ * - you don't have to worry about side effects within the __builtin.. -+ */ -+#define outb(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outbc((val),(port)) : \ -+ __outb((val),(port))) -+ -+#define inb(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inbc(port) : \ -+ __inb(port)) -+ -+#define outb_p(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outbc_p((val),(port)) : \ -+ __outb_p((val),(port))) -+ -+#define inb_p(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inbc_p(port) : \ -+ __inb_p(port)) -+ -+#define outw(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outwc((val),(port)) : \ -+ __outw((val),(port))) -+ -+#define inw(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inwc(port) : \ -+ __inw(port)) -+ -+#define outw_p(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outwc_p((val),(port)) : \ -+ __outw_p((val),(port))) -+ -+#define inw_p(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inwc_p(port) : \ -+ __inw_p(port)) -+ -+#define outl(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outlc((val),(port)) : \ -+ __outl((val),(port))) -+ -+#define inl(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inlc(port) : \ -+ __inl(port)) -+ -+#define outl_p(val,port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __outlc_p((val),(port)) : \ -+ __outl_p((val),(port))) -+ -+#define inl_p(port) \ -+((__builtin_constant_p((port)) && (port) < 256) ? \ -+ __inlc_p(port) : \ -+ __inl_p(port)) -+ -+#endif /* ETHERBOOT_IO_H */ -Index: b/netboot/ip.h -=================================================================== ---- /dev/null -+++ b/netboot/ip.h -@@ -0,0 +1,36 @@ -+#ifndef _IP_H -+#define _IP_H -+ -+/* We need 'uint16_t' */ -+#include "types.h" -+/* We need 'in_addr' */ -+#include "in.h" -+ -+struct iphdr { -+ uint8_t verhdrlen; -+ uint8_t service; -+ uint16_t len; -+ uint16_t ident; -+ uint16_t frags; -+ uint8_t ttl; -+ uint8_t protocol; -+ uint16_t chksum; -+ in_addr src; -+ in_addr dest; -+}; -+ -+extern void build_ip_hdr(unsigned long __destip, int __ttl, int __protocol, -+ int __option_len, int __len, const void * __buf); -+ -+extern int ip_transmit(int __len, const void * __buf); -+ -+extern uint16_t ipchksum(const void * __data, unsigned long __length); -+ -+extern uint16_t add_ipchksums(unsigned long __offset, uint16_t __sum, -+ uint16_t __new); -+ -+ -+ -+ -+ -+#endif /* _IP_H */ -Index: b/netboot/isa.h -=================================================================== ---- /dev/null -+++ b/netboot/isa.h -@@ -0,0 +1,27 @@ -+#if !defined(ISA_H) && defined(CONFIG_ISA) -+#define ISA_H -+ -+struct dev; -+ -+#define ISAPNP_VENDOR(a,b,c) (((((a)-'A'+1)&0x3f)<<2)|\ -+ ((((b)-'A'+1)&0x18)>>3)|((((b)-'A'+1)&7)<<13)|\ -+ ((((c)-'A'+1)&0x1f)<<8)) -+ -+#define GENERIC_ISAPNP_VENDOR ISAPNP_VENDOR('P','N','P') -+ -+struct isa_driver -+{ -+ int type; -+ const char *name; -+ int (*probe)(struct dev *, unsigned short *); -+ unsigned short *ioaddrs; -+}; -+ -+#define __isa_driver __attribute__ ((unused,__section__(".drivers.isa"))) -+extern const struct isa_driver isa_drivers[]; -+extern const struct isa_driver isa_drivers_end[]; -+ -+#define ISA_ROM(IMAGE, DESCRIPTION) -+ -+#endif /* ISA_H */ -+ -Index: b/netboot/lance.c -=================================================================== ---- a/netboot/lance.c -+++ /dev/null -@@ -1,564 +0,0 @@ --/************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program --LANCE NIC driver for Etherboot --Large portions borrowed from the Linux LANCE driver by Donald Becker --Ken Yap, July 1997 --***************************************************************************/ -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --/* to get some global routines like printf */ --#include "etherboot.h" --/* to get the interface to the body of the program */ --#include "nic.h" --#ifdef INCLUDE_LANCE --#include "pci.h" --#endif --#include "cards.h" -- --/* Offsets from base I/O address */ --#if defined(INCLUDE_NE2100) || defined(INCLUDE_LANCE) --#define LANCE_ETH_ADDR 0x0 --#define LANCE_DATA 0x10 --#define LANCE_ADDR 0x12 --#define LANCE_RESET 0x14 --#define LANCE_BUS_IF 0x16 --#define LANCE_TOTAL_SIZE 0x18 --#endif --#ifdef INCLUDE_NI6510 --#define LANCE_ETH_ADDR 0x8 --#define LANCE_DATA 0x0 --#define LANCE_ADDR 0x2 --#define LANCE_RESET 0x4 --#define LANCE_BUS_IF 0x6 --#define LANCE_TOTAL_SIZE 0x10 --#endif -- --/* lance_poll() now can use multiple Rx buffers to prevent packet loss. Set -- * Set LANCE_LOG_RX_BUFFERS to 0..7 for 1, 2, 4, 8, 16, 32, 64 or 128 Rx -- * buffers. Usually 4 (=16 Rx buffers) is a good value. (Andreas Neuhaus) -- * Decreased to 2 (=4 Rx buffers) (Ken Yap, 20010305) */ -- --#define LANCE_LOG_RX_BUFFERS 2 /* Use 2^2=4 Rx buffers */ -- --#define RX_RING_SIZE (1 << (LANCE_LOG_RX_BUFFERS)) --#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) --#define RX_RING_LEN_BITS ((LANCE_LOG_RX_BUFFERS) << 29) -- --struct lance_init_block --{ -- unsigned short mode; -- unsigned char phys_addr[ETH_ALEN]; -- unsigned long filter[2]; -- Address rx_ring; -- Address tx_ring; --}; -- --struct lance_rx_head --{ -- union { -- Address base; -- unsigned char addr[4]; -- } u; -- short buf_length; /* 2s complement */ -- short msg_length; --}; -- --struct lance_tx_head --{ -- union { -- Address base; -- unsigned char addr[4]; -- } u; -- short buf_length; /* 2s complement */ -- short misc; --}; -- --struct lance_interface --{ -- struct lance_init_block init_block; -- struct lance_rx_head rx_ring[RX_RING_SIZE]; -- struct lance_tx_head tx_ring; -- unsigned char rbuf[RX_RING_SIZE][ETH_FRAME_LEN+4]; -- unsigned char tbuf[ETH_FRAME_LEN]; -- /* -- * Do not alter the order of the struct members above; -- * the hardware depends on the correct alignment. -- */ -- int rx_idx; --}; -- --#define LANCE_MUST_PAD 0x00000001 --#define LANCE_ENABLE_AUTOSELECT 0x00000002 --#define LANCE_SELECT_PHONELINE 0x00000004 --#define LANCE_MUST_UNRESET 0x00000008 -- --/* A mapping from the chip ID number to the part number and features. -- These are from the datasheets -- in real life the '970 version -- reportedly has the same ID as the '965. */ --static const struct lance_chip_type --{ -- int id_number; -- const char *name; -- int flags; --} chip_table[] = { -- {0x0000, "LANCE 7990", /* Ancient lance chip. */ -- LANCE_MUST_PAD + LANCE_MUST_UNRESET}, -- {0x0003, "PCnet/ISA 79C960", /* 79C960 PCnet/ISA. */ -- LANCE_ENABLE_AUTOSELECT}, -- {0x2260, "PCnet/ISA+ 79C961", /* 79C961 PCnet/ISA+, Plug-n-Play. */ -- LANCE_ENABLE_AUTOSELECT}, -- {0x2420, "PCnet/PCI 79C970", /* 79C970 or 79C974 PCnet-SCSI, PCI. */ -- LANCE_ENABLE_AUTOSELECT}, -- /* Bug: the PCnet/PCI actually uses the PCnet/VLB ID number, so just call -- it the PCnet32. */ -- {0x2430, "PCnet32", /* 79C965 PCnet for VL bus. */ -- LANCE_ENABLE_AUTOSELECT}, -- {0x2621, "PCnet/PCI-II 79C970A", /* 79C970A PCInetPCI II. */ -- LANCE_ENABLE_AUTOSELECT}, -- {0x2625, "PCnet-FAST III 79C973", /* 79C973 PCInet-FAST III. */ -- LANCE_ENABLE_AUTOSELECT}, -- {0x2626, "PCnet/HomePNA 79C978", -- LANCE_ENABLE_AUTOSELECT|LANCE_SELECT_PHONELINE}, -- {0x0, "PCnet (unknown)", -- LANCE_ENABLE_AUTOSELECT}, --}; -- --/* Define a macro for converting program addresses to real addresses */ --#undef virt_to_bus --#define virt_to_bus(x) ((unsigned long)x) -- --static int chip_version; --static int lance_version; --static unsigned short ioaddr; --#ifndef INCLUDE_LANCE --static int dma; --#endif --static struct lance_interface *lp; -- --/* additional 8 bytes for 8-byte alignment space */ --#ifdef USE_LOWMEM_BUFFER --#define lance ((char *)0x10000 - (sizeof(struct lance_interface)+8)) --#else --static char lance[sizeof(struct lance_interface)+8]; --#endif -- --#ifndef INCLUDE_LANCE --/* DMA defines and helper routines */ -- --/* DMA controller registers */ --#define DMA1_CMD_REG 0x08 /* command register (w) */ --#define DMA1_STAT_REG 0x08 /* status register (r) */ --#define DMA1_REQ_REG 0x09 /* request register (w) */ --#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ --#define DMA1_MODE_REG 0x0B /* mode register (w) */ --#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ --#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ --#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ --#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ --#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ -- --#define DMA2_CMD_REG 0xD0 /* command register (w) */ --#define DMA2_STAT_REG 0xD0 /* status register (r) */ --#define DMA2_REQ_REG 0xD2 /* request register (w) */ --#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ --#define DMA2_MODE_REG 0xD6 /* mode register (w) */ --#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ --#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ --#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ --#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ --#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ -- -- --#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ --#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ --#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ -- --/* enable/disable a specific DMA channel */ --static void enable_dma(unsigned int dmanr) --{ -- if (dmanr <= 3) -- outb_p(dmanr, DMA1_MASK_REG); -- else -- outb_p(dmanr & 3, DMA2_MASK_REG); --} -- --static void disable_dma(unsigned int dmanr) --{ -- if (dmanr <= 3) -- outb_p(dmanr | 4, DMA1_MASK_REG); -- else -- outb_p((dmanr & 3) | 4, DMA2_MASK_REG); --} -- --/* set mode (above) for a specific DMA channel */ --static void set_dma_mode(unsigned int dmanr, char mode) --{ -- if (dmanr <= 3) -- outb_p(mode | dmanr, DMA1_MODE_REG); -- else -- outb_p(mode | (dmanr&3), DMA2_MODE_REG); --} --#endif /* !INCLUDE_LANCE */ -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void lance_reset(struct nic *nic) --{ -- int i; -- Address l; -- -- /* Reset the LANCE */ -- (void)inw(ioaddr+LANCE_RESET); -- /* Un-Reset the LANCE, needed only for the NE2100 */ -- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) -- outw(0, ioaddr+LANCE_RESET); -- if (chip_table[lance_version].flags & LANCE_ENABLE_AUTOSELECT) -- { -- /* This is 79C960 specific; Turn on auto-select of media -- (AUI, BNC). */ -- outw(0x2, ioaddr+LANCE_ADDR); -- /* Don't touch 10base2 power bit. */ -- outw(inw(ioaddr+LANCE_BUS_IF) | 0x2, ioaddr+LANCE_BUS_IF); -- } -- /* HomePNA cards need to explicitly pick the phoneline interface. -- * Some of these cards have ethernet interfaces as well, this -- * code might require some modification for those. -- */ -- if (chip_table[lance_version].flags & LANCE_SELECT_PHONELINE) { -- short media, check ; -- /* this is specific to HomePNA cards... */ -- outw(49, ioaddr+0x12) ; -- media = inw(ioaddr+0x16) ; --#ifdef DEBUG -- printf("media was %d\n", media) ; --#endif -- media &= ~3 ; -- media |= 1 ; --#ifdef DEBUG -- printf("media changed to %d\n", media) ; --#endif -- media &= ~3 ; -- media |= 1 ; -- outw(49, ioaddr+0x12) ; -- outw(media, ioaddr+0x16) ; -- outw(49, ioaddr+0x12) ; -- check = inw(ioaddr+0x16) ; --#ifdef DEBUG -- printf("check %s, media was set properly\n", -- check == media ? "passed" : "FAILED" ) ; --#endif -- } -- -- /* Re-initialise the LANCE, and start it when done. */ -- /* Set station address */ -- for (i = 0; i < ETH_ALEN; ++i) -- lp->init_block.phys_addr[i] = nic->node_addr[i]; -- /* Preset the receive ring headers */ -- for (i=0; irx_ring[i].buf_length = -ETH_FRAME_LEN-4; -- /* OWN */ -- lp->rx_ring[i].u.base = virt_to_bus(lp->rbuf[i]) & 0xffffff; -- /* we set the top byte as the very last thing */ -- lp->rx_ring[i].u.addr[3] = 0x80; -- } -- lp->rx_idx = 0; -- lp->init_block.mode = 0x0; /* enable Rx and Tx */ -- l = (Address)virt_to_bus(&lp->init_block); -- outw(0x1, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw((short)l, ioaddr+LANCE_DATA); -- outw(0x2, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw((short)(l >> 16), ioaddr+LANCE_DATA); -- outw(0x4, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw(0x915, ioaddr+LANCE_DATA); -- outw(0x0, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw(0x4, ioaddr+LANCE_DATA); /* stop */ -- outw(0x1, ioaddr+LANCE_DATA); /* init */ -- for (i = 10000; i > 0; --i) -- if (inw(ioaddr+LANCE_DATA) & 0x100) -- break; --#ifdef DEBUG -- if (i <= 0) -- printf("Init timed out\n"); --#endif -- /* Apparently clearing the InitDone bit here triggers a bug -- in the '974. (Mark Stockton) */ -- outw(0x2, ioaddr+LANCE_DATA); /* start */ --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int lance_poll(struct nic *nic) --{ -- int status; -- -- status = lp->rx_ring[lp->rx_idx].u.base >> 24; -- if (status & 0x80) -- return (0); --#ifdef DEBUG -- printf("LANCE packet received rx_ring.u.base %X mcnt %hX csr0 %hX\n", -- lp->rx_ring[lp->rx_idx].u.base, lp->rx_ring[lp->rx_idx].msg_length, -- inw(ioaddr+LANCE_DATA)); --#endif -- if (status == 0x3) -- memcpy(nic->packet, lp->rbuf[lp->rx_idx], nic->packetlen = lp->rx_ring[lp->rx_idx].msg_length); -- /* Andrew Boyd of QNX reports that some revs of the 79C765 -- clear the buffer length */ -- lp->rx_ring[lp->rx_idx].buf_length = -ETH_FRAME_LEN-4; -- lp->rx_ring[lp->rx_idx].u.addr[3] |= 0x80; /* prime for next receive */ -- -- /* I'm not sure if the following is still ok with multiple Rx buffers, but it works */ -- outw(0x0, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw(0x500, ioaddr+LANCE_DATA); /* clear receive + InitDone */ -- -- /* Switch to the next Rx ring buffer */ -- lp->rx_idx = (lp->rx_idx + 1) & RX_RING_MOD_MASK; -- -- return (status == 0x3); --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void lance_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- unsigned long time; -- -- /* copy the packet to ring buffer */ -- memcpy(lp->tbuf, d, ETH_ALEN); /* dst */ -- memcpy(&lp->tbuf[ETH_ALEN], nic->node_addr, ETH_ALEN); /* src */ -- lp->tbuf[ETH_ALEN+ETH_ALEN] = t >> 8; /* type */ -- lp->tbuf[ETH_ALEN+ETH_ALEN+1] = t; /* type */ -- memcpy(&lp->tbuf[ETH_HLEN], p, s); -- s += ETH_HLEN; -- if (chip_table[chip_version].flags & LANCE_MUST_PAD) -- while (s < ETH_ZLEN) /* pad to min length */ -- lp->tbuf[s++] = 0; -- lp->tx_ring.buf_length = -s; -- lp->tx_ring.misc = 0x0; -- /* OWN, STP, ENP */ -- lp->tx_ring.u.base = virt_to_bus(lp->tbuf) & 0xffffff; -- /* we set the top byte as the very last thing */ -- lp->tx_ring.u.addr[3] = 0x83; -- /* Trigger an immediate send poll */ -- outw(0x0, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); /* as in the datasheets... */ -- /* Klaus Espenlaub: the value below was 0x48, but that enabled the -- * interrupt line, causing a hang if for some reasone the interrupt -- * controller had the LANCE interrupt enabled. I have no idea why -- * nobody ran into this before... */ -- outw(0x08, ioaddr+LANCE_DATA); -- /* wait for transmit complete */ -- time = currticks() + TICKS_PER_SEC; /* wait one second */ -- while (currticks() < time && (lp->tx_ring.u.base & 0x80000000) != 0) -- ; -- if ((lp->tx_ring.u.base & 0x80000000) != 0) -- printf("LANCE timed out on transmit\n"); -- (void)inw(ioaddr+LANCE_ADDR); -- outw(0x200, ioaddr+LANCE_DATA); /* clear transmit + InitDone */ --#ifdef DEBUG -- printf("tx_ring.u.base %X tx_ring.buf_length %hX tx_ring.misc %hX csr0 %hX\n", -- lp->tx_ring.u.base, lp->tx_ring.buf_length, lp->tx_ring.misc, -- inw(ioaddr+LANCE_DATA)); --#endif --} -- --static void lance_disable(struct nic *nic) --{ -- (void)inw(ioaddr+LANCE_RESET); -- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) -- outw(0, ioaddr+LANCE_RESET); -- -- outw(0, ioaddr+LANCE_ADDR); -- outw(0x0004, ioaddr+LANCE_DATA); /* stop the LANCE */ -- --#ifndef INCLUDE_LANCE -- disable_dma(dma); --#endif --} -- --#ifdef INCLUDE_LANCE --static int lance_probe1(struct nic *nic, struct pci_device *pci) --#else --static int lance_probe1(struct nic *nic) --#endif --{ -- int reset_val ; -- unsigned int i; -- Address l; -- short dma_channels; --#ifndef INCLUDE_LANCE -- static const char dmas[] = { 5, 6, 7, 3 }; --#endif -- -- reset_val = inw(ioaddr+LANCE_RESET); -- outw(reset_val, ioaddr+LANCE_RESET); --#if 1 /* Klaus Espenlaub -- was #ifdef INCLUDE_NE2100*/ -- outw(0x0, ioaddr+LANCE_ADDR); /* Switch to window 0 */ -- if (inw(ioaddr+LANCE_DATA) != 0x4) -- return (-1); --#endif -- outw(88, ioaddr+LANCE_ADDR); /* Get the version of the chip */ -- if (inw(ioaddr+LANCE_ADDR) != 88) -- lance_version = 0; -- else -- { -- chip_version = inw(ioaddr+LANCE_DATA); -- outw(89, ioaddr+LANCE_ADDR); -- chip_version |= inw(ioaddr+LANCE_DATA) << 16; -- if ((chip_version & 0xfff) != 0x3) -- return (-1); -- chip_version = (chip_version >> 12) & 0xffff; -- for (lance_version = 1; chip_table[lance_version].id_number != 0; ++lance_version) -- if (chip_table[lance_version].id_number == chip_version) -- break; -- } -- /* make sure data structure is 8-byte aligned */ -- l = ((Address)lance + 7) & ~7; -- lp = (struct lance_interface *)l; -- lp->init_block.mode = 0x3; /* disable Rx and Tx */ -- lp->init_block.filter[0] = lp->init_block.filter[1] = 0x0; -- /* using multiple Rx buffer and a single Tx buffer */ -- lp->init_block.rx_ring = (virt_to_bus(&lp->rx_ring) & 0xffffff) | RX_RING_LEN_BITS; -- lp->init_block.tx_ring = virt_to_bus(&lp->tx_ring) & 0xffffff; -- l = virt_to_bus(&lp->init_block); -- outw(0x1, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw((unsigned short)l, ioaddr+LANCE_DATA); -- outw(0x2, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw((unsigned short)(l >> 16), ioaddr+LANCE_DATA); -- outw(0x4, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- outw(0x915, ioaddr+LANCE_DATA); -- outw(0x0, ioaddr+LANCE_ADDR); -- (void)inw(ioaddr+LANCE_ADDR); -- /* Get station address */ -- for (i = 0; i < ETH_ALEN; ++i) { -- nic->node_addr[i] = inb(ioaddr+LANCE_ETH_ADDR+i); -- } --#ifndef INCLUDE_LANCE -- /* now probe for DMA channel */ -- dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0xf) | -- (inb(DMA2_STAT_REG) & 0xf0); -- /* need to fix when PCI provides DMA info */ -- for (i = 0; i < (sizeof(dmas)/sizeof(dmas[0])); ++i) -- { -- int j; -- -- dma = dmas[i]; -- /* Don't enable a permanently busy DMA channel, -- or the machine will hang */ -- if (dma_channels & (1 << dma)) -- continue; -- outw(0x7f04, ioaddr+LANCE_DATA); /* clear memory error bits */ -- set_dma_mode(dma, DMA_MODE_CASCADE); -- enable_dma(dma); -- outw(0x1, ioaddr+LANCE_DATA); /* init */ -- for (j = 100; j > 0; --j) -- if (inw(ioaddr+LANCE_DATA) & 0x900) -- break; -- if (inw(ioaddr+LANCE_DATA) & 0x100) -- break; -- else -- disable_dma(dma); -- } -- if (i >= (sizeof(dmas)/sizeof(dmas[0]))) -- dma = 0; -- printf("\n%s base %#X, DMA %d, addr %!\n", -- chip_table[lance_version].name, ioaddr, dma, nic->node_addr); --#else -- printf(" %s base %#hX, addr %!\n", chip_table[lance_version].name, ioaddr, nic->node_addr); --#endif -- if (chip_table[chip_version].flags & LANCE_ENABLE_AUTOSELECT) { -- /* Turn on auto-select of media (10baseT or BNC) so that the -- * user watch the LEDs. */ -- outw(0x0002, ioaddr+LANCE_ADDR); -- /* Don't touch 10base2 power bit. */ -- outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); -- } -- return (lance_version); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ -- --#ifdef INCLUDE_LANCE --struct nic *lancepci_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *pci) --#endif --#ifdef INCLUDE_NE2100 --struct nic *ne2100_probe(struct nic *nic, unsigned short *probe_addrs) --#endif --#ifdef INCLUDE_NI6510 --struct nic *ni6510_probe(struct nic *nic, unsigned short *probe_addrs) --#endif --{ -- unsigned short *p; --#ifndef INCLUDE_LANCE -- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x360, 0 }; --#endif -- -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- if (probe_addrs == 0) { --#ifdef INCLUDE_LANCE -- return 0; --#else -- probe_addrs = io_addrs; --#endif -- } -- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) -- { -- char offset15, offset14 = inb(ioaddr + 14); -- unsigned short pci_cmd; -- --#ifdef INCLUDE_NE2100 -- if ((offset14 == 0x52 || offset14 == 0x57) && -- ((offset15 = inb(ioaddr + 15)) == 0x57 || offset15 == 0x44)) -- if (lance_probe1(nic) >= 0) -- break; --#endif --#ifdef INCLUDE_NI6510 -- if ((offset14 == 0x00 || offset14 == 0x52) && -- ((offset15 = inb(ioaddr + 15)) == 0x55 || offset15 == 0x44)) -- if (lance_probe1(nic) >= 0) -- break; --#endif --#ifdef INCLUDE_LANCE -- adjust_pci_device(pci); -- if (lance_probe1(nic, pci) >= 0) -- break; --#endif -- } -- /* if board found */ -- if (ioaddr != 0) -- { -- /* point to NIC specific routines */ -- lance_reset(nic); -- nic->reset = lance_reset; -- nic->poll = lance_poll; -- nic->transmit = lance_transmit; -- nic->disable = lance_disable; -- return nic; -- } -- -- /* no board found */ -- return 0; --} -Index: b/netboot/latch.h -=================================================================== ---- /dev/null -+++ b/netboot/latch.h -@@ -0,0 +1,10 @@ -+#ifndef LATCH_H -+#define LATCH_H -+ -+#define TICKS_PER_SEC 18 -+ -+/* For different calibrators of the TSC move the declaration of -+ * sleep_latch and the definitions of it's length here... -+ */ -+ -+#endif /* LATCH_H */ -Index: b/netboot/linux-asm-io.h -=================================================================== ---- a/netboot/linux-asm-io.h -+++ /dev/null -@@ -1,187 +0,0 @@ --#ifndef _ASM_IO_H --#define _ASM_IO_H -- --/* -- * This file contains the definitions for the x86 IO instructions -- * inb/inw/inl/outb/outw/outl and the "string versions" of the same -- * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" -- * versions of the single-IO instructions (inb_p/inw_p/..). -- * -- * This file is not meant to be obfuscating: it's just complicated -- * to (a) handle it all in a way that makes gcc able to optimize it -- * as well as possible and (b) trying to avoid writing the same thing -- * over and over again with slight variations and possibly making a -- * mistake somewhere. -- */ -- --/* -- * Thanks to James van Artsdalen for a better timing-fix than -- * the two short jumps: using outb's to a nonexistent port seems -- * to guarantee better timings even on fast machines. -- * -- * On the other hand, I'd like to be sure of a non-existent port: -- * I feel a bit unsafe about using 0x80 (should be safe, though) -- * -- * Linus -- */ -- --#ifdef SLOW_IO_BY_JUMPING --#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") --#else --#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") --#endif -- --#ifdef REALLY_SLOW_IO --#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } --#else --#define SLOW_DOWN_IO __SLOW_DOWN_IO --#endif -- --/* -- * readX/writeX() are used to access memory mapped devices. On some -- * architectures the memory mapped IO stuff needs to be accessed -- * differently. On the x86 architecture, we just read/write the -- * memory location directly. -- */ --#define readb(addr) (*(volatile unsigned char *) (addr)) --#define readw(addr) (*(volatile unsigned short *) (addr)) --#define readl(addr) (*(volatile unsigned int *) (addr)) -- --#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) --#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) --#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) -- --#define memset_io(a,b,c) memset((void *)(a),(b),(c)) --#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) --#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) -- --/* -- * Again, i386 does not require mem IO specific function. -- */ -- --#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) -- --/* -- * Talk about misusing macros.. -- */ -- --#define __OUT1(s,x) \ --extern void __out##s(unsigned x value, unsigned short port); \ --extern inline void __out##s(unsigned x value, unsigned short port) { -- --#define __OUT2(s,s1,s2) \ --__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" -- --#define __OUT(s,s1,x) \ --__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ --__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ --__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ --__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } -- --#define __IN1(s,x) \ --extern unsigned x __in##s(unsigned short port); \ --extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; -- --#define __IN2(s,s1,s2) \ --__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" -- --#define __IN(s,s1,x,i...) \ --__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ --__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ --__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ --__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } -- --#define __INS(s) \ --extern void ins##s(unsigned short port, void * addr, unsigned long count); \ --extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ --{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ --: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } -- --#define __OUTS(s) \ --extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ --extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ --{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ --: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } -- --__IN(b,"", char) --__IN(w,"",short) --__IN(l,"", long) -- --__OUT(b,"b",char) --__OUT(w,"w",short) --__OUT(l,,int) -- --__INS(b) --__INS(w) --__INS(l) -- --__OUTS(b) --__OUTS(w) --__OUTS(l) -- --/* -- * Note that due to the way __builtin_constant_p() works, you -- * - can't use it inside a inline function (it will never be true) -- * - you don't have to worry about side effects within the __builtin.. -- */ --#define outb(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outbc((val),(port)) : \ -- __outb((val),(port))) -- --#define inb(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inbc(port) : \ -- __inb(port)) -- --#define outb_p(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outbc_p((val),(port)) : \ -- __outb_p((val),(port))) -- --#define inb_p(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inbc_p(port) : \ -- __inb_p(port)) -- --#define outw(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outwc((val),(port)) : \ -- __outw((val),(port))) -- --#define inw(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inwc(port) : \ -- __inw(port)) -- --#define outw_p(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outwc_p((val),(port)) : \ -- __outw_p((val),(port))) -- --#define inw_p(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inwc_p(port) : \ -- __inw_p(port)) -- --#define outl(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outlc((val),(port)) : \ -- __outl((val),(port))) -- --#define inl(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inlc(port) : \ -- __inl(port)) -- --#define outl_p(val,port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __outlc_p((val),(port)) : \ -- __outl_p((val),(port))) -- --#define inl_p(port) \ --((__builtin_constant_p((port)) && (port) < 256) ? \ -- __inlc_p(port) : \ -- __inl_p(port)) -- --#endif -Index: b/netboot/linux-asm-string.h -=================================================================== ---- a/netboot/linux-asm-string.h -+++ /dev/null -@@ -1,291 +0,0 @@ --/* -- * Taken from Linux /usr/include/asm/string.h -- * All except memcpy, memmove, memset and memcmp removed. -- */ -- --#ifndef _I386_STRING_H_ --#define _I386_STRING_H_ -- --/* -- * This string-include defines all string functions as inline -- * functions. Use gcc. It also assumes ds=es=data space, this should be -- * normal. Most of the string-functions are rather heavily hand-optimized, -- * see especially strtok,strstr,str[c]spn. They should work, but are not -- * very easy to understand. Everything is done entirely within the register -- * set, making the functions fast and clean. String instructions have been -- * used through-out, making for "slightly" unclear code :-) -- * -- * NO Copyright (C) 1991, 1992 Linus Torvalds, -- * consider these trivial functions to be PD. -- */ -- --typedef int size_t; -- --extern void *__memcpy(void * to, const void * from, size_t n); --extern void *__constant_memcpy(void * to, const void * from, size_t n); --extern void *memmove(void * dest,const void * src, size_t n); --extern void *__memset_generic(void * s, char c,size_t count); --extern void *__constant_c_memset(void * s, unsigned long c, size_t count); --extern void *__constant_c_and_count_memset(void * s, unsigned long pattern, size_t count); -- -- --extern inline void * __memcpy(void * to, const void * from, size_t n) --{ --int d0, d1, d2; --__asm__ __volatile__( -- "cld\n\t" -- "rep ; movsl\n\t" -- "testb $2,%b4\n\t" -- "je 1f\n\t" -- "movsw\n" -- "1:\ttestb $1,%b4\n\t" -- "je 2f\n\t" -- "movsb\n" -- "2:" -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) -- :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) -- : "memory"); --return (to); --} -- --/* -- * This looks horribly ugly, but the compiler can optimize it totally, -- * as the count is constant. -- */ --extern inline void * __constant_memcpy(void * to, const void * from, size_t n) --{ -- switch (n) { -- case 0: -- return to; -- case 1: -- *(unsigned char *)to = *(const unsigned char *)from; -- return to; -- case 2: -- *(unsigned short *)to = *(const unsigned short *)from; -- return to; -- case 3: -- *(unsigned short *)to = *(const unsigned short *)from; -- *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); -- return to; -- case 4: -- *(unsigned long *)to = *(const unsigned long *)from; -- return to; -- case 6: /* for Ethernet addresses */ -- *(unsigned long *)to = *(const unsigned long *)from; -- *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); -- return to; -- case 8: -- *(unsigned long *)to = *(const unsigned long *)from; -- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); -- return to; -- case 12: -- *(unsigned long *)to = *(const unsigned long *)from; -- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); -- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); -- return to; -- case 16: -- *(unsigned long *)to = *(const unsigned long *)from; -- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); -- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); -- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); -- return to; -- case 20: -- *(unsigned long *)to = *(const unsigned long *)from; -- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); -- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); -- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); -- *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); -- return to; -- } --#define COMMON(x) \ --__asm__ __volatile__( \ -- "cld\n\t" \ -- "rep ; movsl" \ -- x \ -- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ -- : "0" (n/4),"1" ((long) to),"2" ((long) from) \ -- : "memory"); --{ -- int d0, d1, d2; -- switch (n % 4) { -- case 0: COMMON(""); return to; -- case 1: COMMON("\n\tmovsb"); return to; -- case 2: COMMON("\n\tmovsw"); return to; -- default: COMMON("\n\tmovsw\n\tmovsb"); return to; -- } --} -- --#undef COMMON --} -- --#define __HAVE_ARCH_MEMCPY --#define memcpy(t, f, n) \ --(__builtin_constant_p(n) ? \ -- __constant_memcpy((t),(f),(n)) : \ -- __memcpy((t),(f),(n))) -- --#define __HAVE_ARCH_MEMMOVE --extern inline void * memmove(void * dest,const void * src, size_t n) --{ --int d0, d1, d2; --if (dest -+#include "grub.h" -+#include "timer.h" - --void --sleep (int secs) -+#include "nic.h" -+ -+/************************************************************************** -+RANDOM - compute a random number between 0 and 2147483647L or 2147483562? -+**************************************************************************/ -+int32_t random(void) - { -- unsigned long tmo = currticks () + secs; -+ static int32_t seed = 0; -+ int32_t q; -+ if (!seed) /* Initialize linear congruential generator */ -+ seed = currticks() + *(int32_t *)&arptable[ARP_CLIENT].node -+ + ((int16_t *)arptable[ARP_CLIENT].node)[2]; -+ /* simplified version of the LCG given in Bruce Schneier's -+ "Applied Cryptography" */ -+ q = seed/53668; -+ if ((seed = 40014*(seed-53668*q) - 12211*q) < 0) seed += 2147483563L; -+ return seed; -+} - -- while (currticks () < tmo) -- ; -+/************************************************************************** -+POLL INTERRUPTIONS -+**************************************************************************/ -+void poll_interruptions(void) -+{ -+ if (checkkey() != -1 && ASCII_CHAR(getkey()) == K_INTR) { -+ user_abort++; -+ } - } - --void --twiddle (void) -+/************************************************************************** -+SLEEP -+**************************************************************************/ -+void sleep(int secs) - { -- static unsigned long lastticks = 0; -- static int count = 0; -- static const char tiddles[]="-\\|/"; -- unsigned long ticks; -+ unsigned long tmo; - -- if (debug) -- { -- if ((ticks = currticks ()) == lastticks) -- return; -- -- lastticks = ticks; -- grub_putchar (tiddles[(count++) & 3]); -- grub_putchar ('\b'); -- } -+ for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) { -+ poll_interruptions(); -+ } -+} -+ -+/************************************************************************** -+INTERRUPTIBLE SLEEP -+**************************************************************************/ -+void interruptible_sleep(int secs) -+{ -+ printf("\n"); -+ return sleep(secs); -+} -+ -+/************************************************************************** -+TWIDDLE -+**************************************************************************/ -+void twiddle(void) -+{ -+#ifdef BAR_PROGRESS -+ static int count=0; -+ static const char tiddles[]="-\\|/"; -+ static unsigned long lastticks = 0; -+ unsigned long ticks; -+#endif -+#ifdef FREEBSD_PXEEMU -+ extern char pxeemu_nbp_active; -+ if(pxeemu_nbp_active != 0) -+ return; -+#endif -+#ifdef BAR_PROGRESS -+ /* Limit the maximum rate at which characters are printed */ -+ ticks = currticks(); -+ if ((lastticks + (TICKS_PER_SEC/18)) > ticks) -+ return; -+ lastticks = ticks; -+ -+ putchar(tiddles[(count++)&3]); -+ putchar('\b'); -+#else -+ //putchar('.'); -+#endif /* BAR_PROGRESS */ - } - -+ - /* Because Etherboot uses its own formats for the printf family, - define separate definitions from GRUB. */ - /************************************************************************** -@@ -264,3 +317,5 @@ - - return ret; - } -+ -+ -Index: b/netboot/natsemi.c -=================================================================== ---- a/netboot/natsemi.c -+++ b/netboot/natsemi.c -@@ -47,15 +47,15 @@ - /* Revision History */ - - /* -+ 13 Dec 2003 timlegge 1.1 Enabled Multicast Support - 29 May 2001 mdc 1.0 - Initial Release. Tested with Netgear FA311 and FA312 boards --*/ -+*/ - /* Includes */ - - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - - /* defines */ - -@@ -71,21 +71,18 @@ - - #define NUM_RX_DESC 4 /* Number of Rx descriptor registers. */ - --typedef unsigned char u8; --typedef signed char s8; --typedef unsigned short u16; --typedef signed short s16; --typedef unsigned int u32; --typedef signed int s32; -+typedef uint8_t u8; -+typedef int8_t s8; -+typedef uint16_t u16; -+typedef int16_t s16; -+typedef uint32_t u32; -+typedef int32_t s32; - - /* helpful macroes if on a big_endian machine for changing byte order. - not strictly needed on Intel */ --#define le16_to_cpu(val) (val) --#define cpu_to_le32(val) (val) - #define get_unaligned(ptr) (*(ptr)) - #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) - #define get_u16(ptr) (*(u16 *)(ptr)) --#define virt_to_bus(x) ((unsigned long)x) - #define virt_to_le32desc(addr) virt_to_bus(addr) - - enum pcistuff { -@@ -161,7 +158,8 @@ - AcceptMulticast = 0x00200000, - AcceptAllMulticast = 0x20000000, - AcceptAllPhys = 0x10000000, -- AcceptMyPhys = 0x08000000 -+ AcceptMyPhys = 0x08000000, -+ RxFilterEnable = 0x80000000 - }; - - typedef struct _BufferDesc { -@@ -207,17 +205,12 @@ - static BufferDesc txd __attribute__ ((aligned(4))); - static BufferDesc rxd[NUM_RX_DESC] __attribute__ ((aligned(4))); - --#ifdef USE_LOWMEM_BUFFER --#define txb ((char *)0x10000 - TX_BUF_SIZE) --#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) --#else - static unsigned char txb[TX_BUF_SIZE] __attribute__ ((aligned(4))); - static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE] __attribute__ ((aligned(4))); --#endif - - /* Function Prototypes */ - --struct nic *natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); -+static int natsemi_probe(struct dev *dev, struct pci_device *pci); - static int eeprom_read(long addr, int location); - static int mdio_read(int phy_id, int location); - static void natsemi_init(struct nic *nic); -@@ -228,8 +221,9 @@ - static void natsemi_set_rx_mode(struct nic *nic); - static void natsemi_check_duplex(struct nic *nic); - static void natsemi_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); --static int natsemi_poll(struct nic *nic); --static void natsemi_disable(struct nic *nic); -+static int natsemi_poll(struct nic *nic, int retrieve); -+static void natsemi_disable(struct dev *dev); -+static void natsemi_irq(struct nic *nic, irq_action_t action); - - /* - * Function: natsemi_probe -@@ -245,24 +239,28 @@ - * Returns: struct nic *: pointer to NIC data structure - */ - --struct nic * --natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) -+static int -+natsemi_probe(struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; - int i; - int prev_eedata; - u32 tmp; - -- if (io_addrs == 0 || *io_addrs == 0) -- return NULL; -+ if (pci->ioaddr == 0) -+ return 0; -+ -+ adjust_pci_device(pci); - - /* initialize some commonly used globals */ - -- ioaddr = *io_addrs & ~3; -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ ioaddr = pci->ioaddr & ~3; - vendor = pci->vendor; - dev_id = pci->dev_id; - nic_name = pci->name; -- -- adjust_pci_device(pci); - - /* natsemi has a non-standard PM control register - * in PCI config space. Some boards apparently need -@@ -317,12 +315,12 @@ - /* initialize device */ - natsemi_init(nic); - -- nic->reset = natsemi_init; -+ dev->disable = natsemi_disable; - nic->poll = natsemi_poll; - nic->transmit = natsemi_transmit; -- nic->disable = natsemi_disable; -+ nic->irq = natsemi_irq; - -- return nic; -+ return 1; - } - - /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. -@@ -452,7 +450,7 @@ - * Returns: void. - */ - static void --natsemi_reset(struct nic *nic) -+natsemi_reset(struct nic *nic __unused) - { - outl(ChipReset, ioaddr + ChipCmd); - -@@ -504,14 +502,14 @@ - */ - - static void --natsemi_init_txd(struct nic *nic) -+natsemi_init_txd(struct nic *nic __unused) - { - txd.link = (u32) 0; - txd.cmdsts = (u32) 0; -- txd.bufptr = (u32) &txb[0]; -+ txd.bufptr = virt_to_bus(&txb[0]); - - /* load Transmit Descriptor Register */ -- outl((u32) &txd, ioaddr + TxRingPtr); -+ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); - if (natsemi_debug > 1) - printf("natsemi_init_txd: TX descriptor register loaded with: %X\n", - inl(ioaddr + TxRingPtr)); -@@ -527,7 +525,7 @@ - */ - - static void --natsemi_init_rxd(struct nic *nic) -+natsemi_init_rxd(struct nic *nic __unused) - { - int i; - -@@ -535,16 +533,16 @@ - - /* init RX descriptor */ - for (i = 0; i < NUM_RX_DESC; i++) { -- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; -+ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); - rxd[i].cmdsts = (u32) RX_BUF_SIZE; -- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; -+ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); - if (natsemi_debug > 1) - printf("natsemi_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", - i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); - } - - /* load Receive Descriptor Register */ -- outl((u32) &rxd[0], ioaddr + RxRingPtr); -+ outl(virt_to_bus(&rxd[0]), ioaddr + RxRingPtr); - - if (natsemi_debug > 1) - printf("natsemi_init_rxd: RX descriptor register loaded with: %X\n", -@@ -562,14 +560,15 @@ - * Returns: void. - */ - --static void natsemi_set_rx_mode(struct nic *nic) -+static void natsemi_set_rx_mode(struct nic *nic __unused) - { -- u32 rx_mode = AcceptBroadcast | AcceptMyPhys; -+ u32 rx_mode = RxFilterEnable | AcceptBroadcast | -+ AcceptAllMulticast | AcceptMyPhys; - - outl(rx_mode, ioaddr + RxFilterAddr); - } - --static void natsemi_check_duplex(struct nic *nic) -+static void natsemi_check_duplex(struct nic *nic __unused) - { - int duplex = inl(ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; - -@@ -607,14 +606,14 @@ - unsigned int s, /* size */ - const char *p) /* Packet */ - { -- u32 status, to, nstype; -+ u32 to, nstype; - volatile u32 tx_status; - - /* Stop the transmitter */ - outl(TxOff, ioaddr + ChipCmd); - - /* load Transmit Descriptor Register */ -- outl((u32) &txd, ioaddr + TxRingPtr); -+ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); - if (natsemi_debug > 1) - printf("natsemi_transmit: TX descriptor register loaded with: %X\n", - inl(ioaddr + TxRingPtr)); -@@ -636,7 +635,7 @@ - txb[s++] = '\0'; - - /* set the transmit buffer descriptor and enable Transmit State Machine */ -- txd.bufptr = (u32) &txb[0]; -+ txd.bufptr = virt_to_bus(&txb[0]); - txd.cmdsts = (u32) OWN | s; - - /* restart the transmitter */ -@@ -647,7 +646,7 @@ - - to = currticks() + TX_TIMEOUT; - -- while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) -+ while (((tx_status=txd.cmdsts & OWN) && (currticks() < to)) - /* wait */ ; - - if (currticks() >= to) { -@@ -674,7 +673,7 @@ - */ - - static int --natsemi_poll(struct nic *nic) -+natsemi_poll(struct nic *nic, int retrieve) - { - u32 rx_status = rxd[cur_rx].cmdsts; - int retstat = 0; -@@ -685,6 +684,8 @@ - if (!(rx_status & OWN)) - return retstat; - -+ if ( ! retrieve ) return 1; -+ - if (natsemi_debug > 1) - printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", - cur_rx, rx_status); -@@ -704,7 +705,7 @@ - - /* return the descriptor and buffer to receive ring */ - rxd[cur_rx].cmdsts = RX_BUF_SIZE; -- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; -+ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); - - if (++cur_rx == NUM_RX_DESC) - cur_rx = 0; -@@ -725,8 +726,12 @@ - */ - - static void --natsemi_disable(struct nic *nic) -+natsemi_disable(struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; -+ /* merge reset and disable */ -+ natsemi_init(nic); -+ - /* Disable interrupts using the mask. */ - outl(0, ioaddr + IntrMask); - outl(0, ioaddr + IntrEnable); -@@ -737,3 +742,39 @@ - /* Restore PME enable bit */ - outl(SavedClkRun, ioaddr + ClkRun); - } -+ -+/* Function: natsemi_irq -+ * -+ * Description: Enable, Disable, or Force interrupts -+ * -+ * Arguments: struct nic *nic: NIC data structure -+ * irq_action_t action: requested action to perform -+ * -+ * Returns: void. -+ */ -+ -+static void -+natsemi_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+static struct pci_id natsemi_nics[] = { -+PCI_ROM(0x100b, 0x0020, "dp83815", "DP83815"), -+}; -+ -+struct pci_driver natsemi_driver = { -+ .type = NIC_DRIVER, -+ .name = "NATSEMI", -+ .probe = natsemi_probe, -+ .ids = natsemi_nics, -+ .id_count = sizeof(natsemi_nics)/sizeof(natsemi_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/nfs.h -=================================================================== ---- /dev/null -+++ b/netboot/nfs.h -@@ -0,0 +1,63 @@ -+#ifndef _NFS_H -+#define _NFS_H -+ -+#define SUNRPC_PORT 111 -+ -+#define PROG_PORTMAP 100000 -+#define PROG_NFS 100003 -+#define PROG_MOUNT 100005 -+ -+#define MSG_CALL 0 -+#define MSG_REPLY 1 -+ -+#define PORTMAP_GETPORT 3 -+ -+#define MOUNT_ADDENTRY 1 -+#define MOUNT_UMOUNTALL 4 -+ -+#define NFS_LOOKUP 4 -+#define NFS_READLINK 5 -+#define NFS_READ 6 -+ -+#define NFS_FHSIZE 32 -+ -+#define NFSERR_PERM 1 -+#define NFSERR_NOENT 2 -+#define NFSERR_ACCES 13 -+#define NFSERR_ISDIR 21 -+#define NFSERR_INVAL 22 -+ -+/* Block size used for NFS read accesses. A RPC reply packet (including all -+ * headers) must fit within a single Ethernet frame to avoid fragmentation. -+ * Chosen to be a power of two, as most NFS servers are optimized for this. */ -+#define NFS_READ_SIZE 1024 -+ -+#define NFS_MAXLINKDEPTH 16 -+ -+struct rpc_t { -+ struct iphdr ip; -+ struct udphdr udp; -+ union { -+ uint8_t data[300]; /* longest RPC call must fit!!!! */ -+ struct { -+ uint32_t id; -+ uint32_t type; -+ uint32_t rpcvers; -+ uint32_t prog; -+ uint32_t vers; -+ uint32_t proc; -+ uint32_t data[1]; -+ } call; -+ struct { -+ uint32_t id; -+ uint32_t type; -+ uint32_t rstatus; -+ uint32_t verifier; -+ uint32_t v2; -+ uint32_t astatus; -+ uint32_t data[1]; -+ } reply; -+ } u; -+}; -+ -+#endif /* _NFS_H */ -Index: b/netboot/ni5010.c -=================================================================== ---- a/netboot/ni5010.c -+++ /dev/null -@@ -1,371 +0,0 @@ --/************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program --Driver for NI5010. --Code freely taken from Jan-Pascal van Best and Andreas Mohr's --Linux NI5010 driver. --***************************************************************************/ -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --/* to get some global routines like printf */ --#include "etherboot.h" --/* to get the interface to the body of the program */ --#include "nic.h" --/* to get our own prototype */ --#include "cards.h" -- --/* ni5010.h file included verbatim */ --/* -- * Racal-Interlan ni5010 Ethernet definitions -- * -- * This is an extension to the Linux operating system, and is covered by the -- * same Gnu Public License that covers that work. -- * -- * copyrights (c) 1996 by Jan-Pascal van Best (jvbest@wi.leidenuniv.nl) -- * -- * I have done a look in the following sources: -- * crynwr-packet-driver by Russ Nelson -- */ -- --#define NI5010_BUFSIZE 2048 /* number of bytes in a buffer */ -- --#define NI5010_MAGICVAL0 0x00 /* magic-values for ni5010 card */ --#define NI5010_MAGICVAL1 0x55 --#define NI5010_MAGICVAL2 0xAA -- --#define SA_ADDR0 0x02 --#define SA_ADDR1 0x07 --#define SA_ADDR2 0x01 -- --/* The number of low I/O ports used by the ni5010 ethercard. */ --#define NI5010_IO_EXTENT 32 -- --#define PRINTK(x) if (NI5010_DEBUG) printk x --#define PRINTK2(x) if (NI5010_DEBUG>=2) printk x --#define PRINTK3(x) if (NI5010_DEBUG>=3) printk x -- --/* The various IE command registers */ --#define EDLC_XSTAT (ioaddr + 0x00) /* EDLC transmit csr */ --#define EDLC_XCLR (ioaddr + 0x00) /* EDLC transmit "Clear IRQ" */ --#define EDLC_XMASK (ioaddr + 0x01) /* EDLC transmit "IRQ Masks" */ --#define EDLC_RSTAT (ioaddr + 0x02) /* EDLC receive csr */ --#define EDLC_RCLR (ioaddr + 0x02) /* EDLC receive "Clear IRQ" */ --#define EDLC_RMASK (ioaddr + 0x03) /* EDLC receive "IRQ Masks" */ --#define EDLC_XMODE (ioaddr + 0x04) /* EDLC transmit Mode */ --#define EDLC_RMODE (ioaddr + 0x05) /* EDLC receive Mode */ --#define EDLC_RESET (ioaddr + 0x06) /* EDLC RESET register */ --#define EDLC_TDR1 (ioaddr + 0x07) /* "Time Domain Reflectometry" reg1 */ --#define EDLC_ADDR (ioaddr + 0x08) /* EDLC station address, 6 bytes */ -- /* 0x0E doesn't exist for r/w */ --#define EDLC_TDR2 (ioaddr + 0x0f) /* "Time Domain Reflectometry" reg2 */ --#define IE_GP (ioaddr + 0x10) /* GP pointer (word register) */ -- /* 0x11 is 2nd byte of GP Pointer */ --#define IE_RCNT (ioaddr + 0x10) /* Count of bytes in rcv'd packet */ -- /* 0x11 is 2nd byte of "Byte Count" */ --#define IE_MMODE (ioaddr + 0x12) /* Memory Mode register */ --#define IE_DMA_RST (ioaddr + 0x13) /* IE DMA Reset. write only */ --#define IE_ISTAT (ioaddr + 0x13) /* IE Interrupt Status. read only */ --#define IE_RBUF (ioaddr + 0x14) /* IE Receive Buffer port */ --#define IE_XBUF (ioaddr + 0x15) /* IE Transmit Buffer port */ --#define IE_SAPROM (ioaddr + 0x16) /* window on station addr prom */ --#define IE_RESET (ioaddr + 0x17) /* any write causes Board Reset */ -- --/* bits in EDLC_XSTAT, interrupt clear on write, status when read */ --#define XS_TPOK 0x80 /* transmit packet successful */ --#define XS_CS 0x40 /* carrier sense */ --#define XS_RCVD 0x20 /* transmitted packet received */ --#define XS_SHORT 0x10 /* transmission media is shorted */ --#define XS_UFLW 0x08 /* underflow. iff failed board */ --#define XS_COLL 0x04 /* collision occurred */ --#define XS_16COLL 0x02 /* 16th collision occurred */ --#define XS_PERR 0x01 /* parity error */ -- --#define XS_CLR_UFLW 0x08 /* clear underflow */ --#define XS_CLR_COLL 0x04 /* clear collision */ --#define XS_CLR_16COLL 0x02 /* clear 16th collision */ --#define XS_CLR_PERR 0x01 /* clear parity error */ -- --/* bits in EDLC_XMASK, mask/enable transmit interrupts. register is r/w */ --#define XM_TPOK 0x80 /* =1 to enable Xmt Pkt OK interrupts */ --#define XM_RCVD 0x20 /* =1 to enable Xmt Pkt Rcvd ints */ --#define XM_UFLW 0x08 /* =1 to enable Xmt Underflow ints */ --#define XM_COLL 0x04 /* =1 to enable Xmt Collision ints */ --#define XM_COLL16 0x02 /* =1 to enable Xmt 16th Coll ints */ --#define XM_PERR 0x01 /* =1 to enable Xmt Parity Error ints */ -- /* note: always clear this bit */ --#define XM_ALL (XM_TPOK | XM_RCVD | XM_UFLW | XM_COLL | XM_COLL16) -- --/* bits in EDLC_RSTAT, interrupt clear on write, status when read */ --#define RS_PKT_OK 0x80 /* received good packet */ --#define RS_RST_PKT 0x10 /* RESET packet received */ --#define RS_RUNT 0x08 /* Runt Pkt rcvd. Len < 64 Bytes */ --#define RS_ALIGN 0x04 /* Alignment error. not 8 bit aligned */ --#define RS_CRC_ERR 0x02 /* Bad CRC on rcvd pkt */ --#define RS_OFLW 0x01 /* overflow for rcv FIFO */ --#define RS_VALID_BITS ( RS_PKT_OK | RS_RST_PKT | RS_RUNT | RS_ALIGN | RS_CRC_ERR | RS_OFLW ) -- /* all valid RSTAT bits */ -- --#define RS_CLR_PKT_OK 0x80 /* clear rcvd packet interrupt */ --#define RS_CLR_RST_PKT 0x10 /* clear RESET packet received */ --#define RS_CLR_RUNT 0x08 /* clear Runt Pckt received */ --#define RS_CLR_ALIGN 0x04 /* clear Alignment error */ --#define RS_CLR_CRC_ERR 0x02 /* clear CRC error */ --#define RS_CLR_OFLW 0x01 /* clear rcv FIFO Overflow */ -- --/* bits in EDLC_RMASK, mask/enable receive interrupts. register is r/w */ --#define RM_PKT_OK 0x80 /* =1 to enable rcvd good packet ints */ --#define RM_RST_PKT 0x10 /* =1 to enable RESET packet ints */ --#define RM_RUNT 0x08 /* =1 to enable Runt Pkt rcvd ints */ --#define RM_ALIGN 0x04 /* =1 to enable Alignment error ints */ --#define RM_CRC_ERR 0x02 /* =1 to enable Bad CRC error ints */ --#define RM_OFLW 0x01 /* =1 to enable overflow error ints */ -- --/* bits in EDLC_RMODE, set Receive Packet mode. register is r/w */ --#define RMD_TEST 0x80 /* =1 for Chip testing. normally 0 */ --#define RMD_ADD_SIZ 0x10 /* =1 5-byte addr match. normally 0 */ --#define RMD_EN_RUNT 0x08 /* =1 enable runt rcv. normally 0 */ --#define RMD_EN_RST 0x04 /* =1 to rcv RESET pkt. normally 0 */ -- --#define RMD_PROMISC 0x03 /* receive *all* packets. unusual */ --#define RMD_MULTICAST 0x02 /* receive multicasts too. unusual */ --#define RMD_BROADCAST 0x01 /* receive broadcasts & normal. usual */ --#define RMD_NO_PACKETS 0x00 /* don't receive any packets. unusual */ -- --/* bits in EDLC_XMODE, set Transmit Packet mode. register is r/w */ --#define XMD_COLL_CNT 0xf0 /* coll's since success. read-only */ --#define XMD_IG_PAR 0x08 /* =1 to ignore parity. ALWAYS set */ --#define XMD_T_MODE 0x04 /* =1 to power xcvr. ALWAYS set this */ --#define XMD_LBC 0x02 /* =1 for loopback. normally set */ --#define XMD_DIS_C 0x01 /* =1 disables contention. normally 0 */ -- --/* bits in EDLC_RESET, write only */ --#define RS_RESET 0x80 /* =1 to hold EDLC in reset state */ -- --/* bits in IE_MMODE, write only */ --#define MM_EN_DMA 0x80 /* =1 begin DMA xfer, Cplt clrs it */ --#define MM_EN_RCV 0x40 /* =1 allows Pkt rcv. clr'd by rcv */ --#define MM_EN_XMT 0x20 /* =1 begin Xmt pkt. Cplt clrs it */ --#define MM_BUS_PAGE 0x18 /* =00 ALWAYS. Used when MUX=1 */ --#define MM_NET_PAGE 0x06 /* =00 ALWAYS. Used when MUX=0 */ --#define MM_MUX 0x01 /* =1 means Rcv Buff on system bus */ -- /* =0 means Xmt Buff on system bus */ -- --/* bits in IE_ISTAT, read only */ --#define IS_TDIAG 0x80 /* =1 if Diagnostic problem */ --#define IS_EN_RCV 0x20 /* =1 until frame is rcv'd cplt */ --#define IS_EN_XMT 0x10 /* =1 until frame is xmt'd cplt */ --#define IS_EN_DMA 0x08 /* =1 until DMA is cplt or aborted */ --#define IS_DMA_INT 0x04 /* =0 iff DMA done interrupt. */ --#define IS_R_INT 0x02 /* =0 iff unmasked Rcv interrupt */ --#define IS_X_INT 0x01 /* =0 iff unmasked Xmt interrupt */ -- --/* NIC specific static variables go here */ -- --static unsigned short ioaddr = 0; --static unsigned int bufsize_rcv = 0; -- --#if 0 --static void show_registers(void) --{ -- printf("XSTAT %hhX ", inb(EDLC_XSTAT)); -- printf("XMASK %hhX ", inb(EDLC_XMASK)); -- printf("RSTAT %hhX ", inb(EDLC_RSTAT)); -- printf("RMASK %hhX ", inb(EDLC_RMASK)); -- printf("RMODE %hhX ", inb(EDLC_RMODE)); -- printf("XMODE %hhX ", inb(EDLC_XMODE)); -- printf("ISTAT %hhX\n", inb(IE_ISTAT)); --} --#endif -- --static void reset_receiver(void) --{ -- outw(0, IE_GP); /* Receive packet at start of buffer */ -- outb(RS_VALID_BITS, EDLC_RCLR); /* Clear all pending Rcv interrupts */ -- outb(MM_EN_RCV, IE_MMODE); /* Enable rcv */ --} -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void ni5010_reset(struct nic *nic) --{ -- int i; -- -- /* Reset the hardware here. Don't forget to set the station address. */ -- outb(RS_RESET, EDLC_RESET); /* Hold up EDLC_RESET while configing board */ -- outb(0, IE_RESET); /* Hardware reset of ni5010 board */ -- outb(0, EDLC_XMASK); /* Disable all Xmt interrupts */ -- outb(0, EDLC_RMASK); /* Disable all Rcv interrupt */ -- outb(0xFF, EDLC_XCLR); /* Clear all pending Xmt interrupts */ -- outb(0xFF, EDLC_RCLR); /* Clear all pending Rcv interrupts */ -- outb(XMD_LBC, EDLC_XMODE); /* Only loopback xmits */ -- /* Set the station address */ -- for(i = 0; i < ETH_ALEN; i++) -- outb(nic->node_addr[i], EDLC_ADDR + i); -- outb(XMD_IG_PAR | XMD_T_MODE | XMD_LBC, EDLC_XMODE); -- /* Normal packet xmit mode */ -- outb(RMD_BROADCAST, EDLC_RMODE); -- /* Receive broadcast and normal packets */ -- reset_receiver(); -- outb(0x00, EDLC_RESET); /* Un-reset the ni5010 */ --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int ni5010_poll(struct nic *nic) --{ -- int rcv_stat; -- -- if (((rcv_stat = inb(EDLC_RSTAT)) & RS_VALID_BITS) != RS_PKT_OK) { -- outb(rcv_stat, EDLC_RSTAT); /* Clear the status */ -- return (0); -- } -- outb(rcv_stat, EDLC_RCLR); /* Clear the status */ -- nic->packetlen = inw(IE_RCNT); -- /* Read packet into buffer */ -- outb(MM_MUX, IE_MMODE); /* Rcv buffer to system bus */ -- outw(0, IE_GP); /* Seek to beginning of packet */ -- insb(IE_RBUF, nic->packet, nic->packetlen); -- return (1); --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void ni5010_transmit(struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- unsigned int len; -- int buf_offs, xmt_stat; -- unsigned long time; -- -- len = s + ETH_HLEN; -- if (len < ETH_ZLEN) -- len = ETH_ZLEN; -- buf_offs = NI5010_BUFSIZE - len; -- outb(0, EDLC_RMASK); /* Mask all receive interrupts */ -- outb(0, IE_MMODE); /* Put Xmit buffer on system bus */ -- outb(0xFF, EDLC_RCLR); /* Clear out pending rcv interrupts */ -- outw(buf_offs, IE_GP); /* Point GP at start of packet */ -- outsb(IE_XBUF, d, ETH_ALEN); /* Put dst in buffer */ -- outsb(IE_XBUF, nic->node_addr, ETH_ALEN);/* Put src in buffer */ -- outb(t >> 8, IE_XBUF); -- outb(t, IE_XBUF); -- outsb(IE_XBUF, p, s); /* Put data in buffer */ -- while (s++ < ETH_ZLEN - ETH_HLEN) /* Pad to min size */ -- outb(0, IE_XBUF); -- outw(buf_offs, IE_GP); /* Rewrite where packet starts */ -- /* should work without that outb() (Crynwr used it) */ -- /*outb(MM_MUX, IE_MMODE);*/ -- /* Xmt buffer to EDLC bus */ -- outb(MM_EN_XMT | MM_MUX, IE_MMODE); /* Begin transmission */ -- /* wait for transmit complete */ -- while (((xmt_stat = inb(IE_ISTAT)) & IS_EN_XMT) != 0) -- ; -- reset_receiver(); /* Immediately switch to receive */ --} -- --/************************************************************************** --DISABLE - Turn off ethernet interface --***************************************************************************/ --static void ni5010_disable(struct nic *nic) --{ -- outb(0, IE_MMODE); -- outb(RS_RESET, EDLC_RESET); --} -- --static inline int rd_port(void) --{ -- inb(IE_RBUF); -- return inb(IE_SAPROM); --} -- --static int ni5010_probe1(struct nic *nic) --{ -- int i, boguscount = 40, data; -- -- /* The tests are from the Linux NI5010 driver -- I don't understand it all, but if it works for them... */ -- if (inb(ioaddr) == 0xFF) -- return (0); -- while ((rd_port() & rd_port() & rd_port() -- & rd_port() & rd_port() & rd_port()) != 0xFF) -- { -- if (boguscount-- <= 0) -- return (0); -- } -- for (i = 0; i < 32; i++) -- if ((data = rd_port()) != 0xFF) -- break; -- if (data == 0xFF) -- return (0); -- if (data == SA_ADDR0 && rd_port() == SA_ADDR1 && rd_port() == SA_ADDR2) { -- for (i = 0; i < 4; i++) -- rd_port(); -- if (rd_port() != NI5010_MAGICVAL1 || rd_port() != NI5010_MAGICVAL2) -- return (0); -- } else -- return (0); -- for (i = 0; i < ETH_ALEN; i++) { -- outw(i, IE_GP); -- nic->node_addr[i] = inb(IE_SAPROM); -- } -- printf("\nNI5010 ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); --/* get the size of the onboard receive buffer -- * higher addresses than bufsize are wrapped into real buffer -- * i.e. data for offs. 0x801 is written to 0x1 with a 2K onboard buffer -- */ -- if (bufsize_rcv == 0) { -- outb(1, IE_MMODE); /* Put Rcv buffer on system bus */ -- outw(0, IE_GP); /* Point GP at start of packet */ -- outb(0, IE_RBUF); /* set buffer byte 0 to 0 */ -- for (i = 1; i < 0xFF; i++) { -- outw(i << 8, IE_GP); /* Point GP at packet size to be tested */ -- outb(i, IE_RBUF); -- outw(0x0, IE_GP); /* Point GP at start of packet */ -- data = inb(IE_RBUF); -- if (data == i) break; -- } -- bufsize_rcv = i << 8; -- outw(0, IE_GP); /* Point GP at start of packet */ -- outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ -- } -- printf("Bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); -- return (1); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ --struct nic *ni5010_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- static unsigned short io_addrs[] = { -- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3a0, 0 }; -- unsigned short *p; -- -- /* if probe_addrs is 0, then use list above */ -- if (probe_addrs == 0 || *probe_addrs == 0) -- probe_addrs = io_addrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { -- if (ni5010_probe1(nic)) -- break; -- } -- if (ioaddr == 0) -- return (0); -- ni5010_reset(nic); -- /* point to NIC specific routines */ -- nic->reset = ni5010_reset; -- nic->poll = ni5010_poll; -- nic->transmit = ni5010_transmit; -- nic->disable = ni5010_disable; -- return (nic); --} -Index: b/netboot/nic.c -=================================================================== ---- /dev/null -+++ b/netboot/nic.c -@@ -0,0 +1,1198 @@ -+/************************************************************************** -+Etherboot - Network Bootstrap Program -+ -+Literature dealing with the network protocols: -+ ARP - RFC826 -+ RARP - RFC903 -+ IP - RFC791 -+ UDP - RFC768 -+ BOOTP - RFC951, RFC2132 (vendor extensions) -+ DHCP - RFC2131, RFC2132 (options) -+ TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize) -+ RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper) -+ NFS - RFC1094, RFC1813 (v3, useful for clarifications, not implemented) -+ IGMP - RFC1112, RFC2113, RFC2365, RFC2236, RFC3171 -+ -+**************************************************************************/ -+#include "etherboot.h" -+#include "grub.h" -+#include "nic.h" -+#include "elf.h" /* FOR EM_CURRENT */ -+#include "bootp.h" -+#include "if_arp.h" -+#include "tftp.h" -+#include "timer.h" -+#include "ip.h" -+#include "udp.h" -+ -+/* Currently no other module uses rom, but it is available */ -+struct rom_info rom; -+struct arptable_t arptable[MAX_ARP]; -+#if MULTICAST_LEVEL2 -+unsigned long last_igmpv1 = 0; -+struct igmptable_t igmptable[MAX_IGMP]; -+#endif -+static unsigned long netmask; -+/* Used by nfs.c */ -+char *hostname = ""; -+int hostnamelen = 0; -+static uint32_t xid; -+static unsigned char *end_of_rfc1533 = NULL; -+static const unsigned char broadcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; -+static const in_addr zeroIP = { 0L }; -+static char rfc1533_venddata[MAX_RFC1533_VENDLEN]; -+static unsigned char rfc1533_cookie[4] = { RFC1533_COOKIE }; -+static unsigned char rfc1533_cookie_bootp[5] = { RFC1533_COOKIE, RFC1533_END }; -+static unsigned char rfc1533_cookie_dhcp[] = { RFC1533_COOKIE }; -+static int dhcp_reply; -+static in_addr dhcp_server = { 0L }; -+static in_addr dhcp_addr = { 0L }; -+ -+static const unsigned char dhcpdiscover[] = { -+ RFC2132_MSG_TYPE, 1, DHCPDISCOVER, -+ RFC2132_MAX_SIZE, 2, /* request as much as we can */ -+ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, -+ /* Vendor class identifier */ -+ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', -+ RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, -+ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, RFC1533_END -+}; -+static const unsigned char dhcprequest [] = { -+ RFC2132_MSG_TYPE,1,DHCPREQUEST, -+ RFC2132_SRV_ID,4,0,0,0,0, -+ RFC2132_REQ_ADDR,4,0,0,0,0, -+ RFC2132_MAX_SIZE,2, /* request as much as we can */ -+ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, -+ /* Vendor class identifier */ -+ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', -+ RFC2132_PARAM_LIST, -+ /* 4 standard + 2 vendortags */ -+ 4 + 2, -+ /* Standard parameters */ -+ RFC1533_NETMASK, RFC1533_GATEWAY, -+ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, -+ /* Etherboot vendortags */ -+ RFC1533_VENDOR_MAGIC, -+ RFC1533_VENDOR_CONFIGFILE, -+ RFC1533_END -+}; -+ -+/* See nic.h */ -+int user_abort = 0; -+int network_ready = 0; -+ -+#ifdef REQUIRE_VCI_ETHERBOOT -+int vci_etherboot; -+#endif -+ -+static int dummy(void *unused __unused) -+{ -+ return (0); -+} -+ -+/* Careful. We need an aligned buffer to avoid problems on machines -+ * that care about alignment. To trivally align the ethernet data -+ * (the ip hdr and arp requests) we offset the packet by 2 bytes. -+ * leaving the ethernet data 16 byte aligned. Beyond this -+ * we use memmove but this makes the common cast simple and fast. -+ */ -+static char packet[ETH_FRAME_LEN + ETH_DATA_ALIGN] __aligned; -+ -+struct nic nic = -+{ -+ { -+ 0, /* dev.disable */ -+ { -+ 0, -+ 0, -+ PCI_BUS_TYPE, -+ }, /* dev.devid */ -+ 0, /* index */ -+ 0, /* type */ -+ PROBE_FIRST, /* how_pobe */ -+ PROBE_NONE, /* to_probe */ -+ 0, /* failsafe */ -+ 0, /* type_index */ -+ {}, /* state */ -+ }, -+ (int (*)(struct nic *, int))dummy, /* poll */ -+ (void (*)(struct nic *, const char *, -+ unsigned int, unsigned int, -+ const char *))dummy, /* transmit */ -+ (void (*)(struct nic *, irq_action_t))dummy, /* irq */ -+ 0, /* flags */ -+ &rom, /* rom_info */ -+ arptable[ARP_CLIENT].node, /* node_addr */ -+ packet + ETH_DATA_ALIGN, /* packet */ -+ 0, /* packetlen */ -+ 0, /* ioaddr */ -+ 0, /* irqno */ -+ NULL, /* priv_data */ -+}; -+ -+ -+ -+int grub_eth_probe(void) -+{ -+ static int probed = 0; -+ struct dev *dev; -+ -+ EnterFunction("grub_eth_probe"); -+ -+ if (probed) -+ return 1; -+ -+ network_ready = 0; -+ grub_memset((char *)arptable, 0, MAX_ARP * sizeof(struct arptable_t)); -+ dev = &nic.dev; -+ dev->how_probe = -1; -+ dev->type = NIC_DRIVER; -+ dev->failsafe = 1; -+ rom = *((struct rom_info *)ROM_INFO_LOCATION); -+ -+ probed = (eth_probe(dev) == PROBE_WORKED); -+ -+ LeaveFunction("grub_eth_probe"); -+ return probed; -+} -+ -+int eth_probe(struct dev *dev) -+{ -+ return probe(dev); -+} -+ -+int eth_poll(int retrieve) -+{ -+ return ((*nic.poll)(&nic, retrieve)); -+} -+ -+void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p) -+{ -+ (*nic.transmit)(&nic, d, t, s, p); -+ if (t == IP) twiddle(); -+} -+ -+void eth_disable(void) -+{ -+#ifdef MULTICAST_LEVEL2 -+ int i; -+ for(i = 0; i < MAX_IGMP; i++) { -+ leave_group(i); -+ } -+#endif -+ disable(&nic.dev); -+} -+ -+void eth_irq (irq_action_t action) -+{ -+ (*nic.irq)(&nic,action); -+} -+ -+/************************************************************************** -+IPCHKSUM - Checksum IP Header -+**************************************************************************/ -+uint16_t ipchksum(const void *data, unsigned long length) -+{ -+ unsigned long sum; -+ unsigned long i; -+ const uint8_t *ptr; -+ -+ /* In the most straight forward way possible, -+ * compute an ip style checksum. -+ */ -+ sum = 0; -+ ptr = data; -+ for(i = 0; i < length; i++) { -+ unsigned long value; -+ value = ptr[i]; -+ if (i & 1) { -+ value <<= 8; -+ } -+ /* Add the new value */ -+ sum += value; -+ /* Wrap around the carry */ -+ if (sum > 0xFFFF) { -+ sum = (sum + (sum >> 16)) & 0xFFFF; -+ } -+ } -+ return (~cpu_to_le16(sum)) & 0xFFFF; -+} -+ -+uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new) -+{ -+ unsigned long checksum; -+ sum = ~sum & 0xFFFF; -+ new = ~new & 0xFFFF; -+ if (offset & 1) { -+ /* byte swap the sum if it came from an odd offset -+ * since the computation is endian independant this -+ * works. -+ */ -+ new = bswap_16(new); -+ } -+ checksum = sum + new; -+ if (checksum > 0xFFFF) { -+ checksum -= 0xFFFF; -+ } -+ return (~checksum) & 0xFFFF; -+} -+ -+/************************************************************************** -+DEFAULT_NETMASK - Return default netmask for IP address -+**************************************************************************/ -+static inline unsigned long default_netmask(void) -+{ -+ int net = ntohl(arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; -+ if (net <= 127) -+ return(htonl(0xff000000)); -+ else if (net < 192) -+ return(htonl(0xffff0000)); -+ else -+ return(htonl(0xffffff00)); -+} -+ -+/************************************************************************** -+IP_TRANSMIT - Send an IP datagram -+**************************************************************************/ -+static int await_arp(int ival, void *ptr, -+ unsigned short ptype, struct iphdr *ip __unused, struct udphdr *udp __unused) -+{ -+ struct arprequest *arpreply; -+ if (ptype != ARP) -+ return 0; -+ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) -+ return 0; -+ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; -+ -+ if (arpreply->opcode != htons(ARP_REPLY)) -+ return 0; -+ if (memcmp(arpreply->sipaddr, ptr, sizeof(in_addr)) != 0) -+ return 0; -+ memcpy(arptable[ival].node, arpreply->shwaddr, ETH_ALEN); -+ return 1; -+} -+ -+int ip_transmit(int len, const void *buf) -+{ -+ unsigned long destip; -+ struct iphdr *ip; -+ struct arprequest arpreq; -+ int arpentry, i; -+ int retry; -+ -+ ip = (struct iphdr *)buf; -+ destip = ip->dest.s_addr; -+ if (destip == IP_BROADCAST) { -+ eth_transmit(broadcast, IP, len, buf); -+#ifdef MULTICAST_LEVEL1 -+ } else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { -+ unsigned char multicast[6]; -+ unsigned long hdestip; -+ hdestip = ntohl(destip); -+ multicast[0] = 0x01; -+ multicast[1] = 0x00; -+ multicast[2] = 0x5e; -+ multicast[3] = (hdestip >> 16) & 0x7; -+ multicast[4] = (hdestip >> 8) & 0xff; -+ multicast[5] = hdestip & 0xff; -+ eth_transmit(multicast, IP, len, buf); -+#endif -+ } else { -+ if (((destip & netmask) != -+ (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) && -+ arptable[ARP_GATEWAY].ipaddr.s_addr) -+ destip = arptable[ARP_GATEWAY].ipaddr.s_addr; -+ for(arpentry = 0; arpentryverhdrlen = 0x45; -+ ip->verhdrlen += (option_len/4); -+ ip->service = 0; -+ ip->len = htons(len); -+ ip->ident = 0; -+ ip->frags = 0; /* Should we set don't fragment? */ -+ ip->ttl = ttl; -+ ip->protocol = protocol; -+ ip->chksum = 0; -+ ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; -+ ip->dest.s_addr = destip; -+ ip->chksum = ipchksum(buf, sizeof(struct iphdr) + option_len); -+} -+ -+static uint16_t udpchksum(struct iphdr *ip, struct udphdr *udp) -+{ -+ struct udp_pseudo_hdr pseudo; -+ uint16_t checksum; -+ -+ /* Compute the pseudo header */ -+ pseudo.src.s_addr = ip->src.s_addr; -+ pseudo.dest.s_addr = ip->dest.s_addr; -+ pseudo.unused = 0; -+ pseudo.protocol = IP_UDP; -+ pseudo.len = udp->len; -+ -+ /* Sum the pseudo header */ -+ checksum = ipchksum(&pseudo, 12); -+ -+ /* Sum the rest of the udp packet */ -+ checksum = add_ipchksums(12, checksum, ipchksum(udp, ntohs(udp->len))); -+ return checksum; -+} -+ -+ -+void build_udp_hdr(unsigned long destip, -+ unsigned int srcsock, unsigned int destsock, int ttl, -+ int len, const void *buf) -+{ -+ struct iphdr *ip; -+ struct udphdr *udp; -+ ip = (struct iphdr *)buf; -+ build_ip_hdr(destip, ttl, IP_UDP, 0, len, buf); -+ udp = (struct udphdr *)((char *)buf + sizeof(struct iphdr)); -+ udp->src = htons(srcsock); -+ udp->dest = htons(destsock); -+ udp->len = htons(len - sizeof(struct iphdr)); -+ udp->chksum = 0; -+ if ((udp->chksum = udpchksum(ip, udp)) == 0) -+ udp->chksum = 0xffff; -+} -+ -+ -+/************************************************************************** -+UDP_TRANSMIT - Send an UDP datagram -+**************************************************************************/ -+int udp_transmit(unsigned long destip, unsigned int srcsock, -+ unsigned int destsock, int len, const void *buf) -+{ -+ build_udp_hdr(destip, srcsock, destsock, 60, len, buf); -+ return ip_transmit(len, buf); -+} -+ -+/************************************************************************** -+QDRAIN - clear the nic's receive queue -+**************************************************************************/ -+static int await_qdrain(int ival __unused, void *ptr __unused, -+ unsigned short ptype __unused, -+ struct iphdr *ip __unused, struct udphdr *udp __unused) -+{ -+ return 0; -+} -+ -+void rx_qdrain(void) -+{ -+ /* Clear out the Rx queue first. It contains nothing of interest, -+ * except possibly ARP requests from the DHCP/TFTP server. We use -+ * polling throughout Etherboot, so some time may have passed since we -+ * last polled the receive queue, which may now be filled with -+ * broadcast packets. This will cause the reply to the packets we are -+ * about to send to be lost immediately. Not very clever. */ -+ await_reply(await_qdrain, 0, NULL, 0); -+} -+ -+/** -+ * rarp -+ * -+ * Get IP address by rarp. Just copy from etherboot -+ **/ -+static int await_rarp(int ival, void *ptr, unsigned short ptype, -+ struct iphdr *ip, struct udphdr *udp) -+{ -+ struct arprequest *arpreply; -+ if (ptype != RARP) -+ return 0; -+ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) -+ return 0; -+ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; -+ if (arpreply->opcode != htons(RARP_REPLY)) -+ return 0; -+ if (memcmp(arpreply->thwaddr, ptr, ETH_ALEN) == 0){ -+ memcpy(arptable[ARP_SERVER].node, arpreply->shwaddr, ETH_ALEN); -+ memcpy(&arptable[ARP_SERVER].ipaddr, arpreply->sipaddr, sizeof(in_addr)); -+ memcpy(&arptable[ARP_CLIENT].ipaddr, arpreply->tipaddr, sizeof(in_addr)); -+ return 1; -+ } -+ return 0; -+} -+ -+int rarp(void) -+{ -+ int retry; -+ -+ /* arp and rarp requests share the same packet structure. */ -+ struct arprequest rarpreq; -+ -+ if(!grub_eth_probe()) -+ return 0; -+ network_ready = 0; -+ -+ memset(&rarpreq, 0, sizeof(rarpreq)); -+ -+ rarpreq.hwtype = htons(1); -+ rarpreq.protocol = htons(IP); -+ rarpreq.hwlen = ETH_ALEN; -+ rarpreq.protolen = 4; -+ rarpreq.opcode = htons(RARP_REQUEST); -+ memcpy(&rarpreq.shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); -+ /* sipaddr is already zeroed out */ -+ memcpy(&rarpreq.thwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); -+ /* tipaddr is already zeroed out */ -+ -+ for (retry = 0; retry < MAX_ARP_RETRIES; ++retry) { -+ long timeout; -+ eth_transmit(broadcast, RARP, sizeof(rarpreq), &rarpreq); -+ -+ timeout = rfc2131_sleep_interval(TIMEOUT, retry); -+ if (await_reply(await_rarp, 0, rarpreq.shwaddr, timeout)) -+ break; -+ if (user_abort) -+ return 0; -+ } -+ -+ if (retry < MAX_ARP_RETRIES) { -+ network_ready = 1; -+ return (1); -+ } -+ return (0); -+} -+ -+/** -+ * bootp -+ * -+ * Get IP address by bootp, segregate from bootp in etherboot. -+ **/ -+static int await_bootp(int ival __unused, void *ptr __unused, -+ unsigned short ptype __unused, struct iphdr *ip __unused, -+ struct udphdr *udp) -+{ -+ struct bootp_t *bootpreply; -+ int len; /* Length of vendor */ -+ -+ if (!udp) { -+ return 0; -+ } -+ bootpreply = (struct bootp_t *) -+ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; -+ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + -+ sizeof(struct udphdr) + sizeof(struct bootp_t) - BOOTP_VENDOR_LEN); -+ if (len < 0) { -+ return 0; -+ } -+ if (udp->dest != htons(BOOTP_CLIENT)) -+ return 0; -+ if (bootpreply->bp_op != BOOTP_REPLY) -+ return 0; -+ if (bootpreply->bp_xid != xid) -+ return 0; -+ if (memcmp((char *)&bootpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) -+ return 0; -+ if ((memcmp(broadcast, bootpreply->bp_hwaddr, ETH_ALEN) != 0) && -+ (memcmp(arptable[ARP_CLIENT].node, bootpreply->bp_hwaddr, ETH_ALEN) != 0)) { -+ return 0; -+ } -+ arptable[ARP_CLIENT].ipaddr.s_addr = bootpreply->bp_yiaddr.s_addr; -+ netmask = default_netmask(); -+ arptable[ARP_SERVER].ipaddr.s_addr = bootpreply->bp_siaddr.s_addr; -+ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ -+ arptable[ARP_GATEWAY].ipaddr.s_addr = bootpreply->bp_giaddr.s_addr; -+ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ -+ /* We don't care bootpreply->bp_file, it must be 'pxegrub':-) */ -+ memcpy((char *)rfc1533_venddata, (char *)(bootpreply->bp_vend), len); -+ decode_rfc1533(rfc1533_venddata, 0, len, 1); -+ return(1); -+} -+ -+int bootp(void) -+{ -+ int retry; -+ struct bootpip_t ip; -+ unsigned long starttime; -+ -+ EnterFunction("bootp"); -+ -+ if(!grub_eth_probe()) -+ return 0; -+ network_ready = 0; -+ -+ memset(&ip, 0, sizeof(struct bootpip_t)); -+ ip.bp.bp_op = BOOTP_REQUEST; -+ ip.bp.bp_htype = 1; -+ ip.bp.bp_hlen = ETH_ALEN; -+ starttime = currticks(); -+ /* Use lower 32 bits of node address, more likely to be -+ distinct than the time since booting */ -+ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); -+ ip.bp.bp_xid = xid += htonl(starttime); -+ /* bp_secs defaults to zero */ -+ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); -+ memcpy(ip.bp.bp_vend, rfc1533_cookie_bootp, sizeof(rfc1533_cookie_bootp)); /* request RFC-style options */ -+ -+ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { -+ long timeout; -+ -+ rx_qdrain(); -+ -+ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, -+ sizeof(struct bootpip_t), &ip); -+ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); -+ if (await_reply(await_bootp, 0, NULL, timeout)){ -+ network_ready = 1; -+ return(1); -+ } -+ if (user_abort) -+ return 0; -+ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); -+ } -+ return(0); -+} -+ -+/** -+ * dhcp -+ * -+ * Get IP address by dhcp, segregate from bootp in etherboot. -+ **/ -+static int await_dhcp(int ival __unused, void *ptr __unused, -+ unsigned short ptype __unused, struct iphdr *ip __unused, -+ struct udphdr *udp) -+{ -+ struct dhcp_t *dhcpreply; -+ int len; -+ -+ if (!udp) { -+ return 0; -+ } -+ dhcpreply = (struct dhcp_t *) -+ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; -+ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + -+ sizeof(struct udphdr) + sizeof(struct dhcp_t) - DHCP_OPT_LEN); -+ if (len < 0){ -+ return 0; -+ } -+ if (udp->dest != htons(BOOTP_CLIENT)) -+ return 0; -+ if (dhcpreply->bp_op != BOOTP_REPLY) -+ return 0; -+ if (dhcpreply->bp_xid != xid) -+ return 0; -+ if (memcmp((char *)&dhcpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) -+ return 0; -+ if ((memcmp(broadcast, dhcpreply->bp_hwaddr, ETH_ALEN) != 0) && -+ (memcmp(arptable[ARP_CLIENT].node, dhcpreply->bp_hwaddr, ETH_ALEN) != 0)) { -+ return 0; -+ } -+ arptable[ARP_CLIENT].ipaddr.s_addr = dhcpreply->bp_yiaddr.s_addr; -+ dhcp_addr.s_addr = dhcpreply->bp_yiaddr.s_addr; -+ netmask = default_netmask(); -+ arptable[ARP_SERVER].ipaddr.s_addr = dhcpreply->bp_siaddr.s_addr; -+ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ -+ arptable[ARP_GATEWAY].ipaddr.s_addr = dhcpreply->bp_giaddr.s_addr; -+ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ -+ /* We don't care bootpreply->bp_file. It must be 'pxegrub' */ -+ memcpy((char *)rfc1533_venddata, (char *)(dhcpreply->bp_vend), len); -+ decode_rfc1533(rfc1533_venddata, 0, len, 1); -+ return(1); -+} -+ -+int dhcp(void) -+{ -+ int retry; -+ int reqretry; -+ struct dhcpip_t ip; -+ unsigned long starttime; -+ -+ if(!grub_eth_probe()) -+ return 0; -+ -+ network_ready = 0; -+ -+ memset(&ip, 0, sizeof(struct dhcpip_t)); -+ ip.bp.bp_op = BOOTP_REQUEST; -+ ip.bp.bp_htype = 1; -+ ip.bp.bp_hlen = ETH_ALEN; -+ starttime = currticks(); -+ /* Use lower 32 bits of node address, more likely to be -+ distinct than the time since booting */ -+ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); -+ ip.bp.bp_xid = xid += htonl(starttime); -+ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); -+ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); /* request RFC-style options */ -+ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcpdiscover, sizeof dhcpdiscover); -+ -+ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { -+ long timeout; -+ -+ rx_qdrain(); -+ -+ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, -+ sizeof(struct bootpip_t), &ip); -+ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); -+ if (await_reply(await_dhcp, 0, NULL, timeout)) { -+ /* If not a DHCPOFFER then must be just a -+ BOOTP reply, be backward compatible with -+ BOOTP then. Jscott report a bug here, but I -+ don't know how it happened */ -+ if (dhcp_reply != DHCPOFFER){ -+ network_ready = 1; -+ return(1); -+ } -+ dhcp_reply = 0; -+ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); -+ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcprequest, sizeof dhcprequest); -+ /* Beware: the magic numbers 9 and 15 depend on -+ the layout of dhcprequest */ -+ memcpy(&ip.bp.bp_vend[9], &dhcp_server, sizeof(in_addr)); -+ memcpy(&ip.bp.bp_vend[15], &dhcp_addr, sizeof(in_addr)); -+ for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) { -+ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, -+ sizeof(struct bootpip_t), &ip); -+ dhcp_reply=0; -+ timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++); -+ if (await_reply(await_dhcp, 0, NULL, timeout)) -+ if (dhcp_reply == DHCPACK){ -+ network_ready = 1; -+ return(1); -+ } -+ if (user_abort) -+ return 0; -+ } -+ } -+ if (user_abort) -+ return 0; -+ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); -+ } -+ return(0); -+} -+ -+#ifdef MULTICAST_LEVEL2 -+static void send_igmp_reports(unsigned long now) -+{ -+ int i; -+ for(i = 0; i < MAX_IGMP; i++) { -+ if (igmptable[i].time && (now >= igmptable[i].time)) { -+ struct igmp_ip_t igmp; -+ igmp.router_alert[0] = 0x94; -+ igmp.router_alert[1] = 0x04; -+ igmp.router_alert[2] = 0; -+ igmp.router_alert[3] = 0; -+ build_ip_hdr(igmptable[i].group.s_addr, -+ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); -+ igmp.igmp.type = IGMPv2_REPORT; -+ if (last_igmpv1 && -+ (now < last_igmpv1 + IGMPv1_ROUTER_PRESENT_TIMEOUT)) { -+ igmp.igmp.type = IGMPv1_REPORT; -+ } -+ igmp.igmp.response_time = 0; -+ igmp.igmp.chksum = 0; -+ igmp.igmp.group.s_addr = igmptable[i].group.s_addr; -+ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp.igmp)); -+ ip_transmit(sizeof(igmp), &igmp); -+#ifdef MDEBUG -+ printf("Sent IGMP report to: %@\n", igmp.igmp.group.s_addr); -+#endif -+ /* Don't send another igmp report until asked */ -+ igmptable[i].time = 0; -+ } -+ } -+} -+ -+static void process_igmp(struct iphdr *ip, unsigned long now) -+{ -+ struct igmp *igmp; -+ int i; -+ unsigned iplen = 0; -+ if (!ip || (ip->protocol == IP_IGMP) || -+ (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) { -+ return; -+ } -+ iplen = (ip->verhdrlen & 0xf)*4; -+ igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)]; -+ if (ipchksum(igmp, ntohs(ip->len) - iplen) != 0) -+ return; -+ if ((igmp->type == IGMP_QUERY) && -+ (ip->dest.s_addr == htonl(GROUP_ALL_HOSTS))) { -+ unsigned long interval = IGMP_INTERVAL; -+ if (igmp->response_time == 0) { -+ last_igmpv1 = now; -+ } else { -+ interval = (igmp->response_time * TICKS_PER_SEC)/10; -+ } -+ -+#ifdef MDEBUG -+ printf("Received IGMP query for: %@\n", igmp->group.s_addr); -+#endif -+ for(i = 0; i < MAX_IGMP; i++) { -+ uint32_t group = igmptable[i].group.s_addr; -+ if ((group == 0) || (group == igmp->group.s_addr)) { -+ unsigned long time; -+ time = currticks() + rfc1112_sleep_interval(interval, 0); -+ if (time < igmptable[i].time) { -+ igmptable[i].time = time; -+ } -+ } -+ } -+ } -+ if (((igmp->type == IGMPv1_REPORT) || (igmp->type == IGMPv2_REPORT)) && -+ (ip->dest.s_addr == igmp->group.s_addr)) { -+#ifdef MDEBUG -+ printf("Received IGMP report for: %@\n", igmp->group.s_addr); -+#endif -+ for(i = 0; i < MAX_IGMP; i++) { -+ if ((igmptable[i].group.s_addr == igmp->group.s_addr) && -+ igmptable[i].time != 0) { -+ igmptable[i].time = 0; -+ } -+ } -+ } -+} -+ -+void leave_group(int slot) -+{ -+ /* Be very stupid and always send a leave group message if -+ * I have subscribed. Imperfect but it is standards -+ * compliant, easy and reliable to implement. -+ * -+ * The optimal group leave method is to only send leave when, -+ * we were the last host to respond to a query on this group, -+ * and igmpv1 compatibility is not enabled. -+ */ -+ if (igmptable[slot].group.s_addr) { -+ struct igmp_ip_t igmp; -+ igmp.router_alert[0] = 0x94; -+ igmp.router_alert[1] = 0x04; -+ igmp.router_alert[2] = 0; -+ igmp.router_alert[3] = 0; -+ build_ip_hdr(htonl(GROUP_ALL_HOSTS), -+ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); -+ igmp.igmp.type = IGMP_LEAVE; -+ igmp.igmp.response_time = 0; -+ igmp.igmp.chksum = 0; -+ igmp.igmp.group.s_addr = igmptable[slot].group.s_addr; -+ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp)); -+ ip_transmit(sizeof(igmp), &igmp); -+#ifdef MDEBUG -+ printf("Sent IGMP leave for: %@\n", igmp.igmp.group.s_addr); -+#endif -+ } -+ memset(&igmptable[slot], 0, sizeof(igmptable[0])); -+} -+ -+void join_group(int slot, unsigned long group) -+{ -+ /* I have already joined */ -+ if (igmptable[slot].group.s_addr == group) -+ return; -+ if (igmptable[slot].group.s_addr) { -+ leave_group(slot); -+ } -+ /* Only join a group if we are given a multicast ip, this way -+ * code can be given a non-multicast (broadcast or unicast ip) -+ * and still work... -+ */ -+ if ((group & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { -+ igmptable[slot].group.s_addr = group; -+ igmptable[slot].time = currticks(); -+ } -+} -+#else -+#define send_igmp_reports(now); -+#define process_igmp(ip, now) -+#endif -+ -+/************************************************************************** -+AWAIT_REPLY - Wait until we get a response for our request -+************f**************************************************************/ -+int await_reply(reply_t reply, int ival, void *ptr, long timeout) -+{ -+ unsigned long time, now; -+ struct iphdr *ip; -+ unsigned iplen = 0; -+ struct udphdr *udp; -+ unsigned short ptype; -+ int result; -+ -+ user_abort = 0; -+ -+ time = timeout + currticks(); -+ /* The timeout check is done below. The timeout is only checked if -+ * there is no packet in the Rx queue. This assumes that eth_poll() -+ * needs a negligible amount of time. -+ */ -+ for (;;) { -+ now = currticks(); -+ send_igmp_reports(now); -+ result = eth_poll(1); -+ if (result == 0) { -+ /* We don't have anything */ -+ -+ /* Check for abort key only if the Rx queue is empty - -+ * as long as we have something to process, don't -+ * assume that something failed. It is unlikely that -+ * we have no processing time left between packets. */ -+ poll_interruptions(); -+ /* Do the timeout after at least a full queue walk. */ -+ if ((timeout == 0) || (currticks() > time) || user_abort == 1) { -+ break; -+ } -+ continue; -+ } -+ -+ /* We have something! */ -+ -+ /* Find the Ethernet packet type */ -+ if (nic.packetlen >= ETH_HLEN) { -+ ptype = ((unsigned short) nic.packet[12]) << 8 -+ | ((unsigned short) nic.packet[13]); -+ } else continue; /* what else could we do with it? */ -+ /* Verify an IP header */ -+ ip = 0; -+ if ((ptype == IP) && (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr))) { -+ unsigned ipoptlen; -+ ip = (struct iphdr *)&nic.packet[ETH_HLEN]; -+ if ((ip->verhdrlen < 0x45) || (ip->verhdrlen > 0x4F)) -+ continue; -+ iplen = (ip->verhdrlen & 0xf) * 4; -+ if (ipchksum(ip, iplen) != 0) -+ continue; -+ if (ip->frags & htons(0x3FFF)) { -+ static int warned_fragmentation = 0; -+ if (!warned_fragmentation) { -+ printf("ALERT: got a fragmented packet - reconfigure your server\n"); -+ warned_fragmentation = 1; -+ } -+ continue; -+ } -+ if (ntohs(ip->len) > ETH_MAX_MTU) -+ continue; -+ -+ ipoptlen = iplen - sizeof(struct iphdr); -+ if (ipoptlen) { -+ /* Delete the ip options, to guarantee -+ * good alignment, and make etherboot simpler. -+ */ -+ memmove(&nic.packet[ETH_HLEN + sizeof(struct iphdr)], -+ &nic.packet[ETH_HLEN + iplen], -+ nic.packetlen - ipoptlen); -+ nic.packetlen -= ipoptlen; -+ } -+ } -+ udp = 0; -+ if (ip && (ip->protocol == IP_UDP) && -+ (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr))) { -+ udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)]; -+ -+ /* Make certain we have a reasonable packet length */ -+ if (ntohs(udp->len) > (ntohs(ip->len) - iplen)) -+ continue; -+ -+ if (udp->chksum && udpchksum(ip, udp)) { -+ printf("UDP checksum error\n"); -+ continue; -+ } -+ } -+ result = reply(ival, ptr, ptype, ip, udp); -+ if (result > 0) { -+ return result; -+ } -+ -+ /* If it isn't a packet the upper layer wants see if there is a default -+ * action. This allows us reply to arp and igmp queryies. -+ */ -+ if ((ptype == ARP) && -+ (nic.packetlen >= ETH_HLEN + sizeof(struct arprequest))) { -+ struct arprequest *arpreply; -+ unsigned long tmp; -+ -+ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; -+ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); -+ if ((arpreply->opcode == htons(ARP_REQUEST)) && -+ (tmp == arptable[ARP_CLIENT].ipaddr.s_addr)) { -+ arpreply->opcode = htons(ARP_REPLY); -+ memcpy(arpreply->tipaddr, arpreply->sipaddr, sizeof(in_addr)); -+ memcpy(arpreply->thwaddr, arpreply->shwaddr, ETH_ALEN); -+ memcpy(arpreply->sipaddr, &arptable[ARP_CLIENT].ipaddr, sizeof(in_addr)); -+ memcpy(arpreply->shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); -+ eth_transmit(arpreply->thwaddr, ARP, -+ sizeof(struct arprequest), -+ arpreply); -+#ifdef MDEBUG -+ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); -+ printf("Sent ARP reply to: %@\n",tmp); -+#endif /* MDEBUG */ -+ } -+ } -+ process_igmp(ip, now); -+ } -+ return(0); -+} -+ -+#ifdef REQUIRE_VCI_ETHERBOOT -+/************************************************************************** -+FIND_VCI_ETHERBOOT - Looks for "Etherboot" in Vendor Encapsulated Identifiers -+On entry p points to byte count of VCI options -+**************************************************************************/ -+static int find_vci_etherboot(unsigned char *p) -+{ -+ unsigned char *end = p + 1 + *p; -+ -+ for (p++; p < end; ) { -+ if (*p == RFC2132_VENDOR_CLASS_ID) { -+ if (strncmp("Etherboot", p + 2, sizeof("Etherboot") - 1) == 0) -+ return (1); -+ } else if (*p == RFC1533_END) -+ return (0); -+ p += TAG_LEN(p) + 2; -+ } -+ return (0); -+} -+#endif /* REQUIRE_VCI_ETHERBOOT */ -+ -+/** -+ * decode_rfc1533 -+ * -+ * Decodes RFC1533 header -+ **/ -+int decode_rfc1533(unsigned char *p, unsigned int block, unsigned int len, int eof) -+{ -+ static unsigned char *extdata = NULL, *extend = NULL; -+ unsigned char *extpath = NULL; -+ unsigned char *endp; -+ -+ if (block == 0) { -+ end_of_rfc1533 = NULL; -+ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) -+ return(0); /* no RFC 1533 header found */ -+ p += 4; -+ endp = p + len; -+ } else { -+ if (block == 1) { -+ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) -+ return(0); /* no RFC 1533 header found */ -+ p += 4; -+ len -= 4; } -+ if (extend + len <= (unsigned char *) -+ rfc1533_venddata + sizeof(rfc1533_venddata)) { -+ memcpy(extend, p, len); -+ extend += len; -+ } else { -+ printf("Overflow in vendor data buffer! Aborting...\n"); -+ *extdata = RFC1533_END; -+ return(0); -+ } -+ p = extdata; endp = extend; -+ } -+ if (!eof) -+ return 1; -+ while (p < endp) { -+ unsigned char c = *p; -+ if (c == RFC1533_PAD) { -+ p++; -+ continue; -+ } -+ else if (c == RFC1533_END) { -+ end_of_rfc1533 = endp = p; -+ continue; -+ } -+ else if (c == RFC1533_NETMASK) -+ memcpy(&netmask, p+2, sizeof(in_addr)); -+ else if (c == RFC1533_GATEWAY) { -+ /* This is a little simplistic, but it will -+ usually be sufficient. -+ Take only the first entry */ -+ if (TAG_LEN(p) >= sizeof(in_addr)) -+ memcpy(&arptable[ARP_GATEWAY].ipaddr, p+2, sizeof(in_addr)); -+ } -+ else if (c == RFC1533_EXTENSIONPATH) -+ extpath = p; -+ else if (c == RFC2132_MSG_TYPE) -+ dhcp_reply=*(p+2); -+ else if (c == RFC2132_SRV_ID) -+ memcpy(&dhcp_server, p+2, sizeof(in_addr)); -+ else if (c == RFC1533_HOSTNAME) { -+ hostname = p + 2; -+ hostnamelen = *(p + 1); -+ } -+ else if (c == RFC1533_VENDOR_CONFIGFILE){ -+ int l = TAG_LEN (p); -+ -+ /* Eliminate the trailing NULs according to RFC 2132. */ -+ while (*(p + 2 + l - 1) == '\000' && l > 0) -+ l--; -+ -+ /* XXX: Should check if LEN is less than the maximum length -+ of CONFIG_FILE. This kind of robustness will be a goal -+ in GRUB 1.0. */ -+ memcpy (config_file, p + 2, l); -+ config_file[l] = 0; -+ } -+ else { -+ ; -+ } -+ p += TAG_LEN(p) + 2; -+ } -+ extdata = extend = endp; -+ if (block <= 0 && extpath != NULL) { -+ char fname[64]; -+ if (TAG_LEN(extpath) >= sizeof(fname)){ -+ printf("Overflow in vendor data buffer! Aborting...\n"); -+ *extdata = RFC1533_END; -+ return(0); -+ } -+ memcpy(fname, extpath+2, TAG_LEN(extpath)); -+ fname[(int)TAG_LEN(extpath)] = '\0'; -+ printf("Loading BOOTP-extension file: %s\n",fname); -+ tftp_file_read(fname, decode_rfc1533); -+ } -+ return 1; /* proceed with next block */ -+} -+ -+ -+/* FIXME double check TWO_SECOND_DIVISOR */ -+#define TWO_SECOND_DIVISOR (RAND_MAX/TICKS_PER_SEC) -+/************************************************************************** -+RFC2131_SLEEP_INTERVAL - sleep for expotentially longer times (base << exp) +- 1 sec) -+**************************************************************************/ -+long rfc2131_sleep_interval(long base, int exp) -+{ -+ unsigned long tmo; -+#ifdef BACKOFF_LIMIT -+ if (exp > BACKOFF_LIMIT) -+ exp = BACKOFF_LIMIT; -+#endif -+ tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR)); -+ return tmo; -+} -+ -+#ifdef MULTICAST_LEVEL2 -+/************************************************************************** -+RFC1112_SLEEP_INTERVAL - sleep for expotentially longer times, up to (base << exp) -+**************************************************************************/ -+long rfc1112_sleep_interval(long base, int exp) -+{ -+ unsigned long divisor, tmo; -+#ifdef BACKOFF_LIMIT -+ if (exp > BACKOFF_LIMIT) -+ exp = BACKOFF_LIMIT; -+#endif -+ divisor = RAND_MAX/(base << exp); -+ tmo = random()/divisor; -+ return tmo; -+} -+#endif /* MULTICAST_LEVEL_2 */ -+/* ifconfig - configure network interface. */ -+int -+ifconfig (char *ip, char *sm, char *gw, char *svr) -+{ -+ in_addr tmp; -+ -+ if (sm) -+ { -+ if (! inet_aton (sm, &tmp)) -+ return 0; -+ -+ netmask = tmp.s_addr; -+ } -+ -+ if (ip) -+ { -+ if (! inet_aton (ip, &arptable[ARP_CLIENT].ipaddr)) -+ return 0; -+ -+ if (! netmask && ! sm) -+ netmask = default_netmask (); -+ } -+ -+ if (gw && ! inet_aton (gw, &arptable[ARP_GATEWAY].ipaddr)) -+ return 0; -+ -+ /* Clear out the ARP entry. */ -+ grub_memset (arptable[ARP_GATEWAY].node, 0, ETH_ALEN); -+ -+ if (svr && ! inet_aton (svr, &arptable[ARP_SERVER].ipaddr)) -+ return 0; -+ -+ /* Likewise. */ -+ grub_memset (arptable[ARP_SERVER].node, 0, ETH_ALEN); -+ -+ if (ip || sm) -+ { -+ if (IP_BROADCAST == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) -+ || netmask == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) -+ || ! netmask) -+ network_ready = 0; -+ else -+ network_ready = 1; -+ } -+ -+ return 1; -+} -+ -+/* -+ * print_network_configuration -+ * -+ * Output the network configuration. It may broke the graphic console now.:-( -+ */ -+void print_network_configuration (void) -+{ -+ EnterFunction("print_network_configuration"); -+ if (! grub_eth_probe ()) -+ grub_printf ("No ethernet card found.\n"); -+ else if (! network_ready) -+ grub_printf ("Not initialized yet.\n"); -+ else { -+ etherboot_printf ("Address: %@\n", arptable[ARP_CLIENT].ipaddr.s_addr); -+ etherboot_printf ("Netmask: %@\n", netmask); -+ etherboot_printf ("Server: %@\n", arptable[ARP_SERVER].ipaddr.s_addr); -+ etherboot_printf ("Gateway: %@\n", arptable[ARP_GATEWAY].ipaddr.s_addr); -+ } -+ LeaveFunction("print_network_configuration"); -+} -+ -+/** -+ * cleanup_net -+ * -+ * Mark network unusable, and disable NICs -+ */ -+void cleanup_net (void) -+{ -+ if (network_ready){ -+ /* Stop receiving packets. */ -+ eth_disable (); -+ network_ready = 0; -+ } -+} -Index: b/netboot/nic.h -=================================================================== ---- a/netboot/nic.h -+++ b/netboot/nic.h -@@ -8,24 +8,38 @@ - #ifndef NIC_H - #define NIC_H - -+#include "dev.h" -+ -+typedef enum { -+ DISABLE = 0, -+ ENABLE, -+ FORCE -+} irq_action_t; -+ - /* - * Structure returned from eth_probe and passed to other driver - * functions. - */ -- - struct nic - { -- void (*reset)P((struct nic *)); -- int (*poll)P((struct nic *)); -+ struct dev dev; /* This must come first */ -+ int (*poll)P((struct nic *, int retrieve)); - void (*transmit)P((struct nic *, const char *d, - unsigned int t, unsigned int s, const char *p)); -- void (*disable)P((struct nic *)); -+ void (*irq)P((struct nic *, irq_action_t)); - int flags; /* driver specific flags */ - struct rom_info *rom_info; /* -> rom_info from main */ - unsigned char *node_addr; -- char *packet; -+ unsigned char *packet; - unsigned int packetlen; -+ unsigned int ioaddr; -+ unsigned char irqno; - void *priv_data; /* driver can hang private data here */ - }; - -+extern int eth_probe(struct dev *dev); -+extern int eth_poll(int retrieve); -+extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p); -+extern void eth_disable(void); -+extern void eth_irq(irq_action_t action); - #endif /* NIC_H */ -Index: b/netboot/ns83820.c -=================================================================== ---- /dev/null -+++ b/netboot/ns83820.c -@@ -0,0 +1,1020 @@ -+/************************************************************************** -+* ns83820.c: Etherboot device driver for the National Semiconductor 83820 -+* Written 2004 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code based on: -+* ns83820.c by Benjamin LaHaise with contributions -+* for Linux kernel 2.4.x. -+* -+* Linux Driver Version 0.20, 20020610 -+* -+* This development of this Etherboot driver was funded by: -+* -+* NXTV: http://www.nxtv.com/ -+* -+* REVISION HISTORY: -+* ================ -+* -+* v1.0 02-16-2004 timlegge Initial port of Linux driver -+* v1.1 02-19-2004 timlegge More rohbust transmit and poll -+* -+* Indent Options: indent -kr -i8 -+***************************************************************************/ -+ -+/* to get some global routines like printf */ -+#include "etherboot.h" -+/* to get the interface to the body of the program */ -+#include "nic.h" -+/* to get the PCI support functions, if this is a PCI NIC */ -+#include "pci.h" -+ -+#if ARCH == ia64 /* Support 64-bit addressing */ -+#define USE_64BIT_ADDR -+#endif -+ -+//#define DDEBUG -+#ifdef DDEBUG -+#define dprintf(x) printf x -+#else -+#define dprintf(x) -+#endif -+ -+typedef unsigned char u8; -+typedef signed char s8; -+typedef unsigned short u16; -+typedef signed short s16; -+typedef unsigned int u32; -+typedef signed int s32; -+ -+#define HZ 100 -+ -+/* Condensed operations for readability. */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) -+ -+/* NIC specific static variables go here */ -+ -+/* Global parameters. See MODULE_PARM near the bottom. */ -+// static int ihr = 2; -+static int reset_phy = 0; -+static int lnksts = 0; /* CFG_LNKSTS bit polarity */ -+ -+#if defined(CONFIG_HIGHMEM64G) || defined(__ia64__) -+#define USE_64BIT_ADDR "+" -+#endif -+ -+#if defined(USE_64BIT_ADDR) -+#define TRY_DAC 1 -+#else -+#define TRY_DAC 0 -+#endif -+ -+/* tunables */ -+#define RX_BUF_SIZE 1500 /* 8192 */ -+ -+/* Must not exceed ~65000. */ -+#define NR_RX_DESC 64 -+#define NR_TX_DESC 1 -+ -+ /* not tunable *//* Extra 6 bytes for 64 bit alignment (divisable by 8) */ -+#define REAL_RX_BUF_SIZE (RX_BUF_SIZE + 14 + 6) /* rx/tx mac addr + type */ -+ -+#define MIN_TX_DESC_FREE 8 -+ -+/* register defines */ -+#define CFGCS 0x04 -+ -+#define CR_TXE 0x00000001 -+#define CR_TXD 0x00000002 -+/* Ramit : Here's a tip, don't do a RXD immediately followed by an RXE -+ * The Receive engine skips one descriptor and moves -+ * onto the next one!! */ -+#define CR_RXE 0x00000004 -+#define CR_RXD 0x00000008 -+#define CR_TXR 0x00000010 -+#define CR_RXR 0x00000020 -+#define CR_SWI 0x00000080 -+#define CR_RST 0x00000100 -+ -+#define PTSCR_EEBIST_FAIL 0x00000001 -+#define PTSCR_EEBIST_EN 0x00000002 -+#define PTSCR_EELOAD_EN 0x00000004 -+#define PTSCR_RBIST_FAIL 0x000001b8 -+#define PTSCR_RBIST_DONE 0x00000200 -+#define PTSCR_RBIST_EN 0x00000400 -+#define PTSCR_RBIST_RST 0x00002000 -+ -+#define MEAR_EEDI 0x00000001 -+#define MEAR_EEDO 0x00000002 -+#define MEAR_EECLK 0x00000004 -+#define MEAR_EESEL 0x00000008 -+#define MEAR_MDIO 0x00000010 -+#define MEAR_MDDIR 0x00000020 -+#define MEAR_MDC 0x00000040 -+ -+#define ISR_TXDESC3 0x40000000 -+#define ISR_TXDESC2 0x20000000 -+#define ISR_TXDESC1 0x10000000 -+#define ISR_TXDESC0 0x08000000 -+#define ISR_RXDESC3 0x04000000 -+#define ISR_RXDESC2 0x02000000 -+#define ISR_RXDESC1 0x01000000 -+#define ISR_RXDESC0 0x00800000 -+#define ISR_TXRCMP 0x00400000 -+#define ISR_RXRCMP 0x00200000 -+#define ISR_DPERR 0x00100000 -+#define ISR_SSERR 0x00080000 -+#define ISR_RMABT 0x00040000 -+#define ISR_RTABT 0x00020000 -+#define ISR_RXSOVR 0x00010000 -+#define ISR_HIBINT 0x00008000 -+#define ISR_PHY 0x00004000 -+#define ISR_PME 0x00002000 -+#define ISR_SWI 0x00001000 -+#define ISR_MIB 0x00000800 -+#define ISR_TXURN 0x00000400 -+#define ISR_TXIDLE 0x00000200 -+#define ISR_TXERR 0x00000100 -+#define ISR_TXDESC 0x00000080 -+#define ISR_TXOK 0x00000040 -+#define ISR_RXORN 0x00000020 -+#define ISR_RXIDLE 0x00000010 -+#define ISR_RXEARLY 0x00000008 -+#define ISR_RXERR 0x00000004 -+#define ISR_RXDESC 0x00000002 -+#define ISR_RXOK 0x00000001 -+ -+#define TXCFG_CSI 0x80000000 -+#define TXCFG_HBI 0x40000000 -+#define TXCFG_MLB 0x20000000 -+#define TXCFG_ATP 0x10000000 -+#define TXCFG_ECRETRY 0x00800000 -+#define TXCFG_BRST_DIS 0x00080000 -+#define TXCFG_MXDMA1024 0x00000000 -+#define TXCFG_MXDMA512 0x00700000 -+#define TXCFG_MXDMA256 0x00600000 -+#define TXCFG_MXDMA128 0x00500000 -+#define TXCFG_MXDMA64 0x00400000 -+#define TXCFG_MXDMA32 0x00300000 -+#define TXCFG_MXDMA16 0x00200000 -+#define TXCFG_MXDMA8 0x00100000 -+ -+#define CFG_LNKSTS 0x80000000 -+#define CFG_SPDSTS 0x60000000 -+#define CFG_SPDSTS1 0x40000000 -+#define CFG_SPDSTS0 0x20000000 -+#define CFG_DUPSTS 0x10000000 -+#define CFG_TBI_EN 0x01000000 -+#define CFG_MODE_1000 0x00400000 -+/* Ramit : Dont' ever use AUTO_1000, it never works and is buggy. -+ * Read the Phy response and then configure the MAC accordingly */ -+#define CFG_AUTO_1000 0x00200000 -+#define CFG_PINT_CTL 0x001c0000 -+#define CFG_PINT_DUPSTS 0x00100000 -+#define CFG_PINT_LNKSTS 0x00080000 -+#define CFG_PINT_SPDSTS 0x00040000 -+#define CFG_TMRTEST 0x00020000 -+#define CFG_MRM_DIS 0x00010000 -+#define CFG_MWI_DIS 0x00008000 -+#define CFG_T64ADDR 0x00004000 -+#define CFG_PCI64_DET 0x00002000 -+#define CFG_DATA64_EN 0x00001000 -+#define CFG_M64ADDR 0x00000800 -+#define CFG_PHY_RST 0x00000400 -+#define CFG_PHY_DIS 0x00000200 -+#define CFG_EXTSTS_EN 0x00000100 -+#define CFG_REQALG 0x00000080 -+#define CFG_SB 0x00000040 -+#define CFG_POW 0x00000020 -+#define CFG_EXD 0x00000010 -+#define CFG_PESEL 0x00000008 -+#define CFG_BROM_DIS 0x00000004 -+#define CFG_EXT_125 0x00000002 -+#define CFG_BEM 0x00000001 -+ -+#define EXTSTS_UDPPKT 0x00200000 -+#define EXTSTS_TCPPKT 0x00080000 -+#define EXTSTS_IPPKT 0x00020000 -+ -+#define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) -+ -+#define MIBC_MIBS 0x00000008 -+#define MIBC_ACLR 0x00000004 -+#define MIBC_FRZ 0x00000002 -+#define MIBC_WRN 0x00000001 -+ -+#define PCR_PSEN (1 << 31) -+#define PCR_PS_MCAST (1 << 30) -+#define PCR_PS_DA (1 << 29) -+#define PCR_STHI_8 (3 << 23) -+#define PCR_STLO_4 (1 << 23) -+#define PCR_FFHI_8K (3 << 21) -+#define PCR_FFLO_4K (1 << 21) -+#define PCR_PAUSE_CNT 0xFFFE -+ -+#define RXCFG_AEP 0x80000000 -+#define RXCFG_ARP 0x40000000 -+#define RXCFG_STRIPCRC 0x20000000 -+#define RXCFG_RX_FD 0x10000000 -+#define RXCFG_ALP 0x08000000 -+#define RXCFG_AIRL 0x04000000 -+#define RXCFG_MXDMA512 0x00700000 -+#define RXCFG_DRTH 0x0000003e -+#define RXCFG_DRTH0 0x00000002 -+ -+#define RFCR_RFEN 0x80000000 -+#define RFCR_AAB 0x40000000 -+#define RFCR_AAM 0x20000000 -+#define RFCR_AAU 0x10000000 -+#define RFCR_APM 0x08000000 -+#define RFCR_APAT 0x07800000 -+#define RFCR_APAT3 0x04000000 -+#define RFCR_APAT2 0x02000000 -+#define RFCR_APAT1 0x01000000 -+#define RFCR_APAT0 0x00800000 -+#define RFCR_AARP 0x00400000 -+#define RFCR_MHEN 0x00200000 -+#define RFCR_UHEN 0x00100000 -+#define RFCR_ULM 0x00080000 -+ -+#define VRCR_RUDPE 0x00000080 -+#define VRCR_RTCPE 0x00000040 -+#define VRCR_RIPE 0x00000020 -+#define VRCR_IPEN 0x00000010 -+#define VRCR_DUTF 0x00000008 -+#define VRCR_DVTF 0x00000004 -+#define VRCR_VTREN 0x00000002 -+#define VRCR_VTDEN 0x00000001 -+ -+#define VTCR_PPCHK 0x00000008 -+#define VTCR_GCHK 0x00000004 -+#define VTCR_VPPTI 0x00000002 -+#define VTCR_VGTI 0x00000001 -+ -+#define CR 0x00 -+#define CFG 0x04 -+#define MEAR 0x08 -+#define PTSCR 0x0c -+#define ISR 0x10 -+#define IMR 0x14 -+#define IER 0x18 -+#define IHR 0x1c -+#define TXDP 0x20 -+#define TXDP_HI 0x24 -+#define TXCFG 0x28 -+#define GPIOR 0x2c -+#define RXDP 0x30 -+#define RXDP_HI 0x34 -+#define RXCFG 0x38 -+#define PQCR 0x3c -+#define WCSR 0x40 -+#define PCR 0x44 -+#define RFCR 0x48 -+#define RFDR 0x4c -+ -+#define SRR 0x58 -+ -+#define VRCR 0xbc -+#define VTCR 0xc0 -+#define VDR 0xc4 -+#define CCSR 0xcc -+ -+#define TBICR 0xe0 -+#define TBISR 0xe4 -+#define TANAR 0xe8 -+#define TANLPAR 0xec -+#define TANER 0xf0 -+#define TESR 0xf4 -+ -+#define TBICR_MR_AN_ENABLE 0x00001000 -+#define TBICR_MR_RESTART_AN 0x00000200 -+ -+#define TBISR_MR_LINK_STATUS 0x00000020 -+#define TBISR_MR_AN_COMPLETE 0x00000004 -+ -+#define TANAR_PS2 0x00000100 -+#define TANAR_PS1 0x00000080 -+#define TANAR_HALF_DUP 0x00000040 -+#define TANAR_FULL_DUP 0x00000020 -+ -+#define GPIOR_GP5_OE 0x00000200 -+#define GPIOR_GP4_OE 0x00000100 -+#define GPIOR_GP3_OE 0x00000080 -+#define GPIOR_GP2_OE 0x00000040 -+#define GPIOR_GP1_OE 0x00000020 -+#define GPIOR_GP3_OUT 0x00000004 -+#define GPIOR_GP1_OUT 0x00000001 -+ -+#define LINK_AUTONEGOTIATE 0x01 -+#define LINK_DOWN 0x02 -+#define LINK_UP 0x04 -+ -+ -+#define __kick_rx() writel(CR_RXE, ns->base + CR) -+ -+#define kick_rx() do { \ -+ dprintf(("kick_rx: maybe kicking\n")); \ -+ writel(virt_to_le32desc(&rx_ring[ns->cur_rx]), ns->base + RXDP); \ -+ if (ns->next_rx == ns->next_empty) \ -+ printf("uh-oh: next_rx == next_empty???\n"); \ -+ __kick_rx(); \ -+} while(0) -+ -+ -+#ifdef USE_64BIT_ADDR -+#define HW_ADDR_LEN 8 -+#else -+#define HW_ADDR_LEN 4 -+#endif -+ -+#define CMDSTS_OWN 0x80000000 -+#define CMDSTS_MORE 0x40000000 -+#define CMDSTS_INTR 0x20000000 -+#define CMDSTS_ERR 0x10000000 -+#define CMDSTS_OK 0x08000000 -+#define CMDSTS_LEN_MASK 0x0000ffff -+ -+#define CMDSTS_DEST_MASK 0x01800000 -+#define CMDSTS_DEST_SELF 0x00800000 -+#define CMDSTS_DEST_MULTI 0x01000000 -+ -+#define DESC_SIZE 8 /* Should be cache line sized */ -+ -+#ifdef USE_64BIT_ADDR -+struct ring_desc { -+ uint64_t link; -+ uint64_t bufptr; -+ u32 cmdsts; -+ u32 extsts; /* Extended status field */ -+}; -+#else -+struct ring_desc { -+ u32 link; -+ u32 bufptr; -+ u32 cmdsts; -+ u32 extsts; /* Extended status field */ -+}; -+#endif -+ -+/* Define the TX Descriptor */ -+static struct ring_desc tx_ring[NR_TX_DESC] -+ __attribute__ ((aligned(8))); -+ -+/* Create a static buffer of size REAL_RX_BUF_SIZE for each -+TX Descriptor. All descriptors point to a -+part of this buffer */ -+static unsigned char txb[NR_TX_DESC * REAL_RX_BUF_SIZE]; -+ -+/* Define the TX Descriptor */ -+static struct ring_desc rx_ring[NR_RX_DESC] -+ __attribute__ ((aligned(8))); -+ -+/* Create a static buffer of size REAL_RX_BUF_SIZE for each -+RX Descriptor All descriptors point to a -+part of this buffer */ -+static unsigned char rxb[NR_RX_DESC * REAL_RX_BUF_SIZE] -+ __attribute__ ((aligned(8))); -+ -+/* Private Storage for the NIC */ -+struct ns83820_private { -+ u8 *base; -+ int up; -+ long idle; -+ u32 *next_rx_desc; -+ u16 next_rx, next_empty; -+ u32 cur_rx; -+ u32 *descs; -+ unsigned ihr; -+ u32 CFG_cache; -+ u32 MEAR_cache; -+ u32 IMR_cache; -+ int linkstate; -+ u16 tx_done_idx; -+ u16 tx_idx; -+ u16 tx_intr_idx; -+ u32 phy_descs; -+ u32 *tx_descs; -+ -+} nsx; -+static struct ns83820_private *ns; -+ -+static void phy_intr(struct nic *nic __unused) -+{ -+ static char *speeds[] = -+ { "10", "100", "1000", "1000(?)", "1000F" }; -+ u32 cfg, new_cfg; -+ u32 tbisr, tanar, tanlpar; -+ int speed, fullduplex, newlinkstate; -+ -+ cfg = readl(ns->base + CFG) ^ SPDSTS_POLARITY; -+ if (ns->CFG_cache & CFG_TBI_EN) { -+ /* we have an optical transceiver */ -+ tbisr = readl(ns->base + TBISR); -+ tanar = readl(ns->base + TANAR); -+ tanlpar = readl(ns->base + TANLPAR); -+ dprintf(("phy_intr: tbisr=%hX, tanar=%hX, tanlpar=%hX\n", -+ tbisr, tanar, tanlpar)); -+ -+ if ((fullduplex = (tanlpar & TANAR_FULL_DUP) -+ && (tanar & TANAR_FULL_DUP))) { -+ -+ /* both of us are full duplex */ -+ writel(readl(ns->base + TXCFG) -+ | TXCFG_CSI | TXCFG_HBI | TXCFG_ATP, -+ ns->base + TXCFG); -+ writel(readl(ns->base + RXCFG) | RXCFG_RX_FD, -+ ns->base + RXCFG); -+ /* Light up full duplex LED */ -+ writel(readl(ns->base + GPIOR) | GPIOR_GP1_OUT, -+ ns->base + GPIOR); -+ -+ } else if (((tanlpar & TANAR_HALF_DUP) -+ && (tanar & TANAR_HALF_DUP)) -+ || ((tanlpar & TANAR_FULL_DUP) -+ && (tanar & TANAR_HALF_DUP)) -+ || ((tanlpar & TANAR_HALF_DUP) -+ && (tanar & TANAR_FULL_DUP))) { -+ -+ /* one or both of us are half duplex */ -+ writel((readl(ns->base + TXCFG) -+ & ~(TXCFG_CSI | TXCFG_HBI)) | TXCFG_ATP, -+ ns->base + TXCFG); -+ writel(readl(ns->base + RXCFG) & ~RXCFG_RX_FD, -+ ns->base + RXCFG); -+ /* Turn off full duplex LED */ -+ writel(readl(ns->base + GPIOR) & ~GPIOR_GP1_OUT, -+ ns->base + GPIOR); -+ } -+ -+ speed = 4; /* 1000F */ -+ -+ } else { -+ /* we have a copper transceiver */ -+ new_cfg = -+ ns->CFG_cache & ~(CFG_SB | CFG_MODE_1000 | CFG_SPDSTS); -+ -+ if (cfg & CFG_SPDSTS1) -+ new_cfg |= CFG_MODE_1000; -+ else -+ new_cfg &= ~CFG_MODE_1000; -+ -+ speed = ((cfg / CFG_SPDSTS0) & 3); -+ fullduplex = (cfg & CFG_DUPSTS); -+ -+ if (fullduplex) -+ new_cfg |= CFG_SB; -+ -+ if ((cfg & CFG_LNKSTS) && -+ ((new_cfg ^ ns->CFG_cache) & CFG_MODE_1000)) { -+ writel(new_cfg, ns->base + CFG); -+ ns->CFG_cache = new_cfg; -+ } -+ -+ ns->CFG_cache &= ~CFG_SPDSTS; -+ ns->CFG_cache |= cfg & CFG_SPDSTS; -+ } -+ -+ newlinkstate = (cfg & CFG_LNKSTS) ? LINK_UP : LINK_DOWN; -+ -+ if (newlinkstate & LINK_UP && ns->linkstate != newlinkstate) { -+ printf("link now %s mbps, %s duplex and up.\n", -+ speeds[speed], fullduplex ? "full" : "half"); -+ } else if (newlinkstate & LINK_DOWN -+ && ns->linkstate != newlinkstate) { -+ printf("link now down.\n"); -+ } -+ ns->linkstate = newlinkstate; -+} -+static void ns83820_set_multicast(struct nic *nic __unused); -+static void ns83820_setup_rx(struct nic *nic) -+{ -+ unsigned i; -+ ns->idle = 1; -+ ns->next_rx = 0; -+ ns->next_rx_desc = ns->descs; -+ ns->next_empty = 0; -+ ns->cur_rx = 0; -+ -+ -+ for (i = 0; i < NR_RX_DESC; i++) { -+ rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); -+ rx_ring[i].bufptr = -+ virt_to_le32desc(&rxb[i * REAL_RX_BUF_SIZE]); -+ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); -+ rx_ring[i].extsts = cpu_to_le32(0); -+ } -+// No need to wrap the ring -+// rx_ring[i].link = virt_to_le32desc(&rx_ring[0]); -+ writel(0, ns->base + RXDP_HI); -+ writel(virt_to_le32desc(&rx_ring[0]), ns->base + RXDP); -+ -+ dprintf(("starting receiver\n")); -+ -+ writel(0x0001, ns->base + CCSR); -+ writel(0, ns->base + RFCR); -+ writel(0x7fc00000, ns->base + RFCR); -+ writel(0xffc00000, ns->base + RFCR); -+ -+ ns->up = 1; -+ -+ phy_intr(nic); -+ -+ /* Okay, let it rip */ -+ ns->IMR_cache |= ISR_PHY; -+ ns->IMR_cache |= ISR_RXRCMP; -+ //dev->IMR_cache |= ISR_RXERR; -+ //dev->IMR_cache |= ISR_RXOK; -+ ns->IMR_cache |= ISR_RXORN; -+ ns->IMR_cache |= ISR_RXSOVR; -+ ns->IMR_cache |= ISR_RXDESC; -+ ns->IMR_cache |= ISR_RXIDLE; -+ ns->IMR_cache |= ISR_TXDESC; -+ ns->IMR_cache |= ISR_TXIDLE; -+ -+ // No reason to enable interupts... -+ // writel(ns->IMR_cache, ns->base + IMR); -+ // writel(1, ns->base + IER); -+ ns83820_set_multicast(nic); -+ kick_rx(); -+} -+ -+ -+static void ns83820_do_reset(struct nic *nic __unused, u32 which) -+{ -+ dprintf(("resetting chip...\n")); -+ writel(which, ns->base + CR); -+ do { -+ -+ } while (readl(ns->base + CR) & which); -+ dprintf(("okay!\n")); -+} -+ -+static void ns83820_reset(struct nic *nic) -+{ -+ unsigned i; -+ dprintf(("ns83820_reset\n")); -+ -+ writel(0, ns->base + PQCR); -+ -+ ns83820_setup_rx(nic); -+ -+ for (i = 0; i < NR_TX_DESC; i++) { -+ tx_ring[i].link = 0; -+ tx_ring[i].bufptr = 0; -+ tx_ring[i].cmdsts = cpu_to_le32(0); -+ tx_ring[i].extsts = cpu_to_le32(0); -+ } -+ -+ ns->tx_idx = 0; -+ ns->tx_done_idx = 0; -+ writel(0, ns->base + TXDP_HI); -+ return; -+} -+static void ns83820_getmac(struct nic *nic __unused, u8 * mac) -+{ -+ unsigned i; -+ for (i = 0; i < 3; i++) { -+ u32 data; -+ /* Read from the perfect match memory: this is loaded by -+ * the chip from the EEPROM via the EELOAD self test. -+ */ -+ writel(i * 2, ns->base + RFCR); -+ data = readl(ns->base + RFDR); -+ *mac++ = data; -+ *mac++ = data >> 8; -+ } -+} -+ -+static void ns83820_set_multicast(struct nic *nic __unused) -+{ -+ u8 *rfcr = ns->base + RFCR; -+ u32 and_mask = 0xffffffff; -+ u32 or_mask = 0; -+ u32 val; -+ -+ /* Support Multicast */ -+ and_mask &= ~(RFCR_AAU | RFCR_AAM); -+ or_mask |= RFCR_AAM; -+ val = (readl(rfcr) & and_mask) | or_mask; -+ /* Ramit : RFCR Write Fix doc says RFEN must be 0 modify other bits */ -+ writel(val & ~RFCR_RFEN, rfcr); -+ writel(val, rfcr); -+ -+} -+static void ns83820_run_bist(struct nic *nic __unused, const char *name, -+ u32 enable, u32 done, u32 fail) -+{ -+ int timed_out = 0; -+ long start; -+ u32 status; -+ int loops = 0; -+ -+ dprintf(("start %s\n", name)) -+ -+ start = currticks(); -+ -+ writel(enable, ns->base + PTSCR); -+ for (;;) { -+ loops++; -+ status = readl(ns->base + PTSCR); -+ if (!(status & enable)) -+ break; -+ if (status & done) -+ break; -+ if (status & fail) -+ break; -+ if ((currticks() - start) >= HZ) { -+ timed_out = 1; -+ break; -+ } -+ } -+ -+ if (status & fail) -+ printf("%s failed! (0x%hX & 0x%hX)\n", name, status, fail); -+ else if (timed_out) -+ printf("run_bist %s timed out! (%hX)\n", name, status); -+ dprintf(("done %s in %d loops\n", name, loops)); -+} -+ -+/************************************* -+Check Link -+*************************************/ -+static void ns83820_check_intr(struct nic *nic) { -+ int i; -+ u32 isr = readl(ns->base + ISR); -+ if(ISR_PHY & isr) -+ phy_intr(nic); -+ if(( ISR_RXIDLE | ISR_RXDESC | ISR_RXERR) & isr) -+ kick_rx(); -+ for (i = 0; i < NR_RX_DESC; i++) { -+ if (rx_ring[i].cmdsts == CMDSTS_OWN) { -+// rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); -+ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); -+ } -+ } -+} -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int ns83820_poll(struct nic *nic, int retrieve) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ u32 cmdsts; -+ int entry = ns->cur_rx; -+ -+ ns83820_check_intr(nic); -+ -+ cmdsts = le32_to_cpu(rx_ring[entry].cmdsts); -+ -+ if ( ! ( (CMDSTS_OWN & (cmdsts)) && (cmdsts != (CMDSTS_OWN)) ) ) -+ return 0; -+ -+ if ( ! retrieve ) return 1; -+ -+ if (! (CMDSTS_OK & cmdsts) ) -+ return 0; -+ -+ nic->packetlen = cmdsts & 0xffff; -+ memcpy(nic->packet, -+ rxb + (entry * REAL_RX_BUF_SIZE), -+ nic->packetlen); -+ // rx_ring[entry].link = 0; -+ rx_ring[entry].cmdsts = cpu_to_le32(CMDSTS_OWN); -+ -+ ns->cur_rx = ++ns->cur_rx % NR_RX_DESC; -+ -+ if (ns->cur_rx == 0) /* We have wrapped the ring */ -+ kick_rx(); -+ -+ return 1; -+} -+ -+static inline void kick_tx(struct nic *nic __unused) -+{ -+ dprintf(("kick_tx\n")); -+ writel(CR_TXE, ns->base + CR); -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void ns83820_transmit(struct nic *nic, const char *d, /* Destination */ -+ unsigned int t, /* Type */ -+ unsigned int s, /* size */ -+ const char *p) -+{ /* Packet */ -+ /* send the packet to destination */ -+ -+ u16 nstype; -+ u32 cmdsts, extsts; -+ int cur_tx = 0; -+ u32 isr = readl(ns->base + ISR); -+ if (ISR_TXIDLE & isr) -+ kick_tx(nic); -+ /* point to the current txb incase multiple tx_rings are used */ -+ memcpy(txb, d, ETH_ALEN); -+ memcpy(txb + ETH_ALEN, nic->node_addr, ETH_ALEN); -+ nstype = htons((u16) t); -+ memcpy(txb + 2 * ETH_ALEN, (u8 *) & nstype, 2); -+ memcpy(txb + ETH_HLEN, p, s); -+ s += ETH_HLEN; -+ s &= 0x0FFF; -+ while (s < ETH_ZLEN) -+ txb[s++] = '\0'; -+ -+ /* Setup the transmit descriptor */ -+ extsts = 0; -+ extsts |= EXTSTS_UDPPKT; -+ -+ tx_ring[cur_tx].bufptr = virt_to_le32desc(&txb); -+ tx_ring[cur_tx].extsts = cpu_to_le32(extsts); -+ -+ cmdsts = cpu_to_le32(0); -+ cmdsts |= cpu_to_le32(CMDSTS_OWN | s); -+ tx_ring[cur_tx].cmdsts = cpu_to_le32(cmdsts); -+ -+ writel(virt_to_le32desc(&tx_ring[0]), ns->base + TXDP); -+ kick_tx(nic); -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void ns83820_disable(struct dev *dev) -+{ -+ /* put the card in its initial state */ -+ /* This function serves 3 purposes. -+ * This disables DMA and interrupts so we don't receive -+ * unexpected packets or interrupts from the card after -+ * etherboot has finished. -+ * This frees resources so etherboot may use -+ * this driver on another interface -+ * This allows etherboot to reinitialize the interface -+ * if something is something goes wrong. -+ */ -+ /* disable interrupts */ -+ writel(0, ns->base + IMR); -+ writel(0, ns->base + IER); -+ readl(ns->base + IER); -+ -+ ns->up = 0; -+ -+ ns83820_do_reset((struct nic *) dev, CR_RST); -+ -+ ns->IMR_cache &= -+ ~(ISR_RXOK | ISR_RXDESC | ISR_RXERR | ISR_RXEARLY | -+ ISR_RXIDLE); -+ writel(ns->IMR_cache, ns->base + IMR); -+ -+ /* touch the pci bus... */ -+ readl(ns->base + IMR); -+ -+ /* assumes the transmitter is already disabled and reset */ -+ writel(0, ns->base + RXDP_HI); -+ writel(0, ns->base + RXDP); -+} -+ -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void ns83820_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+***************************************************************************/ -+ -+#define board_found 1 -+#define valid_link 0 -+static int ns83820_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *) dev; -+ int sz; -+ long addr; -+ int using_dac = 0; -+ -+ if (pci->ioaddr == 0) -+ return 0; -+ -+ printf("ns83820.c: Found %s, vendor=0x%hX, device=0x%hX\n", -+ pci->name, pci->vendor, pci->dev_id); -+ -+ /* point to private storage */ -+ ns = &nsx; -+ -+ adjust_pci_device(pci); -+ -+ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_1); -+ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_1); -+ -+ ns->base = ioremap(addr, (1UL << 12)); -+// ns->base = ioremap(addr, sz); -+ -+ if (!ns->base) -+ return 0; -+ -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ /* disable interrupts */ -+ writel(0, ns->base + IMR); -+ writel(0, ns->base + IER); -+ readl(ns->base + IER); -+ -+ ns->IMR_cache = 0; -+ -+ ns83820_do_reset(nic, CR_RST); -+ -+ /* Must reset the ram bist before running it */ -+ writel(PTSCR_RBIST_RST, ns->base + PTSCR); -+ ns83820_run_bist(nic, "sram bist", PTSCR_RBIST_EN, -+ PTSCR_RBIST_DONE, PTSCR_RBIST_FAIL); -+ ns83820_run_bist(nic, "eeprom bist", PTSCR_EEBIST_EN, 0, -+ PTSCR_EEBIST_FAIL); -+ ns83820_run_bist(nic, "eeprom load", PTSCR_EELOAD_EN, 0, 0); -+ -+ /* I love config registers */ -+ ns->CFG_cache = readl(ns->base + CFG); -+ -+ if ((ns->CFG_cache & CFG_PCI64_DET)) { -+ printf("%s: detected 64 bit PCI data bus.\n", pci->name); -+ /*dev->CFG_cache |= CFG_DATA64_EN; */ -+ if (!(ns->CFG_cache & CFG_DATA64_EN)) -+ printf -+ ("%s: EEPROM did not enable 64 bit bus. Disabled.\n", -+ pci->name); -+ } else -+ ns->CFG_cache &= ~(CFG_DATA64_EN); -+ -+ ns->CFG_cache &= (CFG_TBI_EN | CFG_MRM_DIS | CFG_MWI_DIS | -+ CFG_T64ADDR | CFG_DATA64_EN | CFG_EXT_125 | -+ CFG_M64ADDR); -+ ns->CFG_cache |= -+ CFG_PINT_DUPSTS | CFG_PINT_LNKSTS | CFG_PINT_SPDSTS | -+ CFG_EXTSTS_EN | CFG_EXD | CFG_PESEL; -+ ns->CFG_cache |= CFG_REQALG; -+ ns->CFG_cache |= CFG_POW; -+ ns->CFG_cache |= CFG_TMRTEST; -+ -+ /* When compiled with 64 bit addressing, we must always enable -+ * the 64 bit descriptor format. -+ */ -+#ifdef USE_64BIT_ADDR -+ ns->CFG_cache |= CFG_M64ADDR; -+#endif -+ -+//FIXME: Enable section on dac or remove this -+ if (using_dac) -+ ns->CFG_cache |= CFG_T64ADDR; -+ -+ /* Big endian mode does not seem to do what the docs suggest */ -+ ns->CFG_cache &= ~CFG_BEM; -+ -+ /* setup optical transceiver if we have one */ -+ if (ns->CFG_cache & CFG_TBI_EN) { -+ dprintf(("%s: enabling optical transceiver\n", pci->name)); -+ writel(readl(ns->base + GPIOR) | 0x3e8, ns->base + GPIOR); -+ -+ /* setup auto negotiation feature advertisement */ -+ writel(readl(ns->base + TANAR) -+ | TANAR_HALF_DUP | TANAR_FULL_DUP, -+ ns->base + TANAR); -+ -+ /* start auto negotiation */ -+ writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN, -+ ns->base + TBICR); -+ writel(TBICR_MR_AN_ENABLE, ns->base + TBICR); -+ ns->linkstate = LINK_AUTONEGOTIATE; -+ -+ ns->CFG_cache |= CFG_MODE_1000; -+ } -+ writel(ns->CFG_cache, ns->base + CFG); -+ dprintf(("CFG: %hX\n", ns->CFG_cache)); -+ -+ /* FIXME: reset_phy is defaulted to 0, should we reset anyway? */ -+ if (reset_phy) { -+ dprintf(("%s: resetting phy\n", pci->name)); -+ writel(ns->CFG_cache | CFG_PHY_RST, ns->base + CFG); -+ writel(ns->CFG_cache, ns->base + CFG); -+ } -+#if 0 /* Huh? This sets the PCI latency register. Should be done via -+ * the PCI layer. FIXME. -+ */ -+ if (readl(dev->base + SRR)) -+ writel(readl(dev->base + 0x20c) | 0xfe00, -+ dev->base + 0x20c); -+#endif -+ -+ /* Note! The DMA burst size interacts with packet -+ * transmission, such that the largest packet that -+ * can be transmitted is 8192 - FLTH - burst size. -+ * If only the transmit fifo was larger... -+ */ -+ /* Ramit : 1024 DMA is not a good idea, it ends up banging -+ * some DELL and COMPAQ SMP systems */ -+ writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512 -+ | ((1600 / 32) * 0x100), ns->base + TXCFG); -+ -+ /* Set Rx to full duplex, don't accept runt, errored, long or length -+ * range errored packets. Use 512 byte DMA. -+ */ -+ /* Ramit : 1024 DMA is not a good idea, it ends up banging -+ * some DELL and COMPAQ SMP systems -+ * Turn on ALP, only we are accpeting Jumbo Packets */ -+ writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD -+ | RXCFG_STRIPCRC -+ //| RXCFG_ALP -+ | (RXCFG_MXDMA512) | 0, ns->base + RXCFG); -+ -+ /* Disable priority queueing */ -+ writel(0, ns->base + PQCR); -+ -+ /* Enable IP checksum validation and detetion of VLAN headers. -+ * Note: do not set the reject options as at least the 0x102 -+ * revision of the chip does not properly accept IP fragments -+ * at least for UDP. -+ */ -+ /* Ramit : Be sure to turn on RXCFG_ARP if VLAN's are enabled, since -+ * the MAC it calculates the packetsize AFTER stripping the VLAN -+ * header, and if a VLAN Tagged packet of 64 bytes is received (like -+ * a ping with a VLAN header) then the card, strips the 4 byte VLAN -+ * tag and then checks the packet size, so if RXCFG_ARP is not enabled, -+ * it discrards it!. These guys...... -+ */ -+ writel(VRCR_IPEN | VRCR_VTDEN, ns->base + VRCR); -+ -+ /* Enable per-packet TCP/UDP/IP checksumming */ -+ writel(VTCR_PPCHK, ns->base + VTCR); -+ -+ /* Ramit : Enable async and sync pause frames */ -+// writel(0, ns->base + PCR); -+ writel((PCR_PS_MCAST | PCR_PS_DA | PCR_PSEN | PCR_FFLO_4K | -+ PCR_FFHI_8K | PCR_STLO_4 | PCR_STHI_8 | PCR_PAUSE_CNT), -+ ns->base + PCR); -+ -+ /* Disable Wake On Lan */ -+ writel(0, ns->base + WCSR); -+ -+ ns83820_getmac(nic, nic->node_addr); -+ printf("%! at ioaddr 0x%hX, ", nic->node_addr, ns->base); -+ -+ if (using_dac) { -+ dprintf(("%s: using 64 bit addressing.\n", pci->name)); -+ } -+ -+ dprintf(("%s: DP83820 %d.%d: %! io=0x%hX\n", -+ pci->name, -+ (unsigned) readl(ns->base + SRR) >> 8, -+ (unsigned) readl(ns->base + SRR) & 0xff, -+ nic->node_addr, pci->ioaddr)); -+ -+#ifdef PHY_CODE_IS_FINISHED -+ ns83820_probe_phy(dev); -+#endif -+ -+ ns83820_reset(nic); -+ /* point to NIC specific routines */ -+ dev->disable = ns83820_disable; -+ nic->poll = ns83820_poll; -+ nic->transmit = ns83820_transmit; -+ nic->irq = ns83820_irq; -+ return 1; -+} -+ -+static struct pci_id ns83820_nics[] = { -+ PCI_ROM(0x100b, 0x0022, "ns83820", "National Semiconductor 83820"), -+}; -+ -+struct pci_driver ns83820_driver = { -+ .type = NIC_DRIVER, -+ .name = "NS83820/PCI", -+ .probe = ns83820_probe, -+ .ids = ns83820_nics, -+ .id_count = sizeof(ns83820_nics) / sizeof(ns83820_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/ns8390.c -=================================================================== ---- a/netboot/ns8390.c -+++ b/netboot/ns8390.c -@@ -13,11 +13,15 @@ - the proper functioning of this software, nor do the authors assume any - responsibility for damages incurred with its use. - -+Multicast support added by Timothy Legge (timlegge@users.sourceforge.net) 09/28/2003 -+Relocation support added by Ken Yap (ken_yap@users.sourceforge.net) 28/12/02 - 3c503 support added by Bill Paul (wpaul@ctr.columbia.edu) on 11/15/94 - SMC8416 support added by Bill Paul (wpaul@ctr.columbia.edu) on 12/25/94 - 3c503 PIO support added by Jim Hague (jim.hague@acm.org) on 2/17/98 - RX overrun by Klaus Espenlaub (espenlaub@informatik.uni-ulm.de) on 3/10/99 - parts taken from the Linux 8390 driver (by Donald Becker and Paul Gortmaker) -+SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 -+ based on the Linux 8390 driver (by Donald Becker and Paul Gortmaker) - - **************************************************************************/ - -@@ -26,10 +30,16 @@ - #include "ns8390.h" - #ifdef INCLUDE_NS8390 - #include "pci.h" -+#else -+#include "isa.h" - #endif --#include "cards.h" - --static unsigned char eth_vendor, eth_flags, eth_laar; -+typedef int Address; -+ -+static unsigned char eth_vendor, eth_flags; -+#ifdef INCLUDE_WD -+static unsigned char eth_laar; -+#endif - static unsigned short eth_nic_base, eth_asic_base; - static unsigned char eth_memsize, eth_rx_start, eth_tx_start; - static Address eth_bmem, eth_rmem; -@@ -66,6 +76,7 @@ - #endif - - #if defined(INCLUDE_WD) -+#define ASIC_PIO WD_IAR - #define eth_probe wd_probe - #if defined(INCLUDE_3C503) || defined(INCLUDE_NE) || defined(INCLUDE_NS8390) - Error you must only define one of INCLUDE_WD, INCLUDE_3C503, INCLUDE_NE, INCLUDE_NS8390 -@@ -101,13 +112,16 @@ - #endif - #endif - --#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) -+#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) - /************************************************************************** - ETH_PIO_READ - Read a frame via Programmed I/O - **************************************************************************/ - static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) - { -- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } -+#ifdef INCLUDE_WD -+ outb(src & 0xff, eth_asic_base + WD_GP2); -+ outb(src >> 8, eth_asic_base + WD_GP2); -+#else - outb(D8390_COMMAND_RD2 | - D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); - outb(cnt, eth_nic_base + D8390_P0_RBCR0); -@@ -122,9 +136,10 @@ - outb(src >> 8, eth_asic_base + _3COM_DAMSB); - outb(t503_output | _3COM_CR_START, eth_asic_base + _3COM_CR); - #endif -+#endif - - if (eth_flags & FLAG_16BIT) -- cnt >>= 1; -+ cnt = (cnt + 1) >> 1; - - while(cnt--) { - #ifdef INCLUDE_3C503 -@@ -153,7 +168,10 @@ - #ifdef COMPEX_RL2000_FIX - unsigned int x; - #endif /* COMPEX_RL2000_FIX */ -- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } -+#ifdef INCLUDE_WD -+ outb(dst & 0xff, eth_asic_base + WD_GP2); -+ outb(dst >> 8, eth_asic_base + WD_GP2); -+#else - outb(D8390_COMMAND_RD2 | - D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); - outb(D8390_ISR_RDC, eth_nic_base + D8390_P0_ISR); -@@ -170,9 +188,10 @@ - - outb(t503_output | _3COM_CR_DDIR | _3COM_CR_START, eth_asic_base + _3COM_CR); - #endif -+#endif - - if (eth_flags & FLAG_16BIT) -- cnt >>= 1; -+ cnt = (cnt + 1) >> 1; - - while(cnt--) - { -@@ -201,17 +220,40 @@ - if (x >= COMPEX_RL2000_TRIES) - printf("Warning: Compex RL2000 aborted wait!\n"); - #endif /* COMPEX_RL2000_FIX */ -+#ifndef INCLUDE_WD - while((inb(eth_nic_base + D8390_P0_ISR) & D8390_ISR_RDC) - != D8390_ISR_RDC); - #endif -+#endif - } - #else - /************************************************************************** - ETH_PIO_READ - Dummy routine when NE2000 not compiled in - **************************************************************************/ --static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) {} -+static void eth_pio_read(unsigned int src __unused, unsigned char *dst __unused, unsigned int cnt __unused) {} - #endif - -+ -+/************************************************************************** -+enable_multycast - Enable Multicast -+**************************************************************************/ -+static void enable_multicast(unsigned short eth_nic_base) -+{ -+ unsigned char mcfilter[8]; -+ int i; -+ memset(mcfilter, 0xFF, 8); -+ outb(4, eth_nic_base+D8390_P0_RCR); -+ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS1, eth_nic_base + D8390_P0_COMMAND); -+ for(i=0;i<8;i++) -+ { -+ outb(mcfilter[i], eth_nic_base + 8 + i); -+ if(inb(eth_nic_base + 8 + i)!=mcfilter[i]) -+ printf("Error SMC 83C690 Multicast filter read/write mishap %d\n",i); -+ } -+ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS0, eth_nic_base + D8390_P0_COMMAND); -+ outb(4 | 0x08, eth_nic_base+D8390_P0_RCR); -+} -+ - /************************************************************************** - NS8390_RESET - Reset adapter - **************************************************************************/ -@@ -238,7 +280,14 @@ - outb(eth_tx_start, eth_nic_base+D8390_P0_TPSR); - outb(eth_rx_start, eth_nic_base+D8390_P0_PSTART); - #ifdef INCLUDE_WD -- if (eth_flags & FLAG_790) outb(0, eth_nic_base + 0x09); -+ if (eth_flags & FLAG_790) { -+#ifdef WD_790_PIO -+ outb(0x10, eth_asic_base + 0x06); /* disable interrupts, enable PIO */ -+ outb(0x01, eth_nic_base + 0x09); /* enable ring read auto-wrap */ -+#else -+ outb(0, eth_nic_base + 0x09); -+#endif -+ } - #endif - outb(eth_memsize, eth_nic_base+D8390_P0_PSTOP); - outb(eth_memsize - 1, eth_nic_base+D8390_P0_BOUND); -@@ -266,8 +315,10 @@ - outb(D8390_COMMAND_PS0 | - D8390_COMMAND_RD2 | D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); - outb(0xFF, eth_nic_base+D8390_P0_ISR); -- outb(0, eth_nic_base+D8390_P0_TCR); -- outb(4, eth_nic_base+D8390_P0_RCR); /* allow broadcast frames */ -+ outb(0, eth_nic_base+D8390_P0_TCR); /* transmitter on */ -+ outb(4, eth_nic_base+D8390_P0_RCR); /* allow rx broadcast frames */ -+ -+ enable_multicast(eth_nic_base); - - #ifdef INCLUDE_3C503 - /* -@@ -281,7 +332,7 @@ - #endif - } - --static int ns8390_poll(struct nic *nic); -+static int ns8390_poll(struct nic *nic, int retrieve); - - #ifndef INCLUDE_3C503 - /************************************************************************** -@@ -324,7 +375,7 @@ - - /* clear the RX ring, acknowledge overrun interrupt */ - eth_drain_receiver = 1; -- while (ns8390_poll(nic)) -+ while (ns8390_poll(nic, 1)) - /* Nothing */; - eth_drain_receiver = 0; - outb(D8390_ISR_OVW, eth_nic_base+D8390_P0_ISR); -@@ -344,50 +395,54 @@ - unsigned int s, /* size */ - const char *p) /* Packet */ - { -+#if defined(INCLUDE_3C503) || (defined(INCLUDE_WD) && ! defined(WD_790_PIO)) -+ Address eth_vmem = bus_to_virt(eth_bmem); -+#endif - #ifdef INCLUDE_3C503 - if (!(eth_flags & FLAG_PIO)) { -- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ -- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -- *((char *)eth_bmem+12) = t>>8; /* type */ -- *((char *)eth_bmem+13) = t; -- memcpy((char *)eth_bmem+ETH_HLEN, p, s); -+ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ -+ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -+ *((char *)eth_vmem+12) = t>>8; /* type */ -+ *((char *)eth_vmem+13) = t; -+ memcpy((char *)eth_vmem+ETH_HLEN, p, s); - s += ETH_HLEN; -- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; -+ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; - } - #endif - - #ifdef INCLUDE_WD -- /* Memory interface */ - if (eth_flags & FLAG_16BIT) { - outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); - inb(0x84); - } -+#ifndef WD_790_PIO -+ /* Memory interface */ - if (eth_flags & FLAG_790) { - outb(WD_MSR_MENB, eth_asic_base + WD_MSR); - inb(0x84); - } - inb(0x84); -- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ -- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -- *((char *)eth_bmem+12) = t>>8; /* type */ -- *((char *)eth_bmem+13) = t; -- memcpy((char *)eth_bmem+ETH_HLEN, p, s); -+ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ -+ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -+ *((char *)eth_vmem+12) = t>>8; /* type */ -+ *((char *)eth_vmem+13) = t; -+ memcpy((char *)eth_vmem+ETH_HLEN, p, s); - s += ETH_HLEN; -- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; -+ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; - if (eth_flags & FLAG_790) { - outb(0, eth_asic_base + WD_MSR); - inb(0x84); - } -- if (eth_flags & FLAG_16BIT) { -- outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); -- inb(0x84); -- } -+#else -+ inb(0x84); -+#endif - #endif - - #if defined(INCLUDE_3C503) -- if (eth_flags & FLAG_PIO) { -+ if (eth_flags & FLAG_PIO) - #endif --#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) -+#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) -+ { - /* Programmed I/O */ - unsigned short type; - type = (t >> 8) | (t << 8); -@@ -398,12 +453,16 @@ - eth_pio_write(p, (eth_tx_start<<8)+ETH_HLEN, s); - s += ETH_HLEN; - if (s < ETH_ZLEN) s = ETH_ZLEN; -+ } - #endif - #if defined(INCLUDE_3C503) -- } - #endif - - #ifdef INCLUDE_WD -+ if (eth_flags & FLAG_16BIT) { -+ outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); -+ inb(0x84); -+ } - if (eth_flags & FLAG_790) - outb(D8390_COMMAND_PS0 | - D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); -@@ -428,7 +487,7 @@ - /************************************************************************** - NS8390_POLL - Wait for a frame - **************************************************************************/ --static int ns8390_poll(struct nic *nic) -+static int ns8390_poll(struct nic *nic, int retrieve) - { - int ret = 0; - unsigned char rstat, curr, next; -@@ -453,22 +512,27 @@ - outb(D8390_COMMAND_PS0, eth_nic_base+D8390_P0_COMMAND); - if (curr >= eth_memsize) curr=eth_rx_start; - if (curr == next) return(0); -+ -+ if ( ! retrieve ) return 1; -+ - #ifdef INCLUDE_WD - if (eth_flags & FLAG_16BIT) { - outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); - inb(0x84); - } -+#ifndef WD_790_PIO - if (eth_flags & FLAG_790) { - outb(WD_MSR_MENB, eth_asic_base + WD_MSR); - inb(0x84); - } -+#endif - inb(0x84); - #endif - pktoff = next << 8; - if (eth_flags & FLAG_PIO) - eth_pio_read(pktoff, (char *)&pkthdr, 4); - else -- memcpy(&pkthdr, (char *)eth_rmem + pktoff, 4); -+ memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4); - pktoff += sizeof(pkthdr); - /* incoming length includes FCS so must sub 4 */ - len = pkthdr.len - 4; -@@ -486,7 +550,7 @@ - if (eth_flags & FLAG_PIO) - eth_pio_read(pktoff, p, frag); - else -- memcpy(p, (char *)eth_rmem + pktoff, frag); -+ memcpy(p, bus_to_virt(eth_rmem + pktoff), frag); - pktoff = eth_rx_start << 8; - p += frag; - len -= frag; -@@ -495,14 +559,16 @@ - if (eth_flags & FLAG_PIO) - eth_pio_read(pktoff, p, len); - else -- memcpy(p, (char *)eth_rmem + pktoff, len); -+ memcpy(p, bus_to_virt(eth_rmem + pktoff), len); - ret = 1; - } - #ifdef INCLUDE_WD -+#ifndef WD_790_PIO - if (eth_flags & FLAG_790) { - outb(0, eth_asic_base + WD_MSR); - inb(0x84); - } -+#endif - if (eth_flags & FLAG_16BIT) { - outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); - inb(0x84); -@@ -519,31 +585,56 @@ - /************************************************************************** - NS8390_DISABLE - Turn off adapter - **************************************************************************/ --static void ns8390_disable(struct nic *nic) -+static void ns8390_disable(struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; -+ /* reset and disable merge */ -+ ns8390_reset(nic); -+} -+ -+/************************************************************************** -+NS8390_IRQ - Enable, Disable, or Force interrupts -+**************************************************************************/ -+static void ns8390_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } - } - - /************************************************************************** - ETH_PROBE - Look for an adapter - **************************************************************************/ - #ifdef INCLUDE_NS8390 --struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs, -- struct pci_device *pci) -+static int eth_probe (struct dev *dev, struct pci_device *pci) - #else --struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs) -+static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) - #endif - { -+ struct nic *nic = (struct nic *)dev; - int i; -- struct wd_board *brd; -- unsigned short chksum; -- unsigned char c; -+#ifdef INCLUDE_NS8390 -+ unsigned short pci_probe_addrs[] = { pci->ioaddr, 0 }; -+ unsigned short *probe_addrs = pci_probe_addrs; -+#endif - eth_vendor = VENDOR_NONE; - eth_drain_receiver = 0; - -+ nic->irqno = 0; -+ - #ifdef INCLUDE_WD -+{ - /****************************************************************** - Search for WD/SMC cards - ******************************************************************/ -+ struct wd_board *brd; -+ unsigned short chksum; -+ unsigned char c; - for (eth_asic_base = WD_LOW_BASE; eth_asic_base <= WD_HIGH_BASE; - eth_asic_base += 0x20) { - chksum = 0; -@@ -560,6 +651,9 @@ - /* We've found a board */ - eth_vendor = VENDOR_WD; - eth_nic_base = eth_asic_base + WD_NIC_ADDR; -+ -+ nic->ioaddr = eth_nic_base; -+ - c = inb(eth_asic_base+WD_BID); /* Get board id */ - for (brd = wd_boards; brd->name; brd++) - if (brd->id == c) break; -@@ -582,8 +676,9 @@ - } else - eth_bmem = WD_DEFAULT_MEM; - if (brd->id == TYPE_SMC8216T || brd->id == TYPE_SMC8216C) { -- *((unsigned int *)(eth_bmem + 8192)) = (unsigned int)0; -- if (*((unsigned int *)(eth_bmem + 8192))) { -+ /* from Linux driver, 8416BT detects as 8216 sometimes */ -+ unsigned int addr = inb(eth_asic_base + 0xb); -+ if (((addr >> 4) & 3) == 0) { - brd += 2; - eth_memsize = brd->memsize; - } -@@ -592,19 +687,27 @@ - for (i=0; inode_addr[i] = inb(i+eth_asic_base+WD_LAR); - } -- printf("\n%s base %#hx, memory %#hx, addr %!\n", -- brd->name, eth_asic_base, eth_bmem, nic->node_addr); -+ printf("\n%s base %#hx", brd->name, eth_asic_base); - if (eth_flags & FLAG_790) { -+#ifdef WD_790_PIO -+ printf(", PIO mode, addr %!\n", nic->node_addr); -+ eth_bmem = 0; -+ eth_flags |= FLAG_PIO; /* force PIO mode */ -+ outb(0, eth_asic_base+WD_MSR); -+#else -+ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); - outb(WD_MSR_MENB, eth_asic_base+WD_MSR); - outb((inb(eth_asic_base+0x04) | - 0x80), eth_asic_base+0x04); -- outb((((unsigned)eth_bmem >> 13) & 0x0F) | -- (((unsigned)eth_bmem >> 11) & 0x40) | -+ outb(((unsigned)(eth_bmem >> 13) & 0x0F) | -+ ((unsigned)(eth_bmem >> 11) & 0x40) | - (inb(eth_asic_base+0x0B) & 0xB0), eth_asic_base+0x0B); - outb((inb(eth_asic_base+0x04) & - ~0x80), eth_asic_base+0x04); -+#endif - } else { -- outb((((unsigned)eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); -+ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); -+ outb(((unsigned)(eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); - } - if (eth_flags & FLAG_16BIT) { - if (eth_flags & FLAG_790) { -@@ -624,8 +727,14 @@ - } - inb(0x84); - } -+} - #endif - #ifdef INCLUDE_3C503 -+#ifdef T503_AUI -+ nic->flags = 1; /* aui */ -+#else -+ nic->flags = 0; /* no aui */ -+#endif - /****************************************************************** - Search for 3Com 3c503 if no WD/SMC cards - ******************************************************************/ -@@ -708,11 +817,12 @@ - /* Get our ethernet address */ - - outb(_3COM_CR_EALO | _3COM_CR_XSEL, eth_asic_base + _3COM_CR); -+ nic->ioaddr = eth_nic_base; - printf("\n3Com 3c503 base %#hx, ", eth_nic_base); - if (eth_flags & FLAG_PIO) - printf("PIO mode"); - else -- printf("memory %#hx", eth_bmem); -+ printf("memory %#x", eth_bmem); - for (i=0; inode_addr[i] = inb(eth_nic_base+i); - } -@@ -734,9 +844,9 @@ - */ - - if (!(eth_flags & FLAG_PIO)) { -- memset((char *)eth_bmem, 0, 0x2000); -+ memset(bus_to_virt(eth_bmem), 0, 0x2000); - for(i = 0; i < 0x2000; ++i) -- if (*(((char *)eth_bmem)+i)) { -+ if (*((char *)(bus_to_virt(eth_bmem+i)))) { - printf ("Failed to clear 3c503 shared mem.\n"); - return (0); - } -@@ -749,9 +859,11 @@ - } - #endif - #if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) -+{ - /****************************************************************** - Search for NE1000/2000 if no WD/SMC or 3com cards - ******************************************************************/ -+ unsigned char c; - if (eth_vendor == VENDOR_NONE) { - char romdata[16], testbuf[32]; - int idx; -@@ -810,23 +922,94 @@ - for (i=0; inode_addr[i] = romdata[i + ((eth_flags & FLAG_16BIT) ? i : 0)]; - } -+ nic->ioaddr = eth_nic_base; - printf("\nNE%c000 base %#hx, addr %!\n", - (eth_flags & FLAG_16BIT) ? '2' : '1', eth_nic_base, - nic->node_addr); - } -+} - #endif - if (eth_vendor == VENDOR_NONE) - return(0); - if (eth_vendor != VENDOR_3COM) - eth_rmem = eth_bmem; - ns8390_reset(nic); -- nic->reset = ns8390_reset; -- nic->poll = ns8390_poll; -+ -+ dev->disable = ns8390_disable; -+ nic->poll = ns8390_poll; - nic->transmit = ns8390_transmit; -- nic->disable = ns8390_disable; -- return(nic); -+ nic->irq = ns8390_irq; -+ -+ /* Based on PnP ISA map */ -+#ifdef INCLUDE_WD -+ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); -+ dev->devid.device_id = htons(0x812a); -+#endif -+#ifdef INCLUDE_3C503 -+ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); -+ dev->devid.device_id = htons(0x80f3); -+#endif -+#ifdef INCLUDE_NE -+ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); -+ dev->devid.device_id = htons(0x80d6); -+#endif -+ return 1; - } - -+#ifdef INCLUDE_WD -+static struct isa_driver wd_driver __isa_driver = { -+ .type = NIC_DRIVER, -+ .name = "WD", -+ .probe = wd_probe, -+ .ioaddrs = 0, -+}; -+#endif -+ -+#ifdef INCLUDE_3C503 -+static struct isa_driver t503_driver __isa_driver = { -+ .type = NIC_DRIVER, -+ .name = "3C503", -+ .probe = t503_probe, -+ .ioaddrs = 0, -+}; -+#endif -+ -+#ifdef INCLUDE_NE -+static struct isa_driver ne_driver __isa_driver = { -+ .type = NIC_DRIVER, -+ .name = "NE*000", -+ .probe = ne_probe, -+ .ioaddrs = 0, -+}; -+#endif -+ -+#ifdef INCLUDE_NS8390 -+static struct pci_id nepci_nics[] = { -+/* A few NE2000 PCI clones, list not exhaustive */ -+PCI_ROM(0x10ec, 0x8029, "rtl8029", "Realtek 8029"), -+PCI_ROM(0x1186, 0x0300, "dlink-528", "D-Link DE-528"), -+PCI_ROM(0x1050, 0x0940, "winbond940", "Winbond NE2000-PCI"), /* Winbond 86C940 / 89C940 */ -+PCI_ROM(0x1050, 0x5a5a, "winbond940f", "Winbond W89c940F"), /* Winbond 89C940F */ -+PCI_ROM(0x11f6, 0x1401, "compexrl2000", "Compex ReadyLink 2000"), -+PCI_ROM(0x8e2e, 0x3000, "ktiet32p2", "KTI ET32P2"), -+PCI_ROM(0x4a14, 0x5000, "nv5000sc", "NetVin NV5000SC"), -+PCI_ROM(0x12c3, 0x0058, "holtek80232", "Holtek HT80232"), -+PCI_ROM(0x12c3, 0x5598, "holtek80229", "Holtek HT80229"), -+PCI_ROM(0x10bd, 0x0e34, "surecom-ne34", "Surecom NE34"), -+PCI_ROM(0x1106, 0x0926, "via86c926", "Via 86c926"), -+}; -+ -+struct pci_driver nepci_driver = { -+ .type = NIC_DRIVER, -+ .name = "NE2000/PCI", -+ .probe = nepci_probe, -+ .ids = nepci_nics, -+ .id_count = sizeof(nepci_nics)/sizeof(nepci_nics[0]), -+ .class = 0, -+}; -+ -+#endif /* INCLUDE_NS8390 */ -+ - /* - * Local variables: - * c-basic-offset: 8 -Index: b/netboot/osdep.h -=================================================================== ---- a/netboot/osdep.h -+++ b/netboot/osdep.h -@@ -1,94 +1,18 @@ --#ifndef __OSDEP_H__ --#define __OSDEP_H__ -+#ifndef _OSDEP_H -+#define _OSDEP_H - --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -+#define __unused __attribute__((unused)) -+#define __aligned __attribute__((aligned(16))) - --#define __LITTLE_ENDIAN /* x86 */ -- --/* Taken from /usr/include/linux/hfs_sysdep.h */ --#if defined(__BIG_ENDIAN) --# if !defined(__constant_htonl) --# define __constant_htonl(x) (x) --# endif --# if !defined(__constant_htons) --# define __constant_htons(x) (x) --# endif --#elif defined(__LITTLE_ENDIAN) --# if !defined(__constant_htonl) --# define __constant_htonl(x) \ -- ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ -- (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ -- (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ -- (((unsigned long int)(x) & 0xff000000U) >> 24))) --# endif --# if !defined(__constant_htons) --# define __constant_htons(x) \ -- ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ -- (((unsigned short int)(x) & 0xff00) >> 8))) --# endif --#else --# error "Don't know if bytes are big- or little-endian!" --#endif -- --#define ntohl(x) \ --(__builtin_constant_p(x) ? \ -- __constant_htonl((x)) : \ -- __swap32(x)) --#define htonl(x) \ --(__builtin_constant_p(x) ? \ -- __constant_htonl((x)) : \ -- __swap32(x)) --#define ntohs(x) \ --(__builtin_constant_p(x) ? \ -- __constant_htons((x)) : \ -- __swap16(x)) --#define htons(x) \ --(__builtin_constant_p(x) ? \ -- __constant_htons((x)) : \ -- __swap16(x)) -- --static inline unsigned long int __swap32(unsigned long int x) --{ -- __asm__("xchgb %b0,%h0\n\t" -- "rorl $16,%0\n\t" -- "xchgb %b0,%h0" -- : "=q" (x) -- : "0" (x)); -- return x; --} -- --static inline unsigned short int __swap16(unsigned short int x) --{ -- __asm__("xchgb %b0,%h0" -- : "=q" (x) -- : "0" (x)); -- return x; --} -- --/* Make routines available to all */ --#define swap32(x) __swap32(x) --#define swap16(x) __swap16(x) -- --#include "linux-asm-io.h" -- --typedef unsigned long Address; -+#include "io.h" -+#include "byteswap.h" -+#include "latch.h" - - /* ANSI prototyping macro */ - #ifdef __STDC__ --#define P(x) x -+# define P(x) x - #else --#define P(x) () -+# define P(x) () - #endif - - #endif -- --/* -- * Local variables: -- * c-basic-offset: 8 -- * End: -- */ -Index: b/netboot/otulip.c -=================================================================== ---- a/netboot/otulip.c -+++ /dev/null -@@ -1,374 +0,0 @@ --/* -- Etherboot DEC Tulip driver -- adapted by Ken Yap from -- -- FreeBSD netboot DEC 21143 driver -- -- Author: David Sharp -- date: Nov/98 -- -- Known to work on DEC DE500 using 21143-PC chipset. -- Even on cards with the same chipset there can be -- incompatablity problems with the way media selection -- and status LED settings are done. See comments below. -- -- Some code fragments were taken from verious places, -- Ken Yap's etherboot, FreeBSD's if_de.c, and various -- Linux related files. DEC's manuals for the 21143 and -- SROM format were very helpful. The Linux de driver -- development page has a number of links to useful -- related information. Have a look at: -- ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/tulip-devel.html -- --*/ -- --#include "etherboot.h" --#include "nic.h" --#include "pci.h" --#include "cards.h" --#include "otulip.h" -- --static unsigned short vendor, dev_id; --static unsigned short ioaddr; --static unsigned int *membase; --static unsigned char srom[1024]; -- --#define BUFLEN 1536 /* must be longword divisable */ -- /* buffers must be longword aligned */ -- --/* transmit descriptor and buffer */ --static struct txdesc txd; -- --/* receive descriptor(s) and buffer(s) */ --#define NRXD 4 --static struct rxdesc rxd[NRXD]; --static int rxd_tail = 0; --#ifdef USE_LOWMEM_BUFFER --#define rxb ((char *)0x10000 - NRXD * BUFLEN) --#define txb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) --#else --static unsigned char rxb[NRXD * BUFLEN]; --static unsigned char txb[BUFLEN]; --#endif -- --static unsigned char ehdr[ETH_HLEN]; /* buffer for ethernet header */ -- --enum tulip_offsets { -- CSR0=0, CSR1=0x08, CSR2=0x10, CSR3=0x18, CSR4=0x20, CSR5=0x28, -- CSR6=0x30, CSR7=0x38, CSR8=0x40, CSR9=0x48, CSR10=0x50, CSR11=0x58, -- CSR12=0x60, CSR13=0x68, CSR14=0x70, CSR15=0x78 }; -- -- --/***************************************************************************/ --/* 21143 specific stuff */ --/***************************************************************************/ -- --/* XXX assume 33MHz PCI bus, this is not very accurate and should be -- used only with gross over estimations of required delay times unless -- you tune UADJUST to your specific processor and I/O subsystem */ -- --#define UADJUST 870 --static void udelay(unsigned long usec) { -- unsigned long i; -- for (i=((usec*UADJUST)/33)+1; i>0; i--) (void) TULIP_CSR_READ(csr_0); --} -- --/* The following srom related code was taken from FreeBSD's if_de.c */ --/* with minor alterations to make it work here. the Linux code is */ --/* better but this was easier to use */ -- --static void delay_300ns(void) --{ -- int idx; -- for (idx = (300 / 33) + 1; idx > 0; idx--) -- (void) TULIP_CSR_READ(csr_busmode); --} -- --#define EMIT do { TULIP_CSR_WRITE(csr_srom_mii, csr); delay_300ns(); } while (0) -- --static void srom_idle(void) --{ -- unsigned bit, csr; -- -- csr = SROMSEL ; EMIT; -- csr = SROMSEL | SROMRD; EMIT; -- csr ^= SROMCS; EMIT; -- csr ^= SROMCLKON; EMIT; -- /* -- * Write 25 cycles of 0 which will force the SROM to be idle. -- */ -- for (bit = 3 + SROM_BITWIDTH + 16; bit > 0; bit--) { -- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ -- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ -- } -- csr ^= SROMCLKOFF; EMIT; -- csr ^= SROMCS; EMIT; -- csr = 0; EMIT; --} -- --static void srom_read(void) --{ -- unsigned idx; -- const unsigned bitwidth = SROM_BITWIDTH; -- const unsigned cmdmask = (SROMCMD_RD << bitwidth); -- const unsigned msb = 1 << (bitwidth + 3 - 1); -- unsigned lastidx = (1 << bitwidth) - 1; -- -- srom_idle(); -- -- for (idx = 0; idx <= lastidx; idx++) { -- unsigned lastbit, data, bits, bit, csr; -- csr = SROMSEL ; EMIT; -- csr = SROMSEL | SROMRD; EMIT; -- csr ^= SROMCSON; EMIT; -- csr ^= SROMCLKON; EMIT; -- -- lastbit = 0; -- for (bits = idx|cmdmask, bit = bitwidth + 3; bit > 0; bit--, bits <<= 1) -- { -- const unsigned thisbit = bits & msb; -- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ -- if (thisbit != lastbit) { -- csr ^= SROMDOUT; EMIT; /* clock low; invert data */ -- } else { -- EMIT; -- } -- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ -- lastbit = thisbit; -- } -- csr ^= SROMCLKOFF; EMIT; -- -- for (data = 0, bits = 0; bits < 16; bits++) { -- data <<= 1; -- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ -- data |= TULIP_CSR_READ(csr_srom_mii) & SROMDIN ? 1 : 0; -- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ -- } -- srom[idx*2] = data & 0xFF; -- srom[idx*2+1] = data >> 8; -- csr = SROMSEL | SROMRD; EMIT; -- csr = 0; EMIT; -- } -- srom_idle(); --} -- --/************************************************************************** --ETH_RESET - Reset adapter --***************************************************************************/ --static void tulip_reset(struct nic *nic) --{ -- int x,cnt=2; -- -- outl(0x00000001, ioaddr + CSR0); -- udelay(1000); -- /* turn off reset and set cache align=16lword, burst=unlimit */ -- outl(0x01A08000, ioaddr + CSR0); -- -- /* for some reason the media selection does not take -- the first time se it is repeated. */ -- -- while(cnt--) { -- /* stop TX,RX processes */ -- if (cnt == 1) -- outl(0x32404000, ioaddr + CSR6); -- else -- outl(0x32000040, ioaddr + CSR6); -- -- /* XXX - media selection is vendor specific and hard coded right -- here. This should be fixed to use the hints in the SROM and -- allow media selection by the user at runtime. MII support -- should also be added. Support for chips other than the -- 21143 should be added here as well */ -- -- /* start set to 10Mbps half-duplex */ -- -- /* setup SIA */ -- outl(0x0, ioaddr + CSR13); /* reset SIA */ -- outl(0x7f3f, ioaddr + CSR14); -- outl(0x8000008, ioaddr + CSR15); -- outl(0x0, ioaddr + CSR13); -- outl(0x1, ioaddr + CSR13); -- outl(0x2404000, ioaddr + CSR6); -- -- /* initalize GP */ -- outl(0x8af0008, ioaddr + CSR15); -- outl(0x50008, ioaddr + CSR15); -- -- /* end set to 10Mbps half-duplex */ -- -- if (vendor == PCI_VENDOR_ID_MACRONIX && dev_id == PCI_DEVICE_ID_MX987x5) { -- /* do stuff for MX98715 */ -- outl(0x01a80000, ioaddr + CSR6); -- outl(0xFFFFFFFF, ioaddr + CSR14); -- outl(0x00001000, ioaddr + CSR12); -- } -- -- outl(0x0, ioaddr + CSR7); /* disable interrupts */ -- -- /* construct setup packet which is used by the 21143 to -- program its CAM to recognize interesting MAC addresses */ -- -- memset(&txd, 0, sizeof(struct txdesc)); -- txd.buf1addr = &txb[0]; -- txd.buf2addr = &txb[0]; /* just in case */ -- txd.buf1sz = 192; /* setup packet must be 192 bytes */ -- txd.buf2sz = 0; -- txd.control = 0x020; /* setup packet */ -- txd.status = 0x80000000; /* give ownership to 21143 */ -- -- /* construct perfect filter frame */ -- /* with mac address as first match */ -- /* and broadcast address for all others */ -- -- for(x=0;x<192;x++) txb[x] = 0xff; -- txb[0] = nic->node_addr[0]; -- txb[1] = nic->node_addr[1]; -- txb[4] = nic->node_addr[2]; -- txb[5] = nic->node_addr[3]; -- txb[8] = nic->node_addr[4]; -- txb[9] = nic->node_addr[5]; -- outl((unsigned long)&txd, ioaddr + CSR4); /* set xmit buf */ -- outl(0x2406000, ioaddr + CSR6); /* start transmiter */ -- -- udelay(50000); /* wait for the setup packet to be processed */ -- -- } -- -- /* setup receive descriptor */ -- { -- int x; -- for(x=0;xnode_addr, ETH_ALEN); -- ehdr[ETH_ALEN*2] = (t >> 8) & 0xff; -- ehdr[ETH_ALEN*2+1] = t & 0xff; -- -- /* setup the transmit descriptor */ -- -- memset(&txd, 0, sizeof(struct txdesc)); -- -- txd.buf1addr = &ehdr[0]; /* ethernet header */ -- txd.buf1sz = ETH_HLEN; -- -- txd.buf2addr = p; /* packet to transmit */ -- txd.buf2sz = s; -- -- txd.control = 0x188; /* LS+FS+TER */ -- -- txd.status = 0x80000000; /* give it to 21143 */ -- -- outl(inl(ioaddr + CSR6) & ~0x00004000, ioaddr + CSR6); -- outl((unsigned long)&txd, ioaddr + CSR4); -- outl(inl(ioaddr + CSR6) | 0x00004000, ioaddr + CSR6); -- --/* Wait for transmit to complete before returning. not well tested. -- -- time = currticks(); -- while(txd.status & 0x80000000) { -- if (currticks() - time > 20) { -- printf("transmit timeout.\n"); -- break; -- } -- } --*/ -- --} -- --/************************************************************************** --ETH_POLL - Wait for a frame --***************************************************************************/ --static int tulip_poll(struct nic *nic) --{ -- if (rxd[rxd_tail].status & 0x80000000) return 0; -- -- nic->packetlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; -- -- /* copy packet to working buffer */ -- /* XXX - this copy could be avoided with a little more work -- but for now we are content with it because the optimised -- memcpy(, , ) is quite fast */ -- -- memcpy(nic->packet, rxb + rxd_tail * BUFLEN, nic->packetlen); -- -- /* return the descriptor and buffer to recieve ring */ -- rxd[rxd_tail].status = 0x80000000; -- rxd_tail++; -- if (rxd_tail == NRXD) rxd_tail = 0; -- -- return 1; --} -- --static void tulip_disable(struct nic *nic) --{ -- /* nothing for the moment */ --} -- --/************************************************************************** --ETH_PROBE - Look for an adapter --***************************************************************************/ --struct nic *otulip_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) --{ -- int i; -- -- if (io_addrs == 0 || *io_addrs == 0) -- return (0); -- vendor = pci->vendor; -- dev_id = pci->dev_id; -- ioaddr = *io_addrs; -- membase = (unsigned int *)pci->membase; -- -- /* wakeup chip */ -- pcibios_write_config_dword(pci->bus,pci->devfn,0x40,0x00000000); -- -- /* Stop the chip's Tx and Rx processes. */ -- /* outl(inl(ioaddr + CSR6) & ~0x2002, ioaddr + CSR6); */ -- /* Clear the missed-packet counter. */ -- /* (volatile int)inl(ioaddr + CSR8); */ -- -- srom_read(); -- -- for (i=0; i < ETH_ALEN; i++) -- nic->node_addr[i] = srom[20+i]; -- -- printf("Tulip %! at ioaddr %#hX\n", nic->node_addr, ioaddr); -- -- tulip_reset(nic); -- -- nic->reset = tulip_reset; -- nic->poll = tulip_poll; -- nic->transmit = tulip_transmit; -- nic->disable = tulip_disable; -- return nic; --} -Index: b/netboot/otulip.h -=================================================================== ---- a/netboot/otulip.h -+++ /dev/null -@@ -1,76 +0,0 @@ --/* mostly stolen from FreeBSD if_de.c, if_devar.h */ -- --#define TULIP_CSR_READ(csr) (membase[csr*2]) --#define CSR_READ(csr) (membase[csr*2]) --#define TULIP_CSR_WRITE(csr, val) (membase[csr*2] = val) --#define CSR_WRITE(csr, val) (membase[csr*2] = val) -- --#define csr_0 0 --#define csr_1 1 --#define csr_2 2 --#define csr_3 3 --#define csr_4 4 --#define csr_5 5 --#define csr_6 6 --#define csr_7 7 --#define csr_8 8 --#define csr_9 9 --#define csr_10 10 --#define csr_11 11 --#define csr_12 12 --#define csr_13 13 --#define csr_14 14 --#define csr_15 15 -- --#define csr_busmode csr_0 --#define csr_txpoll csr_1 --#define csr_rxpoll csr_2 --#define csr_rxlist csr_3 --#define csr_txlist csr_4 --#define csr_status csr_5 --#define csr_command csr_6 --#define csr_intr csr_7 --#define csr_missed_frames csr_8 --#define csr_enetrom csr_9 /* 21040 */ --#define csr_reserved csr_10 /* 21040 */ --#define csr_full_duplex csr_11 /* 21040 */ --#define csr_bootrom csr_10 /* 21041/21140A/?? */ --#define csr_gp csr_12 /* 21140* */ --#define csr_watchdog csr_15 /* 21140* */ --#define csr_gp_timer csr_11 /* 21041/21140* */ --#define csr_srom_mii csr_9 /* 21041/21140* */ --#define csr_sia_status csr_12 /* 2104x */ --#define csr_sia_connectivity csr_13 /* 2104x */ --#define csr_sia_tx_rx csr_14 /* 2104x */ --#define csr_sia_general csr_15 /* 2104x */ -- --#define SROMSEL 0x0800 --#define SROMCS 0x0001 --#define SROMCLKON 0x0002 --#define SROMCLKOFF 0x0002 --#define SROMRD 0x4000 --#define SROMWR 0x2000 --#define SROM_BITWIDTH 6 --#define SROMCMD_RD 6 --#define SROMCSON 0x0001 --#define SROMDOUT 0x0004 --#define SROMDIN 0x0008 -- -- --struct txdesc { -- unsigned long status; /* owner, status */ -- unsigned long buf1sz:11, /* size of buffer 1 */ -- buf2sz:11, /* size of buffer 2 */ -- control:10; /* control bits */ -- const unsigned char *buf1addr; /* buffer 1 address */ -- const unsigned char *buf2addr; /* buffer 2 address */ --}; -- --struct rxdesc { -- unsigned long status; /* owner, status */ -- unsigned long buf1sz:11, /* size of buffer 1 */ -- buf2sz:11, /* size of buffer 2 */ -- control:10; /* control bits */ -- unsigned char *buf1addr; /* buffer 1 address */ -- unsigned char *buf2addr; /* buffer 2 address */ --}; -Index: b/netboot/pci.c -=================================================================== ---- a/netboot/pci.c -+++ b/netboot/pci.c -@@ -1,15 +1,3 @@ --/* --** Support for NE2000 PCI clones added David Monro June 1997 --** Generalised to other NICs by Ken Yap July 1997 --** --** Most of this is taken from: --** --** /usr/src/linux/drivers/pci/pci.c --** /usr/src/linux/include/linux/pci.h --** /usr/src/linux/arch/i386/bios32.c --** /usr/src/linux/include/linux/bios32.h --** /usr/src/linux/drivers/net/ne.c --*/ - - /* - * This program is free software; you can redistribute it and/or -@@ -18,402 +6,294 @@ - * your option) any later version. - */ - --#include "etherboot.h" -+#include "grub.h" - #include "pci.h" - --/*#define DEBUG 1*/ --#define DEBUG 0 -- --#ifdef CONFIG_PCI_DIRECT --#define PCIBIOS_SUCCESSFUL 0x00 -- --/* -- * Functions for accessing PCI configuration space with type 1 accesses -- */ -- --#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) -- --int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, -- unsigned int where, unsigned char *value) -+unsigned long virt_offset = 0; -+unsigned long virt_to_phys(volatile const void *virt_addr) - { -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- *value = inb(0xCFC + (where&3)); -- return PCIBIOS_SUCCESSFUL; -+ return ((unsigned long)virt_addr) + virt_offset; - } - --int pcibios_read_config_word (unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned short *value) -+void *phys_to_virt(unsigned long phys_addr) - { -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- *value = inw(0xCFC + (where&2)); -- return PCIBIOS_SUCCESSFUL; -+ return (void *)(phys_addr - virt_offset); - } - --int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, -- unsigned int where, unsigned int *value) --{ -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- *value = inl(0xCFC); -- return PCIBIOS_SUCCESSFUL; --} -+#ifdef INCLUDE_3C595 -+extern struct pci_driver t595_driver; -+#endif /* INCLUDE_3C595 */ - --int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, -- unsigned int where, unsigned char value) --{ -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- outb(value, 0xCFC + (where&3)); -- return PCIBIOS_SUCCESSFUL; --} -+#ifdef INCLUDE_3C90X -+extern struct pci_driver a3c90x_driver; -+#endif /* INCLUDE_3C90X */ - --int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, -- unsigned int where, unsigned short value) --{ -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- outw(value, 0xCFC + (where&2)); -- return PCIBIOS_SUCCESSFUL; --} -+#ifdef INCLUDE_DAVICOM -+extern struct pci_driver davicom_driver; -+#endif /* INCLUDE_DAVICOM */ - --int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value) --{ -- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -- outl(value, 0xCFC); -- return PCIBIOS_SUCCESSFUL; --} -+#ifdef INCLUDE_E1000 -+extern struct pci_driver e1000_driver; -+#endif /* INCLUDE_E1000 */ - --#undef CONFIG_CMD -+#ifdef INCLUDE_EEPRO100 -+extern struct pci_driver eepro100_driver; -+#endif /* INCLUDE_EEPRO100 */ - --#else /* CONFIG_PCI_DIRECT not defined */ -+#ifdef INCLUDE_EPIC100 -+extern struct pci_driver epic100_driver; -+#endif /* INCLUDE_EPIC100 */ - --static struct { -- unsigned long address; -- unsigned short segment; --} bios32_indirect = { 0, KERN_CODE_SEG }; -- --static long pcibios_entry; --static struct { -- unsigned long address; -- unsigned short segment; --} pci_indirect = { 0, KERN_CODE_SEG }; -+#ifdef INCLUDE_FORCEDETH -+extern struct pci_driver forcedeth_driver; -+#endif /* INCLUDE_FORCEDETH */ - --static unsigned long bios32_service(unsigned long service) --{ -- unsigned char return_code; /* %al */ -- unsigned long address; /* %ebx */ -- unsigned long length; /* %ecx */ -- unsigned long entry; /* %edx */ -- unsigned long flags; -- -- save_flags(flags); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%edi)" --#else -- "lcall *(%%edi)" --#endif -- : "=a" (return_code), -- "=b" (address), -- "=c" (length), -- "=d" (entry) -- : "0" (service), -- "1" (0), -- "D" (&bios32_indirect)); -- restore_flags(flags); -- -- switch (return_code) { -- case 0: -- return address + entry; -- case 0x80: /* Not present */ -- printf("bios32_service(%d) : not present\n", service); -- return 0; -- default: /* Shouldn't happen */ -- printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", -- service, return_code); -- return 0; -- } --} -+#ifdef INCLUDE_NATSEMI -+extern struct pci_driver natsemi_driver; -+#endif /* INCLUDE_NATSEMI */ - --int pcibios_read_config_byte(unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned char *value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=c" (*value), -- "=a" (ret) -- : "1" (PCIBIOS_READ_CONFIG_BYTE), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_NS83820 -+extern struct pci_driver ns83820_driver; -+#endif /* INCLUDE_NS83820 */ - --int pcibios_read_config_word(unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned short *value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=c" (*value), -- "=a" (ret) -- : "1" (PCIBIOS_READ_CONFIG_WORD), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_NS8390 -+extern struct pci_driver nepci_driver; -+#endif /* INCLUDE_NS8390 */ - --int pcibios_read_config_dword(unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned int *value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=c" (*value), -- "=a" (ret) -- : "1" (PCIBIOS_READ_CONFIG_DWORD), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_PCNET32 -+extern struct pci_driver pcnet32_driver; -+#endif /* INCLUDE_PCNET32 */ - --int pcibios_write_config_byte (unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned char value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); cli(); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=a" (ret) -- : "0" (PCIBIOS_WRITE_CONFIG_BYTE), -- "c" (value), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_PNIC -+extern struct pci_driver pnic_driver; -+#endif /* INCLUDE_PNIC */ - --int pcibios_write_config_word (unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned short value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); cli(); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=a" (ret) -- : "0" (PCIBIOS_WRITE_CONFIG_WORD), -- "c" (value), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_RTL8139 -+extern struct pci_driver rtl8139_driver; -+#endif /* INCLUDE_RTL8139 */ - --int pcibios_write_config_dword (unsigned int bus, -- unsigned int device_fn, unsigned int where, unsigned int value) --{ -- unsigned long ret; -- unsigned long bx = (bus << 8) | device_fn; -- unsigned long flags; -- -- save_flags(flags); cli(); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%esi)\n\t" --#else -- "lcall *(%%esi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:" -- : "=a" (ret) -- : "0" (PCIBIOS_WRITE_CONFIG_DWORD), -- "c" (value), -- "b" (bx), -- "D" ((long) where), -- "S" (&pci_indirect)); -- restore_flags(flags); -- return (int) (ret & 0xff00) >> 8; --} -+#ifdef INCLUDE_SIS900 -+extern struct pci_driver sis900_driver; -+extern struct pci_driver sis_bridge_driver; -+#endif /* INCLUDE_SIS900 */ - --static void check_pcibios(void) --{ -- unsigned long signature; -- unsigned char present_status; -- unsigned char major_revision; -- unsigned char minor_revision; -- unsigned long flags; -- int pack; -- -- if ((pcibios_entry = bios32_service(PCI_SERVICE))) { -- pci_indirect.address = pcibios_entry; -- -- save_flags(flags); -- __asm__( --#ifdef ABSOLUTE_WITHOUT_ASTERISK -- "lcall (%%edi)\n\t" --#else -- "lcall *(%%edi)\n\t" --#endif -- "jc 1f\n\t" -- "xor %%ah, %%ah\n" -- "1:\tshl $8, %%eax\n\t" -- "movw %%bx, %%ax" -- : "=d" (signature), -- "=a" (pack) -- : "1" (PCIBIOS_PCI_BIOS_PRESENT), -- "D" (&pci_indirect) -- : "bx", "cx"); -- restore_flags(flags); -- -- present_status = (pack >> 16) & 0xff; -- major_revision = (pack >> 8) & 0xff; -- minor_revision = pack & 0xff; -- if (present_status || (signature != PCI_SIGNATURE)) { -- printf("ERROR: BIOS32 says PCI BIOS, but no PCI " -- "BIOS????\n"); -- pcibios_entry = 0; -- } --#if DEBUG -- if (pcibios_entry) { -- printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" -- " entry at %#X\n", major_revision, -- minor_revision, pcibios_entry); -- } --#endif -- } --} -+#ifdef INCLUDE_SUNDANCE -+extern struct pci_driver sundance_driver; -+#endif /* INCLUDE_SUNDANCE */ - --static void pcibios_init(void) --{ -- union bios32 *check; -- unsigned char sum; -- int i, length; -- unsigned long bios32_entry = 0; -- -- /* -- * Follow the standard procedure for locating the BIOS32 Service -- * directory by scanning the permissible address range from -- * 0xe0000 through 0xfffff for a valid BIOS32 structure. -- * -- */ -+#ifdef INCLUDE_TG3 -+extern struct pci_driver tg3_driver; -+#endif /* INCLUDE_TG3 */ -+ -+#ifdef INCLUDE_TLAN -+extern struct pci_driver tlan_driver; -+#endif /* INCLUDE_TLAN */ -+ -+#ifdef INCLUDE_TULIP -+extern struct pci_driver tulip_driver; -+#endif /* INCLUDE_TULIP */ -+ -+#ifdef INCLUDE_UNDI -+extern struct pci_driver undi_driver; -+#endif /* INCLUDE_UNDI */ -+ -+#ifdef INCLUDE_VIA_RHINE -+extern struct pci_driver rhine_driver; -+#endif/* INCLUDE_VIA_RHINE */ -+ -+#ifdef INCLUDE_W89C840 -+extern struct pci_driver w89c840_driver; -+#endif /* INCLUDE_W89C840 */ -+ -+#ifdef INCLUDE_R8169 -+extern struct pci_driver r8169_driver; -+#endif /* INCLUDE_R8169 */ -+ -+static const struct pci_driver *pci_drivers[] = { -+ -+#ifdef INCLUDE_3C595 -+ &t595_driver, -+#endif /* INCLUDE_3C595 */ -+ -+#ifdef INCLUDE_3C90X -+ &a3c90x_driver, -+#endif /* INCLUDE_3C90X */ -+ -+#ifdef INCLUDE_DAVICOM -+ &davicom_driver, -+#endif /* INCLUDE_DAVICOM */ -+ -+#ifdef INCLUDE_E1000 -+ &e1000_driver, -+#endif /* INCLUDE_E1000 */ -+ -+#ifdef INCLUDE_EEPRO100 -+ &eepro100_driver, -+#endif /* INCLUDE_EEPRO100 */ -+ -+#ifdef INCLUDE_EPIC100 -+ &epic100_driver, -+#endif /* INCLUDE_EPIC100 */ -+ -+#ifdef INCLUDE_FORCEDETH -+ &forcedeth_driver, -+#endif /* INCLUDE_FORCEDETH */ -+ -+#ifdef INCLUDE_NATSEMI -+ &natsemi_driver, -+#endif /* INCLUDE_NATSEMI */ -+ -+#ifdef INCLUDE_NS83820 -+ &ns83820_driver, -+#endif /* INCLUDE_NS83820 */ -+ -+#ifdef INCLUDE_NS8390 -+ &nepci_driver, -+#endif /* INCLUDE_NS8390 */ -+ -+#ifdef INCLUDE_PCNET32 -+ &pcnet32_driver, -+#endif /* INCLUDE_PCNET32 */ -+ -+#ifdef INCLUDE_PNIC -+ &pnic_driver, -+#endif /* INCLUDE_PNIC */ - -- for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { -- if (check->fields.signature != BIOS32_SIGNATURE) -+#ifdef INCLUDE_RTL8139 -+ &rtl8139_driver, -+#endif /* INCLUDE_RTL8139 */ -+ -+#ifdef INCLUDE_SIS900 -+ &sis900_driver, -+ &sis_bridge_driver, -+#endif /* INCLUDE_SIS900 */ -+ -+#ifdef INCLUDE_SUNDANCE -+ &sundance_driver, -+#endif /* INCLUDE_SUNDANCE */ -+ -+#ifdef INCLUDE_TG3 -+ & tg3_driver, -+#endif /* INCLUDE_TG3 */ -+ -+#ifdef INCLUDE_TLAN -+ &tlan_driver, -+#endif /* INCLUDE_TLAN */ -+ -+#ifdef INCLUDE_TULIP -+ & tulip_driver, -+#endif /* INCLUDE_TULIP */ -+ -+#ifdef INCLUDE_VIA_RHINE -+ &rhine_driver, -+#endif/* INCLUDE_VIA_RHINE */ -+ -+#ifdef INCLUDE_W89C840 -+ &w89c840_driver, -+#endif /* INCLUDE_W89C840 */ -+ -+#ifdef INCLUDE_R8169 -+ &r8169_driver, -+#endif /* INCLUDE_R8169 */ -+ -+/* We must be the last one */ -+#ifdef INCLUDE_UNDI -+ &undi_driver, -+#endif /* INCLUDE_UNDI */ -+ -+ 0 -+}; -+ -+static void scan_drivers( -+ int type, -+ uint32_t class, uint16_t vendor, uint16_t device, -+ const struct pci_driver *last_driver, struct pci_device *dev) -+{ -+ const struct pci_driver *skip_driver = last_driver; -+ /* Assume there is only one match of the correct type */ -+ const struct pci_driver *driver; -+ int i, j; -+ -+ for(j = 0; pci_drivers[j] != 0; j++){ -+ driver = pci_drivers[j]; -+ if (driver->type != type) - continue; -- length = check->fields.length * 16; -- if (!length) -+ if (skip_driver) { -+ if (skip_driver == driver) -+ skip_driver = 0; - continue; -- sum = 0; -- for (i = 0; i < length ; ++i) -- sum += check->chars[i]; -- if (sum != 0) -+ } -+ for(i = 0; i < driver->id_count; i++) { -+ if ((vendor == driver->ids[i].vendor) && -+ (device == driver->ids[i].dev_id)) { -+ -+ dev->driver = driver; -+ dev->name = driver->ids[i].name; -+ -+ goto out; -+ } -+ } -+ } -+ if (!class) { -+ goto out; -+ } -+ for(j = 0; pci_drivers[j] != 0; j++){ -+ driver = pci_drivers[j]; -+ if (driver->type != type) - continue; -- if (check->fields.revision != 0) { -- printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", -- check->fields.revision, check); -+ if (skip_driver) { -+ if (skip_driver == driver) -+ skip_driver = 0; - continue; - } --#if DEBUG -- printf("pcibios_init : BIOS32 Service Directory " -- "structure at %#X\n", check); --#endif -- if (!bios32_entry) { -- if (check->fields.entry >= 0x100000) { -- printf("pcibios_init: entry in high " -- "memory, giving up\n"); -- return; -- } else { -- bios32_entry = check->fields.entry; --#if DEBUG -- printf("pcibios_init : BIOS32 Service Directory" -- " entry at %#X\n", bios32_entry); --#endif -- bios32_indirect.address = bios32_entry; -- } -+ if (last_driver == driver) -+ continue; -+ if ((class >> 8) == driver->class) { -+ dev->driver = driver; -+ dev->name = driver->name; -+ goto out; - } - } -- if (bios32_entry) -- check_pcibios(); -+ out: -+ return; - } --#endif /* CONFIG_PCI_DIRECT not defined*/ - --static void scan_bus(struct pci_device *pcidev) -+void scan_pci_bus(int type, struct pci_device *dev) - { -- unsigned int devfn, l, bus, buses; -+ unsigned int first_bus, first_devfn; -+ const struct pci_driver *first_driver; -+ unsigned int devfn, bus, buses; - unsigned char hdr_type = 0; -- unsigned short vendor, device; -- unsigned int membase, ioaddr, romaddr; -- int i, reg; -- unsigned int pci_ioaddr = 0; -- -+ uint32_t class; -+ uint16_t vendor, device; -+ uint32_t l, membase, ioaddr, romaddr; -+ int reg; -+ -+ EnterFunction("scan_pci_bus"); -+ first_bus = 0; -+ first_devfn = 0; -+ first_driver = 0; -+ if (dev->driver) { -+ first_driver = dev->driver; -+ first_bus = dev->bus; -+ first_devfn = dev->devfn; -+ /* Re read the header type on a restart */ -+ pcibios_read_config_byte(first_bus, first_devfn & ~0x7, -+ PCI_HEADER_TYPE, &hdr_type); -+ dev->driver = 0; -+ dev->bus = 0; -+ dev->devfn = 0; -+ } -+ - /* Scan all PCI buses, until we find our card. -- * We could be smart only scan the required busses but that -+ * We could be smart only scan the required buses but that - * is error prone, and tricky. -- * By scanning all possible pci busses in order we should find -+ * By scanning all possible pci buses in order we should find - * our card eventually. - */ - buses=256; -- for (bus = 0; bus < buses; ++bus) { -- for (devfn = 0; devfn < 0xff; ++devfn) { -+ for (bus = first_bus; bus < buses; ++bus) { -+ for (devfn = first_devfn; devfn < 0xff; ++devfn, first_driver = 0) { - if (PCI_FUNC (devfn) == 0) - pcibios_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type); - else if (!(hdr_type & 0x80)) /* not a multi-function device */ -@@ -421,61 +301,90 @@ - pcibios_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l); - /* some broken boards return 0 if a slot is empty: */ - if (l == 0xffffffff || l == 0x00000000) { -- hdr_type = 0; - continue; - } - vendor = l & 0xffff; - device = (l >> 16) & 0xffff; - -+ pcibios_read_config_dword(bus, devfn, PCI_REVISION, &l); -+ class = (l >> 8) & 0xffffff; - #if DEBUG -- printf("bus %hhX, function %hhX, vendor %hX, device %hX\n", -- bus, devfn, vendor, device); -+ { -+ int i; -+ printf("%hhx:%hhx.%hhx [%hX/%hX] ---- ", -+ bus, PCI_SLOT(devfn), PCI_FUNC(devfn), -+ vendor, device); -+#if DEBUG > 1 -+ for(i = 0; i < 256; i++) { -+ unsigned char byte; -+ if ((i & 0xf) == 0) { -+ printf("%hhx: ", i); -+ } -+ pcibios_read_config_byte(bus, devfn, i, &byte); -+ printf("%hhx ", byte); -+ if ((i & 0xf) == 0xf) { -+ printf("\n"); -+ } -+ } -+#endif -+ -+ } -+#endif -+ scan_drivers(type, class, vendor, device, first_driver, dev); -+ if (!dev->driver){ -+#if DEBUG -+ printf("No driver fit.\n"); - #endif -- for (i = 0; pcidev[i].vendor != 0; i++) { -- if (vendor != pcidev[i].vendor -- || device != pcidev[i].dev_id) -+ continue; -+ } -+#if DEBUG -+ printf("Get Driver:\n"); -+#endif -+ dev->devfn = devfn; -+ dev->bus = bus; -+ dev->class = class; -+ dev->vendor = vendor; -+ dev->dev_id = device; -+ -+ -+ /* Get the ROM base address */ -+ pcibios_read_config_dword(bus, devfn, -+ PCI_ROM_ADDRESS, &romaddr); -+ romaddr >>= 10; -+ dev->romaddr = romaddr; -+ -+ /* Get the ``membase'' */ -+ pcibios_read_config_dword(bus, devfn, -+ PCI_BASE_ADDRESS_1, &membase); -+ dev->membase = membase; -+ -+ /* Get the ``ioaddr'' */ -+ for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { -+ pcibios_read_config_dword(bus, devfn, reg, &ioaddr); -+ if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) - continue; -- pcidev[i].devfn = devfn; -- pcidev[i].bus = bus; -- for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { -- pcibios_read_config_dword(bus, devfn, reg, &ioaddr); -- -- if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) -- continue; -- /* Strip the I/O address out of the returned value */ -- ioaddr &= PCI_BASE_ADDRESS_IO_MASK; -- /* Get the memory base address */ -- pcibios_read_config_dword(bus, devfn, -- PCI_BASE_ADDRESS_1, &membase); -- /* Get the ROM base address */ -- pcibios_read_config_dword(bus, devfn, PCI_ROM_ADDRESS, &romaddr); -- romaddr >>= 10; -- printf("Found %s at %#hx, ROM address %#hx\n", -- pcidev[i].name, ioaddr, romaddr); -- /* Take the first one or the one that matches in boot ROM address */ -- if (pci_ioaddr == 0 || romaddr == ((unsigned long) rom.rom_segment << 4)) { -- pcidev[i].membase = membase; -- pcidev[i].ioaddr = ioaddr; -- return; -- } -- } -+ -+ -+ /* Strip the I/O address out of the returned value */ -+ ioaddr &= PCI_BASE_ADDRESS_IO_MASK; -+ -+ /* Take the first one or the one that matches in boot ROM address */ -+ dev->ioaddr = ioaddr; - } -+#if DEBUG > 2 -+ printf("Found %s ROM address %#hx\n", -+ dev->name, romaddr); -+#endif -+ LeaveFunction("scan_pci_bus"); -+ return; - } -+ first_devfn = 0; - } -+ first_bus = 0; -+ LeaveFunction("scan_pci_bus"); - } - --void eth_pci_init(struct pci_device *pcidev) --{ --#ifndef CONFIG_PCI_DIRECT -- pcibios_init(); -- if (!pcibios_entry) { -- printf("pci_init: no BIOS32 detected\n"); -- return; -- } --#endif -- scan_bus(pcidev); -- /* return values are in pcidev structures */ --} -+ - - /* - * Set device to be a busmaster in case BIOS neglected to do so. -@@ -489,13 +398,134 @@ - pcibios_read_config_word(p->bus, p->devfn, PCI_COMMAND, &pci_command); - new_command = pci_command | PCI_COMMAND_MASTER|PCI_COMMAND_IO; - if (pci_command != new_command) { -- printf("The PCI BIOS has not enabled this device!\nUpdating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", -+#if DEBUG > 0 -+ printf( -+ "The PCI BIOS has not enabled this device!\n" -+ "Updating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", - pci_command, new_command, p->bus, p->devfn); -+#endif - pcibios_write_config_word(p->bus, p->devfn, PCI_COMMAND, new_command); - } - pcibios_read_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, &pci_latency); - if (pci_latency < 32) { -- printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", pci_latency); -+#if DEBUG > 0 -+ printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", -+ pci_latency); -+#endif - pcibios_write_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, 32); - } - } -+ -+/* -+ * Find the start of a pci resource. -+ */ -+unsigned long pci_bar_start(struct pci_device *dev, unsigned int index) -+{ -+ uint32_t lo, hi; -+ unsigned long bar; -+ pci_read_config_dword(dev, index, &lo); -+ if (lo & PCI_BASE_ADDRESS_SPACE_IO) { -+ bar = lo & PCI_BASE_ADDRESS_IO_MASK; -+ } else { -+ bar = 0; -+ if ((lo & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) { -+ pci_read_config_dword(dev, index + 4, &hi); -+ if (hi) { -+ if (sizeof(unsigned long) > sizeof(uint32_t)) { -+ bar = hi; -+ /* It's REALLY interesting:-) */ -+ bar <<=32; -+ } -+ else { -+ printf("Unhandled 64bit BAR\n"); -+ return -1UL; -+ } -+ } -+ } -+ bar |= lo & PCI_BASE_ADDRESS_MEM_MASK; -+ } -+ return bar + pcibios_bus_base(dev->bus); -+} -+ -+/* -+ * Find the size of a pci resource. -+ */ -+unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar) -+{ -+ uint32_t start, size; -+ /* Save the original bar */ -+ pci_read_config_dword(dev, bar, &start); -+ /* Compute which bits can be set */ -+ pci_write_config_dword(dev, bar, ~0); -+ pci_read_config_dword(dev, bar, &size); -+ /* Restore the original size */ -+ pci_write_config_dword(dev, bar, start); -+ /* Find the significant bits */ -+ if (start & PCI_BASE_ADDRESS_SPACE_IO) { -+ size &= PCI_BASE_ADDRESS_IO_MASK; -+ } else { -+ size &= PCI_BASE_ADDRESS_MEM_MASK; -+ } -+ /* Find the lowest bit set */ -+ size = size & ~(size - 1); -+ return size; -+} -+ -+/** -+ * pci_find_capability - query for devices' capabilities -+ * @dev: PCI device to query -+ * @cap: capability code -+ * -+ * Tell if a device supports a given PCI capability. -+ * Returns the address of the requested capability structure within the -+ * device's PCI configuration space or 0 in case the device does not -+ * support it. Possible values for @cap: -+ * -+ * %PCI_CAP_ID_PM Power Management -+ * -+ * %PCI_CAP_ID_AGP Accelerated Graphics Port -+ * -+ * %PCI_CAP_ID_VPD Vital Product Data -+ * -+ * %PCI_CAP_ID_SLOTID Slot Identification -+ * -+ * %PCI_CAP_ID_MSI Message Signalled Interrupts -+ * -+ * %PCI_CAP_ID_CHSWP CompactPCI HotSwap -+ */ -+int pci_find_capability(struct pci_device *dev, int cap) -+{ -+ uint16_t status; -+ uint8_t pos, id; -+ uint8_t hdr_type; -+ int ttl = 48; -+ -+ pci_read_config_word(dev, PCI_STATUS, &status); -+ if (!(status & PCI_STATUS_CAP_LIST)) -+ return 0; -+ pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type); -+ switch (hdr_type & 0x7F) { -+ case PCI_HEADER_TYPE_NORMAL: -+ case PCI_HEADER_TYPE_BRIDGE: -+ default: -+ pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); -+ break; -+ case PCI_HEADER_TYPE_CARDBUS: -+ pci_read_config_byte(dev, PCI_CB_CAPABILITY_LIST, &pos); -+ break; -+ } -+ while (ttl-- && pos >= 0x40) { -+ pos &= ~3; -+ pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id); -+#if DEBUG > 0 -+ printf("Capability: %d\n", id); -+#endif -+ if (id == 0xff) -+ break; -+ if (id == cap) -+ return pos; -+ pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos); -+ } -+ return 0; -+} -+ -Index: b/netboot/pci.h -=================================================================== ---- a/netboot/pci.h -+++ b/netboot/pci.h -@@ -1,4 +1,4 @@ --#ifndef PCI_H -+#if !defined(PCI_H) && defined(CONFIG_PCI) - #define PCI_H - - /* -@@ -21,10 +21,19 @@ - * your option) any later version. - */ - -+#include "pci_ids.h" -+ - #define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ - #define PCI_COMMAND_MEM 0x2 /* Enable response in mem space */ - #define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ - #define PCI_LATENCY_TIMER 0x0d /* 8 bits */ -+#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ -+#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ -+#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ -+#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ -+#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ -+#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ -+#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ - - #define PCIBIOS_PCI_FUNCTION_ID 0xb1XX - #define PCIBIOS_PCI_BIOS_PRESENT 0xb101 -@@ -42,10 +51,37 @@ - #define PCI_DEVICE_ID 0x02 /* 16 bits */ - #define PCI_COMMAND 0x04 /* 16 bits */ - -+#define PCI_STATUS 0x06 /* 16 bits */ -+#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ -+#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ -+#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ -+#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ -+#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ -+#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ -+#define PCI_STATUS_DEVSEL_FAST 0x000 -+#define PCI_STATUS_DEVSEL_MEDIUM 0x200 -+#define PCI_STATUS_DEVSEL_SLOW 0x400 -+#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ -+#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ -+#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ -+#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ -+#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ -+ - #define PCI_REVISION 0x08 /* 8 bits */ -+#define PCI_REVISION_ID 0x08 /* 8 bits */ -+#define PCI_CLASS_REVISION 0x08 /* 32 bits */ - #define PCI_CLASS_CODE 0x0b /* 8 bits */ - #define PCI_SUBCLASS_CODE 0x0a /* 8 bits */ - #define PCI_HEADER_TYPE 0x0e /* 8 bits */ -+#define PCI_HEADER_TYPE_NORMAL 0 -+#define PCI_HEADER_TYPE_BRIDGE 1 -+#define PCI_HEADER_TYPE_CARDBUS 2 -+ -+ -+/* Header type 0 (normal devices) */ -+#define PCI_CARDBUS_CIS 0x28 -+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c -+#define PCI_SUBSYSTEM_ID 0x2e - - #define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ - #define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ -@@ -54,15 +90,155 @@ - #define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ - #define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ - -+#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 -+#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ -+#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */ -+#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ -+ - #ifndef PCI_BASE_ADDRESS_IO_MASK - #define PCI_BASE_ADDRESS_IO_MASK (~0x03) - #endif -+#ifndef PCI_BASE_ADDRESS_MEM_MASK -+#define PCI_BASE_ADDRESS_MEM_MASK (~0x0f) -+#endif - #define PCI_BASE_ADDRESS_SPACE_IO 0x01 - #define PCI_ROM_ADDRESS 0x30 /* 32 bits */ - #define PCI_ROM_ADDRESS_ENABLE 0x01 /* Write 1 to enable ROM, - bits 31..11 are address, - 10..2 are reserved */ - -+#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ -+ -+#define PCI_INTERRUPT_LINE 0x3c /* IRQ number (0-15) */ -+#define PCI_INTERRUPT_PIN 0x3d /* IRQ pin on PCI bus (A-D) */ -+ -+/* Header type 1 (PCI-to-PCI bridges) */ -+#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ -+#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ -+#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */ -+#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ -+#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ -+#define PCI_IO_LIMIT 0x1d -+#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ -+#define PCI_IO_RANGE_TYPE_16 0x00 -+#define PCI_IO_RANGE_TYPE_32 0x01 -+#define PCI_IO_RANGE_MASK ~0x0f -+#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ -+#define PCI_MEMORY_BASE 0x20 /* Memory range behind */ -+#define PCI_MEMORY_LIMIT 0x22 -+#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f -+#define PCI_MEMORY_RANGE_MASK ~0x0f -+#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ -+#define PCI_PREF_MEMORY_LIMIT 0x26 -+#define PCI_PREF_RANGE_TYPE_MASK 0x0f -+#define PCI_PREF_RANGE_TYPE_32 0x00 -+#define PCI_PREF_RANGE_TYPE_64 0x01 -+#define PCI_PREF_RANGE_MASK ~0x0f -+#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ -+#define PCI_PREF_LIMIT_UPPER32 0x2c -+#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ -+#define PCI_IO_LIMIT_UPPER16 0x32 -+/* 0x34 same as for htype 0 */ -+/* 0x35-0x3b is reserved */ -+#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ -+/* 0x3c-0x3d are same as for htype 0 */ -+#define PCI_BRIDGE_CONTROL 0x3e -+#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ -+#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ -+#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */ -+#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ -+#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ -+#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ -+#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ -+ -+#define PCI_CB_CAPABILITY_LIST 0x14 -+ -+/* Capability lists */ -+ -+#define PCI_CAP_LIST_ID 0 /* Capability ID */ -+#define PCI_CAP_ID_PM 0x01 /* Power Management */ -+#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */ -+#define PCI_CAP_ID_VPD 0x03 /* Vital Product Data */ -+#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */ -+#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ -+#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ -+#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ -+#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ -+#define PCI_CAP_SIZEOF 4 -+ -+/* Power Management Registers */ -+ -+#define PCI_PM_PMC 2 /* PM Capabilities Register */ -+#define PCI_PM_CAP_VER_MASK 0x0007 /* Version */ -+#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ -+#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ -+#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ -+#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ -+#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ -+#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ -+#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ -+#define PCI_PM_CAP_PME_MASK 0xF800 /* PME Mask of all supported states */ -+#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */ -+#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */ -+#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */ -+#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */ -+#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */ -+#define PCI_PM_CTRL 4 /* PM control and status register */ -+#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ -+#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ -+#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ -+#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ -+#define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ -+#define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */ -+#define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */ -+#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ -+#define PCI_PM_DATA_REGISTER 7 /* (??) */ -+#define PCI_PM_SIZEOF 8 -+ -+/* AGP registers */ -+ -+#define PCI_AGP_VERSION 2 /* BCD version number */ -+#define PCI_AGP_RFU 3 /* Rest of capability flags */ -+#define PCI_AGP_STATUS 4 /* Status register */ -+#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ -+#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ -+#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ -+#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ -+#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ -+#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ -+#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ -+#define PCI_AGP_COMMAND 8 /* Control register */ -+#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ -+#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ -+#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ -+#define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ -+#define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ -+#define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ -+#define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ -+#define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ -+#define PCI_AGP_SIZEOF 12 -+ -+/* Slot Identification */ -+ -+#define PCI_SID_ESR 2 /* Expansion Slot Register */ -+#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */ -+#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ -+#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ -+ -+/* Message Signalled Interrupts registers */ -+ -+#define PCI_MSI_FLAGS 2 /* Various flags */ -+#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ -+#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ -+#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ -+#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ -+#define PCI_MSI_RFU 3 /* Rest of capability flags */ -+#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ -+#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ -+#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ -+#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ -+ -+#define PCI_SLOT(devfn) ((devfn) >> 3) - #define PCI_FUNC(devfn) ((devfn) & 0x07) - - #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) -@@ -85,108 +261,97 @@ - char chars[16]; - }; - --#define KERN_CODE_SEG 0x8 /* This _MUST_ match start.S */ -- --/* Stuff for asm */ --#define save_flags(x) \ --__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") -- --#define cli() __asm__ __volatile__ ("cli": : :"memory") -- --#define restore_flags(x) \ --__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") -- --#define PCI_VENDOR_ID_ADMTEK 0x1317 --#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 --#define PCI_VENDOR_ID_REALTEK 0x10ec --#define PCI_DEVICE_ID_REALTEK_8029 0x8029 --#define PCI_DEVICE_ID_REALTEK_8139 0x8139 --#define PCI_VENDOR_ID_WINBOND2 0x1050 --#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 --#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 --#define PCI_VENDOR_ID_COMPEX 0x11f6 --#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 --#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 --#define PCI_VENDOR_ID_KTI 0x8e2e --#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 --#define PCI_VENDOR_ID_NETVIN 0x4a14 --#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 --#define PCI_VENDOR_ID_HOLTEK 0x12c3 --#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 --#define PCI_VENDOR_ID_3COM 0x10b7 --#define PCI_DEVICE_ID_3COM_3C590 0x5900 --#define PCI_DEVICE_ID_3COM_3C595 0x5950 --#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 --#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 --#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 --#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 --#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 --#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 --#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 --#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 --#define PCI_VENDOR_ID_INTEL 0x8086 --#define PCI_DEVICE_ID_INTEL_82557 0x1229 --#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 --#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 --#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 --#define PCI_DEVICE_ID_INTEL_82562 0x2449 --#define PCI_VENDOR_ID_AMD 0x1022 --#define PCI_DEVICE_ID_AMD_LANCE 0x2000 --#define PCI_VENDOR_ID_AMD_HOMEPNA 0x1022 --#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 --#define PCI_VENDOR_ID_SMC_1211 0x1113 --#define PCI_DEVICE_ID_SMC_1211 0x1211 --#define PCI_VENDOR_ID_DEC 0x1011 --#define PCI_DEVICE_ID_DEC_TULIP 0x0002 --#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 --#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 --#define PCI_DEVICE_ID_DEC_21142 0x0019 --#define PCI_VENDOR_ID_SMC 0x10B8 --#ifndef PCI_DEVICE_ID_SMC_EPIC100 --# define PCI_DEVICE_ID_SMC_EPIC100 0x0005 --#endif --#define PCI_VENDOR_ID_MACRONIX 0x10d9 --#define PCI_DEVICE_ID_MX987x5 0x0531 --#define PCI_VENDOR_ID_LINKSYS 0x11AD --#define PCI_DEVICE_ID_LC82C115 0xC115 --#define PCI_VENDOR_ID_VIATEC 0x1106 --#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 --#define PCI_DEVICE_ID_VIA_VT6102 0x3065 --#define PCI_DEVICE_ID_VIA_86C100A 0x6100 --#define PCI_VENDOR_ID_DAVICOM 0x1282 --#define PCI_DEVICE_ID_DM9009 0x9009 --#define PCI_DEVICE_ID_DM9102 0x9102 --#define PCI_VENDOR_ID_SIS 0x1039 --#define PCI_DEVICE_ID_SIS900 0x0900 --#define PCI_DEVICE_ID_SIS7016 0x7016 --#define PCI_VENDOR_ID_DLINK 0x1186 --#define PCI_DEVICE_ID_DFE530TXP 0x1300 --#define PCI_VENDOR_ID_NS 0x100B --#define PCI_DEVICE_ID_DP83815 0x0020 --#define PCI_VENDOR_ID_OLICOM 0x108d --#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 --#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 --#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 --#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 --#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 --#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 -+struct pci_device; -+struct dev; -+typedef int (*pci_probe_t)(struct dev *, struct pci_device *); - - struct pci_device { -- unsigned short vendor, dev_id; -- const char *name; -- unsigned int membase; -- unsigned short ioaddr; -- unsigned char devfn; -- unsigned char bus; -+ uint32_t class; -+ uint16_t vendor, dev_id; -+ const char *name; -+ /* membase and ioaddr are silly and depricated */ -+ unsigned int membase; -+ unsigned int ioaddr; -+ unsigned int romaddr; -+ unsigned char irq; -+ unsigned char devfn; -+ unsigned char bus; -+ unsigned char use_specified; -+ const struct pci_driver *driver; -+}; -+ -+extern void scan_pci_bus(int type, struct pci_device *dev); -+extern void find_pci(int type, struct pci_device *dev); -+ -+extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t *value); -+extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t value); -+extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t *value); -+extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t value); -+extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t *value); -+extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value); -+extern unsigned long pcibios_bus_base(unsigned int bus); -+extern void adjust_pci_device(struct pci_device *p); -+ -+ -+static inline int -+pci_read_config_byte(struct pci_device *dev, unsigned int where, uint8_t *value) -+{ -+ return pcibios_read_config_byte(dev->bus, dev->devfn, where, value); -+} -+static inline int -+pci_write_config_byte(struct pci_device *dev, unsigned int where, uint8_t value) -+{ -+ return pcibios_write_config_byte(dev->bus, dev->devfn, where, value); -+} -+static inline int -+pci_read_config_word(struct pci_device *dev, unsigned int where, uint16_t *value) -+{ -+ return pcibios_read_config_word(dev->bus, dev->devfn, where, value); -+} -+static inline int -+pci_write_config_word(struct pci_device *dev, unsigned int where, uint16_t value) -+{ -+ return pcibios_write_config_word(dev->bus, dev->devfn, where, value); -+} -+static inline int -+pci_read_config_dword(struct pci_device *dev, unsigned int where, uint32_t *value) -+{ -+ return pcibios_read_config_dword(dev->bus, dev->devfn, where, value); -+} -+static inline int -+pci_write_config_dword(struct pci_device *dev, unsigned int where, uint32_t value) -+{ -+ return pcibios_write_config_dword(dev->bus, dev->devfn, where, value); -+} -+ -+/* Helper functions to find the size of a pci bar */ -+extern unsigned long pci_bar_start(struct pci_device *dev, unsigned int bar); -+extern unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar); -+/* Helper function to find pci capabilities */ -+extern int pci_find_capability(struct pci_device *dev, int cap); -+struct pci_id { -+ unsigned short vendor, dev_id; -+ const char *name; -+}; -+ -+struct dev; -+/* Most pci drivers will use this */ -+struct pci_driver { -+ int type; -+ const char *name; -+ pci_probe_t probe; -+ struct pci_id *ids; -+ int id_count; -+ -+/* On a few occasions the hardware is standardized enough that -+ * we only need to know the class of the device and not the exact -+ * type to drive the device correctly. If this is the case -+ * set a class value other than 0. -+ */ -+ unsigned short class; - }; - --extern void eth_pci_init(struct pci_device *); -+#define PCI_ROM(VENDOR_ID, DEVICE_ID, IMAGE, DESCRIPTION) \ -+ { VENDOR_ID, DEVICE_ID, IMAGE, } - --extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char *value); --extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char value); --extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short *value); --extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short value); --extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int *value); --extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value); --void adjust_pci_device(struct pci_device *p); - #endif /* PCI_H */ -Index: b/netboot/pci_ids.h -=================================================================== ---- /dev/null -+++ b/netboot/pci_ids.h -@@ -0,0 +1,1809 @@ -+/* -+ * PCI Class, Vendor and Device IDs -+ * -+ * Please keep sorted. -+ */ -+ -+/* Device classes and subclasses */ -+ -+#define PCI_CLASS_NOT_DEFINED 0x0000 -+#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 -+ -+#define PCI_BASE_CLASS_STORAGE 0x01 -+#define PCI_CLASS_STORAGE_SCSI 0x0100 -+#define PCI_CLASS_STORAGE_IDE 0x0101 -+#define PCI_CLASS_STORAGE_FLOPPY 0x0102 -+#define PCI_CLASS_STORAGE_IPI 0x0103 -+#define PCI_CLASS_STORAGE_RAID 0x0104 -+#define PCI_CLASS_STORAGE_OTHER 0x0180 -+ -+#define PCI_BASE_CLASS_NETWORK 0x02 -+#define PCI_CLASS_NETWORK_ETHERNET 0x0200 -+#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 -+#define PCI_CLASS_NETWORK_FDDI 0x0202 -+#define PCI_CLASS_NETWORK_ATM 0x0203 -+#define PCI_CLASS_NETWORK_OTHER 0x0280 -+ -+#define PCI_BASE_CLASS_DISPLAY 0x03 -+#define PCI_CLASS_DISPLAY_VGA 0x0300 -+#define PCI_CLASS_DISPLAY_XGA 0x0301 -+#define PCI_CLASS_DISPLAY_3D 0x0302 -+#define PCI_CLASS_DISPLAY_OTHER 0x0380 -+ -+#define PCI_BASE_CLASS_MULTIMEDIA 0x04 -+#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 -+#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 -+#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402 -+#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 -+ -+#define PCI_BASE_CLASS_MEMORY 0x05 -+#define PCI_CLASS_MEMORY_RAM 0x0500 -+#define PCI_CLASS_MEMORY_FLASH 0x0501 -+#define PCI_CLASS_MEMORY_OTHER 0x0580 -+ -+#define PCI_BASE_CLASS_BRIDGE 0x06 -+#define PCI_CLASS_BRIDGE_HOST 0x0600 -+#define PCI_CLASS_BRIDGE_ISA 0x0601 -+#define PCI_CLASS_BRIDGE_EISA 0x0602 -+#define PCI_CLASS_BRIDGE_MC 0x0603 -+#define PCI_CLASS_BRIDGE_PCI 0x0604 -+#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 -+#define PCI_CLASS_BRIDGE_NUBUS 0x0606 -+#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 -+#define PCI_CLASS_BRIDGE_RACEWAY 0x0608 -+#define PCI_CLASS_BRIDGE_OTHER 0x0680 -+ -+#define PCI_BASE_CLASS_COMMUNICATION 0x07 -+#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 -+#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 -+#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702 -+#define PCI_CLASS_COMMUNICATION_MODEM 0x0703 -+#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 -+ -+#define PCI_BASE_CLASS_SYSTEM 0x08 -+#define PCI_CLASS_SYSTEM_PIC 0x0800 -+#define PCI_CLASS_SYSTEM_DMA 0x0801 -+#define PCI_CLASS_SYSTEM_TIMER 0x0802 -+#define PCI_CLASS_SYSTEM_RTC 0x0803 -+#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804 -+#define PCI_CLASS_SYSTEM_OTHER 0x0880 -+ -+#define PCI_BASE_CLASS_INPUT 0x09 -+#define PCI_CLASS_INPUT_KEYBOARD 0x0900 -+#define PCI_CLASS_INPUT_PEN 0x0901 -+#define PCI_CLASS_INPUT_MOUSE 0x0902 -+#define PCI_CLASS_INPUT_SCANNER 0x0903 -+#define PCI_CLASS_INPUT_GAMEPORT 0x0904 -+#define PCI_CLASS_INPUT_OTHER 0x0980 -+ -+#define PCI_BASE_CLASS_DOCKING 0x0a -+#define PCI_CLASS_DOCKING_GENERIC 0x0a00 -+#define PCI_CLASS_DOCKING_OTHER 0x0a80 -+ -+#define PCI_BASE_CLASS_PROCESSOR 0x0b -+#define PCI_CLASS_PROCESSOR_386 0x0b00 -+#define PCI_CLASS_PROCESSOR_486 0x0b01 -+#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 -+#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 -+#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 -+#define PCI_CLASS_PROCESSOR_MIPS 0x0b30 -+#define PCI_CLASS_PROCESSOR_CO 0x0b40 -+ -+#define PCI_BASE_CLASS_SERIAL 0x0c -+#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 -+#define PCI_CLASS_SERIAL_ACCESS 0x0c01 -+#define PCI_CLASS_SERIAL_SSA 0x0c02 -+#define PCI_CLASS_SERIAL_USB 0x0c03 -+#define PCI_CLASS_SERIAL_FIBER 0x0c04 -+#define PCI_CLASS_SERIAL_SMBUS 0x0c05 -+ -+#define PCI_BASE_CLASS_INTELLIGENT 0x0e -+#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 -+ -+#define PCI_BASE_CLASS_SATELLITE 0x0f -+#define PCI_CLASS_SATELLITE_TV 0x0f00 -+#define PCI_CLASS_SATELLITE_AUDIO 0x0f01 -+#define PCI_CLASS_SATELLITE_VOICE 0x0f03 -+#define PCI_CLASS_SATELLITE_DATA 0x0f04 -+ -+#define PCI_BASE_CLASS_CRYPT 0x10 -+#define PCI_CLASS_CRYPT_NETWORK 0x1000 -+#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001 -+#define PCI_CLASS_CRYPT_OTHER 0x1080 -+ -+#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 -+#define PCI_CLASS_SP_DPIO 0x1100 -+#define PCI_CLASS_SP_OTHER 0x1180 -+ -+#define PCI_CLASS_OTHERS 0xff -+ -+/* Vendors and devices. Sort key: vendor first, device next. */ -+ -+#define PCI_VENDOR_ID_DYNALINK 0x0675 -+#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 -+ -+#define PCI_VENDOR_ID_BERKOM 0x0871 -+#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1 -+#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2 -+#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4 -+#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8 -+ -+#define PCI_VENDOR_ID_COMPAQ 0x0e11 -+#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508 -+#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 -+#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000 -+#define PCI_DEVICE_ID_COMPAQ_6010 0x6010 -+#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10 -+#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32 -+#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34 -+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35 -+#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 -+#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 -+#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 -+#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 -+#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 -+#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 -+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 -+ -+#define PCI_VENDOR_ID_NCR 0x1000 -+#define PCI_VENDOR_ID_LSI_LOGIC 0x1000 -+#define PCI_DEVICE_ID_NCR_53C810 0x0001 -+#define PCI_DEVICE_ID_NCR_53C820 0x0002 -+#define PCI_DEVICE_ID_NCR_53C825 0x0003 -+#define PCI_DEVICE_ID_NCR_53C815 0x0004 -+#define PCI_DEVICE_ID_LSI_53C810AP 0x0005 -+#define PCI_DEVICE_ID_NCR_53C860 0x0006 -+#define PCI_DEVICE_ID_LSI_53C1510 0x000a -+#define PCI_DEVICE_ID_NCR_53C896 0x000b -+#define PCI_DEVICE_ID_NCR_53C895 0x000c -+#define PCI_DEVICE_ID_NCR_53C885 0x000d -+#define PCI_DEVICE_ID_NCR_53C875 0x000f -+#define PCI_DEVICE_ID_NCR_53C1510 0x0010 -+#define PCI_DEVICE_ID_LSI_53C895A 0x0012 -+#define PCI_DEVICE_ID_LSI_53C875A 0x0013 -+#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020 -+#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021 -+#define PCI_DEVICE_ID_LSI_53C1030 0x0030 -+#define PCI_DEVICE_ID_LSI_53C1035 0x0040 -+#define PCI_DEVICE_ID_NCR_53C875J 0x008f -+#define PCI_DEVICE_ID_LSI_FC909 0x0621 -+#define PCI_DEVICE_ID_LSI_FC929 0x0622 -+#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623 -+#define PCI_DEVICE_ID_LSI_FC919 0x0624 -+#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625 -+#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701 -+#define PCI_DEVICE_ID_LSI_61C102 0x0901 -+#define PCI_DEVICE_ID_LSI_63C815 0x1000 -+ -+#define PCI_VENDOR_ID_ATI 0x1002 -+/* Mach64 */ -+#define PCI_DEVICE_ID_ATI_68800 0x4158 -+#define PCI_DEVICE_ID_ATI_215CT222 0x4354 -+#define PCI_DEVICE_ID_ATI_210888CX 0x4358 -+#define PCI_DEVICE_ID_ATI_215ET222 0x4554 -+/* Mach64 / Rage */ -+#define PCI_DEVICE_ID_ATI_215GB 0x4742 -+#define PCI_DEVICE_ID_ATI_215GD 0x4744 -+#define PCI_DEVICE_ID_ATI_215GI 0x4749 -+#define PCI_DEVICE_ID_ATI_215GP 0x4750 -+#define PCI_DEVICE_ID_ATI_215GQ 0x4751 -+#define PCI_DEVICE_ID_ATI_215XL 0x4752 -+#define PCI_DEVICE_ID_ATI_215GT 0x4754 -+#define PCI_DEVICE_ID_ATI_215GTB 0x4755 -+#define PCI_DEVICE_ID_ATI_215_IV 0x4756 -+#define PCI_DEVICE_ID_ATI_215_IW 0x4757 -+#define PCI_DEVICE_ID_ATI_215_IZ 0x475A -+#define PCI_DEVICE_ID_ATI_210888GX 0x4758 -+#define PCI_DEVICE_ID_ATI_215_LB 0x4c42 -+#define PCI_DEVICE_ID_ATI_215_LD 0x4c44 -+#define PCI_DEVICE_ID_ATI_215_LG 0x4c47 -+#define PCI_DEVICE_ID_ATI_215_LI 0x4c49 -+#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D -+#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E -+#define PCI_DEVICE_ID_ATI_215_LR 0x4c52 -+#define PCI_DEVICE_ID_ATI_215_LS 0x4c53 -+#define PCI_DEVICE_ID_ATI_264_LT 0x4c54 -+/* Mach64 VT */ -+#define PCI_DEVICE_ID_ATI_264VT 0x5654 -+#define PCI_DEVICE_ID_ATI_264VU 0x5655 -+#define PCI_DEVICE_ID_ATI_264VV 0x5656 -+/* Rage128 Pro GL */ -+#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 -+#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 -+#define PCI_DEVICE_ID_ATI_Rage128_PC 0x5043 -+#define PCI_DEVICE_ID_ATI_Rage128_PD 0x5044 -+#define PCI_DEVICE_ID_ATI_Rage128_PE 0x5045 -+#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 -+/* Rage128 Pro VR */ -+#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047 -+#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048 -+#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049 -+#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A -+#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B -+#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C -+#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D -+#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E -+#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F -+#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050 -+#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051 -+#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 -+#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452 -+#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053 -+#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054 -+#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055 -+#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 -+#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 -+#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 -+/* Rage128 GL */ -+#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245 -+#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246 -+#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b -+#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c -+#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d -+/* Rage128 VR */ -+#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b -+#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c -+#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345 -+#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346 -+#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347 -+/* Rage128 M3 */ -+#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45 -+#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46 -+/* Rage128 Pro Ultra */ -+#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446 -+#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C -+#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452 -+/* Radeon M4 */ -+#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 -+#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 -+/* Radeon NV-100 */ -+#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 -+#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a -+/* Radeon */ -+#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 -+#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 -+#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 -+#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 -+ -+#define PCI_VENDOR_ID_VLSI 0x1004 -+#define PCI_DEVICE_ID_VLSI_82C592 0x0005 -+#define PCI_DEVICE_ID_VLSI_82C593 0x0006 -+#define PCI_DEVICE_ID_VLSI_82C594 0x0007 -+#define PCI_DEVICE_ID_VLSI_82C597 0x0009 -+#define PCI_DEVICE_ID_VLSI_82C541 0x000c -+#define PCI_DEVICE_ID_VLSI_82C543 0x000d -+#define PCI_DEVICE_ID_VLSI_82C532 0x0101 -+#define PCI_DEVICE_ID_VLSI_82C534 0x0102 -+#define PCI_DEVICE_ID_VLSI_82C535 0x0104 -+#define PCI_DEVICE_ID_VLSI_82C147 0x0105 -+#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 -+ -+#define PCI_VENDOR_ID_ADL 0x1005 -+#define PCI_DEVICE_ID_ADL_2301 0x2301 -+ -+#define PCI_VENDOR_ID_NS 0x100b -+#define PCI_DEVICE_ID_NS_87415 0x0002 -+#define PCI_DEVICE_ID_NS_87560_LIO 0x000e -+#define PCI_DEVICE_ID_NS_87560_USB 0x0012 -+#define PCI_DEVICE_ID_NS_83815 0x0020 -+#define PCI_DEVICE_ID_DP83815 0x0020 -+#define PCI_DEVICE_ID_NS_83820 0x0022 -+#define PCI_DEVICE_ID_NS_87410 0xd001 -+ -+#define PCI_VENDOR_ID_TSENG 0x100c -+#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 -+#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 -+#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 -+#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 -+#define PCI_DEVICE_ID_TSENG_ET6000 0x3208 -+ -+#define PCI_VENDOR_ID_WEITEK 0x100e -+#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 -+#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 -+ -+#define PCI_VENDOR_ID_DEC 0x1011 -+#define PCI_DEVICE_ID_DEC_BRD 0x0001 -+#define PCI_DEVICE_ID_DEC_TULIP 0x0002 -+#define PCI_DEVICE_ID_DEC_TGA 0x0004 -+#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 -+#define PCI_DEVICE_ID_DEC_TGA2 0x000D -+#define PCI_DEVICE_ID_DEC_FDDI 0x000F -+#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 -+#define PCI_DEVICE_ID_DEC_21142 0x0019 -+#define PCI_DEVICE_ID_DEC_21052 0x0021 -+#define PCI_DEVICE_ID_DEC_21150 0x0022 -+#define PCI_DEVICE_ID_DEC_21152 0x0024 -+#define PCI_DEVICE_ID_DEC_21153 0x0025 -+#define PCI_DEVICE_ID_DEC_21154 0x0026 -+#define PCI_DEVICE_ID_DEC_21285 0x1065 -+#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046 -+ -+#define PCI_VENDOR_ID_CIRRUS 0x1013 -+#define PCI_DEVICE_ID_CIRRUS_7548 0x0038 -+#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 -+#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 -+#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 -+#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac -+#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8 -+#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc -+#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0 -+#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4 -+#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6 -+#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 -+#define PCI_DEVICE_ID_CIRRUS_6832 0x1110 -+#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 -+#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 -+#define PCI_DEVICE_ID_CIRRUS_7541 0x1204 -+ -+#define PCI_VENDOR_ID_IBM 0x1014 -+#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a -+#define PCI_DEVICE_ID_IBM_TR 0x0018 -+#define PCI_DEVICE_ID_IBM_82G2675 0x001d -+#define PCI_DEVICE_ID_IBM_MCA 0x0020 -+#define PCI_DEVICE_ID_IBM_82351 0x0022 -+#define PCI_DEVICE_ID_IBM_PYTHON 0x002d -+#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e -+#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e -+#define PCI_DEVICE_ID_IBM_MPIC 0x0046 -+#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d -+#define PCI_DEVICE_ID_IBM_CHUKAR 0x0096 -+#define PCI_DEVICE_ID_IBM_405GP 0x0156 -+#define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd -+#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff -+ -+#define PCI_VENDOR_ID_COMPEX2 0x101a // pci.ids says "AT&T GIS (NCR)" -+#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 -+ -+#define PCI_VENDOR_ID_WD 0x101c -+#define PCI_DEVICE_ID_WD_7197 0x3296 -+ -+#define PCI_VENDOR_ID_AMI 0x101e -+#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960 -+#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010 -+#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 -+ -+#define PCI_VENDOR_ID_AMD 0x1022 -+ -+#define PCI_DEVICE_ID_AMD_LANCE 0x2000 -+#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 -+#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 -+#define PCI_DEVICE_ID_AMD_SCSI 0x2020 -+#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 -+#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 -+#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C -+#define PCI_DEVIDE_ID_AMD_FE_GATE_700D 0x700D -+#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E -+#define PCI_DEVICE_ID_AMD_FE_GATE_700F 0x700F -+#define PCI_DEVICE_ID_AMD_COBRA_7400 0x7400 -+#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401 -+#define PCI_DEVICE_ID_AMD_COBRA_7403 0x7403 -+#define PCI_DEVICE_ID_AMD_COBRA_7404 0x7404 -+#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408 -+#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409 -+#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B -+#define PCI_DEVICE_ID_AMD_VIPER_740C 0x740C -+#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410 -+#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411 -+#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413 -+#define PCI_DEVICE_ID_AMD_VIPER_7414 0x7414 -+#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440 -+#define PCI_DEVICE_ID_AMD_VIPER_7441 0x7441 -+#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443 -+#define PCI_DEVICE_ID_AMD_VIPER_7448 0x7448 -+#define PCI_DEVICE_ID_AMD_VIPER_7449 0x7449 -+ -+#define PCI_VENDOR_ID_TRIDENT 0x1023 -+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 -+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001 -+#define PCI_DEVICE_ID_TRIDENT_9320 0x9320 -+#define PCI_DEVICE_ID_TRIDENT_9388 0x9388 -+#define PCI_DEVICE_ID_TRIDENT_9397 0x9397 -+#define PCI_DEVICE_ID_TRIDENT_939A 0x939A -+#define PCI_DEVICE_ID_TRIDENT_9520 0x9520 -+#define PCI_DEVICE_ID_TRIDENT_9525 0x9525 -+#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 -+#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 -+#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 -+#define PCI_DEVICE_ID_TRIDENT_9750 0x9750 -+#define PCI_DEVICE_ID_TRIDENT_9850 0x9850 -+#define PCI_DEVICE_ID_TRIDENT_9880 0x9880 -+#define PCI_DEVICE_ID_TRIDENT_8400 0x8400 -+#define PCI_DEVICE_ID_TRIDENT_8420 0x8420 -+#define PCI_DEVICE_ID_TRIDENT_8500 0x8500 -+ -+#define PCI_VENDOR_ID_AI 0x1025 -+#define PCI_DEVICE_ID_AI_M1435 0x1435 -+ -+#define PCI_VENDOR_ID_DELL 0x1028 -+ -+#define PCI_VENDOR_ID_MATROX 0x102B -+#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 -+#define PCI_DEVICE_ID_MATROX_MIL 0x0519 -+#define PCI_DEVICE_ID_MATROX_MYS 0x051A -+#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b -+#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f -+#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 -+#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 -+#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 -+#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 -+#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 -+#define PCI_DEVICE_ID_MATROX_G400 0x0525 -+#define PCI_DEVICE_ID_MATROX_G550 0x2527 -+#define PCI_DEVICE_ID_MATROX_VIA 0x4536 -+ -+#define PCI_VENDOR_ID_CT 0x102c -+#define PCI_DEVICE_ID_CT_65545 0x00d8 -+#define PCI_DEVICE_ID_CT_65548 0x00dc -+#define PCI_DEVICE_ID_CT_65550 0x00e0 -+#define PCI_DEVICE_ID_CT_65554 0x00e4 -+#define PCI_DEVICE_ID_CT_65555 0x00e5 -+ -+#define PCI_VENDOR_ID_MIRO 0x1031 -+#define PCI_DEVICE_ID_MIRO_36050 0x5601 -+ -+#define PCI_VENDOR_ID_NEC 0x1033 -+#define PCI_DEVICE_ID_NEC_PCX2 0x0046 -+#define PCI_DEVICE_ID_NEC_NILE4 0x005a -+#define PCI_DEVICE_ID_NEC_VRC5476 0x009b -+ -+#define PCI_VENDOR_ID_FD 0x1036 -+#define PCI_DEVICE_ID_FD_36C70 0x0000 -+ -+#define PCI_VENDOR_ID_SIS 0x1039 -+#define PCI_VENDOR_ID_SI 0x1039 -+#define PCI_DEVICE_ID_SI_5591_AGP 0x0001 -+#define PCI_DEVICE_ID_SI_6202 0x0002 -+#define PCI_DEVICE_ID_SI_503 0x0008 -+#define PCI_DEVICE_ID_SI_ACPI 0x0009 -+#define PCI_DEVICE_ID_SI_5597_VGA 0x0200 -+#define PCI_DEVICE_ID_SI_6205 0x0205 -+#define PCI_DEVICE_ID_SI_501 0x0406 -+#define PCI_DEVICE_ID_SI_496 0x0496 -+#define PCI_DEVICE_ID_SI_300 0x0300 -+#define PCI_DEVICE_ID_SI_315H 0x0310 -+#define PCI_DEVICE_ID_SI_315 0x0315 -+#define PCI_DEVICE_ID_SI_315PRO 0x0325 -+#define PCI_DEVICE_ID_SI_530 0x0530 -+#define PCI_DEVICE_ID_SI_540 0x0540 -+#define PCI_DEVICE_ID_SI_550 0x0550 -+#define PCI_DEVICE_ID_SI_601 0x0601 -+#define PCI_DEVICE_ID_SI_620 0x0620 -+#define PCI_DEVICE_ID_SI_630 0x0630 -+#define PCI_DEVICE_ID_SI_635 0x0635 -+#define PCI_DEVICE_ID_SI_640 0x0640 -+#define PCI_DEVICE_ID_SI_645 0x0645 -+#define PCI_DEVICE_ID_SI_650 0x0650 -+#define PCI_DEVICE_ID_SI_730 0x0730 -+#define PCI_DEVICE_ID_SI_735 0x0735 -+#define PCI_DEVICE_ID_SI_740 0x0740 -+#define PCI_DEVICE_ID_SI_745 0x0745 -+#define PCI_DEVICE_ID_SI_750 0x0750 -+#define PCI_DEVICE_ID_SI_900 0x0900 -+#define PCI_DEVICE_ID_SIS900 0x0900 -+#define PCI_DEVICE_ID_SI_5107 0x5107 -+#define PCI_DEVICE_ID_SI_5300 0x5300 -+#define PCI_DEVICE_ID_SI_540_VGA 0x5300 -+#define PCI_DEVICE_ID_SI_550_VGA 0x5315 -+#define PCI_DEVICE_ID_SI_5511 0x5511 -+#define PCI_DEVICE_ID_SI_5513 0x5513 -+#define PCI_DEVICE_ID_SI_5571 0x5571 -+#define PCI_DEVICE_ID_SI_5591 0x5591 -+#define PCI_DEVICE_ID_SI_5597 0x5597 -+#define PCI_DEVICE_ID_SI_5598 0x5598 -+#define PCI_DEVICE_ID_SI_5600 0x5600 -+#define PCI_DEVICE_ID_SI_6300 0x6300 -+#define PCI_DEVICE_ID_SI_630_VGA 0x6300 -+#define PCI_DEVICE_ID_SI_6306 0x6306 -+#define PCI_DEVICE_ID_SI_6326 0x6326 -+#define PCI_DEVICE_ID_SI_7001 0x7001 -+#define PCI_DEVICE_ID_SI_7016 0x7016 -+#define PCI_DEVICE_ID_SIS7016 0x7016 -+#define PCI_DEVICE_ID_SI_730_VGA 0x7300 -+ -+#define PCI_VENDOR_ID_HP 0x103c -+#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 -+#define PCI_DEVICE_ID_HP_TACHYON 0x1028 -+#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 -+#define PCI_DEVICE_ID_HP_J2585A 0x1030 -+#define PCI_DEVICE_ID_HP_J2585B 0x1031 -+#define PCI_DEVICE_ID_HP_SAS 0x1048 -+#define PCI_DEVICE_ID_HP_DIVA1 0x1049 -+#define PCI_DEVICE_ID_HP_DIVA2 0x104A -+#define PCI_DEVICE_ID_HP_SP2_0 0x104B -+ -+#define PCI_VENDOR_ID_PCTECH 0x1042 -+#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 -+#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001 -+#define PCI_DEVICE_ID_PCTECH_SAMURAI_0 0x3000 -+#define PCI_DEVICE_ID_PCTECH_SAMURAI_1 0x3010 -+#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020 -+ -+#define PCI_VENDOR_ID_ASUSTEK 0x1043 -+#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675 -+ -+#define PCI_VENDOR_ID_DPT 0x1044 -+#define PCI_DEVICE_ID_DPT 0xa400 -+ -+#define PCI_VENDOR_ID_OPTI 0x1045 -+#define PCI_DEVICE_ID_OPTI_92C178 0xc178 -+#define PCI_DEVICE_ID_OPTI_82C557 0xc557 -+#define PCI_DEVICE_ID_OPTI_82C558 0xc558 -+#define PCI_DEVICE_ID_OPTI_82C621 0xc621 -+#define PCI_DEVICE_ID_OPTI_82C700 0xc700 -+#define PCI_DEVICE_ID_OPTI_82C701 0xc701 -+#define PCI_DEVICE_ID_OPTI_82C814 0xc814 -+#define PCI_DEVICE_ID_OPTI_82C822 0xc822 -+#define PCI_DEVICE_ID_OPTI_82C861 0xc861 -+#define PCI_DEVICE_ID_OPTI_82C825 0xd568 -+ -+#define PCI_VENDOR_ID_ELSA 0x1048 -+#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 -+#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 -+ -+#define PCI_VENDOR_ID_ELSA 0x1048 -+#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 -+#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 -+ -+#define PCI_VENDOR_ID_SGS 0x104a -+#define PCI_DEVICE_ID_SGS_2000 0x0008 -+#define PCI_DEVICE_ID_SGS_1764 0x0009 -+ -+#define PCI_VENDOR_ID_BUSLOGIC 0x104B -+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 -+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 -+#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130 -+ -+#define PCI_VENDOR_ID_TI 0x104c -+#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 -+#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 -+#define PCI_DEVICE_ID_TI_1130 0xac12 -+#define PCI_DEVICE_ID_TI_1031 0xac13 -+#define PCI_DEVICE_ID_TI_1131 0xac15 -+#define PCI_DEVICE_ID_TI_1250 0xac16 -+#define PCI_DEVICE_ID_TI_1220 0xac17 -+#define PCI_DEVICE_ID_TI_1221 0xac19 -+#define PCI_DEVICE_ID_TI_1210 0xac1a -+#define PCI_DEVICE_ID_TI_1410 0xac50 -+#define PCI_DEVICE_ID_TI_1450 0xac1b -+#define PCI_DEVICE_ID_TI_1225 0xac1c -+#define PCI_DEVICE_ID_TI_1251A 0xac1d -+#define PCI_DEVICE_ID_TI_1211 0xac1e -+#define PCI_DEVICE_ID_TI_1251B 0xac1f -+#define PCI_DEVICE_ID_TI_4410 0xac41 -+#define PCI_DEVICE_ID_TI_4451 0xac42 -+#define PCI_DEVICE_ID_TI_1420 0xac51 -+ -+#define PCI_VENDOR_ID_SONY 0x104d -+#define PCI_DEVICE_ID_SONY_CXD3222 0x8039 -+ -+#define PCI_VENDOR_ID_OAK 0x104e -+#define PCI_DEVICE_ID_OAK_OTI107 0x0107 -+ -+/* Winbond have two vendor IDs! See 0x10ad as well */ -+#define PCI_VENDOR_ID_WINBOND2 0x1050 -+#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 -+#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 -+#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a -+#define PCI_DEVICE_ID_WINBOND2_6692 0x6692 -+ -+#define PCI_VENDOR_ID_ANIGMA 0x1051 -+#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100 -+ -+#define PCI_VENDOR_ID_EFAR 0x1055 -+#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 -+#define PCI_DEVICE_ID_EFAR_SLC90E66_0 0x9460 -+#define PCI_DEVICE_ID_EFAR_SLC90E66_2 0x9462 -+#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 -+ -+#define PCI_VENDOR_ID_MOTOROLA 0x1057 -+#define PCI_VENDOR_ID_MOTOROLA_OOPS 0x1507 -+#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 -+#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 -+#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 -+#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 -+#define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 -+ -+#define PCI_VENDOR_ID_PROMISE 0x105a -+#define PCI_DEVICE_ID_PROMISE_20265 0x0d30 -+#define PCI_DEVICE_ID_PROMISE_20267 0x4d30 -+#define PCI_DEVICE_ID_PROMISE_20246 0x4d33 -+#define PCI_DEVICE_ID_PROMISE_20262 0x4d38 -+#define PCI_DEVICE_ID_PROMISE_20268 0x4d68 -+#define PCI_DEVICE_ID_PROMISE_20268R 0x6268 -+#define PCI_DEVICE_ID_PROMISE_20269 0x4d69 -+#define PCI_DEVICE_ID_PROMISE_20275 0x1275 -+#define PCI_DEVICE_ID_PROMISE_5300 0x5300 -+ -+#define PCI_VENDOR_ID_N9 0x105d -+#define PCI_DEVICE_ID_N9_I128 0x2309 -+#define PCI_DEVICE_ID_N9_I128_2 0x2339 -+#define PCI_DEVICE_ID_N9_I128_T2R 0x493d -+ -+#define PCI_VENDOR_ID_UMC 0x1060 -+#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 -+#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 -+#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a -+#define PCI_DEVICE_ID_UMC_UM8886A 0x886a -+#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 -+#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 -+#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 -+#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 -+#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 -+ -+#define PCI_VENDOR_ID_X 0x1061 -+#define PCI_DEVICE_ID_X_AGX016 0x0001 -+ -+#define PCI_VENDOR_ID_MYLEX 0x1069 -+#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001 -+#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002 -+#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010 -+#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 -+#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 -+#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 -+ -+#define PCI_VENDOR_ID_PICOP 0x1066 -+#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 -+#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002 -+ -+#define PCI_VENDOR_ID_APPLE 0x106b -+#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 -+#define PCI_DEVICE_ID_APPLE_GC 0x0002 -+#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e -+#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018 -+#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019 -+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 -+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021 -+#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 -+ -+#define PCI_VENDOR_ID_YAMAHA 0x1073 -+#define PCI_DEVICE_ID_YAMAHA_724 0x0004 -+#define PCI_DEVICE_ID_YAMAHA_724F 0x000d -+#define PCI_DEVICE_ID_YAMAHA_740 0x000a -+#define PCI_DEVICE_ID_YAMAHA_740C 0x000c -+#define PCI_DEVICE_ID_YAMAHA_744 0x0010 -+#define PCI_DEVICE_ID_YAMAHA_754 0x0012 -+ -+#define PCI_VENDOR_ID_NEXGEN 0x1074 -+#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 -+ -+#define PCI_VENDOR_ID_QLOGIC 0x1077 -+#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 -+#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 -+#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 -+#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 -+ -+#define PCI_VENDOR_ID_CYRIX 0x1078 -+#define PCI_DEVICE_ID_CYRIX_5510 0x0000 -+#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001 -+#define PCI_DEVICE_ID_CYRIX_5520 0x0002 -+#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100 -+#define PCI_DEVICE_ID_CYRIX_5530_SMI 0x0101 -+#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102 -+#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 -+#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 -+ -+#define PCI_VENDOR_ID_LEADTEK 0x107d -+#define PCI_DEVICE_ID_LEADTEK_805 0x0000 -+ -+#define PCI_VENDOR_ID_INTERPHASE 0x107e -+#define PCI_DEVICE_ID_INTERPHASE_5526 0x0004 -+#define PCI_DEVICE_ID_INTERPHASE_55x6 0x0005 -+#define PCI_DEVICE_ID_INTERPHASE_5575 0x0008 -+ -+#define PCI_VENDOR_ID_CONTAQ 0x1080 -+#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 -+#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 -+ -+#define PCI_VENDOR_ID_FOREX 0x1083 -+ -+#define PCI_VENDOR_ID_OLICOM 0x108d -+#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 -+#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 -+#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 -+#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 -+#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 -+#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 -+ -+#define PCI_VENDOR_ID_SUN 0x108e -+#define PCI_DEVICE_ID_SUN_EBUS 0x1000 -+#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001 -+#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100 -+#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101 -+#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102 -+#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103 -+#define PCI_DEVICE_ID_SUN_GEM 0x2bad -+#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 -+#define PCI_DEVICE_ID_SUN_PBM 0x8000 -+#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001 -+#define PCI_DEVICE_ID_SUN_SABRE 0xa000 -+#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 -+ -+#define PCI_VENDOR_ID_CMD 0x1095 -+#define PCI_DEVICE_ID_CMD_640 0x0640 -+#define PCI_DEVICE_ID_CMD_643 0x0643 -+#define PCI_DEVICE_ID_CMD_646 0x0646 -+#define PCI_DEVICE_ID_CMD_647 0x0647 -+#define PCI_DEVICE_ID_CMD_648 0x0648 -+#define PCI_DEVICE_ID_CMD_649 0x0649 -+#define PCI_DEVICE_ID_CMD_670 0x0670 -+#define PCI_DEVICE_ID_CMD_680 0x0680 -+ -+#define PCI_VENDOR_ID_VISION 0x1098 -+#define PCI_DEVICE_ID_VISION_QD8500 0x0001 -+#define PCI_DEVICE_ID_VISION_QD8580 0x0002 -+ -+#define PCI_VENDOR_ID_BROOKTREE 0x109e -+#define PCI_DEVICE_ID_BROOKTREE_848 0x0350 -+#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 -+#define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e -+#define PCI_DEVICE_ID_BROOKTREE_878 0x0878 -+#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 -+ -+#define PCI_VENDOR_ID_SIERRA 0x10a8 -+#define PCI_DEVICE_ID_SIERRA_STB 0x0000 -+ -+#define PCI_VENDOR_ID_SGI 0x10a9 -+#define PCI_DEVICE_ID_SGI_IOC3 0x0003 -+ -+#define PCI_VENDOR_ID_ACC 0x10aa -+#define PCI_DEVICE_ID_ACC_2056 0x0000 -+ -+#define PCI_VENDOR_ID_WINBOND 0x10ad -+#define PCI_DEVICE_ID_WINBOND_83769 0x0001 -+#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 -+#define PCI_DEVICE_ID_WINBOND_83C553 0x0565 -+ -+#define PCI_VENDOR_ID_DATABOOK 0x10b3 -+#define PCI_DEVICE_ID_DATABOOK_87144 0xb106 -+ -+#define PCI_VENDOR_ID_PLX 0x10b5 -+#define PCI_DEVICE_ID_PLX_R685 0x1030 -+#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a -+#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076 -+#define PCI_DEVICE_ID_PLX_1077 0x1077 -+#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103 -+#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 -+#define PCI_DEVICE_ID_PLX_R753 0x1152 -+#define PCI_DEVICE_ID_PLX_9050 0x9050 -+#define PCI_DEVICE_ID_PLX_9060 0x9060 -+#define PCI_DEVICE_ID_PLX_9060ES 0x906E -+#define PCI_DEVICE_ID_PLX_9060SD 0x906D -+#define PCI_DEVICE_ID_PLX_9080 0x9080 -+#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 -+ -+#define PCI_VENDOR_ID_MADGE 0x10b6 -+#define PCI_DEVICE_ID_MADGE_MK2 0x0002 -+#define PCI_DEVICE_ID_MADGE_C155S 0x1001 -+ -+#define PCI_VENDOR_ID_3COM 0x10b7 -+#define PCI_DEVICE_ID_3COM_3C985 0x0001 -+#define PCI_DEVICE_ID_3COM_3C339 0x3390 -+#define PCI_DEVICE_ID_3COM_3C590 0x5900 -+#define PCI_DEVICE_ID_3COM_3C595 0x5950 -+#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 -+#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 -+#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 -+#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 -+#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 -+#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 -+#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 -+#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 -+#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 -+#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 -+#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 -+ -+#define PCI_VENDOR_ID_SMC 0x10b8 -+#define PCI_DEVICE_ID_SMC_EPIC100 0x0005 -+ -+#define PCI_VENDOR_ID_SUNDANCE 0x13F0 -+#define PCI_DEVICE_ID_SUNDANCE_ALTA 0x0201 -+ -+#define PCI_VENDOR_ID_AL 0x10b9 -+#define PCI_DEVICE_ID_AL_M1445 0x1445 -+#define PCI_DEVICE_ID_AL_M1449 0x1449 -+#define PCI_DEVICE_ID_AL_M1451 0x1451 -+#define PCI_DEVICE_ID_AL_M1461 0x1461 -+#define PCI_DEVICE_ID_AL_M1489 0x1489 -+#define PCI_DEVICE_ID_AL_M1511 0x1511 -+#define PCI_DEVICE_ID_AL_M1513 0x1513 -+#define PCI_DEVICE_ID_AL_M1521 0x1521 -+#define PCI_DEVICE_ID_AL_M1523 0x1523 -+#define PCI_DEVICE_ID_AL_M1531 0x1531 -+#define PCI_DEVICE_ID_AL_M1533 0x1533 -+#define PCI_DEVICE_ID_AL_M1541 0x1541 -+#define PCI_DEVICE_ID_AL_M1621 0x1621 -+#define PCI_DEVICE_ID_AL_M1631 0x1631 -+#define PCI_DEVICE_ID_AL_M1641 0x1641 -+#define PCI_DEVICE_ID_AL_M1647 0x1647 -+#define PCI_DEVICE_ID_AL_M1651 0x1651 -+#define PCI_DEVICE_ID_AL_M1543 0x1543 -+#define PCI_DEVICE_ID_AL_M3307 0x3307 -+#define PCI_DEVICE_ID_AL_M4803 0x5215 -+#define PCI_DEVICE_ID_AL_M5219 0x5219 -+#define PCI_DEVICE_ID_AL_M5229 0x5229 -+#define PCI_DEVICE_ID_AL_M5237 0x5237 -+#define PCI_DEVICE_ID_AL_M5243 0x5243 -+#define PCI_DEVICE_ID_AL_M5451 0x5451 -+#define PCI_DEVICE_ID_AL_M7101 0x7101 -+ -+#define PCI_VENDOR_ID_MITSUBISHI 0x10ba -+ -+#define PCI_VENDOR_ID_SURECOM 0x10bd -+#define PCI_DEVICE_ID_SURECOM_NE34 0x0e34 -+ -+#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 -+#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 -+ -+#define PCI_VENDOR_ID_ASP 0x10cd -+#define PCI_DEVICE_ID_ASP_ABP940 0x1200 -+#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 -+#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 -+ -+#define PCI_VENDOR_ID_MACRONIX 0x10d9 -+#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512 -+#define PCI_DEVICE_ID_MX987x3 0x0512 -+#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531 -+#define PCI_DEVICE_ID_MX987x5 0x0531 -+ -+#define PCI_VENDOR_ID_TCONRAD 0x10da -+#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 -+ -+#define PCI_VENDOR_ID_CERN 0x10dc -+#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001 -+#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002 -+#define PCI_DEVICE_ID_CERN_HIPPI_DST 0x0021 -+#define PCI_DEVICE_ID_CERN_HIPPI_SRC 0x0022 -+ -+#define PCI_VENDOR_ID_NVIDIA 0x10de -+#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 -+#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 -+#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029 -+#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C -+#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D -+#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 -+#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111 -+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151 -+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152 -+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153 -+ -+#define PCI_VENDOR_ID_IMS 0x10e0 -+#define PCI_DEVICE_ID_IMS_8849 0x8849 -+#define PCI_DEVICE_ID_IMS_TT128 0x9128 -+#define PCI_DEVICE_ID_IMS_TT3D 0x9135 -+ -+#define PCI_VENDOR_ID_TEKRAM2 0x10e1 -+#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c -+ -+#define PCI_VENDOR_ID_TUNDRA 0x10e3 -+#define PCI_DEVICE_ID_TUNDRA_CA91C042 0x0000 -+ -+#define PCI_VENDOR_ID_AMCC 0x10e8 -+#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 -+#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062 -+#define PCI_DEVICE_ID_AMCC_S5933 0x807d -+#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c -+ -+#define PCI_VENDOR_ID_INTERG 0x10ea -+#define PCI_DEVICE_ID_INTERG_1680 0x1680 -+#define PCI_DEVICE_ID_INTERG_1682 0x1682 -+#define PCI_DEVICE_ID_INTERG_2000 0x2000 -+#define PCI_DEVICE_ID_INTERG_2010 0x2010 -+#define PCI_DEVICE_ID_INTERG_5000 0x5000 -+#define PCI_DEVICE_ID_INTERG_5050 0x5050 -+ -+#define PCI_VENDOR_ID_REALTEK 0x10ec -+#define PCI_DEVICE_ID_REALTEK_8029 0x8029 -+#define PCI_DEVICE_ID_REALTEK_8129 0x8129 -+#define PCI_DEVICE_ID_REALTEK_8139 0x8139 -+ -+#define PCI_VENDOR_ID_XILINX 0x10ee -+#define PCI_DEVICE_ID_TURBOPAM 0x4020 -+ -+#define PCI_VENDOR_ID_TRUEVISION 0x10fa -+#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c -+ -+#define PCI_VENDOR_ID_INIT 0x1101 -+#define PCI_DEVICE_ID_INIT_320P 0x9100 -+#define PCI_DEVICE_ID_INIT_360P 0x9500 -+ -+#define PCI_VENDOR_ID_CREATIVE 0x1102 // duplicate: ECTIVA -+#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 -+ -+#define PCI_VENDOR_ID_ECTIVA 0x1102 // duplicate: CREATIVE -+#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938 -+ -+#define PCI_VENDOR_ID_TTI 0x1103 -+#define PCI_DEVICE_ID_TTI_HPT343 0x0003 -+#define PCI_DEVICE_ID_TTI_HPT366 0x0004 -+ -+#define PCI_VENDOR_ID_VIA 0x1106 -+#define PCI_VENDOR_ID_VIATEC 0x1106 -+#define PCI_DEVICE_ID_VIA_8363_0 0x0305 -+#define PCI_DEVICE_ID_VIA_8371_0 0x0391 -+#define PCI_DEVICE_ID_VIA_8501_0 0x0501 -+#define PCI_DEVICE_ID_VIA_82C505 0x0505 -+#define PCI_DEVICE_ID_VIA_82C561 0x0561 -+#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 -+#define PCI_DEVICE_ID_VIA_82C576 0x0576 -+#define PCI_DEVICE_ID_VIA_82C585 0x0585 -+#define PCI_DEVICE_ID_VIA_82C586_0 0x0586 -+#define PCI_DEVICE_ID_VIA_82C595 0x0595 -+#define PCI_DEVICE_ID_VIA_82C596 0x0596 -+#define PCI_DEVICE_ID_VIA_82C597_0 0x0597 -+#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 -+#define PCI_DEVICE_ID_VIA_8601_0 0x0601 -+#define PCI_DEVICE_ID_VIA_8605_0 0x0605 -+#define PCI_DEVICE_ID_VIA_82C680 0x0680 -+#define PCI_DEVICE_ID_VIA_82C686 0x0686 -+#define PCI_DEVICE_ID_VIA_82C691 0x0691 -+#define PCI_DEVICE_ID_VIA_82C693 0x0693 -+#define PCI_DEVICE_ID_VIA_82C693_1 0x0698 -+#define PCI_DEVICE_ID_VIA_82C926 0x0926 -+#define PCI_DEVICE_ID_VIA_82C576_1 0x1571 -+#define PCI_DEVICE_ID_VIA_82C595_97 0x1595 -+#define PCI_DEVICE_ID_VIA_82C586_2 0x3038 -+#define PCI_DEVICE_ID_VIA_82C586_3 0x3040 -+#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 -+#define PCI_DEVICE_ID_VIA_6305 0x3044 -+#define PCI_DEVICE_ID_VIA_82C596_3 0x3050 -+#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051 -+#define PCI_DEVICE_ID_VIA_82C686_4 0x3057 -+#define PCI_DEVICE_ID_VIA_82C686_5 0x3058 -+#define PCI_DEVICE_ID_VIA_8233_5 0x3059 -+#define PCI_DEVICE_ID_VIA_8233_7 0x3065 -+#define PCI_DEVICE_ID_VIA_VT6102 0x3065 -+#define PCI_DEVICE_ID_VIA_82C686_6 0x3068 -+#define PCI_DEVICE_ID_VIA_8233_0 0x3074 -+#define PCI_DEVICE_ID_VIA_VT6105 0x3106 -+#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 -+#define PCI_DEVICE_ID_VIA_8633_0 0x3091 -+#define PCI_DEVICE_ID_VIA_8367_0 0x3099 -+#define PCI_DEVICE_ID_VIA_86C100A 0x6100 -+#define PCI_DEVICE_ID_VIA_8231 0x8231 -+#define PCI_DEVICE_ID_VIA_8231_4 0x8235 -+#define PCI_DEVICE_ID_VIA_8365_1 0x8305 -+#define PCI_DEVICE_ID_VIA_8371_1 0x8391 -+#define PCI_DEVICE_ID_VIA_8501_1 0x8501 -+#define PCI_DEVICE_ID_VIA_82C597_1 0x8597 -+#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 -+#define PCI_DEVICE_ID_VIA_8601_1 0x8601 -+#define PCI_DEVICE_ID_VIA_8505_1 0X8605 -+#define PCI_DEVICE_ID_VIA_8633_1 0xB091 -+#define PCI_DEVICE_ID_VIA_8367_1 0xB099 -+ -+#define PCI_VENDOR_ID_SIEMENS 0x110A -+#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 -+ -+#define PCI_VENDOR_ID_SMC2 0x1113 -+#define PCI_DEVICE_ID_SMC2_1211TX 0x1211 -+#define PCI_DEVICE_ID_SMC2_1211 0x1211 -+#define PCI_DEVICE_ID_SMC2_1216 0x1216 -+ -+#define PCI_VENDOR_ID_VORTEX 0x1119 -+#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 -+#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 -+#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002 -+#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003 -+#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004 -+#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005 -+#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006 -+#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007 -+#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008 -+#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009 -+#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a -+#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b -+#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c -+#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d -+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100 -+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101 -+#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102 -+#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103 -+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104 -+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105 -+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110 -+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111 -+#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112 -+#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113 -+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114 -+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115 -+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120 -+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121 -+#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122 -+#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123 -+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124 -+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125 -+ -+#define PCI_VENDOR_ID_EF 0x111a -+#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 -+#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 -+ -+#define PCI_VENDOR_ID_IDT 0x111d -+#define PCI_DEVICE_ID_IDT_IDT77201 0x0001 -+ -+#define PCI_VENDOR_ID_FORE 0x1127 -+#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 -+#define PCI_DEVICE_ID_FORE_PCA200E 0x0300 -+ -+#define PCI_VENDOR_ID_IMAGINGTECH 0x112f -+#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 -+ -+#define PCI_VENDOR_ID_PHILIPS 0x1131 -+#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145 -+#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 -+#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 -+ -+#define PCI_VENDOR_ID_EICON 0x1133 -+#define PCI_DEVICE_ID_EICON_DIVA20PRO 0xe001 -+#define PCI_DEVICE_ID_EICON_DIVA20 0xe002 -+#define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003 -+#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004 -+#define PCI_DEVICE_ID_EICON_DIVA201 0xe005 -+#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010 -+#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012 -+#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 -+#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 -+ -+#define PCI_VENDOR_ID_CYCLONE 0x113c -+#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001 -+ -+#define PCI_VENDOR_ID_ALLIANCE 0x1142 -+#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 -+#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 -+#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424 -+#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d -+ -+#define PCI_VENDOR_ID_SYSKONNECT 0x1148 -+#define PCI_DEVICE_ID_SYSKONNECT_FP 0x4000 -+#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 -+#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 -+ -+#define PCI_VENDOR_ID_VMIC 0x114a -+#define PCI_DEVICE_ID_VMIC_VME 0x7587 -+ -+#define PCI_VENDOR_ID_DIGI 0x114f -+#define PCI_DEVICE_ID_DIGI_EPC 0x0002 -+#define PCI_DEVICE_ID_DIGI_RIGHTSWITCH 0x0003 -+#define PCI_DEVICE_ID_DIGI_XEM 0x0004 -+#define PCI_DEVICE_ID_DIGI_XR 0x0005 -+#define PCI_DEVICE_ID_DIGI_CX 0x0006 -+#define PCI_DEVICE_ID_DIGI_XRJ 0x0009 -+#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a -+#define PCI_DEVICE_ID_DIGI_XR_920 0x0027 -+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 -+#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 -+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 -+#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 -+ -+#define PCI_VENDOR_ID_MUTECH 0x1159 -+#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 -+ -+#define PCI_VENDOR_ID_XIRCOM 0x115d -+#define PCI_DEVICE_ID_XIRCOM_X3201_ETH 0x0003 -+#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 -+ -+#define PCI_VENDOR_ID_RENDITION 0x1163 -+#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001 -+#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000 -+ -+#define PCI_VENDOR_ID_SERVERWORKS 0x1166 -+#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 -+#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 -+#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010 -+#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011 -+#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 -+#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 -+#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211 -+#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212 -+#define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220 -+#define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB -+#define PCI_DEVICE_ID_SERVERWORKS_CSB5ISA 0x0230 -+ -+#define PCI_VENDOR_ID_SBE 0x1176 -+#define PCI_DEVICE_ID_SBE_WANXL100 0x0301 -+#define PCI_DEVICE_ID_SBE_WANXL200 0x0302 -+#define PCI_DEVICE_ID_SBE_WANXL400 0x0104 -+ -+#define PCI_VENDOR_ID_TOSHIBA 0x1179 -+#define PCI_DEVICE_ID_TOSHIBA_601 0x0601 -+#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a -+#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f -+ -+#define PCI_VENDOR_ID_RICOH 0x1180 -+#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 -+#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 -+#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 -+#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 -+#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 -+ -+#define PCI_VENDOR_ID_DLINK 0x1186 -+#define PCI_DEVICE_ID_DFE530TXP 0x1300 -+#define PCI_DEVICE_ID_DFE530TXS 0x1002 -+ -+#define PCI_VENDOR_ID_ARTOP 0x1191 -+#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 -+#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 -+#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006 -+#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007 -+#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002 -+#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010 -+#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020 -+#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030 -+#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040 -+#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050 -+#define PCI_DEVICE_ID_ARTOP_8060 0x8060 -+ -+#define PCI_VENDOR_ID_ZEITNET 0x1193 -+#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 -+#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 -+ -+#define PCI_VENDOR_ID_OMEGA 0x119b -+#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 -+ -+#define PCI_VENDOR_ID_FUJITSU_ME 0x119e -+#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 -+#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 -+ -+#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 -+#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 -+ -+#define PCI_VENDOR_ID_GALILEO 0x11ab -+#define PCI_DEVICE_ID_GALILEO_GT64011 0x4146 -+#define PCI_DEVICE_ID_GALILEO_GT64111 0x4146 -+#define PCI_DEVICE_ID_GALILEO_GT96100 0x9652 -+#define PCI_DEVICE_ID_GALILEO_GT96100A 0x9653 -+ -+#define PCI_VENDOR_ID_LINKSYS 0x11ad -+#define PCI_VENDOR_ID_LITEON 0x11ad -+#define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 -+#define PCI_DEVICE_ID_LC82C115 0xC115 -+ -+#define PCI_VENDOR_ID_V3 0x11b0 -+#define PCI_DEVICE_ID_V3_V960 0x0001 -+#define PCI_DEVICE_ID_V3_V350 0x0001 -+#define PCI_DEVICE_ID_V3_V961 0x0002 -+#define PCI_DEVICE_ID_V3_V351 0x0002 -+ -+#define PCI_VENDOR_ID_NP 0x11bc -+#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001 -+ -+#define PCI_VENDOR_ID_ATT 0x11c1 -+#define PCI_DEVICE_ID_ATT_L56XMF 0x0440 -+#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 -+ -+#define PCI_VENDOR_ID_SPECIALIX 0x11cb -+#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 -+#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 -+#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 -+#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 -+ -+#define PCI_VENDOR_ID_AURAVISION 0x11d1 -+#define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 -+ -+#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 -+#define PCI_DEVICE_ID_AD1889JS 0x1889 -+ -+#define PCI_VENDOR_ID_IKON 0x11d5 -+#define PCI_DEVICE_ID_IKON_10115 0x0115 -+#define PCI_DEVICE_ID_IKON_10117 0x0117 -+ -+#define PCI_VENDOR_ID_ZORAN 0x11de -+#define PCI_DEVICE_ID_ZORAN_36057 0x6057 -+#define PCI_DEVICE_ID_ZORAN_36120 0x6120 -+ -+#define PCI_VENDOR_ID_KINETIC 0x11f4 -+#define PCI_DEVICE_ID_KINETIC_2915 0x2915 -+ -+#define PCI_VENDOR_ID_COMPEX 0x11f6 -+#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 -+#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 -+#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 -+ -+#define PCI_VENDOR_ID_RP 0x11fe -+#define PCI_DEVICE_ID_RP32INTF 0x0001 -+#define PCI_DEVICE_ID_RP8INTF 0x0002 -+#define PCI_DEVICE_ID_RP16INTF 0x0003 -+#define PCI_DEVICE_ID_RP4QUAD 0x0004 -+#define PCI_DEVICE_ID_RP8OCTA 0x0005 -+#define PCI_DEVICE_ID_RP8J 0x0006 -+#define PCI_DEVICE_ID_RPP4 0x000A -+#define PCI_DEVICE_ID_RPP8 0x000B -+#define PCI_DEVICE_ID_RP8M 0x000C -+ -+#define PCI_VENDOR_ID_CYCLADES 0x120e -+#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 -+#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101 -+#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102 -+#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103 -+#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104 -+#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105 -+#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200 -+#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201 -+#define PCI_DEVICE_ID_PC300_RX_2 0x0300 -+#define PCI_DEVICE_ID_PC300_RX_1 0x0301 -+#define PCI_DEVICE_ID_PC300_TE_2 0x0310 -+#define PCI_DEVICE_ID_PC300_TE_1 0x0311 -+ -+#define PCI_VENDOR_ID_ESSENTIAL 0x120f -+#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 -+ -+#define PCI_VENDOR_ID_O2 0x1217 -+#define PCI_DEVICE_ID_O2_6729 0x6729 -+#define PCI_DEVICE_ID_O2_6730 0x673a -+#define PCI_DEVICE_ID_O2_6832 0x6832 -+#define PCI_DEVICE_ID_O2_6836 0x6836 -+ -+#define PCI_VENDOR_ID_3DFX 0x121a -+#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 -+#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 -+#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 -+#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 -+ -+#define PCI_VENDOR_ID_SIGMADES 0x1236 -+#define PCI_DEVICE_ID_SIGMADES_6425 0x6401 -+ -+#define PCI_VENDOR_ID_CCUBE 0x123f -+ -+#define PCI_VENDOR_ID_AVM 0x1244 -+#define PCI_DEVICE_ID_AVM_B1 0x0700 -+#define PCI_DEVICE_ID_AVM_C4 0x0800 -+#define PCI_DEVICE_ID_AVM_A1 0x0a00 -+#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00 -+#define PCI_DEVICE_ID_AVM_C2 0x1100 -+#define PCI_DEVICE_ID_AVM_T1 0x1200 -+ -+#define PCI_VENDOR_ID_DIPIX 0x1246 -+ -+#define PCI_VENDOR_ID_STALLION 0x124d -+#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000 -+#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002 -+#define PCI_DEVICE_ID_STALLION_EIOPCI 0x0003 -+ -+#define PCI_VENDOR_ID_OPTIBASE 0x1255 -+#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110 -+#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210 -+#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x2110 -+#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 -+#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 -+ -+#define PCI_VENDOR_ID_ESS 0x125d -+#define PCI_DEVICE_ID_ESS_ESS1968 0x1968 -+#define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 -+#define PCI_DEVICE_ID_ESS_ESS1978 0x1978 -+ -+#define PCI_VENDOR_ID_HARRIS 0x1260 -+#define PCI_DEVICE_ID_HARRIS_PRISM2 0x3873 -+ -+#define PCI_VENDOR_ID_SATSAGEM 0x1267 -+#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 -+#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352 -+#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b -+ -+#define PCI_VENDOR_ID_HUGHES 0x1273 -+#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 -+ -+#define PCI_VENDOR_ID_ENSONIQ 0x1274 -+#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 -+#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 -+#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371 -+ -+#define PCI_VENDOR_ID_ROCKWELL 0x127A -+ -+#define PCI_VENDOR_ID_DAVICOM 0x1282 -+#define PCI_DEVICE_ID_DM9009 0x9009 -+#define PCI_DEVICE_ID_DM9102 0x9102 -+ -+#define PCI_VENDOR_ID_ITE 0x1283 -+#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 -+#define PCI_DEVICE_ID_ITE_IT8172G 0x8172 -+#define PCI_DEVICE_ID_ITE_8872 0x8872 -+ -+ -+/* formerly Platform Tech */ -+#define PCI_VENDOR_ID_ESS_OLD 0x1285 -+#define PCI_DEVICE_ID_ESS_ESS0100 0x0100 -+ -+#define PCI_VENDOR_ID_ALTEON 0x12ae -+#define PCI_DEVICE_ID_ALTEON_ACENIC 0x0001 -+ -+#define PCI_VENDOR_ID_USR 0x12B9 -+ -+#define PCI_VENDOR_ID_HOLTEK 0x12c3 -+#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 -+ -+#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009 -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A -+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B -+ -+#define PCI_VENDOR_ID_PICTUREL 0x12c5 -+#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081 -+ -+#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 -+#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 -+ -+#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0 -+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031 -+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021 -+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011 -+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041 -+#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D -+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001 -+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010 -+ -+#define PCI_VENDOR_ID_AUREAL 0x12eb -+#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001 -+#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002 -+ -+#define PCI_VENDOR_ID_CBOARDS 0x1307 -+#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 -+ -+#define PCI_VENDOR_ID_SIIG 0x131f -+#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 -+#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001 -+#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002 -+#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010 -+#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011 -+#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012 -+#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020 -+#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021 -+#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030 -+#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031 -+#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032 -+#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034 -+#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035 -+#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036 -+#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050 -+#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051 -+#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052 -+#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000 -+#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001 -+#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002 -+#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020 -+#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021 -+#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030 -+#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031 -+#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032 -+#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040 -+#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041 -+#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042 -+#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010 -+#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011 -+#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012 -+#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050 -+#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051 -+#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052 -+#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 -+#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 -+#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 -+ -+#define PCI_VENDOR_ID_ADMTEK 0x1317 -+#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 -+ -+#define PCI_VENDOR_ID_DOMEX 0x134a -+#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 -+ -+#define PCI_VENDOR_ID_QUATECH 0x135C -+#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 -+#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 -+#define PCI_DEVICE_ID_QUATECH_DSC200 0x0030 -+#define PCI_DEVICE_ID_QUATECH_QSC200 0x0040 -+#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 -+#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 -+ -+#define PCI_VENDOR_ID_SEALEVEL 0x135e -+#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 -+#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201 -+#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402 -+#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 -+#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 -+#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 -+ -+#define PCI_VENDOR_ID_HYPERCOPE 0x1365 -+#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050 -+#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104 -+#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106 -+#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107 -+#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108 -+#define PCI_SUBDEVICE_ID_HYPERCOPE_PLEXUS 0x0109 -+ -+#define PCI_VENDOR_ID_KAWASAKI 0x136b -+#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01 -+ -+#define PCI_VENDOR_ID_LMC 0x1376 -+#define PCI_DEVICE_ID_LMC_HSSI 0x0003 -+#define PCI_DEVICE_ID_LMC_DS3 0x0004 -+#define PCI_DEVICE_ID_LMC_SSI 0x0005 -+#define PCI_DEVICE_ID_LMC_T1 0x0006 -+ -+#define PCI_VENDOR_ID_NETGEAR 0x1385 -+#define PCI_DEVICE_ID_NETGEAR_MA301 0x4100 -+#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a -+#define PCI_DEVICE_ID_NETGEAR_GA622 0x622a -+ -+#define PCI_VENDOR_ID_APPLICOM 0x1389 -+#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001 -+#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002 -+#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003 -+ -+#define PCI_VENDOR_ID_MOXA 0x1393 -+#define PCI_DEVICE_ID_MOXA_C104 0x1040 -+#define PCI_DEVICE_ID_MOXA_C168 0x1680 -+#define PCI_DEVICE_ID_MOXA_CP204J 0x2040 -+#define PCI_DEVICE_ID_MOXA_C218 0x2180 -+#define PCI_DEVICE_ID_MOXA_C320 0x3200 -+ -+#define PCI_VENDOR_ID_CCD 0x1397 -+#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 -+#define PCI_DEVICE_ID_CCD_B000 0xb000 -+#define PCI_DEVICE_ID_CCD_B006 0xb006 -+#define PCI_DEVICE_ID_CCD_B007 0xb007 -+#define PCI_DEVICE_ID_CCD_B008 0xb008 -+#define PCI_DEVICE_ID_CCD_B009 0xb009 -+#define PCI_DEVICE_ID_CCD_B00A 0xb00a -+#define PCI_DEVICE_ID_CCD_B00B 0xb00b -+#define PCI_DEVICE_ID_CCD_B00C 0xb00c -+#define PCI_DEVICE_ID_CCD_B100 0xb100 -+ -+#define PCI_VENDOR_ID_MICROGATE 0x13c0 -+#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 -+#define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 -+#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 -+ -+#define PCI_VENDOR_ID_3WARE 0x13C1 -+#define PCI_DEVICE_ID_3WARE_1000 0x1000 -+ -+#define PCI_VENDOR_ID_ABOCOM 0x13D1 -+#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1 -+ -+#define PCI_VENDOR_ID_CMEDIA 0x13f6 -+#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100 -+#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101 -+#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111 -+#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112 -+ -+#define PCI_VENDOR_ID_LAVA 0x1407 -+#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ -+#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ -+#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ -+#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ -+#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */ -+#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */ -+#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500 /* 1x 16550 */ -+#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600 /* 1x 16650 */ -+#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000 -+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */ -+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */ -+#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800 -+ -+#define PCI_VENDOR_ID_TIMEDIA 0x1409 -+#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 -+ -+#define PCI_VENDOR_ID_OXSEMI 0x1415 -+#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 -+#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 -+#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x950A -+#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 -+#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 -+ -+#define PCI_VENDOR_ID_AIRONET 0x14b9 -+#define PCI_DEVICE_ID_AIRONET_4800_1 0x0001 -+#define PCI_DEVICE_ID_AIRONET_4800 0x4500 // values switched? see -+#define PCI_DEVICE_ID_AIRONET_4500 0x4800 // drivers/net/aironet4500_card.c -+ -+#define PCI_VENDOR_ID_TITAN 0x14D2 -+#define PCI_DEVICE_ID_TITAN_010L 0x8001 -+#define PCI_DEVICE_ID_TITAN_100L 0x8010 -+#define PCI_DEVICE_ID_TITAN_110L 0x8011 -+#define PCI_DEVICE_ID_TITAN_200L 0x8020 -+#define PCI_DEVICE_ID_TITAN_210L 0x8021 -+#define PCI_DEVICE_ID_TITAN_400L 0x8040 -+#define PCI_DEVICE_ID_TITAN_800L 0x8080 -+#define PCI_DEVICE_ID_TITAN_100 0xA001 -+#define PCI_DEVICE_ID_TITAN_200 0xA005 -+#define PCI_DEVICE_ID_TITAN_400 0xA003 -+#define PCI_DEVICE_ID_TITAN_800B 0xA004 -+ -+#define PCI_VENDOR_ID_PANACOM 0x14d4 -+#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400 -+#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402 -+ -+#define PCI_VENDOR_ID_BROADCOM 0x14e4 -+#define PCI_DEVICE_ID_TIGON3_5700 0x1644 -+#define PCI_DEVICE_ID_TIGON3_5701 0x1645 -+#define PCI_DEVICE_ID_TIGON3_5702 0x1646 -+#define PCI_DEVICE_ID_TIGON3_5703 0x1647 -+#define PCI_DEVICE_ID_TIGON3_5704 0x1648 -+#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d -+#define PCI_DEVICE_ID_TIGON3_5705 0x1653 -+#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 -+#define PCI_DEVICE_ID_TIGON3_5705M 0x165d -+#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e -+#define PCI_DEVICE_ID_TIGON3_5782 0x1696 -+#define PCI_DEVICE_ID_TIGON3_5788 0x169c -+#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 -+#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 -+#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 -+#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 -+#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 -+#define PCI_DEVICE_ID_TIGON3_5901 0x170d -+#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e -+ -+#define PCI_VENDOR_ID_SYBA 0x1592 -+#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 -+#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 -+ -+#define PCI_VENDOR_ID_MORETON 0x15aa -+#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000 -+ -+#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 -+#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0 -+ -+#define PCI_VENDOR_ID_PDC 0x15e9 -+#define PCI_DEVICE_ID_PDC_1841 0x1841 -+ -+#define PCI_VENDOR_ID_SYMPHONY 0x1c1c -+#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 -+ -+#define PCI_VENDOR_ID_TEKRAM 0x1de1 -+#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 -+ -+#define PCI_VENDOR_ID_3DLABS 0x3d3d -+#define PCI_DEVICE_ID_3DLABS_300SX 0x0001 -+#define PCI_DEVICE_ID_3DLABS_500TX 0x0002 -+#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003 -+#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004 -+#define PCI_DEVICE_ID_3DLABS_MX 0x0006 -+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 -+#define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008 -+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 -+ -+#define PCI_VENDOR_ID_AVANCE 0x4005 -+#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064 -+#define PCI_DEVICE_ID_AVANCE_2302 0x2302 -+ -+#define PCI_VENDOR_ID_AKS 0x416c -+#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 -+#define PCI_DEVICE_ID_AKS_CPC 0x0200 -+ -+#define PCI_VENDOR_ID_NETVIN 0x4a14 -+#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 -+ -+#define PCI_VENDOR_ID_S3 0x5333 -+#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551 -+#define PCI_DEVICE_ID_S3_ViRGE 0x5631 -+#define PCI_DEVICE_ID_S3_TRIO 0x8811 -+#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812 -+#define PCI_DEVICE_ID_S3_TRIO64UVP 0x8814 -+#define PCI_DEVICE_ID_S3_ViRGE_VX 0x883d -+#define PCI_DEVICE_ID_S3_868 0x8880 -+#define PCI_DEVICE_ID_S3_928 0x88b0 -+#define PCI_DEVICE_ID_S3_864_1 0x88c0 -+#define PCI_DEVICE_ID_S3_864_2 0x88c1 -+#define PCI_DEVICE_ID_S3_964_1 0x88d0 -+#define PCI_DEVICE_ID_S3_964_2 0x88d1 -+#define PCI_DEVICE_ID_S3_968 0x88f0 -+#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901 -+#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902 -+#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01 -+#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10 -+#define PCI_DEVICE_ID_S3_ViRGE_MX 0x8c01 -+#define PCI_DEVICE_ID_S3_ViRGE_MXP 0x8c02 -+#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03 -+#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00 -+ -+#define PCI_VENDOR_ID_DCI 0x6666 -+#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 -+#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 -+ -+#define PCI_VENDOR_ID_GENROCO 0x5555 -+#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003 -+ -+#define PCI_VENDOR_ID_INTEL 0x8086 -+#define PCI_DEVICE_ID_INTEL_21145 0x0039 -+#define PCI_DEVICE_ID_INTEL_82375 0x0482 -+#define PCI_DEVICE_ID_INTEL_82424 0x0483 -+#define PCI_DEVICE_ID_INTEL_82378 0x0484 -+#define PCI_DEVICE_ID_INTEL_82430 0x0486 -+#define PCI_DEVICE_ID_INTEL_82434 0x04a3 -+#define PCI_DEVICE_ID_INTEL_I960 0x0960 -+#define PCI_DEVICE_ID_INTEL_82542 0x1000 -+#define PCI_DEVICE_ID_INTEL_82543GC_FIBER 0x1001 -+#define PCI_DEVICE_ID_INTEL_82543GC_COPPER 0x1004 -+#define PCI_DEVICE_ID_INTEL_82544EI_COPPER 0x1008 -+#define PCI_DEVICE_ID_INTEL_82544EI_FIBER 0x1009 -+#define PCI_DEVICE_ID_INTEL_82544GC_COPPER 0x100C -+#define PCI_DEVICE_ID_INTEL_82544GC_LOM 0x100D -+#define PCI_DEVICE_ID_INTEL_82540EM 0x100E -+#define PCI_DEVICE_ID_INTEL_82545EM_COPPER 0x100F -+#define PCI_DEVICE_ID_INTEL_82546EB_COPPER 0x1010 -+#define PCI_DEVICE_ID_INTEL_82545EM_FIBER 0x1011 -+#define PCI_DEVICE_ID_INTEL_82546EB_FIBER 0x1012 -+#define PCI_DEVICE_ID_INTEL_82540EM_LOM 0x1015 -+#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 -+#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 -+#define PCI_DEVICE_ID_INTEL_ID1031 0x1031 -+#define PCI_DEVICE_ID_INTEL_ID1038 0x1038 -+#define PCI_DEVICE_ID_INTEL_ID1039 0x1039 -+#define PCI_DEVICE_ID_INTEL_ID103A 0x103A -+#define PCI_DEVICE_ID_INTEL_82562ET 0x1031 -+#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 -+#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 -+#define PCI_DEVICE_ID_INTEL_82092AA_1 0x1222 -+#define PCI_DEVICE_ID_INTEL_7116 0x1223 -+#define PCI_DEVICE_ID_INTEL_82596 0x1226 -+#define PCI_DEVICE_ID_INTEL_82865 0x1227 -+#define PCI_DEVICE_ID_INTEL_82557 0x1229 -+#define PCI_DEVICE_ID_INTEL_82437 0x122d -+#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e -+#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230 -+#define PCI_DEVICE_ID_INTEL_82371MX 0x1234 -+#define PCI_DEVICE_ID_INTEL_82437MX 0x1235 -+#define PCI_DEVICE_ID_INTEL_82441 0x1237 -+#define PCI_DEVICE_ID_INTEL_82380FB 0x124b -+#define PCI_DEVICE_ID_INTEL_82439 0x1250 -+#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960 -+#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 -+#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 -+#define PCI_DEVICE_ID_INTEL_82801AA_2 0x2412 -+#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 -+#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415 -+#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416 -+#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418 -+#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420 -+#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421 -+#define PCI_DEVICE_ID_INTEL_82801AB_2 0x2422 -+#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423 -+#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425 -+#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426 -+#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428 -+#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440 -+#define PCI_DEVICE_ID_INTEL_82801BA_1 0x2442 -+#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443 -+#define PCI_DEVICE_ID_INTEL_82801BA_3 0x2444 -+#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445 -+#define PCI_DEVICE_ID_INTEL_82801BA_5 0x2446 -+#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448 -+#define PCI_DEVICE_ID_INTEL_82801BA_7 0x2449 -+#define PCI_DEVICE_ID_INTEL_82562 0x2449 -+#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a -+#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b -+#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c -+#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e -+#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 -+#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 -+#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 -+#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484 -+#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485 -+#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486 -+#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487 -+#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a -+#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b -+#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c -+#define PCI_DEVICE_ID_INTEL_80310 0x530d -+#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 -+#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 -+#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 -+#define PCI_DEVICE_ID_INTEL_82437VX 0x7030 -+#define PCI_DEVICE_ID_INTEL_82439TX 0x7100 -+#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110 -+#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 -+#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 -+#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 -+#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120 -+#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121 -+#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122 -+#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123 -+#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180 -+#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181 -+#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190 -+#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 -+#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 -+#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 -+#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 -+#define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a -+#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b -+#define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600 -+#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 -+#define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602 -+#define PCI_DEVICE_ID_INTEL_82372FB_3 0x7603 -+#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 -+#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 -+#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca -+ -+#define PCI_VENDOR_ID_COMPUTONE 0x8e0e -+#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291 -+#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302 -+#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e -+#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001 -+#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002 -+#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003 -+ -+#define PCI_VENDOR_ID_KTI 0x8e2e -+#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 -+ -+#define PCI_VENDOR_ID_ADAPTEC 0x9004 -+#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078 -+#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178 -+#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860 -+#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 -+#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578 -+#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800 -+#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038 -+#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075 -+#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078 -+#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178 -+#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 -+#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 -+#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 -+#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 -+#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 -+#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895 -+#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 -+#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 -+#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 -+#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 -+#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 -+#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578 -+#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678 -+#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778 -+#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878 -+#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78 -+ -+#define PCI_VENDOR_ID_ADAPTEC2 0x9005 -+#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010 -+#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011 -+#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013 -+#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f -+#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050 -+#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051 -+#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f -+#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080 -+#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081 -+#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083 -+#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f -+#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0 -+#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1 -+#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3 -+#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf -+ -+#define PCI_VENDOR_ID_ATRONICS 0x907f -+#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 -+ -+#define PCI_VENDOR_ID_HOLTEK2 0x9412 -+#define PCI_DEVICE_ID_HOLTEK2_6565 0x6565 -+ -+#define PCI_VENDOR_ID_NETMOS 0x9710 -+#define PCI_DEVICE_ID_NETMOS_9735 0x9735 -+#define PCI_DEVICE_ID_NETMOS_9835 0x9835 -+ -+#define PCI_SUBVENDOR_ID_EXSYS 0xd84d -+#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 -+ -+#define PCI_VENDOR_ID_TIGERJET 0xe159 -+#define PCI_DEVICE_ID_TIGERJET_300 0x0001 -+#define PCI_DEVICE_ID_TIGERJET_100 0x0002 -+ -+#define PCI_VENDOR_ID_ARK 0xedd8 -+#define PCI_DEVICE_ID_ARK_STING 0xa091 -+#define PCI_DEVICE_ID_ARK_STINGARK 0xa099 -+#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 -+ -Index: b/netboot/pci_io.c -=================================================================== ---- /dev/null -+++ b/netboot/pci_io.c -@@ -0,0 +1,431 @@ -+/* -+** Support for NE2000 PCI clones added David Monro June 1997 -+** Generalised to other NICs by Ken Yap July 1997 -+** -+** Most of this is taken from: -+** -+** /usr/src/linux/drivers/pci/pci.c -+** /usr/src/linux/include/linux/pci.h -+** /usr/src/linux/arch/i386/bios32.c -+** /usr/src/linux/include/linux/bios32.h -+** /usr/src/linux/drivers/net/ne.c -+*/ -+#define PCBIOS -+#include "grub.h" -+#include "pci.h" -+ -+#ifdef CONFIG_PCI_DIRECT -+#define PCIBIOS_SUCCESSFUL 0x00 -+ -+#define DEBUG 0 -+ -+/* -+ * Functions for accessing PCI configuration space with type 1 accesses -+ */ -+ -+#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) -+ -+int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, -+ unsigned int where, uint8_t *value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ *value = inb(0xCFC + (where&3)); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+int pcibios_read_config_word (unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint16_t *value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ *value = inw(0xCFC + (where&2)); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, -+ unsigned int where, uint32_t *value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ *value = inl(0xCFC); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, -+ unsigned int where, uint8_t value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ outb(value, 0xCFC + (where&3)); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, -+ unsigned int where, uint16_t value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ outw(value, 0xCFC + (where&2)); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value) -+{ -+ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); -+ outl(value, 0xCFC); -+ return PCIBIOS_SUCCESSFUL; -+} -+ -+#undef CONFIG_CMD -+ -+#else /* CONFIG_PCI_DIRECT not defined */ -+ -+#if !defined(PCBIOS) -+#error "The pcibios can only be used when the PCBIOS support is compiled in" -+#endif -+ -+ -+#define KERN_CODE_SEG 0X8 -+/* Stuff for asm */ -+#define save_flags(x) \ -+__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") -+ -+#define cli() __asm__ __volatile__ ("cli": : :"memory") -+ -+#define restore_flags(x) \ -+__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") -+ -+ -+ -+static struct { -+ unsigned long address; -+ unsigned short segment; -+} bios32_indirect = { 0, KERN_CODE_SEG }; -+ -+static long pcibios_entry = 0; -+static struct { -+ unsigned long address; -+ unsigned short segment; -+} pci_indirect = { 0, KERN_CODE_SEG }; -+ -+static unsigned long bios32_service(unsigned long service) -+{ -+ unsigned char return_code; /* %al */ -+ unsigned long address; /* %ebx */ -+ unsigned long length; /* %ecx */ -+ unsigned long entry; /* %edx */ -+ unsigned long flags; -+ -+ save_flags(flags); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%edi)" -+#else -+ "lcall *(%%edi)" -+#endif -+ : "=a" (return_code), -+ "=b" (address), -+ "=c" (length), -+ "=d" (entry) -+ : "0" (service), -+ "1" (0), -+ "D" (&bios32_indirect)); -+ restore_flags(flags); -+ -+ switch (return_code) { -+ case 0: -+ return address + entry; -+ case 0x80: /* Not present */ -+ printf("bios32_service(%d) : not present\n", service); -+ return 0; -+ default: /* Shouldn't happen */ -+ printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", -+ service, return_code); -+ return 0; -+ } -+} -+ -+int pcibios_read_config_byte(unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint8_t *value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=c" (*value), -+ "=a" (ret) -+ : "1" (PCIBIOS_READ_CONFIG_BYTE), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+int pcibios_read_config_word(unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint16_t *value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=c" (*value), -+ "=a" (ret) -+ : "1" (PCIBIOS_READ_CONFIG_WORD), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+int pcibios_read_config_dword(unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint32_t *value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=c" (*value), -+ "=a" (ret) -+ : "1" (PCIBIOS_READ_CONFIG_DWORD), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+int pcibios_write_config_byte (unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint8_t value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); cli(); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=a" (ret) -+ : "0" (PCIBIOS_WRITE_CONFIG_BYTE), -+ "c" (value), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+int pcibios_write_config_word (unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint16_t value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); cli(); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=a" (ret) -+ : "0" (PCIBIOS_WRITE_CONFIG_WORD), -+ "c" (value), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+int pcibios_write_config_dword (unsigned int bus, -+ unsigned int device_fn, unsigned int where, uint32_t value) -+{ -+ unsigned long ret; -+ unsigned long bx = (bus << 8) | device_fn; -+ unsigned long flags; -+ -+ save_flags(flags); cli(); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%esi)\n\t" -+#else -+ "lcall *(%%esi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:" -+ : "=a" (ret) -+ : "0" (PCIBIOS_WRITE_CONFIG_DWORD), -+ "c" (value), -+ "b" (bx), -+ "D" ((long) where), -+ "S" (&pci_indirect)); -+ restore_flags(flags); -+ return (int) (ret & 0xff00) >> 8; -+} -+ -+static void check_pcibios(void) -+{ -+ unsigned long signature; -+ unsigned char present_status; -+ unsigned char major_revision; -+ unsigned char minor_revision; -+ unsigned long flags; -+ int pack; -+ -+ if ((pcibios_entry = bios32_service(PCI_SERVICE))) { -+ pci_indirect.address = pcibios_entry; -+ -+ save_flags(flags); -+ __asm__( -+#ifdef ABSOLUTE_WITHOUT_ASTERISK -+ "lcall (%%edi)\n\t" -+#else -+ "lcall *(%%edi)\n\t" -+#endif -+ "jc 1f\n\t" -+ "xor %%ah, %%ah\n" -+ "1:\tshl $8, %%eax\n\t" -+ "movw %%bx, %%ax" -+ : "=d" (signature), -+ "=a" (pack) -+ : "1" (PCIBIOS_PCI_BIOS_PRESENT), -+ "D" (&pci_indirect) -+ : "bx", "cx"); -+ restore_flags(flags); -+ -+ present_status = (pack >> 16) & 0xff; -+ major_revision = (pack >> 8) & 0xff; -+ minor_revision = pack & 0xff; -+ if (present_status || (signature != PCI_SIGNATURE)) { -+ printf("ERROR: BIOS32 says PCI BIOS, but no PCI " -+ "BIOS????\n"); -+ pcibios_entry = 0; -+ } -+#if DEBUG -+ if (pcibios_entry) { -+ printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" -+ " entry at %#X\n", major_revision, -+ minor_revision, pcibios_entry); -+ } -+#endif -+ } -+} -+ -+static void pcibios_init(void) -+{ -+ union bios32 *check; -+ unsigned char sum; -+ int i, length; -+ unsigned long bios32_entry = 0; -+ -+ EnterFunction("pcibios_init"); -+ /* -+ * Follow the standard procedure for locating the BIOS32 Service -+ * directory by scanning the permissible address range from -+ * 0xe0000 through 0xfffff for a valid BIOS32 structure. -+ * -+ */ -+ -+ for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { -+ if (check->fields.signature != BIOS32_SIGNATURE) -+ continue; -+ length = check->fields.length * 16; -+ if (!length) -+ continue; -+ sum = 0; -+ for (i = 0; i < length ; ++i) -+ sum += check->chars[i]; -+ if (sum != 0) -+ continue; -+ if (check->fields.revision != 0) { -+ printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", -+ check->fields.revision, check); -+ continue; -+ } -+#if DEBUG -+ printf("pcibios_init : BIOS32 Service Directory " -+ "structure at %#X\n", check); -+#endif -+ if (!bios32_entry) { -+ if (check->fields.entry >= 0x100000) { -+ printf("pcibios_init: entry in high " -+ "memory, giving up\n"); -+ return; -+ } else { -+ bios32_entry = check->fields.entry; -+#if DEBUG -+ printf("pcibios_init : BIOS32 Service Directory" -+ " entry at %#X\n", bios32_entry); -+#endif -+ bios32_indirect.address = bios32_entry; -+ } -+ } -+ } -+ if (bios32_entry) -+ check_pcibios(); -+ LeaveFunction("pcibios_init"); -+} -+ -+#endif /* CONFIG_PCI_DIRECT not defined*/ -+ -+unsigned long pcibios_bus_base(unsigned int bus __unused) -+{ -+ /* architecturally this must be 0 */ -+ return 0; -+} -+ -+void find_pci(int type, struct pci_device *dev) -+{ -+ EnterFunction("find_pci"); -+#ifndef CONFIG_PCI_DIRECT -+ if (!pcibios_entry) { -+ pcibios_init(); -+ } -+ if (!pcibios_entry) { -+ printf("pci_init: no BIOS32 detected\n"); -+ return; -+ } -+#endif -+ LeaveFunction("find_pci"); -+ return scan_pci_bus(type, dev); -+} -Index: b/netboot/pcnet32.c -=================================================================== ---- /dev/null -+++ b/netboot/pcnet32.c -@@ -0,0 +1,1004 @@ -+/************************************************************************** -+* -+* pcnet32.c -- Etherboot device driver for the AMD PCnet32 -+* Written 2003-2003 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code based on: -+* pcnet32.c: An AMD PCnet32 ethernet driver for linux: -+* -+* (C) 1996-1999 Thomas Bogendoerfer -+* See Linux Driver for full information -+* -+* The transmit and poll functions were written with reference to: -+* lance.c - LANCE NIC driver for Etherboot written by Ken Yap -+* -+* Linux Driver Version 1.27a, 10.02.2002 -+* -+* -+* REVISION HISTORY: -+* ================ -+* v1.0 08-06-2003 timlegge Initial port of Linux driver -+* v1.1 08-23-2003 timlegge Add multicast support -+* v1.2 01-17-2004 timlegge Initial driver output cleanup -+* v1.3 03-29-2004 timlegge More driver cleanup -+* -+* Indent Options: indent -kr -i8 -+***************************************************************************/ -+ -+/* to get some global routines like printf */ -+#include "etherboot.h" -+/* to get the interface to the body of the program */ -+#include "nic.h" -+/* to get the PCI support functions, if this is a PCI NIC */ -+#include "pci.h" -+/* Include the time functions */ -+#include "timer.h" -+#include "mii.h" -+/* void hex_dump(const char *data, const unsigned int len); */ -+ -+/* Etherboot Specific definations */ -+#define drv_version "v1.3" -+#define drv_date "03-29-2004" -+ -+typedef unsigned char u8; -+typedef signed char s8; -+typedef unsigned short u16; -+typedef signed short s16; -+typedef unsigned int u32; -+typedef signed int s32; -+ -+static u32 ioaddr; /* Globally used for the card's io address */ -+ -+#ifdef EDEBUG -+#define dprintf(x) printf x -+#else -+#define dprintf(x) -+#endif -+ -+/* Condensed operations for readability. */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) -+ -+/* End Etherboot Specific */ -+ -+int cards_found /* __initdata */ ; -+ -+#ifdef REMOVE -+/* FIXME: Remove these they are probably pointless */ -+ -+/* -+ * VLB I/O addresses -+ */ -+static unsigned int pcnet32_portlist[] /*__initdata */ = -+{ 0x300, 0x320, 0x340, 0x360, 0 }; -+ -+static int pcnet32_debug = 1; -+static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip vers) */ -+static int pcnet32vlb; /* check for VLB cards ? */ -+ -+static struct net_device *pcnet32_dev; -+ -+static int max_interrupt_work = 80; -+static int rx_copybreak = 200; -+#endif -+#define PCNET32_PORT_AUI 0x00 -+#define PCNET32_PORT_10BT 0x01 -+#define PCNET32_PORT_GPSI 0x02 -+#define PCNET32_PORT_MII 0x03 -+ -+#define PCNET32_PORT_PORTSEL 0x03 -+#define PCNET32_PORT_ASEL 0x04 -+#define PCNET32_PORT_100 0x40 -+#define PCNET32_PORT_FD 0x80 -+ -+#define PCNET32_DMA_MASK 0xffffffff -+ -+/* -+ * table to translate option values from tulip -+ * to internal options -+ */ -+static unsigned char options_mapping[] = { -+ PCNET32_PORT_ASEL, /* 0 Auto-select */ -+ PCNET32_PORT_AUI, /* 1 BNC/AUI */ -+ PCNET32_PORT_AUI, /* 2 AUI/BNC */ -+ PCNET32_PORT_ASEL, /* 3 not supported */ -+ PCNET32_PORT_10BT | PCNET32_PORT_FD, /* 4 10baseT-FD */ -+ PCNET32_PORT_ASEL, /* 5 not supported */ -+ PCNET32_PORT_ASEL, /* 6 not supported */ -+ PCNET32_PORT_ASEL, /* 7 not supported */ -+ PCNET32_PORT_ASEL, /* 8 not supported */ -+ PCNET32_PORT_MII, /* 9 MII 10baseT */ -+ PCNET32_PORT_MII | PCNET32_PORT_FD, /* 10 MII 10baseT-FD */ -+ PCNET32_PORT_MII, /* 11 MII (autosel) */ -+ PCNET32_PORT_10BT, /* 12 10BaseT */ -+ PCNET32_PORT_MII | PCNET32_PORT_100, /* 13 MII 100BaseTx */ -+ PCNET32_PORT_MII | PCNET32_PORT_100 | PCNET32_PORT_FD, /* 14 MII 100BaseTx-FD */ -+ PCNET32_PORT_ASEL /* 15 not supported */ -+}; -+ -+#define MAX_UNITS 8 /* More are supported, limit only on options */ -+static int options[MAX_UNITS]; -+static int full_duplex[MAX_UNITS]; -+ -+/* -+ * Theory of Operation -+ * -+ * This driver uses the same software structure as the normal lance -+ * driver. So look for a verbose description in lance.c. The differences -+ * to the normal lance driver is the use of the 32bit mode of PCnet32 -+ * and PCnetPCI chips. Because these chips are 32bit chips, there is no -+ * 16MB limitation and we don't need bounce buffers. -+ */ -+ -+ -+ -+/* -+ * Set the number of Tx and Rx buffers, using Log_2(# buffers). -+ * Reasonable default values are 4 Tx buffers, and 16 Rx buffers. -+ * That translates to 2 (4 == 2^^2) and 4 (16 == 2^^4). -+ */ -+#ifndef PCNET32_LOG_TX_BUFFERS -+#define PCNET32_LOG_TX_BUFFERS 1 -+#define PCNET32_LOG_RX_BUFFERS 2 -+#endif -+ -+#define TX_RING_SIZE (1 << (PCNET32_LOG_TX_BUFFERS)) -+#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) -+/* FIXME: Fix this to allow multiple tx_ring descriptors */ -+#define TX_RING_LEN_BITS 0x0000 /*PCNET32_LOG_TX_BUFFERS) << 12) */ -+ -+#define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS)) -+#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) -+#define RX_RING_LEN_BITS ((PCNET32_LOG_RX_BUFFERS) << 4) -+ -+#define PKT_BUF_SZ 1544 -+ -+/* Offsets from base I/O address. */ -+#define PCNET32_WIO_RDP 0x10 -+#define PCNET32_WIO_RAP 0x12 -+#define PCNET32_WIO_RESET 0x14 -+#define PCNET32_WIO_BDP 0x16 -+ -+#define PCNET32_DWIO_RDP 0x10 -+#define PCNET32_DWIO_RAP 0x14 -+#define PCNET32_DWIO_RESET 0x18 -+#define PCNET32_DWIO_BDP 0x1C -+ -+#define PCNET32_TOTAL_SIZE 0x20 -+ -+/* Buffers for the tx and Rx */ -+ -+/* Create a static buffer of size PKT_BUF_SZ for each -+TX Descriptor. All descriptors point to a -+part of this buffer */ -+static unsigned char txb[PKT_BUF_SZ * TX_RING_SIZE]; -+// __attribute__ ((aligned(16))); -+ -+/* Create a static buffer of size PKT_BUF_SZ for each -+RX Descriptor All descriptors point to a -+part of this buffer */ -+static unsigned char rxb[RX_RING_SIZE * PKT_BUF_SZ]; -+// __attribute__ ((aligned(16))); -+ -+/* The PCNET32 Rx and Tx ring descriptors. */ -+struct pcnet32_rx_head { -+ u32 base; -+ s16 buf_length; -+ s16 status; -+ u32 msg_length; -+ u32 reserved; -+}; -+ -+struct pcnet32_tx_head { -+ u32 base; -+ s16 length; -+ s16 status; -+ u32 misc; -+ u32 reserved; -+}; -+ -+/* The PCNET32 32-Bit initialization block, described in databook. */ -+struct pcnet32_init_block { -+ u16 mode; -+ u16 tlen_rlen; -+ u8 phys_addr[6]; -+ u16 reserved; -+ u32 filter[2]; -+ /* Receive and transmit ring base, along with extra bits. */ -+ u32 rx_ring; -+ u32 tx_ring; -+}; -+/* PCnet32 access functions */ -+struct pcnet32_access { -+ u16(*read_csr) (unsigned long, int); -+ void (*write_csr) (unsigned long, int, u16); -+ u16(*read_bcr) (unsigned long, int); -+ void (*write_bcr) (unsigned long, int, u16); -+ u16(*read_rap) (unsigned long); -+ void (*write_rap) (unsigned long, u16); -+ void (*reset) (unsigned long); -+}; -+ -+/* Define the TX Descriptor */ -+static struct pcnet32_tx_head tx_ring[TX_RING_SIZE] -+ __attribute__ ((aligned(16))); -+ -+ -+/* Define the RX Descriptor */ -+static struct pcnet32_rx_head rx_ring[RX_RING_SIZE] -+ __attribute__ ((aligned(16))); -+ -+/* May need to be moved to mii.h */ -+struct mii_if_info { -+ int phy_id; -+ int advertising; -+ unsigned int full_duplex:1; /* is full duplex? */ -+}; -+ -+/* -+ * The first three fields of pcnet32_private are read by the ethernet device -+ * so we allocate the structure should be allocated by pci_alloc_consistent(). -+ */ -+#define MII_CNT 4 -+struct pcnet32_private { -+ struct pcnet32_init_block init_block; -+ struct pci_dev *pci_dev; /* Pointer to the associated pci device structure */ -+ const char *name; -+ /* The saved address of a sent-in-place packet/buffer, for skfree(). */ -+ struct sk_buff *tx_skbuff[TX_RING_SIZE]; -+ struct sk_buff *rx_skbuff[RX_RING_SIZE]; -+ struct pcnet32_access a; -+ unsigned int cur_rx, cur_tx; /* The next free ring entry */ -+ char tx_full; -+ int options; -+ int shared_irq:1, /* shared irq possible */ -+ ltint:1, /* enable TxDone-intr inhibitor */ -+ dxsuflo:1, /* disable transmit stop on uflo */ -+ mii:1; /* mii port available */ -+ struct mii_if_info mii_if; -+ unsigned char phys[MII_CNT]; -+ struct net_device *next; -+ int full_duplex:1; -+} lpx; -+ -+static struct pcnet32_private *lp; -+ -+static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num); -+#if 0 -+static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, -+ int val); -+#endif -+enum pci_flags_bit { -+ PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4, -+ PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 = -+ 0x10 << 2, PCI_ADDR3 = 0x10 << 3, -+}; -+ -+ -+static u16 pcnet32_wio_read_csr(unsigned long addr, int index) -+{ -+ outw(index, addr + PCNET32_WIO_RAP); -+ return inw(addr + PCNET32_WIO_RDP); -+} -+ -+static void pcnet32_wio_write_csr(unsigned long addr, int index, u16 val) -+{ -+ outw(index, addr + PCNET32_WIO_RAP); -+ outw(val, addr + PCNET32_WIO_RDP); -+} -+ -+static u16 pcnet32_wio_read_bcr(unsigned long addr, int index) -+{ -+ outw(index, addr + PCNET32_WIO_RAP); -+ return inw(addr + PCNET32_WIO_BDP); -+} -+ -+static void pcnet32_wio_write_bcr(unsigned long addr, int index, u16 val) -+{ -+ outw(index, addr + PCNET32_WIO_RAP); -+ outw(val, addr + PCNET32_WIO_BDP); -+} -+ -+static u16 pcnet32_wio_read_rap(unsigned long addr) -+{ -+ return inw(addr + PCNET32_WIO_RAP); -+} -+ -+static void pcnet32_wio_write_rap(unsigned long addr, u16 val) -+{ -+ outw(val, addr + PCNET32_WIO_RAP); -+} -+ -+static void pcnet32_wio_reset(unsigned long addr) -+{ -+ inw(addr + PCNET32_WIO_RESET); -+} -+ -+static int pcnet32_wio_check(unsigned long addr) -+{ -+ outw(88, addr + PCNET32_WIO_RAP); -+ return (inw(addr + PCNET32_WIO_RAP) == 88); -+} -+ -+static struct pcnet32_access pcnet32_wio = { -+ read_csr:pcnet32_wio_read_csr, -+ write_csr:pcnet32_wio_write_csr, -+ read_bcr:pcnet32_wio_read_bcr, -+ write_bcr:pcnet32_wio_write_bcr, -+ read_rap:pcnet32_wio_read_rap, -+ write_rap:pcnet32_wio_write_rap, -+ reset:pcnet32_wio_reset -+}; -+ -+static u16 pcnet32_dwio_read_csr(unsigned long addr, int index) -+{ -+ outl(index, addr + PCNET32_DWIO_RAP); -+ return (inl(addr + PCNET32_DWIO_RDP) & 0xffff); -+} -+ -+static void pcnet32_dwio_write_csr(unsigned long addr, int index, u16 val) -+{ -+ outl(index, addr + PCNET32_DWIO_RAP); -+ outl(val, addr + PCNET32_DWIO_RDP); -+} -+ -+static u16 pcnet32_dwio_read_bcr(unsigned long addr, int index) -+{ -+ outl(index, addr + PCNET32_DWIO_RAP); -+ return (inl(addr + PCNET32_DWIO_BDP) & 0xffff); -+} -+ -+static void pcnet32_dwio_write_bcr(unsigned long addr, int index, u16 val) -+{ -+ outl(index, addr + PCNET32_DWIO_RAP); -+ outl(val, addr + PCNET32_DWIO_BDP); -+} -+ -+static u16 pcnet32_dwio_read_rap(unsigned long addr) -+{ -+ return (inl(addr + PCNET32_DWIO_RAP) & 0xffff); -+} -+ -+static void pcnet32_dwio_write_rap(unsigned long addr, u16 val) -+{ -+ outl(val, addr + PCNET32_DWIO_RAP); -+} -+ -+static void pcnet32_dwio_reset(unsigned long addr) -+{ -+ inl(addr + PCNET32_DWIO_RESET); -+} -+ -+static int pcnet32_dwio_check(unsigned long addr) -+{ -+ outl(88, addr + PCNET32_DWIO_RAP); -+ return ((inl(addr + PCNET32_DWIO_RAP) & 0xffff) == 88); -+} -+ -+static struct pcnet32_access pcnet32_dwio = { -+ read_csr:pcnet32_dwio_read_csr, -+ write_csr:pcnet32_dwio_write_csr, -+ read_bcr:pcnet32_dwio_read_bcr, -+ write_bcr:pcnet32_dwio_write_bcr, -+ read_rap:pcnet32_dwio_read_rap, -+ write_rap:pcnet32_dwio_write_rap, -+ reset:pcnet32_dwio_reset -+}; -+ -+ -+/* Initialize the PCNET32 Rx and Tx rings. */ -+static int pcnet32_init_ring(struct nic *nic) -+{ -+ int i; -+ -+ lp->tx_full = 0; -+ lp->cur_rx = lp->cur_tx = 0; -+ -+ for (i = 0; i < RX_RING_SIZE; i++) { -+ rx_ring[i].base = (u32) virt_to_le32desc(&rxb[i]); -+ rx_ring[i].buf_length = le16_to_cpu(-PKT_BUF_SZ); -+ rx_ring[i].status = le16_to_cpu(0x8000); -+ } -+ -+ /* The Tx buffer address is filled in as needed, but we do need to clear -+ the upper ownership bit. */ -+ for (i = 0; i < TX_RING_SIZE; i++) { -+ tx_ring[i].base = 0; -+ tx_ring[i].status = 0; -+ } -+ -+ -+ lp->init_block.tlen_rlen = -+ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); -+ for (i = 0; i < 6; i++) -+ lp->init_block.phys_addr[i] = nic->node_addr[i]; -+ lp->init_block.rx_ring = (u32) virt_to_le32desc(&rx_ring[0]); -+ lp->init_block.tx_ring = (u32) virt_to_le32desc(&tx_ring[0]); -+ return 0; -+} -+ -+/************************************************************************** -+RESET - Reset adapter -+***************************************************************************/ -+static void pcnet32_reset(struct nic *nic) -+{ -+ /* put the card in its initial state */ -+ u16 val; -+ int i; -+ -+ /* Reset the PCNET32 */ -+ lp->a.reset(ioaddr); -+ -+ /* switch pcnet32 to 32bit mode */ -+ lp->a.write_bcr(ioaddr, 20, 2); -+ -+ /* set/reset autoselect bit */ -+ val = lp->a.read_bcr(ioaddr, 2) & ~2; -+ if (lp->options & PCNET32_PORT_ASEL) -+ val |= 2; -+ lp->a.write_bcr(ioaddr, 2, val); -+ /* handle full duplex setting */ -+ if (lp->full_duplex) { -+ val = lp->a.read_bcr(ioaddr, 9) & ~3; -+ if (lp->options & PCNET32_PORT_FD) { -+ val |= 1; -+ if (lp->options == -+ (PCNET32_PORT_FD | PCNET32_PORT_AUI)) -+ val |= 2; -+ } else if (lp->options & PCNET32_PORT_ASEL) { -+ /* workaround of xSeries250, turn on for 79C975 only */ -+ i = ((lp->a. -+ read_csr(ioaddr, -+ 88) | (lp->a.read_csr(ioaddr, -+ 89) << 16)) >> -+ 12) & 0xffff; -+ if (i == 0x2627) -+ val |= 3; -+ } -+ lp->a.write_bcr(ioaddr, 9, val); -+ } -+ -+ /* set/reset GPSI bit in test register */ -+ val = lp->a.read_csr(ioaddr, 124) & ~0x10; -+ if ((lp->options & PCNET32_PORT_PORTSEL) == PCNET32_PORT_GPSI) -+ val |= 0x10; -+ lp->a.write_csr(ioaddr, 124, val); -+ -+ if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { -+ val = lp->a.read_bcr(ioaddr, 32) & ~0x38; /* disable Auto Negotiation, set 10Mpbs, HD */ -+ if (lp->options & PCNET32_PORT_FD) -+ val |= 0x10; -+ if (lp->options & PCNET32_PORT_100) -+ val |= 0x08; -+ lp->a.write_bcr(ioaddr, 32, val); -+ } else { -+ if (lp->options & PCNET32_PORT_ASEL) { /* enable auto negotiate, setup, disable fd */ -+ val = lp->a.read_bcr(ioaddr, 32) & ~0x98; -+ val |= 0x20; -+ lp->a.write_bcr(ioaddr, 32, val); -+ } -+ } -+ -+#ifdef DO_DXSUFLO -+ if (lp->dxsuflo) { /* Disable transmit stop on underflow */ -+ val = lp->a.read_csr(ioaddr, 3); -+ val |= 0x40; -+ lp->a.write_csr(ioaddr, 3, val); -+ } -+#endif -+ -+ if (lp->ltint) { /* Enable TxDone-intr inhibitor */ -+ val = lp->a.read_csr(ioaddr, 5); -+ val |= (1 << 14); -+ lp->a.write_csr(ioaddr, 5, val); -+ } -+ lp->init_block.mode = -+ le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7); -+ lp->init_block.filter[0] = 0xffffffff; -+ lp->init_block.filter[1] = 0xffffffff; -+ -+ pcnet32_init_ring(nic); -+ -+ -+ /* Re-initialize the PCNET32, and start it when done. */ -+ lp->a.write_csr(ioaddr, 1, -+ (virt_to_bus(&lp->init_block)) & 0xffff); -+ lp->a.write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); -+ lp->a.write_csr(ioaddr, 4, 0x0915); -+ lp->a.write_csr(ioaddr, 0, 0x0001); -+ -+ -+ i = 0; -+ while (i++ < 100) -+ if (lp->a.read_csr(ioaddr, 0) & 0x0100) -+ break; -+ /* -+ * We used to clear the InitDone bit, 0x0100, here but Mark Stockton -+ * reports that doing so triggers a bug in the '974. -+ */ -+ lp->a.write_csr(ioaddr, 0, 0x0042); -+ -+ dprintf(("pcnet32 open, csr0 %hX.\n", lp->a.read_csr(ioaddr, 0))); -+ -+} -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int pcnet32_poll(struct nic *nic __unused, int retrieve) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ -+ int status; -+ int entry; -+ -+ entry = lp->cur_rx & RX_RING_MOD_MASK; -+ status = ((short) le16_to_cpu(rx_ring[entry].status) >> 8); -+ -+ if (status < 0) -+ return 0; -+ -+ if ( ! retrieve ) return 1; -+ -+ if (status == 0x03) { -+ nic->packetlen = -+ (le32_to_cpu(rx_ring[entry].msg_length) & 0xfff) - 4; -+ memcpy(nic->packet, &rxb[entry], nic->packetlen); -+ -+ /* Andrew Boyd of QNX reports that some revs of the 79C765 -+ * clear the buffer length */ -+ rx_ring[entry].buf_length = le16_to_cpu(-PKT_BUF_SZ); -+ rx_ring[entry].status |= le16_to_cpu(0x8000); /* prime for next receive */ -+ /* Switch to the next Rx ring buffer */ -+ lp->cur_rx++; -+ -+ } else { -+ return 0; -+ } -+ -+ return 1; -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void pcnet32_transmit(struct nic *nic __unused, const char *d, /* Destination */ -+ unsigned int t, /* Type */ -+ unsigned int s, /* size */ -+ const char *p) -+{ /* Packet */ -+ /* send the packet to destination */ -+ unsigned long time; -+ u8 *ptxb; -+ u16 nstype; -+ u16 status; -+ int entry = 0; /*lp->cur_tx & TX_RING_MOD_MASK; */ -+ -+ status = 0x8300; -+ /* point to the current txb incase multiple tx_rings are used */ -+ ptxb = txb + (lp->cur_tx * PKT_BUF_SZ); -+ -+ /* copy the packet to ring buffer */ -+ memcpy(ptxb, d, ETH_ALEN); /* dst */ -+ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ -+ nstype = htons((u16) t); /* type */ -+ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ -+ memcpy(ptxb + ETH_HLEN, p, s); -+ -+ s += ETH_HLEN; -+ while (s < ETH_ZLEN) /* pad to min length */ -+ ptxb[s++] = '\0'; -+ -+ tx_ring[entry].length = le16_to_cpu(-s); -+ tx_ring[entry].misc = 0x00000000; -+ tx_ring[entry].base = (u32) virt_to_le32desc(ptxb); -+ -+ /* we set the top byte as the very last thing */ -+ tx_ring[entry].status = le16_to_cpu(status); -+ -+ -+ /* Trigger an immediate send poll */ -+ lp->a.write_csr(ioaddr, 0, 0x0048); -+ -+ /* wait for transmit complete */ -+ lp->cur_tx = 0; /* (lp->cur_tx + 1); */ -+ time = currticks() + TICKS_PER_SEC; /* wait one second */ -+ while (currticks() < time && -+ ((short) le16_to_cpu(tx_ring[entry].status) < 0)); -+ -+ if ((short) le16_to_cpu(tx_ring[entry].status) < 0) -+ printf("PCNET32 timed out on transmit\n"); -+ -+ /* Stop pointing at the current txb -+ * otherwise the card continues to send the packet */ -+ tx_ring[entry].base = 0; -+ -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void pcnet32_disable(struct dev *dev __unused) -+{ -+ /* Stop the PCNET32 here -- it ocassionally polls memory if we don't */ -+ lp->a.write_csr(ioaddr, 0, 0x0004); -+ -+ /* -+ * Switch back to 16-bit mode to avoid problesm with dumb -+ * DOS packet driver after a warm reboot -+ */ -+ lp->a.write_bcr(ioaddr, 20, 4); -+} -+ -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+You should omit the last argument struct pci_device * for a non-PCI NIC -+***************************************************************************/ -+static int pcnet32_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *) dev; -+ int i, media; -+ int fdx, mii, fset, dxsuflo, ltint; -+ int chip_version; -+ char *chipname; -+ struct pcnet32_access *a = NULL; -+ u8 promaddr[6]; -+ -+ int shared = 1; -+ if (pci->ioaddr == 0) -+ return 0; -+ -+ /* BASE is used throughout to address the card */ -+ ioaddr = pci->ioaddr; -+ printf("pcnet32.c: Found %s, Vendor=0x%hX Device=0x%hX\n", -+ pci->name, pci->vendor, pci->dev_id); -+ -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ /* reset the chip */ -+ pcnet32_wio_reset(ioaddr); -+ -+ /* NOTE: 16-bit check is first, otherwise some older PCnet chips fail */ -+ if (pcnet32_wio_read_csr(ioaddr, 0) == 4 -+ && pcnet32_wio_check(ioaddr)) { -+ a = &pcnet32_wio; -+ } else { -+ pcnet32_dwio_reset(ioaddr); -+ if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 -+ && pcnet32_dwio_check(ioaddr)) { -+ a = &pcnet32_dwio; -+ } else -+ return 0; -+ } -+ -+ chip_version = -+ a->read_csr(ioaddr, 88) | (a->read_csr(ioaddr, 89) << 16); -+ -+ dprintf(("PCnet chip version is %0xhX\n", chip_version)); -+ if ((chip_version & 0xfff) != 0x003) -+ return 0; -+ -+ /* initialize variables */ -+ fdx = mii = fset = dxsuflo = ltint = 0; -+ chip_version = (chip_version >> 12) & 0xffff; -+ -+ switch (chip_version) { -+ case 0x2420: -+ chipname = "PCnet/PCI 79C970"; /* PCI */ -+ break; -+ case 0x2430: -+ if (shared) -+ chipname = "PCnet/PCI 79C970"; /* 970 gives the wrong chip id back */ -+ else -+ chipname = "PCnet/32 79C965"; /* 486/VL bus */ -+ break; -+ case 0x2621: -+ chipname = "PCnet/PCI II 79C970A"; /* PCI */ -+ fdx = 1; -+ break; -+ case 0x2623: -+ chipname = "PCnet/FAST 79C971"; /* PCI */ -+ fdx = 1; -+ mii = 1; -+ fset = 1; -+ ltint = 1; -+ break; -+ case 0x2624: -+ chipname = "PCnet/FAST+ 79C972"; /* PCI */ -+ fdx = 1; -+ mii = 1; -+ fset = 1; -+ break; -+ case 0x2625: -+ chipname = "PCnet/FAST III 79C973"; /* PCI */ -+ fdx = 1; -+ mii = 1; -+ break; -+ case 0x2626: -+ chipname = "PCnet/Home 79C978"; /* PCI */ -+ fdx = 1; -+ /* -+ * This is based on specs published at www.amd.com. This section -+ * assumes that a card with a 79C978 wants to go into 1Mb HomePNA -+ * mode. The 79C978 can also go into standard ethernet, and there -+ * probably should be some sort of module option to select the -+ * mode by which the card should operate -+ */ -+ /* switch to home wiring mode */ -+ media = a->read_bcr(ioaddr, 49); -+ -+ printf("media reset to %#x.\n", media); -+ a->write_bcr(ioaddr, 49, media); -+ break; -+ case 0x2627: -+ chipname = "PCnet/FAST III 79C975"; /* PCI */ -+ fdx = 1; -+ mii = 1; -+ break; -+ default: -+ printf("PCnet version %#x, no PCnet32 chip.\n", -+ chip_version); -+ return 0; -+ } -+ -+ /* -+ * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit -+ * starting until the packet is loaded. Strike one for reliability, lose -+ * one for latency - although on PCI this isnt a big loss. Older chips -+ * have FIFO's smaller than a packet, so you can't do this. -+ */ -+ -+ if (fset) { -+ a->write_bcr(ioaddr, 18, -+ (a->read_bcr(ioaddr, 18) | 0x0800)); -+ a->write_csr(ioaddr, 80, -+ (a->read_csr(ioaddr, 80) & 0x0C00) | 0x0c00); -+ dxsuflo = 1; -+ ltint = 1; -+ } -+ -+ dprintf(("%s at %hX,", chipname, ioaddr)); -+ -+ /* read PROM address */ -+ for (i = 0; i < 6; i++) -+ promaddr[i] = inb(ioaddr + i); -+ -+ /* Update the nic structure with the MAC Address */ -+ for (i = 0; i < ETH_ALEN; i++) { -+ nic->node_addr[i] = promaddr[i]; -+ } -+ /* Print out some hardware info */ -+ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, -+ ioaddr); -+ -+ /* Set to pci bus master */ -+ adjust_pci_device(pci); -+ -+ /* point to private storage */ -+ lp = &lpx; -+ -+#if EBDEBUG -+ if (((chip_version + 1) & 0xfffe) == 0x2624) { /* Version 0x2623 or 0x2624 */ -+ i = a->read_csr(ioaddr, 80) & 0x0C00; /* Check tx_start_pt */ -+ dprintf((" tx_start_pt(0x%hX):", i)); -+ switch (i >> 10) { -+ case 0: -+ dprintf((" 20 bytes,")); -+ break; -+ case 1: -+ dprintf((" 64 bytes,")); -+ break; -+ case 2: -+ dprintf((" 128 bytes,")); -+ break; -+ case 3: -+ dprintf(("~220 bytes,")); -+ break; -+ } -+ i = a->read_bcr(ioaddr, 18); /* Check Burst/Bus control */ -+ dprintf((" BCR18(%hX):", i & 0xffff)); -+ if (i & (1 << 5)) -+ dprintf(("BurstWrEn ")); -+ if (i & (1 << 6)) -+ dprintf(("BurstRdEn ")); -+ if (i & (1 << 7)) -+ dprintf(("DWordIO ")); -+ if (i & (1 << 11)) -+ dprintf(("NoUFlow ")); -+ i = a->read_bcr(ioaddr, 25); -+ dprintf((" SRAMSIZE=0x%hX,", i << 8)); -+ i = a->read_bcr(ioaddr, 26); -+ dprintf((" SRAM_BND=0x%hX,", i << 8)); -+ i = a->read_bcr(ioaddr, 27); -+ if (i & (1 << 14)) -+ dprintf(("LowLatRx")); -+ } -+#endif -+ lp->name = chipname; -+ lp->shared_irq = shared; -+ lp->full_duplex = fdx; -+ lp->dxsuflo = dxsuflo; -+ lp->ltint = ltint; -+ lp->mii = mii; -+ /* FIXME: Fix Options for only one card */ -+ if ((cards_found >= MAX_UNITS) -+ || ((unsigned int) options[cards_found] > sizeof(options_mapping))) -+ lp->options = PCNET32_PORT_ASEL; -+ else -+ lp->options = options_mapping[options[cards_found]]; -+ -+ if (fdx && !(lp->options & PCNET32_PORT_ASEL) && -+ ((cards_found >= MAX_UNITS) || full_duplex[cards_found])) -+ lp->options |= PCNET32_PORT_FD; -+ -+ if (!a) { -+ printf("No access methods\n"); -+ return 0; -+ } -+ lp->a = *a; -+ -+ /* detect special T1/E1 WAN card by checking for MAC address */ -+ if (nic->node_addr[0] == 0x00 && nic->node_addr[1] == 0xe0 -+ && nic->node_addr[2] == 0x75) -+ lp->options = PCNET32_PORT_FD | PCNET32_PORT_GPSI; -+ -+ lp->init_block.mode = le16_to_cpu(0x0003); /* Disable Rx and Tx. */ -+ lp->init_block.tlen_rlen = -+ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); -+ for (i = 0; i < 6; i++) -+ lp->init_block.phys_addr[i] = nic->node_addr[i]; -+ lp->init_block.filter[0] = 0xffffffff; -+ lp->init_block.filter[1] = 0xffffffff; -+ lp->init_block.rx_ring = virt_to_bus(&rx_ring); -+ lp->init_block.tx_ring = virt_to_bus(&tx_ring); -+ -+ /* switch pcnet32 to 32bit mode */ -+ a->write_bcr(ioaddr, 20, 2); -+ -+ -+ a->write_csr(ioaddr, 1, (virt_to_bus(&lp->init_block)) & 0xffff); -+ a->write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); -+ -+ /* -+ * To auto-IRQ we enable the initialization-done and DMA error -+ * interrupts. For ISA boards we get a DMA error, but VLB and PCI -+ * boards will work. -+ */ -+ /* Trigger an initialization just for the interrupt. */ -+ -+ a->write_csr(ioaddr, 0, 0x41); -+ mdelay(1); -+ -+ cards_found++; -+ -+ /* point to NIC specific routines */ -+ pcnet32_reset(nic); -+ if (1) { -+ int tmp; -+ int phy, phy_idx = 0; -+ u16 mii_lpa; -+ lp->phys[0] = 1; /* Default Setting */ -+ for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) { -+ int mii_status = mdio_read(nic, phy, MII_BMSR); -+ if (mii_status != 0xffff && mii_status != 0x0000) { -+ lp->phys[phy_idx++] = phy; -+ lp->mii_if.advertising = -+ mdio_read(nic, phy, MII_ADVERTISE); -+ if ((mii_status & 0x0040) == 0) { -+ tmp = phy; -+ dprintf (("MII PHY found at address %d, status " -+ "%hX advertising %hX\n", phy, mii_status, -+ lp->mii_if.advertising)); -+ } -+ } -+ } -+ if (phy_idx == 0) -+ printf("No MII transceiver found!\n"); -+ lp->mii_if.phy_id = lp->phys[0]; -+ -+ lp->mii_if.advertising = -+ mdio_read(nic, lp->phys[0], MII_ADVERTISE); -+ -+ mii_lpa = mdio_read(nic, lp->phys[0], MII_LPA); -+ lp->mii_if.advertising &= mii_lpa; -+ if (lp->mii_if.advertising & ADVERTISE_100FULL) -+ printf("100Mbps Full-Duplex\n"); -+ else if (lp->mii_if.advertising & ADVERTISE_100HALF) -+ printf("100Mbps Half-Duplex\n"); -+ else if (lp->mii_if.advertising & ADVERTISE_10FULL) -+ printf("10Mbps Full-Duplex\n"); -+ else if (lp->mii_if.advertising & ADVERTISE_10HALF) -+ printf("10Mbps Half-Duplex\n"); -+ else -+ printf("\n"); -+ } -+ -+ nic->poll = pcnet32_poll; -+ nic->transmit = pcnet32_transmit; -+ dev->disable = pcnet32_disable; -+ nic->irq = pcnet32_irq; -+ -+ return 1; -+} -+static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num) -+{ -+ u16 val_out; -+ int phyaddr; -+ -+ if (!lp->mii) -+ return 0; -+ -+ phyaddr = lp->a.read_bcr(ioaddr, 33); -+ -+ lp->a.write_bcr(ioaddr, 33, -+ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); -+ val_out = lp->a.read_bcr(ioaddr, 34); -+ lp->a.write_bcr(ioaddr, 33, phyaddr); -+ -+ return val_out; -+} -+ -+#if 0 -+static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, -+ int val) -+{ -+ int phyaddr; -+ -+ if (!lp->mii) -+ return; -+ -+ phyaddr = lp->a.read_bcr(ioaddr, 33); -+ -+ lp->a.write_bcr(ioaddr, 33, -+ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); -+ lp->a.write_bcr(ioaddr, 34, val); -+ lp->a.write_bcr(ioaddr, 33, phyaddr); -+} -+#endif -+ -+static struct pci_id pcnet32_nics[] = { -+ PCI_ROM(0x1022, 0x2000, "lancepci", "AMD Lance/PCI"), -+ PCI_ROM(0x1022, 0x2625, "pcnetfastiii", "AMD Lance/PCI PCNet/32"), -+ PCI_ROM(0x1022, 0x2001, "amdhomepna", "AMD Lance/HomePNA"), -+}; -+ -+struct pci_driver pcnet32_driver = { -+ .type = NIC_DRIVER, -+ .name = "PCNET32/PCI", -+ .probe = pcnet32_probe, -+ .ids = pcnet32_nics, -+ .id_count = sizeof(pcnet32_nics) / sizeof(pcnet32_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/pic8259.c -=================================================================== ---- /dev/null -+++ b/netboot/pic8259.c -@@ -0,0 +1,267 @@ -+/* -+ * Basic support for controlling the 8259 Programmable Interrupt Controllers. -+ * -+ * Initially written by Michael Brown (mcb30). -+ */ -+ -+#include -+#include -+ -+#ifdef DEBUG_IRQ -+#define DBG(...) printf ( __VA_ARGS__ ) -+#else -+#define DBG(...) -+#endif -+ -+/* Current locations of trivial IRQ handler. These will change at -+ * runtime when relocation is used; the handler needs to be copied to -+ * base memory before being installed. -+ */ -+void (*trivial_irq_handler)P((void)) = _trivial_irq_handler; -+uint16_t volatile *trivial_irq_trigger_count = &_trivial_irq_trigger_count; -+segoff_t *trivial_irq_chain_to = &_trivial_irq_chain_to; -+uint8_t *trivial_irq_chain = &_trivial_irq_chain; -+irq_t trivial_irq_installed_on = IRQ_NONE; -+ -+/* Previous trigger count for trivial IRQ handler */ -+static uint16_t trivial_irq_previous_trigger_count = 0; -+ -+/* Install a handler for the specified IRQ. Address of previous -+ * handler will be stored in previous_handler. Enabled/disabled state -+ * of IRQ will be preserved across call, therefore if the handler does -+ * chaining, ensure that either (a) IRQ is disabled before call, or -+ * (b) previous_handler points directly to the place that the handler -+ * picks up its chain-to address. -+ */ -+ -+int install_irq_handler ( irq_t irq, segoff_t *handler, -+ uint8_t *previously_enabled, -+ segoff_t *previous_handler ) { -+ segoff_t *irq_vector = IRQ_VECTOR ( irq ); -+ *previously_enabled = irq_enabled ( irq ); -+ -+ if ( irq > IRQ_MAX ) { -+ DBG ( "Invalid IRQ number %d\n" ); -+ return 0; -+ } -+ -+ previous_handler->segment = irq_vector->segment; -+ previous_handler->offset = irq_vector->offset; -+ if ( *previously_enabled ) disable_irq ( irq ); -+ DBG ( "Installing handler at %hx:%hx for IRQ %d, leaving %s\n", -+ handler->segment, handler->offset, irq, -+ ( *previously_enabled ? "enabled" : "disabled" ) ); -+ DBG ( "...(previous handler at %hx:%hx)\n", -+ previous_handler->segment, previous_handler->offset ); -+ irq_vector->segment = handler->segment; -+ irq_vector->offset = handler->offset; -+ if ( *previously_enabled ) enable_irq ( irq ); -+ return 1; -+} -+ -+/* Remove handler for the specified IRQ. Routine checks that another -+ * handler has not been installed that chains to handler before -+ * uninstalling handler. Enabled/disabled state of the IRQ will be -+ * restored to that specified by previously_enabled. -+ */ -+ -+int remove_irq_handler ( irq_t irq, segoff_t *handler, -+ uint8_t *previously_enabled, -+ segoff_t *previous_handler ) { -+ segoff_t *irq_vector = IRQ_VECTOR ( irq ); -+ -+ if ( irq > IRQ_MAX ) { -+ DBG ( "Invalid IRQ number %d\n" ); -+ return 0; -+ } -+ if ( ( irq_vector->segment != handler->segment ) || -+ ( irq_vector->offset != handler->offset ) ) { -+ DBG ( "Cannot remove handler for IRQ %d\n" ); -+ return 0; -+ } -+ -+ DBG ( "Removing handler for IRQ %d\n", irq ); -+ disable_irq ( irq ); -+ irq_vector->segment = previous_handler->segment; -+ irq_vector->offset = previous_handler->offset; -+ if ( *previously_enabled ) enable_irq ( irq ); -+ return 1; -+} -+ -+/* Install the trivial IRQ handler. This routine installs the -+ * handler, tests it and enables the IRQ. -+ */ -+ -+int install_trivial_irq_handler ( irq_t irq ) { -+ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); -+ -+ if ( trivial_irq_installed_on != IRQ_NONE ) { -+ DBG ( "Can install trivial IRQ handler only once\n" ); -+ return 0; -+ } -+ if ( SEGMENT(trivial_irq_handler) > 0xffff ) { -+ DBG ( "Trivial IRQ handler not in base memory\n" ); -+ return 0; -+ } -+ -+ DBG ( "Installing trivial IRQ handler on IRQ %d\n", irq ); -+ if ( ! install_irq_handler ( irq, &trivial_irq_handler_segoff, -+ trivial_irq_chain, -+ trivial_irq_chain_to ) ) -+ return 0; -+ trivial_irq_installed_on = irq; -+ -+ DBG ( "Testing trivial IRQ handler\n" ); -+ disable_irq ( irq ); -+ *trivial_irq_trigger_count = 0; -+ trivial_irq_previous_trigger_count = 0; -+ fake_irq ( irq ); -+ if ( ! trivial_irq_triggered ( irq ) ) { -+ DBG ( "Installation of trivial IRQ handler failed\n" ); -+ remove_trivial_irq_handler ( irq ); -+ return 0; -+ } -+ DBG ( "Trivial IRQ handler installed successfully\n" ); -+ enable_irq ( irq ); -+ return 1; -+} -+ -+/* Remove the trivial IRQ handler. -+ */ -+ -+int remove_trivial_irq_handler ( irq_t irq ) { -+ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); -+ -+ if ( trivial_irq_installed_on == IRQ_NONE ) return 1; -+ if ( irq != trivial_irq_installed_on ) { -+ DBG ( "Cannot uninstall trivial IRQ handler from IRQ %d; " -+ "is installed on IRQ %d\n", irq, -+ trivial_irq_installed_on ); -+ return 0; -+ } -+ -+ if ( ! remove_irq_handler ( irq, &trivial_irq_handler_segoff, -+ trivial_irq_chain, -+ trivial_irq_chain_to ) ) -+ return 0; -+ -+ if ( trivial_irq_triggered ( trivial_irq_installed_on ) ) { -+ DBG ( "Sending EOI for unwanted trivial IRQ\n" ); -+ send_specific_eoi ( trivial_irq_installed_on ); -+ } -+ -+ trivial_irq_installed_on = IRQ_NONE; -+ return 1; -+} -+ -+/* Safe method to detect whether or not trivial IRQ has been -+ * triggered. Using this call avoids potential race conditions. This -+ * call will return success only once per trigger. -+ */ -+ -+int trivial_irq_triggered ( irq_t irq ) { -+ uint16_t trivial_irq_this_trigger_count = *trivial_irq_trigger_count; -+ int triggered = ( trivial_irq_this_trigger_count - -+ trivial_irq_previous_trigger_count ); -+ -+ /* irq is not used at present, but we have it in the API for -+ * future-proofing; in case we want the facility to have -+ * multiple trivial IRQ handlers installed simultaneously. -+ * -+ * Avoid compiler warning about unused variable. -+ */ -+ if ( irq == IRQ_NONE ) {}; -+ -+ trivial_irq_previous_trigger_count = trivial_irq_this_trigger_count; -+ return triggered ? 1 : 0; -+} -+ -+/* Copy trivial IRQ handler to a new location. Typically used to copy -+ * the handler into base memory; when relocation is being used we need -+ * to do this before installing the handler. -+ * -+ * Call with target=NULL in order to restore the handler to its -+ * original location. -+ */ -+ -+int copy_trivial_irq_handler ( void *target, size_t target_size ) { -+ irq_t currently_installed_on = trivial_irq_installed_on; -+ uint32_t offset = ( target == NULL ? 0 : -+ target - &_trivial_irq_handler_start ); -+ -+ if (( target != NULL ) && ( target_size < TRIVIAL_IRQ_HANDLER_SIZE )) { -+ DBG ( "Insufficient space to copy trivial IRQ handler\n" ); -+ return 0; -+ } -+ -+ if ( currently_installed_on != IRQ_NONE ) { -+ DBG ("WARNING: relocating trivial IRQ handler while in use\n"); -+ if ( ! remove_trivial_irq_handler ( currently_installed_on ) ) -+ return 0; -+ } -+ -+ /* Do the actual copy */ -+ if ( target != NULL ) { -+ DBG ( "Copying trivial IRQ handler to %hx:%hx\n", -+ SEGMENT(target), OFFSET(target) ); -+ memcpy ( target, &_trivial_irq_handler_start, -+ TRIVIAL_IRQ_HANDLER_SIZE ); -+ } else { -+ DBG ( "Restoring trivial IRQ handler to original location\n" ); -+ } -+ /* Update all the pointers to structures within the handler */ -+ trivial_irq_handler = ( void (*)P((void)) ) -+ ( (void*)_trivial_irq_handler + offset ); -+ trivial_irq_trigger_count = (uint16_t*) -+ ( (void*)&_trivial_irq_trigger_count + offset ); -+ trivial_irq_chain_to = (segoff_t*) -+ ( (void*)&_trivial_irq_chain_to + offset ); -+ trivial_irq_chain = (uint8_t*) -+ ( (void*)&_trivial_irq_chain + offset ); -+ -+ if ( currently_installed_on != IRQ_NONE ) { -+ if ( ! install_trivial_irq_handler ( currently_installed_on ) ) -+ return 0; -+ } -+ return 1; -+} -+ -+/* Send non-specific EOI(s). This seems to be inherently unsafe. -+ */ -+ -+void send_nonspecific_eoi ( irq_t irq ) { -+ DBG ( "Sending non-specific EOI for IRQ %d\n", irq ); -+ if ( irq >= IRQ_PIC_CUTOFF ) { -+ outb ( ICR_EOI_NON_SPECIFIC, PIC2_ICR ); -+ } -+ outb ( ICR_EOI_NON_SPECIFIC, PIC1_ICR ); -+} -+ -+/* Send specific EOI(s). -+ */ -+ -+void send_specific_eoi ( irq_t irq ) { -+ DBG ( "Sending specific EOI for IRQ %d\n", irq ); -+ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(irq), ICR_REG(irq) ); -+ if ( irq >= IRQ_PIC_CUTOFF ) { -+ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(CHAINED_IRQ), -+ ICR_REG(CHAINED_IRQ) ); -+ } -+} -+ -+/* Dump current 8259 status: enabled IRQs and handler addresses. -+ */ -+ -+#ifdef DEBUG_IRQ -+void dump_irq_status ( void ) { -+ int irq = 0; -+ -+ for ( irq = 0; irq < 16; irq++ ) { -+ if ( irq_enabled ( irq ) ) { -+ printf ( "IRQ%d enabled, ISR at %hx:%hx\n", irq, -+ IRQ_VECTOR(irq)->segment, -+ IRQ_VECTOR(irq)->offset ); -+ } -+ } -+} -+#endif -Index: b/netboot/pic8259.h -=================================================================== ---- /dev/null -+++ b/netboot/pic8259.h -@@ -0,0 +1,99 @@ -+/* -+ * Basic support for controlling the 8259 Programmable Interrupt Controllers. -+ * -+ * Initially written by Michael Brown (mcb30). -+ */ -+ -+#ifndef PIC8259_H -+#define PIC8259_H -+ -+/* For segoff_t */ -+#include -+ -+#define IRQ_PIC_CUTOFF (8) -+ -+/* 8259 register locations */ -+#define PIC1_ICW1 (0x20) -+#define PIC1_OCW2 (0x20) -+#define PIC1_OCW3 (0x20) -+#define PIC1_ICR (0x20) -+#define PIC1_IRR (0x20) -+#define PIC1_ISR (0x20) -+#define PIC1_ICW2 (0x21) -+#define PIC1_ICW3 (0x21) -+#define PIC1_ICW4 (0x21) -+#define PIC1_IMR (0x21) -+#define PIC2_ICW1 (0xa0) -+#define PIC2_OCW2 (0xa0) -+#define PIC2_OCW3 (0xa0) -+#define PIC2_ICR (0xa0) -+#define PIC2_IRR (0xa0) -+#define PIC2_ISR (0xa0) -+#define PIC2_ICW2 (0xa1) -+#define PIC2_ICW3 (0xa1) -+#define PIC2_ICW4 (0xa1) -+#define PIC2_IMR (0xa1) -+ -+/* Register command values */ -+#define OCW3_ID (0x08) -+#define OCW3_READ_IRR (0x03) -+#define OCW3_READ_ISR (0x02) -+#define ICR_EOI_NON_SPECIFIC (0x20) -+#define ICR_EOI_NOP (0x40) -+#define ICR_EOI_SPECIFIC (0x60) -+#define ICR_EOI_SET_PRIORITY (0xc0) -+ -+/* Macros to enable/disable IRQs */ -+#define IMR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_IMR : PIC2_IMR ) -+#define IMR_BIT(x) ( 1 << ( (x) % IRQ_PIC_CUTOFF ) ) -+#define irq_enabled(x) ( ( inb ( IMR_REG(x) ) & IMR_BIT(x) ) == 0 ) -+#define enable_irq(x) outb ( inb( IMR_REG(x) ) & ~IMR_BIT(x), IMR_REG(x) ) -+#define disable_irq(x) outb ( inb( IMR_REG(x) ) | IMR_BIT(x), IMR_REG(x) ) -+ -+/* Macros for acknowledging IRQs */ -+#define ICR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_ICR : PIC2_ICR ) -+#define ICR_VALUE(x) ( (x) % IRQ_PIC_CUTOFF ) -+#define CHAINED_IRQ 2 -+ -+/* Utility macros to convert IRQ numbers to INT numbers and INT vectors */ -+#define IRQ_INT(x) ( (x)ioaddr + PNIC_REG_LEN ); -+ /* Write input data */ -+ for ( i = 0; i < input_length; i++ ) { -+ outb( ((char*)input)[i], nic->ioaddr + PNIC_REG_DATA ); -+ } -+ } -+ /* Write command */ -+ outw ( command, nic->ioaddr + PNIC_REG_CMD ); -+ /* Retrieve status */ -+ status = inw ( nic->ioaddr + PNIC_REG_STAT ); -+ /* Retrieve output length */ -+ _output_length = inw ( nic->ioaddr + PNIC_REG_LEN ); -+ if ( output_length == NULL ) { -+ if ( _output_length != output_max_length ) { -+ printf ( "pnic_command %#hx: wrong data length " -+ "returned (expected %d, got %d)\n", command, -+ output_max_length, _output_length ); -+ } -+ } else { -+ *output_length = _output_length; -+ } -+ if ( output != NULL ) { -+ if ( _output_length > output_max_length ) { -+ printf ( "pnic_command %#hx: output buffer too small " -+ "(have %d, need %d)\n", command, -+ output_max_length, _output_length ); -+ _output_length = output_max_length; -+ } -+ /* Retrieve output data */ -+ for ( i = 0; i < _output_length; i++ ) { -+ ((char*)output)[i] = -+ inb ( nic->ioaddr + PNIC_REG_DATA ); -+ } -+ } -+ return status; -+} -+ -+static uint16_t pnic_command ( struct nic *nic, uint16_t command, -+ void *input, uint16_t input_length, -+ void *output, uint16_t output_max_length, -+ uint16_t *output_length ) { -+ pnic_priv_data_t *priv = (pnic_priv_data_t*)nic->priv_data; -+ uint16_t status = pnic_command_quiet ( nic, command, -+ input, input_length, -+ output, output_max_length, -+ output_length ); -+ if ( status == PNIC_STATUS_OK ) return status; -+ printf ( "PNIC command %#hx (len %#hx) failed with status %#hx\n", -+ command, input_length, status ); -+ if ( priv->api_version ) pnic_api_check(priv->api_version); -+ return status; -+} -+ -+/* Check API version matches that of NIC */ -+static int pnic_api_check ( uint16_t api_version ) { -+ if ( api_version != PNIC_API_VERSION ) { -+ printf ( "Warning: API version mismatch! " -+ "(NIC's is %d.%d, ours is %d.%d)\n", -+ api_version >> 8, api_version & 0xff, -+ PNIC_API_VERSION >> 8, PNIC_API_VERSION & 0xff ); -+ } -+ if ( api_version < PNIC_API_VERSION ) { -+ printf ( "*** You may need to update your copy of Bochs ***\n" ); -+ } -+ return ( api_version == PNIC_API_VERSION ); -+} -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int pnic_poll(struct nic *nic, int retrieve) -+{ -+ uint16_t length; -+ uint16_t qlen; -+ -+ /* Check receive queue length to see if there's anything to -+ * get. Necessary since once we've called PNIC_CMD_RECV we -+ * have to read out the packet, otherwise it's lost forever. -+ */ -+ if ( pnic_command ( nic, PNIC_CMD_RECV_QLEN, NULL, 0, -+ &qlen, sizeof(qlen), NULL ) -+ != PNIC_STATUS_OK ) return ( 0 ); -+ if ( qlen == 0 ) return ( 0 ); -+ -+ /* There is a packet ready. Return 1 if we're only checking. */ -+ if ( ! retrieve ) return ( 1 ); -+ -+ /* Retrieve the packet */ -+ if ( pnic_command ( nic, PNIC_CMD_RECV, NULL, 0, -+ nic->packet, ETH_FRAME_LEN, &length ) -+ != PNIC_STATUS_OK ) return ( 0 ); -+ nic->packetlen = length; -+ return ( 1 ); -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void pnic_transmit( -+ struct nic *nic, -+ const char *dest, /* Destination */ -+ unsigned int type, /* Type */ -+ unsigned int size, /* size */ -+ const char *data) /* Packet */ -+{ -+ unsigned int nstype = htons ( type ); -+ -+ if ( ( ETH_HLEN + size ) >= ETH_FRAME_LEN ) { -+ printf ( "pnic_transmit: packet too large\n" ); -+ return; -+ } -+ -+ /* Assemble packet */ -+ memcpy ( tx_buffer, dest, ETH_ALEN ); -+ memcpy ( tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN ); -+ memcpy ( tx_buffer + 2 * ETH_ALEN, &nstype, 2 ); -+ memcpy ( tx_buffer + ETH_HLEN, data, size ); -+ -+ pnic_command ( nic, PNIC_CMD_XMIT, tx_buffer, ETH_HLEN + size, -+ NULL, 0, NULL ); -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void pnic_disable(struct dev *dev) -+{ -+ struct nic *nic = (struct nic *)dev; -+ pnic_command ( nic, PNIC_CMD_RESET, NULL, 0, NULL, 0, NULL ); -+} -+ -+/************************************************************************** -+IRQ - Handle card interrupt status -+***************************************************************************/ -+static void pnic_irq ( struct nic *nic, irq_action_t action ) -+{ -+ uint8_t enabled; -+ -+ switch ( action ) { -+ case DISABLE : -+ case ENABLE : -+ enabled = ( action == ENABLE ? 1 : 0 ); -+ pnic_command ( nic, PNIC_CMD_MASK_IRQ, -+ &enabled, sizeof(enabled), NULL, 0, NULL ); -+ break; -+ case FORCE : -+ pnic_command ( nic, PNIC_CMD_FORCE_IRQ, -+ NULL, 0, NULL, 0, NULL ); -+ break; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+***************************************************************************/ -+ -+static int pnic_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *)dev; -+ static pnic_priv_data_t priv; -+ uint16_t status; -+ -+ printf(" - "); -+ -+ /* Clear private data structure and chain it in */ -+ memset ( &priv, 0, sizeof(priv) ); -+ nic->priv_data = &priv; -+ -+ /* Mask the bit that says "this is an io addr" */ -+ nic->ioaddr = pci->ioaddr & ~3; -+ nic->irqno = pci->irq; -+ /* Not sure what this does, but the rtl8139 driver does it */ -+ adjust_pci_device(pci); -+ -+ status = pnic_command_quiet( nic, PNIC_CMD_API_VER, NULL, 0, -+ &priv.api_version, -+ sizeof(priv.api_version), NULL ); -+ if ( status != PNIC_STATUS_OK ) { -+ printf ( "PNIC failed installation check, code %#hx\n", -+ status ); -+ return 0; -+ } -+ pnic_api_check(priv.api_version); -+ status = pnic_command ( nic, PNIC_CMD_READ_MAC, NULL, 0, -+ nic->node_addr, ETH_ALEN, NULL ); -+ printf ( "Detected Bochs Pseudo NIC MAC %! (API v%d.%d) at %#hx\n", -+ nic->node_addr, priv.api_version>>8, priv.api_version&0xff, -+ nic->ioaddr ); -+ -+ /* point to NIC specific routines */ -+ dev->disable = pnic_disable; -+ nic->poll = pnic_poll; -+ nic->transmit = pnic_transmit; -+ nic->irq = pnic_irq; -+ return 1; -+} -+ -+static struct pci_id pnic_nics[] = { -+/* genrules.pl doesn't let us use macros for PCI IDs...*/ -+PCI_ROM(0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor"), -+}; -+ -+struct pci_driver pnic_driver = { -+ .type = NIC_DRIVER, -+ .name = "PNIC", -+ .probe = pnic_probe, -+ .ids = pnic_nics, -+ .id_count = sizeof(pnic_nics)/sizeof(pnic_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/pnic_api.h -=================================================================== ---- /dev/null -+++ b/netboot/pnic_api.h -@@ -0,0 +1,59 @@ -+/* -+ * Constants etc. for the Bochs/Etherboot pseudo-NIC -+ * -+ * This header file must be valid C and C++. -+ * -+ * Operation of the pseudo-NIC (PNIC) is pretty simple. To write a -+ * command plus data, first write the length of the data to -+ * PNIC_REG_LEN, then write the data a byte at a type to -+ * PNIC_REG_DATA, then write the command code to PNIC_REG_CMD. The -+ * status will be available from PNIC_REG_STAT. The length of any -+ * data returned will be in PNIC_REG_LEN and can be read a byte at a -+ * time from PNIC_REG_DATA. -+ */ -+ -+/* -+ * PCI parameters -+ */ -+#define PNIC_PCI_VENDOR 0xfefe /* Hopefully these won't clash with */ -+#define PNIC_PCI_DEVICE 0xefef /* any real PCI device IDs. */ -+ -+/* -+ * 'Hardware' register addresses, offset from io_base -+ */ -+#define PNIC_REG_CMD 0x00 /* Command register, 2 bytes, write only */ -+#define PNIC_REG_STAT 0x00 /* Status register, 2 bytes, read only */ -+#define PNIC_REG_LEN 0x02 /* Length register, 2 bytes, read-write */ -+#define PNIC_REG_DATA 0x04 /* Data port, 1 byte, read-write */ -+/* -+ * PNIC_MAX_REG used in Bochs to claim i/o space -+ */ -+#define PNIC_MAX_REG 0x04 -+ -+/* -+ * Command code definitions: write these into PNIC_REG_CMD -+ */ -+#define PNIC_CMD_NOOP 0x0000 -+#define PNIC_CMD_API_VER 0x0001 -+#define PNIC_CMD_READ_MAC 0x0002 -+#define PNIC_CMD_RESET 0x0003 -+#define PNIC_CMD_XMIT 0x0004 -+#define PNIC_CMD_RECV 0x0005 -+#define PNIC_CMD_RECV_QLEN 0x0006 -+#define PNIC_CMD_MASK_IRQ 0x0007 -+#define PNIC_CMD_FORCE_IRQ 0x0008 -+ -+/* -+ * Status code definitions: read these from PNIC_REG_STAT -+ * -+ * We avoid using status codes that might be confused with -+ * randomly-read data (e.g. 0x0000, 0xffff etc.) -+ */ -+#define PNIC_STATUS_OK 0x4f4b /* 'OK' */ -+#define PNIC_STATUS_UNKNOWN_CMD 0x3f3f /* '??' */ -+ -+/* -+ * Other miscellaneous information -+ */ -+ -+#define PNIC_API_VERSION 0x0101 /* 1.1 */ -Index: b/netboot/pxe.h -=================================================================== ---- /dev/null -+++ b/netboot/pxe.h -@@ -0,0 +1,521 @@ -+/* -+ * Copyright (c) 2000 Alfred Perlstein -+ * All rights reserved. -+ * Copyright (c) 2000 Paul Saab -+ * All rights reserved. -+ * Copyright (c) 2000 John Baldwin -+ * All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ * -+ * $FreeBSD: src/sys/boot/i386/libi386/pxe.h,v 1.4.2.2 2000/09/10 02:52:18 ps Exp $ -+ */ -+ -+/* -+ * The typedefs and structures declared in this file -+ * clearly violate style(9), the reason for this is to conform to the -+ * typedefs/structure-names used in the Intel literature to avoid confusion. -+ * -+ * It's for your own good. :) -+ */ -+ -+/* SEGOFF16_t defined in separate header for Etherboot -+ */ -+#include -+ -+/* It seems that intel didn't think about ABI, -+ * either that or 16bit ABI != 32bit ABI (which seems reasonable) -+ * I have to thank Intel for the hair loss I incurred trying to figure -+ * out why PXE was mis-reading structures I was passing it (at least -+ * from my point of view) -+ * -+ * Solution: use gcc's '__attribute__ ((packed))' to correctly align -+ * structures passed into PXE -+ * Question: does this really work for PXE's expected ABI? -+ */ -+#define PACKED __attribute__ ((packed)) -+ -+#define S_SIZE(s) s, sizeof(s) - 1 -+ -+#define IP_STR "%d.%d.%d.%d" -+#define IP_ARGS(ip) \ -+ (int)(ip >> 24) & 0xff, (int)(ip >> 16) & 0xff, \ -+ (int)(ip >> 8) & 0xff, (int)ip & 0xff -+ -+#define MAC_STR "%02x:%02x:%02x:%02x:%02x:%02x" -+#define MAC_ARGS(mac) \ -+ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] -+ -+#define PXENFSROOTPATH "/pxeroot" -+ -+typedef struct { -+ uint16_t Seg_Addr; -+ uint32_t Phy_Addr; -+ uint16_t Seg_Size; -+} PACKED SEGDESC_t; /* PACKED is required, otherwise gcc pads this out to 12 -+ bytes - mbrown@fensystems.co.uk (mcb30) 17/5/03 */ -+ -+typedef uint16_t SEGSEL_t; -+typedef uint16_t PXENV_STATUS_t; -+typedef uint32_t IP4_t; -+typedef uint32_t ADDR32_t; -+typedef uint16_t UDP_PORT_t; -+ -+#define MAC_ADDR_LEN 16 -+typedef uint8_t MAC_ADDR[MAC_ADDR_LEN]; -+ -+/* PXENV+ */ -+typedef struct { -+ uint8_t Signature[6]; /* 'PXENV+' */ -+ uint16_t Version; /* MSB = major, LSB = minor */ -+ uint8_t Length; /* structure length */ -+ uint8_t Checksum; /* checksum pad */ -+ SEGOFF16_t RMEntry; /* SEG:OFF to PXE entry point */ -+ /* don't use PMOffset and PMSelector (from the 2.1 PXE manual) */ -+ uint32_t PMOffset; /* Protected mode entry */ -+ SEGSEL_t PMSelector; /* Protected mode selector */ -+ SEGSEL_t StackSeg; /* Stack segment address */ -+ uint16_t StackSize; /* Stack segment size (bytes) */ -+ SEGSEL_t BC_CodeSeg; /* BC Code segment address */ -+ uint16_t BC_CodeSize; /* BC Code segment size (bytes) */ -+ SEGSEL_t BC_DataSeg; /* BC Data segment address */ -+ uint16_t BC_DataSize; /* BC Data segment size (bytes) */ -+ SEGSEL_t UNDIDataSeg; /* UNDI Data segment address */ -+ uint16_t UNDIDataSize; /* UNDI Data segment size (bytes) */ -+ SEGSEL_t UNDICodeSeg; /* UNDI Code segment address */ -+ uint16_t UNDICodeSize; /* UNDI Code segment size (bytes) */ -+ SEGOFF16_t PXEPtr; /* SEG:OFF to !PXE struct, -+ only present when Version > 2.1 */ -+} PACKED pxenv_t; -+ -+/* !PXE */ -+typedef struct { -+ uint8_t Signature[4]; -+ uint8_t StructLength; -+ uint8_t StructCksum; -+ uint8_t StructRev; -+ uint8_t reserved_1; -+ SEGOFF16_t UNDIROMID; -+ SEGOFF16_t BaseROMID; -+ SEGOFF16_t EntryPointSP; -+ SEGOFF16_t EntryPointESP; -+ SEGOFF16_t StatusCallout; -+ uint8_t reserved_2; -+ uint8_t SegDescCn; -+ SEGSEL_t FirstSelector; -+ SEGDESC_t Stack; -+ SEGDESC_t UNDIData; -+ SEGDESC_t UNDICode; -+ SEGDESC_t UNDICodeWrite; -+ SEGDESC_t BC_Data; -+ SEGDESC_t BC_Code; -+ SEGDESC_t BC_CodeWrite; -+} PACKED pxe_t; -+ -+#define PXENV_START_UNDI 0x0000 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t ax; -+ uint16_t bx; -+ uint16_t dx; -+ uint16_t di; -+ uint16_t es; -+} PACKED t_PXENV_START_UNDI; -+ -+#define PXENV_UNDI_STARTUP 0x0001 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_STARTUP; -+ -+#define PXENV_UNDI_CLEANUP 0x0002 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_CLEANUP; -+ -+#define PXENV_UNDI_INITIALIZE 0x0003 -+typedef struct { -+ PXENV_STATUS_t Status; -+ ADDR32_t ProtocolIni; /* Phys addr of a copy of the driver module */ -+ uint8_t reserved[8]; -+} PACKED t_PXENV_UNDI_INITIALIZE; -+ -+ -+#define MAXNUM_MCADDR 8 -+typedef struct { -+ uint16_t MCastAddrCount; -+ MAC_ADDR McastAddr[MAXNUM_MCADDR]; -+} PACKED t_PXENV_UNDI_MCAST_ADDRESS; -+ -+#define PXENV_UNDI_RESET_ADAPTER 0x0004 -+typedef struct { -+ PXENV_STATUS_t Status; -+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; -+} PACKED t_PXENV_UNDI_RESET; -+ -+#define PXENV_UNDI_SHUTDOWN 0x0005 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_SHUTDOWN; -+ -+#define PXENV_UNDI_OPEN 0x0006 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t OpenFlag; -+ uint16_t PktFilter; -+# define FLTR_DIRECTED 0x0001 -+# define FLTR_BRDCST 0x0002 -+# define FLTR_PRMSCS 0x0003 -+# define FLTR_SRC_RTG 0x0004 -+ -+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; -+} PACKED t_PXENV_UNDI_OPEN; -+ -+#define PXENV_UNDI_CLOSE 0x0007 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_CLOSE; -+ -+#define PXENV_UNDI_TRANSMIT 0x0008 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t Protocol; -+# define P_UNKNOWN 0 -+# define P_IP 1 -+# define P_ARP 2 -+# define P_RARP 3 -+ -+ uint8_t XmitFlag; -+# define XMT_DESTADDR 0x0000 -+# define XMT_BROADCAST 0x0001 -+ -+ SEGOFF16_t DestAddr; -+ SEGOFF16_t TBD; -+ uint32_t Reserved[2]; -+} PACKED t_PXENV_UNDI_TRANSMIT; -+ -+#define MAX_DATA_BLKS 8 -+typedef struct { -+ uint16_t ImmedLength; -+ SEGOFF16_t Xmit; -+ uint16_t DataBlkCount; -+ struct DataBlk { -+ uint8_t TDPtrType; -+ uint8_t TDRsvdByte; -+ uint16_t TDDataLen; -+ SEGOFF16_t TDDataPtr; -+ } DataBlock[MAX_DATA_BLKS]; -+} PACKED t_PXENV_UNDI_TBD; -+ -+#define PXENV_UNDI_SET_MCAST_ADDRESS 0x0009 -+typedef struct { -+ PXENV_STATUS_t Status; -+ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; -+} PACKED t_PXENV_UNDI_SET_MCAST_ADDR; -+ -+#define PXENV_UNDI_SET_STATION_ADDRESS 0x000A -+typedef struct { -+ PXENV_STATUS_t Status; -+ MAC_ADDR StationAddress; /* Temp MAC addres to use */ -+} PACKED t_PXENV_UNDI_SET_STATION_ADDRESS; -+ -+#define PXENV_UNDI_SET_PACKET_FILTER 0x000B -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t filter; /* see UNDI_OPEN (0x0006) */ -+} PACKED t_PXENV_UNDI_SET_PACKET_FILTER; -+ -+#define PXENV_UNDI_GET_INFORMATION 0x000C -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t BaseIo; /* Adapter base I/O address */ -+ uint16_t IntNumber; /* Adapter IRQ number */ -+ uint16_t MaxTranUnit; /* Adapter maximum transmit unit */ -+ uint16_t HwType; /* Type of protocol at the hardware addr */ -+# define ETHER_TYPE 1 -+# define EXP_ETHER_TYPE 2 -+# define IEEE_TYPE 6 -+# define ARCNET_TYPE 7 -+ -+ uint16_t HwAddrLen; /* Length of hardware address */ -+ MAC_ADDR CurrentNodeAddress; /* Current hardware address */ -+ MAC_ADDR PermNodeAddress; /* Permanent hardware address */ -+ SEGSEL_t ROMAddress; /* Real mode ROM segment address */ -+ uint16_t RxBufCt; /* Receive queue length */ -+ uint16_t TxBufCt; /* Transmit queue length */ -+} PACKED t_PXENV_UNDI_GET_INFORMATION; -+ -+#define PXENV_UNDI_GET_STATISTICS 0x000D -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint32_t XmitGoodFrames; /* Number of successful transmissions */ -+ uint32_t RcvGoodFrames; /* Number of good frames received */ -+ uint32_t RcvCRCErrors; /* Number of frames with CRC errors */ -+ uint32_t RcvResourceErrors; /* Number of frames dropped */ -+} PACKED t_PXENV_UNDI_GET_STATISTICS; -+ -+#define PXENV_UNDI_CLEAR_STATISTICS 0x000E -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_CLEAR_STATISTICS; -+ -+#define PXENV_UNDI_INITIATE_DIAGS 0x000F -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_INITIATE_DIAGS; -+ -+#define PXENV_UNDI_FORCE_INTERRUPT 0x0010 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_UNDI_FORCE_INTERRUPT; -+ -+#define PXENV_UNDI_GET_MCAST_ADDRESS 0x0011 -+typedef struct { -+ PXENV_STATUS_t Status; -+ IP4_t InetAddr; /* IP mulicast address */ -+ MAC_ADDR MediaAddr; /* MAC multicast address */ -+} PACKED t_PXENV_UNDI_GET_MCAST_ADDR; -+ -+#define PXENV_UNDI_GET_NIC_TYPE 0x0012 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t NicType; /* Type of NIC */ -+# define PCI_NIC 2 -+# define PnP_NIC 3 -+# define CardBus_NIC 4 -+ -+ union { -+ struct { -+ uint16_t Vendor_ID; -+ uint16_t Dev_ID; -+ uint8_t Base_Class; -+ uint8_t Sub_Class; -+ uint8_t Prog_Intf; -+ uint8_t Rev; -+ uint16_t BusDevFunc; -+ uint16_t SubVendor_ID; -+ uint16_t SubDevice_ID; -+ } pci, cardbus; -+ struct { -+ uint32_t EISA_Dev_ID; -+ uint8_t Base_Class; -+ uint8_t Sub_Class; -+ uint8_t Prog_Intf; -+ uint16_t CardSelNum; -+ } pnp; -+ } info; -+} PACKED t_PXENV_UNDI_GET_NIC_TYPE; -+ -+#define PXENV_UNDI_GET_IFACE_INFO 0x0013 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t IfaceType[16]; /* Name of MAC type in ASCII. */ -+ uint32_t LinkSpeed; /* Defined in NDIS 2.0 spec */ -+ uint32_t ServiceFlags; /* Defined in NDIS 2.0 spec */ -+ uint32_t Reserved[4]; /* must be 0 */ -+} PACKED t_PXENV_UNDI_GET_IFACE_INFO; -+ -+#define PXENV_UNDI_ISR 0x0014 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t FuncFlag; /* PXENV_UNDI_ISR_OUT_xxx */ -+ uint16_t BufferLength; /* Length of Frame */ -+ uint16_t FrameLength; /* Total length of reciever frame */ -+ uint16_t FrameHeaderLength; /* Length of the media header in Frame */ -+ SEGOFF16_t Frame; /* receive buffer */ -+ uint8_t ProtType; /* Protocol type */ -+ uint8_t PktType; /* Packet Type */ -+# define PXENV_UNDI_ISR_IN_START 1 -+# define PXENV_UNDI_ISR_IN_PROCESS 2 -+# define PXENV_UNDI_ISR_IN_GET_NEXT 3 -+ -+ /* one of these will be returned for PXENV_UNDI_ISR_IN_START */ -+# define PXENV_UNDI_ISR_OUT_OURS 0 -+# define PXENV_UNDI_ISR_OUT_NOT_OURS 1 -+ -+ /* -+ * one of these will bre returnd for PXEND_UNDI_ISR_IN_PROCESS -+ * and PXENV_UNDI_ISR_IN_GET_NEXT -+ */ -+# define PXENV_UNDI_ISR_OUT_DONE 0 -+# define PXENV_UNDI_ISR_OUT_TRANSMIT 2 -+# define PXENV_UNDI_ISR_OUT_RECEIVE 3 -+# define PXENV_UNDI_ISR_OUT_BUSY 4 -+} PACKED t_PXENV_UNDI_ISR; -+ -+#define PXENV_STOP_UNDI 0x0015 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_STOP_UNDI; -+ -+#define PXENV_TFTP_OPEN 0x0020 -+typedef struct { -+ PXENV_STATUS_t Status; -+ IP4_t ServerIPAddress; -+ IP4_t GatewayIPAddress; -+ uint8_t FileName[128]; -+ UDP_PORT_t TFTPPort; -+ uint16_t PacketSize; -+} PACKED t_PXENV_TFTP_OPEN; -+ -+#define PXENV_TFTP_CLOSE 0x0021 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_TFTP_CLOSE; -+ -+#define PXENV_TFTP_READ 0x0022 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t PacketNumber; -+ uint16_t BufferSize; -+ SEGOFF16_t Buffer; -+} PACKED t_PXENV_TFTP_READ; -+ -+#define PXENV_TFTP_READ_FILE 0x0023 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t FileName[128]; -+ uint32_t BufferSize; -+ ADDR32_t Buffer; -+ IP4_t ServerIPAddress; -+ IP4_t GatewayIPAdress; -+ IP4_t McastIPAdress; -+ UDP_PORT_t TFTPClntPort; -+ UDP_PORT_t TFTPSrvPort; -+ uint16_t TFTPOpenTimeOut; -+ uint16_t TFTPReopenDelay; -+} PACKED t_PXENV_TFTP_READ_FILE; -+ -+#define PXENV_TFTP_GET_FSIZE 0x0025 -+typedef struct { -+ PXENV_STATUS_t Status; -+ IP4_t ServerIPAddress; -+ IP4_t GatewayIPAdress; -+ uint8_t FileName[128]; -+ uint32_t FileSize; -+} PACKED t_PXENV_TFTP_GET_FSIZE; -+ -+#define PXENV_UDP_OPEN 0x0030 -+typedef struct { -+ PXENV_STATUS_t Status; -+ IP4_t src_ip; /* IP address of this station */ -+} PACKED t_PXENV_UDP_OPEN; -+ -+#define PXENV_UDP_CLOSE 0x0031 -+typedef struct { -+ PXENV_STATUS_t status; -+} PACKED t_PXENV_UDP_CLOSE; -+ -+#define PXENV_UDP_READ 0x0032 -+typedef struct { -+ PXENV_STATUS_t status; -+ IP4_t src_ip; /* IP of sender */ -+ IP4_t dest_ip; /* Only accept packets sent to this IP */ -+ UDP_PORT_t s_port; /* UDP source port of sender */ -+ UDP_PORT_t d_port; /* Only accept packets sent to this port */ -+ uint16_t buffer_size; /* Size of the packet buffer */ -+ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ -+} PACKED t_PXENV_UDP_READ; -+ -+#define PXENV_UDP_WRITE 0x0033 -+typedef struct { -+ PXENV_STATUS_t status; -+ IP4_t ip; /* dest ip addr */ -+ IP4_t gw; /* ip gateway */ -+ UDP_PORT_t src_port; /* source udp port */ -+ UDP_PORT_t dst_port; /* destination udp port */ -+ uint16_t buffer_size; /* Size of the packet buffer */ -+ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ -+} PACKED t_PXENV_UDP_WRITE; -+ -+#define PXENV_UNLOAD_STACK 0x0070 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint8_t reserved[10]; -+} PACKED t_PXENV_UNLOAD_STACK; -+ -+ -+#define PXENV_GET_CACHED_INFO 0x0071 -+typedef struct { -+ PXENV_STATUS_t Status; -+ uint16_t PacketType; /* type (defined right here) */ -+# define PXENV_PACKET_TYPE_DHCP_DISCOVER 1 -+# define PXENV_PACKET_TYPE_DHCP_ACK 2 -+# define PXENV_PACKET_TYPE_BINL_REPLY 3 -+ uint16_t BufferSize; /* max to copy, leave at 0 for pointer */ -+ SEGOFF16_t Buffer; /* copy to, leave at 0 for pointer */ -+ uint16_t BufferLimit; /* max size of buffer in BC dataseg ? */ -+} PACKED t_PXENV_GET_CACHED_INFO; -+ -+ -+/* structure filled in by PXENV_GET_CACHED_INFO -+ * (how we determine which IP we downloaded the initial bootstrap from) -+ * words can't describe... -+ */ -+typedef struct { -+ uint8_t opcode; -+# define BOOTP_REQ 1 -+# define BOOTP_REP 2 -+ uint8_t Hardware; /* hardware type */ -+ uint8_t Hardlen; /* hardware addr len */ -+ uint8_t Gatehops; /* zero it */ -+ uint32_t ident; /* random number chosen by client */ -+ uint16_t seconds; /* seconds since did initial bootstrap */ -+ uint16_t Flags; /* seconds since did initial bootstrap */ -+# define BOOTP_BCAST 0x8000 /* ? */ -+ IP4_t cip; /* Client IP */ -+ IP4_t yip; /* Your IP */ -+ IP4_t sip; /* IP to use for next boot stage */ -+ IP4_t gip; /* Relay IP ? */ -+ MAC_ADDR CAddr; /* Client hardware address */ -+ uint8_t Sname[64]; /* Server's hostname (Optional) */ -+ uint8_t bootfile[128]; /* boot filename */ -+ union { -+# if 1 -+# define BOOTP_DHCPVEND 1024 /* DHCP extended vendor field size */ -+# else -+# define BOOTP_DHCPVEND 312 /* DHCP standard vendor field size */ -+# endif -+ uint8_t d[BOOTP_DHCPVEND]; /* raw array of vendor/dhcp options */ -+ struct { -+ uint8_t magic[4]; /* DHCP magic cookie */ -+# ifndef VM_RFC1048 -+# define VM_RFC1048 0x63825363L /* ? */ -+# endif -+ uint32_t flags; /* bootp flags/opcodes */ -+ uint8_t pad[56]; /* I don't think intel knows what a -+ union does... */ -+ } v; -+ } vendor; -+} PACKED BOOTPLAYER; -+ -+#define PXENV_RESTART_TFTP 0x0073 -+#define t_PXENV_RESTART_TFTP t_PXENV_TFTP_READ_FILE -+ -+#define PXENV_START_BASE 0x0075 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_START_BASE; -+ -+#define PXENV_STOP_BASE 0x0076 -+typedef struct { -+ PXENV_STATUS_t Status; -+} PACKED t_PXENV_STOP_BASE; -Index: b/netboot/r8169.c -=================================================================== ---- /dev/null -+++ b/netboot/r8169.c -@@ -0,0 +1,854 @@ -+/************************************************************************** -+* r8169.c: Etherboot device driver for the RealTek RTL-8169 Gigabit -+* Written 2003 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code based on: -+* r8169.c: A RealTek RTL-8169 Gigabit Ethernet driver -+* for Linux kernel 2.4.x. -+* -+* Written 2002 ShuChen -+* See Linux Driver for full information -+* -+* Linux Driver Version 1.27a, 10.02.2002 -+* -+* Thanks to: -+* Jean Chen of RealTek Semiconductor Corp. for -+* providing the evaluation NIC used to develop -+* this driver. RealTek's support for Etherboot -+* is appreciated. -+* -+* REVISION HISTORY: -+* ================ -+* -+* v1.0 11-26-2003 timlegge Initial port of Linux driver -+* v1.5 01-17-2004 timlegge Initial driver output cleanup -+* v1.6 03-27-2004 timlegge Additional Cleanup -+* -+* Indent Options: indent -kr -i8 -+***************************************************************************/ -+ -+/* to get some global routines like printf */ -+#include "etherboot.h" -+/* to get the interface to the body of the program */ -+#include "nic.h" -+/* to get the PCI support functions, if this is a PCI NIC */ -+#include "pci.h" -+#include "timer.h" -+ -+#define drv_version "v1.6" -+#define drv_date "03-27-2004" -+ -+typedef unsigned char u8; -+typedef signed char s8; -+typedef unsigned short u16; -+typedef signed short s16; -+typedef unsigned int u32; -+typedef signed int s32; -+ -+#define HZ 1000 -+ -+static u32 ioaddr; -+ -+#ifdef EDEBUG -+#define dprintf(x) printf x -+#else -+#define dprintf(x) -+#endif -+ -+/* Condensed operations for readability. */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) -+ -+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -+ -+/* media options -+ _10_Half = 0x01, -+ _10_Full = 0x02, -+ _100_Half = 0x04, -+ _100_Full = 0x08, -+ _1000_Full = 0x10, -+*/ -+static int media = -1; -+ -+#if 0 -+/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ -+static int max_interrupt_work = 20; -+#endif -+ -+#if 0 -+/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). -+ The RTL chips use a 64 element hash table based on the Ethernet CRC. */ -+static int multicast_filter_limit = 32; -+#endif -+ -+/* MAC address length*/ -+#define MAC_ADDR_LEN 6 -+ -+/* max supported gigabit ethernet frame size -- must be at least (dev->mtu+14+4).*/ -+#define MAX_ETH_FRAME_SIZE 1536 -+ -+#define TX_FIFO_THRESH 256 /* In bytes */ -+ -+#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */ -+#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ -+#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ -+#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */ -+#define RxPacketMaxSize 0x0800 /* Maximum size supported is 16K-1 */ -+#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ -+ -+#define NUM_TX_DESC 1 /* Number of Tx descriptor registers */ -+#define NUM_RX_DESC 4 /* Number of Rx descriptor registers */ -+#define RX_BUF_SIZE 1536 /* Rx Buffer size */ -+ -+#define RTL_MIN_IO_SIZE 0x80 -+#define TX_TIMEOUT (6*HZ) -+ -+/* write/read MMIO register */ -+#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) -+#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg)) -+#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg)) -+#define RTL_R8(reg) readb (ioaddr + (reg)) -+#define RTL_R16(reg) readw (ioaddr + (reg)) -+#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg))) -+ -+enum RTL8169_registers { -+ MAC0 = 0, /* Ethernet hardware address. */ -+ MAR0 = 8, /* Multicast filter. */ -+ TxDescStartAddr = 0x20, -+ TxHDescStartAddr = 0x28, -+ FLASH = 0x30, -+ ERSR = 0x36, -+ ChipCmd = 0x37, -+ TxPoll = 0x38, -+ IntrMask = 0x3C, -+ IntrStatus = 0x3E, -+ TxConfig = 0x40, -+ RxConfig = 0x44, -+ RxMissed = 0x4C, -+ Cfg9346 = 0x50, -+ Config0 = 0x51, -+ Config1 = 0x52, -+ Config2 = 0x53, -+ Config3 = 0x54, -+ Config4 = 0x55, -+ Config5 = 0x56, -+ MultiIntr = 0x5C, -+ PHYAR = 0x60, -+ TBICSR = 0x64, -+ TBI_ANAR = 0x68, -+ TBI_LPAR = 0x6A, -+ PHYstatus = 0x6C, -+ RxMaxSize = 0xDA, -+ CPlusCmd = 0xE0, -+ RxDescStartAddr = 0xE4, -+ EarlyTxThres = 0xEC, -+ FuncEvent = 0xF0, -+ FuncEventMask = 0xF4, -+ FuncPresetState = 0xF8, -+ FuncForceEvent = 0xFC, -+}; -+ -+enum RTL8169_register_content { -+ /*InterruptStatusBits */ -+ SYSErr = 0x8000, -+ PCSTimeout = 0x4000, -+ SWInt = 0x0100, -+ TxDescUnavail = 0x80, -+ RxFIFOOver = 0x40, -+ RxUnderrun = 0x20, -+ RxOverflow = 0x10, -+ TxErr = 0x08, -+ TxOK = 0x04, -+ RxErr = 0x02, -+ RxOK = 0x01, -+ -+ /*RxStatusDesc */ -+ RxRES = 0x00200000, -+ RxCRC = 0x00080000, -+ RxRUNT = 0x00100000, -+ RxRWT = 0x00400000, -+ -+ /*ChipCmdBits */ -+ CmdReset = 0x10, -+ CmdRxEnb = 0x08, -+ CmdTxEnb = 0x04, -+ RxBufEmpty = 0x01, -+ -+ /*Cfg9346Bits */ -+ Cfg9346_Lock = 0x00, -+ Cfg9346_Unlock = 0xC0, -+ -+ /*rx_mode_bits */ -+ AcceptErr = 0x20, -+ AcceptRunt = 0x10, -+ AcceptBroadcast = 0x08, -+ AcceptMulticast = 0x04, -+ AcceptMyPhys = 0x02, -+ AcceptAllPhys = 0x01, -+ -+ /*RxConfigBits */ -+ RxCfgFIFOShift = 13, -+ RxCfgDMAShift = 8, -+ -+ /*TxConfigBits */ -+ TxInterFrameGapShift = 24, -+ TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */ -+ -+ /*rtl8169_PHYstatus */ -+ TBI_Enable = 0x80, -+ TxFlowCtrl = 0x40, -+ RxFlowCtrl = 0x20, -+ _1000bpsF = 0x10, -+ _100bps = 0x08, -+ _10bps = 0x04, -+ LinkStatus = 0x02, -+ FullDup = 0x01, -+ -+ /*GIGABIT_PHY_registers */ -+ PHY_CTRL_REG = 0, -+ PHY_STAT_REG = 1, -+ PHY_AUTO_NEGO_REG = 4, -+ PHY_1000_CTRL_REG = 9, -+ -+ /*GIGABIT_PHY_REG_BIT */ -+ PHY_Restart_Auto_Nego = 0x0200, -+ PHY_Enable_Auto_Nego = 0x1000, -+ -+ /* PHY_STAT_REG = 1; */ -+ PHY_Auto_Neco_Comp = 0x0020, -+ -+ /* PHY_AUTO_NEGO_REG = 4; */ -+ PHY_Cap_10_Half = 0x0020, -+ PHY_Cap_10_Full = 0x0040, -+ PHY_Cap_100_Half = 0x0080, -+ PHY_Cap_100_Full = 0x0100, -+ -+ /* PHY_1000_CTRL_REG = 9; */ -+ PHY_Cap_1000_Full = 0x0200, -+ -+ PHY_Cap_Null = 0x0, -+ -+ /*_MediaType*/ -+ _10_Half = 0x01, -+ _10_Full = 0x02, -+ _100_Half = 0x04, -+ _100_Full = 0x08, -+ _1000_Full = 0x10, -+ -+ /*_TBICSRBit*/ -+ TBILinkOK = 0x02000000, -+}; -+ -+static struct { -+ const char *name; -+ u8 version; /* depend on RTL8169 docs */ -+ u32 RxConfigMask; /* should clear the bits supported by this chip */ -+} rtl_chip_info[] = { -+ { -+"RTL-8169", 0x00, 0xff7e1880,},}; -+ -+enum _DescStatusBit { -+ OWNbit = 0x80000000, -+ EORbit = 0x40000000, -+ FSbit = 0x20000000, -+ LSbit = 0x10000000, -+}; -+ -+struct TxDesc { -+ u32 status; -+ u32 vlan_tag; -+ u32 buf_addr; -+ u32 buf_Haddr; -+}; -+ -+struct RxDesc { -+ u32 status; -+ u32 vlan_tag; -+ u32 buf_addr; -+ u32 buf_Haddr; -+}; -+ -+/* The descriptors for this card are required to be aligned on -+256 byte boundaries. As the align attribute does not do more than -+16 bytes of alignment it requires some extra steps. Add 256 to the -+size of the array and the init_ring adjusts the alignment */ -+ -+/* Define the TX Descriptor */ -+static u8 tx_ring[NUM_TX_DESC * sizeof(struct TxDesc) + 256]; -+ -+/* Create a static buffer of size RX_BUF_SZ for each -+TX Descriptor. All descriptors point to a -+part of this buffer */ -+static unsigned char txb[NUM_TX_DESC * RX_BUF_SIZE]; -+ -+/* Define the RX Descriptor */ -+static u8 rx_ring[NUM_RX_DESC * sizeof(struct TxDesc) + 256]; -+ -+/* Create a static buffer of size RX_BUF_SZ for each -+RX Descriptor All descriptors point to a -+part of this buffer */ -+static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; -+ -+struct rtl8169_private { -+ void *mmio_addr; /* memory map physical address */ -+ int chipset; -+ unsigned long cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ -+ unsigned long cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */ -+ unsigned char *TxDescArrays; /* Index of Tx Descriptor buffer */ -+ unsigned char *RxDescArrays; /* Index of Rx Descriptor buffer */ -+ struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */ -+ struct RxDesc *RxDescArray; /* Index of 256-alignment Rx Descriptor buffer */ -+ unsigned char *RxBufferRing[NUM_RX_DESC]; /* Index of Rx Buffer array */ -+ unsigned char *Tx_skbuff[NUM_TX_DESC]; -+} tpx; -+ -+static struct rtl8169_private *tpc; -+ -+static const u16 rtl8169_intr_mask = -+ SYSErr | PCSTimeout | RxUnderrun | RxOverflow | RxFIFOOver | TxErr | -+ TxOK | RxErr | RxOK; -+static const unsigned int rtl8169_rx_config = -+ (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); -+ -+void mdio_write(int RegAddr, int value) -+{ -+ int i; -+ -+ RTL_W32(PHYAR, 0x80000000 | (RegAddr & 0xFF) << 16 | value); -+ udelay(1000); -+ -+ for (i = 2000; i > 0; i--) { -+ /* Check if the RTL8169 has completed writing to the specified MII register */ -+ if (!(RTL_R32(PHYAR) & 0x80000000)) { -+ break; -+ } else { -+ udelay(100); -+ } -+ } -+} -+ -+int mdio_read(int RegAddr) -+{ -+ int i, value = -1; -+ -+ RTL_W32(PHYAR, 0x0 | (RegAddr & 0xFF) << 16); -+ udelay(1000); -+ -+ for (i = 2000; i > 0; i--) { -+ /* Check if the RTL8169 has completed retrieving data from the specified MII register */ -+ if (RTL_R32(PHYAR) & 0x80000000) { -+ value = (int) (RTL_R32(PHYAR) & 0xFFFF); -+ break; -+ } else { -+ udelay(100); -+ } -+ } -+ return value; -+} -+ -+static int rtl8169_init_board(struct pci_device *pdev) -+{ -+ int i; -+ unsigned long rtreg_base, rtreg_len; -+ u32 tmp; -+ -+ rtreg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_1); -+ rtreg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_1); -+ -+ /* check for weird/broken PCI region reporting */ -+ if (rtreg_len < RTL_MIN_IO_SIZE) { -+ printf("Invalid PCI region size(s), aborting\n"); -+ } -+ -+ adjust_pci_device(pdev); -+/* pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); */ -+ -+ /* ioremap MMIO region */ -+ ioaddr = (unsigned long) ioremap(rtreg_base, rtreg_len); -+ if (ioaddr == 0) -+ return 0; -+ -+ tpc->mmio_addr = &ioaddr; -+ /* Soft reset the chip. */ -+ RTL_W8(ChipCmd, CmdReset); -+ -+ /* Check that the chip has finished the reset. */ -+ for (i = 1000; i > 0; i--) -+ if ((RTL_R8(ChipCmd) & CmdReset) == 0) -+ break; -+ else -+ udelay(10); -+ -+ /* identify chip attached to board */ -+ tmp = RTL_R32(TxConfig); -+ tmp = ((tmp & 0x7c000000) + ((tmp & 0x00800000) << 2)) >> 24; -+ -+ for (i = ARRAY_SIZE(rtl_chip_info) - 1; i >= 0; i--) -+ if (tmp == rtl_chip_info[i].version) { -+ tpc->chipset = i; -+ goto match; -+ } -+ /* if unknown chip, assume array element #0, original RTL-8169 in this case */ -+ dprintf(("PCI device: unknown chip version, assuming RTL-8169\n")); -+ dprintf(("PCI device: TxConfig = 0x%hX\n", -+ (unsigned long) RTL_R32(TxConfig))); -+ tpc->chipset = 0; -+ return 1; -+ match: -+ return 0; -+ -+} -+ -+/************************************************************************** -+IRQ - Wait for a frame -+***************************************************************************/ -+void r8169_irq ( struct nic *nic __unused, irq_action_t action ) { -+ int intr_status = 0; -+ int interested = RxUnderrun | RxOverflow | RxFIFOOver | RxErr | RxOK; -+ -+ switch ( action ) { -+ case DISABLE: -+ case ENABLE: -+ intr_status = RTL_R16(IntrStatus); -+ /* h/w no longer present (hotplug?) or major error, -+ bail */ -+ if (intr_status == 0xFFFF) -+ break; -+ -+ intr_status = intr_status & ~interested; -+ if ( action == ENABLE ) -+ intr_status = intr_status | interested; -+ RTL_W16(IntrMask, intr_status); -+ break; -+ case FORCE : -+ RTL_W8(TxPoll, (RTL_R8(TxPoll) | 0x01)); -+ break; -+ } -+} -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int r8169_poll(struct nic *nic, int retreive) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ int cur_rx; -+ unsigned int intr_status = 0; -+ cur_rx = tpc->cur_rx; -+ if ((tpc->RxDescArray[cur_rx].status & OWNbit) == 0) { -+ /* There is a packet ready */ -+ if(!retreive) -+ return 1; -+ intr_status = RTL_R16(IntrStatus); -+ /* h/w no longer present (hotplug?) or major error, -+ bail */ -+ if (intr_status == 0xFFFF) -+ return 0; -+ RTL_W16(IntrStatus, intr_status & -+ ~(RxFIFOOver | RxOverflow | RxOK)); -+ -+ if (!(tpc->RxDescArray[cur_rx].status & RxRES)) { -+ nic->packetlen = (int) (tpc->RxDescArray[cur_rx]. -+ status & 0x00001FFF) - 4; -+ memcpy(nic->packet, tpc->RxBufferRing[cur_rx], -+ nic->packetlen); -+ if (cur_rx == NUM_RX_DESC - 1) -+ tpc->RxDescArray[cur_rx].status = -+ (OWNbit | EORbit) + RX_BUF_SIZE; -+ else -+ tpc->RxDescArray[cur_rx].status = -+ OWNbit + RX_BUF_SIZE; -+ tpc->RxDescArray[cur_rx].buf_addr = -+ virt_to_bus(tpc->RxBufferRing[cur_rx]); -+ } else -+ printf("Error Rx"); -+ /* FIXME: shouldn't I reset the status on an error */ -+ cur_rx = (cur_rx + 1) % NUM_RX_DESC; -+ tpc->cur_rx = cur_rx; -+ RTL_W16(IntrStatus, intr_status & -+ (RxFIFOOver | RxOverflow | RxOK)); -+ -+ return 1; -+ -+ } -+ tpc->cur_rx = cur_rx; -+ /* FIXME: There is no reason to do this as cur_rx did not change */ -+ -+ return (0); /* initially as this is called to flush the input */ -+ -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void r8169_transmit(struct nic *nic, const char *d, /* Destination */ -+ unsigned int t, /* Type */ -+ unsigned int s, /* size */ -+ const char *p) -+{ /* Packet */ -+ /* send the packet to destination */ -+ -+ u16 nstype; -+ u32 to; -+ u8 *ptxb; -+ int entry = tpc->cur_tx % NUM_TX_DESC; -+ -+ /* point to the current txb incase multiple tx_rings are used */ -+ ptxb = tpc->Tx_skbuff[entry * MAX_ETH_FRAME_SIZE]; -+ memcpy(ptxb, d, ETH_ALEN); -+ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); -+ nstype = htons((u16) t); -+ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); -+ memcpy(ptxb + ETH_HLEN, p, s); -+ s += ETH_HLEN; -+ s &= 0x0FFF; -+ while (s < ETH_ZLEN) -+ ptxb[s++] = '\0'; -+ -+ tpc->TxDescArray[entry].buf_addr = virt_to_bus(ptxb); -+ if (entry != (NUM_TX_DESC - 1)) -+ tpc->TxDescArray[entry].status = -+ (OWNbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s : -+ ETH_ZLEN); -+ else -+ tpc->TxDescArray[entry].status = -+ (OWNbit | EORbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s -+ : ETH_ZLEN); -+ RTL_W8(TxPoll, 0x40); /* set polling bit */ -+ -+ tpc->cur_tx++; -+ to = currticks() + TX_TIMEOUT; -+ while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */ -+ -+ if (currticks() >= to) { -+ printf("TX Time Out"); -+ } -+} -+ -+static void rtl8169_set_rx_mode(struct nic *nic __unused) -+{ -+ u32 mc_filter[2]; /* Multicast hash filter */ -+ int rx_mode; -+ u32 tmp = 0; -+ -+ /* IFF_ALLMULTI */ -+ /* Too many to filter perfectly -- accept all multicasts. */ -+ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; -+ mc_filter[1] = mc_filter[0] = 0xffffffff; -+ -+ tmp = -+ rtl8169_rx_config | rx_mode | (RTL_R32(RxConfig) & -+ rtl_chip_info[tpc->chipset]. -+ RxConfigMask); -+ -+ RTL_W32(RxConfig, tmp); -+ RTL_W32(MAR0 + 0, mc_filter[0]); -+ RTL_W32(MAR0 + 4, mc_filter[1]); -+} -+static void rtl8169_hw_start(struct nic *nic) -+{ -+ u32 i; -+ -+ /* Soft reset the chip. */ -+ RTL_W8(ChipCmd, CmdReset); -+ -+ /* Check that the chip has finished the reset. */ -+ for (i = 1000; i > 0; i--) { -+ if ((RTL_R8(ChipCmd) & CmdReset) == 0) -+ break; -+ else -+ udelay(10); -+ } -+ -+ RTL_W8(Cfg9346, Cfg9346_Unlock); -+ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); -+ RTL_W8(EarlyTxThres, EarlyTxThld); -+ -+ /* For gigabit rtl8169 */ -+ RTL_W16(RxMaxSize, RxPacketMaxSize); -+ -+ /* Set Rx Config register */ -+ i = rtl8169_rx_config | (RTL_R32(RxConfig) & -+ rtl_chip_info[tpc->chipset].RxConfigMask); -+ RTL_W32(RxConfig, i); -+ -+ /* Set DMA burst size and Interframe Gap Time */ -+ RTL_W32(TxConfig, -+ (TX_DMA_BURST << TxDMAShift) | (InterFrameGap << -+ TxInterFrameGapShift)); -+ -+ -+ tpc->cur_rx = 0; -+ -+ RTL_W32(TxDescStartAddr, virt_to_le32desc(tpc->TxDescArray)); -+ RTL_W32(RxDescStartAddr, virt_to_le32desc(tpc->RxDescArray)); -+ RTL_W8(Cfg9346, Cfg9346_Lock); -+ udelay(10); -+ -+ RTL_W32(RxMissed, 0); -+ -+ rtl8169_set_rx_mode(nic); -+ -+ /* no early-rx interrupts */ -+ RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000); -+} -+ -+static void rtl8169_init_ring(struct nic *nic __unused) -+{ -+ int i; -+ -+ tpc->cur_rx = 0; -+ tpc->cur_tx = 0; -+ memset(tpc->TxDescArray, 0x0, NUM_TX_DESC * sizeof(struct TxDesc)); -+ memset(tpc->RxDescArray, 0x0, NUM_RX_DESC * sizeof(struct RxDesc)); -+ -+ for (i = 0; i < NUM_TX_DESC; i++) { -+ tpc->Tx_skbuff[i] = &txb[i]; -+ } -+ -+ for (i = 0; i < NUM_RX_DESC; i++) { -+ if (i == (NUM_RX_DESC - 1)) -+ tpc->RxDescArray[i].status = -+ (OWNbit | EORbit) + RX_BUF_SIZE; -+ else -+ tpc->RxDescArray[i].status = OWNbit + RX_BUF_SIZE; -+ -+ tpc->RxBufferRing[i] = &rxb[i * RX_BUF_SIZE]; -+ tpc->RxDescArray[i].buf_addr = -+ virt_to_bus(tpc->RxBufferRing[i]); -+ } -+} -+ -+/************************************************************************** -+RESET - Finish setting up the ethernet interface -+***************************************************************************/ -+static void r8169_reset(struct nic *nic) -+{ -+ int i; -+ u8 diff; -+ u32 TxPhyAddr, RxPhyAddr; -+ -+ tpc->TxDescArrays = tx_ring; -+ if (tpc->TxDescArrays == 0) -+ printf("Allot Error"); -+ /* Tx Desscriptor needs 256 bytes alignment; */ -+ TxPhyAddr = virt_to_bus(tpc->TxDescArrays); -+ diff = 256 - (TxPhyAddr - ((TxPhyAddr >> 8) << 8)); -+ TxPhyAddr += diff; -+ tpc->TxDescArray = (struct TxDesc *) (tpc->TxDescArrays + diff); -+ -+ tpc->RxDescArrays = rx_ring; -+ /* Rx Desscriptor needs 256 bytes alignment; */ -+ RxPhyAddr = virt_to_bus(tpc->RxDescArrays); -+ diff = 256 - (RxPhyAddr - ((RxPhyAddr >> 8) << 8)); -+ RxPhyAddr += diff; -+ tpc->RxDescArray = (struct RxDesc *) (tpc->RxDescArrays + diff); -+ -+ if (tpc->TxDescArrays == NULL || tpc->RxDescArrays == NULL) { -+ printf("Allocate RxDescArray or TxDescArray failed\n"); -+ return; -+ } -+ -+ rtl8169_init_ring(nic); -+ rtl8169_hw_start(nic); -+ /* Construct a perfect filter frame with the mac address as first match -+ * and broadcast for all others */ -+ for (i = 0; i < 192; i++) -+ txb[i] = 0xFF; -+ -+ txb[0] = nic->node_addr[0]; -+ txb[1] = nic->node_addr[1]; -+ txb[2] = nic->node_addr[2]; -+ txb[3] = nic->node_addr[3]; -+ txb[4] = nic->node_addr[4]; -+ txb[5] = nic->node_addr[5]; -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void r8169_disable(struct dev *dev __unused) -+{ -+ int i; -+ /* Stop the chip's Tx and Rx DMA processes. */ -+ RTL_W8(ChipCmd, 0x00); -+ -+ /* Disable interrupts by clearing the interrupt mask. */ -+ RTL_W16(IntrMask, 0x0000); -+ -+ RTL_W32(RxMissed, 0); -+ -+ tpc->TxDescArrays = NULL; -+ tpc->RxDescArrays = NULL; -+ tpc->TxDescArray = NULL; -+ tpc->RxDescArray = NULL; -+ for (i = 0; i < NUM_RX_DESC; i++) { -+ tpc->RxBufferRing[i] = NULL; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+***************************************************************************/ -+ -+#define board_found 1 -+#define valid_link 0 -+static int r8169_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *) dev; -+ static int board_idx = -1; -+ static int printed_version = 0; -+ int i, rc; -+ int option = -1, Cap10_100 = 0, Cap1000 = 0; -+ -+ printf("r8169.c: Found %s, Vendor=%hX Device=%hX\n", -+ pci->name, pci->vendor, pci->dev_id); -+ -+ board_idx++; -+ -+ printed_version = 1; -+ -+ /* point to private storage */ -+ tpc = &tpx; -+ -+ rc = rtl8169_init_board(pci); /* Return code is meaningless */ -+ -+ /* Get MAC address. FIXME: read EEPROM */ -+ for (i = 0; i < MAC_ADDR_LEN; i++) -+ nic->node_addr[i] = RTL_R8(MAC0 + i); -+ -+ dprintf(("%s: Identified chip type is '%s'.\n", pci->name, -+ rtl_chip_info[tpc->chipset].name)); -+ /* Print out some hardware info */ -+ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, -+ ioaddr); -+ -+ /* if TBI is not endbled */ -+ if (!(RTL_R8(PHYstatus) & TBI_Enable)) { -+ int val = mdio_read(PHY_AUTO_NEGO_REG); -+ -+ option = media; -+ /* Force RTL8169 in 10/100/1000 Full/Half mode. */ -+ if (option > 0) { -+ printf(" Force-mode Enabled.\n"); -+ Cap10_100 = 0, Cap1000 = 0; -+ switch (option) { -+ case _10_Half: -+ Cap10_100 = PHY_Cap_10_Half; -+ Cap1000 = PHY_Cap_Null; -+ break; -+ case _10_Full: -+ Cap10_100 = PHY_Cap_10_Full; -+ Cap1000 = PHY_Cap_Null; -+ break; -+ case _100_Half: -+ Cap10_100 = PHY_Cap_100_Half; -+ Cap1000 = PHY_Cap_Null; -+ break; -+ case _100_Full: -+ Cap10_100 = PHY_Cap_100_Full; -+ Cap1000 = PHY_Cap_Null; -+ break; -+ case _1000_Full: -+ Cap10_100 = PHY_Cap_Null; -+ Cap1000 = PHY_Cap_1000_Full; -+ break; -+ default: -+ break; -+ } -+ /* leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ -+ mdio_write(PHY_AUTO_NEGO_REG, -+ Cap10_100 | (val & 0x1F)); -+ mdio_write(PHY_1000_CTRL_REG, Cap1000); -+ } else { -+ dprintf(("Auto-negotiation Enabled.\n", -+ pci->name)); -+ -+ /* enable 10/100 Full/Half Mode, leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ -+ mdio_write(PHY_AUTO_NEGO_REG, -+ PHY_Cap_10_Half | PHY_Cap_10_Full | -+ PHY_Cap_100_Half | PHY_Cap_100_Full | -+ (val & 0x1F)); -+ -+ /* enable 1000 Full Mode */ -+ mdio_write(PHY_1000_CTRL_REG, PHY_Cap_1000_Full); -+ -+ } -+ -+ /* Enable auto-negotiation and restart auto-nigotiation */ -+ mdio_write(PHY_CTRL_REG, -+ PHY_Enable_Auto_Nego | PHY_Restart_Auto_Nego); -+ udelay(100); -+ -+ /* wait for auto-negotiation process */ -+ for (i = 10000; i > 0; i--) { -+ /* Check if auto-negotiation complete */ -+ if (mdio_read(PHY_STAT_REG) & PHY_Auto_Neco_Comp) { -+ udelay(100); -+ option = RTL_R8(PHYstatus); -+ if (option & _1000bpsF) { -+ printf -+ ("1000Mbps Full-duplex operation.\n"); -+ } else { -+ printf -+ ("%sMbps %s-duplex operation.\n", -+ (option & _100bps) ? "100" : -+ "10", -+ (option & FullDup) ? "Full" : -+ "Half"); -+ } -+ break; -+ } else { -+ udelay(100); -+ } -+ } /* end for-loop to wait for auto-negotiation process */ -+ -+ } else { -+ udelay(100); -+ printf -+ ("%s: 1000Mbps Full-duplex operation, TBI Link %s!\n", -+ pci->name, -+ (RTL_R32(TBICSR) & TBILinkOK) ? "OK" : "Failed"); -+ -+ } -+ -+ r8169_reset(nic); -+ /* point to NIC specific routines */ -+ dev->disable = r8169_disable; -+ nic->poll = r8169_poll; -+ nic->transmit = r8169_transmit; -+ nic->irqno = pci->irq; -+ nic->irq = r8169_irq; -+ nic->ioaddr = ioaddr; -+ return 1; -+ -+} -+ -+static struct pci_id r8169_nics[] = { -+ PCI_ROM(0x10ec, 0x8169, "r8169", "RealTek RTL8169 Gigabit Ethernet"), -+}; -+ -+struct pci_driver r8169_driver = { -+ .type = NIC_DRIVER, -+ .name = "r8169/PCI", -+ .probe = r8169_probe, -+ .ids = r8169_nics, -+ .id_count = sizeof(r8169_nics) / sizeof(r8169_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/rtl8139.c -=================================================================== ---- a/netboot/rtl8139.c -+++ b/netboot/rtl8139.c -@@ -17,6 +17,8 @@ - /*********************************************************************/ - - /* -+ 28 Dec 2002 ken_yap@users.sourceforge.net (Ken Yap) -+ Put in virt_to_bus calls to allow Etherboot relocation. - - 06 Apr 2001 ken_yap@users.sourceforge.net (Ken Yap) - Following email from Hyun-Joon Cha, added a disable routine, otherwise -@@ -63,7 +65,6 @@ - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - #include "timer.h" - - #define RTL_TIMEOUT (1*TICKS_PER_SEC) -@@ -112,9 +113,19 @@ - * definitions we will probably never need to know about. */ - }; - -+enum RxEarlyStatusBits { -+ ERGood=0x08, ERBad=0x04, EROVW=0x02, EROK=0x01 -+}; -+ - enum ChipCmdBits { - CmdReset=0x10, CmdRxEnb=0x08, CmdTxEnb=0x04, RxBufEmpty=0x01, }; - -+enum IntrMaskBits { -+ SERR=0x8000, TimeOut=0x4000, LenChg=0x2000, -+ FOVW=0x40, PUN_LinkChg=0x20, RXOVW=0x10, -+ TER=0x08, TOK=0x04, RER=0x02, ROK=0x01 -+}; -+ - /* Interrupt register bits, using my own meaningful names. */ - enum IntrStatusBits { - PCIErr=0x8000, PCSTimeout=0x4000, CableLenChange= 0x2000, -@@ -155,74 +166,68 @@ - AcceptMulticast=0x04, AcceptMyPhys=0x02, AcceptAllPhys=0x01, - }; - --static int ioaddr; - static unsigned int cur_rx,cur_tx; - - /* The RTL8139 can only transmit from a contiguous, aligned memory block. */ - static unsigned char tx_buffer[TX_BUF_SIZE] __attribute__((aligned(4))); -- --/* I know that this is a MEGA HACK, but the tagged boot image specification -- * states that we can do whatever we want below 0x10000 - so we do! */ --/* But we still give the user the choice of using an internal buffer -- just in case - Ken */ --#ifdef USE_LOWMEM_BUFFER --#define rx_ring ((unsigned char *)(0x10000 - (RX_BUF_LEN + 16))) --#else - static unsigned char rx_ring[RX_BUF_LEN+16] __attribute__((aligned(4))); --#endif - --struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, -- struct pci_device *pci); --static int read_eeprom(int location); -+static int rtl8139_probe(struct dev *dev, struct pci_device *pci); -+static int read_eeprom(struct nic *nic, int location, int addr_len); - static void rtl_reset(struct nic *nic); - static void rtl_transmit(struct nic *nic, const char *destaddr, - unsigned int type, unsigned int len, const char *data); --static int rtl_poll(struct nic *nic); --static void rtl_disable(struct nic*); -+static int rtl_poll(struct nic *nic, int retrieve); -+static void rtl_disable(struct dev *); -+static void rtl_irq(struct nic *nic, irq_action_t action); - - --struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, -- struct pci_device *pci) -+static int rtl8139_probe(struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; - int i; - int speed10, fullduplex; -+ int addr_len; -+ unsigned short *ap = (unsigned short*)nic->node_addr; - - /* There are enough "RTL8139" strings on the console already, so - * be brief and concentrate on the interesting pieces of info... */ - printf(" - "); - - /* Mask the bit that says "this is an io addr" */ -- ioaddr = probeaddrs[0] & ~3; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ /* Copy IRQ from PCI information */ -+ nic->irqno = pci->irq; - - adjust_pci_device(pci); - - /* Bring the chip out of low-power mode. */ -- outb(0x00, ioaddr + Config1); -- -- if (read_eeprom(0) != 0xffff) { -- unsigned short *ap = (unsigned short*)nic->node_addr; -- for (i = 0; i < 3; i++) -- *ap++ = read_eeprom(i + 7); -- } else { -- unsigned char *ap = (unsigned char*)nic->node_addr; -- for (i = 0; i < ETH_ALEN; i++) -- *ap++ = inb(ioaddr + MAC0 + i); -- } -+ outb(0x00, nic->ioaddr + Config1); - -- speed10 = inb(ioaddr + MediaStatus) & MSRSpeed10; -- fullduplex = inw(ioaddr + MII_BMCR) & BMCRDuplex; -- printf("ioaddr %#hX, addr %! %sMbps %s-duplex\n", ioaddr, -- nic->node_addr, speed10 ? "10" : "100", -- fullduplex ? "full" : "half"); -+ addr_len = read_eeprom(nic,0,8) == 0x8129 ? 8 : 6; -+ for (i = 0; i < 3; i++) -+ *ap++ = read_eeprom(nic,i + 7,addr_len); -+ -+ speed10 = inb(nic->ioaddr + MediaStatus) & MSRSpeed10; -+ fullduplex = inw(nic->ioaddr + MII_BMCR) & BMCRDuplex; -+ printf("ioaddr %#hX, irq %d, addr %! %sMbps %s-duplex\n", nic->ioaddr, -+ nic->irqno, nic->node_addr, speed10 ? "10" : "100", -+ fullduplex ? "full" : "half"); - - rtl_reset(nic); - -- nic->reset = rtl_reset; -- nic->poll = rtl_poll; -+ if (inb(nic->ioaddr + MediaStatus) & MSRLinkFail) { -+ printf("Cable not connected or other link failure\n"); -+ return(0); -+ } -+ -+ dev->disable = rtl_disable; -+ nic->poll = rtl_poll; - nic->transmit = rtl_transmit; -- nic->disable = rtl_disable; -+ nic->irq = rtl_irq; - -- return nic; -+ return 1; - } - - /* Serial EEPROM section. */ -@@ -244,22 +249,23 @@ - #define eeprom_delay() inl(ee_addr) - - /* The EEPROM commands include the alway-set leading bit. */ --#define EE_WRITE_CMD (5 << 6) --#define EE_READ_CMD (6 << 6) --#define EE_ERASE_CMD (7 << 6) -+#define EE_WRITE_CMD (5) -+#define EE_READ_CMD (6) -+#define EE_ERASE_CMD (7) - --static int read_eeprom(int location) -+static int read_eeprom(struct nic *nic, int location, int addr_len) - { - int i; - unsigned int retval = 0; -- long ee_addr = ioaddr + Cfg9346; -- int read_cmd = location | EE_READ_CMD; -+ long ee_addr = nic->ioaddr + Cfg9346; -+ int read_cmd = location | (EE_READ_CMD << addr_len); - - outb(EE_ENB & ~EE_CS, ee_addr); - outb(EE_ENB, ee_addr); -+ eeprom_delay(); - - /* Shift the read command bits out. */ -- for (i = 10; i >= 0; i--) { -+ for (i = 4 + addr_len; i >= 0; i--) { - int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0; - outb(EE_ENB | dataval, ee_addr); - eeprom_delay(); -@@ -279,31 +285,51 @@ - - /* Terminate the EEPROM access. */ - outb(~EE_CS, ee_addr); -+ eeprom_delay(); - return retval; - } - -+static const unsigned int rtl8139_rx_config = -+ (RX_BUF_LEN_IDX << 11) | -+ (RX_FIFO_THRESH << 13) | -+ (RX_DMA_BURST << 8); -+ -+static void set_rx_mode(struct nic *nic) { -+ unsigned int mc_filter[2]; -+ int rx_mode; -+ /* !IFF_PROMISC */ -+ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; -+ mc_filter[1] = mc_filter[0] = 0xffffffff; -+ -+ outl(rtl8139_rx_config | rx_mode, nic->ioaddr + RxConfig); -+ -+ outl(mc_filter[0], nic->ioaddr + MAR0 + 0); -+ outl(mc_filter[1], nic->ioaddr + MAR0 + 4); -+} -+ - static void rtl_reset(struct nic* nic) - { - int i; - -- outb(CmdReset, ioaddr + ChipCmd); -+ outb(CmdReset, nic->ioaddr + ChipCmd); - - cur_rx = 0; - cur_tx = 0; - - /* Give the chip 10ms to finish the reset. */ - load_timer2(10*TICKS_PER_MS); -- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) -+ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && -+ timer2_running()) - /* wait */; - - for (i = 0; i < ETH_ALEN; i++) -- outb(nic->node_addr[i], ioaddr + MAC0 + i); -+ outb(nic->node_addr[i], nic->ioaddr + MAC0 + i); - - /* Must enable Tx/Rx before setting transfer thresholds! */ -- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); -+ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); - outl((RX_FIFO_THRESH<<13) | (RX_BUF_LEN_IDX<<11) | (RX_DMA_BURST<<8), -- ioaddr + RxConfig); /* accept no frames yet! */ -- outl((TX_DMA_BURST<<8)|0x03000000, ioaddr + TxConfig); -+ nic->ioaddr + RxConfig); /* accept no frames yet! */ -+ outl((TX_DMA_BURST<<8)|0x03000000, nic->ioaddr + TxConfig); - - /* The Linux driver changes Config1 here to use a different LED pattern - * for half duplex or full/autodetect duplex (for full/autodetect, the -@@ -316,19 +342,26 @@ - #ifdef DEBUG_RX - printf("rx ring address is %X\n",(unsigned long)rx_ring); - #endif -- outl((unsigned long)rx_ring, ioaddr + RxBuf); -+ outl((unsigned long)virt_to_bus(rx_ring), nic->ioaddr + RxBuf); -+ -+ - -- /* Start the chip's Tx and Rx process. */ -- outl(0, ioaddr + RxMissed); -- /* set_rx_mode */ -- outb(AcceptBroadcast|AcceptMyPhys, ioaddr + RxConfig); - /* If we add multicast support, the MAR0 register would have to be - * initialized to 0xffffffffffffffff (two 32 bit accesses). Etherboot - * only needs broadcast (for ARP/RARP/BOOTP/DHCP) and unicast. */ -- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); - -+ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); -+ -+ outl(rtl8139_rx_config, nic->ioaddr + RxConfig); -+ -+ /* Start the chip's Tx and Rx process. */ -+ outl(0, nic->ioaddr + RxMissed); -+ -+ /* set_rx_mode */ -+ set_rx_mode(nic); -+ - /* Disable all known interrupts by setting the interrupt mask. */ -- outw(0, ioaddr + IntrMask); -+ outw(0, nic->ioaddr + IntrMask); - } - - static void rtl_transmit(struct nic *nic, const char *destaddr, -@@ -337,10 +370,11 @@ - unsigned int status, to, nstype; - unsigned long txstatus; - -+ /* nstype assignment moved up here to avoid gcc 3.0.3 compiler bug */ -+ nstype = htons(type); - memcpy(tx_buffer, destaddr, ETH_ALEN); - memcpy(tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); -- nstype = htons(type); -- memcpy(tx_buffer + 2 * ETH_ALEN, (char*)&nstype, 2); -+ memcpy(tx_buffer + 2 * ETH_ALEN, &nstype, 2); - memcpy(tx_buffer + ETH_HLEN, data, len); - - len += ETH_HLEN; -@@ -354,22 +388,22 @@ - tx_buffer[len++] = '\0'; - } - -- outl((unsigned long)tx_buffer, ioaddr + TxAddr0 + cur_tx*4); -+ outl((unsigned long)virt_to_bus(tx_buffer), nic->ioaddr + TxAddr0 + cur_tx*4); - outl(((TX_FIFO_THRESH<<11) & 0x003f0000) | len, -- ioaddr + TxStatus0 + cur_tx*4); -+ nic->ioaddr + TxStatus0 + cur_tx*4); - - to = currticks() + RTL_TIMEOUT; - - do { -- status = inw(ioaddr + IntrStatus); -+ status = inw(nic->ioaddr + IntrStatus); - /* Only acknlowledge interrupt sources we can properly handle - * here - the RxOverflow/RxFIFOOver MUST be handled in the - * rtl_poll() function. */ -- outw(status & (TxOK | TxErr | PCIErr), ioaddr + IntrStatus); -+ outw(status & (TxOK | TxErr | PCIErr), nic->ioaddr + IntrStatus); - if ((status & (TxOK | TxErr | PCIErr)) != 0) break; - } while (currticks() < to); - -- txstatus = inl(ioaddr+ TxStatus0 + cur_tx*4); -+ txstatus = inl(nic->ioaddr+ TxStatus0 + cur_tx*4); - - if (status & TxOK) { - cur_tx = (cur_tx + 1) % NUM_TX_DESC; -@@ -386,19 +420,22 @@ - } - } - --static int rtl_poll(struct nic *nic) -+static int rtl_poll(struct nic *nic, int retrieve) - { - unsigned int status; - unsigned int ring_offs; - unsigned int rx_size, rx_status; - -- if (inb(ioaddr + ChipCmd) & RxBufEmpty) { -+ if (inb(nic->ioaddr + ChipCmd) & RxBufEmpty) { - return 0; - } - -- status = inw(ioaddr + IntrStatus); -+ /* There is a packet ready */ -+ if ( ! retrieve ) return 1; -+ -+ status = inw(nic->ioaddr + IntrStatus); - /* See below for the rest of the interrupt acknowledges. */ -- outw(status & ~(RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); -+ outw(status & ~(RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); - - #ifdef DEBUG_RX - printf("rtl_poll: int %hX ", status); -@@ -438,21 +475,77 @@ - nic->packet[12], nic->packet[13], rx_status); - #endif - cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; -- outw(cur_rx - 16, ioaddr + RxBufPtr); -+ outw(cur_rx - 16, nic->ioaddr + RxBufPtr); - /* See RTL8139 Programming Guide V0.1 for the official handling of - * Rx overflow situations. The document itself contains basically no - * usable information, except for a few exception handling rules. */ -- outw(status & (RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); -+ outw(status & (RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); - return 1; - } - --static void rtl_disable(struct nic *nic) -+static void rtl_irq(struct nic *nic, irq_action_t action) - { -+ unsigned int mask; -+ /* Bit of a guess as to which interrupts we should allow */ -+ unsigned int interested = ROK | RER | RXOVW | FOVW | SERR; -+ -+ switch ( action ) { -+ case DISABLE : -+ case ENABLE : -+ mask = inw(nic->ioaddr + IntrMask); -+ mask = mask & ~interested; -+ if ( action == ENABLE ) mask = mask | interested; -+ outw(mask, nic->ioaddr + IntrMask); -+ break; -+ case FORCE : -+ /* Apparently writing a 1 to this read-only bit of a -+ * read-only and otherwise unrelated register will -+ * force an interrupt. If you ever want to see how -+ * not to write a datasheet, read the one for the -+ * RTL8139... -+ */ -+ outb(EROK, nic->ioaddr + RxEarlyStatus); -+ break; -+ } -+} -+ -+static void rtl_disable(struct dev *dev) -+{ -+ struct nic *nic = (struct nic *)dev; -+ /* merge reset and disable */ -+ rtl_reset(nic); -+ - /* reset the chip */ -- outb(CmdReset, ioaddr + ChipCmd); -+ outb(CmdReset, nic->ioaddr + ChipCmd); - - /* 10 ms timeout */ - load_timer2(10*TICKS_PER_MS); -- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) -+ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) - /* wait */; - } -+ -+static struct pci_id rtl8139_nics[] = { -+PCI_ROM(0x10ec, 0x8129, "rtl8129", "Realtek 8129"), -+PCI_ROM(0x10ec, 0x8139, "rtl8139", "Realtek 8139"), -+PCI_ROM(0x10ec, 0x8138, "rtl8139b", "Realtek 8139B"), -+PCI_ROM(0x1186, 0x1300, "dfe538", "DFE530TX+/DFE538TX"), -+PCI_ROM(0x1113, 0x1211, "smc1211-1", "SMC EZ10/100"), -+PCI_ROM(0x1112, 0x1211, "smc1211", "SMC EZ10/100"), -+PCI_ROM(0x1500, 0x1360, "delta8139", "Delta Electronics 8139"), -+PCI_ROM(0x4033, 0x1360, "addtron8139", "Addtron Technology 8139"), -+PCI_ROM(0x1186, 0x1340, "dfe690txd", "D-Link DFE690TXD"), -+PCI_ROM(0x13d1, 0xab06, "fe2000vx", "AboCom FE2000VX"), -+PCI_ROM(0x1259, 0xa117, "allied8139", "Allied Telesyn 8139"), -+PCI_ROM(0x14ea, 0xab06, "fnw3603tx", "Planex FNW-3603-TX"), -+PCI_ROM(0x14ea, 0xab07, "fnw3800tx", "Planex FNW-3800-TX"), -+PCI_ROM(0xffff, 0x8139, "clone-rtl8139", "Cloned 8139"), -+}; -+ -+struct pci_driver rtl8139_driver = { -+ .type = NIC_DRIVER, -+ .name = "RTL8139", -+ .probe = rtl8139_probe, -+ .ids = rtl8139_nics, -+ .id_count = sizeof(rtl8139_nics)/sizeof(rtl8139_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/segoff.h -=================================================================== ---- /dev/null -+++ b/netboot/segoff.h -@@ -0,0 +1,43 @@ -+/* -+ * Segment:offset types and macros -+ * -+ * Initially written by Michael Brown (mcb30). -+ */ -+ -+#ifndef SEGOFF_H -+#define SEGOFF_H -+ -+#include -+#include -+ -+/* Segment:offset structure. Note that the order within the structure -+ * is offset:segment. -+ */ -+typedef struct { -+ uint16_t offset; -+ uint16_t segment; -+} segoff_t; -+ -+/* For PXE stuff */ -+typedef segoff_t SEGOFF16_t; -+ -+/* Macros for converting from virtual to segment:offset addresses, -+ * when we don't actually care which of the many isomorphic results we -+ * get. -+ */ -+#ifdef DEBUG_SEGMENT -+uint16_t SEGMENT ( const void * const ptr ) { -+ uint32_t phys = virt_to_phys ( ptr ); -+ if ( phys > 0xfffff ) { -+ printf ( "FATAL ERROR: segment address out of range\n" ); -+ } -+ return phys >> 4; -+} -+#else -+#define SEGMENT(x) ( virt_to_phys ( x ) >> 4 ) -+#endif -+#define OFFSET(x) ( virt_to_phys ( x ) & 0xf ) -+#define SEGOFF(x) { OFFSET(x), SEGMENT(x) } -+#define VIRTUAL(x,y) ( phys_to_virt ( ( ( x ) << 4 ) + ( y ) ) ) -+ -+#endif /* SEGOFF_H */ -Index: b/netboot/sis900.c -=================================================================== ---- a/netboot/sis900.c -+++ b/netboot/sis900.c -@@ -27,6 +27,11 @@ - /* Revision History */ - - /* -+ 07 Dec 2003 timlegge - Enabled Multicast Support -+ 06 Dec 2003 timlegge - Fixed relocation issue in 5.2 -+ 04 Jan 2002 Chien-Yu Chen, Doug Ambrisko, Marty Connor Patch to Etherboot 5.0.5 -+ Added support for the SiS 630ET plus various bug fixes from linux kernel -+ source 2.4.17. - 01 March 2001 mdc 1.0 - Initial Release. Tested with PCI based sis900 card and ThinkNIC - computer. -@@ -35,13 +40,12 @@ - Testet with SIS730S chipset + ICS1893 - */ - -- - /* Includes */ - - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" -+#include "timer.h" - - #include "sis900.h" - -@@ -51,6 +55,7 @@ - - static unsigned short vendor, dev_id; - static unsigned long ioaddr; -+static u8 pci_revision; - - static unsigned int cur_phy; - -@@ -58,15 +63,10 @@ - - static BufferDesc txd; - static BufferDesc rxd[NUM_RX_DESC]; -- --#ifdef USE_LOWMEM_BUFFER --#define txb ((char *)0x10000 - TX_BUF_SIZE) --#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) --#else - static unsigned char txb[TX_BUF_SIZE]; - static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; --#endif - -+#if 0 - static struct mac_chip_info { - const char *name; - u16 vendor_id, device_id, flags; -@@ -78,11 +78,13 @@ - PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE}, - {0,0,0,0,0} /* 0 terminated list. */ - }; -+#endif - - static void sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); - static void amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); - static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); - static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); -+static void vt6103_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); - - static struct mii_chip_info { - const char * name; -@@ -96,6 +98,7 @@ - {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, amd79c901_read_mode}, - {"ICS 1893 Integrated PHYceiver" , 0x0015, 0xf441,ics1893_read_mode}, - {"RTL 8201 10/100Mbps Phyceiver" , 0x0000, 0x8201,rtl8201_read_mode}, -+ {"VIA 6103 10/100Mbps Phyceiver", 0x0101, 0x8f20,vt6103_read_mode}, - {0,0,0,0} - }; - -@@ -106,24 +109,32 @@ - u16 status; - } mii; - -- - // PCI to ISA bridge for SIS640E access --static struct pci_device pci_isa_bridge_list[] = { -+static struct pci_id pci_isa_bridge_list[] = { - { 0x1039, 0x0008, -- "SIS 85C503/5513 PCI to ISA bridge", 0, 0, 0, 0}, -- {0, 0, NULL, 0, 0, 0, 0} -+ "SIS 85C503/5513 PCI to ISA bridge"}, -+}; -+ -+struct pci_driver sis_bridge_driver = { -+ .type = BRIDGE_DRIVER, -+ .name = "", -+ .probe = 0, -+ .ids = pci_isa_bridge_list, -+ .id_count = sizeof(pci_isa_bridge_list)/sizeof(pci_isa_bridge_list[0]), -+ .class = 0, - }; - - /* Function Prototypes */ - --struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); -+static int sis900_probe(struct dev *dev, struct pci_device *pci); - - static u16 sis900_read_eeprom(int location); - static void sis900_mdio_reset(long mdio_addr); - static void sis900_mdio_idle(long mdio_addr); - static u16 sis900_mdio_read(int phy_id, int location); -+#if 0 - static void sis900_mdio_write(int phy_id, int location, int val); -- -+#endif - static void sis900_init(struct nic *nic); - - static void sis900_reset(struct nic *nic); -@@ -136,9 +147,11 @@ - - static void sis900_transmit(struct nic *nic, const char *d, - unsigned int t, unsigned int s, const char *p); --static int sis900_poll(struct nic *nic); -+static int sis900_poll(struct nic *nic, int retrieve); -+ -+static void sis900_disable(struct dev *dev); - --static void sis900_disable(struct nic *nic); -+static void sis900_irq(struct nic *nic, irq_action_t action); - - /** - * sis900_get_mac_addr: - Get MAC address for stand alone SiS900 model -@@ -149,7 +162,7 @@ - * MAC address is read from read_eeprom() into @net_dev->dev_addr. - */ - --static int sis900_get_mac_addr(struct pci_device * pci_dev , struct nic *nic) -+static int sis900_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) - { - u16 signature; - int i; -@@ -168,6 +181,50 @@ - } - - /** -+ * sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model -+ * @pci_dev: the sis900 pci device -+ * @net_dev: the net device to get address for -+ * -+ * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM -+ * is shared by -+ * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first -+ * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access -+ * by LAN, otherwise is not. After MAC address is read from EEPROM, send -+ * EEDONE signal to refuse EEPROM access by LAN. -+ * The EEPROM map of SiS962 or SiS963 is different to SiS900. -+ * The signature field in SiS962 or SiS963 spec is meaningless. -+ * MAC address is read into @net_dev->dev_addr. -+ */ -+ -+static int sis96x_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) -+{ -+/* long ioaddr = net_dev->base_addr; */ -+ long ee_addr = ioaddr + mear; -+ u32 waittime = 0; -+ int i; -+ -+ printf("Alternate function\n"); -+ -+ outl(EEREQ, ee_addr); -+ while(waittime < 2000) { -+ if(inl(ee_addr) & EEGNT) { -+ -+ /* get MAC address from EEPROM */ -+ for (i = 0; i < 3; i++) -+ ((u16 *)(nic->node_addr))[i] = sis900_read_eeprom(i+EEPROMMACAddr); -+ -+ outl(EEDONE, ee_addr); -+ return 1; -+ } else { -+ udelay(1); -+ waittime ++; -+ } -+ } -+ outl(EEDONE, ee_addr); -+ return 0; -+} -+ -+/** - * sis630e_get_mac_addr: - Get MAC address for SiS630E model - * @pci_dev: the sis900 pci device - * @net_dev: the net device to get address for -@@ -177,17 +234,21 @@ - * MAC address is read into @net_dev->dev_addr. - */ - --static int sis630e_get_mac_addr(struct pci_device * pci_dev, struct nic *nic) -+static int sis630e_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) - { - u8 reg; - int i; -- struct pci_device *p; -- -- // find PCI to ISA bridge -- eth_pci_init(pci_isa_bridge_list); -+ struct pci_device p[1]; - -- /* the firts entry in this list should contain bus/devfn */ -- p = pci_isa_bridge_list; -+ /* find PCI to ISA bridge */ -+ memset(p, 0, sizeof(p)); -+ do { -+ find_pci(BRIDGE_DRIVER, p); -+ } while(p->driver && p->driver != &sis_bridge_driver); -+ -+ /* error on failure */ -+ if (!p->driver) -+ return 0; - - pcibios_read_config_byte(p->bus,p->devfn, 0x48, ®); - pcibios_write_config_byte(p->bus,p->devfn, 0x48, reg | 0x40); -@@ -201,7 +262,43 @@ - - return 1; - } -- -+ -+/** -+ * sis630e_get_mac_addr: - Get MAC address for SiS630E model -+ * @pci_dev: the sis900 pci device -+ * @net_dev: the net device to get address for -+ * -+ * SiS630E model, use APC CMOS RAM to store MAC address. -+ * APC CMOS RAM is accessed through ISA bridge. -+ * MAC address is read into @net_dev->dev_addr. -+ */ -+ -+static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) -+{ -+ u32 rfcrSave; -+ u32 i; -+ -+ -+ rfcrSave = inl(rfcr + ioaddr); -+ -+ outl(rfcrSave | RELOAD, ioaddr + cr); -+ outl(0, ioaddr + cr); -+ -+ /* disable packet filtering before setting filter */ -+ outl(rfcrSave & ~RFEN, rfcr + ioaddr); -+ -+ /* load MAC addr to filter data register */ -+ for (i = 0 ; i < 3 ; i++) { -+ outl((i << RFADDR_shift), ioaddr + rfcr); -+ *( ((u16 *)nic->node_addr) + i) = inw(ioaddr + rfdr); -+ } -+ -+ /* enable packet filitering */ -+ outl(rfcrSave | RFEN, rfcr + ioaddr); -+ -+ return 1; -+} -+ - /* - * Function: sis900_probe - * -@@ -216,19 +313,21 @@ - * Returns: struct nic *: pointer to NIC data structure - */ - --struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) -+static int sis900_probe(struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; - int i; - int found=0; - int phy_addr; -- u16 signature; - u8 revision; - int ret; - -- if (io_addrs == 0 || *io_addrs == 0) -- return NULL; -+ if (pci->ioaddr == 0) -+ return 0; - -- ioaddr = *io_addrs & ~3; -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ ioaddr = pci->ioaddr & ~3; - vendor = pci->vendor; - dev_id = pci->dev_id; - -@@ -240,19 +339,29 @@ - /* get MAC address */ - ret = 0; - pcibios_read_config_byte(pci->bus,pci->devfn, PCI_REVISION, &revision); -- if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV) -- ret = sis630e_get_mac_addr(pci, nic); -- else if (revision == SIS630S_900_REV) -+ -+ /* save for use later in sis900_reset() */ -+ pci_revision = revision; -+ -+ if (revision == SIS630E_900_REV) - ret = sis630e_get_mac_addr(pci, nic); -+ else if ((revision > 0x81) && (revision <= 0x90)) -+ ret = sis635_get_mac_addr(pci, nic); -+ else if (revision == SIS96x_900_REV) -+ ret = sis96x_get_mac_addr(pci, nic); - else - ret = sis900_get_mac_addr(pci, nic); - - if (ret == 0) - { - printf ("sis900_probe: Error MAC address not found\n"); -- return NULL; -+ return 0; - } - -+ /* 630ET : set the mii access mode as software-mode */ -+ if (revision == SIS630ET_900_REV) -+ outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr); -+ - printf("\nsis900_probe: MAC addr %! at ioaddr %#hX\n", - nic->node_addr, ioaddr); - printf("sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id); -@@ -264,7 +373,7 @@ - for (phy_addr = 0; phy_addr < 32; phy_addr++) { - u16 mii_status; - u16 phy_id0, phy_id1; -- -+ - mii_status = sis900_mdio_read(phy_addr, MII_STATUS); - if (mii_status == 0xffff || mii_status == 0x0000) - /* the mii is not accessable, try next one */ -@@ -272,7 +381,7 @@ - - phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); - phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); -- -+ - /* search our mii table for the current mii */ - for (i = 0; mii_chip_table[i].phy_id1; i++) { - -@@ -294,7 +403,7 @@ - - if (found == 0) { - printf("sis900_probe: No MII transceivers found!\n"); -- return NULL; -+ return 0; - } - - /* Arbitrarily select the last PHY found as current PHY */ -@@ -304,15 +413,14 @@ - /* initialize device */ - sis900_init(nic); - -- nic->reset = sis900_init; -+ dev->disable = sis900_disable; - nic->poll = sis900_poll; - nic->transmit = sis900_transmit; -- nic->disable = sis900_disable; -+ nic->irq = sis900_irq; - -- return nic; -+ return 1; - } - -- - /* - * EEPROM Routines: These functions read and write to EEPROM for - * retrieving the MAC address and other configuration information about -@@ -322,7 +430,6 @@ - /* Delay between EEPROM clock transitions. */ - #define eeprom_delay() inl(ee_addr) - -- - /* Function: sis900_read_eeprom - * - * Description: reads and returns a given location from EEPROM -@@ -378,7 +485,6 @@ - - #define sis900_mdio_delay() inl(mdio_addr) - -- - /* - Read and write the MII management registers using software-generated - serial MDIO protocol. Note that the command bits and data bits are -@@ -432,9 +538,11 @@ - outl(MDC, mdio_addr); - sis900_mdio_delay(); - } -+ outl(0x00, mdio_addr); - return retval; - } - -+#if 0 - static void sis900_mdio_write(int phy_id, int location, int value) - { - long mdio_addr = ioaddr + mear; -@@ -471,10 +579,11 @@ - outb(MDC, mdio_addr); - sis900_mdio_delay(); - } -+ outl(0x00, mdio_addr); - return; - } -+#endif - -- - /* Function: sis900_init - * - * Description: resets the ethernet controller chip and various -@@ -500,10 +609,9 @@ - - sis900_check_mode(nic); - -- outl(RxENA, ioaddr + cr); -+ outl(RxENA| inl(ioaddr + cr), ioaddr + cr); - } - -- - /* - * Function: sis900_reset - * -@@ -515,7 +623,7 @@ - */ - - static void --sis900_reset(struct nic *nic) -+sis900_reset(struct nic *nic __unused) - { - int i = 0; - u32 status = TxRCMP | RxRCMP; -@@ -524,16 +632,19 @@ - outl(0, ioaddr + imr); - outl(0, ioaddr + rfcr); - -- outl(RxRESET | TxRESET | RESET, ioaddr + cr); -- -+ outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr); -+ - /* Check that the chip has finished the reset. */ - while (status && (i++ < 1000)) { - status ^= (inl(isr + ioaddr) & status); - } -- outl(PESEL, ioaddr + cfg); -+ -+ if( (pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV) ) -+ outl(PESEL | RND_CNT, ioaddr + cfg); -+ else -+ outl(PESEL, ioaddr + cfg); - } - -- - /* Function: sis_init_rxfilter - * - * Description: sets receive filter address to our MAC address -@@ -552,7 +663,7 @@ - rfcrSave = inl(rfcr + ioaddr); - - /* disable packet filtering before setting filter */ -- outl(rfcrSave & ~RFEN, rfcr); -+ outl(rfcrSave & ~RFEN, rfcr + ioaddr); - - /* load MAC addr to filter data register */ - for (i = 0 ; i < 3 ; i++) { -@@ -571,7 +682,6 @@ - outl(rfcrSave | RFEN, rfcr + ioaddr); - } - -- - /* - * Function: sis_init_txd - * -@@ -583,20 +693,19 @@ - */ - - static void --sis900_init_txd(struct nic *nic) -+sis900_init_txd(struct nic *nic __unused) - { - txd.link = (u32) 0; - txd.cmdsts = (u32) 0; -- txd.bufptr = (u32) &txb[0]; -+ txd.bufptr = virt_to_bus(&txb[0]); - - /* load Transmit Descriptor Register */ -- outl((u32) &txd, ioaddr + txdp); -+ outl(virt_to_bus(&txd), ioaddr + txdp); - if (sis900_debug > 0) - printf("sis900_init_txd: TX descriptor register loaded with: %X\n", - inl(ioaddr + txdp)); - } - -- - /* Function: sis_init_rxd - * - * Description: initializes the Rx descriptor ring -@@ -607,7 +716,7 @@ - */ - - static void --sis900_init_rxd(struct nic *nic) -+sis900_init_rxd(struct nic *nic __unused) - { - int i; - -@@ -615,16 +724,16 @@ - - /* init RX descriptor */ - for (i = 0; i < NUM_RX_DESC; i++) { -- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; -+ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); - rxd[i].cmdsts = (u32) RX_BUF_SIZE; -- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; -+ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); - if (sis900_debug > 0) - printf("sis900_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", - i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); - } - - /* load Receive Descriptor Register */ -- outl((u32) &rxd[0], ioaddr + rxdp); -+ outl(virt_to_bus(&rxd[0]), ioaddr + rxdp); - - if (sis900_debug > 0) - printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", -@@ -632,7 +741,6 @@ - - } - -- - /* Function: sis_init_rxd - * - * Description: -@@ -644,25 +752,36 @@ - * Returns: void. - */ - --static void sis900_set_rx_mode(struct nic *nic) -+static void sis900_set_rx_mode(struct nic *nic __unused) - { -- int i; -+ int i, table_entries; -+ u32 rx_mode; -+ u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */ -+ -+ if((pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV)) -+ table_entries = 16; -+ else -+ table_entries = 8; - -- /* Configure Multicast Hash Table in Receive Filter -- to reject all MCAST packets */ -- for (i = 0; i < 8; i++) { -+ /* accept all multicast packet */ -+ rx_mode = RFAAB | RFAAM; -+ for (i = 0; i < table_entries; i++) -+ mc_filter[i] = 0xffff; -+ -+ /* update Multicast Hash Table in Receive Filter */ -+ for (i = 0; i < table_entries; i++) { - /* why plus 0x04? That makes the correct value for hash table. */ - outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); -- outl((u32)(0x0), ioaddr + rfdr); -+ outl(mc_filter[i], ioaddr + rfdr); - } -- /* Accept Broadcast packets, destination addresses that match -+ -+ /* Accept Broadcast and multicast packets, destination addresses that match - our MAC address */ -- outl(RFEN | RFAAB, ioaddr + rfcr); -+ outl(RFEN | rx_mode, ioaddr + rfcr); - - return; - } - -- - /* Function: sis900_check_mode - * - * Description: checks the state of transmit and receive -@@ -674,15 +793,21 @@ - */ - - static void --sis900_check_mode (struct nic *nic) -+sis900_check_mode(struct nic *nic) - { - int speed, duplex; - u32 tx_flags = 0, rx_flags = 0; - - mii.chip_info->read_mode(nic, cur_phy, &speed, &duplex); - -- tx_flags = TxATP | (TX_DMA_BURST << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); -- rx_flags = RX_DMA_BURST << RxMXDMA_shift; -+ if( inl(ioaddr + cfg) & EDB_MASTER_EN ) { -+ tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); -+ rx_flags = DMA_BURST_64 << RxMXDMA_shift; -+ } -+ else { -+ tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); -+ rx_flags = DMA_BURST_512 << RxMXDMA_shift; -+ } - - if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS) { - rx_flags |= (RxDRNT_10 << RxDRNT_shift); -@@ -702,7 +827,6 @@ - outl (rx_flags, ioaddr + rxcfg); - } - -- - /* Function: sis900_read_mode - * - * Description: retrieves and displays speed and duplex -@@ -714,24 +838,33 @@ - */ - - static void --sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) -+sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) - { - int i = 0; - u32 status; -+ u16 phy_id0, phy_id1; - - /* STSOUT register is Latched on Transition, read operation updates it */ - while (i++ < 2) - status = sis900_mdio_read(phy_addr, MII_STSOUT); - -- if (status & MII_STSOUT_SPD) -- *speed = HW_SPEED_100_MBPS; -- else -- *speed = HW_SPEED_10_MBPS; -- -- if (status & MII_STSOUT_DPLX) -- *duplex = FDX_CAPABLE_FULL_SELECTED; -- else -- *duplex = FDX_CAPABLE_HALF_SELECTED; -+ *speed = HW_SPEED_10_MBPS; -+ *duplex = FDX_CAPABLE_HALF_SELECTED; -+ -+ if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX)) -+ *speed = HW_SPEED_100_MBPS; -+ if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX)) -+ *duplex = FDX_CAPABLE_FULL_SELECTED; -+ -+ /* Workaround for Realtek RTL8201 PHY issue */ -+ phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); -+ phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); -+ if((phy_id0 == 0x0000) && ((phy_id1 & 0xFFF0) == 0x8200)){ -+ if(sis900_mdio_read(phy_addr, MII_CONTROL) & MII_CNTL_FDX) -+ *duplex = FDX_CAPABLE_FULL_SELECTED; -+ if(sis900_mdio_read(phy_addr, 0x0019) & 0x01) -+ *speed = HW_SPEED_100_MBPS; -+ } - - if (status & MII_STSOUT_LINK_FAIL) - printf("sis900_read_mode: Media Link Off\n"); -@@ -743,7 +876,6 @@ - "full" : "half"); - } - -- - /* Function: amd79c901_read_mode - * - * Description: retrieves and displays speed and duplex -@@ -755,7 +887,7 @@ - */ - - static void --amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) -+amd79c901_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) - { - int i; - u16 status; -@@ -796,7 +928,6 @@ - } - } - -- - /** - * ics1893_read_mode: - read media mode for ICS1893 PHY - * @net_dev: the net device to read mode for -@@ -808,7 +939,7 @@ - * to determine the speed and duplex mode for sis900 - */ - --static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) -+static void ics1893_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) - { - int i = 0; - u32 status; -@@ -848,7 +979,7 @@ - * to determine the speed and duplex mode for sis900 - */ - --static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) -+static void rtl8201_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) - { - u32 status; - -@@ -878,7 +1009,51 @@ - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); - else -- printf("rtl9201_read_config_mode: Media Link Off\n"); -+ printf("rtl8201_read_config_mode: Media Link Off\n"); -+} -+ -+/** -+ * vt6103_read_mode: - read media mode for vt6103 phy -+ * @nic: the net device to read mode for -+ * @phy_addr: mii phy address -+ * @speed: the transmit speed to be determined -+ * @duplex: the duplex mode to be determined -+ * -+ * read MII_STATUS register from rtl8201 phy -+ * to determine the speed and duplex mode for sis900 -+ */ -+ -+static void vt6103_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) -+{ -+ u32 status; -+ -+ status = sis900_mdio_read(phy_addr, MII_STATUS); -+ -+ if (status & MII_STAT_CAN_TX_FDX) { -+ *speed = HW_SPEED_100_MBPS; -+ *duplex = FDX_CAPABLE_FULL_SELECTED; -+ } -+ else if (status & MII_STAT_CAN_TX) { -+ *speed = HW_SPEED_100_MBPS; -+ *duplex = FDX_CAPABLE_HALF_SELECTED; -+ } -+ else if (status & MII_STAT_CAN_T_FDX) { -+ *speed = HW_SPEED_10_MBPS; -+ *duplex = FDX_CAPABLE_FULL_SELECTED; -+ } -+ else if (status & MII_STAT_CAN_T) { -+ *speed = HW_SPEED_10_MBPS; -+ *duplex = FDX_CAPABLE_HALF_SELECTED; -+ } -+ -+ if (status & MII_STAT_LINK) -+ printf("vt6103_read_mode: Media Link On %s %s-duplex \n", -+ *speed == HW_SPEED_100_MBPS ? -+ "100mbps" : "10mbps", -+ *duplex == FDX_CAPABLE_FULL_SELECTED ? -+ "full" : "half"); -+ else -+ printf("vt6103_read_config_mode: Media Link Off\n"); - } - - /* Function: sis900_transmit -@@ -900,14 +1075,14 @@ - unsigned int s, /* size */ - const char *p) /* Packet */ - { -- u32 status, to, nstype; -+ u32 to, nstype; - volatile u32 tx_status; - - /* Stop the transmitter */ -- outl(TxDIS, ioaddr + cr); -+ outl(TxDIS | inl(ioaddr + cr), ioaddr + cr); - - /* load Transmit Descriptor Register */ -- outl((u32) &txd, ioaddr + txdp); -+ outl(virt_to_bus(&txd), ioaddr + txdp); - if (sis900_debug > 1) - printf("sis900_transmit: TX descriptor register loaded with: %X\n", - inl(ioaddr + txdp)); -@@ -929,18 +1104,18 @@ - txb[s++] = '\0'; - - /* set the transmit buffer descriptor and enable Transmit State Machine */ -- txd.bufptr = (u32) &txb[0]; -+ txd.bufptr = virt_to_bus(&txb[0]); - txd.cmdsts = (u32) OWN | s; - - /* restart the transmitter */ -- outl(TxENA, ioaddr + cr); -+ outl(TxENA | inl(ioaddr + cr), ioaddr + cr); - - if (sis900_debug > 1) - printf("sis900_transmit: Queued Tx packet size %d.\n", (int) s); - - to = currticks() + TX_TIMEOUT; - -- while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) -+ while (((tx_status=txd.cmdsts & OWN) && (currticks() < to)) - /* wait */ ; - - if (currticks() >= to) { -@@ -955,7 +1130,6 @@ - outl(0, ioaddr + imr); - } - -- - /* Function: sis900_poll - * - * Description: checks for a received packet and returns it if found. -@@ -971,7 +1145,7 @@ - */ - - static int --sis900_poll(struct nic *nic) -+sis900_poll(struct nic *nic, int retrieve) - { - u32 rx_status = rxd[cur_rx].cmdsts; - int retstat = 0; -@@ -986,6 +1160,8 @@ - printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n", - cur_rx, rx_status); - -+ if ( ! retrieve ) return 1; -+ - nic->packetlen = (rx_status & DSIZE) - CRC_SIZE; - - if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { -@@ -1001,18 +1177,18 @@ - - /* return the descriptor and buffer to receive ring */ - rxd[cur_rx].cmdsts = RX_BUF_SIZE; -- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; -+ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); - - if (++cur_rx == NUM_RX_DESC) - cur_rx = 0; - - /* re-enable the potentially idle receive state machine */ -- outl(RxENA , ioaddr + cr); -+ outl(RxENA | inl(ioaddr + cr), ioaddr + cr); - - return retstat; -+ - } - -- - /* Function: sis900_disable - * - * Description: Turns off interrupts and stops Tx and Rx engines -@@ -1023,12 +1199,53 @@ - */ - - static void --sis900_disable(struct nic *nic) -+sis900_disable(struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; -+ /* merge reset and disable */ -+ sis900_init(nic); -+ - /* Disable interrupts by clearing the interrupt mask. */ - outl(0, ioaddr + imr); - outl(0, ioaddr + ier); - - /* Stop the chip's Tx and Rx Status Machine */ -- outl(RxDIS | TxDIS, ioaddr + cr); -+ outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr); -+} -+ -+/* Function: sis900_irq -+ * -+ * Description: Enable, Disable, or Force, interrupts -+ * -+ * Arguments: struct nic *nic: NIC data structure -+ * irq_action_t action: Requested action -+ * -+ * Returns: void. -+ */ -+ -+static void -+sis900_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } - } -+ -+static struct pci_id sis900_nics[] = { -+PCI_ROM(0x1039, 0x0900, "sis900", "SIS900"), -+PCI_ROM(0x1039, 0x7016, "sis7016", "SIS7016"), -+}; -+ -+struct pci_driver sis900_driver = { -+ .type = NIC_DRIVER, -+ .name = "SIS900", -+ .probe = sis900_probe, -+ .ids = sis900_nics, -+ .id_count = sizeof(sis900_nics)/sizeof(sis900_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/sis900.h -=================================================================== ---- a/netboot/sis900.h -+++ b/netboot/sis900.h -@@ -39,14 +39,16 @@ - - /* Symbolic names for bits in various registers */ - enum sis900_command_register_bits { -- RESET = 0x00000100, -- SWI = 0x00000080, -- RxRESET = 0x00000020, -- TxRESET = 0x00000010, -- RxDIS = 0x00000008, -- RxENA = 0x00000004, -- TxDIS = 0x00000002, -- TxENA = 0x00000001 -+ RELOAD = 0x00000400, -+ ACCESSMODE = 0x00000200, -+ RESET = 0x00000100, -+ SWI = 0x00000080, -+ RxRESET = 0x00000020, -+ TxRESET = 0x00000010, -+ RxDIS = 0x00000008, -+ RxENA = 0x00000004, -+ TxDIS = 0x00000002, -+ TxENA = 0x00000001 - }; - - enum sis900_configuration_register_bits { -@@ -57,7 +59,10 @@ - EXD = 0x00000010, - PESEL = 0x00000008, - LPM = 0x00000004, -- BEM = 0x00000001 -+ BEM = 0x00000001, -+ RND_CNT = 0x00000400, -+ FAIR_BACKOFF = 0x00000200, -+ EDB_MASTER_EN = 0x00002000 - }; - - enum sis900_eeprom_access_reigster_bits { -@@ -108,6 +113,10 @@ - #define TX_DMA_BURST 0 - #define RX_DMA_BURST 0 - -+enum sis900_tx_rx_dma{ -+ DMA_BURST_512 = 0, DMA_BURST_64 = 5 -+}; -+ - /* transmit FIFO threshholds */ - #define TX_FILL_THRESH 16 /* 1/4 FIFO size */ - #define TxFILLT_shift 8 -@@ -172,6 +181,11 @@ - EEeraseAll = 0x0120, - EEwriteAll = 0x0110, - EEaddrMask = 0x013F, -+ EEcmdShift = 16 -+}; -+/* For SiS962 or SiS963, request the eeprom software access */ -+enum sis96x_eeprom_command { -+ EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100 - }; - - /* Manamgement Data I/O (mdio) frame */ -@@ -236,7 +250,8 @@ - MII_CONFIG1 = 0x0010, - MII_CONFIG2 = 0x0011, - MII_STSOUT = 0x0012, -- MII_MASK = 0x0013 -+ MII_MASK = 0x0013, -+ MII_RESV = 0x0014 - }; - - /* mii registers specific to AMD 79C901 */ -@@ -320,7 +335,9 @@ - - enum sis900_revision_id { - SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81, -- SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83 -+ SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83, -+ SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90, -+ SIS96x_900_REV = 0X91, SIS900B_900_REV = 0x03 - }; - - enum sis630_revision_id { -Index: b/netboot/sis900.txt -=================================================================== ---- a/netboot/sis900.txt -+++ /dev/null -@@ -1,91 +0,0 @@ --How I added the SIS900 card to Etherboot -- --Author: Marty Connor (mdc@thinguin.org) -- --Date: 25 Febrary 2001 -- --Description: -- --This file is intended to help people who want to write an Etherboot --driver or port another driver to Etherboot. It is a starting point. --Perhaps someday I may write a more detailed description of writing an --Etherboot driver. This text should help get people started, and --studying sis900.[ch] should help show the basic structure and --techniques involved in writing and Etherboot driver. -- --*********************************************************************** -- --0. Back up all the files I need to modify: -- --cd etherboot-4.7.20/src --cp Makefile Makefile.orig --cp config.c config.c.orig --cp pci.h pci.h.orig --cp NIC NIC.orig --cp cards.h cards.h.orig -- --1. Edit src/Makefile to add SIS900FLAGS to defines -- --SIS900FLAGS= -DINCLUDE_SIS900 -- --2. edit src/pci.h to add PCI signatures for card -- --#define PCI_VENDOR_ID_SIS 0x1039 --#define PCI_DEVICE_ID_SIS900 0x0900 --#define PCI_DEVICE_ID_SIS7016 0x7016 -- --3. Edit src/config.c to add the card to the card probe list -- --#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || -- defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || -- defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || -- defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || -- defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || -- defined(INCLUDE_SIS900) || defined(INCLUDE_W89C840) -- --... and ... -- --#ifdef INCLUDE_SIS900 -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, -- "SIS900", 0, 0, 0, 0}, -- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, -- "SIS7016", 0, 0, 0, 0}, --#endif -- --... and ... -- --#ifdef INCLUDE_SIS900 -- { "SIS900", sis900_probe, pci_ioaddrs }, --#endif -- --4. Edit NIC to add sis900 and sis7016 to NIC list -- --# SIS 900 and SIS 7016 --sis900 sis900 0x1039,0x0900 --sis7016 sis900 0x1039,0x7016 -- --5. Edit cards.h to add sis900 probe routine declaration -- --#ifdef INCLUDE_SIS900 --extern struct nic *sis900_probe(struct nic *, unsigned short * -- PCI_ARG(struct pci_device *)); --#endif -- --*********************************************************************** -- --At this point, you can begin creating your driver source file. See --the "Writing and Etherboot Driver" section of the Etherboot --documentation for some hints. See the skel.c file for a starting --point. If there is a Linux driver for the card, you may be able to --use that. Copy and learn from existing Etherboot drivers (this is GPL --/ Open Source software!). -- --Join the etherboot-developers and etherboot-users mailing lists --(information is on etherboot.sourceforge.net) for information and --assistance. We invite more developers to help improve Etherboot. -- --Visit the http://etherboot.sourceforge.net, http://thinguin.org, --http://rom-o-matic.net, and http://ltsp.org sites for information and --assistance. -- --Enjoy. -Index: b/netboot/smc9000.c -=================================================================== ---- a/netboot/smc9000.c -+++ /dev/null -@@ -1,522 +0,0 @@ -- /*------------------------------------------------------------------------ -- * smc9000.c -- * This is a Etherboot driver for SMC's 9000 series of Ethernet cards. -- * -- * Copyright (C) 1998 Daniel Engstrm -- * Based on the Linux SMC9000 driver, smc9194.c by Eric Stahlman -- * Copyright (C) 1996 by Erik Stahlman -- * -- * This software may be used and distributed according to the terms -- * of the GNU Public License, incorporated herein by reference. -- * -- * "Features" of the SMC chip: -- * 4608 byte packet memory. ( for the 91C92/4. Others have more ) -- * EEPROM for configuration -- * AUI/TP selection -- * -- * Authors -- * Erik Stahlman -- * Daniel Engstrm -- * -- * History -- * 98-09-25 Daniel Engstrm Etherboot driver crated from Eric's -- * Linux driver. -- * -- *---------------------------------------------------------------------------*/ --#define LINUX_OUT_MACROS 1 --#define SMC9000_VERBOSE 1 --#define SMC9000_DEBUG 0 -- --#include "etherboot.h" --#include "nic.h" --#include "cards.h" --#include "smc9000.h" -- --# define _outb outb --# define _outw outw -- --static const char smc9000_version[] = "Version 0.99 98-09-30"; --static unsigned int smc9000_base=0; --static const char *interfaces[ 2 ] = { "TP", "AUI" }; --static const char *chip_ids[ 15 ] = { -- NULL, NULL, NULL, -- /* 3 */ "SMC91C90/91C92", -- /* 4 */ "SMC91C94", -- /* 5 */ "SMC91C95", -- NULL, -- /* 7 */ "SMC91C100", -- /* 8 */ "SMC91C100FD", -- NULL, NULL, NULL, -- NULL, NULL, NULL --}; --static const char smc91c96_id[] = "SMC91C96"; -- --/* -- * Function: smc_reset( int ioaddr ) -- * Purpose: -- * This sets the SMC91xx chip to its normal state, hopefully from whatever -- * mess that any other DOS driver has put it in. -- * -- * Maybe I should reset more registers to defaults in here? SOFTRESET should -- * do that for me. -- * -- * Method: -- * 1. send a SOFT RESET -- * 2. wait for it to finish -- * 3. reset the memory management unit -- * 4. clear all interrupts -- * --*/ --static void smc_reset(int ioaddr) --{ -- /* This resets the registers mostly to defaults, but doesn't -- * affect EEPROM. That seems unnecessary */ -- SMC_SELECT_BANK(ioaddr, 0); -- _outw( RCR_SOFTRESET, ioaddr + RCR ); -- -- /* this should pause enough for the chip to be happy */ -- SMC_DELAY(ioaddr); -- -- /* Set the transmit and receive configuration registers to -- * default values */ -- _outw(RCR_CLEAR, ioaddr + RCR); -- _outw(TCR_CLEAR, ioaddr + TCR); -- -- /* Reset the MMU */ -- SMC_SELECT_BANK(ioaddr, 2); -- _outw( MC_RESET, ioaddr + MMU_CMD ); -- -- /* Note: It doesn't seem that waiting for the MMU busy is needed here, -- * but this is a place where future chipsets _COULD_ break. Be wary -- * of issuing another MMU command right after this */ -- _outb(0, ioaddr + INT_MASK); --} -- -- --/*---------------------------------------------------------------------- -- * Function: smc_probe( int ioaddr ) -- * -- * Purpose: -- * Tests to see if a given ioaddr points to an SMC9xxx chip. -- * Returns a 0 on success -- * -- * Algorithm: -- * (1) see if the high byte of BANK_SELECT is 0x33 -- * (2) compare the ioaddr with the base register's address -- * (3) see if I recognize the chip ID in the appropriate register -- * -- * --------------------------------------------------------------------- -- */ --static int smc_probe( int ioaddr ) --{ -- word bank; -- word revision_register; -- word base_address_register; -- -- /* First, see if the high byte is 0x33 */ -- bank = inw(ioaddr + BANK_SELECT); -- if ((bank & 0xFF00) != 0x3300) { -- return -1; -- } -- /* The above MIGHT indicate a device, but I need to write to further -- * test this. */ -- _outw(0x0, ioaddr + BANK_SELECT); -- bank = inw(ioaddr + BANK_SELECT); -- if ((bank & 0xFF00) != 0x3300) { -- return -1; -- } -- -- /* well, we've already written once, so hopefully another time won't -- * hurt. This time, I need to switch the bank register to bank 1, -- * so I can access the base address register */ -- SMC_SELECT_BANK(ioaddr, 1); -- base_address_register = inw(ioaddr + BASE); -- -- if (ioaddr != (base_address_register >> 3 & 0x3E0)) { --#ifdef SMC9000_VERBOSE -- printf("SMC9000: IOADDR %hX doesn't match configuration (%hX)." -- "Probably not a SMC chip\n", -- ioaddr, base_address_register >> 3 & 0x3E0); --#endif -- /* well, the base address register didn't match. Must not have -- * been a SMC chip after all. */ -- return -1; -- } -- -- -- /* check if the revision register is something that I recognize. -- * These might need to be added to later, as future revisions -- * could be added. */ -- SMC_SELECT_BANK(ioaddr, 3); -- revision_register = inw(ioaddr + REVISION); -- if (!chip_ids[(revision_register >> 4) & 0xF]) { -- /* I don't recognize this chip, so... */ --#ifdef SMC9000_VERBOSE -- printf("SMC9000: IO %hX: Unrecognized revision register:" -- " %hX, Contact author.\n", ioaddr, revision_register); --#endif -- return -1; -- } -- -- /* at this point I'll assume that the chip is an SMC9xxx. -- * It might be prudent to check a listing of MAC addresses -- * against the hardware address, or do some other tests. */ -- return 0; --} -- -- --/************************************************************************** -- * ETH_RESET - Reset adapter -- ***************************************************************************/ -- --static void smc9000_reset(struct nic *nic) --{ -- smc_reset(smc9000_base); --} -- --/************************************************************************** -- * ETH_TRANSMIT - Transmit a frame -- ***************************************************************************/ --static void smc9000_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- word length; /* real, length incl. header */ -- word numPages; -- unsigned long time_out; -- byte packet_no; -- word status; -- int i; -- -- /* We dont pad here since we can have the hardware doing it for us */ -- length = (s + ETH_HLEN + 1)&~1; -- -- /* convert to MMU pages */ -- numPages = length / 256; -- -- if (numPages > 7 ) { --#ifdef SMC9000_VERBOSE -- printf("SMC9000: Far too big packet error. \n"); --#endif -- return; -- } -- -- /* dont try more than, say 30 times */ -- for (i=0;i<30;i++) { -- /* now, try to allocate the memory */ -- SMC_SELECT_BANK(smc9000_base, 2); -- _outw(MC_ALLOC | numPages, smc9000_base + MMU_CMD); -- -- status = 0; -- /* wait for the memory allocation to finnish */ -- for (time_out = currticks() + 5*TICKS_PER_SEC; currticks() < time_out; ) { -- status = inb(smc9000_base + INTERRUPT); -- if ( status & IM_ALLOC_INT ) { -- /* acknowledge the interrupt */ -- _outb(IM_ALLOC_INT, smc9000_base + INTERRUPT); -- break; -- } -- } -- -- if ((status & IM_ALLOC_INT) != 0 ) { -- /* We've got the memory */ -- break; -- } else { -- printf("SMC9000: Memory allocation timed out, resetting MMU.\n"); -- _outw(MC_RESET, smc9000_base + MMU_CMD); -- } -- } -- -- /* If I get here, I _know_ there is a packet slot waiting for me */ -- packet_no = inb(smc9000_base + PNR_ARR + 1); -- if (packet_no & 0x80) { -- /* or isn't there? BAD CHIP! */ -- printf("SMC9000: Memory allocation failed. \n"); -- return; -- } -- -- /* we have a packet address, so tell the card to use it */ -- _outb(packet_no, smc9000_base + PNR_ARR); -- -- /* point to the beginning of the packet */ -- _outw(PTR_AUTOINC, smc9000_base + POINTER); -- --#if SMC9000_DEBUG > 2 -- printf("Trying to xmit packet of length %hX\n", length ); --#endif -- -- /* send the packet length ( +6 for status, length and ctl byte ) -- * and the status word ( set to zeros ) */ -- _outw(0, smc9000_base + DATA_1 ); -- -- /* send the packet length ( +6 for status words, length, and ctl) */ -- _outb((length+6) & 0xFF, smc9000_base + DATA_1); -- _outb((length+6) >> 8 , smc9000_base + DATA_1); -- -- /* Write the contents of the packet */ -- -- /* The ethernet header first... */ -- outsw(smc9000_base + DATA_1, d, ETH_ALEN >> 1); -- outsw(smc9000_base + DATA_1, nic->node_addr, ETH_ALEN >> 1); -- _outw(htons(t), smc9000_base + DATA_1); -- -- /* ... the data ... */ -- outsw(smc9000_base + DATA_1 , p, s >> 1); -- -- /* ... and the last byte, if there is one. */ -- if ((s & 1) == 0) { -- _outw(0, smc9000_base + DATA_1); -- } else { -- _outb(p[s-1], smc9000_base + DATA_1); -- _outb(0x20, smc9000_base + DATA_1); -- } -- -- /* and let the chipset deal with it */ -- _outw(MC_ENQUEUE , smc9000_base + MMU_CMD); -- -- status = 0; time_out = currticks() + 5*TICKS_PER_SEC; -- do { -- status = inb(smc9000_base + INTERRUPT); -- -- if ((status & IM_TX_INT ) != 0) { -- word tx_status; -- -- /* ack interrupt */ -- _outb(IM_TX_INT, smc9000_base + INTERRUPT); -- -- packet_no = inw(smc9000_base + FIFO_PORTS); -- packet_no &= 0x7F; -- -- /* select this as the packet to read from */ -- _outb( packet_no, smc9000_base + PNR_ARR ); -- -- /* read the first word from this packet */ -- _outw( PTR_AUTOINC | PTR_READ, smc9000_base + POINTER ); -- -- tx_status = inw( smc9000_base + DATA_1 ); -- -- if (0 == (tx_status & TS_SUCCESS)) { --#ifdef SMC9000_VERBOSE -- printf("SMC9000: TX FAIL STATUS: %hX \n", tx_status); --#endif -- /* re-enable transmit */ -- SMC_SELECT_BANK(smc9000_base, 0); -- _outw(inw(smc9000_base + TCR ) | TCR_ENABLE, smc9000_base + TCR ); -- } -- -- /* kill the packet */ -- SMC_SELECT_BANK(smc9000_base, 2); -- _outw(MC_FREEPKT, smc9000_base + MMU_CMD); -- -- return; -- } -- }while(currticks() < time_out); -- -- printf("SMC9000: Waring TX timed out, resetting board\n"); -- smc_reset(smc9000_base); -- return; --} -- --/************************************************************************** -- * ETH_POLL - Wait for a frame -- ***************************************************************************/ --static int smc9000_poll(struct nic *nic) --{ -- if(!smc9000_base) -- return 0; -- -- SMC_SELECT_BANK(smc9000_base, 2); -- if (inw(smc9000_base + FIFO_PORTS) & FP_RXEMPTY) -- return 0; -- -- /* start reading from the start of the packet */ -- _outw(PTR_READ | PTR_RCV | PTR_AUTOINC, smc9000_base + POINTER); -- -- /* First read the status and check that we're ok */ -- if (!(inw(smc9000_base + DATA_1) & RS_ERRORS)) { -- /* Next: read the packet length and mask off the top bits */ -- nic->packetlen = (inw(smc9000_base + DATA_1) & 0x07ff); -- -- /* the packet length includes the 3 extra words */ -- nic->packetlen -= 6; --#if SMC9000_DEBUG > 2 -- printf(" Reading %d words (and %d byte(s))\n", -- (nic->packetlen >> 1), nic->packetlen & 1); --#endif -- /* read the packet (and the last "extra" word) */ -- insw(smc9000_base + DATA_1, nic->packet, (nic->packetlen+2) >> 1); -- /* is there an odd last byte ? */ -- if (nic->packet[nic->packetlen+1] & 0x20) -- nic->packetlen++; -- -- /* error or good, tell the card to get rid of this packet */ -- _outw(MC_RELEASE, smc9000_base + MMU_CMD); -- return 1; -- } -- -- printf("SMC9000: RX error\n"); -- /* error or good, tell the card to get rid of this packet */ -- _outw(MC_RELEASE, smc9000_base + MMU_CMD); -- return 0; --} -- --static void smc9000_disable(struct nic *nic) --{ -- if(!smc9000_base) -- return; -- -- /* no more interrupts for me */ -- SMC_SELECT_BANK(smc9000_base, 2); -- _outb( 0, smc9000_base + INT_MASK); -- -- /* and tell the card to stay away from that nasty outside world */ -- SMC_SELECT_BANK(smc9000_base, 0); -- _outb( RCR_CLEAR, smc9000_base + RCR ); -- _outb( TCR_CLEAR, smc9000_base + TCR ); --} -- --/************************************************************************** -- * ETH_PROBE - Look for an adapter -- ***************************************************************************/ -- --struct nic *smc9000_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- unsigned short revision; -- int memory; -- int media; -- const char * version_string; -- const char * if_string; -- int i; -- -- /* -- * the SMC9000 can be at any of the following port addresses. To change, -- * for a slightly different card, you can add it to the array. Keep in -- * mind that the array must end in zero. -- */ -- static unsigned short portlist[] = { --#ifdef SMC9000_SCAN -- SMC9000_SCAN, --#else -- 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, -- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, --#endif -- 0 }; -- -- printf("\nSMC9000 %s\n", smc9000_version); --#ifdef SMC9000_VERBOSE -- printf("Copyright (C) 1998 Daniel Engstr\x94m\n"); -- printf("Copyright (C) 1996 Eric Stahlman\n"); --#endif -- /* if no addresses supplied, fall back on defaults */ -- if (probe_addrs == 0 || probe_addrs[0] == 0) -- probe_addrs = portlist; -- -- /* check every ethernet address */ -- for (i = 0; probe_addrs[i]; i++) { -- /* check this specific address */ -- if (smc_probe(probe_addrs[i]) == 0) -- smc9000_base = probe_addrs[i]; -- } -- -- /* couldn't find anything */ -- if(0 == smc9000_base) -- goto out; -- -- /* -- * Get the MAC address ( bank 1, regs 4 - 9 ) -- */ -- SMC_SELECT_BANK(smc9000_base, 1); -- for ( i = 0; i < 6; i += 2 ) { -- word address; -- -- address = inw(smc9000_base + ADDR0 + i); -- nic->node_addr[i+1] = address >> 8; -- nic->node_addr[i] = address & 0xFF; -- } -- -- -- /* get the memory information */ -- SMC_SELECT_BANK(smc9000_base, 0); -- memory = ( inw(smc9000_base + MCR) >> 9 ) & 0x7; /* multiplier */ -- memory *= 256 * (inw(smc9000_base + MIR) & 0xFF); -- -- /* -- * Now, I want to find out more about the chip. This is sort of -- * redundant, but it's cleaner to have it in both, rather than having -- * one VERY long probe procedure. -- */ -- SMC_SELECT_BANK(smc9000_base, 3); -- revision = inw(smc9000_base + REVISION); -- version_string = chip_ids[(revision >> 4) & 0xF]; -- -- if (((revision & 0xF0) >> 4 == CHIP_9196) && -- ((revision & 0x0F) >= REV_9196)) { -- /* This is a 91c96. 'c96 has the same chip id as 'c94 (4) but -- * a revision starting at 6 */ -- version_string = smc91c96_id; -- } -- -- if ( !version_string ) { -- /* I shouldn't get here because this call was done before.... */ -- goto out; -- } -- -- /* is it using AUI or 10BaseT ? */ -- SMC_SELECT_BANK(smc9000_base, 1); -- if (inw(smc9000_base + CONFIG) & CFG_AUI_SELECT) -- media = 2; -- else -- media = 1; -- -- if_string = interfaces[media - 1]; -- -- /* now, reset the chip, and put it into a known state */ -- smc_reset(smc9000_base); -- -- printf("%s rev:%d I/O port:%hX Interface:%s RAM:%d bytes \n", -- version_string, revision & 0xF, -- smc9000_base, if_string, memory ); -- /* -- * Print the Ethernet address -- */ -- printf("Ethernet MAC address: %!\n", nic->node_addr); -- -- SMC_SELECT_BANK(smc9000_base, 0); -- -- /* see the header file for options in TCR/RCR NORMAL*/ -- _outw(TCR_NORMAL, smc9000_base + TCR); -- _outw(RCR_NORMAL, smc9000_base + RCR); -- -- /* Select which interface to use */ -- SMC_SELECT_BANK(smc9000_base, 1); -- if ( media == 1 ) { -- _outw( inw( smc9000_base + CONFIG ) & ~CFG_AUI_SELECT, -- smc9000_base + CONFIG ); -- } -- else if ( media == 2 ) { -- _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT, -- smc9000_base + CONFIG ); -- } -- -- nic->reset = smc9000_reset; -- nic->poll = smc9000_poll; -- nic->transmit = smc9000_transmit; -- nic->disable = smc9000_disable; -- -- -- return nic; -- --out: --#ifdef SMC9000_VERBOSE -- printf("No SMC9000 adapters found\n"); --#endif -- smc9000_base = 0; -- -- return (0); --} -- -- -- -Index: b/netboot/smc9000.h -=================================================================== ---- a/netboot/smc9000.h -+++ /dev/null -@@ -1,205 +0,0 @@ --/*------------------------------------------------------------------------ -- * smc9000.h -- * -- * Copyright (C) 1998 by Daniel Engstrm -- * Copyright (C) 1996 by Erik Stahlman -- * -- * This software may be used and distributed according to the terms -- * of the GNU Public License, incorporated herein by reference. -- * -- * This file contains register information and access macros for -- * the SMC91xxx chipset. -- * -- * Information contained in this file was obtained from the SMC91C94 -- * manual from SMC. To get a copy, if you really want one, you can find -- * information under www.smsc.com in the components division. -- * ( this thanks to advice from Donald Becker ). -- * -- * Authors -- * Daniel Engstrm -- * Erik Stahlman -- * -- * History -- * 96-01-06 Erik Stahlman moved definitions here from main .c -- * file -- * 96-01-19 Erik Stahlman polished this up some, and added -- * better error handling -- * 98-09-25 Daniel Engstrm adjusted for Etherboot -- * 98-09-27 Daniel Engstrm moved some static strings back to the -- * main .c file -- * --------------------------------------------------------------------------*/ --#ifndef _SMC9000_H_ --# define _SMC9000_H_ -- --/* I want some simple types */ --typedef unsigned char byte; --typedef unsigned short word; --typedef unsigned long int dword; -- --/*--------------------------------------------------------------- -- * -- * A description of the SMC registers is probably in order here, -- * although for details, the SMC datasheet is invaluable. -- * -- * Basically, the chip has 4 banks of registers ( 0 to 3 ), which -- * are accessed by writing a number into the BANK_SELECT register -- * ( I also use a SMC_SELECT_BANK macro for this ). -- * -- * The banks are configured so that for most purposes, bank 2 is all -- * that is needed for simple run time tasks. -- * ----------------------------------------------------------------------*/ -- --/* -- * Bank Select Register: -- * -- * yyyy yyyy 0000 00xx -- * xx = bank number -- * yyyy yyyy = 0x33, for identification purposes. -- */ --#define BANK_SELECT 14 -- --/* BANK 0 */ -- --#define TCR 0 /* transmit control register */ --#define TCR_ENABLE 0x0001 /* if this is 1, we can transmit */ --#define TCR_FDUPLX 0x0800 /* receive packets sent out */ --#define TCR_STP_SQET 0x1000 /* stop transmitting if Signal quality error */ --#define TCR_MON_CNS 0x0400 /* monitors the carrier status */ --#define TCR_PAD_ENABLE 0x0080 /* pads short packets to 64 bytes */ -- --#define TCR_CLEAR 0 /* do NOTHING */ --/* the normal settings for the TCR register : */ --#define TCR_NORMAL (TCR_ENABLE | TCR_PAD_ENABLE) -- -- --#define EPH_STATUS 2 --#define ES_LINK_OK 0x4000 /* is the link integrity ok ? */ -- --#define RCR 4 --#define RCR_SOFTRESET 0x8000 /* resets the chip */ --#define RCR_STRIP_CRC 0x200 /* strips CRC */ --#define RCR_ENABLE 0x100 /* IFF this is set, we can receive packets */ --#define RCR_ALMUL 0x4 /* receive all multicast packets */ --#define RCR_PROMISC 0x2 /* enable promiscuous mode */ -- --/* the normal settings for the RCR register : */ --#define RCR_NORMAL (RCR_STRIP_CRC | RCR_ENABLE) --#define RCR_CLEAR 0x0 /* set it to a base state */ -- --#define COUNTER 6 --#define MIR 8 --#define MCR 10 --/* 12 is reserved */ -- --/* BANK 1 */ --#define CONFIG 0 --#define CFG_AUI_SELECT 0x100 --#define BASE 2 --#define ADDR0 4 --#define ADDR1 6 --#define ADDR2 8 --#define GENERAL 10 --#define CONTROL 12 --#define CTL_POWERDOWN 0x2000 --#define CTL_LE_ENABLE 0x80 --#define CTL_CR_ENABLE 0x40 --#define CTL_TE_ENABLE 0x0020 --#define CTL_AUTO_RELEASE 0x0800 --#define CTL_EPROM_ACCESS 0x0003 /* high if Eprom is being read */ -- --/* BANK 2 */ --#define MMU_CMD 0 --#define MC_BUSY 1 /* only readable bit in the register */ --#define MC_NOP 0 --#define MC_ALLOC 0x20 /* or with number of 256 byte packets */ --#define MC_RESET 0x40 --#define MC_REMOVE 0x60 /* remove the current rx packet */ --#define MC_RELEASE 0x80 /* remove and release the current rx packet */ --#define MC_FREEPKT 0xA0 /* Release packet in PNR register */ --#define MC_ENQUEUE 0xC0 /* Enqueue the packet for transmit */ -- --#define PNR_ARR 2 --#define FIFO_PORTS 4 -- --#define FP_RXEMPTY 0x8000 --#define FP_TXEMPTY 0x80 -- --#define POINTER 6 --#define PTR_READ 0x2000 --#define PTR_RCV 0x8000 --#define PTR_AUTOINC 0x4000 --#define PTR_AUTO_INC 0x0040 -- --#define DATA_1 8 --#define DATA_2 10 --#define INTERRUPT 12 -- --#define INT_MASK 13 --#define IM_RCV_INT 0x1 --#define IM_TX_INT 0x2 --#define IM_TX_EMPTY_INT 0x4 --#define IM_ALLOC_INT 0x8 --#define IM_RX_OVRN_INT 0x10 --#define IM_EPH_INT 0x20 --#define IM_ERCV_INT 0x40 /* not on SMC9192 */ -- --/* BANK 3 */ --#define MULTICAST1 0 --#define MULTICAST2 2 --#define MULTICAST3 4 --#define MULTICAST4 6 --#define MGMT 8 --#define REVISION 10 /* ( hi: chip id low: rev # ) */ -- -- --/* this is NOT on SMC9192 */ --#define ERCV 12 -- --/* Note that 9194 and 9196 have the smame chip id, -- * the 9196 will have revisions starting at 6 */ --#define CHIP_9190 3 --#define CHIP_9194 4 --#define CHIP_9195 5 --#define CHIP_9196 4 --#define CHIP_91100 7 --#define CHIP_91100FD 8 -- --#define REV_9196 6 -- --/* -- * Transmit status bits -- */ --#define TS_SUCCESS 0x0001 --#define TS_LOSTCAR 0x0400 --#define TS_LATCOL 0x0200 --#define TS_16COL 0x0010 -- --/* -- * Receive status bits -- */ --#define RS_ALGNERR 0x8000 --#define RS_BADCRC 0x2000 --#define RS_ODDFRAME 0x1000 --#define RS_TOOLONG 0x0800 --#define RS_TOOSHORT 0x0400 --#define RS_MULTICAST 0x0001 --#define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT) -- -- --/*------------------------------------------------------------------------- -- * I define some macros to make it easier to do somewhat common -- * or slightly complicated, repeated tasks. -- --------------------------------------------------------------------------*/ -- --/* select a register bank, 0 to 3 */ -- --#define SMC_SELECT_BANK(x, y) { _outw( y, x + BANK_SELECT ); } -- --/* define a small delay for the reset */ --#define SMC_DELAY(x) { inw( x + RCR );\ -- inw( x + RCR );\ -- inw( x + RCR ); } -- -- --#endif /* _SMC_9000_H_ */ -- -Index: b/netboot/stdint.h -=================================================================== ---- /dev/null -+++ b/netboot/stdint.h -@@ -0,0 +1,18 @@ -+#ifndef STDINT_H -+#define STDINT_H -+/* -+ * I'm architecture depended. Check me before port GRUB -+ */ -+typedef unsigned size_t; -+ -+typedef unsigned char uint8_t; -+typedef unsigned short uint16_t; -+typedef unsigned long uint32_t; -+typedef unsigned long long uint64_t; -+ -+typedef signed char int8_t; -+typedef signed short int16_t; -+typedef signed long int32_t; -+typedef signed long long int64_t; -+ -+#endif /* STDINT_H */ -Index: b/netboot/tftp.h -=================================================================== ---- /dev/null -+++ b/netboot/tftp.h -@@ -0,0 +1,82 @@ -+#ifndef _TFTP_H -+#define _TFTP_H -+ -+#include "if_ether.h" -+#include "ip.h" -+#include "udp.h" -+ -+#ifndef MAX_TFTP_RETRIES -+#define MAX_TFTP_RETRIES 20 -+#endif -+ -+/* These settings have sense only if compiled with -DCONGESTED */ -+/* total retransmission timeout in ticks */ -+#define TFTP_TIMEOUT (30*TICKS_PER_SEC) -+/* packet retransmission timeout in ticks */ -+#define TFTP_REXMT (3*TICKS_PER_SEC) -+ -+#define TFTP_PORT 69 -+#define TFTP_DEFAULTSIZE_PACKET 512 -+#define TFTP_MAX_PACKET 1432 /* 512 */ -+ -+#define TFTP_RRQ 1 -+#define TFTP_WRQ 2 -+#define TFTP_DATA 3 -+#define TFTP_ACK 4 -+#define TFTP_ERROR 5 -+#define TFTP_OACK 6 -+ -+#define TFTP_CODE_EOF 1 -+#define TFTP_CODE_MORE 2 -+#define TFTP_CODE_ERROR 3 -+#define TFTP_CODE_BOOT 4 -+#define TFTP_CODE_CFG 5 -+ -+struct tftp_t { -+ struct iphdr ip; -+ struct udphdr udp; -+ uint16_t opcode; -+ union { -+ uint8_t rrq[TFTP_DEFAULTSIZE_PACKET]; -+ struct { -+ uint16_t block; -+ uint8_t download[TFTP_MAX_PACKET]; -+ } data; -+ struct { -+ uint16_t block; -+ } ack; -+ struct { -+ uint16_t errcode; -+ uint8_t errmsg[TFTP_DEFAULTSIZE_PACKET]; -+ } err; -+ struct { -+ uint8_t data[TFTP_DEFAULTSIZE_PACKET+2]; -+ } oack; -+ } u; -+}; -+ -+/* define a smaller tftp packet solely for making requests to conserve stack -+ 512 bytes should be enough */ -+struct tftpreq_t { -+ struct iphdr ip; -+ struct udphdr udp; -+ uint16_t opcode; -+ union { -+ uint8_t rrq[512]; -+ struct { -+ uint16_t block; -+ } ack; -+ struct { -+ uint16_t errcode; -+ uint8_t errmsg[512-2]; -+ } err; -+ } u; -+}; -+ -+#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) -+ -+typedef int (*read_actor_t)(unsigned char *, unsigned int, unsigned int, int); -+ -+int tftp_file_read(const char *name, read_actor_t); -+ -+#endif /* _TFTP_H */ -Index: b/netboot/tg3.c -=================================================================== ---- /dev/null -+++ b/netboot/tg3.c -@@ -0,0 +1,3322 @@ -+/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ -+ * tg3.c: Broadcom Tigon3 ethernet driver. -+ * -+ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) -+ * Copyright (C) 2001, 2002 Jeff Garzik (jgarzik@mandrakesoft.com) -+ * Copyright (C) 2003 Eric Biederman (ebiederman@lnxi.com) [etherboot port] -+ */ -+ -+/* 11-13-2003 timlegge Fix Issue with NetGear GA302T -+ * 11-18-2003 ebiederm Generalize NetGear Fix to what the code was supposed to be. -+ */ -+ -+#include "etherboot.h" -+#include "nic.h" -+#include "pci.h" -+#include "timer.h" -+/*#include "string.h"*/ -+#include "tg3.h" -+ -+#define SUPPORT_COPPER_PHY 1 -+#define SUPPORT_FIBER_PHY 1 -+#define SUPPORT_LINK_REPORT 1 -+#define SUPPORT_PARTNO_STR 1 -+#define SUPPORT_PHY_STR 1 -+ -+struct tg3 tg3; -+ -+/* Dummy defines for error handling */ -+#define EBUSY 1 -+#define ENODEV 2 -+#define EINVAL 3 -+#define ENOMEM 4 -+ -+ -+/* These numbers seem to be hard coded in the NIC firmware somehow. -+ * You can't change the ring sizes, but you can change where you place -+ * them in the NIC onboard memory. -+ */ -+#define TG3_RX_RING_SIZE 512 -+#define TG3_DEF_RX_RING_PENDING 20 /* RX_RING_PENDING seems to be o.k. at 20 and 200 */ -+#define TG3_RX_RCB_RING_SIZE 1024 -+ -+/* (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ? \ -+ 512 : 1024) */ -+ #define TG3_TX_RING_SIZE 512 -+#define TG3_DEF_TX_RING_PENDING (TG3_TX_RING_SIZE - 1) -+ -+#define TG3_RX_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RING_SIZE) -+#define TG3_RX_RCB_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RCB_RING_SIZE) -+ -+#define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * TG3_TX_RING_SIZE) -+#define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) -+#define PREV_TX(N) (((N) - 1) & (TG3_TX_RING_SIZE - 1)) -+ -+#define RX_PKT_BUF_SZ (1536 + 2 + 64) -+ -+ -+static struct bss { -+ struct tg3_rx_buffer_desc rx_std[TG3_RX_RING_SIZE]; -+ struct tg3_rx_buffer_desc rx_rcb[TG3_RX_RCB_RING_SIZE]; -+ struct tg3_tx_buffer_desc tx_ring[TG3_TX_RING_SIZE]; -+ struct tg3_hw_status hw_status; -+ struct tg3_hw_stats hw_stats; -+ unsigned char rx_bufs[TG3_DEF_RX_RING_PENDING][RX_PKT_BUF_SZ]; -+} tg3_bss; -+ -+/** -+ * pci_save_state - save the PCI configuration space of a device before suspending -+ * @dev: - PCI device that we're dealing with -+ * @buffer: - buffer to hold config space context -+ * -+ * @buffer must be large enough to hold the entire PCI 2.2 config space -+ * (>= 64 bytes). -+ */ -+static int pci_save_state(struct pci_device *dev, uint32_t *buffer) -+{ -+ int i; -+ for (i = 0; i < 16; i++) -+ pci_read_config_dword(dev, i * 4,&buffer[i]); -+ return 0; -+} -+ -+/** -+ * pci_restore_state - Restore the saved state of a PCI device -+ * @dev: - PCI device that we're dealing with -+ * @buffer: - saved PCI config space -+ * -+ */ -+static int pci_restore_state(struct pci_device *dev, uint32_t *buffer) -+{ -+ int i; -+ -+ for (i = 0; i < 16; i++) -+ pci_write_config_dword(dev,i * 4, buffer[i]); -+ return 0; -+} -+ -+static void tg3_write_indirect_reg32(uint32_t off, uint32_t val) -+{ -+ pci_write_config_dword(tg3.pdev, TG3PCI_REG_BASE_ADDR, off); -+ pci_write_config_dword(tg3.pdev, TG3PCI_REG_DATA, val); -+} -+ -+#define tw32(reg,val) tg3_write_indirect_reg32((reg),(val)) -+#define tw32_mailbox(reg, val) writel(((val) & 0xffffffff), tg3.regs + (reg)) -+#define tw16(reg,val) writew(((val) & 0xffff), tg3.regs + (reg)) -+#define tw8(reg,val) writeb(((val) & 0xff), tg3.regs + (reg)) -+#define tr32(reg) readl(tg3.regs + (reg)) -+#define tr16(reg) readw(tg3.regs + (reg)) -+#define tr8(reg) readb(tg3.regs + (reg)) -+ -+static void tw32_carefully(uint32_t reg, uint32_t val) -+{ -+ tw32(reg, val); -+ tr32(reg); -+ udelay(100); -+} -+ -+static void tw32_mailbox2(uint32_t reg, uint32_t val) -+{ -+ tw32_mailbox(reg, val); -+ tr32(reg); -+} -+ -+static void tg3_write_mem(uint32_t off, uint32_t val) -+{ -+ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); -+ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); -+ -+ /* Always leave this as zero. */ -+ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); -+} -+ -+static void tg3_read_mem(uint32_t off, uint32_t *val) -+{ -+ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); -+ pci_read_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); -+ -+ /* Always leave this as zero. */ -+ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); -+} -+ -+static void tg3_disable_ints(struct tg3 *tp) -+{ -+ tw32(TG3PCI_MISC_HOST_CTRL, -+ (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); -+ tw32_mailbox2(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); -+} -+ -+static void tg3_switch_clocks(struct tg3 *tp) -+{ -+ uint32_t orig_clock_ctrl, clock_ctrl; -+ -+ clock_ctrl = tr32(TG3PCI_CLOCK_CTRL); -+ -+ orig_clock_ctrl = clock_ctrl; -+ clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE | 0x1f); -+ tp->pci_clock_ctrl = clock_ctrl; -+ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && -+ (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE)!=0) { -+ tw32_carefully(TG3PCI_CLOCK_CTRL, -+ clock_ctrl | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); -+ tw32_carefully(TG3PCI_CLOCK_CTRL, -+ clock_ctrl | (CLOCK_CTRL_ALTCLK)); -+ } -+ tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl); -+} -+ -+#define PHY_BUSY_LOOPS 5000 -+ -+static int tg3_readphy(struct tg3 *tp, int reg, uint32_t *val) -+{ -+ uint32_t frame_val; -+ int loops, ret; -+ -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); -+ -+ *val = 0xffffffff; -+ -+ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & -+ MI_COM_PHY_ADDR_MASK); -+ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & -+ MI_COM_REG_ADDR_MASK); -+ frame_val |= (MI_COM_CMD_READ | MI_COM_START); -+ -+ tw32_carefully(MAC_MI_COM, frame_val); -+ -+ loops = PHY_BUSY_LOOPS; -+ while (loops-- > 0) { -+ udelay(10); -+ frame_val = tr32(MAC_MI_COM); -+ -+ if ((frame_val & MI_COM_BUSY) == 0) { -+ udelay(5); -+ frame_val = tr32(MAC_MI_COM); -+ break; -+ } -+ } -+ -+ ret = -EBUSY; -+ if (loops > 0) { -+ *val = frame_val & MI_COM_DATA_MASK; -+ ret = 0; -+ } -+ -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ -+ return ret; -+} -+ -+static int tg3_writephy(struct tg3 *tp, int reg, uint32_t val) -+{ -+ uint32_t frame_val; -+ int loops, ret; -+ -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); -+ -+ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & -+ MI_COM_PHY_ADDR_MASK); -+ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & -+ MI_COM_REG_ADDR_MASK); -+ frame_val |= (val & MI_COM_DATA_MASK); -+ frame_val |= (MI_COM_CMD_WRITE | MI_COM_START); -+ -+ tw32_carefully(MAC_MI_COM, frame_val); -+ -+ loops = PHY_BUSY_LOOPS; -+ while (loops-- > 0) { -+ udelay(10); -+ frame_val = tr32(MAC_MI_COM); -+ if ((frame_val & MI_COM_BUSY) == 0) { -+ udelay(5); -+ frame_val = tr32(MAC_MI_COM); -+ break; -+ } -+ } -+ -+ ret = -EBUSY; -+ if (loops > 0) -+ ret = 0; -+ -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ -+ return ret; -+} -+ -+static int tg3_writedsp(struct tg3 *tp, uint16_t addr, uint16_t val) -+{ -+ int err; -+ err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, addr); -+ err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val); -+ return err; -+} -+ -+ -+static void tg3_phy_set_wirespeed(struct tg3 *tp) -+{ -+ uint32_t val; -+ -+ if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) -+ return; -+ -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007); -+ tg3_readphy(tp, MII_TG3_AUX_CTRL, &val); -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4))); -+} -+ -+static int tg3_bmcr_reset(struct tg3 *tp) -+{ -+ uint32_t phy_control; -+ int limit, err; -+ -+ /* OK, reset it, and poll the BMCR_RESET bit until it -+ * clears or we time out. -+ */ -+ phy_control = BMCR_RESET; -+ err = tg3_writephy(tp, MII_BMCR, phy_control); -+ if (err != 0) -+ return -EBUSY; -+ -+ limit = 5000; -+ while (limit--) { -+ err = tg3_readphy(tp, MII_BMCR, &phy_control); -+ if (err != 0) -+ return -EBUSY; -+ -+ if ((phy_control & BMCR_RESET) == 0) { -+ udelay(40); -+ break; -+ } -+ udelay(10); -+ } -+ if (limit <= 0) -+ return -EBUSY; -+ -+ return 0; -+} -+ -+static int tg3_wait_macro_done(struct tg3 *tp) -+{ -+ int limit = 100; -+ -+ while (limit--) { -+ uint32_t tmp32; -+ -+ tg3_readphy(tp, 0x16, &tmp32); -+ if ((tmp32 & 0x1000) == 0) -+ break; -+ } -+ if (limit <= 0) -+ return -EBUSY; -+ -+ return 0; -+} -+ -+static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp) -+{ -+ static const uint32_t test_pat[4][6] = { -+ { 0x00005555, 0x00000005, 0x00002aaa, 0x0000000a, 0x00003456, 0x00000003 }, -+ { 0x00002aaa, 0x0000000a, 0x00003333, 0x00000003, 0x0000789a, 0x00000005 }, -+ { 0x00005a5a, 0x00000005, 0x00002a6a, 0x0000000a, 0x00001bcd, 0x00000003 }, -+ { 0x00002a5a, 0x0000000a, 0x000033c3, 0x00000003, 0x00002ef1, 0x00000005 } -+ }; -+ int chan; -+ -+ for (chan = 0; chan < 4; chan++) { -+ int i; -+ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, -+ (chan * 0x2000) | 0x0200); -+ tg3_writephy(tp, 0x16, 0x0002); -+ -+ for (i = 0; i < 6; i++) -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, -+ test_pat[chan][i]); -+ -+ tg3_writephy(tp, 0x16, 0x0202); -+ if (tg3_wait_macro_done(tp)) { -+ *resetp = 1; -+ return -EBUSY; -+ } -+ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, -+ (chan * 0x2000) | 0x0200); -+ tg3_writephy(tp, 0x16, 0x0082); -+ if (tg3_wait_macro_done(tp)) { -+ *resetp = 1; -+ return -EBUSY; -+ } -+ -+ tg3_writephy(tp, 0x16, 0x0802); -+ if (tg3_wait_macro_done(tp)) { -+ *resetp = 1; -+ return -EBUSY; -+ } -+ -+ for (i = 0; i < 6; i += 2) { -+ uint32_t low, high; -+ -+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low); -+ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high); -+ if (tg3_wait_macro_done(tp)) { -+ *resetp = 1; -+ return -EBUSY; -+ } -+ low &= 0x7fff; -+ high &= 0x000f; -+ if (low != test_pat[chan][i] || -+ high != test_pat[chan][i+1]) { -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b); -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001); -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005); -+ -+ return -EBUSY; -+ } -+ } -+ } -+ -+ return 0; -+} -+ -+static int tg3_phy_reset_chanpat(struct tg3 *tp) -+{ -+ int chan; -+ -+ for (chan = 0; chan < 4; chan++) { -+ int i; -+ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, -+ (chan * 0x2000) | 0x0200); -+ tg3_writephy(tp, 0x16, 0x0002); -+ for (i = 0; i < 6; i++) -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000); -+ tg3_writephy(tp, 0x16, 0x0202); -+ if (tg3_wait_macro_done(tp)) -+ return -EBUSY; -+ } -+ -+ return 0; -+} -+ -+static int tg3_phy_reset_5703_4_5(struct tg3 *tp) -+{ -+ uint32_t reg32, phy9_orig; -+ int retries, do_phy_reset, err; -+ -+ retries = 10; -+ do_phy_reset = 1; -+ do { -+ if (do_phy_reset) { -+ err = tg3_bmcr_reset(tp); -+ if (err) -+ return err; -+ do_phy_reset = 0; -+ } -+ -+ /* Disable transmitter and interrupt. */ -+ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); -+ reg32 |= 0x3000; -+ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); -+ -+ /* Set full-duplex, 1000 mbps. */ -+ tg3_writephy(tp, MII_BMCR, -+ BMCR_FULLDPLX | TG3_BMCR_SPEED1000); -+ -+ /* Set to master mode. */ -+ tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig); -+ tg3_writephy(tp, MII_TG3_CTRL, -+ (MII_TG3_CTRL_AS_MASTER | -+ MII_TG3_CTRL_ENABLE_AS_MASTER)); -+ -+ /* Enable SM_DSP_CLOCK and 6dB. */ -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); -+ -+ /* Block the PHY control access. */ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0800); -+ -+ err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset); -+ if (!err) -+ break; -+ } while (--retries); -+ -+ err = tg3_phy_reset_chanpat(tp); -+ if (err) -+ return err; -+ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); -+ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0000); -+ -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); -+ tg3_writephy(tp, 0x16, 0x0000); -+ -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); -+ -+ tg3_writephy(tp, MII_TG3_CTRL, phy9_orig); -+ -+ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); -+ reg32 &= ~0x3000; -+ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); -+ -+ return err; -+} -+ -+/* This will reset the tigon3 PHY if there is no valid -+ * link. -+ */ -+static int tg3_phy_reset(struct tg3 *tp) -+{ -+ uint32_t phy_status; -+ int err; -+ -+ err = tg3_readphy(tp, MII_BMSR, &phy_status); -+ err |= tg3_readphy(tp, MII_BMSR, &phy_status); -+ if (err != 0) -+ return -EBUSY; -+ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { -+ err = tg3_phy_reset_5703_4_5(tp); -+ if (err) -+ return err; -+ goto out; -+ } -+ err = tg3_bmcr_reset(tp); -+ if (err) -+ return err; -+ out: -+ tg3_phy_set_wirespeed(tp); -+ return 0; -+} -+ -+static void tg3_set_power_state_0(struct tg3 *tp) -+{ -+ uint16_t power_control; -+ int pm = tp->pm_cap; -+ -+ /* Make sure register accesses (indirect or otherwise) -+ * will function correctly. -+ */ -+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); -+ -+ pci_read_config_word(tp->pdev, pm + PCI_PM_CTRL, &power_control); -+ -+ power_control |= PCI_PM_CTRL_PME_STATUS; -+ power_control &= ~(PCI_PM_CTRL_STATE_MASK); -+ power_control |= 0; -+ pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control); -+ -+ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); -+ -+ return; -+} -+ -+ -+#if SUPPORT_LINK_REPORT -+static void tg3_link_report(struct tg3 *tp) -+{ -+ if (!tp->carrier_ok) { -+ printf("Link is down.\n"); -+ } else { -+ printf("Link is up at %d Mbps, %s duplex. %s %s %s\n", -+ (tp->link_config.active_speed == SPEED_1000 ? -+ 1000 : -+ (tp->link_config.active_speed == SPEED_100 ? -+ 100 : 10)), -+ (tp->link_config.active_duplex == DUPLEX_FULL ? -+ "full" : "half"), -+ (tp->tg3_flags & TG3_FLAG_TX_PAUSE) ? "TX" : "", -+ (tp->tg3_flags & TG3_FLAG_RX_PAUSE) ? "RX" : "", -+ (tp->tg3_flags & (TG3_FLAG_TX_PAUSE |TG3_FLAG_RX_PAUSE)) ? "flow control" : ""); -+ } -+} -+#else -+#define tg3_link_report(tp) -+#endif -+ -+static void tg3_setup_flow_control(struct tg3 *tp, uint32_t local_adv, uint32_t remote_adv) -+{ -+ uint32_t new_tg3_flags = 0; -+ -+ if (local_adv & ADVERTISE_PAUSE_CAP) { -+ if (local_adv & ADVERTISE_PAUSE_ASYM) { -+ if (remote_adv & LPA_PAUSE_CAP) -+ new_tg3_flags |= -+ (TG3_FLAG_RX_PAUSE | -+ TG3_FLAG_TX_PAUSE); -+ else if (remote_adv & LPA_PAUSE_ASYM) -+ new_tg3_flags |= -+ (TG3_FLAG_RX_PAUSE); -+ } else { -+ if (remote_adv & LPA_PAUSE_CAP) -+ new_tg3_flags |= -+ (TG3_FLAG_RX_PAUSE | -+ TG3_FLAG_TX_PAUSE); -+ } -+ } else if (local_adv & ADVERTISE_PAUSE_ASYM) { -+ if ((remote_adv & LPA_PAUSE_CAP) && -+ (remote_adv & LPA_PAUSE_ASYM)) -+ new_tg3_flags |= TG3_FLAG_TX_PAUSE; -+ } -+ -+ tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE); -+ tp->tg3_flags |= new_tg3_flags; -+ -+ if (new_tg3_flags & TG3_FLAG_RX_PAUSE) -+ tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE; -+ else -+ tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE; -+ -+ if (new_tg3_flags & TG3_FLAG_TX_PAUSE) -+ tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE; -+ else -+ tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE; -+} -+ -+#if SUPPORT_COPPER_PHY -+static void tg3_aux_stat_to_speed_duplex( -+ struct tg3 *tp __unused, uint32_t val, uint8_t *speed, uint8_t *duplex) -+{ -+ static const uint8_t map[] = { -+ [0] = (SPEED_INVALID << 2) | DUPLEX_INVALID, -+ [MII_TG3_AUX_STAT_10HALF >> 8] = (SPEED_10 << 2) | DUPLEX_HALF, -+ [MII_TG3_AUX_STAT_10FULL >> 8] = (SPEED_10 << 2) | DUPLEX_FULL, -+ [MII_TG3_AUX_STAT_100HALF >> 8] = (SPEED_100 << 2) | DUPLEX_HALF, -+ [MII_TG3_AUX_STAT_100_4 >> 8] = (SPEED_INVALID << 2) | DUPLEX_INVALID, -+ [MII_TG3_AUX_STAT_100FULL >> 8] = (SPEED_100 << 2) | DUPLEX_FULL, -+ [MII_TG3_AUX_STAT_1000HALF >> 8] = (SPEED_1000 << 2) | DUPLEX_HALF, -+ [MII_TG3_AUX_STAT_1000FULL >> 8] = (SPEED_1000 << 2) | DUPLEX_FULL, -+ }; -+ uint8_t result; -+ result = map[(val & MII_TG3_AUX_STAT_SPDMASK) >> 8]; -+ *speed = result >> 2; -+ *duplex = result & 3; -+} -+ -+static int tg3_phy_copper_begin(struct tg3 *tp) -+{ -+ uint32_t new_adv; -+ -+ tp->link_config.advertising = -+ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | -+ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | -+ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | -+ ADVERTISED_Autoneg | ADVERTISED_MII); -+ -+ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) { -+ tp->link_config.advertising &= -+ ~(ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full); -+ } -+ -+ new_adv = (ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP); -+ if (tp->link_config.advertising & ADVERTISED_10baseT_Half) { -+ new_adv |= ADVERTISE_10HALF; -+ } -+ if (tp->link_config.advertising & ADVERTISED_10baseT_Full) { -+ new_adv |= ADVERTISE_10FULL; -+ } -+ if (tp->link_config.advertising & ADVERTISED_100baseT_Half) { -+ new_adv |= ADVERTISE_100HALF; -+ } -+ if (tp->link_config.advertising & ADVERTISED_100baseT_Full) { -+ new_adv |= ADVERTISE_100FULL; -+ } -+ tg3_writephy(tp, MII_ADVERTISE, new_adv); -+ -+ if (tp->link_config.advertising & -+ (ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full)) { -+ new_adv = 0; -+ if (tp->link_config.advertising & ADVERTISED_1000baseT_Half) { -+ new_adv |= MII_TG3_CTRL_ADV_1000_HALF; -+ } -+ if (tp->link_config.advertising & ADVERTISED_1000baseT_Full) { -+ new_adv |= MII_TG3_CTRL_ADV_1000_FULL; -+ } -+ if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY) && -+ (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || -+ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)) { -+ new_adv |= (MII_TG3_CTRL_AS_MASTER | -+ MII_TG3_CTRL_ENABLE_AS_MASTER); -+ } -+ tg3_writephy(tp, MII_TG3_CTRL, new_adv); -+ } else { -+ tg3_writephy(tp, MII_TG3_CTRL, 0); -+ } -+ -+ tg3_writephy(tp, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART); -+ -+ return 0; -+} -+ -+static int tg3_init_5401phy_dsp(struct tg3 *tp) -+{ -+ int err; -+ -+ /* Turn off tap power management. */ -+ err = tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c20); -+ -+ err |= tg3_writedsp(tp, 0x0012, 0x1804); -+ err |= tg3_writedsp(tp, 0x0013, 0x1204); -+ err |= tg3_writedsp(tp, 0x8006, 0x0132); -+ err |= tg3_writedsp(tp, 0x8006, 0x0232); -+ err |= tg3_writedsp(tp, 0x201f, 0x0a20); -+ -+ udelay(40); -+ -+ return err; -+} -+ -+static int tg3_setup_copper_phy(struct tg3 *tp) -+{ -+ int current_link_up; -+ uint32_t bmsr, dummy; -+ int i, err; -+ -+ tw32_carefully(MAC_STATUS, -+ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); -+ -+ tp->mi_mode = MAC_MI_MODE_BASE; -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02); -+ -+ /* Some third-party PHYs need to be reset on link going -+ * down. -+ */ -+ if ( ( (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || -+ (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0)) && -+ (tp->carrier_ok)) { -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ if (!(bmsr & BMSR_LSTATUS)) -+ tg3_phy_reset(tp); -+ } -+ -+ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ -+ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) -+ bmsr = 0; -+ -+ if (!(bmsr & BMSR_LSTATUS)) { -+ err = tg3_init_5401phy_dsp(tp); -+ if (err) -+ return err; -+ -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ for (i = 0; i < 1000; i++) { -+ udelay(10); -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ if (bmsr & BMSR_LSTATUS) { -+ udelay(40); -+ break; -+ } -+ } -+ -+ if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 && -+ !(bmsr & BMSR_LSTATUS) && -+ tp->link_config.active_speed == SPEED_1000) { -+ err = tg3_phy_reset(tp); -+ if (!err) -+ err = tg3_init_5401phy_dsp(tp); -+ if (err) -+ return err; -+ } -+ } -+ } else if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || -+ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { -+ /* 5701 {A0,B0} CRC bug workaround */ -+ tg3_writephy(tp, 0x15, 0x0a75); -+ tg3_writephy(tp, 0x1c, 0x8c68); -+ tg3_writephy(tp, 0x1c, 0x8d68); -+ tg3_writephy(tp, 0x1c, 0x8c68); -+ } -+ -+ /* Clear pending interrupts... */ -+ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); -+ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); -+ -+ tg3_writephy(tp, MII_TG3_IMASK, ~0); -+ -+ if (tp->led_mode == led_mode_three_link) -+ tg3_writephy(tp, MII_TG3_EXT_CTRL, -+ MII_TG3_EXT_CTRL_LNK3_LED_MODE); -+ else -+ tg3_writephy(tp, MII_TG3_EXT_CTRL, 0); -+ -+ current_link_up = 0; -+ -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ tg3_readphy(tp, MII_BMSR, &bmsr); -+ -+ if (bmsr & BMSR_LSTATUS) { -+ uint32_t aux_stat, bmcr; -+ -+ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); -+ for (i = 0; i < 2000; i++) { -+ udelay(10); -+ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); -+ if (aux_stat) -+ break; -+ } -+ -+ tg3_aux_stat_to_speed_duplex(tp, aux_stat, -+ &tp->link_config.active_speed, -+ &tp->link_config.active_duplex); -+ tg3_readphy(tp, MII_BMCR, &bmcr); -+ tg3_readphy(tp, MII_BMCR, &bmcr); -+ if (bmcr & BMCR_ANENABLE) { -+ uint32_t gig_ctrl; -+ -+ current_link_up = 1; -+ -+ /* Force autoneg restart if we are exiting -+ * low power mode. -+ */ -+ tg3_readphy(tp, MII_TG3_CTRL, &gig_ctrl); -+ if (!(gig_ctrl & (MII_TG3_CTRL_ADV_1000_HALF | -+ MII_TG3_CTRL_ADV_1000_FULL))) { -+ current_link_up = 0; -+ } -+ } else { -+ current_link_up = 0; -+ } -+ } -+ -+ if (current_link_up == 1 && -+ (tp->link_config.active_duplex == DUPLEX_FULL)) { -+ uint32_t local_adv, remote_adv; -+ -+ tg3_readphy(tp, MII_ADVERTISE, &local_adv); -+ local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); -+ -+ tg3_readphy(tp, MII_LPA, &remote_adv); -+ remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM); -+ -+ /* If we are not advertising full pause capability, -+ * something is wrong. Bring the link down and reconfigure. -+ */ -+ if (local_adv != ADVERTISE_PAUSE_CAP) { -+ current_link_up = 0; -+ } else { -+ tg3_setup_flow_control(tp, local_adv, remote_adv); -+ } -+ } -+ -+ if (current_link_up == 0) { -+ uint32_t tmp; -+ -+ tg3_phy_copper_begin(tp); -+ -+ tg3_readphy(tp, MII_BMSR, &tmp); -+ tg3_readphy(tp, MII_BMSR, &tmp); -+ if (tmp & BMSR_LSTATUS) -+ current_link_up = 1; -+ } -+ -+ tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK; -+ if (current_link_up == 1) { -+ if (tp->link_config.active_speed == SPEED_100 || -+ tp->link_config.active_speed == SPEED_10) -+ tp->mac_mode |= MAC_MODE_PORT_MODE_MII; -+ else -+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; -+ } else -+ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; -+ -+ tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX; -+ if (tp->link_config.active_duplex == DUPLEX_HALF) -+ tp->mac_mode |= MAC_MODE_HALF_DUPLEX; -+ -+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) { -+ if ((tp->led_mode == led_mode_link10) || -+ (current_link_up == 1 && -+ tp->link_config.active_speed == SPEED_10)) -+ tp->mac_mode |= MAC_MODE_LINK_POLARITY; -+ } else { -+ if (current_link_up == 1) -+ tp->mac_mode |= MAC_MODE_LINK_POLARITY; -+ tw32(MAC_LED_CTRL, LED_CTRL_PHY_MODE_1); -+ } -+ -+ /* ??? Without this setting Netgear GA302T PHY does not -+ * ??? send/receive packets... -+ * With this other PHYs cannot bring up the link -+ */ -+ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411 && -+ tp->pci_chip_rev_id == CHIPREV_ID_5700_ALTIMA) { -+ tp->mi_mode |= MAC_MI_MODE_AUTO_POLL; -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ } -+ -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ /* Link change polled. */ -+ tw32_carefully(MAC_EVENT, 0); -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 && -+ current_link_up == 1 && -+ tp->link_config.active_speed == SPEED_1000 && -+ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) || -+ (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED))) { -+ udelay(120); -+ tw32_carefully(MAC_STATUS, -+ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); -+ tg3_write_mem( -+ NIC_SRAM_FIRMWARE_MBOX, -+ NIC_SRAM_FIRMWARE_MBOX_MAGIC2); -+ } -+ -+ if (current_link_up != tp->carrier_ok) { -+ tp->carrier_ok = current_link_up; -+ tg3_link_report(tp); -+ } -+ -+ return 0; -+} -+#else -+#define tg3_setup_copper_phy(TP) (-EINVAL) -+#endif /* SUPPORT_COPPER_PHY */ -+ -+#if SUPPORT_FIBER_PHY -+struct tg3_fiber_aneginfo { -+ int state; -+#define ANEG_STATE_UNKNOWN 0 -+#define ANEG_STATE_AN_ENABLE 1 -+#define ANEG_STATE_RESTART_INIT 2 -+#define ANEG_STATE_RESTART 3 -+#define ANEG_STATE_DISABLE_LINK_OK 4 -+#define ANEG_STATE_ABILITY_DETECT_INIT 5 -+#define ANEG_STATE_ABILITY_DETECT 6 -+#define ANEG_STATE_ACK_DETECT_INIT 7 -+#define ANEG_STATE_ACK_DETECT 8 -+#define ANEG_STATE_COMPLETE_ACK_INIT 9 -+#define ANEG_STATE_COMPLETE_ACK 10 -+#define ANEG_STATE_IDLE_DETECT_INIT 11 -+#define ANEG_STATE_IDLE_DETECT 12 -+#define ANEG_STATE_LINK_OK 13 -+#define ANEG_STATE_NEXT_PAGE_WAIT_INIT 14 -+#define ANEG_STATE_NEXT_PAGE_WAIT 15 -+ -+ uint32_t flags; -+#define MR_AN_ENABLE 0x00000001 -+#define MR_RESTART_AN 0x00000002 -+#define MR_AN_COMPLETE 0x00000004 -+#define MR_PAGE_RX 0x00000008 -+#define MR_NP_LOADED 0x00000010 -+#define MR_TOGGLE_TX 0x00000020 -+#define MR_LP_ADV_FULL_DUPLEX 0x00000040 -+#define MR_LP_ADV_HALF_DUPLEX 0x00000080 -+#define MR_LP_ADV_SYM_PAUSE 0x00000100 -+#define MR_LP_ADV_ASYM_PAUSE 0x00000200 -+#define MR_LP_ADV_REMOTE_FAULT1 0x00000400 -+#define MR_LP_ADV_REMOTE_FAULT2 0x00000800 -+#define MR_LP_ADV_NEXT_PAGE 0x00001000 -+#define MR_TOGGLE_RX 0x00002000 -+#define MR_NP_RX 0x00004000 -+ -+#define MR_LINK_OK 0x80000000 -+ -+ unsigned long link_time, cur_time; -+ -+ uint32_t ability_match_cfg; -+ int ability_match_count; -+ -+ char ability_match, idle_match, ack_match; -+ -+ uint32_t txconfig, rxconfig; -+#define ANEG_CFG_NP 0x00000080 -+#define ANEG_CFG_ACK 0x00000040 -+#define ANEG_CFG_RF2 0x00000020 -+#define ANEG_CFG_RF1 0x00000010 -+#define ANEG_CFG_PS2 0x00000001 -+#define ANEG_CFG_PS1 0x00008000 -+#define ANEG_CFG_HD 0x00004000 -+#define ANEG_CFG_FD 0x00002000 -+#define ANEG_CFG_INVAL 0x00001f06 -+ -+}; -+#define ANEG_OK 0 -+#define ANEG_DONE 1 -+#define ANEG_TIMER_ENAB 2 -+#define ANEG_FAILED -1 -+ -+#define ANEG_STATE_SETTLE_TIME 10000 -+ -+static int tg3_fiber_aneg_smachine(struct tg3 *tp, -+ struct tg3_fiber_aneginfo *ap) -+{ -+ unsigned long delta; -+ uint32_t rx_cfg_reg; -+ int ret; -+ -+ if (ap->state == ANEG_STATE_UNKNOWN) { -+ ap->rxconfig = 0; -+ ap->link_time = 0; -+ ap->cur_time = 0; -+ ap->ability_match_cfg = 0; -+ ap->ability_match_count = 0; -+ ap->ability_match = 0; -+ ap->idle_match = 0; -+ ap->ack_match = 0; -+ } -+ ap->cur_time++; -+ -+ if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) { -+ rx_cfg_reg = tr32(MAC_RX_AUTO_NEG); -+ -+ if (rx_cfg_reg != ap->ability_match_cfg) { -+ ap->ability_match_cfg = rx_cfg_reg; -+ ap->ability_match = 0; -+ ap->ability_match_count = 0; -+ } else { -+ if (++ap->ability_match_count > 1) { -+ ap->ability_match = 1; -+ ap->ability_match_cfg = rx_cfg_reg; -+ } -+ } -+ if (rx_cfg_reg & ANEG_CFG_ACK) -+ ap->ack_match = 1; -+ else -+ ap->ack_match = 0; -+ -+ ap->idle_match = 0; -+ } else { -+ ap->idle_match = 1; -+ ap->ability_match_cfg = 0; -+ ap->ability_match_count = 0; -+ ap->ability_match = 0; -+ ap->ack_match = 0; -+ -+ rx_cfg_reg = 0; -+ } -+ -+ ap->rxconfig = rx_cfg_reg; -+ ret = ANEG_OK; -+ -+ switch(ap->state) { -+ case ANEG_STATE_UNKNOWN: -+ if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN)) -+ ap->state = ANEG_STATE_AN_ENABLE; -+ -+ /* fallthru */ -+ case ANEG_STATE_AN_ENABLE: -+ ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX); -+ if (ap->flags & MR_AN_ENABLE) { -+ ap->link_time = 0; -+ ap->cur_time = 0; -+ ap->ability_match_cfg = 0; -+ ap->ability_match_count = 0; -+ ap->ability_match = 0; -+ ap->idle_match = 0; -+ ap->ack_match = 0; -+ -+ ap->state = ANEG_STATE_RESTART_INIT; -+ } else { -+ ap->state = ANEG_STATE_DISABLE_LINK_OK; -+ } -+ break; -+ -+ case ANEG_STATE_RESTART_INIT: -+ ap->link_time = ap->cur_time; -+ ap->flags &= ~(MR_NP_LOADED); -+ ap->txconfig = 0; -+ tw32(MAC_TX_AUTO_NEG, 0); -+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ ret = ANEG_TIMER_ENAB; -+ ap->state = ANEG_STATE_RESTART; -+ -+ /* fallthru */ -+ case ANEG_STATE_RESTART: -+ delta = ap->cur_time - ap->link_time; -+ if (delta > ANEG_STATE_SETTLE_TIME) { -+ ap->state = ANEG_STATE_ABILITY_DETECT_INIT; -+ } else { -+ ret = ANEG_TIMER_ENAB; -+ } -+ break; -+ -+ case ANEG_STATE_DISABLE_LINK_OK: -+ ret = ANEG_DONE; -+ break; -+ -+ case ANEG_STATE_ABILITY_DETECT_INIT: -+ ap->flags &= ~(MR_TOGGLE_TX); -+ ap->txconfig = (ANEG_CFG_FD | ANEG_CFG_PS1); -+ tw32(MAC_TX_AUTO_NEG, ap->txconfig); -+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ ap->state = ANEG_STATE_ABILITY_DETECT; -+ break; -+ -+ case ANEG_STATE_ABILITY_DETECT: -+ if (ap->ability_match != 0 && ap->rxconfig != 0) { -+ ap->state = ANEG_STATE_ACK_DETECT_INIT; -+ } -+ break; -+ -+ case ANEG_STATE_ACK_DETECT_INIT: -+ ap->txconfig |= ANEG_CFG_ACK; -+ tw32(MAC_TX_AUTO_NEG, ap->txconfig); -+ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ ap->state = ANEG_STATE_ACK_DETECT; -+ -+ /* fallthru */ -+ case ANEG_STATE_ACK_DETECT: -+ if (ap->ack_match != 0) { -+ if ((ap->rxconfig & ~ANEG_CFG_ACK) == -+ (ap->ability_match_cfg & ~ANEG_CFG_ACK)) { -+ ap->state = ANEG_STATE_COMPLETE_ACK_INIT; -+ } else { -+ ap->state = ANEG_STATE_AN_ENABLE; -+ } -+ } else if (ap->ability_match != 0 && -+ ap->rxconfig == 0) { -+ ap->state = ANEG_STATE_AN_ENABLE; -+ } -+ break; -+ -+ case ANEG_STATE_COMPLETE_ACK_INIT: -+ if (ap->rxconfig & ANEG_CFG_INVAL) { -+ ret = ANEG_FAILED; -+ break; -+ } -+ ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX | -+ MR_LP_ADV_HALF_DUPLEX | -+ MR_LP_ADV_SYM_PAUSE | -+ MR_LP_ADV_ASYM_PAUSE | -+ MR_LP_ADV_REMOTE_FAULT1 | -+ MR_LP_ADV_REMOTE_FAULT2 | -+ MR_LP_ADV_NEXT_PAGE | -+ MR_TOGGLE_RX | -+ MR_NP_RX); -+ if (ap->rxconfig & ANEG_CFG_FD) -+ ap->flags |= MR_LP_ADV_FULL_DUPLEX; -+ if (ap->rxconfig & ANEG_CFG_HD) -+ ap->flags |= MR_LP_ADV_HALF_DUPLEX; -+ if (ap->rxconfig & ANEG_CFG_PS1) -+ ap->flags |= MR_LP_ADV_SYM_PAUSE; -+ if (ap->rxconfig & ANEG_CFG_PS2) -+ ap->flags |= MR_LP_ADV_ASYM_PAUSE; -+ if (ap->rxconfig & ANEG_CFG_RF1) -+ ap->flags |= MR_LP_ADV_REMOTE_FAULT1; -+ if (ap->rxconfig & ANEG_CFG_RF2) -+ ap->flags |= MR_LP_ADV_REMOTE_FAULT2; -+ if (ap->rxconfig & ANEG_CFG_NP) -+ ap->flags |= MR_LP_ADV_NEXT_PAGE; -+ -+ ap->link_time = ap->cur_time; -+ -+ ap->flags ^= (MR_TOGGLE_TX); -+ if (ap->rxconfig & 0x0008) -+ ap->flags |= MR_TOGGLE_RX; -+ if (ap->rxconfig & ANEG_CFG_NP) -+ ap->flags |= MR_NP_RX; -+ ap->flags |= MR_PAGE_RX; -+ -+ ap->state = ANEG_STATE_COMPLETE_ACK; -+ ret = ANEG_TIMER_ENAB; -+ break; -+ -+ case ANEG_STATE_COMPLETE_ACK: -+ if (ap->ability_match != 0 && -+ ap->rxconfig == 0) { -+ ap->state = ANEG_STATE_AN_ENABLE; -+ break; -+ } -+ delta = ap->cur_time - ap->link_time; -+ if (delta > ANEG_STATE_SETTLE_TIME) { -+ if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) { -+ ap->state = ANEG_STATE_IDLE_DETECT_INIT; -+ } else { -+ if ((ap->txconfig & ANEG_CFG_NP) == 0 && -+ !(ap->flags & MR_NP_RX)) { -+ ap->state = ANEG_STATE_IDLE_DETECT_INIT; -+ } else { -+ ret = ANEG_FAILED; -+ } -+ } -+ } -+ break; -+ -+ case ANEG_STATE_IDLE_DETECT_INIT: -+ ap->link_time = ap->cur_time; -+ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ ap->state = ANEG_STATE_IDLE_DETECT; -+ ret = ANEG_TIMER_ENAB; -+ break; -+ -+ case ANEG_STATE_IDLE_DETECT: -+ if (ap->ability_match != 0 && -+ ap->rxconfig == 0) { -+ ap->state = ANEG_STATE_AN_ENABLE; -+ break; -+ } -+ delta = ap->cur_time - ap->link_time; -+ if (delta > ANEG_STATE_SETTLE_TIME) { -+ /* XXX another gem from the Broadcom driver :( */ -+ ap->state = ANEG_STATE_LINK_OK; -+ } -+ break; -+ -+ case ANEG_STATE_LINK_OK: -+ ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK); -+ ret = ANEG_DONE; -+ break; -+ -+ case ANEG_STATE_NEXT_PAGE_WAIT_INIT: -+ /* ??? unimplemented */ -+ break; -+ -+ case ANEG_STATE_NEXT_PAGE_WAIT: -+ /* ??? unimplemented */ -+ break; -+ -+ default: -+ ret = ANEG_FAILED; -+ break; -+ }; -+ -+ return ret; -+} -+ -+static int tg3_setup_fiber_phy(struct tg3 *tp) -+{ -+ uint32_t orig_pause_cfg; -+ uint16_t orig_active_speed; -+ uint8_t orig_active_duplex; -+ int current_link_up; -+ int i; -+ -+ orig_pause_cfg = -+ (tp->tg3_flags & (TG3_FLAG_RX_PAUSE | -+ TG3_FLAG_TX_PAUSE)); -+ orig_active_speed = tp->link_config.active_speed; -+ orig_active_duplex = tp->link_config.active_duplex; -+ -+ tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); -+ tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ /* Reset when initting first time or we have a link. */ -+ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || -+ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { -+ /* Set PLL lock range. */ -+ tg3_writephy(tp, 0x16, 0x8007); -+ -+ /* SW reset */ -+ tg3_writephy(tp, MII_BMCR, BMCR_RESET); -+ -+ /* Wait for reset to complete. */ -+ mdelay(5); -+ -+ /* Config mode; select PMA/Ch 1 regs. */ -+ tg3_writephy(tp, 0x10, 0x8411); -+ -+ /* Enable auto-lock and comdet, select txclk for tx. */ -+ tg3_writephy(tp, 0x11, 0x0a10); -+ -+ tg3_writephy(tp, 0x18, 0x00a0); -+ tg3_writephy(tp, 0x16, 0x41ff); -+ -+ /* Assert and deassert POR. */ -+ tg3_writephy(tp, 0x13, 0x0400); -+ udelay(40); -+ tg3_writephy(tp, 0x13, 0x0000); -+ -+ tg3_writephy(tp, 0x11, 0x0a50); -+ udelay(40); -+ tg3_writephy(tp, 0x11, 0x0a10); -+ -+ /* Wait for signal to stabilize */ -+ mdelay(150); -+ -+ /* Deselect the channel register so we can read the PHYID -+ * later. -+ */ -+ tg3_writephy(tp, 0x10, 0x8011); -+ } -+ -+ /* Disable link change interrupt. */ -+ tw32_carefully(MAC_EVENT, 0); -+ -+ current_link_up = 0; -+ if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { -+ if (!(tp->tg3_flags & TG3_FLAG_GOT_SERDES_FLOWCTL)) { -+ struct tg3_fiber_aneginfo aninfo; -+ int status = ANEG_FAILED; -+ unsigned int tick; -+ uint32_t tmp; -+ -+ memset(&aninfo, 0, sizeof(aninfo)); -+ aninfo.flags |= (MR_AN_ENABLE); -+ -+ tw32(MAC_TX_AUTO_NEG, 0); -+ -+ tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; -+ tw32_carefully(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); -+ -+ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); -+ -+ aninfo.state = ANEG_STATE_UNKNOWN; -+ aninfo.cur_time = 0; -+ tick = 0; -+ while (++tick < 195000) { -+ status = tg3_fiber_aneg_smachine(tp, &aninfo); -+ if (status == ANEG_DONE || -+ status == ANEG_FAILED) -+ break; -+ -+ udelay(1); -+ } -+ -+ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ if (status == ANEG_DONE && -+ (aninfo.flags & -+ (MR_AN_COMPLETE | MR_LINK_OK | -+ MR_LP_ADV_FULL_DUPLEX))) { -+ uint32_t local_adv, remote_adv; -+ -+ local_adv = ADVERTISE_PAUSE_CAP; -+ remote_adv = 0; -+ if (aninfo.flags & MR_LP_ADV_SYM_PAUSE) -+ remote_adv |= LPA_PAUSE_CAP; -+ if (aninfo.flags & MR_LP_ADV_ASYM_PAUSE) -+ remote_adv |= LPA_PAUSE_ASYM; -+ -+ tg3_setup_flow_control(tp, local_adv, remote_adv); -+ -+ tp->tg3_flags |= -+ TG3_FLAG_GOT_SERDES_FLOWCTL; -+ current_link_up = 1; -+ } -+ for (i = 0; i < 60; i++) { -+ udelay(20); -+ tw32_carefully(MAC_STATUS, -+ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); -+ if ((tr32(MAC_STATUS) & -+ (MAC_STATUS_SYNC_CHANGED | -+ MAC_STATUS_CFG_CHANGED)) == 0) -+ break; -+ } -+ if (current_link_up == 0 && -+ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { -+ current_link_up = 1; -+ } -+ } else { -+ /* Forcing 1000FD link up. */ -+ current_link_up = 1; -+ } -+ } -+ -+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ tp->hw_status->status = -+ (SD_STATUS_UPDATED | -+ (tp->hw_status->status & ~SD_STATUS_LINK_CHG)); -+ -+ for (i = 0; i < 100; i++) { -+ udelay(20); -+ tw32_carefully(MAC_STATUS, -+ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); -+ if ((tr32(MAC_STATUS) & -+ (MAC_STATUS_SYNC_CHANGED | -+ MAC_STATUS_CFG_CHANGED)) == 0) -+ break; -+ } -+ -+ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) -+ current_link_up = 0; -+ -+ if (current_link_up == 1) { -+ tp->link_config.active_speed = SPEED_1000; -+ tp->link_config.active_duplex = DUPLEX_FULL; -+ } else { -+ tp->link_config.active_speed = SPEED_INVALID; -+ tp->link_config.active_duplex = DUPLEX_INVALID; -+ } -+ -+ if (current_link_up != tp->carrier_ok) { -+ tp->carrier_ok = current_link_up; -+ tg3_link_report(tp); -+ } else { -+ uint32_t now_pause_cfg = -+ tp->tg3_flags & (TG3_FLAG_RX_PAUSE | -+ TG3_FLAG_TX_PAUSE); -+ if (orig_pause_cfg != now_pause_cfg || -+ orig_active_speed != tp->link_config.active_speed || -+ orig_active_duplex != tp->link_config.active_duplex) -+ tg3_link_report(tp); -+ } -+ -+ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) { -+ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY); -+ if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) { -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ } -+ } -+ -+ return 0; -+} -+#else -+#define tg3_setup_fiber_phy(TP) (-EINVAL) -+#endif /* SUPPORT_FIBER_PHY */ -+ -+static int tg3_setup_phy(struct tg3 *tp) -+{ -+ int err; -+ -+ if (tp->phy_id == PHY_ID_SERDES) { -+ err = tg3_setup_fiber_phy(tp); -+ } else { -+ err = tg3_setup_copper_phy(tp); -+ } -+ -+ if (tp->link_config.active_speed == SPEED_1000 && -+ tp->link_config.active_duplex == DUPLEX_HALF) -+ tw32(MAC_TX_LENGTHS, -+ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | -+ (6 << TX_LENGTHS_IPG_SHIFT) | -+ (0xff << TX_LENGTHS_SLOT_TIME_SHIFT))); -+ else -+ tw32(MAC_TX_LENGTHS, -+ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | -+ (6 << TX_LENGTHS_IPG_SHIFT) | -+ (32 << TX_LENGTHS_SLOT_TIME_SHIFT))); -+ -+ return err; -+} -+ -+ -+#define MAX_WAIT_CNT 1000 -+ -+/* To stop a block, clear the enable bit and poll till it -+ * clears. -+ */ -+static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, uint32_t enable_bit) -+{ -+ unsigned int i; -+ uint32_t val; -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { -+ switch(ofs) { -+ case RCVLSC_MODE: -+ case DMAC_MODE: -+ case MBFREE_MODE: -+ case BUFMGR_MODE: -+ case MEMARB_MODE: -+ /* We can't enable/disable these bits of the -+ * 5705, just say success. -+ */ -+ return 0; -+ default: -+ break; -+ } -+ } -+ val = tr32(ofs); -+ val &= ~enable_bit; -+ tw32(ofs, val); -+ tr32(ofs); -+ -+ for (i = 0; i < MAX_WAIT_CNT; i++) { -+ udelay(100); -+ val = tr32(ofs); -+ if ((val & enable_bit) == 0) -+ break; -+ } -+ -+ if (i == MAX_WAIT_CNT) { -+ printf("tg3_stop_block timed out, ofs=%lx enable_bit=%x\n", -+ ofs, enable_bit); -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+static int tg3_abort_hw(struct tg3 *tp) -+{ -+ int i, err; -+ -+ tg3_disable_ints(tp); -+ -+ tp->rx_mode &= ~RX_MODE_ENABLE; -+ tw32_carefully(MAC_RX_MODE, tp->rx_mode); -+ -+ err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE); -+ -+ err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE); -+ err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE); -+ err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE); -+ err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE); -+ if (err) -+ goto out; -+ -+ tp->mac_mode &= ~MAC_MODE_TDE_ENABLE; -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ tp->tx_mode &= ~TX_MODE_ENABLE; -+ tw32_carefully(MAC_TX_MODE, tp->tx_mode); -+ -+ for (i = 0; i < MAX_WAIT_CNT; i++) { -+ udelay(100); -+ if (!(tr32(MAC_TX_MODE) & TX_MODE_ENABLE)) -+ break; -+ } -+ if (i >= MAX_WAIT_CNT) { -+ printf("tg3_abort_hw timed out TX_MODE_ENABLE will not clear MAC_TX_MODE=%x\n", -+ tr32(MAC_TX_MODE)); -+ return -ENODEV; -+ } -+ -+ err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE); -+ err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE); -+ -+ tw32(FTQ_RESET, 0xffffffff); -+ tw32(FTQ_RESET, 0x00000000); -+ -+ err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE); -+ err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE); -+ if (err) -+ goto out; -+ -+ memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE); -+ -+out: -+ return err; -+} -+ -+static void tg3_chip_reset(struct tg3 *tp) -+{ -+ uint32_t val; -+ -+ if (!(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { -+ /* Force NVRAM to settle. -+ * This deals with a chip bug which can result in EEPROM -+ * corruption. -+ */ -+ if (tp->tg3_flags & TG3_FLAG_NVRAM) { -+ int i; -+ -+ tw32(NVRAM_SWARB, SWARB_REQ_SET1); -+ for (i = 0; i < 100000; i++) { -+ if (tr32(NVRAM_SWARB) & SWARB_GNT1) -+ break; -+ udelay(10); -+ } -+ } -+ } -+ /* In Etherboot we don't need to worry about the 5701 -+ * REG_WRITE_BUG because we do all register writes indirectly. -+ */ -+ -+ /* do the reset */ -+ val = GRC_MISC_CFG_CORECLK_RESET; -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) -+ val |= GRC_MISC_CFG_KEEP_GPHY_POWER; -+ tw32(GRC_MISC_CFG, val); -+ -+ /* Flush PCI posted writes. The normal MMIO registers -+ * are inaccessible at this time so this is the only -+ * way to make this reliably. I tried to use indirect -+ * register read/write but this upset some 5701 variants. -+ */ -+ pci_read_config_dword(tp->pdev, PCI_COMMAND, &val); -+ -+ udelay(120); -+ -+ /* Re-enable indirect register accesses. */ -+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, -+ tp->misc_host_ctrl); -+ -+ /* Set MAX PCI retry to zero. */ -+ val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE); -+ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && -+ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) -+ val |= PCISTATE_RETRY_SAME_DMA; -+ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val); -+ -+ pci_restore_state(tp->pdev, tp->pci_cfg_state); -+ -+ /* Make sure PCI-X relaxed ordering bit is clear. */ -+ pci_read_config_dword(tp->pdev, TG3PCI_X_CAPS, &val); -+ val &= ~PCIX_CAPS_RELAXED_ORDERING; -+ pci_write_config_dword(tp->pdev, TG3PCI_X_CAPS, val); -+ -+ tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); -+ -+ if (((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0) && -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { -+ tp->pci_clock_ctrl |= -+ (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE); -+ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); -+ } -+ -+ tw32(TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); -+} -+ -+static void tg3_stop_fw(struct tg3 *tp) -+{ -+ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { -+ uint32_t val; -+ int i; -+ -+ tg3_write_mem(NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); -+ val = tr32(GRC_RX_CPU_EVENT); -+ val |= (1 << 14); -+ tw32(GRC_RX_CPU_EVENT, val); -+ -+ /* Wait for RX cpu to ACK the event. */ -+ for (i = 0; i < 100; i++) { -+ if (!(tr32(GRC_RX_CPU_EVENT) & (1 << 14))) -+ break; -+ udelay(1); -+ } -+ } -+} -+ -+static int tg3_restart_fw(struct tg3 *tp, uint32_t state) -+{ -+ uint32_t val; -+ int i; -+ -+ tg3_write_mem(NIC_SRAM_FIRMWARE_MBOX, -+ NIC_SRAM_FIRMWARE_MBOX_MAGIC1); -+ /* Wait for firmware initialization to complete. */ -+ for (i = 0; i < 100000; i++) { -+ tg3_read_mem(NIC_SRAM_FIRMWARE_MBOX, &val); -+ if (val == (uint32_t) ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) -+ break; -+ udelay(10); -+ } -+ if (i >= 100000 && -+ !(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { -+ printf("Firmware will not restart magic=%x\n", -+ val); -+ return -ENODEV; -+ } -+ if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { -+ state = DRV_STATE_SUSPEND; -+ } -+ tg3_write_mem(NIC_SRAM_FW_DRV_STATE_MBOX, state); -+ return 0; -+} -+ -+static int tg3_halt(struct tg3 *tp) -+{ -+ tg3_stop_fw(tp); -+ tg3_abort_hw(tp); -+ tg3_chip_reset(tp); -+ return tg3_restart_fw(tp, DRV_STATE_UNLOAD); -+} -+ -+static void __tg3_set_mac_addr(struct tg3 *tp) -+{ -+ uint32_t addr_high, addr_low; -+ int i; -+ -+ addr_high = ((tp->nic->node_addr[0] << 8) | -+ tp->nic->node_addr[1]); -+ addr_low = ((tp->nic->node_addr[2] << 24) | -+ (tp->nic->node_addr[3] << 16) | -+ (tp->nic->node_addr[4] << 8) | -+ (tp->nic->node_addr[5] << 0)); -+ for (i = 0; i < 4; i++) { -+ tw32(MAC_ADDR_0_HIGH + (i * 8), addr_high); -+ tw32(MAC_ADDR_0_LOW + (i * 8), addr_low); -+ } -+ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) && -+ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) && -+ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705)) { -+ for(i = 0; i < 12; i++) { -+ tw32(MAC_EXTADDR_0_HIGH + (i * 8), addr_high); -+ tw32(MAC_EXTADDR_0_LOW + (i * 8), addr_low); -+ } -+ } -+ addr_high = (tp->nic->node_addr[0] + -+ tp->nic->node_addr[1] + -+ tp->nic->node_addr[2] + -+ tp->nic->node_addr[3] + -+ tp->nic->node_addr[4] + -+ tp->nic->node_addr[5]) & -+ TX_BACKOFF_SEED_MASK; -+ tw32(MAC_TX_BACKOFF_SEED, addr_high); -+} -+ -+static void tg3_set_bdinfo(struct tg3 *tp, uint32_t bdinfo_addr, -+ dma_addr_t mapping, uint32_t maxlen_flags, -+ uint32_t nic_addr) -+{ -+ tg3_write_mem((bdinfo_addr + -+ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH), -+ ((uint64_t) mapping >> 32)); -+ tg3_write_mem((bdinfo_addr + -+ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW), -+ ((uint64_t) mapping & 0xffffffff)); -+ tg3_write_mem((bdinfo_addr + -+ TG3_BDINFO_MAXLEN_FLAGS), -+ maxlen_flags); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ tg3_write_mem((bdinfo_addr + TG3_BDINFO_NIC_ADDR), nic_addr); -+ } -+} -+ -+ -+static void tg3_init_rings(struct tg3 *tp) -+{ -+ unsigned i; -+ -+ /* Zero out the tg3 variables */ -+ memset(&tg3_bss, 0, sizeof(tg3_bss)); -+ tp->rx_std = &tg3_bss.rx_std[0]; -+ tp->rx_rcb = &tg3_bss.rx_rcb[0]; -+ tp->tx_ring = &tg3_bss.tx_ring[0]; -+ tp->hw_status = &tg3_bss.hw_status; -+ tp->hw_stats = &tg3_bss.hw_stats; -+ tp->mac_mode = 0; -+ -+ -+ /* Initialize tx/rx rings for packet processing. -+ * -+ * The chip has been shut down and the driver detached from -+ * the networking, so no interrupts or new tx packets will -+ * end up in the driver. -+ */ -+ -+ /* Initialize invariants of the rings, we only set this -+ * stuff once. This works because the card does not -+ * write into the rx buffer posting rings. -+ */ -+ for (i = 0; i < TG3_RX_RING_SIZE; i++) { -+ struct tg3_rx_buffer_desc *rxd; -+ -+ rxd = &tp->rx_std[i]; -+ rxd->idx_len = (RX_PKT_BUF_SZ - 2 - 64) << RXD_LEN_SHIFT; -+ rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT); -+ rxd->opaque = (RXD_OPAQUE_RING_STD | (i << RXD_OPAQUE_INDEX_SHIFT)); -+ -+ /* Note where the receive buffer for the ring is placed */ -+ rxd->addr_hi = 0; -+ rxd->addr_lo = virt_to_bus( -+ &tg3_bss.rx_bufs[i%TG3_DEF_RX_RING_PENDING][2]); -+ } -+} -+ -+#define TG3_WRITE_SETTINGS(TABLE) \ -+do { \ -+ const uint32_t *_table, *_end; \ -+ _table = TABLE; \ -+ _end = _table + sizeof(TABLE)/sizeof(TABLE[0]); \ -+ for(; _table < _end; _table += 2) { \ -+ tw32(_table[0], _table[1]); \ -+ } \ -+} while(0) -+ -+ -+/* initialize/reset the tg3 */ -+static int tg3_setup_hw(struct tg3 *tp) -+{ -+ uint32_t val, rdmac_mode; -+ int i, err, limit; -+ -+ /* Simply don't support setups with extremly buggy firmware in etherboot */ -+ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) { -+ printf("Error 5701_A0 firmware bug detected\n"); -+ return -EINVAL; -+ } -+ -+ tg3_disable_ints(tp); -+ -+ /* Originally this was all in tg3_init_hw */ -+ -+ /* Force the chip into D0. */ -+ tg3_set_power_state_0(tp); -+ -+ tg3_switch_clocks(tp); -+ -+ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); -+ -+ -+ /* Originally this was all in tg3_reset_hw */ -+ -+ tg3_stop_fw(tp); -+ -+ /* No need to call tg3_abort_hw here, it is called before tg3_setup_hw. */ -+ -+ tg3_chip_reset(tp); -+ -+ tw32(GRC_MODE, tp->grc_mode); /* Redundant? */ -+ -+ err = tg3_restart_fw(tp, DRV_STATE_START); -+ if (err) -+ return err; -+ -+ if (tp->phy_id == PHY_ID_SERDES) { -+ tp->mac_mode = MAC_MODE_PORT_MODE_TBI; -+ } -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ -+ /* This works around an issue with Athlon chipsets on -+ * B3 tigon3 silicon. This bit has no effect on any -+ * other revision. -+ */ -+ tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT; -+ tw32_carefully(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); -+ -+ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && -+ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) { -+ val = tr32(TG3PCI_PCISTATE); -+ val |= PCISTATE_RETRY_SAME_DMA; -+ tw32(TG3PCI_PCISTATE, val); -+ } -+ -+ /* Descriptor ring init may make accesses to the -+ * NIC SRAM area to setup the TX descriptors, so we -+ * can only do this after the hardware has been -+ * successfully reset. -+ */ -+ tg3_init_rings(tp); -+ -+ /* Clear statistics/status block in chip */ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ for (i = NIC_SRAM_STATS_BLK; -+ i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE; -+ i += sizeof(uint32_t)) { -+ tg3_write_mem(i, 0); -+ udelay(40); -+ } -+ } -+ -+ /* This value is determined during the probe time DMA -+ * engine test, tg3_setup_dma. -+ */ -+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); -+ -+ tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS | -+ GRC_MODE_4X_NIC_SEND_RINGS | -+ GRC_MODE_NO_TX_PHDR_CSUM | -+ GRC_MODE_NO_RX_PHDR_CSUM); -+ tp->grc_mode |= GRC_MODE_HOST_SENDBDS; -+ tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM; -+ tp->grc_mode |= GRC_MODE_NO_RX_PHDR_CSUM; -+ -+ tw32(GRC_MODE, -+ tp->grc_mode | -+ (GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP)); -+ -+ /* Setup the timer prescalar register. Clock is always 66Mhz. */ -+ tw32(GRC_MISC_CFG, -+ (65 << GRC_MISC_CFG_PRESCALAR_SHIFT)); -+ -+ /* Initialize MBUF/DESC pool. */ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ tw32(BUFMGR_MB_POOL_ADDR, NIC_SRAM_MBUF_POOL_BASE); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) -+ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE64); -+ else -+ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE96); -+ tw32(BUFMGR_DMA_DESC_POOL_ADDR, NIC_SRAM_DMA_DESC_POOL_BASE); -+ tw32(BUFMGR_DMA_DESC_POOL_SIZE, NIC_SRAM_DMA_DESC_POOL_SIZE); -+ } -+ if (!(tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE)) { -+ tw32(BUFMGR_MB_RDMA_LOW_WATER, -+ tp->bufmgr_config.mbuf_read_dma_low_water); -+ tw32(BUFMGR_MB_MACRX_LOW_WATER, -+ tp->bufmgr_config.mbuf_mac_rx_low_water); -+ tw32(BUFMGR_MB_HIGH_WATER, -+ tp->bufmgr_config.mbuf_high_water); -+ } else { -+ tw32(BUFMGR_MB_RDMA_LOW_WATER, -+ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo); -+ tw32(BUFMGR_MB_MACRX_LOW_WATER, -+ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo); -+ tw32(BUFMGR_MB_HIGH_WATER, -+ tp->bufmgr_config.mbuf_high_water_jumbo); -+ } -+ tw32(BUFMGR_DMA_LOW_WATER, -+ tp->bufmgr_config.dma_low_water); -+ tw32(BUFMGR_DMA_HIGH_WATER, -+ tp->bufmgr_config.dma_high_water); -+ -+ tw32(BUFMGR_MODE, BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE); -+ for (i = 0; i < 2000; i++) { -+ if (tr32(BUFMGR_MODE) & BUFMGR_MODE_ENABLE) -+ break; -+ udelay(10); -+ } -+ if (i >= 2000) { -+ printf("tg3_setup_hw cannot enable BUFMGR\n"); -+ return -ENODEV; -+ } -+ -+ tw32(FTQ_RESET, 0xffffffff); -+ tw32(FTQ_RESET, 0x00000000); -+ for (i = 0; i < 2000; i++) { -+ if (tr32(FTQ_RESET) == 0x00000000) -+ break; -+ udelay(10); -+ } -+ if (i >= 2000) { -+ printf("tg3_setup_hw cannot reset FTQ\n"); -+ return -ENODEV; -+ } -+ -+ /* Initialize TG3_BDINFO's at: -+ * RCVDBDI_STD_BD: standard eth size rx ring -+ * RCVDBDI_JUMBO_BD: jumbo frame rx ring -+ * RCVDBDI_MINI_BD: small frame rx ring (??? does not work) -+ * -+ * like so: -+ * TG3_BDINFO_HOST_ADDR: high/low parts of DMA address of ring -+ * TG3_BDINFO_MAXLEN_FLAGS: (rx max buffer size << 16) | -+ * ring attribute flags -+ * TG3_BDINFO_NIC_ADDR: location of descriptors in nic SRAM -+ * -+ * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries. -+ * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries. -+ * -+ * ??? No space allocated for mini receive ring? :( -+ * -+ * The size of each ring is fixed in the firmware, but the location is -+ * configurable. -+ */ -+ { -+ static const uint32_t table_all[] = { -+ /* Setup replenish thresholds. */ -+ RCVBDI_STD_THRESH, TG3_DEF_RX_RING_PENDING / 8, -+ -+ /* Etherboot lives below 4GB */ -+ RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, -+ RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, NIC_SRAM_RX_BUFFER_DESC, -+ }; -+ static const uint32_t table_not_5705[] = { -+ /* Buffer maximum length */ -+ RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, RX_STD_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT, -+ -+ /* Disable the mini frame rx ring */ -+ RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, -+ -+ /* Disable the jumbo frame rx ring */ -+ RCVBDI_JUMBO_THRESH, 0, -+ RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, -+ -+ -+ }; -+ TG3_WRITE_SETTINGS(table_all); -+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, -+ virt_to_bus(tp->rx_std)); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { -+ tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, -+ RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT); -+ } else { -+ TG3_WRITE_SETTINGS(table_not_5705); -+ } -+ } -+ -+ -+ /* There is only one send ring on 5705, no need to explicitly -+ * disable the others. -+ */ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ /* Clear out send RCB ring in SRAM. */ -+ for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += TG3_BDINFO_SIZE) -+ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED); -+ } -+ -+ tp->tx_prod = 0; -+ tw32_mailbox(MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); -+ tw32_mailbox2(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); -+ -+ tg3_set_bdinfo(tp, -+ NIC_SRAM_SEND_RCB, -+ virt_to_bus(tp->tx_ring), -+ (TG3_TX_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), -+ NIC_SRAM_TX_BUFFER_DESC); -+ -+ /* There is only one receive return ring on 5705, no need to explicitly -+ * disable the others. -+ */ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK; i += TG3_BDINFO_SIZE) { -+ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, -+ BDINFO_FLAGS_DISABLED); -+ } -+ } -+ -+ tp->rx_rcb_ptr = 0; -+ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, 0); -+ -+ tg3_set_bdinfo(tp, -+ NIC_SRAM_RCV_RET_RCB, -+ virt_to_bus(tp->rx_rcb), -+ (TG3_RX_RCB_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), -+ 0); -+ -+ tp->rx_std_ptr = TG3_DEF_RX_RING_PENDING; -+ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, -+ tp->rx_std_ptr); -+ -+ tw32_mailbox2(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, 0); -+ -+ /* Initialize MAC address and backoff seed. */ -+ __tg3_set_mac_addr(tp); -+ -+ /* Calculate RDMAC_MODE setting early, we need it to determine -+ * the RCVLPC_STATE_ENABLE mask. -+ */ -+ rdmac_mode = (RDMAC_MODE_ENABLE | RDMAC_MODE_TGTABORT_ENAB | -+ RDMAC_MODE_MSTABORT_ENAB | RDMAC_MODE_PARITYERR_ENAB | -+ RDMAC_MODE_ADDROFLOW_ENAB | RDMAC_MODE_FIFOOFLOW_ENAB | -+ RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB | -+ RDMAC_MODE_LNGREAD_ENAB); -+ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) -+ rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE; -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { -+ if (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) { -+ if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) && -+ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { -+ rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST; -+ } -+ } -+ } -+ -+ /* Setup host coalescing engine. */ -+ tw32(HOSTCC_MODE, 0); -+ for (i = 0; i < 2000; i++) { -+ if (!(tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE)) -+ break; -+ udelay(10); -+ } -+ -+ tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | -+ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; -+ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR); -+ -+ tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM; -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) -+ tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | -+ GRC_LCLCTRL_GPIO_OUTPUT1); -+ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); -+ -+ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0); -+ tr32(MAILBOX_INTERRUPT_0); -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ tw32_carefully(DMAC_MODE, DMAC_MODE_ENABLE); -+ } -+ -+ val = ( WDMAC_MODE_ENABLE | WDMAC_MODE_TGTABORT_ENAB | -+ WDMAC_MODE_MSTABORT_ENAB | WDMAC_MODE_PARITYERR_ENAB | -+ WDMAC_MODE_ADDROFLOW_ENAB | WDMAC_MODE_FIFOOFLOW_ENAB | -+ WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB | -+ WDMAC_MODE_LNGREAD_ENAB); -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && -+ ((tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) != 0) && -+ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { -+ val |= WDMAC_MODE_RX_ACCEL; -+ } -+ tw32_carefully(WDMAC_MODE, val); -+ -+ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) { -+ val = tr32(TG3PCI_X_CAPS); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { -+ val &= PCIX_CAPS_BURST_MASK; -+ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); -+ } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { -+ val &= ~(PCIX_CAPS_SPLIT_MASK | PCIX_CAPS_BURST_MASK); -+ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); -+ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) -+ val |= (tp->split_mode_max_reqs << -+ PCIX_CAPS_SPLIT_SHIFT); -+ } -+ tw32(TG3PCI_X_CAPS, val); -+ } -+ -+ tw32_carefully(RDMAC_MODE, rdmac_mode); -+ { -+ static const uint32_t table_all[] = { -+ /* MTU + ethernet header + FCS + optional VLAN tag */ -+ MAC_RX_MTU_SIZE, ETH_MAX_MTU + ETH_HLEN + 8, -+ -+ /* The slot time is changed by tg3_setup_phy if we -+ * run at gigabit with half duplex. -+ */ -+ MAC_TX_LENGTHS, -+ (2 << TX_LENGTHS_IPG_CRS_SHIFT) | -+ (6 << TX_LENGTHS_IPG_SHIFT) | -+ (32 << TX_LENGTHS_SLOT_TIME_SHIFT), -+ -+ /* Receive rules. */ -+ MAC_RCV_RULE_CFG, RCV_RULE_CFG_DEFAULT_CLASS, -+ RCVLPC_CONFIG, 0x0181, -+ -+ /* Receive/send statistics. */ -+ RCVLPC_STATS_ENABLE, 0xffffff, -+ RCVLPC_STATSCTRL, RCVLPC_STATSCTRL_ENABLE, -+ SNDDATAI_STATSENAB, 0xffffff, -+ SNDDATAI_STATSCTRL, (SNDDATAI_SCTRL_ENABLE |SNDDATAI_SCTRL_FASTUPD), -+ -+ /* Host coalescing engine */ -+ HOSTCC_RXCOL_TICKS, 0, -+ HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS, -+ HOSTCC_RXMAX_FRAMES, 1, -+ HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES, -+ HOSTCC_RXCOAL_MAXF_INT, 1, -+ HOSTCC_TXCOAL_MAXF_INT, 0, -+ -+ /* Status/statistics block address. */ -+ /* Etherboot lives below 4GB, so HIGH == 0 */ -+ HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, -+ -+ /* No need to enable 32byte coalesce mode. */ -+ HOSTCC_MODE, HOSTCC_MODE_ENABLE | 0, -+ -+ RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE, -+ RCVLPC_MODE, RCVLPC_MODE_ENABLE, -+ -+ RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE, -+ -+ SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, -+ SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE, -+ RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB, -+ RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ, -+ SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, -+ SNDBDI_MODE, SNDBDI_MODE_ENABLE | SNDBDI_MODE_ATTN_ENABLE, -+ SNDBDS_MODE, SNDBDS_MODE_ENABLE | SNDBDS_MODE_ATTN_ENABLE, -+ -+ /* Accept all multicast frames. */ -+ MAC_HASH_REG_0, 0xffffffff, -+ MAC_HASH_REG_1, 0xffffffff, -+ MAC_HASH_REG_2, 0xffffffff, -+ MAC_HASH_REG_3, 0xffffffff, -+ }; -+ static const uint32_t table_not_5705[] = { -+ /* Host coalescing engine */ -+ HOSTCC_RXCOAL_TICK_INT, 0, -+ HOSTCC_TXCOAL_TICK_INT, 0, -+ -+ /* Status/statistics block address. */ -+ /* Etherboot lives below 4GB, so HIGH == 0 */ -+ HOSTCC_STAT_COAL_TICKS, DEFAULT_STAT_COAL_TICKS, -+ HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, -+ HOSTCC_STATS_BLK_NIC_ADDR, NIC_SRAM_STATS_BLK, -+ HOSTCC_STATUS_BLK_NIC_ADDR, NIC_SRAM_STATUS_BLK, -+ -+ RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE, -+ -+ MBFREE_MODE, MBFREE_MODE_ENABLE, -+ }; -+ TG3_WRITE_SETTINGS(table_all); -+ tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, -+ virt_to_bus(tp->hw_stats)); -+ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, -+ virt_to_bus(tp->hw_status)); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { -+ TG3_WRITE_SETTINGS(table_not_5705); -+ } -+ } -+ -+ tp->tx_mode = TX_MODE_ENABLE; -+ tw32_carefully(MAC_TX_MODE, tp->tx_mode); -+ -+ tp->rx_mode = RX_MODE_ENABLE; -+ tw32_carefully(MAC_RX_MODE, tp->rx_mode); -+ -+ tp->mi_mode = MAC_MI_MODE_BASE; -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ -+ tw32(MAC_LED_CTRL, 0); -+ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB); -+ if (tp->phy_id == PHY_ID_SERDES) { -+ tw32_carefully(MAC_RX_MODE, RX_MODE_RESET); -+ } -+ tp->rx_mode |= RX_MODE_KEEP_VLAN_TAG; /* drop tagged vlan packets */ -+ tw32_carefully(MAC_RX_MODE, tp->rx_mode); -+ -+ if (tp->pci_chip_rev_id == CHIPREV_ID_5703_A1) -+ tw32(MAC_SERDES_CFG, 0x616000); -+ -+ /* Prevent chip from dropping frames when flow control -+ * is enabled. -+ */ -+ tw32(MAC_LOW_WMARK_MAX_RX_FRAME, 2); -+ tr32(MAC_LOW_WMARK_MAX_RX_FRAME); -+ -+ err = tg3_setup_phy(tp); -+ -+ /* Ignore CRC stats */ -+ -+ /* Initialize receive rules. */ -+ tw32(MAC_RCV_RULE_0, 0xc2000000 & RCV_RULE_DISABLE_MASK); -+ tw32(MAC_RCV_VALUE_0, 0xffffffff & RCV_RULE_DISABLE_MASK); -+ tw32(MAC_RCV_RULE_1, 0x86000004 & RCV_RULE_DISABLE_MASK); -+ tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK); -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) -+ limit = 8; -+ else -+ limit = 16; -+ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) -+ limit -= 4; -+ switch (limit) { -+ case 16: tw32(MAC_RCV_RULE_15, 0); tw32(MAC_RCV_VALUE_15, 0); -+ case 15: tw32(MAC_RCV_RULE_14, 0); tw32(MAC_RCV_VALUE_14, 0); -+ case 14: tw32(MAC_RCV_RULE_13, 0); tw32(MAC_RCV_VALUE_13, 0); -+ case 13: tw32(MAC_RCV_RULE_12, 0); tw32(MAC_RCV_VALUE_12, 0); -+ case 12: tw32(MAC_RCV_RULE_11, 0); tw32(MAC_RCV_VALUE_11, 0); -+ case 11: tw32(MAC_RCV_RULE_10, 0); tw32(MAC_RCV_VALUE_10, 0); -+ case 10: tw32(MAC_RCV_RULE_9, 0); tw32(MAC_RCV_VALUE_9, 0); -+ case 9: tw32(MAC_RCV_RULE_8, 0); tw32(MAC_RCV_VALUE_8, 0); -+ case 8: tw32(MAC_RCV_RULE_7, 0); tw32(MAC_RCV_VALUE_7, 0); -+ case 7: tw32(MAC_RCV_RULE_6, 0); tw32(MAC_RCV_VALUE_6, 0); -+ case 6: tw32(MAC_RCV_RULE_5, 0); tw32(MAC_RCV_VALUE_5, 0); -+ case 5: tw32(MAC_RCV_RULE_4, 0); tw32(MAC_RCV_VALUE_4, 0); -+ case 4: /* tw32(MAC_RCV_RULE_3, 0); tw32(MAC_RCV_VALUE_3, 0); */ -+ case 3: /* tw32(MAC_RCV_RULE_2, 0); tw32(MAC_RCV_VALUE_2, 0); */ -+ case 2: -+ case 1: -+ default: -+ break; -+ }; -+ -+ return err; -+} -+ -+ -+ -+/* Chips other than 5700/5701 use the NVRAM for fetching info. */ -+static void tg3_nvram_init(struct tg3 *tp) -+{ -+ tw32(GRC_EEPROM_ADDR, -+ (EEPROM_ADDR_FSM_RESET | -+ (EEPROM_DEFAULT_CLOCK_PERIOD << -+ EEPROM_ADDR_CLKPERD_SHIFT))); -+ -+ mdelay(1); -+ -+ /* Enable seeprom accesses. */ -+ tw32_carefully(GRC_LOCAL_CTRL, -+ tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM); -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 && -+ GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { -+ uint32_t nvcfg1 = tr32(NVRAM_CFG1); -+ -+ tp->tg3_flags |= TG3_FLAG_NVRAM; -+ if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) { -+ if (nvcfg1 & NVRAM_CFG1_BUFFERED_MODE) -+ tp->tg3_flags |= TG3_FLAG_NVRAM_BUFFERED; -+ } else { -+ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS; -+ tw32(NVRAM_CFG1, nvcfg1); -+ } -+ -+ } else { -+ tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED); -+ } -+} -+ -+ -+static int tg3_nvram_read_using_eeprom( -+ struct tg3 *tp __unused, uint32_t offset, uint32_t *val) -+{ -+ uint32_t tmp; -+ int i; -+ -+ if (offset > EEPROM_ADDR_ADDR_MASK || -+ (offset % 4) != 0) { -+ return -EINVAL; -+ } -+ -+ tmp = tr32(GRC_EEPROM_ADDR) & ~(EEPROM_ADDR_ADDR_MASK | -+ EEPROM_ADDR_DEVID_MASK | -+ EEPROM_ADDR_READ); -+ tw32(GRC_EEPROM_ADDR, -+ tmp | -+ (0 << EEPROM_ADDR_DEVID_SHIFT) | -+ ((offset << EEPROM_ADDR_ADDR_SHIFT) & -+ EEPROM_ADDR_ADDR_MASK) | -+ EEPROM_ADDR_READ | EEPROM_ADDR_START); -+ -+ for (i = 0; i < 10000; i++) { -+ tmp = tr32(GRC_EEPROM_ADDR); -+ -+ if (tmp & EEPROM_ADDR_COMPLETE) -+ break; -+ udelay(100); -+ } -+ if (!(tmp & EEPROM_ADDR_COMPLETE)) { -+ return -EBUSY; -+ } -+ -+ *val = tr32(GRC_EEPROM_DATA); -+ return 0; -+} -+ -+static int tg3_nvram_read(struct tg3 *tp, uint32_t offset, uint32_t *val) -+{ -+ int i, saw_done_clear; -+ -+ if (!(tp->tg3_flags & TG3_FLAG_NVRAM)) -+ return tg3_nvram_read_using_eeprom(tp, offset, val); -+ -+ if (tp->tg3_flags & TG3_FLAG_NVRAM_BUFFERED) -+ offset = ((offset / NVRAM_BUFFERED_PAGE_SIZE) << -+ NVRAM_BUFFERED_PAGE_POS) + -+ (offset % NVRAM_BUFFERED_PAGE_SIZE); -+ -+ if (offset > NVRAM_ADDR_MSK) -+ return -EINVAL; -+ -+ tw32(NVRAM_SWARB, SWARB_REQ_SET1); -+ for (i = 0; i < 1000; i++) { -+ if (tr32(NVRAM_SWARB) & SWARB_GNT1) -+ break; -+ udelay(20); -+ } -+ -+ tw32(NVRAM_ADDR, offset); -+ tw32(NVRAM_CMD, -+ NVRAM_CMD_RD | NVRAM_CMD_GO | -+ NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_DONE); -+ -+ /* Wait for done bit to clear then set again. */ -+ saw_done_clear = 0; -+ for (i = 0; i < 1000; i++) { -+ udelay(10); -+ if (!saw_done_clear && -+ !(tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) -+ saw_done_clear = 1; -+ else if (saw_done_clear && -+ (tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) -+ break; -+ } -+ if (i >= 1000) { -+ tw32(NVRAM_SWARB, SWARB_REQ_CLR1); -+ return -EBUSY; -+ } -+ -+ *val = bswap_32(tr32(NVRAM_RDDATA)); -+ tw32(NVRAM_SWARB, 0x20); -+ -+ return 0; -+} -+ -+struct subsys_tbl_ent { -+ uint16_t subsys_vendor, subsys_devid; -+ uint32_t phy_id; -+}; -+ -+static struct subsys_tbl_ent subsys_id_to_phy_id[] = { -+ /* Broadcom boards. */ -+ { 0x14e4, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */ -+ { 0x14e4, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */ -+ { 0x14e4, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */ -+ { 0x14e4, 0x0003, PHY_ID_SERDES }, /* BCM95700A9 */ -+ { 0x14e4, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */ -+ { 0x14e4, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */ -+ { 0x14e4, 0x0007, PHY_ID_SERDES }, /* BCM95701A7 */ -+ { 0x14e4, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */ -+ { 0x14e4, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */ -+ { 0x14e4, 0x0009, PHY_ID_BCM5701 }, /* BCM95703Ax1 */ -+ { 0x14e4, 0x8009, PHY_ID_BCM5701 }, /* BCM95703Ax2 */ -+ -+ /* 3com boards. */ -+ { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */ -+ { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */ -+ /* { PCI_VENDOR_ID_3COM, 0x1002, PHY_ID_XXX }, 3C996CT */ -+ /* { PCI_VENDOR_ID_3COM, 0x1003, PHY_ID_XXX }, 3C997T */ -+ { PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES }, /* 3C996SX */ -+ /* { PCI_VENDOR_ID_3COM, 0x1005, PHY_ID_XXX }, 3C997SZ */ -+ { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */ -+ { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */ -+ -+ /* DELL boards. */ -+ { PCI_VENDOR_ID_DELL, 0x00d1, PHY_ID_BCM5401 }, /* VIPER */ -+ { PCI_VENDOR_ID_DELL, 0x0106, PHY_ID_BCM5401 }, /* JAGUAR */ -+ { PCI_VENDOR_ID_DELL, 0x0109, PHY_ID_BCM5411 }, /* MERLOT */ -+ { PCI_VENDOR_ID_DELL, 0x010a, PHY_ID_BCM5411 }, /* SLIM_MERLOT */ -+ -+ /* Compaq boards. */ -+ { PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */ -+ { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */ -+ { PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES }, /* CHANGELING */ -+ { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */ -+ { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 } /* NC7780_2 */ -+}; -+ -+static int tg3_phy_probe(struct tg3 *tp) -+{ -+ uint32_t eeprom_phy_id, hw_phy_id_1, hw_phy_id_2; -+ uint32_t hw_phy_id, hw_phy_id_masked; -+ enum phy_led_mode eeprom_led_mode; -+ uint32_t val; -+ unsigned i; -+ int eeprom_signature_found, err; -+ -+ tp->phy_id = PHY_ID_INVALID; -+ -+ for (i = 0; i < sizeof(subsys_id_to_phy_id)/sizeof(subsys_id_to_phy_id[0]); i++) { -+ if ((subsys_id_to_phy_id[i].subsys_vendor == tp->subsystem_vendor) && -+ (subsys_id_to_phy_id[i].subsys_devid == tp->subsystem_device)) { -+ tp->phy_id = subsys_id_to_phy_id[i].phy_id; -+ break; -+ } -+ } -+ -+ eeprom_phy_id = PHY_ID_INVALID; -+ eeprom_led_mode = led_mode_auto; -+ eeprom_signature_found = 0; -+ tg3_read_mem(NIC_SRAM_DATA_SIG, &val); -+ if (val == NIC_SRAM_DATA_SIG_MAGIC) { -+ uint32_t nic_cfg; -+ -+ tg3_read_mem(NIC_SRAM_DATA_CFG, &nic_cfg); -+ tp->nic_sram_data_cfg = nic_cfg; -+ -+ eeprom_signature_found = 1; -+ -+ if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) == -+ NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) { -+ eeprom_phy_id = PHY_ID_SERDES; -+ } else { -+ uint32_t nic_phy_id; -+ -+ tg3_read_mem(NIC_SRAM_DATA_PHY_ID, &nic_phy_id); -+ if (nic_phy_id != 0) { -+ uint32_t id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK; -+ uint32_t id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK; -+ -+ eeprom_phy_id = (id1 >> 16) << 10; -+ eeprom_phy_id |= (id2 & 0xfc00) << 16; -+ eeprom_phy_id |= (id2 & 0x03ff) << 0; -+ } -+ } -+ -+ switch (nic_cfg & NIC_SRAM_DATA_CFG_LED_MODE_MASK) { -+ case NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD: -+ eeprom_led_mode = led_mode_three_link; -+ break; -+ -+ case NIC_SRAM_DATA_CFG_LED_LINK_SPD: -+ eeprom_led_mode = led_mode_link10; -+ break; -+ -+ default: -+ eeprom_led_mode = led_mode_auto; -+ break; -+ }; -+ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) && -+ (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP)) { -+ tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; -+ } -+ -+ if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) -+ tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; -+ if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL) -+ tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP; -+ } -+ -+ /* Now read the physical PHY_ID from the chip and verify -+ * that it is sane. If it doesn't look good, we fall back -+ * to either the hard-coded table based PHY_ID and failing -+ * that the value found in the eeprom area. -+ */ -+ err = tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1); -+ err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2); -+ -+ hw_phy_id = (hw_phy_id_1 & 0xffff) << 10; -+ hw_phy_id |= (hw_phy_id_2 & 0xfc00) << 16; -+ hw_phy_id |= (hw_phy_id_2 & 0x03ff) << 0; -+ -+ hw_phy_id_masked = hw_phy_id & PHY_ID_MASK; -+ -+ if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) { -+ tp->phy_id = hw_phy_id; -+ } else { -+ /* phy_id currently holds the value found in the -+ * subsys_id_to_phy_id[] table or PHY_ID_INVALID -+ * if a match was not found there. -+ */ -+ if (tp->phy_id == PHY_ID_INVALID) { -+ if (!eeprom_signature_found || -+ !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK)) -+ return -ENODEV; -+ tp->phy_id = eeprom_phy_id; -+ } -+ } -+ -+ err = tg3_phy_reset(tp); -+ if (err) -+ return err; -+ -+ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || -+ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { -+ uint32_t mii_tg3_ctrl; -+ -+ /* These chips, when reset, only advertise 10Mb -+ * capabilities. Fix that. -+ */ -+ err = tg3_writephy(tp, MII_ADVERTISE, -+ (ADVERTISE_CSMA | -+ ADVERTISE_PAUSE_CAP | -+ ADVERTISE_10HALF | -+ ADVERTISE_10FULL | -+ ADVERTISE_100HALF | -+ ADVERTISE_100FULL)); -+ mii_tg3_ctrl = (MII_TG3_CTRL_ADV_1000_HALF | -+ MII_TG3_CTRL_ADV_1000_FULL | -+ MII_TG3_CTRL_AS_MASTER | -+ MII_TG3_CTRL_ENABLE_AS_MASTER); -+ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) -+ mii_tg3_ctrl = 0; -+ -+ err |= tg3_writephy(tp, MII_TG3_CTRL, mii_tg3_ctrl); -+ err |= tg3_writephy(tp, MII_BMCR, -+ (BMCR_ANRESTART | BMCR_ANENABLE)); -+ } -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { -+ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); -+ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f); -+ tg3_writedsp(tp, MII_TG3_DSP_RW_PORT, 0x2aaa); -+ } -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { -+ tg3_writephy(tp, 0x1c, 0x8d68); -+ tg3_writephy(tp, 0x1c, 0x8d68); -+ } -+ -+ /* Enable Ethernet@WireSpeed */ -+ tg3_phy_set_wirespeed(tp); -+ -+ if (!err && ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401)) { -+ err = tg3_init_5401phy_dsp(tp); -+ } -+ -+ /* Determine the PHY led mode. -+ * Be careful if this gets set wrong it can result in an inability to -+ * establish a link. -+ */ -+ if (tp->phy_id == PHY_ID_SERDES) { -+ tp->led_mode = led_mode_three_link; -+ } -+ else if (tp->subsystem_vendor == PCI_VENDOR_ID_DELL) { -+ tp->led_mode = led_mode_link10; -+ } else { -+ tp->led_mode = led_mode_three_link; -+ if (eeprom_signature_found && -+ eeprom_led_mode != led_mode_auto) -+ tp->led_mode = eeprom_led_mode; -+ } -+ -+ if (tp->phy_id == PHY_ID_SERDES) -+ tp->link_config.advertising = -+ (ADVERTISED_1000baseT_Half | -+ ADVERTISED_1000baseT_Full | -+ ADVERTISED_Autoneg | -+ ADVERTISED_FIBRE); -+ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) -+ tp->link_config.advertising &= -+ ~(ADVERTISED_1000baseT_Half | -+ ADVERTISED_1000baseT_Full); -+ -+ return err; -+} -+ -+#if SUPPORT_PARTNO_STR -+static void tg3_read_partno(struct tg3 *tp) -+{ -+ unsigned char vpd_data[256]; -+ int i; -+ -+ for (i = 0; i < 256; i += 4) { -+ uint32_t tmp; -+ -+ if (tg3_nvram_read(tp, 0x100 + i, &tmp)) -+ goto out_not_found; -+ -+ vpd_data[i + 0] = ((tmp >> 0) & 0xff); -+ vpd_data[i + 1] = ((tmp >> 8) & 0xff); -+ vpd_data[i + 2] = ((tmp >> 16) & 0xff); -+ vpd_data[i + 3] = ((tmp >> 24) & 0xff); -+ } -+ -+ /* Now parse and find the part number. */ -+ for (i = 0; i < 256; ) { -+ unsigned char val = vpd_data[i]; -+ int block_end; -+ -+ if (val == 0x82 || val == 0x91) { -+ i = (i + 3 + -+ (vpd_data[i + 1] + -+ (vpd_data[i + 2] << 8))); -+ continue; -+ } -+ -+ if (val != 0x90) -+ goto out_not_found; -+ -+ block_end = (i + 3 + -+ (vpd_data[i + 1] + -+ (vpd_data[i + 2] << 8))); -+ i += 3; -+ while (i < block_end) { -+ if (vpd_data[i + 0] == 'P' && -+ vpd_data[i + 1] == 'N') { -+ int partno_len = vpd_data[i + 2]; -+ -+ if (partno_len > 24) -+ goto out_not_found; -+ -+ memcpy(tp->board_part_number, -+ &vpd_data[i + 3], -+ partno_len); -+ -+ /* Success. */ -+ return; -+ } -+ } -+ -+ /* Part number not found. */ -+ goto out_not_found; -+ } -+ -+out_not_found: -+ memcpy(tp->board_part_number, "none", sizeof("none")); -+} -+#else -+#define tg3_read_partno(TP) ((TP)->board_part_number[0] = '\0') -+#endif -+ -+static int tg3_get_invariants(struct tg3 *tp) -+{ -+ uint32_t misc_ctrl_reg; -+ uint32_t pci_state_reg, grc_misc_cfg; -+ uint16_t pci_cmd; -+ uint8_t pci_latency; -+ int err; -+ -+ /* Read the subsystem vendor and device ids */ -+ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_VENDOR_ID, &tp->subsystem_vendor); -+ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_ID, &tp->subsystem_device); -+ -+ /* The sun_5704 code needs infrastructure etherboot does have -+ * ignore it for now. -+ */ -+ -+ /* If we have an AMD 762 or Intel ICH/ICH0 chipset, write -+ * reordering to the mailbox registers done by the host -+ * controller can cause major troubles. We read back from -+ * every mailbox register write to force the writes to be -+ * posted to the chip in order. -+ * -+ * TG3_FLAG_MBOX_WRITE_REORDER has been forced on. -+ */ -+ -+ /* Force memory write invalidate off. If we leave it on, -+ * then on 5700_BX chips we have to enable a workaround. -+ * The workaround is to set the TG3PCI_DMA_RW_CTRL boundry -+ * to match the cacheline size. The Broadcom driver have this -+ * workaround but turns MWI off all the times so never uses -+ * it. This seems to suggest that the workaround is insufficient. -+ */ -+ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); -+ pci_cmd &= ~PCI_COMMAND_INVALIDATE; -+ /* Also, force SERR#/PERR# in PCI command. */ -+ pci_cmd |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; -+ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); -+ -+ /* It is absolutely critical that TG3PCI_MISC_HOST_CTRL -+ * has the register indirect write enable bit set before -+ * we try to access any of the MMIO registers. It is also -+ * critical that the PCI-X hw workaround situation is decided -+ * before that as well. -+ */ -+ pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, &misc_ctrl_reg); -+ -+ tp->pci_chip_rev_id = (misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT); -+ -+ /* Initialize misc host control in PCI block. */ -+ tp->misc_host_ctrl |= (misc_ctrl_reg & -+ MISC_HOST_CTRL_CHIPREV); -+ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, -+ tp->misc_host_ctrl); -+ -+ pci_read_config_byte(tp->pdev, PCI_LATENCY_TIMER, &pci_latency); -+ if (pci_latency < 64) { -+ pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER, 64); -+ } -+ -+ pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, &pci_state_reg); -+ -+ /* If this is a 5700 BX chipset, and we are in PCI-X -+ * mode, enable register write workaround. -+ * -+ * The workaround is to use indirect register accesses -+ * for all chip writes not to mailbox registers. -+ * -+ * In etherboot to simplify things we just always use this work around. -+ */ -+ if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0) { -+ tp->tg3_flags |= TG3_FLAG_PCIX_MODE; -+ } -+ /* Back to back register writes can cause problems on the 5701, -+ * the workaround is to read back all reg writes except those to -+ * mailbox regs. -+ * In etherboot we always use indirect register accesses so -+ * we don't see this. -+ */ -+ -+ if ((pci_state_reg & PCISTATE_BUS_SPEED_HIGH) != 0) -+ tp->tg3_flags |= TG3_FLAG_PCI_HIGH_SPEED; -+ if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0) -+ tp->tg3_flags |= TG3_FLAG_PCI_32BIT; -+ -+ /* Chip-specific fixup from Broadcom driver */ -+ if ((tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) && -+ (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) { -+ pci_state_reg |= PCISTATE_RETRY_SAME_DMA; -+ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg); -+ } -+ -+ /* Force the chip into D0. */ -+ tg3_set_power_state_0(tp); -+ -+ /* Etherboot does not ask the tg3 to do checksums */ -+ /* Etherboot does not ask the tg3 to do jumbo frames */ -+ /* Ehterboot does not ask the tg3 to use WakeOnLan. */ -+ -+ /* A few boards don't want Ethernet@WireSpeed phy feature */ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) || -+ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && -+ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) && -+ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1))) { -+ tp->tg3_flags2 |= TG3_FLG2_NO_ETH_WIRE_SPEED; -+ } -+ -+ /* Avoid tagged irq status etherboot does not use irqs */ -+ -+ /* Only 5701 and later support tagged irq status mode. -+ * Also, 5788 chips cannot use tagged irq status. -+ * -+ * However, since etherboot does not use irqs avoid tagged irqs -+ * status because the interrupt condition is more difficult to -+ * fully clear in that mode. -+ */ -+ -+ /* Since some 5700_AX && 5700_BX have problems with 32BYTE -+ * coalesce_mode, and the rest work fine anything set. -+ * Don't enable HOST_CC_MODE_32BYTE in etherboot. -+ */ -+ -+ /* Initialize MAC MI mode, polling disabled. */ -+ tw32_carefully(MAC_MI_MODE, tp->mi_mode); -+ -+ /* Initialize data/descriptor byte/word swapping. */ -+ tw32(GRC_MODE, tp->grc_mode); -+ -+ tg3_switch_clocks(tp); -+ -+ /* Clear this out for sanity. */ -+ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); -+ -+ /* Etherboot does not need to check if the PCIX_TARGET_HWBUG -+ * is needed. It always uses it. -+ */ -+ -+ udelay(50); -+ tg3_nvram_init(tp); -+ -+ /* The TX descriptors will reside in main memory. -+ */ -+ -+ /* See which board we are using. -+ */ -+ grc_misc_cfg = tr32(GRC_MISC_CFG); -+ grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK; -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && -+ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) { -+ tp->tg3_flags |= TG3_FLAG_SPLIT_MODE; -+ tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ; -+ } -+ -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && -+ (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 || -+ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M)) -+ tp->tg3_flags2 |= TG3_FLG2_IS_5788; -+ -+ /* these are limited to 10/100 only */ -+ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) && -+ ((grc_misc_cfg == 0x8000) || (grc_misc_cfg == 0x4000))) || -+ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && -+ (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM) && -+ ((tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901) || -+ (tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901_2)))) { -+ tp->tg3_flags |= TG3_FLAG_10_100_ONLY; -+ } -+ -+ err = tg3_phy_probe(tp); -+ if (err) { -+ printf("phy probe failed, err %d\n", err); -+ } -+ -+ tg3_read_partno(tp); -+ -+ -+ /* 5700 BX chips need to have their TX producer index mailboxes -+ * written twice to workaround a bug. -+ * In etherboot we do this unconditionally to simplify things. -+ */ -+ -+ /* 5700 chips can get confused if TX buffers straddle the -+ * 4GB address boundary in some cases. -+ * -+ * In etherboot we can ignore the problem as etherboot lives below 4GB. -+ */ -+ -+ /* In etherboot wake-on-lan is unconditionally disabled */ -+ return err; -+} -+ -+static int tg3_get_device_address(struct tg3 *tp) -+{ -+ struct nic *nic = tp->nic; -+ uint32_t hi, lo, mac_offset; -+ -+ if (PCI_FUNC(tp->pdev->devfn) == 0) -+ mac_offset = 0x7c; -+ else -+ mac_offset = 0xcc; -+ -+ /* First try to get it from MAC address mailbox. */ -+ tg3_read_mem(NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi); -+ if ((hi >> 16) == 0x484b) { -+ nic->node_addr[0] = (hi >> 8) & 0xff; -+ nic->node_addr[1] = (hi >> 0) & 0xff; -+ -+ tg3_read_mem(NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo); -+ nic->node_addr[2] = (lo >> 24) & 0xff; -+ nic->node_addr[3] = (lo >> 16) & 0xff; -+ nic->node_addr[4] = (lo >> 8) & 0xff; -+ nic->node_addr[5] = (lo >> 0) & 0xff; -+ } -+ /* Next, try NVRAM. */ -+ else if (!tg3_nvram_read(tp, mac_offset + 0, &hi) && -+ !tg3_nvram_read(tp, mac_offset + 4, &lo)) { -+ nic->node_addr[0] = ((hi >> 16) & 0xff); -+ nic->node_addr[1] = ((hi >> 24) & 0xff); -+ nic->node_addr[2] = ((lo >> 0) & 0xff); -+ nic->node_addr[3] = ((lo >> 8) & 0xff); -+ nic->node_addr[4] = ((lo >> 16) & 0xff); -+ nic->node_addr[5] = ((lo >> 24) & 0xff); -+ } -+ /* Finally just fetch it out of the MAC control regs. */ -+ else { -+ hi = tr32(MAC_ADDR_0_HIGH); -+ lo = tr32(MAC_ADDR_0_LOW); -+ -+ nic->node_addr[5] = lo & 0xff; -+ nic->node_addr[4] = (lo >> 8) & 0xff; -+ nic->node_addr[3] = (lo >> 16) & 0xff; -+ nic->node_addr[2] = (lo >> 24) & 0xff; -+ nic->node_addr[1] = hi & 0xff; -+ nic->node_addr[0] = (hi >> 8) & 0xff; -+ } -+ -+ return 0; -+} -+ -+ -+static int tg3_setup_dma(struct tg3 *tp) -+{ -+ tw32(TG3PCI_CLOCK_CTRL, 0); -+ -+ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) == 0) { -+ tp->dma_rwctrl = -+ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | -+ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | -+ (0x7 << DMA_RWCTRL_WRITE_WATER_SHIFT) | -+ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | -+ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { -+ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); -+ } -+ } else { -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) -+ tp->dma_rwctrl = -+ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | -+ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | -+ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | -+ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | -+ (0x00 << DMA_RWCTRL_MIN_DMA_SHIFT); -+ else -+ tp->dma_rwctrl = -+ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | -+ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | -+ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | -+ (0x3 << DMA_RWCTRL_READ_WATER_SHIFT) | -+ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); -+ -+ /* Wheee, some more chip bugs... */ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { -+ uint32_t ccval = tr32(TG3PCI_CLOCK_CTRL) & 0x1f; -+ -+ if ((ccval == 0x6) || (ccval == 0x7)) { -+ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; -+ } -+ } -+ } -+ -+ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || -+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { -+ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); -+ } -+ -+ tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE; -+ -+ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); -+ -+ return 0; -+} -+ -+static void tg3_init_link_config(struct tg3 *tp) -+{ -+ tp->link_config.advertising = -+ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | -+ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | -+ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | -+ ADVERTISED_Autoneg | ADVERTISED_MII); -+ tp->carrier_ok = 0; -+ tp->link_config.active_speed = SPEED_INVALID; -+ tp->link_config.active_duplex = DUPLEX_INVALID; -+} -+ -+ -+#if SUPPORT_PHY_STR -+static const char * tg3_phy_string(struct tg3 *tp) -+{ -+ switch (tp->phy_id & PHY_ID_MASK) { -+ case PHY_ID_BCM5400: return "5400"; -+ case PHY_ID_BCM5401: return "5401"; -+ case PHY_ID_BCM5411: return "5411"; -+ case PHY_ID_BCM5701: return "5701"; -+ case PHY_ID_BCM5703: return "5703"; -+ case PHY_ID_BCM5704: return "5704"; -+ case PHY_ID_BCM8002: return "8002"; -+ case PHY_ID_SERDES: return "serdes"; -+ default: return "unknown"; -+ }; -+} -+#else -+#define tg3_phy_string(TP) "?" -+#endif -+ -+ -+static void tg3_poll_link(struct tg3 *tp) -+{ -+ uint32_t mac_stat; -+ -+ mac_stat = tr32(MAC_STATUS); -+ if (tp->phy_id == PHY_ID_SERDES) { -+ if (tp->carrier_ok? -+ (mac_stat & MAC_STATUS_LNKSTATE_CHANGED): -+ (mac_stat & MAC_STATUS_PCS_SYNCED)) { -+ tw32_carefully(MAC_MODE, tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK); -+ tw32_carefully(MAC_MODE, tp->mac_mode); -+ -+ tg3_setup_phy(tp); -+ } -+ } -+ else { -+ if (mac_stat & MAC_STATUS_LNKSTATE_CHANGED) { -+ tg3_setup_phy(tp); -+ } -+ } -+} -+ -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static void tg3_ack_irqs(struct tg3 *tp) -+{ -+ if (tp->hw_status->status & SD_STATUS_UPDATED) { -+ /* -+ * writing any value to intr-mbox-0 clears PCI INTA# and -+ * chip-internal interrupt pending events. -+ * writing non-zero to intr-mbox-0 additional tells the -+ * NIC to stop sending us irqs, engaging "in-intr-handler" -+ * event coalescing. -+ */ -+ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, -+ 0x00000001); -+ /* -+ * Flush PCI write. This also guarantees that our -+ * status block has been flushed to host memory. -+ */ -+ tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW); -+ tp->hw_status->status &= ~SD_STATUS_UPDATED; -+ } -+} -+ -+static int tg3_poll(struct nic *nic, int retrieve) -+{ -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ -+ struct tg3 *tp = &tg3; -+ int result; -+ -+ result = 0; -+ -+ if ( (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) && !retrieve ) -+ return 1; -+ -+ tg3_ack_irqs(tp); -+ -+ if (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) { -+ struct tg3_rx_buffer_desc *desc; -+ unsigned int len; -+ desc = &tp->rx_rcb[tp->rx_rcb_ptr]; -+ if ((desc->opaque & RXD_OPAQUE_RING_MASK) == RXD_OPAQUE_RING_STD) { -+ len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */ -+ -+ nic->packetlen = len; -+ memcpy(nic->packet, bus_to_virt(desc->addr_lo), len); -+ result = 1; -+ } -+ tp->rx_rcb_ptr = (tp->rx_rcb_ptr + 1) % TG3_RX_RCB_RING_SIZE; -+ -+ /* ACK the status ring */ -+ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, tp->rx_rcb_ptr); -+ -+ /* Refill RX ring. */ -+ if (result) { -+ tp->rx_std_ptr = (tp->rx_std_ptr + 1) % TG3_RX_RING_SIZE; -+ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, tp->rx_std_ptr); -+ } -+ } -+ tg3_poll_link(tp); -+ return result; -+} -+ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+#if 0 -+static void tg3_set_txd(struct tg3 *tp, int entry, -+ dma_addr_t mapping, int len, uint32_t flags, -+ uint32_t mss_and_is_end) -+{ -+ struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry]; -+ int is_end = (mss_and_is_end & 0x1); -+ if (is_end) { -+ flags |= TXD_FLAG_END; -+ } -+ -+ txd->addr_hi = 0; -+ txd->addr_lo = mapping & 0xffffffff; -+ txd->len_flags = (len << TXD_LEN_SHIFT) | flags; -+ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; -+} -+#endif -+ -+static void tg3_transmit(struct nic *nic, const char *dst_addr, -+ unsigned int type, unsigned int size, const char *packet) -+{ -+ static struct eth_frame { -+ uint8_t dst_addr[ETH_ALEN]; -+ uint8_t src_addr[ETH_ALEN]; -+ uint16_t type; -+ uint8_t data [ETH_FRAME_LEN - ETH_HLEN]; -+ } frame[2]; -+ static int frame_idx; -+ -+ /* send the packet to destination */ -+ struct tg3_tx_buffer_desc *txd; -+ struct tg3 *tp; -+ uint32_t entry; -+ int i; -+ -+ /* Wait until there is a free packet frame */ -+ tp = &tg3; -+ i = 0; -+ entry = tp->tx_prod; -+ while((tp->hw_status->idx[0].tx_consumer != entry) && -+ (tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) { -+ mdelay(10); /* give the nick a chance */ -+ poll_interruptions(); -+ if (++i > 500) { /* timeout 5s for transmit */ -+ printf("transmit timed out\n"); -+ tg3_halt(tp); -+ tg3_setup_hw(tp); -+ return; -+ } -+ } -+ if (i != 0) { -+ printf("#"); -+ } -+ -+ /* Copy the packet to the our local buffer */ -+ memcpy(&frame[frame_idx].dst_addr, dst_addr, ETH_ALEN); -+ memcpy(&frame[frame_idx].src_addr, nic->node_addr, ETH_ALEN); -+ frame[frame_idx].type = htons(type); -+ memset(&frame[frame_idx].data, 0, sizeof(frame[frame_idx].data)); -+ memcpy(&frame[frame_idx].data, packet, size); -+ -+ /* Setup the ring buffer entry to transmit */ -+ txd = &tp->tx_ring[entry]; -+ txd->addr_hi = 0; /* Etherboot runs under 4GB */ -+ txd->addr_lo = virt_to_bus(&frame[frame_idx]); -+ txd->len_flags = ((size + ETH_HLEN) << TXD_LEN_SHIFT) | TXD_FLAG_END; -+ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; -+ -+ /* Advance to the next entry */ -+ entry = NEXT_TX(entry); -+ frame_idx ^= 1; -+ -+ /* Packets are ready, update Tx producer idx local and on card */ -+ tw32_mailbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); -+ tw32_mailbox2((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); -+ tp->tx_prod = entry; -+} -+ -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+static void tg3_disable(struct dev *dev __unused) -+{ -+ struct tg3 *tp = &tg3; -+ /* put the card in its initial state */ -+ /* This function serves 3 purposes. -+ * This disables DMA and interrupts so we don't receive -+ * unexpected packets or interrupts from the card after -+ * etherboot has finished. -+ * This frees resources so etherboot may use -+ * this driver on another interface -+ * This allows etherboot to reinitialize the interface -+ * if something is something goes wrong. -+ */ -+ tg3_halt(tp); -+ tp->tg3_flags &= ~(TG3_FLAG_INIT_COMPLETE|TG3_FLAG_GOT_SERDES_FLOWCTL); -+ tp->carrier_ok = 0; -+ iounmap((void *)tp->regs); -+} -+ -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+You should omit the last argument struct pci_device * for a non-PCI NIC -+***************************************************************************/ -+static int tg3_probe(struct dev *dev, struct pci_device *pdev) -+{ -+ struct nic *nic = (struct nic *)dev; -+ struct tg3 *tp = &tg3; -+ unsigned long tg3reg_base, tg3reg_len; -+ int i, err, pm_cap; -+ -+ if (pdev == 0) -+ return 0; -+ -+ memset(tp, 0, sizeof(*tp)); -+ -+ adjust_pci_device(pdev); -+ -+ nic->irqno = 0; -+ nic->ioaddr = pdev->ioaddr & ~3; -+ -+ /* Find power-management capability. */ -+ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); -+ if (pm_cap == 0) { -+ printf("Cannot find PowerManagement capability, aborting.\n"); -+ return 0; -+ } -+ tg3reg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_0); -+ if (tg3reg_base == -1UL) { -+ printf("Unuseable bar\n"); -+ return 0; -+ } -+ tg3reg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0); -+ -+ tp->pdev = pdev; -+ tp->nic = nic; -+ tp->pm_cap = pm_cap; -+ tp->rx_mode = 0; -+ tp->tx_mode = 0; -+ tp->mi_mode = MAC_MI_MODE_BASE; -+ tp->tg3_flags = 0 & ~TG3_FLAG_INIT_COMPLETE; -+ -+ /* The word/byte swap controls here control register access byte -+ * swapping. DMA data byte swapping is controlled in the GRC_MODE -+ * setting below. -+ */ -+ tp->misc_host_ctrl = -+ MISC_HOST_CTRL_MASK_PCI_INT | -+ MISC_HOST_CTRL_WORD_SWAP | -+ MISC_HOST_CTRL_INDIR_ACCESS | -+ MISC_HOST_CTRL_PCISTATE_RW; -+ -+ /* The NONFRM (non-frame) byte/word swap controls take effect -+ * on descriptor entries, anything which isn't packet data. -+ * -+ * The StrongARM chips on the board (one for tx, one for rx) -+ * are running in big-endian mode. -+ */ -+ tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA | -+ GRC_MODE_WSWAP_NONFRM_DATA); -+#if __BYTE_ORDER == __BIG_ENDIAN -+ tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; -+#endif -+ tp->regs = (unsigned long) ioremap(tg3reg_base, tg3reg_len); -+ if (tp->regs == 0UL) { -+ printf("Cannot map device registers, aborting\n"); -+ return 0; -+ } -+ -+ tg3_init_link_config(tp); -+ -+ err = tg3_get_invariants(tp); -+ if (err) { -+ printf("Problem fetching invariants of chip, aborting.\n"); -+ goto err_out_iounmap; -+ } -+ -+ err = tg3_get_device_address(tp); -+ if (err) { -+ printf("Could not obtain valid ethernet address, aborting.\n"); -+ goto err_out_iounmap; -+ } -+ printf("Ethernet addr: %!\n", nic->node_addr); -+ -+ tg3_setup_dma(tp); -+ -+ /* Now that we have fully setup the chip, save away a snapshot -+ * of the PCI config space. We need to restore this after -+ * GRC_MISC_CFG core clock resets and some resume events. -+ */ -+ pci_save_state(tp->pdev, tp->pci_cfg_state); -+ -+ printf("Tigon3 [partno(%s) rev %hx PHY(%s)] (PCI%s:%s:%s)\n", -+ tp->board_part_number, -+ tp->pci_chip_rev_id, -+ tg3_phy_string(tp), -+ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "X" : ""), -+ ((tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) ? -+ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "133MHz" : "66MHz") : -+ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "100MHz" : "33MHz")), -+ ((tp->tg3_flags & TG3_FLAG_PCI_32BIT) ? "32-bit" : "64-bit")); -+ -+ -+ err = tg3_setup_hw(tp); -+ if (err) { -+ goto err_out_disable; -+ } -+ tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; -+ -+ /* Wait for a reasonable time for the link to come up */ -+ tg3_poll_link(tp); -+ for(i = 0; !tp->carrier_ok && (i < VALID_LINK_TIMEOUT*100); i++) { -+ mdelay(1); -+ tg3_poll_link(tp); -+ } -+ if (!tp->carrier_ok){ -+ printf("Valid link not established\n"); -+ goto err_out_disable; -+ } -+ -+ dev->disable = tg3_disable; -+ nic->poll = tg3_poll; -+ nic->transmit = tg3_transmit; -+ nic->irq = tg3_irq; -+ -+ return 1; -+ -+ err_out_iounmap: -+ iounmap((void *)tp->regs); -+ return 0; -+ err_out_disable: -+ tg3_disable(dev); -+ return 0; -+} -+ -+static struct pci_id tg3_nics[] = { -+PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"), -+PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"), -+PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"), -+PCI_ROM(0x14e4, 0x1647, "tg3-5703", "Broadcom Tigon 3 5703"), -+PCI_ROM(0x14e4, 0x1648, "tg3-5704", "Broadcom Tigon 3 5704"), -+PCI_ROM(0x14e4, 0x164d, "tg3-5702FE", "Broadcom Tigon 3 5702FE"), -+PCI_ROM(0x14e4, 0x1653, "tg3-5705", "Broadcom Tigon 3 5705"), -+PCI_ROM(0x14e4, 0x1654, "tg3-5705_2", "Broadcom Tigon 3 5705_2"), -+PCI_ROM(0x14e4, 0x165d, "tg3-5705M", "Broadcom Tigon 3 5705M"), -+PCI_ROM(0x14e4, 0x165e, "tg3-5705M_2", "Broadcom Tigon 3 5705M_2"), -+PCI_ROM(0x14e4, 0x1696, "tg3-5782", "Broadcom Tigon 3 5782"), -+PCI_ROM(0x14e4, 0x169c, "tg3-5788", "Broadcom Tigon 3 5788"), -+PCI_ROM(0x14e4, 0x16a6, "tg3-5702X", "Broadcom Tigon 3 5702X"), -+PCI_ROM(0x14e4, 0x16a7, "tg3-5703X", "Broadcom Tigon 3 5703X"), -+PCI_ROM(0x14e4, 0x16a8, "tg3-5704S", "Broadcom Tigon 3 5704S"), -+PCI_ROM(0x14e4, 0x16c6, "tg3-5702A3", "Broadcom Tigon 3 5702A3"), -+PCI_ROM(0x14e4, 0x16c7, "tg3-5703A3", "Broadcom Tigon 3 5703A3"), -+PCI_ROM(0x14e4, 0x170d, "tg3-5901", "Broadcom Tigon 3 5901"), -+PCI_ROM(0x14e4, 0x170e, "tg3-5901_2", "Broadcom Tigon 3 5901_2"), -+PCI_ROM(0x1148, 0x4400, "tg3-9DXX", "Syskonnect 9DXX"), -+PCI_ROM(0x1148, 0x4500, "tg3-9MXX", "Syskonnect 9MXX"), -+PCI_ROM(0x173b, 0x03e8, "tg3-ac1000", "Altima AC1000"), -+PCI_ROM(0x173b, 0x03e9, "tg3-ac1001", "Altima AC1001"), -+PCI_ROM(0x173b, 0x03ea, "tg3-ac9100", "Altima AC9100"), -+PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), -+}; -+ -+struct pci_driver tg3_driver = { -+ .type = NIC_DRIVER, -+ .name = "TG3", -+ .probe = tg3_probe, -+ .ids = tg3_nics, -+ .id_count = sizeof(tg3_nics)/sizeof(tg3_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/tg3.h -=================================================================== ---- /dev/null -+++ b/netboot/tg3.h -@@ -0,0 +1,2203 @@ -+/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ -+ * tg3.h: Definitions for Broadcom Tigon3 ethernet driver. -+ * -+ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) -+ * Copyright (C) 2001 Jeff Garzik (jgarzik@mandrakesoft.com) -+ */ -+ -+#ifndef _T3_H -+#define _T3_H -+ -+#include "stdint.h" -+ -+typedef unsigned long dma_addr_t; -+ -+/* From mii.h */ -+ -+/* Indicates what features are advertised by the interface. */ -+#define ADVERTISED_10baseT_Half (1 << 0) -+#define ADVERTISED_10baseT_Full (1 << 1) -+#define ADVERTISED_100baseT_Half (1 << 2) -+#define ADVERTISED_100baseT_Full (1 << 3) -+#define ADVERTISED_1000baseT_Half (1 << 4) -+#define ADVERTISED_1000baseT_Full (1 << 5) -+#define ADVERTISED_Autoneg (1 << 6) -+#define ADVERTISED_TP (1 << 7) -+#define ADVERTISED_AUI (1 << 8) -+#define ADVERTISED_MII (1 << 9) -+#define ADVERTISED_FIBRE (1 << 10) -+#define ADVERTISED_BNC (1 << 11) -+ -+/* The following are all involved in forcing a particular link -+ * mode for the device for setting things. When getting the -+ * devices settings, these indicate the current mode and whether -+ * it was foced up into this mode or autonegotiated. -+ */ -+ -+/* The forced speed, 10Mb, 100Mb, gigabit. */ -+#define SPEED_10 0 -+#define SPEED_100 1 -+#define SPEED_1000 2 -+#define SPEED_INVALID 3 -+ -+ -+/* Duplex, half or full. */ -+#define DUPLEX_HALF 0x00 -+#define DUPLEX_FULL 0x01 -+#define DUPLEX_INVALID 0x02 -+ -+/* Which connector port. */ -+#define PORT_TP 0x00 -+#define PORT_AUI 0x01 -+#define PORT_MII 0x02 -+#define PORT_FIBRE 0x03 -+#define PORT_BNC 0x04 -+ -+/* Which tranceiver to use. */ -+#define XCVR_INTERNAL 0x00 -+#define XCVR_EXTERNAL 0x01 -+#define XCVR_DUMMY1 0x02 -+#define XCVR_DUMMY2 0x03 -+#define XCVR_DUMMY3 0x04 -+ -+/* Enable or disable autonegotiation. If this is set to enable, -+ * the forced link modes above are completely ignored. -+ */ -+#define AUTONEG_DISABLE 0x00 -+#define AUTONEG_ENABLE 0x01 -+ -+/* Wake-On-Lan options. */ -+#define WAKE_PHY (1 << 0) -+#define WAKE_UCAST (1 << 1) -+#define WAKE_MCAST (1 << 2) -+#define WAKE_BCAST (1 << 3) -+#define WAKE_ARP (1 << 4) -+#define WAKE_MAGIC (1 << 5) -+#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ -+ -+/* Generic MII registers. */ -+ -+#define MII_BMCR 0x00 /* Basic mode control register */ -+#define MII_BMSR 0x01 /* Basic mode status register */ -+#define MII_PHYSID1 0x02 /* PHYS ID 1 */ -+#define MII_PHYSID2 0x03 /* PHYS ID 2 */ -+#define MII_ADVERTISE 0x04 /* Advertisement control reg */ -+#define MII_LPA 0x05 /* Link partner ability reg */ -+#define MII_EXPANSION 0x06 /* Expansion register */ -+#define MII_DCOUNTER 0x12 /* Disconnect counter */ -+#define MII_FCSCOUNTER 0x13 /* False carrier counter */ -+#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ -+#define MII_RERRCOUNTER 0x15 /* Receive error counter */ -+#define MII_SREVISION 0x16 /* Silicon revision */ -+#define MII_RESV1 0x17 /* Reserved... */ -+#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ -+#define MII_PHYADDR 0x19 /* PHY address */ -+#define MII_RESV2 0x1a /* Reserved... */ -+#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ -+#define MII_NCONFIG 0x1c /* Network interface config */ -+ -+/* Basic mode control register. */ -+#define BMCR_RESV 0x007f /* Unused... */ -+#define BMCR_CTST 0x0080 /* Collision test */ -+#define BMCR_FULLDPLX 0x0100 /* Full duplex */ -+#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ -+#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ -+#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ -+#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ -+#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ -+#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ -+#define BMCR_RESET 0x8000 /* Reset the DP83840 */ -+ -+/* Basic mode status register. */ -+#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ -+#define BMSR_JCD 0x0002 /* Jabber detected */ -+#define BMSR_LSTATUS 0x0004 /* Link status */ -+#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ -+#define BMSR_RFAULT 0x0010 /* Remote fault detected */ -+#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ -+#define BMSR_RESV 0x07c0 /* Unused... */ -+#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ -+#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ -+#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ -+#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ -+#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ -+ -+/* Advertisement control register. */ -+#define ADVERTISE_SLCT 0x001f /* Selector bits */ -+#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ -+#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ -+#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ -+#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ -+#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ -+#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ -+#define ADVERTISE_RESV 0x1c00 /* Unused... */ -+#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ -+#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ -+#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ -+ -+#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ -+ ADVERTISE_CSMA) -+#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ -+ ADVERTISE_100HALF | ADVERTISE_100FULL) -+ -+/* Link partner ability register. */ -+#define LPA_SLCT 0x001f /* Same as advertise selector */ -+#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ -+#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ -+#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ -+#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ -+#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ -+#define LPA_RESV 0x1c00 /* Unused... */ -+#define LPA_RFAULT 0x2000 /* Link partner faulted */ -+#define LPA_LPACK 0x4000 /* Link partner acked us */ -+#define LPA_NPAGE 0x8000 /* Next page bit */ -+ -+#define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) -+#define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) -+ -+/* Expansion register for auto-negotiation. */ -+#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ -+#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ -+#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ -+#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ -+#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ -+#define EXPANSION_RESV 0xffe0 /* Unused... */ -+ -+/* N-way test register. */ -+#define NWAYTEST_RESV1 0x00ff /* Unused... */ -+#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ -+#define NWAYTEST_RESV2 0xfe00 /* Unused... */ -+ -+ -+/* From tg3.h */ -+ -+#define TG3_64BIT_REG_HIGH 0x00UL -+#define TG3_64BIT_REG_LOW 0x04UL -+ -+/* Descriptor block info. */ -+#define TG3_BDINFO_HOST_ADDR 0x0UL /* 64-bit */ -+#define TG3_BDINFO_MAXLEN_FLAGS 0x8UL /* 32-bit */ -+#define BDINFO_FLAGS_USE_EXT_RECV 0x00000001 /* ext rx_buffer_desc */ -+#define BDINFO_FLAGS_DISABLED 0x00000002 -+#define BDINFO_FLAGS_MAXLEN_MASK 0xffff0000 -+#define BDINFO_FLAGS_MAXLEN_SHIFT 16 -+#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */ -+#define TG3_BDINFO_SIZE 0x10UL -+ -+#define RX_COPY_THRESHOLD 256 -+ -+#define RX_STD_MAX_SIZE 1536 -+#define RX_STD_MAX_SIZE_5705 512 -+#define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ -+ -+/* First 256 bytes are a mirror of PCI config space. */ -+#define TG3PCI_VENDOR 0x00000000 -+#define TG3PCI_VENDOR_BROADCOM 0x14e4 -+#define TG3PCI_DEVICE 0x00000002 -+#define TG3PCI_DEVICE_TIGON3_1 0x1644 /* BCM5700 */ -+#define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */ -+#define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */ -+#define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */ -+#define TG3PCI_COMMAND 0x00000004 -+#define TG3PCI_STATUS 0x00000006 -+#define TG3PCI_CCREVID 0x00000008 -+#define TG3PCI_CACHELINESZ 0x0000000c -+#define TG3PCI_LATTIMER 0x0000000d -+#define TG3PCI_HEADERTYPE 0x0000000e -+#define TG3PCI_BIST 0x0000000f -+#define TG3PCI_BASE0_LOW 0x00000010 -+#define TG3PCI_BASE0_HIGH 0x00000014 -+/* 0x18 --> 0x2c unused */ -+#define TG3PCI_SUBSYSVENID 0x0000002c -+#define TG3PCI_SUBSYSID 0x0000002e -+#define TG3PCI_ROMADDR 0x00000030 -+#define TG3PCI_CAPLIST 0x00000034 -+/* 0x35 --> 0x3c unused */ -+#define TG3PCI_IRQ_LINE 0x0000003c -+#define TG3PCI_IRQ_PIN 0x0000003d -+#define TG3PCI_MIN_GNT 0x0000003e -+#define TG3PCI_MAX_LAT 0x0000003f -+#define TG3PCI_X_CAPS 0x00000040 -+#define PCIX_CAPS_RELAXED_ORDERING 0x00020000 -+#define PCIX_CAPS_SPLIT_MASK 0x00700000 -+#define PCIX_CAPS_SPLIT_SHIFT 20 -+#define PCIX_CAPS_BURST_MASK 0x000c0000 -+#define PCIX_CAPS_BURST_SHIFT 18 -+#define PCIX_CAPS_MAX_BURST_CPIOB 2 -+#define TG3PCI_PM_CAP_PTR 0x00000041 -+#define TG3PCI_X_COMMAND 0x00000042 -+#define TG3PCI_X_STATUS 0x00000044 -+#define TG3PCI_PM_CAP_ID 0x00000048 -+#define TG3PCI_VPD_CAP_PTR 0x00000049 -+#define TG3PCI_PM_CAPS 0x0000004a -+#define TG3PCI_PM_CTRL_STAT 0x0000004c -+#define TG3PCI_BR_SUPP_EXT 0x0000004e -+#define TG3PCI_PM_DATA 0x0000004f -+#define TG3PCI_VPD_CAP_ID 0x00000050 -+#define TG3PCI_MSI_CAP_PTR 0x00000051 -+#define TG3PCI_VPD_ADDR_FLAG 0x00000052 -+#define VPD_ADDR_FLAG_WRITE 0x00008000 -+#define TG3PCI_VPD_DATA 0x00000054 -+#define TG3PCI_MSI_CAP_ID 0x00000058 -+#define TG3PCI_NXT_CAP_PTR 0x00000059 -+#define TG3PCI_MSI_CTRL 0x0000005a -+#define TG3PCI_MSI_ADDR_LOW 0x0000005c -+#define TG3PCI_MSI_ADDR_HIGH 0x00000060 -+#define TG3PCI_MSI_DATA 0x00000064 -+/* 0x66 --> 0x68 unused */ -+#define TG3PCI_MISC_HOST_CTRL 0x00000068 -+#define MISC_HOST_CTRL_CLEAR_INT 0x00000001 -+#define MISC_HOST_CTRL_MASK_PCI_INT 0x00000002 -+#define MISC_HOST_CTRL_BYTE_SWAP 0x00000004 -+#define MISC_HOST_CTRL_WORD_SWAP 0x00000008 -+#define MISC_HOST_CTRL_PCISTATE_RW 0x00000010 -+#define MISC_HOST_CTRL_CLKREG_RW 0x00000020 -+#define MISC_HOST_CTRL_REGWORD_SWAP 0x00000040 -+#define MISC_HOST_CTRL_INDIR_ACCESS 0x00000080 -+#define MISC_HOST_CTRL_IRQ_MASK_MODE 0x00000100 -+#define MISC_HOST_CTRL_TAGGED_STATUS 0x00000200 -+#define MISC_HOST_CTRL_CHIPREV 0xffff0000 -+#define MISC_HOST_CTRL_CHIPREV_SHIFT 16 -+#define GET_CHIP_REV_ID(MISC_HOST_CTRL) \ -+ (((MISC_HOST_CTRL) & MISC_HOST_CTRL_CHIPREV) >> \ -+ MISC_HOST_CTRL_CHIPREV_SHIFT) -+#define CHIPREV_ID_5700_A0 0x7000 -+#define CHIPREV_ID_5700_A1 0x7001 -+#define CHIPREV_ID_5700_B0 0x7100 -+#define CHIPREV_ID_5700_B1 0x7101 -+#define CHIPREV_ID_5700_B3 0x7102 -+#define CHIPREV_ID_5700_ALTIMA 0x7104 -+#define CHIPREV_ID_5700_C0 0x7200 -+#define CHIPREV_ID_5701_A0 0x0000 -+#define CHIPREV_ID_5701_B0 0x0100 -+#define CHIPREV_ID_5701_B2 0x0102 -+#define CHIPREV_ID_5701_B5 0x0105 -+#define CHIPREV_ID_5703_A0 0x1000 -+#define CHIPREV_ID_5703_A1 0x1001 -+#define CHIPREV_ID_5703_A2 0x1002 -+#define CHIPREV_ID_5703_A3 0x1003 -+#define CHIPREV_ID_5704_A0 0x2000 -+#define CHIPREV_ID_5704_A1 0x2001 -+#define CHIPREV_ID_5704_A2 0x2002 -+#define CHIPREV_ID_5705_A0 0x3000 -+#define CHIPREV_ID_5705_A1 0x3001 -+#define CHIPREV_ID_5705_A2 0x3002 -+#define CHIPREV_ID_5705_A3 0x3003 -+#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) -+#define ASIC_REV_5700 0x07 -+#define ASIC_REV_5701 0x00 -+#define ASIC_REV_5703 0x01 -+#define ASIC_REV_5704 0x02 -+#define ASIC_REV_5705 0x03 -+#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) -+#define CHIPREV_5700_AX 0x70 -+#define CHIPREV_5700_BX 0x71 -+#define CHIPREV_5700_CX 0x72 -+#define CHIPREV_5701_AX 0x00 -+#define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) -+#define METAL_REV_A0 0x00 -+#define METAL_REV_A1 0x01 -+#define METAL_REV_B0 0x00 -+#define METAL_REV_B1 0x01 -+#define METAL_REV_B2 0x02 -+#define TG3PCI_DMA_RW_CTRL 0x0000006c -+#define DMA_RWCTRL_MIN_DMA 0x000000ff -+#define DMA_RWCTRL_MIN_DMA_SHIFT 0 -+#define DMA_RWCTRL_READ_BNDRY_MASK 0x00000700 -+#define DMA_RWCTRL_READ_BNDRY_DISAB 0x00000000 -+#define DMA_RWCTRL_READ_BNDRY_16 0x00000100 -+#define DMA_RWCTRL_READ_BNDRY_32 0x00000200 -+#define DMA_RWCTRL_READ_BNDRY_64 0x00000300 -+#define DMA_RWCTRL_READ_BNDRY_128 0x00000400 -+#define DMA_RWCTRL_READ_BNDRY_256 0x00000500 -+#define DMA_RWCTRL_READ_BNDRY_512 0x00000600 -+#define DMA_RWCTRL_READ_BNDRY_1024 0x00000700 -+#define DMA_RWCTRL_WRITE_BNDRY_MASK 0x00003800 -+#define DMA_RWCTRL_WRITE_BNDRY_DISAB 0x00000000 -+#define DMA_RWCTRL_WRITE_BNDRY_16 0x00000800 -+#define DMA_RWCTRL_WRITE_BNDRY_32 0x00001000 -+#define DMA_RWCTRL_WRITE_BNDRY_64 0x00001800 -+#define DMA_RWCTRL_WRITE_BNDRY_128 0x00002000 -+#define DMA_RWCTRL_WRITE_BNDRY_256 0x00002800 -+#define DMA_RWCTRL_WRITE_BNDRY_512 0x00003000 -+#define DMA_RWCTRL_WRITE_BNDRY_1024 0x00003800 -+#define DMA_RWCTRL_ONE_DMA 0x00004000 -+#define DMA_RWCTRL_READ_WATER 0x00070000 -+#define DMA_RWCTRL_READ_WATER_SHIFT 16 -+#define DMA_RWCTRL_WRITE_WATER 0x00380000 -+#define DMA_RWCTRL_WRITE_WATER_SHIFT 19 -+#define DMA_RWCTRL_USE_MEM_READ_MULT 0x00400000 -+#define DMA_RWCTRL_ASSERT_ALL_BE 0x00800000 -+#define DMA_RWCTRL_PCI_READ_CMD 0x0f000000 -+#define DMA_RWCTRL_PCI_READ_CMD_SHIFT 24 -+#define DMA_RWCTRL_PCI_WRITE_CMD 0xf0000000 -+#define DMA_RWCTRL_PCI_WRITE_CMD_SHIFT 28 -+#define TG3PCI_PCISTATE 0x00000070 -+#define PCISTATE_FORCE_RESET 0x00000001 -+#define PCISTATE_INT_NOT_ACTIVE 0x00000002 -+#define PCISTATE_CONV_PCI_MODE 0x00000004 -+#define PCISTATE_BUS_SPEED_HIGH 0x00000008 -+#define PCISTATE_BUS_32BIT 0x00000010 -+#define PCISTATE_ROM_ENABLE 0x00000020 -+#define PCISTATE_ROM_RETRY_ENABLE 0x00000040 -+#define PCISTATE_FLAT_VIEW 0x00000100 -+#define PCISTATE_RETRY_SAME_DMA 0x00002000 -+#define TG3PCI_CLOCK_CTRL 0x00000074 -+#define CLOCK_CTRL_CORECLK_DISABLE 0x00000200 -+#define CLOCK_CTRL_RXCLK_DISABLE 0x00000400 -+#define CLOCK_CTRL_TXCLK_DISABLE 0x00000800 -+#define CLOCK_CTRL_ALTCLK 0x00001000 -+#define CLOCK_CTRL_PWRDOWN_PLL133 0x00008000 -+#define CLOCK_CTRL_44MHZ_CORE 0x00040000 -+#define CLOCK_CTRL_625_CORE 0x00100000 -+#define CLOCK_CTRL_FORCE_CLKRUN 0x00200000 -+#define CLOCK_CTRL_CLKRUN_OENABLE 0x00400000 -+#define CLOCK_CTRL_DELAY_PCI_GRANT 0x80000000 -+#define TG3PCI_REG_BASE_ADDR 0x00000078 -+#define TG3PCI_MEM_WIN_BASE_ADDR 0x0000007c -+#define TG3PCI_REG_DATA 0x00000080 -+#define TG3PCI_MEM_WIN_DATA 0x00000084 -+#define TG3PCI_MODE_CTRL 0x00000088 -+#define TG3PCI_MISC_CFG 0x0000008c -+#define TG3PCI_MISC_LOCAL_CTRL 0x00000090 -+/* 0x94 --> 0x98 unused */ -+#define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */ -+#define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */ -+#define TG3PCI_SND_PROD_IDX 0x000000a8 /* 64-bit */ -+/* 0xb0 --> 0x100 unused */ -+ -+/* 0x100 --> 0x200 unused */ -+ -+/* Mailbox registers */ -+#define MAILBOX_INTERRUPT_0 0x00000200 /* 64-bit */ -+#define MAILBOX_INTERRUPT_1 0x00000208 /* 64-bit */ -+#define MAILBOX_INTERRUPT_2 0x00000210 /* 64-bit */ -+#define MAILBOX_INTERRUPT_3 0x00000218 /* 64-bit */ -+#define MAILBOX_GENERAL_0 0x00000220 /* 64-bit */ -+#define MAILBOX_GENERAL_1 0x00000228 /* 64-bit */ -+#define MAILBOX_GENERAL_2 0x00000230 /* 64-bit */ -+#define MAILBOX_GENERAL_3 0x00000238 /* 64-bit */ -+#define MAILBOX_GENERAL_4 0x00000240 /* 64-bit */ -+#define MAILBOX_GENERAL_5 0x00000248 /* 64-bit */ -+#define MAILBOX_GENERAL_6 0x00000250 /* 64-bit */ -+#define MAILBOX_GENERAL_7 0x00000258 /* 64-bit */ -+#define MAILBOX_RELOAD_STAT 0x00000260 /* 64-bit */ -+#define MAILBOX_RCV_STD_PROD_IDX 0x00000268 /* 64-bit */ -+#define MAILBOX_RCV_JUMBO_PROD_IDX 0x00000270 /* 64-bit */ -+#define MAILBOX_RCV_MINI_PROD_IDX 0x00000278 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_0 0x00000280 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_1 0x00000288 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_2 0x00000290 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_3 0x00000298 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_4 0x000002a0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_5 0x000002a8 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_6 0x000002b0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_7 0x000002b8 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_8 0x000002c0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_9 0x000002c8 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_10 0x000002d0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_11 0x000002d8 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_12 0x000002e0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_13 0x000002e8 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_14 0x000002f0 /* 64-bit */ -+#define MAILBOX_RCVRET_CON_IDX_15 0x000002f8 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_0 0x00000300 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_1 0x00000308 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_2 0x00000310 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_3 0x00000318 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_4 0x00000320 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_5 0x00000328 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_6 0x00000330 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_7 0x00000338 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_8 0x00000340 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_9 0x00000348 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_10 0x00000350 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_11 0x00000358 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_12 0x00000360 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_13 0x00000368 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_14 0x00000370 /* 64-bit */ -+#define MAILBOX_SNDHOST_PROD_IDX_15 0x00000378 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_0 0x00000380 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_1 0x00000388 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_2 0x00000390 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_3 0x00000398 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_4 0x000003a0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_5 0x000003a8 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_6 0x000003b0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_7 0x000003b8 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_8 0x000003c0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_9 0x000003c8 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_10 0x000003d0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_11 0x000003d8 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_12 0x000003e0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_13 0x000003e8 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_14 0x000003f0 /* 64-bit */ -+#define MAILBOX_SNDNIC_PROD_IDX_15 0x000003f8 /* 64-bit */ -+ -+/* MAC control registers */ -+#define MAC_MODE 0x00000400 -+#define MAC_MODE_RESET 0x00000001 -+#define MAC_MODE_HALF_DUPLEX 0x00000002 -+#define MAC_MODE_PORT_MODE_MASK 0x0000000c -+#define MAC_MODE_PORT_MODE_TBI 0x0000000c -+#define MAC_MODE_PORT_MODE_GMII 0x00000008 -+#define MAC_MODE_PORT_MODE_MII 0x00000004 -+#define MAC_MODE_PORT_MODE_NONE 0x00000000 -+#define MAC_MODE_PORT_INT_LPBACK 0x00000010 -+#define MAC_MODE_TAGGED_MAC_CTRL 0x00000080 -+#define MAC_MODE_TX_BURSTING 0x00000100 -+#define MAC_MODE_MAX_DEFER 0x00000200 -+#define MAC_MODE_LINK_POLARITY 0x00000400 -+#define MAC_MODE_RXSTAT_ENABLE 0x00000800 -+#define MAC_MODE_RXSTAT_CLEAR 0x00001000 -+#define MAC_MODE_RXSTAT_FLUSH 0x00002000 -+#define MAC_MODE_TXSTAT_ENABLE 0x00004000 -+#define MAC_MODE_TXSTAT_CLEAR 0x00008000 -+#define MAC_MODE_TXSTAT_FLUSH 0x00010000 -+#define MAC_MODE_SEND_CONFIGS 0x00020000 -+#define MAC_MODE_MAGIC_PKT_ENABLE 0x00040000 -+#define MAC_MODE_ACPI_ENABLE 0x00080000 -+#define MAC_MODE_MIP_ENABLE 0x00100000 -+#define MAC_MODE_TDE_ENABLE 0x00200000 -+#define MAC_MODE_RDE_ENABLE 0x00400000 -+#define MAC_MODE_FHDE_ENABLE 0x00800000 -+#define MAC_STATUS 0x00000404 -+#define MAC_STATUS_PCS_SYNCED 0x00000001 -+#define MAC_STATUS_SIGNAL_DET 0x00000002 -+#define MAC_STATUS_RCVD_CFG 0x00000004 -+#define MAC_STATUS_CFG_CHANGED 0x00000008 -+#define MAC_STATUS_SYNC_CHANGED 0x00000010 -+#define MAC_STATUS_PORT_DEC_ERR 0x00000400 -+#define MAC_STATUS_LNKSTATE_CHANGED 0x00001000 -+#define MAC_STATUS_MI_COMPLETION 0x00400000 -+#define MAC_STATUS_MI_INTERRUPT 0x00800000 -+#define MAC_STATUS_AP_ERROR 0x01000000 -+#define MAC_STATUS_ODI_ERROR 0x02000000 -+#define MAC_STATUS_RXSTAT_OVERRUN 0x04000000 -+#define MAC_STATUS_TXSTAT_OVERRUN 0x08000000 -+#define MAC_EVENT 0x00000408 -+#define MAC_EVENT_PORT_DECODE_ERR 0x00000400 -+#define MAC_EVENT_LNKSTATE_CHANGED 0x00001000 -+#define MAC_EVENT_MI_COMPLETION 0x00400000 -+#define MAC_EVENT_MI_INTERRUPT 0x00800000 -+#define MAC_EVENT_AP_ERROR 0x01000000 -+#define MAC_EVENT_ODI_ERROR 0x02000000 -+#define MAC_EVENT_RXSTAT_OVERRUN 0x04000000 -+#define MAC_EVENT_TXSTAT_OVERRUN 0x08000000 -+#define MAC_LED_CTRL 0x0000040c -+#define LED_CTRL_LNKLED_OVERRIDE 0x00000001 -+#define LED_CTRL_1000MBPS_ON 0x00000002 -+#define LED_CTRL_100MBPS_ON 0x00000004 -+#define LED_CTRL_10MBPS_ON 0x00000008 -+#define LED_CTRL_TRAFFIC_OVERRIDE 0x00000010 -+#define LED_CTRL_TRAFFIC_BLINK 0x00000020 -+#define LED_CTRL_TRAFFIC_LED 0x00000040 -+#define LED_CTRL_1000MBPS_STATUS 0x00000080 -+#define LED_CTRL_100MBPS_STATUS 0x00000100 -+#define LED_CTRL_10MBPS_STATUS 0x00000200 -+#define LED_CTRL_TRAFFIC_STATUS 0x00000400 -+#define LED_CTRL_MAC_MODE 0x00000000 -+#define LED_CTRL_PHY_MODE_1 0x00000800 -+#define LED_CTRL_PHY_MODE_2 0x00001000 -+#define LED_CTRL_BLINK_RATE_MASK 0x7ff80000 -+#define LED_CTRL_BLINK_RATE_SHIFT 19 -+#define LED_CTRL_BLINK_PER_OVERRIDE 0x00080000 -+#define LED_CTRL_BLINK_RATE_OVERRIDE 0x80000000 -+#define MAC_ADDR_0_HIGH 0x00000410 /* upper 2 bytes */ -+#define MAC_ADDR_0_LOW 0x00000414 /* lower 4 bytes */ -+#define MAC_ADDR_1_HIGH 0x00000418 /* upper 2 bytes */ -+#define MAC_ADDR_1_LOW 0x0000041c /* lower 4 bytes */ -+#define MAC_ADDR_2_HIGH 0x00000420 /* upper 2 bytes */ -+#define MAC_ADDR_2_LOW 0x00000424 /* lower 4 bytes */ -+#define MAC_ADDR_3_HIGH 0x00000428 /* upper 2 bytes */ -+#define MAC_ADDR_3_LOW 0x0000042c /* lower 4 bytes */ -+#define MAC_ACPI_MBUF_PTR 0x00000430 -+#define MAC_ACPI_LEN_OFFSET 0x00000434 -+#define ACPI_LENOFF_LEN_MASK 0x0000ffff -+#define ACPI_LENOFF_LEN_SHIFT 0 -+#define ACPI_LENOFF_OFF_MASK 0x0fff0000 -+#define ACPI_LENOFF_OFF_SHIFT 16 -+#define MAC_TX_BACKOFF_SEED 0x00000438 -+#define TX_BACKOFF_SEED_MASK 0x000003ff -+#define MAC_RX_MTU_SIZE 0x0000043c -+#define RX_MTU_SIZE_MASK 0x0000ffff -+#define MAC_PCS_TEST 0x00000440 -+#define PCS_TEST_PATTERN_MASK 0x000fffff -+#define PCS_TEST_PATTERN_SHIFT 0 -+#define PCS_TEST_ENABLE 0x00100000 -+#define MAC_TX_AUTO_NEG 0x00000444 -+#define TX_AUTO_NEG_MASK 0x0000ffff -+#define TX_AUTO_NEG_SHIFT 0 -+#define MAC_RX_AUTO_NEG 0x00000448 -+#define RX_AUTO_NEG_MASK 0x0000ffff -+#define RX_AUTO_NEG_SHIFT 0 -+#define MAC_MI_COM 0x0000044c -+#define MI_COM_CMD_MASK 0x0c000000 -+#define MI_COM_CMD_WRITE 0x04000000 -+#define MI_COM_CMD_READ 0x08000000 -+#define MI_COM_READ_FAILED 0x10000000 -+#define MI_COM_START 0x20000000 -+#define MI_COM_BUSY 0x20000000 -+#define MI_COM_PHY_ADDR_MASK 0x03e00000 -+#define MI_COM_PHY_ADDR_SHIFT 21 -+#define MI_COM_REG_ADDR_MASK 0x001f0000 -+#define MI_COM_REG_ADDR_SHIFT 16 -+#define MI_COM_DATA_MASK 0x0000ffff -+#define MAC_MI_STAT 0x00000450 -+#define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001 -+#define MAC_MI_MODE 0x00000454 -+#define MAC_MI_MODE_CLK_10MHZ 0x00000001 -+#define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 -+#define MAC_MI_MODE_AUTO_POLL 0x00000010 -+#define MAC_MI_MODE_CORE_CLK_62MHZ 0x00008000 -+#define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */ -+#define MAC_AUTO_POLL_STATUS 0x00000458 -+#define MAC_AUTO_POLL_ERROR 0x00000001 -+#define MAC_TX_MODE 0x0000045c -+#define TX_MODE_RESET 0x00000001 -+#define TX_MODE_ENABLE 0x00000002 -+#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010 -+#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020 -+#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040 -+#define MAC_TX_STATUS 0x00000460 -+#define TX_STATUS_XOFFED 0x00000001 -+#define TX_STATUS_SENT_XOFF 0x00000002 -+#define TX_STATUS_SENT_XON 0x00000004 -+#define TX_STATUS_LINK_UP 0x00000008 -+#define TX_STATUS_ODI_UNDERRUN 0x00000010 -+#define TX_STATUS_ODI_OVERRUN 0x00000020 -+#define MAC_TX_LENGTHS 0x00000464 -+#define TX_LENGTHS_SLOT_TIME_MASK 0x000000ff -+#define TX_LENGTHS_SLOT_TIME_SHIFT 0 -+#define TX_LENGTHS_IPG_MASK 0x00000f00 -+#define TX_LENGTHS_IPG_SHIFT 8 -+#define TX_LENGTHS_IPG_CRS_MASK 0x00003000 -+#define TX_LENGTHS_IPG_CRS_SHIFT 12 -+#define MAC_RX_MODE 0x00000468 -+#define RX_MODE_RESET 0x00000001 -+#define RX_MODE_ENABLE 0x00000002 -+#define RX_MODE_FLOW_CTRL_ENABLE 0x00000004 -+#define RX_MODE_KEEP_MAC_CTRL 0x00000008 -+#define RX_MODE_KEEP_PAUSE 0x00000010 -+#define RX_MODE_ACCEPT_OVERSIZED 0x00000020 -+#define RX_MODE_ACCEPT_RUNTS 0x00000040 -+#define RX_MODE_LEN_CHECK 0x00000080 -+#define RX_MODE_PROMISC 0x00000100 -+#define RX_MODE_NO_CRC_CHECK 0x00000200 -+#define RX_MODE_KEEP_VLAN_TAG 0x00000400 -+#define MAC_RX_STATUS 0x0000046c -+#define RX_STATUS_REMOTE_TX_XOFFED 0x00000001 -+#define RX_STATUS_XOFF_RCVD 0x00000002 -+#define RX_STATUS_XON_RCVD 0x00000004 -+#define MAC_HASH_REG_0 0x00000470 -+#define MAC_HASH_REG_1 0x00000474 -+#define MAC_HASH_REG_2 0x00000478 -+#define MAC_HASH_REG_3 0x0000047c -+#define MAC_RCV_RULE_0 0x00000480 -+#define MAC_RCV_VALUE_0 0x00000484 -+#define MAC_RCV_RULE_1 0x00000488 -+#define MAC_RCV_VALUE_1 0x0000048c -+#define MAC_RCV_RULE_2 0x00000490 -+#define MAC_RCV_VALUE_2 0x00000494 -+#define MAC_RCV_RULE_3 0x00000498 -+#define MAC_RCV_VALUE_3 0x0000049c -+#define MAC_RCV_RULE_4 0x000004a0 -+#define MAC_RCV_VALUE_4 0x000004a4 -+#define MAC_RCV_RULE_5 0x000004a8 -+#define MAC_RCV_VALUE_5 0x000004ac -+#define MAC_RCV_RULE_6 0x000004b0 -+#define MAC_RCV_VALUE_6 0x000004b4 -+#define MAC_RCV_RULE_7 0x000004b8 -+#define MAC_RCV_VALUE_7 0x000004bc -+#define MAC_RCV_RULE_8 0x000004c0 -+#define MAC_RCV_VALUE_8 0x000004c4 -+#define MAC_RCV_RULE_9 0x000004c8 -+#define MAC_RCV_VALUE_9 0x000004cc -+#define MAC_RCV_RULE_10 0x000004d0 -+#define MAC_RCV_VALUE_10 0x000004d4 -+#define MAC_RCV_RULE_11 0x000004d8 -+#define MAC_RCV_VALUE_11 0x000004dc -+#define MAC_RCV_RULE_12 0x000004e0 -+#define MAC_RCV_VALUE_12 0x000004e4 -+#define MAC_RCV_RULE_13 0x000004e8 -+#define MAC_RCV_VALUE_13 0x000004ec -+#define MAC_RCV_RULE_14 0x000004f0 -+#define MAC_RCV_VALUE_14 0x000004f4 -+#define MAC_RCV_RULE_15 0x000004f8 -+#define MAC_RCV_VALUE_15 0x000004fc -+#define RCV_RULE_DISABLE_MASK 0x7fffffff -+#define MAC_RCV_RULE_CFG 0x00000500 -+#define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008 -+#define MAC_LOW_WMARK_MAX_RX_FRAME 0x00000504 -+/* 0x508 --> 0x520 unused */ -+#define MAC_HASHREGU_0 0x00000520 -+#define MAC_HASHREGU_1 0x00000524 -+#define MAC_HASHREGU_2 0x00000528 -+#define MAC_HASHREGU_3 0x0000052c -+#define MAC_EXTADDR_0_HIGH 0x00000530 -+#define MAC_EXTADDR_0_LOW 0x00000534 -+#define MAC_EXTADDR_1_HIGH 0x00000538 -+#define MAC_EXTADDR_1_LOW 0x0000053c -+#define MAC_EXTADDR_2_HIGH 0x00000540 -+#define MAC_EXTADDR_2_LOW 0x00000544 -+#define MAC_EXTADDR_3_HIGH 0x00000548 -+#define MAC_EXTADDR_3_LOW 0x0000054c -+#define MAC_EXTADDR_4_HIGH 0x00000550 -+#define MAC_EXTADDR_4_LOW 0x00000554 -+#define MAC_EXTADDR_5_HIGH 0x00000558 -+#define MAC_EXTADDR_5_LOW 0x0000055c -+#define MAC_EXTADDR_6_HIGH 0x00000560 -+#define MAC_EXTADDR_6_LOW 0x00000564 -+#define MAC_EXTADDR_7_HIGH 0x00000568 -+#define MAC_EXTADDR_7_LOW 0x0000056c -+#define MAC_EXTADDR_8_HIGH 0x00000570 -+#define MAC_EXTADDR_8_LOW 0x00000574 -+#define MAC_EXTADDR_9_HIGH 0x00000578 -+#define MAC_EXTADDR_9_LOW 0x0000057c -+#define MAC_EXTADDR_10_HIGH 0x00000580 -+#define MAC_EXTADDR_10_LOW 0x00000584 -+#define MAC_EXTADDR_11_HIGH 0x00000588 -+#define MAC_EXTADDR_11_LOW 0x0000058c -+#define MAC_SERDES_CFG 0x00000590 -+#define MAC_SERDES_STAT 0x00000594 -+/* 0x598 --> 0x600 unused */ -+#define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */ -+#define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */ -+/* 0x624 --> 0x800 unused */ -+#define MAC_TX_STATS_OCTETS 0x00000800 -+#define MAC_TX_STATS_RESV1 0x00000804 -+#define MAC_TX_STATS_COLLISIONS 0x00000808 -+#define MAC_TX_STATS_XON_SENT 0x0000080c -+#define MAC_TX_STATS_XOFF_SENT 0x00000810 -+#define MAC_TX_STATS_RESV2 0x00000814 -+#define MAC_TX_STATS_MAC_ERRORS 0x00000818 -+#define MAC_TX_STATS_SINGLE_COLLISIONS 0x0000081c -+#define MAC_TX_STATS_MULT_COLLISIONS 0x00000820 -+#define MAC_TX_STATS_DEFERRED 0x00000824 -+#define MAC_TX_STATS_RESV3 0x00000828 -+#define MAC_TX_STATS_EXCESSIVE_COL 0x0000082c -+#define MAC_TX_STATS_LATE_COL 0x00000830 -+#define MAC_TX_STATS_RESV4_1 0x00000834 -+#define MAC_TX_STATS_RESV4_2 0x00000838 -+#define MAC_TX_STATS_RESV4_3 0x0000083c -+#define MAC_TX_STATS_RESV4_4 0x00000840 -+#define MAC_TX_STATS_RESV4_5 0x00000844 -+#define MAC_TX_STATS_RESV4_6 0x00000848 -+#define MAC_TX_STATS_RESV4_7 0x0000084c -+#define MAC_TX_STATS_RESV4_8 0x00000850 -+#define MAC_TX_STATS_RESV4_9 0x00000854 -+#define MAC_TX_STATS_RESV4_10 0x00000858 -+#define MAC_TX_STATS_RESV4_11 0x0000085c -+#define MAC_TX_STATS_RESV4_12 0x00000860 -+#define MAC_TX_STATS_RESV4_13 0x00000864 -+#define MAC_TX_STATS_RESV4_14 0x00000868 -+#define MAC_TX_STATS_UCAST 0x0000086c -+#define MAC_TX_STATS_MCAST 0x00000870 -+#define MAC_TX_STATS_BCAST 0x00000874 -+#define MAC_TX_STATS_RESV5_1 0x00000878 -+#define MAC_TX_STATS_RESV5_2 0x0000087c -+#define MAC_RX_STATS_OCTETS 0x00000880 -+#define MAC_RX_STATS_RESV1 0x00000884 -+#define MAC_RX_STATS_FRAGMENTS 0x00000888 -+#define MAC_RX_STATS_UCAST 0x0000088c -+#define MAC_RX_STATS_MCAST 0x00000890 -+#define MAC_RX_STATS_BCAST 0x00000894 -+#define MAC_RX_STATS_FCS_ERRORS 0x00000898 -+#define MAC_RX_STATS_ALIGN_ERRORS 0x0000089c -+#define MAC_RX_STATS_XON_PAUSE_RECVD 0x000008a0 -+#define MAC_RX_STATS_XOFF_PAUSE_RECVD 0x000008a4 -+#define MAC_RX_STATS_MAC_CTRL_RECVD 0x000008a8 -+#define MAC_RX_STATS_XOFF_ENTERED 0x000008ac -+#define MAC_RX_STATS_FRAME_TOO_LONG 0x000008b0 -+#define MAC_RX_STATS_JABBERS 0x000008b4 -+#define MAC_RX_STATS_UNDERSIZE 0x000008b8 -+/* 0x8bc --> 0xc00 unused */ -+ -+/* Send data initiator control registers */ -+#define SNDDATAI_MODE 0x00000c00 -+#define SNDDATAI_MODE_RESET 0x00000001 -+#define SNDDATAI_MODE_ENABLE 0x00000002 -+#define SNDDATAI_MODE_STAT_OFLOW_ENAB 0x00000004 -+#define SNDDATAI_STATUS 0x00000c04 -+#define SNDDATAI_STATUS_STAT_OFLOW 0x00000004 -+#define SNDDATAI_STATSCTRL 0x00000c08 -+#define SNDDATAI_SCTRL_ENABLE 0x00000001 -+#define SNDDATAI_SCTRL_FASTUPD 0x00000002 -+#define SNDDATAI_SCTRL_CLEAR 0x00000004 -+#define SNDDATAI_SCTRL_FLUSH 0x00000008 -+#define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010 -+#define SNDDATAI_STATSENAB 0x00000c0c -+#define SNDDATAI_STATSINCMASK 0x00000c10 -+/* 0xc14 --> 0xc80 unused */ -+#define SNDDATAI_COS_CNT_0 0x00000c80 -+#define SNDDATAI_COS_CNT_1 0x00000c84 -+#define SNDDATAI_COS_CNT_2 0x00000c88 -+#define SNDDATAI_COS_CNT_3 0x00000c8c -+#define SNDDATAI_COS_CNT_4 0x00000c90 -+#define SNDDATAI_COS_CNT_5 0x00000c94 -+#define SNDDATAI_COS_CNT_6 0x00000c98 -+#define SNDDATAI_COS_CNT_7 0x00000c9c -+#define SNDDATAI_COS_CNT_8 0x00000ca0 -+#define SNDDATAI_COS_CNT_9 0x00000ca4 -+#define SNDDATAI_COS_CNT_10 0x00000ca8 -+#define SNDDATAI_COS_CNT_11 0x00000cac -+#define SNDDATAI_COS_CNT_12 0x00000cb0 -+#define SNDDATAI_COS_CNT_13 0x00000cb4 -+#define SNDDATAI_COS_CNT_14 0x00000cb8 -+#define SNDDATAI_COS_CNT_15 0x00000cbc -+#define SNDDATAI_DMA_RDQ_FULL_CNT 0x00000cc0 -+#define SNDDATAI_DMA_PRIO_RDQ_FULL_CNT 0x00000cc4 -+#define SNDDATAI_SDCQ_FULL_CNT 0x00000cc8 -+#define SNDDATAI_NICRNG_SSND_PIDX_CNT 0x00000ccc -+#define SNDDATAI_STATS_UPDATED_CNT 0x00000cd0 -+#define SNDDATAI_INTERRUPTS_CNT 0x00000cd4 -+#define SNDDATAI_AVOID_INTERRUPTS_CNT 0x00000cd8 -+#define SNDDATAI_SND_THRESH_HIT_CNT 0x00000cdc -+/* 0xce0 --> 0x1000 unused */ -+ -+/* Send data completion control registers */ -+#define SNDDATAC_MODE 0x00001000 -+#define SNDDATAC_MODE_RESET 0x00000001 -+#define SNDDATAC_MODE_ENABLE 0x00000002 -+/* 0x1004 --> 0x1400 unused */ -+ -+/* Send BD ring selector */ -+#define SNDBDS_MODE 0x00001400 -+#define SNDBDS_MODE_RESET 0x00000001 -+#define SNDBDS_MODE_ENABLE 0x00000002 -+#define SNDBDS_MODE_ATTN_ENABLE 0x00000004 -+#define SNDBDS_STATUS 0x00001404 -+#define SNDBDS_STATUS_ERROR_ATTN 0x00000004 -+#define SNDBDS_HWDIAG 0x00001408 -+/* 0x140c --> 0x1440 */ -+#define SNDBDS_SEL_CON_IDX_0 0x00001440 -+#define SNDBDS_SEL_CON_IDX_1 0x00001444 -+#define SNDBDS_SEL_CON_IDX_2 0x00001448 -+#define SNDBDS_SEL_CON_IDX_3 0x0000144c -+#define SNDBDS_SEL_CON_IDX_4 0x00001450 -+#define SNDBDS_SEL_CON_IDX_5 0x00001454 -+#define SNDBDS_SEL_CON_IDX_6 0x00001458 -+#define SNDBDS_SEL_CON_IDX_7 0x0000145c -+#define SNDBDS_SEL_CON_IDX_8 0x00001460 -+#define SNDBDS_SEL_CON_IDX_9 0x00001464 -+#define SNDBDS_SEL_CON_IDX_10 0x00001468 -+#define SNDBDS_SEL_CON_IDX_11 0x0000146c -+#define SNDBDS_SEL_CON_IDX_12 0x00001470 -+#define SNDBDS_SEL_CON_IDX_13 0x00001474 -+#define SNDBDS_SEL_CON_IDX_14 0x00001478 -+#define SNDBDS_SEL_CON_IDX_15 0x0000147c -+/* 0x1480 --> 0x1800 unused */ -+ -+/* Send BD initiator control registers */ -+#define SNDBDI_MODE 0x00001800 -+#define SNDBDI_MODE_RESET 0x00000001 -+#define SNDBDI_MODE_ENABLE 0x00000002 -+#define SNDBDI_MODE_ATTN_ENABLE 0x00000004 -+#define SNDBDI_STATUS 0x00001804 -+#define SNDBDI_STATUS_ERROR_ATTN 0x00000004 -+#define SNDBDI_IN_PROD_IDX_0 0x00001808 -+#define SNDBDI_IN_PROD_IDX_1 0x0000180c -+#define SNDBDI_IN_PROD_IDX_2 0x00001810 -+#define SNDBDI_IN_PROD_IDX_3 0x00001814 -+#define SNDBDI_IN_PROD_IDX_4 0x00001818 -+#define SNDBDI_IN_PROD_IDX_5 0x0000181c -+#define SNDBDI_IN_PROD_IDX_6 0x00001820 -+#define SNDBDI_IN_PROD_IDX_7 0x00001824 -+#define SNDBDI_IN_PROD_IDX_8 0x00001828 -+#define SNDBDI_IN_PROD_IDX_9 0x0000182c -+#define SNDBDI_IN_PROD_IDX_10 0x00001830 -+#define SNDBDI_IN_PROD_IDX_11 0x00001834 -+#define SNDBDI_IN_PROD_IDX_12 0x00001838 -+#define SNDBDI_IN_PROD_IDX_13 0x0000183c -+#define SNDBDI_IN_PROD_IDX_14 0x00001840 -+#define SNDBDI_IN_PROD_IDX_15 0x00001844 -+/* 0x1848 --> 0x1c00 unused */ -+ -+/* Send BD completion control registers */ -+#define SNDBDC_MODE 0x00001c00 -+#define SNDBDC_MODE_RESET 0x00000001 -+#define SNDBDC_MODE_ENABLE 0x00000002 -+#define SNDBDC_MODE_ATTN_ENABLE 0x00000004 -+/* 0x1c04 --> 0x2000 unused */ -+ -+/* Receive list placement control registers */ -+#define RCVLPC_MODE 0x00002000 -+#define RCVLPC_MODE_RESET 0x00000001 -+#define RCVLPC_MODE_ENABLE 0x00000002 -+#define RCVLPC_MODE_CLASS0_ATTN_ENAB 0x00000004 -+#define RCVLPC_MODE_MAPOOR_AATTN_ENAB 0x00000008 -+#define RCVLPC_MODE_STAT_OFLOW_ENAB 0x00000010 -+#define RCVLPC_STATUS 0x00002004 -+#define RCVLPC_STATUS_CLASS0 0x00000004 -+#define RCVLPC_STATUS_MAPOOR 0x00000008 -+#define RCVLPC_STATUS_STAT_OFLOW 0x00000010 -+#define RCVLPC_LOCK 0x00002008 -+#define RCVLPC_LOCK_REQ_MASK 0x0000ffff -+#define RCVLPC_LOCK_REQ_SHIFT 0 -+#define RCVLPC_LOCK_GRANT_MASK 0xffff0000 -+#define RCVLPC_LOCK_GRANT_SHIFT 16 -+#define RCVLPC_NON_EMPTY_BITS 0x0000200c -+#define RCVLPC_NON_EMPTY_BITS_MASK 0x0000ffff -+#define RCVLPC_CONFIG 0x00002010 -+#define RCVLPC_STATSCTRL 0x00002014 -+#define RCVLPC_STATSCTRL_ENABLE 0x00000001 -+#define RCVLPC_STATSCTRL_FASTUPD 0x00000002 -+#define RCVLPC_STATS_ENABLE 0x00002018 -+#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 -+#define RCVLPC_STATS_INCMASK 0x0000201c -+/* 0x2020 --> 0x2100 unused */ -+#define RCVLPC_SELLST_BASE 0x00002100 /* 16 16-byte entries */ -+#define SELLST_TAIL 0x00000004 -+#define SELLST_CONT 0x00000008 -+#define SELLST_UNUSED 0x0000000c -+#define RCVLPC_COS_CNTL_BASE 0x00002200 /* 16 4-byte entries */ -+#define RCVLPC_DROP_FILTER_CNT 0x00002240 -+#define RCVLPC_DMA_WQ_FULL_CNT 0x00002244 -+#define RCVLPC_DMA_HIPRIO_WQ_FULL_CNT 0x00002248 -+#define RCVLPC_NO_RCV_BD_CNT 0x0000224c -+#define RCVLPC_IN_DISCARDS_CNT 0x00002250 -+#define RCVLPC_IN_ERRORS_CNT 0x00002254 -+#define RCVLPC_RCV_THRESH_HIT_CNT 0x00002258 -+/* 0x225c --> 0x2400 unused */ -+ -+/* Receive Data and Receive BD Initiator Control */ -+#define RCVDBDI_MODE 0x00002400 -+#define RCVDBDI_MODE_RESET 0x00000001 -+#define RCVDBDI_MODE_ENABLE 0x00000002 -+#define RCVDBDI_MODE_JUMBOBD_NEEDED 0x00000004 -+#define RCVDBDI_MODE_FRM_TOO_BIG 0x00000008 -+#define RCVDBDI_MODE_INV_RING_SZ 0x00000010 -+#define RCVDBDI_STATUS 0x00002404 -+#define RCVDBDI_STATUS_JUMBOBD_NEEDED 0x00000004 -+#define RCVDBDI_STATUS_FRM_TOO_BIG 0x00000008 -+#define RCVDBDI_STATUS_INV_RING_SZ 0x00000010 -+#define RCVDBDI_SPLIT_FRAME_MINSZ 0x00002408 -+/* 0x240c --> 0x2440 unused */ -+#define RCVDBDI_JUMBO_BD 0x00002440 /* TG3_BDINFO_... */ -+#define RCVDBDI_STD_BD 0x00002450 /* TG3_BDINFO_... */ -+#define RCVDBDI_MINI_BD 0x00002460 /* TG3_BDINFO_... */ -+#define RCVDBDI_JUMBO_CON_IDX 0x00002470 -+#define RCVDBDI_STD_CON_IDX 0x00002474 -+#define RCVDBDI_MINI_CON_IDX 0x00002478 -+/* 0x247c --> 0x2480 unused */ -+#define RCVDBDI_BD_PROD_IDX_0 0x00002480 -+#define RCVDBDI_BD_PROD_IDX_1 0x00002484 -+#define RCVDBDI_BD_PROD_IDX_2 0x00002488 -+#define RCVDBDI_BD_PROD_IDX_3 0x0000248c -+#define RCVDBDI_BD_PROD_IDX_4 0x00002490 -+#define RCVDBDI_BD_PROD_IDX_5 0x00002494 -+#define RCVDBDI_BD_PROD_IDX_6 0x00002498 -+#define RCVDBDI_BD_PROD_IDX_7 0x0000249c -+#define RCVDBDI_BD_PROD_IDX_8 0x000024a0 -+#define RCVDBDI_BD_PROD_IDX_9 0x000024a4 -+#define RCVDBDI_BD_PROD_IDX_10 0x000024a8 -+#define RCVDBDI_BD_PROD_IDX_11 0x000024ac -+#define RCVDBDI_BD_PROD_IDX_12 0x000024b0 -+#define RCVDBDI_BD_PROD_IDX_13 0x000024b4 -+#define RCVDBDI_BD_PROD_IDX_14 0x000024b8 -+#define RCVDBDI_BD_PROD_IDX_15 0x000024bc -+#define RCVDBDI_HWDIAG 0x000024c0 -+/* 0x24c4 --> 0x2800 unused */ -+ -+/* Receive Data Completion Control */ -+#define RCVDCC_MODE 0x00002800 -+#define RCVDCC_MODE_RESET 0x00000001 -+#define RCVDCC_MODE_ENABLE 0x00000002 -+#define RCVDCC_MODE_ATTN_ENABLE 0x00000004 -+/* 0x2804 --> 0x2c00 unused */ -+ -+/* Receive BD Initiator Control Registers */ -+#define RCVBDI_MODE 0x00002c00 -+#define RCVBDI_MODE_RESET 0x00000001 -+#define RCVBDI_MODE_ENABLE 0x00000002 -+#define RCVBDI_MODE_RCB_ATTN_ENAB 0x00000004 -+#define RCVBDI_STATUS 0x00002c04 -+#define RCVBDI_STATUS_RCB_ATTN 0x00000004 -+#define RCVBDI_JUMBO_PROD_IDX 0x00002c08 -+#define RCVBDI_STD_PROD_IDX 0x00002c0c -+#define RCVBDI_MINI_PROD_IDX 0x00002c10 -+#define RCVBDI_MINI_THRESH 0x00002c14 -+#define RCVBDI_STD_THRESH 0x00002c18 -+#define RCVBDI_JUMBO_THRESH 0x00002c1c -+/* 0x2c20 --> 0x3000 unused */ -+ -+/* Receive BD Completion Control Registers */ -+#define RCVCC_MODE 0x00003000 -+#define RCVCC_MODE_RESET 0x00000001 -+#define RCVCC_MODE_ENABLE 0x00000002 -+#define RCVCC_MODE_ATTN_ENABLE 0x00000004 -+#define RCVCC_STATUS 0x00003004 -+#define RCVCC_STATUS_ERROR_ATTN 0x00000004 -+#define RCVCC_JUMP_PROD_IDX 0x00003008 -+#define RCVCC_STD_PROD_IDX 0x0000300c -+#define RCVCC_MINI_PROD_IDX 0x00003010 -+/* 0x3014 --> 0x3400 unused */ -+ -+/* Receive list selector control registers */ -+#define RCVLSC_MODE 0x00003400 -+#define RCVLSC_MODE_RESET 0x00000001 -+#define RCVLSC_MODE_ENABLE 0x00000002 -+#define RCVLSC_MODE_ATTN_ENABLE 0x00000004 -+#define RCVLSC_STATUS 0x00003404 -+#define RCVLSC_STATUS_ERROR_ATTN 0x00000004 -+/* 0x3408 --> 0x3800 unused */ -+ -+/* Mbuf cluster free registers */ -+#define MBFREE_MODE 0x00003800 -+#define MBFREE_MODE_RESET 0x00000001 -+#define MBFREE_MODE_ENABLE 0x00000002 -+#define MBFREE_STATUS 0x00003804 -+/* 0x3808 --> 0x3c00 unused */ -+ -+/* Host coalescing control registers */ -+#define HOSTCC_MODE 0x00003c00 -+#define HOSTCC_MODE_RESET 0x00000001 -+#define HOSTCC_MODE_ENABLE 0x00000002 -+#define HOSTCC_MODE_ATTN 0x00000004 -+#define HOSTCC_MODE_NOW 0x00000008 -+#define HOSTCC_MODE_FULL_STATUS 0x00000000 -+#define HOSTCC_MODE_64BYTE 0x00000080 -+#define HOSTCC_MODE_32BYTE 0x00000100 -+#define HOSTCC_MODE_CLRTICK_RXBD 0x00000200 -+#define HOSTCC_MODE_CLRTICK_TXBD 0x00000400 -+#define HOSTCC_MODE_NOINT_ON_NOW 0x00000800 -+#define HOSTCC_MODE_NOINT_ON_FORCE 0x00001000 -+#define HOSTCC_STATUS 0x00003c04 -+#define HOSTCC_STATUS_ERROR_ATTN 0x00000004 -+#define HOSTCC_RXCOL_TICKS 0x00003c08 -+#define LOW_RXCOL_TICKS 0x00000032 -+#define DEFAULT_RXCOL_TICKS 0x00000048 -+#define HIGH_RXCOL_TICKS 0x00000096 -+#define HOSTCC_TXCOL_TICKS 0x00003c0c -+#define LOW_TXCOL_TICKS 0x00000096 -+#define DEFAULT_TXCOL_TICKS 0x0000012c -+#define HIGH_TXCOL_TICKS 0x00000145 -+#define HOSTCC_RXMAX_FRAMES 0x00003c10 -+#define LOW_RXMAX_FRAMES 0x00000005 -+#define DEFAULT_RXMAX_FRAMES 0x00000008 -+#define HIGH_RXMAX_FRAMES 0x00000012 -+#define HOSTCC_TXMAX_FRAMES 0x00003c14 -+#define LOW_TXMAX_FRAMES 0x00000035 -+#define DEFAULT_TXMAX_FRAMES 0x0000004b -+#define HIGH_TXMAX_FRAMES 0x00000052 -+#define HOSTCC_RXCOAL_TICK_INT 0x00003c18 -+#define DEFAULT_RXCOAL_TICK_INT 0x00000019 -+#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c -+#define DEFAULT_TXCOAL_TICK_INT 0x00000019 -+#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 -+#define DEFAULT_RXCOAL_MAXF_INT 0x00000005 -+#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 -+#define DEFAULT_TXCOAL_MAXF_INT 0x00000005 -+#define HOSTCC_STAT_COAL_TICKS 0x00003c28 -+#define DEFAULT_STAT_COAL_TICKS 0x000f4240 -+/* 0x3c2c --> 0x3c30 unused */ -+#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ -+#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ -+#define HOSTCC_STATS_BLK_NIC_ADDR 0x00003c40 -+#define HOSTCC_STATUS_BLK_NIC_ADDR 0x00003c44 -+#define HOSTCC_FLOW_ATTN 0x00003c48 -+/* 0x3c4c --> 0x3c50 unused */ -+#define HOSTCC_JUMBO_CON_IDX 0x00003c50 -+#define HOSTCC_STD_CON_IDX 0x00003c54 -+#define HOSTCC_MINI_CON_IDX 0x00003c58 -+/* 0x3c5c --> 0x3c80 unused */ -+#define HOSTCC_RET_PROD_IDX_0 0x00003c80 -+#define HOSTCC_RET_PROD_IDX_1 0x00003c84 -+#define HOSTCC_RET_PROD_IDX_2 0x00003c88 -+#define HOSTCC_RET_PROD_IDX_3 0x00003c8c -+#define HOSTCC_RET_PROD_IDX_4 0x00003c90 -+#define HOSTCC_RET_PROD_IDX_5 0x00003c94 -+#define HOSTCC_RET_PROD_IDX_6 0x00003c98 -+#define HOSTCC_RET_PROD_IDX_7 0x00003c9c -+#define HOSTCC_RET_PROD_IDX_8 0x00003ca0 -+#define HOSTCC_RET_PROD_IDX_9 0x00003ca4 -+#define HOSTCC_RET_PROD_IDX_10 0x00003ca8 -+#define HOSTCC_RET_PROD_IDX_11 0x00003cac -+#define HOSTCC_RET_PROD_IDX_12 0x00003cb0 -+#define HOSTCC_RET_PROD_IDX_13 0x00003cb4 -+#define HOSTCC_RET_PROD_IDX_14 0x00003cb8 -+#define HOSTCC_RET_PROD_IDX_15 0x00003cbc -+#define HOSTCC_SND_CON_IDX_0 0x00003cc0 -+#define HOSTCC_SND_CON_IDX_1 0x00003cc4 -+#define HOSTCC_SND_CON_IDX_2 0x00003cc8 -+#define HOSTCC_SND_CON_IDX_3 0x00003ccc -+#define HOSTCC_SND_CON_IDX_4 0x00003cd0 -+#define HOSTCC_SND_CON_IDX_5 0x00003cd4 -+#define HOSTCC_SND_CON_IDX_6 0x00003cd8 -+#define HOSTCC_SND_CON_IDX_7 0x00003cdc -+#define HOSTCC_SND_CON_IDX_8 0x00003ce0 -+#define HOSTCC_SND_CON_IDX_9 0x00003ce4 -+#define HOSTCC_SND_CON_IDX_10 0x00003ce8 -+#define HOSTCC_SND_CON_IDX_11 0x00003cec -+#define HOSTCC_SND_CON_IDX_12 0x00003cf0 -+#define HOSTCC_SND_CON_IDX_13 0x00003cf4 -+#define HOSTCC_SND_CON_IDX_14 0x00003cf8 -+#define HOSTCC_SND_CON_IDX_15 0x00003cfc -+/* 0x3d00 --> 0x4000 unused */ -+ -+/* Memory arbiter control registers */ -+#define MEMARB_MODE 0x00004000 -+#define MEMARB_MODE_RESET 0x00000001 -+#define MEMARB_MODE_ENABLE 0x00000002 -+#define MEMARB_STATUS 0x00004004 -+#define MEMARB_TRAP_ADDR_LOW 0x00004008 -+#define MEMARB_TRAP_ADDR_HIGH 0x0000400c -+/* 0x4010 --> 0x4400 unused */ -+ -+/* Buffer manager control registers */ -+#define BUFMGR_MODE 0x00004400 -+#define BUFMGR_MODE_RESET 0x00000001 -+#define BUFMGR_MODE_ENABLE 0x00000002 -+#define BUFMGR_MODE_ATTN_ENABLE 0x00000004 -+#define BUFMGR_MODE_BM_TEST 0x00000008 -+#define BUFMGR_MODE_MBLOW_ATTN_ENAB 0x00000010 -+#define BUFMGR_STATUS 0x00004404 -+#define BUFMGR_STATUS_ERROR 0x00000004 -+#define BUFMGR_STATUS_MBLOW 0x00000010 -+#define BUFMGR_MB_POOL_ADDR 0x00004408 -+#define BUFMGR_MB_POOL_SIZE 0x0000440c -+#define BUFMGR_MB_RDMA_LOW_WATER 0x00004410 -+#define DEFAULT_MB_RDMA_LOW_WATER 0x00000050 -+#define DEFAULT_MB_RDMA_LOW_WATER_5705 0x00000000 -+#define DEFAULT_MB_RDMA_LOW_WATER_JUMBO 0x00000130 -+#define BUFMGR_MB_MACRX_LOW_WATER 0x00004414 -+#define DEFAULT_MB_MACRX_LOW_WATER 0x00000020 -+#define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010 -+#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098 -+#define BUFMGR_MB_HIGH_WATER 0x00004418 -+#define DEFAULT_MB_HIGH_WATER 0x00000060 -+#define DEFAULT_MB_HIGH_WATER_5705 0x00000060 -+#define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c -+#define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c -+#define BUFMGR_MB_ALLOC_BIT 0x10000000 -+#define BUFMGR_RX_MB_ALLOC_RESP 0x00004420 -+#define BUFMGR_TX_MB_ALLOC_REQ 0x00004424 -+#define BUFMGR_TX_MB_ALLOC_RESP 0x00004428 -+#define BUFMGR_DMA_DESC_POOL_ADDR 0x0000442c -+#define BUFMGR_DMA_DESC_POOL_SIZE 0x00004430 -+#define BUFMGR_DMA_LOW_WATER 0x00004434 -+#define DEFAULT_DMA_LOW_WATER 0x00000005 -+#define BUFMGR_DMA_HIGH_WATER 0x00004438 -+#define DEFAULT_DMA_HIGH_WATER 0x0000000a -+#define BUFMGR_RX_DMA_ALLOC_REQ 0x0000443c -+#define BUFMGR_RX_DMA_ALLOC_RESP 0x00004440 -+#define BUFMGR_TX_DMA_ALLOC_REQ 0x00004444 -+#define BUFMGR_TX_DMA_ALLOC_RESP 0x00004448 -+#define BUFMGR_HWDIAG_0 0x0000444c -+#define BUFMGR_HWDIAG_1 0x00004450 -+#define BUFMGR_HWDIAG_2 0x00004454 -+/* 0x4458 --> 0x4800 unused */ -+ -+/* Read DMA control registers */ -+#define RDMAC_MODE 0x00004800 -+#define RDMAC_MODE_RESET 0x00000001 -+#define RDMAC_MODE_ENABLE 0x00000002 -+#define RDMAC_MODE_TGTABORT_ENAB 0x00000004 -+#define RDMAC_MODE_MSTABORT_ENAB 0x00000008 -+#define RDMAC_MODE_PARITYERR_ENAB 0x00000010 -+#define RDMAC_MODE_ADDROFLOW_ENAB 0x00000020 -+#define RDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 -+#define RDMAC_MODE_FIFOURUN_ENAB 0x00000080 -+#define RDMAC_MODE_FIFOOREAD_ENAB 0x00000100 -+#define RDMAC_MODE_LNGREAD_ENAB 0x00000200 -+#define RDMAC_MODE_SPLIT_ENABLE 0x00000800 -+#define RDMAC_MODE_SPLIT_RESET 0x00001000 -+#define RDMAC_MODE_FIFO_SIZE_128 0x00020000 -+#define RDMAC_MODE_FIFO_LONG_BURST 0x00030000 -+#define RDMAC_STATUS 0x00004804 -+#define RDMAC_STATUS_TGTABORT 0x00000004 -+#define RDMAC_STATUS_MSTABORT 0x00000008 -+#define RDMAC_STATUS_PARITYERR 0x00000010 -+#define RDMAC_STATUS_ADDROFLOW 0x00000020 -+#define RDMAC_STATUS_FIFOOFLOW 0x00000040 -+#define RDMAC_STATUS_FIFOURUN 0x00000080 -+#define RDMAC_STATUS_FIFOOREAD 0x00000100 -+#define RDMAC_STATUS_LNGREAD 0x00000200 -+/* 0x4808 --> 0x4c00 unused */ -+ -+/* Write DMA control registers */ -+#define WDMAC_MODE 0x00004c00 -+#define WDMAC_MODE_RESET 0x00000001 -+#define WDMAC_MODE_ENABLE 0x00000002 -+#define WDMAC_MODE_TGTABORT_ENAB 0x00000004 -+#define WDMAC_MODE_MSTABORT_ENAB 0x00000008 -+#define WDMAC_MODE_PARITYERR_ENAB 0x00000010 -+#define WDMAC_MODE_ADDROFLOW_ENAB 0x00000020 -+#define WDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 -+#define WDMAC_MODE_FIFOURUN_ENAB 0x00000080 -+#define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100 -+#define WDMAC_MODE_LNGREAD_ENAB 0x00000200 -+#define WDMAC_MODE_RX_ACCEL 0x00000400 -+#define WDMAC_STATUS 0x00004c04 -+#define WDMAC_STATUS_TGTABORT 0x00000004 -+#define WDMAC_STATUS_MSTABORT 0x00000008 -+#define WDMAC_STATUS_PARITYERR 0x00000010 -+#define WDMAC_STATUS_ADDROFLOW 0x00000020 -+#define WDMAC_STATUS_FIFOOFLOW 0x00000040 -+#define WDMAC_STATUS_FIFOURUN 0x00000080 -+#define WDMAC_STATUS_FIFOOREAD 0x00000100 -+#define WDMAC_STATUS_LNGREAD 0x00000200 -+/* 0x4c08 --> 0x5000 unused */ -+ -+/* Per-cpu register offsets (arm9) */ -+#define CPU_MODE 0x00000000 -+#define CPU_MODE_RESET 0x00000001 -+#define CPU_MODE_HALT 0x00000400 -+#define CPU_STATE 0x00000004 -+#define CPU_EVTMASK 0x00000008 -+/* 0xc --> 0x1c reserved */ -+#define CPU_PC 0x0000001c -+#define CPU_INSN 0x00000020 -+#define CPU_SPAD_UFLOW 0x00000024 -+#define CPU_WDOG_CLEAR 0x00000028 -+#define CPU_WDOG_VECTOR 0x0000002c -+#define CPU_WDOG_PC 0x00000030 -+#define CPU_HW_BP 0x00000034 -+/* 0x38 --> 0x44 unused */ -+#define CPU_WDOG_SAVED_STATE 0x00000044 -+#define CPU_LAST_BRANCH_ADDR 0x00000048 -+#define CPU_SPAD_UFLOW_SET 0x0000004c -+/* 0x50 --> 0x200 unused */ -+#define CPU_R0 0x00000200 -+#define CPU_R1 0x00000204 -+#define CPU_R2 0x00000208 -+#define CPU_R3 0x0000020c -+#define CPU_R4 0x00000210 -+#define CPU_R5 0x00000214 -+#define CPU_R6 0x00000218 -+#define CPU_R7 0x0000021c -+#define CPU_R8 0x00000220 -+#define CPU_R9 0x00000224 -+#define CPU_R10 0x00000228 -+#define CPU_R11 0x0000022c -+#define CPU_R12 0x00000230 -+#define CPU_R13 0x00000234 -+#define CPU_R14 0x00000238 -+#define CPU_R15 0x0000023c -+#define CPU_R16 0x00000240 -+#define CPU_R17 0x00000244 -+#define CPU_R18 0x00000248 -+#define CPU_R19 0x0000024c -+#define CPU_R20 0x00000250 -+#define CPU_R21 0x00000254 -+#define CPU_R22 0x00000258 -+#define CPU_R23 0x0000025c -+#define CPU_R24 0x00000260 -+#define CPU_R25 0x00000264 -+#define CPU_R26 0x00000268 -+#define CPU_R27 0x0000026c -+#define CPU_R28 0x00000270 -+#define CPU_R29 0x00000274 -+#define CPU_R30 0x00000278 -+#define CPU_R31 0x0000027c -+/* 0x280 --> 0x400 unused */ -+ -+#define RX_CPU_BASE 0x00005000 -+#define TX_CPU_BASE 0x00005400 -+ -+/* Mailboxes */ -+#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ -+#define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */ -+#define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */ -+#define GRCMBOX_INTERRUPT_3 0x00005818 /* 64-bit */ -+#define GRCMBOX_GENERAL_0 0x00005820 /* 64-bit */ -+#define GRCMBOX_GENERAL_1 0x00005828 /* 64-bit */ -+#define GRCMBOX_GENERAL_2 0x00005830 /* 64-bit */ -+#define GRCMBOX_GENERAL_3 0x00005838 /* 64-bit */ -+#define GRCMBOX_GENERAL_4 0x00005840 /* 64-bit */ -+#define GRCMBOX_GENERAL_5 0x00005848 /* 64-bit */ -+#define GRCMBOX_GENERAL_6 0x00005850 /* 64-bit */ -+#define GRCMBOX_GENERAL_7 0x00005858 /* 64-bit */ -+#define GRCMBOX_RELOAD_STAT 0x00005860 /* 64-bit */ -+#define GRCMBOX_RCVSTD_PROD_IDX 0x00005868 /* 64-bit */ -+#define GRCMBOX_RCVJUMBO_PROD_IDX 0x00005870 /* 64-bit */ -+#define GRCMBOX_RCVMINI_PROD_IDX 0x00005878 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_0 0x00005880 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_1 0x00005888 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_2 0x00005890 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_3 0x00005898 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_4 0x000058a0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_5 0x000058a8 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_6 0x000058b0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_7 0x000058b8 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_8 0x000058c0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_9 0x000058c8 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_10 0x000058d0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_11 0x000058d8 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_12 0x000058e0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_13 0x000058e8 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_14 0x000058f0 /* 64-bit */ -+#define GRCMBOX_RCVRET_CON_IDX_15 0x000058f8 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_0 0x00005900 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_1 0x00005908 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_2 0x00005910 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_3 0x00005918 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_4 0x00005920 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_5 0x00005928 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_6 0x00005930 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_7 0x00005938 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_8 0x00005940 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_9 0x00005948 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_10 0x00005950 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_11 0x00005958 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_12 0x00005960 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_13 0x00005968 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_14 0x00005970 /* 64-bit */ -+#define GRCMBOX_SNDHOST_PROD_IDX_15 0x00005978 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_0 0x00005980 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_1 0x00005988 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_2 0x00005990 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_3 0x00005998 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_4 0x000059a0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_5 0x000059a8 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_6 0x000059b0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_7 0x000059b8 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_8 0x000059c0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_9 0x000059c8 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_10 0x000059d0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_11 0x000059d8 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_12 0x000059e0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_13 0x000059e8 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_14 0x000059f0 /* 64-bit */ -+#define GRCMBOX_SNDNIC_PROD_IDX_15 0x000059f8 /* 64-bit */ -+#define GRCMBOX_HIGH_PRIO_EV_VECTOR 0x00005a00 -+#define GRCMBOX_HIGH_PRIO_EV_MASK 0x00005a04 -+#define GRCMBOX_LOW_PRIO_EV_VEC 0x00005a08 -+#define GRCMBOX_LOW_PRIO_EV_MASK 0x00005a0c -+/* 0x5a10 --> 0x5c00 */ -+ -+/* Flow Through queues */ -+#define FTQ_RESET 0x00005c00 -+/* 0x5c04 --> 0x5c10 unused */ -+#define FTQ_DMA_NORM_READ_CTL 0x00005c10 -+#define FTQ_DMA_NORM_READ_FULL_CNT 0x00005c14 -+#define FTQ_DMA_NORM_READ_FIFO_ENQDEQ 0x00005c18 -+#define FTQ_DMA_NORM_READ_WRITE_PEEK 0x00005c1c -+#define FTQ_DMA_HIGH_READ_CTL 0x00005c20 -+#define FTQ_DMA_HIGH_READ_FULL_CNT 0x00005c24 -+#define FTQ_DMA_HIGH_READ_FIFO_ENQDEQ 0x00005c28 -+#define FTQ_DMA_HIGH_READ_WRITE_PEEK 0x00005c2c -+#define FTQ_DMA_COMP_DISC_CTL 0x00005c30 -+#define FTQ_DMA_COMP_DISC_FULL_CNT 0x00005c34 -+#define FTQ_DMA_COMP_DISC_FIFO_ENQDEQ 0x00005c38 -+#define FTQ_DMA_COMP_DISC_WRITE_PEEK 0x00005c3c -+#define FTQ_SEND_BD_COMP_CTL 0x00005c40 -+#define FTQ_SEND_BD_COMP_FULL_CNT 0x00005c44 -+#define FTQ_SEND_BD_COMP_FIFO_ENQDEQ 0x00005c48 -+#define FTQ_SEND_BD_COMP_WRITE_PEEK 0x00005c4c -+#define FTQ_SEND_DATA_INIT_CTL 0x00005c50 -+#define FTQ_SEND_DATA_INIT_FULL_CNT 0x00005c54 -+#define FTQ_SEND_DATA_INIT_FIFO_ENQDEQ 0x00005c58 -+#define FTQ_SEND_DATA_INIT_WRITE_PEEK 0x00005c5c -+#define FTQ_DMA_NORM_WRITE_CTL 0x00005c60 -+#define FTQ_DMA_NORM_WRITE_FULL_CNT 0x00005c64 -+#define FTQ_DMA_NORM_WRITE_FIFO_ENQDEQ 0x00005c68 -+#define FTQ_DMA_NORM_WRITE_WRITE_PEEK 0x00005c6c -+#define FTQ_DMA_HIGH_WRITE_CTL 0x00005c70 -+#define FTQ_DMA_HIGH_WRITE_FULL_CNT 0x00005c74 -+#define FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ 0x00005c78 -+#define FTQ_DMA_HIGH_WRITE_WRITE_PEEK 0x00005c7c -+#define FTQ_SWTYPE1_CTL 0x00005c80 -+#define FTQ_SWTYPE1_FULL_CNT 0x00005c84 -+#define FTQ_SWTYPE1_FIFO_ENQDEQ 0x00005c88 -+#define FTQ_SWTYPE1_WRITE_PEEK 0x00005c8c -+#define FTQ_SEND_DATA_COMP_CTL 0x00005c90 -+#define FTQ_SEND_DATA_COMP_FULL_CNT 0x00005c94 -+#define FTQ_SEND_DATA_COMP_FIFO_ENQDEQ 0x00005c98 -+#define FTQ_SEND_DATA_COMP_WRITE_PEEK 0x00005c9c -+#define FTQ_HOST_COAL_CTL 0x00005ca0 -+#define FTQ_HOST_COAL_FULL_CNT 0x00005ca4 -+#define FTQ_HOST_COAL_FIFO_ENQDEQ 0x00005ca8 -+#define FTQ_HOST_COAL_WRITE_PEEK 0x00005cac -+#define FTQ_MAC_TX_CTL 0x00005cb0 -+#define FTQ_MAC_TX_FULL_CNT 0x00005cb4 -+#define FTQ_MAC_TX_FIFO_ENQDEQ 0x00005cb8 -+#define FTQ_MAC_TX_WRITE_PEEK 0x00005cbc -+#define FTQ_MB_FREE_CTL 0x00005cc0 -+#define FTQ_MB_FREE_FULL_CNT 0x00005cc4 -+#define FTQ_MB_FREE_FIFO_ENQDEQ 0x00005cc8 -+#define FTQ_MB_FREE_WRITE_PEEK 0x00005ccc -+#define FTQ_RCVBD_COMP_CTL 0x00005cd0 -+#define FTQ_RCVBD_COMP_FULL_CNT 0x00005cd4 -+#define FTQ_RCVBD_COMP_FIFO_ENQDEQ 0x00005cd8 -+#define FTQ_RCVBD_COMP_WRITE_PEEK 0x00005cdc -+#define FTQ_RCVLST_PLMT_CTL 0x00005ce0 -+#define FTQ_RCVLST_PLMT_FULL_CNT 0x00005ce4 -+#define FTQ_RCVLST_PLMT_FIFO_ENQDEQ 0x00005ce8 -+#define FTQ_RCVLST_PLMT_WRITE_PEEK 0x00005cec -+#define FTQ_RCVDATA_INI_CTL 0x00005cf0 -+#define FTQ_RCVDATA_INI_FULL_CNT 0x00005cf4 -+#define FTQ_RCVDATA_INI_FIFO_ENQDEQ 0x00005cf8 -+#define FTQ_RCVDATA_INI_WRITE_PEEK 0x00005cfc -+#define FTQ_RCVDATA_COMP_CTL 0x00005d00 -+#define FTQ_RCVDATA_COMP_FULL_CNT 0x00005d04 -+#define FTQ_RCVDATA_COMP_FIFO_ENQDEQ 0x00005d08 -+#define FTQ_RCVDATA_COMP_WRITE_PEEK 0x00005d0c -+#define FTQ_SWTYPE2_CTL 0x00005d10 -+#define FTQ_SWTYPE2_FULL_CNT 0x00005d14 -+#define FTQ_SWTYPE2_FIFO_ENQDEQ 0x00005d18 -+#define FTQ_SWTYPE2_WRITE_PEEK 0x00005d1c -+/* 0x5d20 --> 0x6000 unused */ -+ -+/* Message signaled interrupt registers */ -+#define MSGINT_MODE 0x00006000 -+#define MSGINT_MODE_RESET 0x00000001 -+#define MSGINT_MODE_ENABLE 0x00000002 -+#define MSGINT_STATUS 0x00006004 -+#define MSGINT_FIFO 0x00006008 -+/* 0x600c --> 0x6400 unused */ -+ -+/* DMA completion registers */ -+#define DMAC_MODE 0x00006400 -+#define DMAC_MODE_RESET 0x00000001 -+#define DMAC_MODE_ENABLE 0x00000002 -+/* 0x6404 --> 0x6800 unused */ -+ -+/* GRC registers */ -+#define GRC_MODE 0x00006800 -+#define GRC_MODE_UPD_ON_COAL 0x00000001 -+#define GRC_MODE_BSWAP_NONFRM_DATA 0x00000002 -+#define GRC_MODE_WSWAP_NONFRM_DATA 0x00000004 -+#define GRC_MODE_BSWAP_DATA 0x00000010 -+#define GRC_MODE_WSWAP_DATA 0x00000020 -+#define GRC_MODE_SPLITHDR 0x00000100 -+#define GRC_MODE_NOFRM_CRACKING 0x00000200 -+#define GRC_MODE_INCL_CRC 0x00000400 -+#define GRC_MODE_ALLOW_BAD_FRMS 0x00000800 -+#define GRC_MODE_NOIRQ_ON_SENDS 0x00002000 -+#define GRC_MODE_NOIRQ_ON_RCV 0x00004000 -+#define GRC_MODE_FORCE_PCI32BIT 0x00008000 -+#define GRC_MODE_HOST_STACKUP 0x00010000 -+#define GRC_MODE_HOST_SENDBDS 0x00020000 -+#define GRC_MODE_NO_TX_PHDR_CSUM 0x00100000 -+#define GRC_MODE_NO_RX_PHDR_CSUM 0x00800000 -+#define GRC_MODE_IRQ_ON_TX_CPU_ATTN 0x01000000 -+#define GRC_MODE_IRQ_ON_RX_CPU_ATTN 0x02000000 -+#define GRC_MODE_IRQ_ON_MAC_ATTN 0x04000000 -+#define GRC_MODE_IRQ_ON_DMA_ATTN 0x08000000 -+#define GRC_MODE_IRQ_ON_FLOW_ATTN 0x10000000 -+#define GRC_MODE_4X_NIC_SEND_RINGS 0x20000000 -+#define GRC_MODE_MCAST_FRM_ENABLE 0x40000000 -+#define GRC_MISC_CFG 0x00006804 -+#define GRC_MISC_CFG_CORECLK_RESET 0x00000001 -+#define GRC_MISC_CFG_PRESCALAR_MASK 0x000000fe -+#define GRC_MISC_CFG_PRESCALAR_SHIFT 1 -+#define GRC_MISC_CFG_BOARD_ID_MASK 0x0001e000 -+#define GRC_MISC_CFG_BOARD_ID_5700 0x0001e000 -+#define GRC_MISC_CFG_BOARD_ID_5701 0x00000000 -+#define GRC_MISC_CFG_BOARD_ID_5702FE 0x00004000 -+#define GRC_MISC_CFG_BOARD_ID_5703 0x00000000 -+#define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000 -+#define GRC_MISC_CFG_BOARD_ID_5704 0x00000000 -+#define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000 -+#define GRC_MISC_CFG_BOARD_ID_5704_A2 0x00008000 -+#define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 -+#define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 -+#define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 -+#define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 -+#define GRC_LOCAL_CTRL 0x00006808 -+#define GRC_LCLCTRL_INT_ACTIVE 0x00000001 -+#define GRC_LCLCTRL_CLEARINT 0x00000002 -+#define GRC_LCLCTRL_SETINT 0x00000004 -+#define GRC_LCLCTRL_INT_ON_ATTN 0x00000008 -+#define GRC_LCLCTRL_GPIO_INPUT0 0x00000100 -+#define GRC_LCLCTRL_GPIO_INPUT1 0x00000200 -+#define GRC_LCLCTRL_GPIO_INPUT2 0x00000400 -+#define GRC_LCLCTRL_GPIO_OE0 0x00000800 -+#define GRC_LCLCTRL_GPIO_OE1 0x00001000 -+#define GRC_LCLCTRL_GPIO_OE2 0x00002000 -+#define GRC_LCLCTRL_GPIO_OUTPUT0 0x00004000 -+#define GRC_LCLCTRL_GPIO_OUTPUT1 0x00008000 -+#define GRC_LCLCTRL_GPIO_OUTPUT2 0x00010000 -+#define GRC_LCLCTRL_EXTMEM_ENABLE 0x00020000 -+#define GRC_LCLCTRL_MEMSZ_MASK 0x001c0000 -+#define GRC_LCLCTRL_MEMSZ_256K 0x00000000 -+#define GRC_LCLCTRL_MEMSZ_512K 0x00040000 -+#define GRC_LCLCTRL_MEMSZ_1M 0x00080000 -+#define GRC_LCLCTRL_MEMSZ_2M 0x000c0000 -+#define GRC_LCLCTRL_MEMSZ_4M 0x00100000 -+#define GRC_LCLCTRL_MEMSZ_8M 0x00140000 -+#define GRC_LCLCTRL_MEMSZ_16M 0x00180000 -+#define GRC_LCLCTRL_BANK_SELECT 0x00200000 -+#define GRC_LCLCTRL_SSRAM_TYPE 0x00400000 -+#define GRC_LCLCTRL_AUTO_SEEPROM 0x01000000 -+#define GRC_TIMER 0x0000680c -+#define GRC_RX_CPU_EVENT 0x00006810 -+#define GRC_RX_TIMER_REF 0x00006814 -+#define GRC_RX_CPU_SEM 0x00006818 -+#define GRC_REMOTE_RX_CPU_ATTN 0x0000681c -+#define GRC_TX_CPU_EVENT 0x00006820 -+#define GRC_TX_TIMER_REF 0x00006824 -+#define GRC_TX_CPU_SEM 0x00006828 -+#define GRC_REMOTE_TX_CPU_ATTN 0x0000682c -+#define GRC_MEM_POWER_UP 0x00006830 /* 64-bit */ -+#define GRC_EEPROM_ADDR 0x00006838 -+#define EEPROM_ADDR_WRITE 0x00000000 -+#define EEPROM_ADDR_READ 0x80000000 -+#define EEPROM_ADDR_COMPLETE 0x40000000 -+#define EEPROM_ADDR_FSM_RESET 0x20000000 -+#define EEPROM_ADDR_DEVID_MASK 0x1c000000 -+#define EEPROM_ADDR_DEVID_SHIFT 26 -+#define EEPROM_ADDR_START 0x02000000 -+#define EEPROM_ADDR_CLKPERD_SHIFT 16 -+#define EEPROM_ADDR_ADDR_MASK 0x0000ffff -+#define EEPROM_ADDR_ADDR_SHIFT 0 -+#define EEPROM_DEFAULT_CLOCK_PERIOD 0x60 -+#define EEPROM_CHIP_SIZE (64 * 1024) -+#define GRC_EEPROM_DATA 0x0000683c -+#define GRC_EEPROM_CTRL 0x00006840 -+#define GRC_MDI_CTRL 0x00006844 -+#define GRC_SEEPROM_DELAY 0x00006848 -+/* 0x684c --> 0x6c00 unused */ -+ -+/* 0x6c00 --> 0x7000 unused */ -+ -+/* NVRAM Control registers */ -+#define NVRAM_CMD 0x00007000 -+#define NVRAM_CMD_RESET 0x00000001 -+#define NVRAM_CMD_DONE 0x00000008 -+#define NVRAM_CMD_GO 0x00000010 -+#define NVRAM_CMD_WR 0x00000020 -+#define NVRAM_CMD_RD 0x00000000 -+#define NVRAM_CMD_ERASE 0x00000040 -+#define NVRAM_CMD_FIRST 0x00000080 -+#define NVRAM_CMD_LAST 0x00000100 -+#define NVRAM_STAT 0x00007004 -+#define NVRAM_WRDATA 0x00007008 -+#define NVRAM_ADDR 0x0000700c -+#define NVRAM_ADDR_MSK 0x00ffffff -+#define NVRAM_RDDATA 0x00007010 -+#define NVRAM_CFG1 0x00007014 -+#define NVRAM_CFG1_FLASHIF_ENAB 0x00000001 -+#define NVRAM_CFG1_BUFFERED_MODE 0x00000002 -+#define NVRAM_CFG1_PASS_THRU 0x00000004 -+#define NVRAM_CFG1_BIT_BANG 0x00000008 -+#define NVRAM_CFG1_COMPAT_BYPASS 0x80000000 -+#define NVRAM_CFG2 0x00007018 -+#define NVRAM_CFG3 0x0000701c -+#define NVRAM_SWARB 0x00007020 -+#define SWARB_REQ_SET0 0x00000001 -+#define SWARB_REQ_SET1 0x00000002 -+#define SWARB_REQ_SET2 0x00000004 -+#define SWARB_REQ_SET3 0x00000008 -+#define SWARB_REQ_CLR0 0x00000010 -+#define SWARB_REQ_CLR1 0x00000020 -+#define SWARB_REQ_CLR2 0x00000040 -+#define SWARB_REQ_CLR3 0x00000080 -+#define SWARB_GNT0 0x00000100 -+#define SWARB_GNT1 0x00000200 -+#define SWARB_GNT2 0x00000400 -+#define SWARB_GNT3 0x00000800 -+#define SWARB_REQ0 0x00001000 -+#define SWARB_REQ1 0x00002000 -+#define SWARB_REQ2 0x00004000 -+#define SWARB_REQ3 0x00008000 -+#define NVRAM_BUFFERED_PAGE_SIZE 264 -+#define NVRAM_BUFFERED_PAGE_POS 9 -+/* 0x7024 --> 0x7400 unused */ -+ -+/* 0x7400 --> 0x8000 unused */ -+ -+/* 32K Window into NIC internal memory */ -+#define NIC_SRAM_WIN_BASE 0x00008000 -+ -+/* Offsets into first 32k of NIC internal memory. */ -+#define NIC_SRAM_PAGE_ZERO 0x00000000 -+#define NIC_SRAM_SEND_RCB 0x00000100 /* 16 * TG3_BDINFO_... */ -+#define NIC_SRAM_RCV_RET_RCB 0x00000200 /* 16 * TG3_BDINFO_... */ -+#define NIC_SRAM_STATS_BLK 0x00000300 -+#define NIC_SRAM_STATUS_BLK 0x00000b00 -+ -+#define NIC_SRAM_FIRMWARE_MBOX 0x00000b50 -+#define NIC_SRAM_FIRMWARE_MBOX_MAGIC1 0x4B657654 -+#define NIC_SRAM_FIRMWARE_MBOX_MAGIC2 0x4861764b /* !dma on linkchg */ -+ -+#define NIC_SRAM_DATA_SIG 0x00000b54 -+#define NIC_SRAM_DATA_SIG_MAGIC 0x4b657654 /* ascii for 'KevT' */ -+ -+#define NIC_SRAM_DATA_CFG 0x00000b58 -+#define NIC_SRAM_DATA_CFG_LED_MODE_MASK 0x0000000c -+#define NIC_SRAM_DATA_CFG_LED_MODE_UNKNOWN 0x00000000 -+#define NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD 0x00000004 -+#define NIC_SRAM_DATA_CFG_LED_OPEN_DRAIN 0x00000004 -+#define NIC_SRAM_DATA_CFG_LED_LINK_SPD 0x00000008 -+#define NIC_SRAM_DATA_CFG_LED_OUTPUT 0x00000008 -+#define NIC_SRAM_DATA_CFG_PHY_TYPE_MASK 0x00000030 -+#define NIC_SRAM_DATA_CFG_PHY_TYPE_UNKNOWN 0x00000000 -+#define NIC_SRAM_DATA_CFG_PHY_TYPE_COPPER 0x00000010 -+#define NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER 0x00000020 -+#define NIC_SRAM_DATA_CFG_WOL_ENABLE 0x00000040 -+#define NIC_SRAM_DATA_CFG_ASF_ENABLE 0x00000080 -+#define NIC_SRAM_DATA_CFG_EEPROM_WP 0x00000100 -+#define NIC_SRAM_DATA_CFG_MINI_PCI 0x00001000 -+#define NIC_SRAM_DATA_CFG_FIBER_WOL 0x00004000 -+ -+#define NIC_SRAM_DATA_PHY_ID 0x00000b74 -+#define NIC_SRAM_DATA_PHY_ID1_MASK 0xffff0000 -+#define NIC_SRAM_DATA_PHY_ID2_MASK 0x0000ffff -+ -+#define NIC_SRAM_FW_CMD_MBOX 0x00000b78 -+#define FWCMD_NICDRV_ALIVE 0x00000001 -+#define FWCMD_NICDRV_PAUSE_FW 0x00000002 -+#define FWCMD_NICDRV_IPV4ADDR_CHG 0x00000003 -+#define FWCMD_NICDRV_IPV6ADDR_CHG 0x00000004 -+#define FWCMD_NICDRV_FIX_DMAR 0x00000005 -+#define FWCMD_NICDRV_FIX_DMAW 0x00000006 -+#define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c -+#define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80 -+#define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00 -+#define NIC_SRAM_FW_DRV_STATE_MBOX 0x00000c04 -+#define DRV_STATE_START 0x00000001 -+#define DRV_STATE_UNLOAD 0x00000002 -+#define DRV_STATE_WOL 0x00000003 -+#define DRV_STATE_SUSPEND 0x00000004 -+ -+#define NIC_SRAM_FW_RESET_TYPE_MBOX 0x00000c08 -+ -+#define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14 -+#define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18 -+ -+#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 -+ -+#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 -+#define NIC_SRAM_DMA_DESC_POOL_SIZE 0x00002000 -+#define NIC_SRAM_TX_BUFFER_DESC 0x00004000 /* 512 entries */ -+#define NIC_SRAM_RX_BUFFER_DESC 0x00006000 /* 256 entries */ -+#define NIC_SRAM_RX_JUMBO_BUFFER_DESC 0x00007000 /* 256 entries */ -+#define NIC_SRAM_MBUF_POOL_BASE 0x00008000 -+#define NIC_SRAM_MBUF_POOL_SIZE96 0x00018000 -+#define NIC_SRAM_MBUF_POOL_SIZE64 0x00010000 -+#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000 -+#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000 -+ -+/* Currently this is fixed. */ -+#define PHY_ADDR 0x01 -+ -+/* Tigon3 specific PHY MII registers. */ -+#define TG3_BMCR_SPEED1000 0x0040 -+ -+#define MII_TG3_CTRL 0x09 /* 1000-baseT control register */ -+#define MII_TG3_CTRL_ADV_1000_HALF 0x0100 -+#define MII_TG3_CTRL_ADV_1000_FULL 0x0200 -+#define MII_TG3_CTRL_AS_MASTER 0x0800 -+#define MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000 -+ -+#define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ -+#define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 -+#define MII_TG3_EXT_CTRL_TBI 0x8000 -+ -+#define MII_TG3_EXT_STAT 0x11 /* Extended status register */ -+#define MII_TG3_EXT_STAT_LPASS 0x0100 -+ -+#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ -+ -+#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ -+ -+#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ -+ -+#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ -+#define MII_TG3_AUX_STAT_LPASS 0x0004 -+#define MII_TG3_AUX_STAT_SPDMASK 0x0700 -+#define MII_TG3_AUX_STAT_10HALF 0x0100 -+#define MII_TG3_AUX_STAT_10FULL 0x0200 -+#define MII_TG3_AUX_STAT_100HALF 0x0300 -+#define MII_TG3_AUX_STAT_100_4 0x0400 -+#define MII_TG3_AUX_STAT_100FULL 0x0500 -+#define MII_TG3_AUX_STAT_1000HALF 0x0600 -+#define MII_TG3_AUX_STAT_1000FULL 0x0700 -+ -+#define MII_TG3_ISTAT 0x1a /* IRQ status register */ -+#define MII_TG3_IMASK 0x1b /* IRQ mask register */ -+ -+/* ISTAT/IMASK event bits */ -+#define MII_TG3_INT_LINKCHG 0x0002 -+#define MII_TG3_INT_SPEEDCHG 0x0004 -+#define MII_TG3_INT_DUPLEXCHG 0x0008 -+#define MII_TG3_INT_ANEG_PAGE_RX 0x0400 -+ -+/* XXX Add this to mii.h */ -+#ifndef ADVERTISE_PAUSE -+#define ADVERTISE_PAUSE_CAP 0x0400 -+#endif -+#ifndef ADVERTISE_PAUSE_ASYM -+#define ADVERTISE_PAUSE_ASYM 0x0800 -+#endif -+#ifndef LPA_PAUSE -+#define LPA_PAUSE_CAP 0x0400 -+#endif -+#ifndef LPA_PAUSE_ASYM -+#define LPA_PAUSE_ASYM 0x0800 -+#endif -+ -+/* There are two ways to manage the TX descriptors on the tigon3. -+ * Either the descriptors are in host DMA'able memory, or they -+ * exist only in the cards on-chip SRAM. All 16 send bds are under -+ * the same mode, they may not be configured individually. -+ * -+ * The mode we use is controlled by TG3_FLAG_HOST_TXDS in tp->tg3_flags. -+ * -+ * To use host memory TX descriptors: -+ * 1) Set GRC_MODE_HOST_SENDBDS in GRC_MODE register. -+ * Make sure GRC_MODE_4X_NIC_SEND_RINGS is clear. -+ * 2) Allocate DMA'able memory. -+ * 3) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: -+ * a) Set TG3_BDINFO_HOST_ADDR to DMA address of memory -+ * obtained in step 2 -+ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC. -+ * c) Set len field of TG3_BDINFO_MAXLEN_FLAGS to number -+ * of TX descriptors. Leave flags field clear. -+ * 4) Access TX descriptors via host memory. The chip -+ * will refetch into local SRAM as needed when producer -+ * index mailboxes are updated. -+ * -+ * To use on-chip TX descriptors: -+ * 1) Set GRC_MODE_4X_NIC_SEND_RINGS in GRC_MODE register. -+ * Make sure GRC_MODE_HOST_SENDBDS is clear. -+ * 2) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: -+ * a) Set TG3_BDINFO_HOST_ADDR to zero. -+ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC -+ * c) TG3_BDINFO_MAXLEN_FLAGS is don't care. -+ * 3) Access TX descriptors directly in on-chip SRAM -+ * using normal {read,write}l(). (and not using -+ * pointer dereferencing of ioremap()'d memory like -+ * the broken Broadcom driver does) -+ * -+ * Note that BDINFO_FLAGS_DISABLED should be set in the flags field of -+ * TG3_BDINFO_MAXLEN_FLAGS of all unused SEND_RCB indices. -+ */ -+struct tg3_tx_buffer_desc { -+ uint32_t addr_hi; -+ uint32_t addr_lo; -+ -+ uint32_t len_flags; -+#define TXD_FLAG_TCPUDP_CSUM 0x0001 -+#define TXD_FLAG_IP_CSUM 0x0002 -+#define TXD_FLAG_END 0x0004 -+#define TXD_FLAG_IP_FRAG 0x0008 -+#define TXD_FLAG_IP_FRAG_END 0x0010 -+#define TXD_FLAG_VLAN 0x0040 -+#define TXD_FLAG_COAL_NOW 0x0080 -+#define TXD_FLAG_CPU_PRE_DMA 0x0100 -+#define TXD_FLAG_CPU_POST_DMA 0x0200 -+#define TXD_FLAG_ADD_SRC_ADDR 0x1000 -+#define TXD_FLAG_CHOOSE_SRC_ADDR 0x6000 -+#define TXD_FLAG_NO_CRC 0x8000 -+#define TXD_LEN_SHIFT 16 -+ -+ uint32_t vlan_tag; -+#define TXD_VLAN_TAG_SHIFT 0 -+#define TXD_MSS_SHIFT 16 -+}; -+ -+#define TXD_ADDR 0x00UL /* 64-bit */ -+#define TXD_LEN_FLAGS 0x08UL /* 32-bit (upper 16-bits are len) */ -+#define TXD_VLAN_TAG 0x0cUL /* 32-bit (upper 16-bits are tag) */ -+#define TXD_SIZE 0x10UL -+ -+struct tg3_rx_buffer_desc { -+ uint32_t addr_hi; -+ uint32_t addr_lo; -+ -+ uint32_t idx_len; -+#define RXD_IDX_MASK 0xffff0000 -+#define RXD_IDX_SHIFT 16 -+#define RXD_LEN_MASK 0x0000ffff -+#define RXD_LEN_SHIFT 0 -+ -+ uint32_t type_flags; -+#define RXD_TYPE_SHIFT 16 -+#define RXD_FLAGS_SHIFT 0 -+ -+#define RXD_FLAG_END 0x0004 -+#define RXD_FLAG_MINI 0x0800 -+#define RXD_FLAG_JUMBO 0x0020 -+#define RXD_FLAG_VLAN 0x0040 -+#define RXD_FLAG_ERROR 0x0400 -+#define RXD_FLAG_IP_CSUM 0x1000 -+#define RXD_FLAG_TCPUDP_CSUM 0x2000 -+#define RXD_FLAG_IS_TCP 0x4000 -+ -+ uint32_t ip_tcp_csum; -+#define RXD_IPCSUM_MASK 0xffff0000 -+#define RXD_IPCSUM_SHIFT 16 -+#define RXD_TCPCSUM_MASK 0x0000ffff -+#define RXD_TCPCSUM_SHIFT 0 -+ -+ uint32_t err_vlan; -+ -+#define RXD_VLAN_MASK 0x0000ffff -+ -+#define RXD_ERR_BAD_CRC 0x00010000 -+#define RXD_ERR_COLLISION 0x00020000 -+#define RXD_ERR_LINK_LOST 0x00040000 -+#define RXD_ERR_PHY_DECODE 0x00080000 -+#define RXD_ERR_ODD_NIBBLE_RCVD_MII 0x00100000 -+#define RXD_ERR_MAC_ABRT 0x00200000 -+#define RXD_ERR_TOO_SMALL 0x00400000 -+#define RXD_ERR_NO_RESOURCES 0x00800000 -+#define RXD_ERR_HUGE_FRAME 0x01000000 -+#define RXD_ERR_MASK 0xffff0000 -+ -+ uint32_t reserved; -+ uint32_t opaque; -+#define RXD_OPAQUE_INDEX_MASK 0x0000ffff -+#define RXD_OPAQUE_INDEX_SHIFT 0 -+#define RXD_OPAQUE_RING_STD 0x00010000 -+#define RXD_OPAQUE_RING_JUMBO 0x00020000 -+#define RXD_OPAQUE_RING_MINI 0x00040000 -+#define RXD_OPAQUE_RING_MASK 0x00070000 -+}; -+ -+struct tg3_ext_rx_buffer_desc { -+ struct { -+ uint32_t addr_hi; -+ uint32_t addr_lo; -+ } addrlist[3]; -+ uint32_t len2_len1; -+ uint32_t resv_len3; -+ struct tg3_rx_buffer_desc std; -+}; -+ -+/* We only use this when testing out the DMA engine -+ * at probe time. This is the internal format of buffer -+ * descriptors used by the chip at NIC_SRAM_DMA_DESCS. -+ */ -+struct tg3_internal_buffer_desc { -+ uint32_t addr_hi; -+ uint32_t addr_lo; -+ uint32_t nic_mbuf; -+ /* XXX FIX THIS */ -+#if __BYTE_ORDER == __BIG_ENDIAN -+ uint16_t cqid_sqid; -+ uint16_t len; -+#else -+ uint16_t len; -+ uint16_t cqid_sqid; -+#endif -+ uint32_t flags; -+ uint32_t __cookie1; -+ uint32_t __cookie2; -+ uint32_t __cookie3; -+}; -+ -+#define TG3_HW_STATUS_SIZE 0x50 -+struct tg3_hw_status { -+ uint32_t status; -+#define SD_STATUS_UPDATED 0x00000001 -+#define SD_STATUS_LINK_CHG 0x00000002 -+#define SD_STATUS_ERROR 0x00000004 -+ -+ uint32_t status_tag; -+ -+#if __BYTE_ORDER == __BIG_ENDIAN -+ uint16_t rx_consumer; -+ uint16_t rx_jumbo_consumer; -+#else -+ uint16_t rx_jumbo_consumer; -+ uint16_t rx_consumer; -+#endif -+ -+#if __BYTE_ORDER == __BIG_ENDIAN -+ uint16_t reserved; -+ uint16_t rx_mini_consumer; -+#else -+ uint16_t rx_mini_consumer; -+ uint16_t reserved; -+#endif -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ uint16_t tx_consumer; -+ uint16_t rx_producer; -+#else -+ uint16_t rx_producer; -+ uint16_t tx_consumer; -+#endif -+ } idx[16]; -+}; -+ -+typedef struct { -+ uint32_t high, low; -+} tg3_stat64_t; -+ -+struct tg3_hw_stats { -+ uint8_t __reserved0[0x400-0x300]; -+ -+ /* Statistics maintained by Receive MAC. */ -+ tg3_stat64_t rx_octets; -+ uint64_t __reserved1; -+ tg3_stat64_t rx_fragments; -+ tg3_stat64_t rx_ucast_packets; -+ tg3_stat64_t rx_mcast_packets; -+ tg3_stat64_t rx_bcast_packets; -+ tg3_stat64_t rx_fcs_errors; -+ tg3_stat64_t rx_align_errors; -+ tg3_stat64_t rx_xon_pause_rcvd; -+ tg3_stat64_t rx_xoff_pause_rcvd; -+ tg3_stat64_t rx_mac_ctrl_rcvd; -+ tg3_stat64_t rx_xoff_entered; -+ tg3_stat64_t rx_frame_too_long_errors; -+ tg3_stat64_t rx_jabbers; -+ tg3_stat64_t rx_undersize_packets; -+ tg3_stat64_t rx_in_length_errors; -+ tg3_stat64_t rx_out_length_errors; -+ tg3_stat64_t rx_64_or_less_octet_packets; -+ tg3_stat64_t rx_65_to_127_octet_packets; -+ tg3_stat64_t rx_128_to_255_octet_packets; -+ tg3_stat64_t rx_256_to_511_octet_packets; -+ tg3_stat64_t rx_512_to_1023_octet_packets; -+ tg3_stat64_t rx_1024_to_1522_octet_packets; -+ tg3_stat64_t rx_1523_to_2047_octet_packets; -+ tg3_stat64_t rx_2048_to_4095_octet_packets; -+ tg3_stat64_t rx_4096_to_8191_octet_packets; -+ tg3_stat64_t rx_8192_to_9022_octet_packets; -+ -+ uint64_t __unused0[37]; -+ -+ /* Statistics maintained by Transmit MAC. */ -+ tg3_stat64_t tx_octets; -+ uint64_t __reserved2; -+ tg3_stat64_t tx_collisions; -+ tg3_stat64_t tx_xon_sent; -+ tg3_stat64_t tx_xoff_sent; -+ tg3_stat64_t tx_flow_control; -+ tg3_stat64_t tx_mac_errors; -+ tg3_stat64_t tx_single_collisions; -+ tg3_stat64_t tx_mult_collisions; -+ tg3_stat64_t tx_deferred; -+ uint64_t __reserved3; -+ tg3_stat64_t tx_excessive_collisions; -+ tg3_stat64_t tx_late_collisions; -+ tg3_stat64_t tx_collide_2times; -+ tg3_stat64_t tx_collide_3times; -+ tg3_stat64_t tx_collide_4times; -+ tg3_stat64_t tx_collide_5times; -+ tg3_stat64_t tx_collide_6times; -+ tg3_stat64_t tx_collide_7times; -+ tg3_stat64_t tx_collide_8times; -+ tg3_stat64_t tx_collide_9times; -+ tg3_stat64_t tx_collide_10times; -+ tg3_stat64_t tx_collide_11times; -+ tg3_stat64_t tx_collide_12times; -+ tg3_stat64_t tx_collide_13times; -+ tg3_stat64_t tx_collide_14times; -+ tg3_stat64_t tx_collide_15times; -+ tg3_stat64_t tx_ucast_packets; -+ tg3_stat64_t tx_mcast_packets; -+ tg3_stat64_t tx_bcast_packets; -+ tg3_stat64_t tx_carrier_sense_errors; -+ tg3_stat64_t tx_discards; -+ tg3_stat64_t tx_errors; -+ -+ uint64_t __unused1[31]; -+ -+ /* Statistics maintained by Receive List Placement. */ -+ tg3_stat64_t COS_rx_packets[16]; -+ tg3_stat64_t COS_rx_filter_dropped; -+ tg3_stat64_t dma_writeq_full; -+ tg3_stat64_t dma_write_prioq_full; -+ tg3_stat64_t rxbds_empty; -+ tg3_stat64_t rx_discards; -+ tg3_stat64_t rx_errors; -+ tg3_stat64_t rx_threshold_hit; -+ -+ uint64_t __unused2[9]; -+ -+ /* Statistics maintained by Send Data Initiator. */ -+ tg3_stat64_t COS_out_packets[16]; -+ tg3_stat64_t dma_readq_full; -+ tg3_stat64_t dma_read_prioq_full; -+ tg3_stat64_t tx_comp_queue_full; -+ -+ /* Statistics maintained by Host Coalescing. */ -+ tg3_stat64_t ring_set_send_prod_index; -+ tg3_stat64_t ring_status_update; -+ tg3_stat64_t nic_irqs; -+ tg3_stat64_t nic_avoided_irqs; -+ tg3_stat64_t nic_tx_threshold_hit; -+ -+ uint8_t __reserved4[0xb00-0x9c0]; -+}; -+ -+enum phy_led_mode { -+ led_mode_auto, -+ led_mode_three_link, -+ led_mode_link10 -+}; -+ -+#if 0 -+/* 'mapping' is superfluous as the chip does not write into -+ * the tx/rx post rings so we could just fetch it from there. -+ * But the cache behavior is better how we are doing it now. -+ */ -+struct ring_info { -+ struct sk_buff *skb; -+ DECLARE_PCI_UNMAP_ADDR(mapping) -+}; -+ -+struct tx_ring_info { -+ struct sk_buff *skb; -+ DECLARE_PCI_UNMAP_ADDR(mapping) -+ uint32_t prev_vlan_tag; -+}; -+#endif -+ -+struct tg3_config_info { -+ uint32_t flags; -+}; -+ -+struct tg3_link_config { -+ /* Describes what we're trying to get. */ -+ uint32_t advertising; -+#if 0 -+ uint16_t speed; -+ uint8_t duplex; -+ uint8_t autoneg; -+#define SPEED_INVALID 0xffff -+#define DUPLEX_INVALID 0xff -+#define AUTONEG_INVALID 0xff -+#endif -+ -+ /* Describes what we actually have. */ -+ uint8_t active_speed; -+ uint8_t active_duplex; -+ -+ /* When we go in and out of low power mode we need -+ * to swap with this state. -+ */ -+#if 0 -+ int phy_is_low_power; -+ uint16_t orig_speed; -+ uint8_t orig_duplex; -+ uint8_t orig_autoneg; -+#endif -+}; -+ -+struct tg3_bufmgr_config { -+ uint32_t mbuf_read_dma_low_water; -+ uint32_t mbuf_mac_rx_low_water; -+ uint32_t mbuf_high_water; -+ -+ uint32_t mbuf_read_dma_low_water_jumbo; -+ uint32_t mbuf_mac_rx_low_water_jumbo; -+ uint32_t mbuf_high_water_jumbo; -+ -+ uint32_t dma_low_water; -+ uint32_t dma_high_water; -+}; -+ -+struct tg3 { -+#if 0 -+ /* SMP locking strategy: -+ * -+ * lock: Held during all operations except TX packet -+ * processing. -+ * -+ * tx_lock: Held during tg3_start_xmit{,_4gbug} and tg3_tx -+ * -+ * If you want to shut up all asynchronous processing you must -+ * acquire both locks, 'lock' taken before 'tx_lock'. IRQs must -+ * be disabled to take 'lock' but only softirq disabling is -+ * necessary for acquisition of 'tx_lock'. -+ */ -+ spinlock_t lock; -+ spinlock_t tx_lock; -+#endif -+ -+ uint32_t tx_prod; -+#if 0 -+ uint32_t tx_cons; -+#endif -+ uint32_t rx_rcb_ptr; -+ uint32_t rx_std_ptr; -+#if 0 -+ uint32_t rx_jumbo_ptr; -+ spinlock_t indirect_lock; -+ -+ struct net_device_stats net_stats; -+ struct net_device_stats net_stats_prev; -+#endif -+ unsigned long phy_crc_errors; -+ -+#if 0 -+ uint32_t rx_offset; -+#endif -+ uint32_t tg3_flags; -+#if 0 -+#define TG3_FLAG_HOST_TXDS 0x00000001 -+#endif -+#define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 -+#define TG3_FLAG_RX_CHECKSUMS 0x00000004 -+#define TG3_FLAG_USE_LINKCHG_REG 0x00000008 -+#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 -+#define TG3_FLAG_ENABLE_ASF 0x00000020 -+#define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040 -+#define TG3_FLAG_POLL_SERDES 0x00000080 -+#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 -+#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 -+#define TG3_FLAG_WOL_SPEED_100MB 0x00000400 -+#define TG3_FLAG_WOL_ENABLE 0x00000800 -+#define TG3_FLAG_EEPROM_WRITE_PROT 0x00001000 -+#define TG3_FLAG_NVRAM 0x00002000 -+#define TG3_FLAG_NVRAM_BUFFERED 0x00004000 -+#define TG3_FLAG_RX_PAUSE 0x00008000 -+#define TG3_FLAG_TX_PAUSE 0x00010000 -+#define TG3_FLAG_PCIX_MODE 0x00020000 -+#define TG3_FLAG_PCI_HIGH_SPEED 0x00040000 -+#define TG3_FLAG_PCI_32BIT 0x00080000 -+#define TG3_FLAG_NO_TX_PSEUDO_CSUM 0x00100000 -+#define TG3_FLAG_NO_RX_PSEUDO_CSUM 0x00200000 -+#define TG3_FLAG_SERDES_WOL_CAP 0x00400000 -+#define TG3_FLAG_JUMBO_ENABLE 0x00800000 -+#define TG3_FLAG_10_100_ONLY 0x01000000 -+#define TG3_FLAG_PAUSE_AUTONEG 0x02000000 -+#define TG3_FLAG_PAUSE_RX 0x04000000 -+#define TG3_FLAG_PAUSE_TX 0x08000000 -+#define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 -+#define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 -+#define TG3_FLAG_SPLIT_MODE 0x40000000 -+#define TG3_FLAG_INIT_COMPLETE 0x80000000 -+ -+ uint32_t tg3_flags2; -+#define TG3_FLG2_RESTART_TIMER 0x00000001 -+#define TG3_FLG2_SUN_5704 0x00000002 -+#define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 -+#define TG3_FLG2_IS_5788 0x00000008 -+#define TG3_FLG2_MAX_RXPEND_64 0x00000010 -+#define TG3_FLG2_TSO_CAPABLE 0x00000020 -+ -+ -+ -+ uint32_t split_mode_max_reqs; -+#define SPLIT_MODE_5704_MAX_REQ 3 -+ -+#if 0 -+ struct timer_list timer; -+ uint16_t timer_counter; -+ uint16_t timer_multiplier; -+ uint32_t timer_offset; -+ uint16_t asf_counter; -+ uint16_t asf_multiplier; -+#endif -+ -+ struct tg3_link_config link_config; -+ struct tg3_bufmgr_config bufmgr_config; -+ -+#if 0 -+ uint32_t rx_pending; -+ uint32_t rx_jumbo_pending; -+ uint32_t tx_pending; -+#endif -+ -+ /* cache h/w values, often passed straight to h/w */ -+ uint32_t rx_mode; -+ uint32_t tx_mode; -+ uint32_t mac_mode; -+ uint32_t mi_mode; -+ uint32_t misc_host_ctrl; -+ uint32_t grc_mode; -+ uint32_t grc_local_ctrl; -+ uint32_t dma_rwctrl; -+#if 0 -+ uint32_t coalesce_mode; -+#endif -+ -+ /* PCI block */ -+ uint16_t pci_chip_rev_id; -+#if 0 -+ uint8_t pci_cacheline_sz; -+ uint8_t pci_lat_timer; -+ uint8_t pci_hdr_type; -+ uint8_t pci_bist; -+#endif -+ uint32_t pci_cfg_state[64 / sizeof(uint32_t)]; -+ -+ int pm_cap; -+ -+ /* PHY info */ -+ uint32_t phy_id; -+#define PHY_ID_MASK 0xfffffff0 -+#define PHY_ID_BCM5400 0x60008040 -+#define PHY_ID_BCM5401 0x60008050 -+#define PHY_ID_BCM5411 0x60008070 -+#define PHY_ID_BCM5701 0x60008110 -+#define PHY_ID_BCM5703 0x60008160 -+#define PHY_ID_BCM5704 0x60008190 -+#define PHY_ID_BCM5705 0x600081a0 -+#define PHY_ID_BCM8002 0x60010140 -+#define PHY_ID_SERDES 0xfeedbee0 -+#define PHY_ID_INVALID 0xffffffff -+#define PHY_ID_REV_MASK 0x0000000f -+#define PHY_REV_BCM5401_B0 0x1 -+#define PHY_REV_BCM5401_B2 0x3 -+#define PHY_REV_BCM5401_C0 0x6 -+#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ -+ -+ enum phy_led_mode led_mode; -+ -+ char board_part_number[24]; -+ uint32_t nic_sram_data_cfg; -+ uint32_t pci_clock_ctrl; -+#if 0 -+ struct pci_device *pdev_peer; -+#endif -+ -+ /* This macro assumes the passed PHY ID is already masked -+ * with PHY_ID_MASK. -+ */ -+#define KNOWN_PHY_ID(X) \ -+ ((X) == PHY_ID_BCM5400 || (X) == PHY_ID_BCM5401 || \ -+ (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \ -+ (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \ -+ (X) == PHY_ID_BCM5705 || \ -+ (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES) -+ -+ unsigned long regs; -+ struct pci_device *pdev; -+ struct nic *nic; -+#if 0 -+ struct net_device *dev; -+#endif -+#if TG3_VLAN_TAG_USED -+ struct vlan_group *vlgrp; -+#endif -+ -+ struct tg3_rx_buffer_desc *rx_std; -+#if 0 -+ struct ring_info *rx_std_buffers; -+ dma_addr_t rx_std_mapping; -+ struct tg3_rx_buffer_desc *rx_jumbo; -+ struct ring_info *rx_jumbo_buffers; -+ dma_addr_t rx_jumbo_mapping; -+#endif -+ -+ struct tg3_rx_buffer_desc *rx_rcb; -+#if 0 -+ dma_addr_t rx_rcb_mapping; -+#endif -+ -+ /* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */ -+ struct tg3_tx_buffer_desc *tx_ring; -+#if 0 -+ struct tx_ring_info *tx_buffers; -+ dma_addr_t tx_desc_mapping; -+#endif -+ -+ struct tg3_hw_status *hw_status; -+#if 0 -+ dma_addr_t status_mapping; -+#endif -+#if 0 -+ uint32_t msg_enable; -+#endif -+ -+ struct tg3_hw_stats *hw_stats; -+#if 0 -+ dma_addr_t stats_mapping; -+#endif -+ -+ int carrier_ok; -+ uint16_t subsystem_vendor; -+ uint16_t subsystem_device; -+}; -+ -+#endif /* !(_T3_H) */ -Index: b/netboot/tiara.c -=================================================================== ---- a/netboot/tiara.c -+++ /dev/null -@@ -1,255 +0,0 @@ --/************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program -- --TIARA (Fujitsu Etherstar) NIC driver for Etherboot --Copyright (c) Ken Yap 1998 -- --Information gleaned from: -- --TIARA.ASM Packet driver by Brian Fisher, Queens U, Kingston, Ontario --Fujitsu MB86960 spec sheet (different chip but same family) --***************************************************************************/ -- --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- --/* to get some global routines like printf */ --#include "etherboot.h" --/* to get the interface to the body of the program */ --#include "nic.h" --#include "cards.h" -- --/* -- EtherStar I/O Register offsets --*/ -- --/* Offsets of registers */ --#define DLCR_XMIT_STAT 0x00 --#define DLCR_XMIT_MASK 0x01 --#define DLCR_RECV_STAT 0x02 --#define DLCR_RECV_MASK 0x03 --#define DLCR_XMIT_MODE 0x04 --#define DLCR_RECV_MODE 0x05 --#define DLCR_ENABLE 0x06 --#define DLCR_TDR_LOW 0x07 --#define DLCR_NODE_ID 0x08 --#define DLCR_TDR_HIGH 0x0F --#define BMPR_MEM_PORT 0x10 --#define BMPR_PKT_LEN 0x12 --#define BMPR_DMA_ENABLE 0x14 --#define PROM_ID 0x18 -- --#define TMST 0x80 --#define TMT_OK 0x80 --#define TMT_16COLL 0x02 --#define BUF_EMPTY 0x40 -- --#define CARD_DISABLE 0x80 /* written to DLCR_ENABLE to disable card */ --#define CARD_ENABLE 0 /* written to DLCR_ENABLE to enable card */ -- --#define CLEAR_STATUS 0x0F /* used to clear status info */ --/* -- 00001111B -- !!!!!!!!-------- -- !!!!!!!+--------CLEAR BUS WRITE ERROR -- !!!!!!+---------CLEAR 16 COLLISION -- !!!!!+----------CLEAR COLLISION -- !!!!+-----------CLEAR UNDERFLOW -- !!!+------------NC -- !!+-------------NC -- !+--------------NC -- +---------------NC --*/ -- --#define NO_TX_IRQS 0 /* written to clear transmit IRQs */ -- --#define CLR_RCV_STATUS 0xCF /* clears receive status */ -- --#define EN_RCV_IRQS 0x80 /* enable receive interrupts */ --/* -- 10000000B -- !!!!!!!!-------- -- !!!!!!!+--------ENABLE OVERFLOW -- !!!!!!+---------ENABLE CRC -- !!!!!+----------ENABLE ALIGN -- !!!!+-----------ENABLE SHORT PKT -- !!!+------------DISABLE REMOTE RESET -- !!+-------------RESERVED -- !+--------------RESERVED -- +---------------ENABLE PKT READY --*/ -- --#define XMIT_MODE 0x02 --/* -- 00000010B -- !!!!!!!!---------ENABLE CARRIER DETECT -- !!!!!!!+---------DISABLE LOOPBACK --*/ -- --#define RECV_MODE 0x02 --/* -- 00000010B -- !!!!!!!!---------ACCEPT ALL PACKETS -- !!!!!!!+---------ACCEPT PHYSICAL, MULTICAST, AND -- !!!!!!+----------BROADCAST PACKETS -- !!!!!+-----------DISABLE REMOTE RESET -- !!!!+------------DISABLE SHORT PACKETS -- !!!+-------------USE 6 BYTE ADDRESS -- !!+--------------NC -- !+---------------NC -- +----------------DISABLE CRC TEST MODE --*/ -- --/* NIC specific static variables go here */ -- --static unsigned short ioaddr; -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void tiara_reset(struct nic *nic) --{ -- int i; -- -- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); -- outb(CLEAR_STATUS, ioaddr + DLCR_XMIT_STAT); -- outb(NO_TX_IRQS, ioaddr + DLCR_XMIT_MASK); -- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); -- outb(XMIT_MODE, ioaddr + DLCR_XMIT_MODE); -- outb(RECV_MODE, ioaddr + DLCR_RECV_MODE); -- /* Vacuum recv buffer */ -- while ((inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) == 0) -- inb(ioaddr + BMPR_MEM_PORT); -- /* Set node address */ -- for (i = 0; i < ETH_ALEN; ++i) -- outb(nic->node_addr[i], ioaddr + DLCR_NODE_ID + i); -- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); -- outb(CARD_ENABLE, ioaddr + DLCR_ENABLE); --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int tiara_poll(struct nic *nic) --{ -- unsigned int len; -- -- if (inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) -- return (0); -- /* Ack packet */ -- outw(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); -- len = inw(ioaddr + BMPR_MEM_PORT); /* throw away status */ -- len = inw(ioaddr + BMPR_MEM_PORT); -- /* Drop overlength packets */ -- if (len > ETH_FRAME_LEN) -- return (0); /* should we drain the buffer? */ -- insw(ioaddr + BMPR_MEM_PORT, nic->packet, len / 2); -- /* If it's our own, drop it */ -- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) == 0) -- return (0); -- nic->packetlen = len; -- return (1); --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void tiara_transmit( --struct nic *nic, --const char *d, /* Destination */ --unsigned int t, /* Type */ --unsigned int s, /* size */ --const char *p) /* Packet */ --{ -- unsigned int len; -- unsigned long time; -- -- len = s + ETH_HLEN; -- if (len < ETH_ZLEN) -- len = ETH_ZLEN; -- t = htons(t); -- outsw(ioaddr + BMPR_MEM_PORT, d, ETH_ALEN / 2); -- outsw(ioaddr + BMPR_MEM_PORT, nic->node_addr, ETH_ALEN / 2); -- outw(t, ioaddr + BMPR_MEM_PORT); -- outsw(ioaddr + BMPR_MEM_PORT, p, s / 2); -- if (s & 1) /* last byte */ -- outb(p[s-1], ioaddr + BMPR_MEM_PORT); -- while (s++ < ETH_ZLEN - ETH_HLEN) /* pad */ -- outb(0, ioaddr + BMPR_MEM_PORT); -- outw(len | (TMST << 8), ioaddr + BMPR_PKT_LEN); -- /* wait for transmit complete */ -- time = currticks() + TICKS_PER_SEC; /* wait one second */ -- while (currticks() < time && (inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) -- ; -- if ((inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) -- printf("Tiara timed out on transmit\n"); -- /* Do we need to ack the transmit? */ --} -- --/************************************************************************** --DISABLE - Turn off ethernet interface --***************************************************************************/ --static void tiara_disable(struct nic *nic) --{ -- /* Apparently only a power down can do this properly */ -- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); --} -- --static int tiara_probe1(struct nic *nic) --{ -- /* Hope all the Tiara cards have this vendor prefix */ -- static char vendor_prefix[] = { 0x08, 0x00, 0x1A }; -- static char all_ones[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; -- int i; -- -- for (i = 0; i < ETH_ALEN; ++i) -- nic->node_addr[i] = inb(ioaddr + PROM_ID + i); -- if (memcmp(nic->node_addr, vendor_prefix, sizeof(vendor_prefix)) != 0) -- return (0); -- if (memcmp(nic->node_addr, all_ones, sizeof(all_ones)) == 0) -- return (0); -- printf("\nTiara ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); -- return (1); --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --***************************************************************************/ --struct nic *tiara_probe(struct nic *nic, unsigned short *probe_addrs) --{ -- /* missing entries are addresses usually already used */ -- static unsigned short io_addrs[] = { -- 0x100, 0x120, 0x140, 0x160, -- 0x180, 0x1A0, 0x1C0, 0x1E0, -- 0x200, 0x220, 0x240, /*Par*/ -- 0x280, 0x2A0, 0x2C0, /*Ser*/ -- 0x300, 0x320, 0x340, /*Par*/ -- 0x380, /*Vid,Par*/ 0x3C0, /*Ser*/ -- 0x0 -- }; -- unsigned short *p; -- -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- if (probe_addrs == 0) -- probe_addrs = io_addrs; -- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) -- if (tiara_probe1(nic)) -- break; -- /* if board found */ -- if (ioaddr != 0) -- { -- tiara_reset(nic); -- /* point to NIC specific routines */ -- nic->reset = tiara_reset; -- nic->poll = tiara_poll; -- nic->transmit = tiara_transmit; -- nic->disable = tiara_disable; -- return nic; -- } -- else -- return (0); --} -Index: b/netboot/timer.c -=================================================================== ---- a/netboot/timer.c -+++ b/netboot/timer.c -@@ -6,122 +6,24 @@ - * published by the Free Software Foundation; either version 2, or (at - * your option) any later version. - */ -- --#include "etherboot.h" -+#include "grub.h" - #include "timer.h" - --void load_timer2(unsigned int ticks) --{ -- /* Set up the timer gate, turn off the speaker */ -- outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); -- outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); -- outb(ticks & 0xFF, TIMER2_PORT); -- outb(ticks >> 8, TIMER2_PORT); --} -- --#if defined(CONFIG_TSC_CURRTICKS) --#define rdtsc(low,high) \ -- __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) -- --#define rdtscll(val) \ -- __asm__ __volatile__ ("rdtsc" : "=A" (val)) -- -- --#define HZ TICKS_PER_SEC --#define CLOCK_TICK_RATE 1193180U /* Underlying HZ */ --/* LATCH is used in the interval timer and ftape setup. */ --#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ -+/* Machine Independant timer helper functions */ - -- --/* ------ Calibrate the TSC ------- -- * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). -- * Too much 64-bit arithmetic here to do this cleanly in C, and for -- * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) -- * output busy loop as low as possible. We avoid reading the CTC registers -- * directly because of the awkward 8-bit access mechanism of the 82C54 -- * device. -- */ -- --#define CALIBRATE_LATCH (5 * LATCH) -- --static unsigned long long calibrate_tsc(void) -+void mdelay(unsigned int msecs) - { -- /* Set the Gate high, disable speaker */ -- outb((inb(0x61) & ~0x02) | 0x01, 0x61); -- -- /* -- * Now let's take care of CTC channel 2 -- * -- * Set the Gate high, program CTC channel 2 for mode 0, -- * (interrupt on terminal count mode), binary count, -- * load 5 * LATCH count, (LSB and MSB) to begin countdown. -- */ -- outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */ -- outb(CALIBRATE_LATCH & 0xff, 0x42); /* LSB of count */ -- outb(CALIBRATE_LATCH >> 8, 0x42); /* MSB of count */ -- -- { -- unsigned long startlow, starthigh; -- unsigned long endlow, endhigh; -- unsigned long count; -- -- rdtsc(startlow,starthigh); -- count = 0; -- do { -- count++; -- } while ((inb(0x61) & 0x20) == 0); -- rdtsc(endlow,endhigh); -- -- /* Error: ECTCNEVERSET */ -- if (count <= 1) -- goto bad_ctc; -- -- /* 64-bit subtract - gcc just messes up with long longs */ -- __asm__("subl %2,%0\n\t" -- "sbbl %3,%1" -- :"=a" (endlow), "=d" (endhigh) -- :"g" (startlow), "g" (starthigh), -- "0" (endlow), "1" (endhigh)); -- -- /* Error: ECPUTOOFAST */ -- if (endhigh) -- goto bad_ctc; -- -- endlow /= 5; -- return endlow; -+ unsigned int i; -+ for(i = 0; i < msecs; i++) { -+ udelay(1000); -+ poll_interruptions(); - } -- -- /* -- * The CTC wasn't reliable: we got a hit on the very first read, -- * or the CPU was so fast/slow that the quotient wouldn't fit in -- * 32 bits.. -- */ --bad_ctc: -- printf("bad_ctc\n"); -- return 0; - } - -- --unsigned long currticks(void) -+void waiton_timer2(unsigned int ticks) - { -- static unsigned long clocks_per_tick; -- unsigned long clocks_high, clocks_low; -- unsigned long currticks; -- if (!clocks_per_tick) { -- clocks_per_tick = calibrate_tsc(); -- printf("clocks_per_tick = %d\n", clocks_per_tick); -+ load_timer2(ticks); -+ while(timer2_running()) { -+ poll_interruptions(); - } -- -- /* Read the Time Stamp Counter */ -- rdtsc(clocks_low, clocks_high); -- -- /* currticks = clocks / clocks_per_tick; */ -- __asm__("divl %1" -- :"=a" (currticks) -- :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); -- -- -- return currticks; - } -- --#endif /* RTC_CURRTICKS */ -Index: b/netboot/timer.h -=================================================================== ---- a/netboot/timer.h -+++ b/netboot/timer.h -@@ -36,7 +36,8 @@ - #define BCD_COUNT 0x01 - - /* Timers tick over at this rate */ --#define TICKS_PER_MS 1193 -+#define CLOCK_TICK_RATE 1193180U -+#define TICKS_PER_MS (CLOCK_TICK_RATE/1000) - - /* Parallel Peripheral Controller Port B */ - #define PPC_PORTB 0x61 -@@ -49,16 +50,19 @@ - /* Ticks must be between 0 and 65535 (0 == 65536) - because it is a 16 bit counter */ - extern void load_timer2(unsigned int ticks); --extern inline int timer2_running(void) --{ -- return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); --} -- --extern inline void waiton_timer2(unsigned int ticks) --{ -- load_timer2(ticks); -- while ((inb(PPC_PORTB) & PPCB_T2OUT) == 0) -- ; --} -+extern inline int timer2_running(void); -+extern void waiton_timer2(unsigned int ticks); -+extern void __load_timer2(unsigned int ticks); -+ -+extern void setup_timers(void); -+extern void ndelay(unsigned int nsecs); -+extern void udelay(unsigned int usecs); -+extern void mdelay(unsigned int msecs); -+//extern unsigned long currticks(void); -+ -+struct timeval { -+ long tv_sec; -+ long tv_usec; -+}; - - #endif /* TIMER_H */ -Index: b/netboot/tlan.c -=================================================================== ---- a/netboot/tlan.c -+++ b/netboot/tlan.c -@@ -1,3746 +1,1814 @@ -+#define EB51 -+ -+#ifdef EB50 -+#define __unused __attribute__((unused)) -+#endif -+ - /************************************************************************** --Etherboot - BOOTP/TFTP Bootstrap Program --TLAN driver for Etherboot -+* -+* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN -+* Written 2003-2003 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code based on: -+* lan.c: Linux ThunderLan Driver: -+* -+* by James Banks -+* -+* (C) 1997-1998 Caldera, Inc. -+* (C) 1998 James Banks -+* (C) 1999-2001 Torben Mathiasen -+* (C) 2002 Samuel Chessman -+* -+* REVISION HISTORY: -+* ================ -+* v1.0 07-08-2003 timlegge Initial not quite working version -+* v1.1 07-27-2003 timlegge Sync 5.0 and 5.1 versions -+* v1.2 08-19-2003 timlegge Implement Multicast Support -+* v1.3 08-23-2003 timlegge Fix the transmit Function -+* v1.4 01-17-2004 timlegge Initial driver output cleanup -+* -+* Indent Options: indent -kr -i8 - ***************************************************************************/ - --/* -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2, or (at -- * your option) any later version. -- */ -- - /* to get some global routines like printf */ - #include "etherboot.h" - /* to get the interface to the body of the program */ - #include "nic.h" - /* to get the PCI support functions, if this is a PCI NIC */ - #include "pci.h" --/* to get our own prototype */ --#include "cards.h" -- -- /***************************************************************** -- * TLan Definitions -- * -- ****************************************************************/ -+#include "timer.h" -+#include "tlan.h" - --#define TLAN_MIN_FRAME_SIZE 64 --#define TLAN_MAX_FRAME_SIZE 1600 -+#define drv_version "v1.4" -+#define drv_date "01-17-2004" - --#define TLAN_NUM_RX_LISTS 32 --#define TLAN_NUM_TX_LISTS 64 -+/* NIC specific static variables go here */ -+#define HZ 100 -+#define TX_TIME_OUT (6*HZ) - --#define TLAN_IGNORE 0 --#define TLAN_RECORD 1 -+#ifdef EB50 -+#define cpu_to_le32(val) (val) -+#define le32_to_cpu(val) (val) -+#define virt_to_bus(x) ((unsigned long) x) -+#define bus_to_virt(x) ((unsigned long) x) -+#endif - --#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); --#define TLAN_DEBUG_GNRL 0x0001 --#define TLAN_DEBUG_TX 0x0002 --#define TLAN_DEBUG_RX 0x0004 --#define TLAN_DEBUG_LIST 0x0008 --#define TLAN_DEBUG_PROBE 0x0010 -+/* Condensed operations for readability. */ -+#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) -+#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) - --#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ - -- /***************************************************************** -- * Device Identification Definitions -- * -- ****************************************************************/ -- --#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 --#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 --#ifndef PCI_DEVICE_ID_OLICOM_OC2183 --#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 --#endif --#ifndef PCI_DEVICE_ID_OLICOM_OC2325 --#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 --#endif --#ifndef PCI_DEVICE_ID_OLICOM_OC2326 --#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 --#endif --#define TLAN_ADAPTER_NONE 0x00000000 --#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 --#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 --#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 --#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 --#define TLAN_SPEED_DEFAULT 0 --#define TLAN_SPEED_10 10 --#define TLAN_SPEED_100 100 --#define TLAN_DUPLEX_DEFAULT 0 --#define TLAN_DUPLEX_HALF 1 --#define TLAN_DUPLEX_FULL 2 --#define TLAN_BUFFERS_PER_LIST 10 --#define TLAN_LAST_BUFFER 0x80000000 --#define TLAN_CSTAT_UNUSED 0x8000 --#define TLAN_CSTAT_FRM_CMP 0x4000 --#define TLAN_CSTAT_READY 0x3000 --#define TLAN_CSTAT_EOC 0x0800 --#define TLAN_CSTAT_RX_ERROR 0x0400 --#define TLAN_CSTAT_PASS_CRC 0x0200 --#define TLAN_CSTAT_DP_PR 0x0100 -- -- /***************************************************************** -- * PHY definitions -- * -- ****************************************************************/ -- --#define TLAN_PHY_MAX_ADDR 0x1F --#define TLAN_PHY_NONE 0x20 -- -- /***************************************************************** -- * TLan Driver Timer Definitions -- * -- ****************************************************************/ -- --#define TLAN_TIMER_LINK_BEAT 1 --#define TLAN_TIMER_ACTIVITY 2 --#define TLAN_TIMER_PHY_PDOWN 3 --#define TLAN_TIMER_PHY_PUP 4 --#define TLAN_TIMER_PHY_RESET 5 --#define TLAN_TIMER_PHY_START_LINK 6 --#define TLAN_TIMER_PHY_FINISH_AN 7 --#define TLAN_TIMER_FINISH_RESET 8 --#define TLAN_TIMER_ACT_DELAY (HZ/10) -- -- /***************************************************************** -- * TLan Driver Eeprom Definitions -- * -- ****************************************************************/ -- --#define TLAN_EEPROM_ACK 0 --#define TLAN_EEPROM_STOP 1 -- -- /***************************************************************** -- * Host Register Offsets and Contents -- * -- ****************************************************************/ -- --#define TLAN_HOST_CMD 0x00 --#define TLAN_HC_GO 0x80000000 --#define TLAN_HC_STOP 0x40000000 --#define TLAN_HC_ACK 0x20000000 --#define TLAN_HC_CS_MASK 0x1FE00000 --#define TLAN_HC_EOC 0x00100000 --#define TLAN_HC_RT 0x00080000 --#define TLAN_HC_NES 0x00040000 --#define TLAN_HC_AD_RST 0x00008000 --#define TLAN_HC_LD_TMR 0x00004000 --#define TLAN_HC_LD_THR 0x00002000 --#define TLAN_HC_REQ_INT 0x00001000 --#define TLAN_HC_INT_OFF 0x00000800 --#define TLAN_HC_INT_ON 0x00000400 --#define TLAN_HC_AC_MASK 0x000000FF --#define TLAN_CH_PARM 0x04 --#define TLAN_DIO_ADR 0x08 --#define TLAN_DA_ADR_INC 0x8000 --#define TLAN_DA_RAM_ADR 0x4000 --#define TLAN_HOST_INT 0x0A --#define TLAN_HI_IV_MASK 0x1FE0 --#define TLAN_HI_IT_MASK 0x001C --#define TLAN_DIO_DATA 0x0C -- --/* ThunderLAN Internal Register DIO Offsets */ -- --#define TLAN_NET_CMD 0x00 --#define TLAN_NET_CMD_NRESET 0x80 --#define TLAN_NET_CMD_NWRAP 0x40 --#define TLAN_NET_CMD_CSF 0x20 --#define TLAN_NET_CMD_CAF 0x10 --#define TLAN_NET_CMD_NOBRX 0x08 --#define TLAN_NET_CMD_DUPLEX 0x04 --#define TLAN_NET_CMD_TRFRAM 0x02 --#define TLAN_NET_CMD_TXPACE 0x01 --#define TLAN_NET_SIO 0x01 --#define TLAN_NET_SIO_MINTEN 0x80 --#define TLAN_NET_SIO_ECLOK 0x40 --#define TLAN_NET_SIO_ETXEN 0x20 --#define TLAN_NET_SIO_EDATA 0x10 --#define TLAN_NET_SIO_NMRST 0x08 --#define TLAN_NET_SIO_MCLK 0x04 --#define TLAN_NET_SIO_MTXEN 0x02 --#define TLAN_NET_SIO_MDATA 0x01 --#define TLAN_NET_STS 0x02 --#define TLAN_NET_STS_MIRQ 0x80 --#define TLAN_NET_STS_HBEAT 0x40 --#define TLAN_NET_STS_TXSTOP 0x20 --#define TLAN_NET_STS_RXSTOP 0x10 --#define TLAN_NET_STS_RSRVD 0x0F --#define TLAN_NET_MASK 0x03 --#define TLAN_NET_MASK_MASK7 0x80 --#define TLAN_NET_MASK_MASK6 0x40 --#define TLAN_NET_MASK_MASK5 0x20 --#define TLAN_NET_MASK_MASK4 0x10 --#define TLAN_NET_MASK_RSRVD 0x0F --#define TLAN_NET_CONFIG 0x04 --#define TLAN_NET_CFG_RCLK 0x8000 --#define TLAN_NET_CFG_TCLK 0x4000 --#define TLAN_NET_CFG_BIT 0x2000 --#define TLAN_NET_CFG_RXCRC 0x1000 --#define TLAN_NET_CFG_PEF 0x0800 --#define TLAN_NET_CFG_1FRAG 0x0400 --#define TLAN_NET_CFG_1CHAN 0x0200 --#define TLAN_NET_CFG_MTEST 0x0100 --#define TLAN_NET_CFG_PHY_EN 0x0080 --#define TLAN_NET_CFG_MSMASK 0x007F --#define TLAN_MAN_TEST 0x06 --#define TLAN_DEF_VENDOR_ID 0x08 --#define TLAN_DEF_DEVICE_ID 0x0A --#define TLAN_DEF_REVISION 0x0C --#define TLAN_DEF_SUBCLASS 0x0D --#define TLAN_DEF_MIN_LAT 0x0E --#define TLAN_DEF_MAX_LAT 0x0F --#define TLAN_AREG_0 0x10 --#define TLAN_AREG_1 0x16 --#define TLAN_AREG_2 0x1C --#define TLAN_AREG_3 0x22 --#define TLAN_HASH_1 0x28 --#define TLAN_HASH_2 0x2C --#define TLAN_GOOD_TX_FRMS 0x30 --#define TLAN_TX_UNDERUNS 0x33 --#define TLAN_GOOD_RX_FRMS 0x34 --#define TLAN_RX_OVERRUNS 0x37 --#define TLAN_DEFERRED_TX 0x38 --#define TLAN_CRC_ERRORS 0x3A --#define TLAN_CODE_ERRORS 0x3B --#define TLAN_MULTICOL_FRMS 0x3C --#define TLAN_SINGLECOL_FRMS 0x3E --#define TLAN_EXCESSCOL_FRMS 0x40 --#define TLAN_LATE_COLS 0x41 --#define TLAN_CARRIER_LOSS 0x42 --#define TLAN_ACOMMIT 0x43 --#define TLAN_LED_REG 0x44 --#define TLAN_LED_ACT 0x10 --#define TLAN_LED_LINK 0x01 --#define TLAN_BSIZE_REG 0x45 --#define TLAN_MAX_RX 0x46 --#define TLAN_INT_DIS 0x48 --#define TLAN_ID_TX_EOC 0x04 --#define TLAN_ID_RX_EOF 0x02 --#define TLAN_ID_RX_EOC 0x01 -- --/* ThunderLAN Interrupt Codes */ -- --#define TLAN_INT_NUMBER_OF_INTS 8 -- --#define TLAN_INT_NONE 0x0000 --#define TLAN_INT_TX_EOF 0x0001 --#define TLAN_INT_STAT_OVERFLOW 0x0002 --#define TLAN_INT_RX_EOF 0x0003 --#define TLAN_INT_DUMMY 0x0004 --#define TLAN_INT_TX_EOC 0x0005 --#define TLAN_INT_STATUS_CHECK 0x0006 --#define TLAN_INT_RX_EOC 0x0007 --#define TLAN_TLPHY_ID 0x10 --#define TLAN_TLPHY_CTL 0x11 --#define TLAN_TC_IGLINK 0x8000 --#define TLAN_TC_SWAPOL 0x4000 --#define TLAN_TC_AUISEL 0x2000 --#define TLAN_TC_SQEEN 0x1000 --#define TLAN_TC_MTEST 0x0800 --#define TLAN_TC_RESERVED 0x07F8 --#define TLAN_TC_NFEW 0x0004 --#define TLAN_TC_INTEN 0x0002 --#define TLAN_TC_TINT 0x0001 --#define TLAN_TLPHY_STS 0x12 --#define TLAN_TS_MINT 0x8000 --#define TLAN_TS_PHOK 0x4000 --#define TLAN_TS_POLOK 0x2000 --#define TLAN_TS_TPENERGY 0x1000 --#define TLAN_TS_RESERVED 0x0FFF --#define TLAN_TLPHY_PAR 0x19 --#define TLAN_PHY_CIM_STAT 0x0020 --#define TLAN_PHY_SPEED_100 0x0040 --#define TLAN_PHY_DUPLEX_FULL 0x0080 --#define TLAN_PHY_AN_EN_STAT 0x0400 -- -- --/* ThunderLAN MII Registers */ -- --/* Generic MII/PHY Registers */ -- --#define MII_GEN_CTL 0x00 --#define MII_GC_RESET 0x8000 --#define MII_GC_LOOPBK 0x4000 --#define MII_GC_SPEEDSEL 0x2000 --#define MII_GC_AUTOENB 0x1000 --#define MII_GC_PDOWN 0x0800 --#define MII_GC_ISOLATE 0x0400 --#define MII_GC_AUTORSRT 0x0200 --#define MII_GC_DUPLEX 0x0100 --#define MII_GC_COLTEST 0x0080 --#define MII_GC_RESERVED 0x007F --#define MII_GEN_STS 0x01 --#define MII_GS_100BT4 0x8000 --#define MII_GS_100BTXFD 0x4000 --#define MII_GS_100BTXHD 0x2000 --#define MII_GS_10BTFD 0x1000 --#define MII_GS_10BTHD 0x0800 --#define MII_GS_RESERVED 0x07C0 --#define MII_GS_AUTOCMPLT 0x0020 --#define MII_GS_RFLT 0x0010 --#define MII_GS_AUTONEG 0x0008 --#define MII_GS_LINK 0x0004 --#define MII_GS_JABBER 0x0002 --#define MII_GS_EXTCAP 0x0001 --#define MII_GEN_ID_HI 0x02 --#define MII_GEN_ID_LO 0x03 --#define MII_GIL_OUI 0xFC00 --#define MII_GIL_MODEL 0x03F0 --#define MII_GIL_REVISION 0x000F --#define MII_AN_ADV 0x04 --#define MII_AN_LPA 0x05 --#define MII_AN_EXP 0x06 -- --/* ThunderLAN Specific MII/PHY Registers */ -- --#define TLAN_TC_IGLINK 0x8000 --#define TLAN_TC_SWAPOL 0x4000 --#define TLAN_TC_AUISEL 0x2000 --#define TLAN_TC_SQEEN 0x1000 --#define TLAN_TC_MTEST 0x0800 --#define TLAN_TC_RESERVED 0x07F8 --#define TLAN_TC_NFEW 0x0004 --#define TLAN_TC_INTEN 0x0002 --#define TLAN_TC_TINT 0x0001 --#define TLAN_TS_MINT 0x8000 --#define TLAN_TS_PHOK 0x4000 --#define TLAN_TS_POLOK 0x2000 --#define TLAN_TS_TPENERGY 0x1000 --#define TLAN_TS_RESERVED 0x0FFF --#define TLAN_PHY_CIM_STAT 0x0020 --#define TLAN_PHY_SPEED_100 0x0040 --#define TLAN_PHY_DUPLEX_FULL 0x0080 --#define TLAN_PHY_AN_EN_STAT 0x0400 -- --/* National Sem. & Level1 PHY id's */ --#define NAT_SEM_ID1 0x2000 --#define NAT_SEM_ID2 0x5C01 --#define LEVEL1_ID1 0x7810 --#define LEVEL1_ID2 0x0000 -- --#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) --#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) --#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) -- --typedef unsigned int u32; --typedef unsigned short u16; --typedef unsigned char u8; -+static void TLan_ResetLists(struct nic *nic __unused); -+static void TLan_ResetAdapter(struct nic *nic __unused); -+static void TLan_FinishReset(struct nic *nic __unused); - --/* Routines to access internal registers. */ -+static void TLan_EeSendStart(u16); -+static int TLan_EeSendByte(u16, u8, int); -+static void TLan_EeReceiveByte(u16, u8 *, int); -+static int TLan_EeReadByte(u16 io_base, u8, u8 *); - --inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); -- --} /* TLan_DioRead8 */ -+static void TLan_PhyDetect(struct nic *nic); -+static void TLan_PhyPowerDown(struct nic *nic); -+static void TLan_PhyPowerUp(struct nic *nic); - --inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); - --} /* TLan_DioRead16 */ -+static void TLan_SetMac(struct nic *nic __unused, int areg, char *mac); - --inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- return (inl(base_addr + TLAN_DIO_DATA)); -+static void TLan_PhyReset(struct nic *nic); -+static void TLan_PhyStartLink(struct nic *nic); -+static void TLan_PhyFinishAutoNeg(struct nic *nic); - --} /* TLan_DioRead32 */ -+#ifdef MONITOR -+static void TLan_PhyMonitor(struct nic *nic); -+#endif - --inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); - --} -+static void refill_rx(struct nic *nic __unused); - --inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); -+static int TLan_MiiReadReg(struct nic *nic __unused, u16, u16, u16 *); -+static void TLan_MiiSendData(u16, u32, unsigned); -+static void TLan_MiiSync(u16); -+static void TLan_MiiWriteReg(struct nic *nic __unused, u16, u16, u16); - --} - --inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) --{ -- outw(internal_addr, base_addr + TLAN_DIO_ADR); -- outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); -+const char *media[] = { -+ "10BaseT-HD ", "10BaseT-FD ", "100baseTx-HD ", -+ "100baseTx-FD", "100baseT4", 0 -+}; - --} -+/* This much match tlan_pci_tbl[]! */ -+enum tlan_nics { -+ NETEL10 = 0, NETEL100 = 1, NETFLEX3I = 2, THUNDER = 3, NETFLEX3B = -+ 4, NETEL100PI = 5, -+ NETEL100D = 6, NETEL100I = 7, OC2183 = 8, OC2325 = 9, OC2326 = -+ 10, NETELLIGENT_10_100_WS_5100 = 11, -+ NETELLIGENT_10_T2 = 12 -+}; - --/* NIC specific static variables go here */ -+struct pci_id_info { -+ const char *name; -+ int nic_id; -+ struct match_info { -+ u32 pci, pci_mask, subsystem, subsystem_mask; -+ u32 revision, revision_mask; /* Only 8 bits. */ -+ } id; -+ u32 flags; -+ u16 addrOfs; /* Address Offset */ -+}; - --/***************************************************************************** --****************************************************************************** -+static struct pci_id_info tlan_pci_tbl[] = { -+ {"Compaq Netelligent 10 T PCI UTP", NETEL10, -+ {0xae340e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, -+ {"Compaq Netelligent 10/100 TX PCI UTP", NETEL100, -+ {0xae320e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, -+ {"Compaq Integrated NetFlex-3/P", NETFLEX3I, -+ {0xae350e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_NONE, 0x83}, -+ {"Compaq NetFlex-3/P", THUNDER, -+ {0xf1300e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, -+ {"Compaq NetFlex-3/P", NETFLEX3B, -+ {0xf1500e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_NONE, 0x83}, -+ {"Compaq Netelligent Integrated 10/100 TX UTP", NETEL100PI, -+ {0xae430e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, -+ {"Compaq Netelligent Dual 10/100 TX PCI UTP", NETEL100D, -+ {0xae400e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_NONE, 0x83}, -+ {"Compaq Netelligent 10/100 TX Embedded UTP", NETEL100I, -+ {0xb0110e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_NONE, 0x83}, -+ {"Olicom OC-2183/2185", OC2183, -+ {0x0013108d, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_USE_INTERN_10, 0x83}, -+ {"Olicom OC-2325", OC2325, -+ {0x0012108d, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_UNMANAGED_PHY, 0xF8}, -+ {"Olicom OC-2326", OC2326, -+ {0x0014108d, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_USE_INTERN_10, 0xF8}, -+ {"Compaq Netelligent 10/100 TX UTP", NETELLIGENT_10_100_WS_5100, -+ {0xb0300e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, -+ {"Compaq Netelligent 10 T/2 PCI UTP/Coax", NETELLIGENT_10_T2, -+ {0xb0120e11, 0xffffffff, 0, 0, 0, 0}, -+ TLAN_ADAPTER_NONE, 0x83}, -+ {"Compaq NetFlex-3/E", 0, /* EISA card */ -+ {0, 0, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED | TLAN_ADAPTER_UNMANAGED_PHY | -+ TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, -+ {"Compaq NetFlex-3/E", 0, /* EISA card */ -+ {0, 0, 0, 0, 0, 0}, -+ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, -+ {0, 0, -+ {0, 0, 0, 0, 0, 0}, -+ 0, 0}, -+}; - -- ThunderLAN Driver Eeprom routines - -- The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A -- EEPROM. These functions are based on information in Microchip's -- data sheet. I don't know how well this functions will work with -- other EEPROMs. -+struct TLanList { -+ u32 forward; -+ u16 cStat; -+ u16 frameSize; -+ struct { -+ u32 count; -+ u32 address; -+ } buffer[TLAN_BUFFERS_PER_LIST]; -+}; - --****************************************************************************** --*****************************************************************************/ - -- /*************************************************************** -- * TLan_EeSendStart -- * -- * Returns: -- * Nothing -- * Parms: -- * io_base The IO port base address for the -- * TLAN device with the EEPROM to -- * use. -- * -- * This function sends a start cycle to an EEPROM attached -- * to a TLAN chip. -- * -- **************************************************************/ - --static void TLan_EeSendStart( u16 io_base ) --{ -- u16 sio; -+struct TLanList tx_ring[TLAN_NUM_TX_LISTS]; -+static unsigned char txb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_TX_LISTS]; - -- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); -- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; -+struct TLanList rx_ring[TLAN_NUM_RX_LISTS]; -+static unsigned char rxb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_RX_LISTS]; - -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); -- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); -- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -+typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; - --} /* TLan_EeSendStart */ - -- /*************************************************************** -- * TLan_EeSendByte -- * -- * Returns: -- * If the correct ack was received, 0, otherwise 1 -- * Parms: io_base The IO port base address for the -- * TLAN device with the EEPROM to -- * use. -- * data The 8 bits of information to -- * send to the EEPROM. -- * stop If TLAN_EEPROM_STOP is passed, a -- * stop cycle is sent after the -- * byte is sent after the ack is -- * read. -- * -- * This function sends a byte on the serial EEPROM line, -- * driving the clock to send each bit. The function then -- * reverses transmission direction and reads an acknowledge -- * bit. -- * -- **************************************************************/ -+int chip_idx; - --static int TLan_EeSendByte( u16 io_base, u8 data, int stop ) --{ -- int err; -- u8 place; -- u16 sio; - -- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); -- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; -+/***************************************************************** -+* TLAN Private Information Structure -+* -+****************************************************************/ -+struct tlan_private { -+ unsigned short vendor_id; /* PCI Vendor code */ -+ unsigned short dev_id; /* PCI Device code */ -+ const char *nic_name; -+ u8 *padBuffer; -+ u8 *rxBuffer; -+ struct TLanList *rx_head_desc; -+ u32 rxHead; -+ u32 rxTail; -+ u32 rxEocCount; -+ unsigned int cur_rx, dirty_rx; /* Producer/consumer ring indicies */ -+ unsigned int cur_tx, dirty_tx; -+ unsigned rx_buf_sz; /* Based on mtu + Slack */ -+ struct TLanList *txList; -+ struct TLanList *rxList; -+ u8 *txBuffer; -+ u32 txHead; -+ u32 txInProgress; -+ u32 txTail; -+ int eoc; -+ u32 txBusyCount; -+ u32 phyOnline; -+ u32 timerSetAt; -+ u32 timerType; -+ u32 adapterRev; -+ u32 aui; -+ u32 debug; -+ u32 duplex; -+ u32 phy[2]; -+ u32 phyNum; -+ u32 speed; -+ u8 tlanRev; -+ u8 tlanFullDuplex; -+ char devName[8]; -+ u8 link; -+ u8 is_eisa; -+ u8 neg_be_verbose; -+} TLanPrivateInfo; - -- /* Assume clock is low, tx is enabled; */ -- for ( place = 0x80; place != 0; place >>= 1 ) { -- if ( place & data ) -- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); -- else -- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -- } -- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- err = TLan_GetBit( TLAN_NET_SIO_EDATA, sio ); -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); -+static struct tlan_private *priv; - -- if ( ( ! err ) && stop ) { -- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); -- } -+u32 BASE; - -- return ( err ); - --} /* TLan_EeSendByte */ - -- /*************************************************************** -- * TLan_EeReceiveByte -- * -- * Returns: -- * Nothing -- * Parms: -- * io_base The IO port base address for the -- * TLAN device with the EEPROM to -- * use. -- * data An address to a char to hold the -- * data sent from the EEPROM. -- * stop If TLAN_EEPROM_STOP is passed, a -- * stop cycle is sent after the -- * byte is received, and no ack is -- * sent. -- * -- * This function receives 8 bits of data from the EEPROM -- * over the serial link. It then sends and ack bit, or no -- * ack and a stop bit. This function is used to retrieve -- * data after the address of a byte in the EEPROM has been -- * sent. -- * -- **************************************************************/ -+/*************************************************************** -+* TLan_ResetLists -+* -+* Returns: -+* Nothing -+* Parms: -+* dev The device structure with the list -+* stuctures to be reset. -+* -+* This routine sets the variables associated with managing -+* the TLAN lists to their initial values. -+* -+**************************************************************/ - --static void TLan_EeReceiveByte( u16 io_base, u8 *data, int stop ) -+void TLan_ResetLists(struct nic *nic __unused) - { -- u8 place; -- u16 sio; - -- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); -- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; -- *data = 0; -+ int i; -+ struct TLanList *list; -+ priv->txHead = 0; -+ priv->txTail = 0; - -- /* Assume clock is low, tx is enabled; */ -- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); -- for ( place = 0x80; place; place >>= 1 ) { -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- if ( TLan_GetBit( TLAN_NET_SIO_EDATA, sio ) ) -- *data |= place; -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -+ for (i = 0; i < TLAN_NUM_TX_LISTS; i++) { -+ list = &tx_ring[i]; -+ list->cStat = TLAN_CSTAT_UNUSED; -+/* list->buffer[0].address = 0; */ -+ list->buffer[0].address = virt_to_bus(txb + -+ (i * TLAN_MAX_FRAME_SIZE)); -+ list->buffer[2].count = 0; -+ list->buffer[2].address = 0; -+ list->buffer[9].address = 0; -+/* list->forward = 0; */ - } - -- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); -- if ( ! stop ) { -- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* Ack = 0 */ -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -- } else { -- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); /* No ack = 1 (?) */ -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ -- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); -- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); -- } -+ priv->cur_rx = 0; -+ priv->rx_buf_sz = (TLAN_MAX_FRAME_SIZE); -+ priv->rx_head_desc = &rx_ring[0]; -+ -+ /* Initialize all the Rx descriptors */ -+ for (i = 0; i < TLAN_NUM_RX_LISTS; i++) { -+ rx_ring[i].forward = virt_to_le32desc(&rx_ring[i + 1]); -+ rx_ring[i].cStat = TLAN_CSTAT_READY; -+ rx_ring[i].frameSize = TLAN_MAX_FRAME_SIZE; -+ rx_ring[i].buffer[0].count = -+ TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; -+ rx_ring[i].buffer[0].address = -+ virt_to_le32desc(&rxb[i * TLAN_MAX_FRAME_SIZE]); -+ rx_ring[i].buffer[1].count = 0; -+ rx_ring[i].buffer[1].address = 0; -+ } -+ -+ /* Mark the last entry as wrapping the ring */ -+ rx_ring[i - 1].forward = virt_to_le32desc(&rx_ring[0]); -+ priv->dirty_rx = (unsigned int) (i - TLAN_NUM_RX_LISTS); - --} /* TLan_EeReceiveByte */ -+} /* TLan_ResetLists */ - -- /*************************************************************** -- * TLan_EeReadByte -- * -- * Returns: -- * No error = 0, else, the stage at which the error -- * occurred. -- * Parms: -- * io_base The IO port base address for the -- * TLAN device with the EEPROM to -- * use. -- * ee_addr The address of the byte in the -- * EEPROM whose contents are to be -- * retrieved. -- * data An address to a char to hold the -- * data obtained from the EEPROM. -- * -- * This function reads a byte of information from an byte -- * cell in the EEPROM. -- * -- **************************************************************/ -+/*************************************************************** -+* TLan_Reset -+* -+* Returns: -+* 0 -+* Parms: -+* dev Pointer to device structure of adapter -+* to be reset. -+* -+* This function resets the adapter and it's physical -+* device. See Chap. 3, pp. 9-10 of the "ThunderLAN -+* Programmer's Guide" for details. The routine tries to -+* implement what is detailed there, though adjustments -+* have been made. -+* -+**************************************************************/ - --static int TLan_EeReadByte( u16 io_base, u8 ee_addr, u8 *data ) -+void TLan_ResetAdapter(struct nic *nic __unused) - { -- int err; -- unsigned long flags = 0; -- int ret=0; -+ int i; -+ u32 addr; -+ u32 data; -+ u8 data8; - -- TLan_EeSendStart( io_base ); -- err = TLan_EeSendByte( io_base, 0xA0, TLAN_EEPROM_ACK ); -- if (err) -- { -- ret=1; -- goto fail; -- } -- err = TLan_EeSendByte( io_base, ee_addr, TLAN_EEPROM_ACK ); -- if (err) -- { -- ret=2; -- goto fail; -- } -- TLan_EeSendStart( io_base ); -- err = TLan_EeSendByte( io_base, 0xA1, TLAN_EEPROM_ACK ); -- if (err) -- { -- ret=3; -- goto fail; -- } -- TLan_EeReceiveByte( io_base, data, TLAN_EEPROM_STOP ); --fail: -+ priv->tlanFullDuplex = FALSE; -+ priv->phyOnline = 0; -+/* 1. Assert reset bit. */ - -- return ret; -+ data = inl(BASE + TLAN_HOST_CMD); -+ data |= TLAN_HC_AD_RST; -+ outl(data, BASE + TLAN_HOST_CMD); - --} /* TLan_EeReadByte */ -+ udelay(1000); - --#if 0 --/* Not yet converted from Linux driver */ --/***************************************************************************** --****************************************************************************** -+/* 2. Turn off interrupts. ( Probably isn't necessary ) */ - -- ThunderLAN Driver PHY Layer Routines -+ data = inl(BASE + TLAN_HOST_CMD); -+ data |= TLAN_HC_INT_OFF; -+ outl(data, BASE + TLAN_HOST_CMD); -+/* 3. Clear AREGs and HASHs. */ - --****************************************************************************** --*****************************************************************************/ -+ for (i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4) { -+ TLan_DioWrite32(BASE, (u16) i, 0); -+ } - -- /********************************************************************* -- * TLan_PhyPrint -- * -- * Returns: -- * Nothing -- * Parms: -- * dev A pointer to the device structure of the -- * TLAN device having the PHYs to be detailed. -- * -- * This function prints the registers a PHY (aka tranceiver). -- * -- ********************************************************************/ -+/* 4. Setup NetConfig register. */ - --void TLan_PhyPrint( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 i, data0, data1, data2, data3, phy; -+ data = -+ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; -+ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); - -- phy = priv->phy[priv->phyNum]; -+/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ - -- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { -- printk( "TLAN: Device %s, Unmanaged PHY.\n", dev->name ); -- } else if ( phy <= TLAN_PHY_MAX_ADDR ) { -- printk( "TLAN: Device %s, PHY 0x%02x.\n", dev->name, phy ); -- printk( "TLAN: Off. +0 +1 +2 +3 \n" ); -- for ( i = 0; i < 0x20; i+= 4 ) { -- printk( "TLAN: 0x%02x", i ); -- TLan_MiiReadReg( dev, phy, i, &data0 ); -- printk( " 0x%04hx", data0 ); -- TLan_MiiReadReg( dev, phy, i + 1, &data1 ); -- printk( " 0x%04hx", data1 ); -- TLan_MiiReadReg( dev, phy, i + 2, &data2 ); -- printk( " 0x%04hx", data2 ); -- TLan_MiiReadReg( dev, phy, i + 3, &data3 ); -- printk( " 0x%04hx\n", data3 ); -- } -- } else { -- printk( "TLAN: Device %s, Invalid PHY.\n", dev->name ); -- } -+ outl(TLAN_HC_LD_TMR | 0x3f, BASE + TLAN_HOST_CMD); -+ outl(TLAN_HC_LD_THR | 0x0, BASE + TLAN_HOST_CMD); - --} /* TLan_PhyPrint */ -+/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ - -- /********************************************************************* -- * TLan_PhyDetect -- * -- * Returns: -- * Nothing -- * Parms: -- * dev A pointer to the device structure of the adapter -- * for which the PHY needs determined. -- * -- * So far I've found that adapters which have external PHYs -- * may also use the internal PHY for part of the functionality. -- * (eg, AUI/Thinnet). This function finds out if this TLAN -- * chip has an internal PHY, and then finds the first external -- * PHY (starting from address 0) if it exists). -- * -- ********************************************************************/ -+ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); -+ addr = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; -+ TLan_SetBit(TLAN_NET_SIO_NMRST, addr); - --void TLan_PhyDetect( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 control; -- u16 hi; -- u16 lo; -- u32 phy; -+/* 7. Setup the remaining registers. */ - -- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { -- priv->phyNum = 0xFFFF; -- return; -+ if (priv->tlanRev >= 0x30) { -+ data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; -+ TLan_DioWrite8(BASE, TLAN_INT_DIS, data8); - } -+ TLan_PhyDetect(nic); -+ data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; - -- TLan_MiiReadReg( dev, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi ); -- -- if ( hi != 0xFFFF ) { -- priv->phy[0] = TLAN_PHY_MAX_ADDR; -- } else { -- priv->phy[0] = TLAN_PHY_NONE; -+ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_BIT_RATE_PHY) { -+ data |= TLAN_NET_CFG_BIT; -+ if (priv->aui == 1) { -+ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x0a); -+ } else if (priv->duplex == TLAN_DUPLEX_FULL) { -+ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x00); -+ priv->tlanFullDuplex = TRUE; -+ } else { -+ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x08); -+ } - } - -- priv->phy[1] = TLAN_PHY_NONE; -- for ( phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++ ) { -- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &control ); -- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &hi ); -- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &lo ); -- if ( ( control != 0xFFFF ) || ( hi != 0xFFFF ) || ( lo != 0xFFFF ) ) { -- TLAN_DBG( TLAN_DEBUG_GNRL, "PHY found at %02x %04x %04x %04x\n", phy, control, hi, lo ); -- if ( ( priv->phy[1] == TLAN_PHY_NONE ) && ( phy != TLAN_PHY_MAX_ADDR ) ) { -- priv->phy[1] = phy; -- } -- } -+ if (priv->phyNum == 0) { -+ data |= TLAN_NET_CFG_PHY_EN; - } -+ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); - -- if ( priv->phy[1] != TLAN_PHY_NONE ) { -- priv->phyNum = 1; -- } else if ( priv->phy[0] != TLAN_PHY_NONE ) { -- priv->phyNum = 0; -+ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { -+ TLan_FinishReset(nic); - } else { -- printk( "TLAN: Cannot initialize device, no PHY was found!\n" ); -+ TLan_PhyPowerDown(nic); - } - --} /* TLan_PhyDetect */ -+} /* TLan_ResetAdapter */ - --void TLan_PhyPowerDown( struct net_device *dev ) -+void TLan_FinishReset(struct nic *nic) - { -- TLanPrivateInfo *priv = dev->priv; -- u16 value; - -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name ); -- value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; -- TLan_MiiSync( dev->base_addr ); -- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); -- if ( ( priv->phyNum == 0 ) && ( priv->phy[1] != TLAN_PHY_NONE ) && ( ! ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) ) ) { -- TLan_MiiSync( dev->base_addr ); -- TLan_MiiWriteReg( dev, priv->phy[1], MII_GEN_CTL, value ); -+ u8 data; -+ u32 phy; -+ u8 sio; -+ u16 status; -+ u16 partner; -+ u16 tlphy_ctl; -+ u16 tlphy_par; -+ u16 tlphy_id1, tlphy_id2; -+ int i; -+ -+ phy = priv->phy[priv->phyNum]; -+ -+ data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; -+ if (priv->tlanFullDuplex) { -+ data |= TLAN_NET_CMD_DUPLEX; - } -+ TLan_DioWrite8(BASE, TLAN_NET_CMD, data); -+ data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; -+ if (priv->phyNum == 0) { -+ data |= TLAN_NET_MASK_MASK7; -+ } -+ TLan_DioWrite8(BASE, TLAN_NET_MASK, data); -+ TLan_DioWrite16(BASE, TLAN_MAX_RX, ((1536) + 7) & ~7); -+ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &tlphy_id1); -+ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &tlphy_id2); - -- /* Wait for 50 ms and powerup -- * This is abitrary. It is intended to make sure the -- * tranceiver settles. -- */ -- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); -+ if ((tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) -+ || (priv->aui)) { -+ status = MII_GS_LINK; -+ printf("TLAN: %s: Link forced.\n", priv->nic_name); -+ } else { -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); -+ udelay(1000); -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); -+ if ((status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ -+ (tlphy_id1 == NAT_SEM_ID1) -+ && (tlphy_id2 == NAT_SEM_ID2)) { -+ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &partner); -+ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_PAR, -+ &tlphy_par); - --} /* TLan_PhyPowerDown */ -+ printf("TLAN: %s: Link active with ", -+ priv->nic_name); -+ if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { -+ printf("forced 10%sMbps %s-Duplex\n", -+ tlphy_par & TLAN_PHY_SPEED_100 ? "" -+ : "0", -+ tlphy_par & TLAN_PHY_DUPLEX_FULL ? -+ "Full" : "Half"); -+ } else { -+ printf -+ ("AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", -+ tlphy_par & TLAN_PHY_SPEED_100 ? "" : -+ "0", -+ tlphy_par & TLAN_PHY_DUPLEX_FULL ? -+ "Full" : "Half"); -+ printf("TLAN: Partner capability: "); -+ for (i = 5; i <= 10; i++) -+ if (partner & (1 << i)) -+ printf("%s", media[i - 5]); -+ printf("\n"); -+ } - --void TLan_PhyPowerUp( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 value; -+ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); -+#ifdef MONITOR -+ /* We have link beat..for now anyway */ -+ priv->link = 1; -+ /*Enabling link beat monitoring */ -+ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_LINK_BEAT ); */ -+ mdelay(10000); -+ TLan_PhyMonitor(nic); -+#endif -+ } else if (status & MII_GS_LINK) { -+ printf("TLAN: %s: Link active\n", priv->nic_name); -+ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); -+ } -+ } - -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name ); -- TLan_MiiSync( dev->base_addr ); -- value = MII_GC_LOOPBK; -- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); -- TLan_MiiSync(dev->base_addr); -- /* Wait for 500 ms and reset the -- * tranceiver. The TLAN docs say both 50 ms and -- * 500 ms, so do the longer, just in case. -- */ -- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); -+ if (priv->phyNum == 0) { -+ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tlphy_ctl); -+ tlphy_ctl |= TLAN_TC_INTEN; -+ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tlphy_ctl); -+ sio = TLan_DioRead8(BASE, TLAN_NET_SIO); -+ sio |= TLAN_NET_SIO_MINTEN; -+ TLan_DioWrite8(BASE, TLAN_NET_SIO, sio); -+ } - --} /* TLan_PhyPowerUp */ -+ if (status & MII_GS_LINK) { -+ TLan_SetMac(nic, 0, nic->node_addr); -+ priv->phyOnline = 1; -+ outb((TLAN_HC_INT_ON >> 8), BASE + TLAN_HOST_CMD + 1); -+/* if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { -+ outb( ( TLAN_HC_REQ_INT >> 8 ), BASE + TLAN_HOST_CMD + 1 ); -+ } - --void TLan_PhyReset( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 phy; -- u16 value; -+ */ -+ outl(virt_to_bus(&rx_ring), BASE + TLAN_CH_PARM); -+ outl(TLAN_HC_GO | TLAN_HC_RT, BASE + TLAN_HOST_CMD); -+ } else { -+ printf -+ ("TLAN: %s: Link inactive, will retry in 10 secs...\n", -+ priv->nic_name); -+ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_FINISH_RESET ); */ -+ mdelay(10000); -+ TLan_FinishReset(nic); -+ return; - -- phy = priv->phy[priv->phyNum]; -+ } - -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Reseting PHY.\n", dev->name ); -- TLan_MiiSync( dev->base_addr ); -- value = MII_GC_LOOPBK | MII_GC_RESET; -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, value ); -- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); -- while ( value & MII_GC_RESET ) { -- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); -- } -- -- /* Wait for 500 ms and initialize. -- * I don't remember why I wait this long. -- * I've changed this to 50ms, as it seems long enough. -- */ -- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); -- --} /* TLan_PhyReset */ -- --void TLan_PhyStartLink( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 ability; -- u16 control; -- u16 data; -- u16 phy; -- u16 status; -- u16 tctl; -- -- phy = priv->phy[priv->phyNum]; -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Trying to activate link.\n", dev->name ); -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &ability ); -- -- if ( ( status & MII_GS_AUTONEG ) && -- ( ! priv->aui ) ) { -- ability = status >> 11; -- if ( priv->speed == TLAN_SPEED_10 && -- priv->duplex == TLAN_DUPLEX_HALF) { -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0000); -- } else if ( priv->speed == TLAN_SPEED_10 && -- priv->duplex == TLAN_DUPLEX_FULL) { -- priv->tlanFullDuplex = TRUE; -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0100); -- } else if ( priv->speed == TLAN_SPEED_100 && -- priv->duplex == TLAN_DUPLEX_HALF) { -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2000); -- } else if ( priv->speed == TLAN_SPEED_100 && -- priv->duplex == TLAN_DUPLEX_FULL) { -- priv->tlanFullDuplex = TRUE; -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2100); -- } else { -- -- /* Set Auto-Neg advertisement */ -- TLan_MiiWriteReg( dev, phy, MII_AN_ADV, (ability << 5) | 1); -- /* Enablee Auto-Neg */ -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1000 ); -- /* Restart Auto-Neg */ -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1200 ); -- /* Wait for 4 sec for autonegotiation -- * to complete. The max spec time is less than this -- * but the card need additional time to start AN. -- * .5 sec should be plenty extra. -- */ -- printk( "TLAN: %s: Starting autonegotiation.\n", dev->name ); -- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); -- return; -- } -- -- } -- -- if ( ( priv->aui ) && ( priv->phyNum != 0 ) ) { -- priv->phyNum = 0; -- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; -- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); -- TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); -- return; -- } else if ( priv->phyNum == 0 ) { -- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tctl ); -- if ( priv->aui ) { -- tctl |= TLAN_TC_AUISEL; -- } else { -- tctl &= ~TLAN_TC_AUISEL; -- control = 0; -- if ( priv->duplex == TLAN_DUPLEX_FULL ) { -- control |= MII_GC_DUPLEX; -- priv->tlanFullDuplex = TRUE; -- } -- if ( priv->speed == TLAN_SPEED_100 ) { -- control |= MII_GC_SPEEDSEL; -- } -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, control ); -- } -- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tctl ); -- } -- -- /* Wait for 2 sec to give the tranceiver time -- * to establish link. -- */ -- TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); -- --} /* TLan_PhyStartLink */ -- --void TLan_PhyFinishAutoNeg( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 an_adv; -- u16 an_lpa; -- u16 data; -- u16 mode; -- u16 phy; -- u16 status; -- -- phy = priv->phy[priv->phyNum]; -- -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); -- udelay( 1000 ); -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); -- -- if ( ! ( status & MII_GS_AUTOCMPLT ) ) { -- /* Wait for 8 sec to give the process -- * more time. Perhaps we should fail after a while. -- */ -- if (!priv->neg_be_verbose++) { -- printk(KERN_INFO "TLAN: Giving autonegotiation more time.\n"); -- printk(KERN_INFO "TLAN: Please check that your adapter has\n"); -- printk(KERN_INFO "TLAN: been properly connected to a HUB or Switch.\n"); -- printk(KERN_INFO "TLAN: Trying to establish link in the background...\n"); -- } -- TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); -- return; -- } -- -- printk( "TLAN: %s: Autonegotiation complete.\n", dev->name ); -- TLan_MiiReadReg( dev, phy, MII_AN_ADV, &an_adv ); -- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa ); -- mode = an_adv & an_lpa & 0x03E0; -- if ( mode & 0x0100 ) { -- priv->tlanFullDuplex = TRUE; -- } else if ( ! ( mode & 0x0080 ) && ( mode & 0x0040 ) ) { -- priv->tlanFullDuplex = TRUE; -- } -- -- if ( ( ! ( mode & 0x0180 ) ) && ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) && ( priv->phyNum != 0 ) ) { -- priv->phyNum = 0; -- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; -- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); -- TLan_SetTimer( dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); -- return; -- } -- -- if ( priv->phyNum == 0 ) { -- if ( ( priv->duplex == TLAN_DUPLEX_FULL ) || ( an_adv & an_lpa & 0x0040 ) ) { -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB | MII_GC_DUPLEX ); -- printk( "TLAN: Starting internal PHY with FULL-DUPLEX\n" ); -- } else { -- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB ); -- printk( "TLAN: Starting internal PHY with HALF-DUPLEX\n" ); -- } -- } -- -- /* Wait for 100 ms. No reason in partiticular. -- */ -- TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); -- --} /* TLan_PhyFinishAutoNeg */ -- --#ifdef MONITOR -- -- /********************************************************************* -- * -- * TLan_phyMonitor -- * -- * Returns: -- * None -- * -- * Params: -- * dev The device structure of this device. -- * -- * -- * This function monitors PHY condition by reading the status -- * register via the MII bus. This can be used to give info -- * about link changes (up/down), and possible switch to alternate -- * media. -- * -- * ******************************************************************/ -- --void TLan_PhyMonitor( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u16 phy; -- u16 phy_status; -- -- phy = priv->phy[priv->phyNum]; -- -- /* Get PHY status register */ -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &phy_status ); -- -- /* Check if link has been lost */ -- if (!(phy_status & MII_GS_LINK)) { -- if (priv->link) { -- priv->link = 0; -- printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name); -- dev->flags &= ~IFF_RUNNING; -- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); -- return; -- } -- } -- -- /* Link restablished? */ -- if ((phy_status & MII_GS_LINK) && !priv->link) { -- priv->link = 1; -- printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name); -- dev->flags |= IFF_RUNNING; -- } -- -- /* Setup a new monitor */ -- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); --} -- --#endif /* MONITOR */ -- --/***************************************************************************** --****************************************************************************** -- -- ThunderLAN Driver MII Routines -- -- These routines are based on the information in Chap. 2 of the -- "ThunderLAN Programmer's Guide", pp. 15-24. -- --****************************************************************************** --*****************************************************************************/ -- -- /*************************************************************** -- * TLan_MiiReadReg -- * -- * Returns: -- * 0 if ack received ok -- * 1 otherwise. -- * -- * Parms: -- * dev The device structure containing -- * The io address and interrupt count -- * for this device. -- * phy The address of the PHY to be queried. -- * reg The register whose contents are to be -- * retreived. -- * val A pointer to a variable to store the -- * retrieved value. -- * -- * This function uses the TLAN's MII bus to retreive the contents -- * of a given register on a PHY. It sends the appropriate info -- * and then reads the 16-bit register value from the MII bus via -- * the TLAN SIO register. -- * -- **************************************************************/ -- --int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) --{ -- u8 nack; -- u16 sio, tmp; -- u32 i; -- int err; -- int minten; -- TLanPrivateInfo *priv = dev->priv; -- unsigned long flags = 0; -- -- err = FALSE; -- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); -- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; -- -- if (!in_irq()) -- spin_lock_irqsave(&priv->lock, flags); -- -- TLan_MiiSync(dev->base_addr); -- -- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); -- if ( minten ) -- TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); -- -- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ -- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Read ( 10b ) */ -- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ -- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ -- -- TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ -- -- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ -- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ -- -- nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ -- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ -- if (nack) { /* No ACK, so fake it */ -- for (i = 0; i < 16; i++) { -- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -- } -- tmp = 0xffff; -- err = TRUE; -- } else { /* ACK, so read data */ -- for (tmp = 0, i = 0x8000; i; i >>= 1) { -- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -- if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) -- tmp |= i; -- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -- } -- } -- -- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ -- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -- -- if ( minten ) -- TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); -- -- *val = tmp; -- -- if (!in_irq()) -- spin_unlock_irqrestore(&priv->lock, flags); -- -- return err; -- --} /* TLan_MiiReadReg */ -- -- /*************************************************************** -- * TLan_MiiSendData -- * -- * Returns: -- * Nothing -- * Parms: -- * base_port The base IO port of the adapter in -- * question. -- * dev The address of the PHY to be queried. -- * data The value to be placed on the MII bus. -- * num_bits The number of bits in data that are to -- * be placed on the MII bus. -- * -- * This function sends on sequence of bits on the MII -- * configuration bus. -- * -- **************************************************************/ -- --void TLan_MiiSendData( u16 base_port, u32 data, unsigned num_bits ) --{ -- u16 sio; -- u32 i; -- -- if ( num_bits == 0 ) -- return; -- -- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); -- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; -- TLan_SetBit( TLAN_NET_SIO_MTXEN, sio ); -- -- for ( i = ( 0x1 << ( num_bits - 1 ) ); i; i >>= 1 ) { -- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); -- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); -- if ( data & i ) -- TLan_SetBit( TLAN_NET_SIO_MDATA, sio ); -- else -- TLan_ClearBit( TLAN_NET_SIO_MDATA, sio ); -- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); -- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); -- } -- --} /* TLan_MiiSendData */ -- -- /*************************************************************** -- * TLan_MiiSync -- * -- * Returns: -- * Nothing -- * Parms: -- * base_port The base IO port of the adapter in -- * question. -- * -- * This functions syncs all PHYs in terms of the MII configuration -- * bus. -- * -- **************************************************************/ -- --void TLan_MiiSync( u16 base_port ) --{ -- int i; -- u16 sio; -- -- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); -- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; -- -- TLan_ClearBit( TLAN_NET_SIO_MTXEN, sio ); -- for ( i = 0; i < 32; i++ ) { -- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); -- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); -- } -- --} /* TLan_MiiSync */ -- -- /*************************************************************** -- * TLan_MiiWriteReg -- * -- * Returns: -- * Nothing -- * Parms: -- * dev The device structure for the device -- * to write to. -- * phy The address of the PHY to be written to. -- * reg The register whose contents are to be -- * written. -- * val The value to be written to the register. -- * -- * This function uses the TLAN's MII bus to write the contents of a -- * given register on a PHY. It sends the appropriate info and then -- * writes the 16-bit register value from the MII configuration bus -- * via the TLAN SIO register. -- * -- **************************************************************/ -- --void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val ) --{ -- u16 sio; -- int minten; -- unsigned long flags = 0; -- TLanPrivateInfo *priv = dev->priv; -- -- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); -- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; -- -- if (!in_irq()) -- spin_lock_irqsave(&priv->lock, flags); -- -- TLan_MiiSync( dev->base_addr ); -- -- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); -- if ( minten ) -- TLan_ClearBit( TLAN_NET_SIO_MINTEN, sio ); -- -- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ -- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Write ( 01b ) */ -- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ -- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ -- -- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Send ACK */ -- TLan_MiiSendData( dev->base_addr, val, 16 ); /* Send Data */ -- -- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); /* Idle cycle */ -- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); -- -- if ( minten ) -- TLan_SetBit( TLAN_NET_SIO_MINTEN, sio ); -- -- if (!in_irq()) -- spin_unlock_irqrestore(&priv->lock, flags); -- --} /* TLan_MiiWriteReg */ --#endif -- --/************************************************************************** --RESET - Reset adapter --***************************************************************************/ --static void skel_reset(struct nic *nic) --{ -- /* put the card in its initial state */ --} -- --/************************************************************************** --POLL - Wait for a frame --***************************************************************************/ --static int skel_poll(struct nic *nic) --{ -- /* return true if there's an ethernet packet ready to read */ -- /* nic->packet should contain data on return */ -- /* nic->packetlen should contain length of data */ -- return (0); /* initially as this is called to flush the input */ --} -- --/************************************************************************** --TRANSMIT - Transmit a frame --***************************************************************************/ --static void skel_transmit( -- struct nic *nic, -- const char *d, /* Destination */ -- unsigned int t, /* Type */ -- unsigned int s, /* size */ -- const char *p) /* Packet */ --{ -- /* send the packet to destination */ --} -- --/************************************************************************** --DISABLE - Turn off ethernet interface --***************************************************************************/ --static void skel_disable(struct nic *nic) --{ --} -- --/************************************************************************** --PROBE - Look for an adapter, this routine's visible to the outside --You should omit the last argument struct pci_device * for a non-PCI NIC --***************************************************************************/ --struct nic *tlan_probe(struct nic *nic, unsigned short *probe_addrs, -- struct pci_device *p) --{ -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- /* if board found */ -- { -- /* point to NIC specific routines */ -- nic->reset = skel_reset; -- nic->poll = skel_poll; -- nic->transmit = skel_transmit; -- nic->disable = skel_disable; -- return nic; -- } -- /* else */ -- return 0; --} -- --#if 0 --#ifndef TLAN_H --#define TLAN_H --/******************************************************************** -- * -- * Linux ThunderLAN Driver -- * -- * tlan.h -- * by James Banks -- * -- * (C) 1997-1998 Caldera, Inc. -- * (C) 1999-2001 Torben Mathiasen -- * -- * This software may be used and distributed according to the terms -- * of the GNU General Public License, incorporated herein by reference. -- * -- ** This file is best viewed/edited with tabstop=4, colums>=132 -- * -- * -- * Dec 10, 1999 Torben Mathiasen -- * New Maintainer -- * -- ********************************************************************/ -- --#include --#include --#include -- --#define FALSE 0 --#define TRUE 1 -- --#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ -- --typedef struct tlan_adapter_entry { -- u16 vendorId; -- u16 deviceId; -- char *deviceLabel; -- u32 flags; -- u16 addrOfs; --} TLanAdapterEntry; -- -- /***************************************************************** -- * EISA Definitions -- * -- ****************************************************************/ -- --#define EISA_ID 0xc80 /* EISA ID Registers */ --#define EISA_ID0 0xc80 /* EISA ID Register 0 */ --#define EISA_ID1 0xc81 /* EISA ID Register 1 */ --#define EISA_ID2 0xc82 /* EISA ID Register 2 */ --#define EISA_ID3 0xc83 /* EISA ID Register 3 */ --#define EISA_CR 0xc84 /* EISA Control Register */ --#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ --#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ --#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ --#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ --#define EISA_APROM 0xc90 /* Ethernet Address PROM */ -- -- /***************************************************************** -- * Rx/Tx List Definitions -- * -- ****************************************************************/ -- --typedef struct tlan_buffer_ref_tag { -- u32 count; -- u32 address; --} TLanBufferRef; -- --typedef struct tlan_list_tag { -- u32 forward; -- u16 cStat; -- u16 frameSize; -- TLanBufferRef buffer[TLAN_BUFFERS_PER_LIST]; --} TLanList; -- --typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; -- -- /***************************************************************** -- * TLAN Private Information Structure -- * -- ****************************************************************/ -- --typedef struct tlan_private_tag { -- struct net_device *nextDevice; -- void *dmaStorage; -- u8 *padBuffer; -- TLanList *rxList; -- u8 *rxBuffer; -- u32 rxHead; -- u32 rxTail; -- u32 rxEocCount; -- TLanList *txList; -- u8 *txBuffer; -- u32 txHead; -- u32 txInProgress; -- u32 txTail; -- u32 txBusyCount; -- u32 phyOnline; -- u32 timerSetAt; -- u32 timerType; -- struct timer_list timer; -- struct net_device_stats stats; -- struct board *adapter; -- u32 adapterRev; -- u32 aui; -- u32 debug; -- u32 duplex; -- u32 phy[2]; -- u32 phyNum; -- u32 speed; -- u8 tlanRev; -- u8 tlanFullDuplex; -- char devName[8]; -- spinlock_t lock; -- u8 link; -- u8 is_eisa; -- struct tq_struct tlan_tqueue; -- u8 neg_be_verbose; --} TLanPrivateInfo; -- --#define TLAN_HC_GO 0x80000000 --#define TLAN_HC_STOP 0x40000000 --#define TLAN_HC_ACK 0x20000000 --#define TLAN_HC_CS_MASK 0x1FE00000 --#define TLAN_HC_EOC 0x00100000 --#define TLAN_HC_RT 0x00080000 --#define TLAN_HC_NES 0x00040000 --#define TLAN_HC_AD_RST 0x00008000 --#define TLAN_HC_LD_TMR 0x00004000 --#define TLAN_HC_LD_THR 0x00002000 --#define TLAN_HC_REQ_INT 0x00001000 --#define TLAN_HC_INT_OFF 0x00000800 --#define TLAN_HC_INT_ON 0x00000400 --#define TLAN_HC_AC_MASK 0x000000FF --#define TLAN_DA_ADR_INC 0x8000 --#define TLAN_DA_RAM_ADR 0x4000 --#define TLAN_HI_IV_MASK 0x1FE0 --#define TLAN_HI_IT_MASK 0x001C -- --#define TLAN_NET_CMD_NRESET 0x80 --#define TLAN_NET_CMD_NWRAP 0x40 --#define TLAN_NET_CMD_CSF 0x20 --#define TLAN_NET_CMD_CAF 0x10 --#define TLAN_NET_CMD_NOBRX 0x08 --#define TLAN_NET_CMD_DUPLEX 0x04 --#define TLAN_NET_CMD_TRFRAM 0x02 --#define TLAN_NET_CMD_TXPACE 0x01 --#define TLAN_NET_SIO_MINTEN 0x80 --#define TLAN_NET_SIO_ECLOK 0x40 --#define TLAN_NET_SIO_ETXEN 0x20 --#define TLAN_NET_SIO_EDATA 0x10 --#define TLAN_NET_SIO_NMRST 0x08 --#define TLAN_NET_SIO_MCLK 0x04 --#define TLAN_NET_SIO_MTXEN 0x02 --#define TLAN_NET_SIO_MDATA 0x01 --#define TLAN_NET_STS_MIRQ 0x80 --#define TLAN_NET_STS_HBEAT 0x40 --#define TLAN_NET_STS_TXSTOP 0x20 --#define TLAN_NET_STS_RXSTOP 0x10 --#define TLAN_NET_STS_RSRVD 0x0F --#define TLAN_NET_MASK_MASK7 0x80 --#define TLAN_NET_MASK_MASK6 0x40 --#define TLAN_NET_MASK_MASK5 0x20 --#define TLAN_NET_MASK_MASK4 0x10 --#define TLAN_NET_MASK_RSRVD 0x0F --#define TLAN_NET_CFG_RCLK 0x8000 --#define TLAN_NET_CFG_TCLK 0x4000 --#define TLAN_NET_CFG_BIT 0x2000 --#define TLAN_NET_CFG_RXCRC 0x1000 --#define TLAN_NET_CFG_PEF 0x0800 --#define TLAN_NET_CFG_1FRAG 0x0400 --#define TLAN_NET_CFG_1CHAN 0x0200 --#define TLAN_NET_CFG_MTEST 0x0100 --#define TLAN_NET_CFG_PHY_EN 0x0080 --#define TLAN_NET_CFG_MSMASK 0x007F --#define TLAN_LED_ACT 0x10 --#define TLAN_LED_LINK 0x01 --#define TLAN_ID_TX_EOC 0x04 --#define TLAN_ID_RX_EOF 0x02 --#define TLAN_ID_RX_EOC 0x01 -- --#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 -- --#ifdef I_LIKE_A_FAST_HASH_FUNCTION --/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ --/* the code below is about seven times as fast as the original code */ --inline u32 TLan_HashFunc( u8 *a ) --{ -- u8 hash; -- -- hash = (a[0]^a[3]); /* & 077 */ -- hash ^= ((a[0]^a[3])>>6); /* & 003 */ -- hash ^= ((a[1]^a[4])<<2); /* & 074 */ -- hash ^= ((a[1]^a[4])>>4); /* & 017 */ -- hash ^= ((a[2]^a[5])<<4); /* & 060 */ -- hash ^= ((a[2]^a[5])>>2); /* & 077 */ -- -- return (hash & 077); --} -- --#else /* original code */ -- --inline u32 xor( u32 a, u32 b ) --{ -- return ( ( a && ! b ) || ( ! a && b ) ); --} --#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) --#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) -- --inline u32 TLan_HashFunc( u8 *a ) --{ -- u32 hash; -- -- hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); -- hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; -- hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; -- hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; -- hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; -- hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; -- -- return hash; -- --} -- --#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ --#endif --/******************************************************************************* -- * -- * Linux ThunderLAN Driver -- * -- * tlan.c -- * by James Banks -- * -- * (C) 1997-1998 Caldera, Inc. -- * (C) 1998 James Banks -- * (C) 1999-2001 Torben Mathiasen -- * -- * This software may be used and distributed according to the terms -- * of the GNU General Public License, incorporated herein by reference. -- * -- ** This file is best viewed/edited with columns>=132. -- * -- ** Useful (if not required) reading: -- * -- * Texas Instruments, ThunderLAN Programmer's Guide, -- * TI Literature Number SPWU013A -- * available in PDF format from www.ti.com -- * Level One, LXT901 and LXT970 Data Sheets -- * available in PDF format from www.level1.com -- * National Semiconductor, DP83840A Data Sheet -- * available in PDF format from www.national.com -- * Microchip Technology, 24C01A/02A/04A Data Sheet -- * available in PDF format from www.microchip.com -- * -- * Change History -- * -- * Tigran Aivazian : TLan_PciProbe() now uses -- * new PCI BIOS interface. -- * Alan Cox : Fixed the out of memory -- * handling. -- * -- * Torben Mathiasen New Maintainer! -- * -- * v1.1 Dec 20, 1999 - Removed linux version checking -- * Patch from Tigran Aivazian. -- * - v1.1 includes Alan's SMP updates. -- * - We still have problems on SMP though, -- * but I'm looking into that. -- * -- * v1.2 Jan 02, 2000 - Hopefully fixed the SMP deadlock. -- * - Removed dependency of HZ being 100. -- * - We now allow higher priority timers to -- * overwrite timers like TLAN_TIMER_ACTIVITY -- * Patch from John Cagle . -- * - Fixed a few compiler warnings. -- * -- * v1.3 Feb 04, 2000 - Fixed the remaining HZ issues. -- * - Removed call to pci_present(). -- * - Removed SA_INTERRUPT flag from irq handler. -- * - Added __init and __initdata to reduce resisdent -- * code size. -- * - Driver now uses module_init/module_exit. -- * - Rewrote init_module and tlan_probe to -- * share a lot more code. We now use tlan_probe -- * with builtin and module driver. -- * - Driver ported to new net API. -- * - tlan.txt has been reworked to reflect current -- * driver (almost) -- * - Other minor stuff -- * -- * v1.4 Feb 10, 2000 - Updated with more changes required after Dave's -- * network cleanup in 2.3.43pre7 (Tigran & myself) -- * - Minor stuff. -- * -- * v1.5 March 22, 2000 - Fixed another timer bug that would hang the driver -- * if no cable/link were present. -- * - Cosmetic changes. -- * - TODO: Port completely to new PCI/DMA API -- * Auto-Neg fallback. -- * -- * v1.6 April 04, 2000 - Fixed driver support for kernel-parameters. Haven't -- * tested it though, as the kernel support is currently -- * broken (2.3.99p4p3). -- * - Updated tlan.txt accordingly. -- * - Adjusted minimum/maximum frame length. -- * - There is now a TLAN website up at -- * http://tlan.kernel.dk -- * -- * v1.7 April 07, 2000 - Started to implement custom ioctls. Driver now -- * reports PHY information when used with Donald -- * Beckers userspace MII diagnostics utility. -- * -- * v1.8 April 23, 2000 - Fixed support for forced speed/duplex settings. -- * - Added link information to Auto-Neg and forced -- * modes. When NIC operates with auto-neg the driver -- * will report Link speed & duplex modes as well as -- * link partner abilities. When forced link is used, -- * the driver will report status of the established -- * link. -- * Please read tlan.txt for additional information. -- * - Removed call to check_region(), and used -- * return value of request_region() instead. -- * -- * v1.8a May 28, 2000 - Minor updates. -- * -- * v1.9 July 25, 2000 - Fixed a few remaining Full-Duplex issues. -- * - Updated with timer fixes from Andrew Morton. -- * - Fixed module race in TLan_Open. -- * - Added routine to monitor PHY status. -- * - Added activity led support for Proliant devices. -- * -- * v1.10 Aug 30, 2000 - Added support for EISA based tlan controllers -- * like the Compaq NetFlex3/E. -- * - Rewrote tlan_probe to better handle multiple -- * bus probes. Probing and device setup is now -- * done through TLan_Probe and TLan_init_one. Actual -- * hardware probe is done with kernel API and -- * TLan_EisaProbe. -- * - Adjusted debug information for probing. -- * - Fixed bug that would cause general debug information -- * to be printed after driver removal. -- * - Added transmit timeout handling. -- * - Fixed OOM return values in tlan_probe. -- * - Fixed possible mem leak in tlan_exit -- * (now tlan_remove_one). -- * - Fixed timer bug in TLan_phyMonitor. -- * - This driver version is alpha quality, please -- * send me any bug issues you may encounter. -- * -- * v1.11 Aug 31, 2000 - Do not try to register irq 0 if no irq line was -- * set for EISA cards. -- * - Added support for NetFlex3/E with nibble-rate -- * 10Base-T PHY. This is untestet as I haven't got -- * one of these cards. -- * - Fixed timer being added twice. -- * - Disabled PhyMonitoring by default as this is -- * work in progress. Define MONITOR to enable it. -- * - Now we don't display link info with PHYs that -- * doesn't support it (level1). -- * - Incresed tx_timeout beacuse of auto-neg. -- * - Adjusted timers for forced speeds. -- * -- * v1.12 Oct 12, 2000 - Minor fixes (memleak, init, etc.) -- * -- * v1.13 Nov 28, 2000 - Stop flooding console with auto-neg issues -- * when link can't be established. -- * - Added the bbuf option as a kernel parameter. -- * - Fixed ioaddr probe bug. -- * - Fixed stupid deadlock with MII interrupts. -- * - Added support for speed/duplex selection with -- * multiple nics. -- * - Added partly fix for TX Channel lockup with -- * TLAN v1.0 silicon. This needs to be investigated -- * further. -- * -- * v1.14 Dec 16, 2000 - Added support for servicing multiple frames per. -- * interrupt. Thanks goes to -- * Adam Keys -- * Denis Beaudoin -- * for providing the patch. -- * - Fixed auto-neg output when using multiple -- * adapters. -- * - Converted to use new taskq interface. -- * -- * v1.14a Jan 6, 2001 - Minor adjustments (spinlocks, etc.) -- * -- *******************************************************************************/ -- -- --#include -- --#include "tlan.h" -- --#include --#include --#include --#include --#include --#include --#include -- --typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 ); -- --/* For removing EISA devices */ --static struct net_device *TLan_Eisa_Devices; -- --static int TLanDevicesInstalled; -- --/* Set speed, duplex and aui settings */ --static int aui[MAX_TLAN_BOARDS]; --static int duplex[MAX_TLAN_BOARDS]; --static int speed[MAX_TLAN_BOARDS]; --static int boards_found; -- --MODULE_AUTHOR("Maintainer: Torben Mathiasen "); --MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); --MODULE_LICENSE("GPL"); -- --MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); --MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); --MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); --MODULE_PARM(debug, "i"); --MODULE_PARM(bbuf, "i"); --MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); --MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); --MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); --MODULE_PARM_DESC(debug, "ThunderLAN debug mask"); --MODULE_PARM_DESC(bbuf, "ThunderLAN use big buffer (0-1)"); --EXPORT_NO_SYMBOLS; -- --/* Define this to enable Link beat monitoring */ --#undef MONITOR -- --/* Turn on debugging. See linux/Documentation/networking/tlan.txt for details */ --static int debug; -- --static int bbuf; --static u8 *TLanPadBuffer; --static char TLanSignature[] = "TLAN"; --static const char tlan_banner[] = "ThunderLAN driver v1.14a\n"; --static int tlan_have_pci; --static int tlan_have_eisa; -- --const char *media[] = { -- "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", -- "100baseTx-FD", "100baseT4", 0 --}; -- --int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; -- --static struct board { -- const char *deviceLabel; -- u32 flags; -- u16 addrOfs; --} board_info[] __devinitdata = { -- { "Compaq Netelligent 10 T PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, -- { "Compaq Netelligent 10/100 TX PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, -- { "Compaq Integrated NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, -- { "Compaq NetFlex-3/P", TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, -- { "Compaq NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, -- { "Compaq Netelligent Integrated 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, -- { "Compaq Netelligent Dual 10/100 TX PCI UTP", TLAN_ADAPTER_NONE, 0x83 }, -- { "Compaq Netelligent 10/100 TX Embedded UTP", TLAN_ADAPTER_NONE, 0x83 }, -- { "Olicom OC-2183/2185", TLAN_ADAPTER_USE_INTERN_10, 0x83 }, -- { "Olicom OC-2325", TLAN_ADAPTER_UNMANAGED_PHY, 0xF8 }, -- { "Olicom OC-2326", TLAN_ADAPTER_USE_INTERN_10, 0xF8 }, -- { "Compaq Netelligent 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, -- { "Compaq Netelligent 10 T/2 PCI UTP/Coax", TLAN_ADAPTER_NONE, 0x83 }, -- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED | /* EISA card */ -- TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, -- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, /* EISA card */ --}; -- --static struct pci_device_id tlan_pci_tbl[] __devinitdata = { -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 }, -- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, -- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2325, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 }, -- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 }, -- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_T2, -- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 }, -- { 0,} --}; --MODULE_DEVICE_TABLE(pci, tlan_pci_tbl); -- --static void TLan_EisaProbe( void ); --static void TLan_Eisa_Cleanup( void ); --static int TLan_Init( struct net_device * ); --static int TLan_Open( struct net_device *dev ); --static int TLan_StartTx( struct sk_buff *, struct net_device *); --static void TLan_HandleInterrupt( int, void *, struct pt_regs *); --static int TLan_Close( struct net_device *); --static struct net_device_stats *TLan_GetStats( struct net_device *); --static void TLan_SetMulticastList( struct net_device *); --static int TLan_ioctl( struct net_device *dev, struct ifreq *rq, int cmd); --static int TLan_probe1( struct pci_dev *pdev, long ioaddr, int irq, int rev, const struct pci_device_id *ent); --static void TLan_tx_timeout( struct net_device *dev); --static int tlan_init_one( struct pci_dev *pdev, const struct pci_device_id *ent); -- --static u32 TLan_HandleInvalid( struct net_device *, u16 ); --static u32 TLan_HandleTxEOF( struct net_device *, u16 ); --static u32 TLan_HandleStatOverflow( struct net_device *, u16 ); --static u32 TLan_HandleRxEOF( struct net_device *, u16 ); --static u32 TLan_HandleDummy( struct net_device *, u16 ); --static u32 TLan_HandleTxEOC( struct net_device *, u16 ); --static u32 TLan_HandleStatusCheck( struct net_device *, u16 ); --static u32 TLan_HandleRxEOC( struct net_device *, u16 ); -- --static void TLan_Timer( unsigned long ); -- --static void TLan_ResetLists( struct net_device * ); --static void TLan_FreeLists( struct net_device * ); --static void TLan_PrintDio( u16 ); --static void TLan_PrintList( TLanList *, char *, int ); --static void TLan_ReadAndClearStats( struct net_device *, int ); --static void TLan_ResetAdapter( struct net_device * ); --static void TLan_FinishReset( struct net_device * ); --static void TLan_SetMac( struct net_device *, int areg, char *mac ); -- --static void TLan_PhyPrint( struct net_device * ); --static void TLan_PhyDetect( struct net_device * ); --static void TLan_PhyPowerDown( struct net_device * ); --static void TLan_PhyPowerUp( struct net_device * ); --static void TLan_PhyReset( struct net_device * ); --static void TLan_PhyStartLink( struct net_device * ); --static void TLan_PhyFinishAutoNeg( struct net_device * ); --#ifdef MONITOR --static void TLan_PhyMonitor( struct net_device * ); --#endif -- --/* --static int TLan_PhyNop( struct net_device * ); --static int TLan_PhyInternalCheck( struct net_device * ); --static int TLan_PhyInternalService( struct net_device * ); --static int TLan_PhyDp83840aCheck( struct net_device * ); --*/ -- --static int TLan_MiiReadReg( struct net_device *, u16, u16, u16 * ); --static void TLan_MiiSendData( u16, u32, unsigned ); --static void TLan_MiiSync( u16 ); --static void TLan_MiiWriteReg( struct net_device *, u16, u16, u16 ); -- --static void TLan_EeSendStart( u16 ); --static int TLan_EeSendByte( u16, u8, int ); --static void TLan_EeReceiveByte( u16, u8 *, int ); --static int TLan_EeReadByte( struct net_device *, u8, u8 * ); -- --static TLanIntVectorFunc *TLanIntVector[TLAN_INT_NUMBER_OF_INTS] = { -- TLan_HandleInvalid, -- TLan_HandleTxEOF, -- TLan_HandleStatOverflow, -- TLan_HandleRxEOF, -- TLan_HandleDummy, -- TLan_HandleTxEOC, -- TLan_HandleStatusCheck, -- TLan_HandleRxEOC --}; -- --static inline void --TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) --{ -- TLanPrivateInfo *priv = dev->priv; -- unsigned long flags = 0; -- -- if (!in_irq()) -- spin_lock_irqsave(&priv->lock, flags); -- if ( priv->timer.function != NULL && -- priv->timerType != TLAN_TIMER_ACTIVITY ) { -- if (!in_irq()) -- spin_unlock_irqrestore(&priv->lock, flags); -- return; -- } -- priv->timer.function = &TLan_Timer; -- if (!in_irq()) -- spin_unlock_irqrestore(&priv->lock, flags); -- -- priv->timer.data = (unsigned long) dev; -- priv->timerSetAt = jiffies; -- priv->timerType = type; -- mod_timer(&priv->timer, jiffies + ticks); -- --} /* TLan_SetTimer */ -- --/***************************************************************************** --****************************************************************************** -- -- ThunderLAN Driver Primary Functions -- -- These functions are more or less common to all Linux network drivers. -- --****************************************************************************** --*****************************************************************************/ -- -- /*************************************************************** -- * tlan_remove_one -- * -- * Returns: -- * Nothing -- * Parms: -- * None -- * -- * Goes through the TLanDevices list and frees the device -- * structs and memory associated with each device (lists -- * and buffers). It also ureserves the IO port regions -- * associated with this device. -- * -- **************************************************************/ -- --static void __devexit tlan_remove_one( struct pci_dev *pdev) --{ -- struct net_device *dev = pci_get_drvdata( pdev ); -- TLanPrivateInfo *priv = dev->priv; -- -- unregister_netdev( dev ); -- -- if ( priv->dmaStorage ) { -- kfree( priv->dmaStorage ); -- } -- -- release_region( dev->base_addr, 0x10 ); -- -- kfree( dev ); -- -- pci_set_drvdata( pdev, NULL ); --} -- --static struct pci_driver tlan_driver = { -- name: "tlan", -- id_table: tlan_pci_tbl, -- probe: tlan_init_one, -- remove: tlan_remove_one, --}; -- --static int __init tlan_probe(void) --{ -- static int pad_allocated; -- -- printk(KERN_INFO "%s", tlan_banner); -- -- TLanPadBuffer = (u8 *) kmalloc(TLAN_MIN_FRAME_SIZE, -- GFP_KERNEL); -- -- if (TLanPadBuffer == NULL) { -- printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n"); -- return -ENOMEM; -- } -- -- memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE); -- pad_allocated = 1; -- -- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); -- -- /* Use new style PCI probing. Now the kernel will -- do most of this for us */ -- pci_register_driver(&tlan_driver); -- -- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); -- TLan_EisaProbe(); -- -- printk(KERN_INFO "TLAN: %d device%s installed, PCI: %d EISA: %d\n", -- TLanDevicesInstalled, TLanDevicesInstalled == 1 ? "" : "s", -- tlan_have_pci, tlan_have_eisa); -- -- if (TLanDevicesInstalled == 0) { -- pci_unregister_driver(&tlan_driver); -- kfree(TLanPadBuffer); -- return -ENODEV; -- } -- return 0; --} -- -- --static int __devinit tlan_init_one( struct pci_dev *pdev, -- const struct pci_device_id *ent) --{ -- return TLan_probe1( pdev, -1, -1, 0, ent); --} -- --/* -- *************************************************************** -- * tlan_probe1 -- * -- * Returns: -- * 0 on success, error code on error -- * Parms: -- * none -- * -- * The name is lower case to fit in with all the rest of -- * the netcard_probe names. This function looks for -- * another TLan based adapter, setting it up with the -- * allocated device struct if one is found. -- * tlan_probe has been ported to the new net API and -- * now allocates its own device structure. This function -- * is also used by modules. -- * -- **************************************************************/ -- --static int __devinit TLan_probe1(struct pci_dev *pdev, -- long ioaddr, int irq, int rev, const struct pci_device_id *ent ) --{ -- -- struct net_device *dev; -- TLanPrivateInfo *priv; -- u8 pci_rev; -- u16 device_id; -- int reg; -- -- if (pdev && pci_enable_device(pdev)) -- return -EIO; -- -- dev = init_etherdev(NULL, sizeof(TLanPrivateInfo)); -- if (dev == NULL) { -- printk(KERN_ERR "TLAN: Could not allocate memory for device.\n"); -- return -ENOMEM; -- } -- SET_MODULE_OWNER(dev); -- -- priv = dev->priv; -- -- /* Is this a PCI device? */ -- if (pdev) { -- u32 pci_io_base = 0; -- -- priv->adapter = &board_info[ent->driver_data]; -- -- pci_read_config_byte ( pdev, PCI_REVISION_ID, &pci_rev); -- -- for ( reg= 0; reg <= 5; reg ++ ) { -- if (pci_resource_flags(pdev, reg) & IORESOURCE_IO) { -- pci_io_base = pci_resource_start(pdev, reg); -- TLAN_DBG( TLAN_DEBUG_GNRL, "IO mapping is available at %x.\n", -- pci_io_base); -- break; -- } -- } -- if (!pci_io_base) { -- printk(KERN_ERR "TLAN: No IO mappings available\n"); -- unregister_netdev(dev); -- kfree(dev); -- return -ENODEV; -- } -- -- dev->base_addr = pci_io_base; -- dev->irq = pdev->irq; -- priv->adapterRev = pci_rev; -- pci_set_master(pdev); -- pci_set_drvdata(pdev, dev); -- -- } else { /* EISA card */ -- /* This is a hack. We need to know which board structure -- * is suited for this adapter */ -- device_id = inw(ioaddr + EISA_ID2); -- priv->is_eisa = 1; -- if (device_id == 0x20F1) { -- priv->adapter = &board_info[13]; /* NetFlex-3/E */ -- priv->adapterRev = 23; /* TLAN 2.3 */ -- } else { -- priv->adapter = &board_info[14]; -- priv->adapterRev = 10; /* TLAN 1.0 */ -- } -- dev->base_addr = ioaddr; -- dev->irq = irq; -- } -- -- /* Kernel parameters */ -- if (dev->mem_start) { -- priv->aui = dev->mem_start & 0x01; -- priv->duplex = ((dev->mem_start & 0x06) == 0x06) ? 0 : (dev->mem_start & 0x06) >> 1; -- priv->speed = ((dev->mem_start & 0x18) == 0x18) ? 0 : (dev->mem_start & 0x18) >> 3; -- -- if (priv->speed == 0x1) { -- priv->speed = TLAN_SPEED_10; -- } else if (priv->speed == 0x2) { -- priv->speed = TLAN_SPEED_100; -- } -- debug = priv->debug = dev->mem_end; -- } else { -- priv->aui = aui[boards_found]; -- priv->speed = speed[boards_found]; -- priv->duplex = duplex[boards_found]; -- priv->debug = debug; -- } -- -- /* This will be used when we get an adapter error from -- * within our irq handler */ -- INIT_LIST_HEAD(&priv->tlan_tqueue.list); -- priv->tlan_tqueue.sync = 0; -- priv->tlan_tqueue.routine = (void *)(void*)TLan_tx_timeout; -- priv->tlan_tqueue.data = dev; -- -- spin_lock_init(&priv->lock); -- -- if (TLan_Init(dev)) { -- printk(KERN_ERR "TLAN: Could not register device.\n"); -- unregister_netdev(dev); -- kfree(dev); -- return -EAGAIN; -- } else { -- -- TLanDevicesInstalled++; -- boards_found++; -- -- /* pdev is NULL if this is an EISA device */ -- if (pdev) -- tlan_have_pci++; -- else { -- priv->nextDevice = TLan_Eisa_Devices; -- TLan_Eisa_Devices = dev; -- tlan_have_eisa++; -- } -- -- printk(KERN_INFO "TLAN: %s irq=%2d, io=%04x, %s, Rev. %d\n", -- dev->name, -- (int) dev->irq, -- (int) dev->base_addr, -- priv->adapter->deviceLabel, -- priv->adapterRev); -- return 0; -- } -- --} -+} /* TLan_FinishReset */ - --static void TLan_Eisa_Cleanup(void) --{ -- struct net_device *dev; -- TLanPrivateInfo *priv; -- -- while( tlan_have_eisa ) { -- dev = TLan_Eisa_Devices; -- priv = dev->priv; -- if (priv->dmaStorage) { -- kfree(priv->dmaStorage); -- } -- release_region( dev->base_addr, 0x10); -- unregister_netdev( dev ); -- TLan_Eisa_Devices = priv->nextDevice; -- kfree( dev ); -- tlan_have_eisa--; -- } --} -- -- --static void __exit tlan_exit(void) --{ -- pci_unregister_driver(&tlan_driver); -- -- if (tlan_have_eisa) -- TLan_Eisa_Cleanup(); -- -- kfree( TLanPadBuffer ); -- --} -- --/* Module loading/unloading */ --module_init(tlan_probe); --module_exit(tlan_exit); -- -- /************************************************************** -- * TLan_EisaProbe -- * -- * Returns: 0 on success, 1 otherwise -- * -- * Parms: None -- * -- * -- * This functions probes for EISA devices and calls -- * TLan_probe1 when one is found. -- * -- *************************************************************/ -- --static void __init TLan_EisaProbe (void) -+/************************************************************************** -+POLL - Wait for a frame -+***************************************************************************/ -+static int tlan_poll(struct nic *nic, int retrieve) - { -- long ioaddr; -- int rc = -ENODEV; -- int irq; -- u16 device_id; -- -- if (!EISA_bus) { -- TLAN_DBG(TLAN_DEBUG_PROBE, "No EISA bus present\n"); -- return; -- } -- -- /* Loop through all slots of the EISA bus */ -- for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { -- -- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC80, inw(ioaddr + EISA_ID)); -- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC82, inw(ioaddr + EISA_ID2)); -+ /* return true if there's an ethernet packet ready to read */ -+ /* nic->packet should contain data on return */ -+ /* nic->packetlen should contain length of data */ -+ u32 framesize; -+ u32 host_cmd = 0; -+ u32 ack = 1; -+ int eoc = 0; -+ int entry = priv->cur_rx % TLAN_NUM_RX_LISTS; -+ u16 tmpCStat = le32_to_cpu(rx_ring[entry].cStat); -+ u16 host_int = inw(BASE + TLAN_HOST_INT); - -- TLAN_DBG(TLAN_DEBUG_PROBE, "Probing for EISA adapter at IO: 0x%4x : ", -- (int) ioaddr); -- if (request_region(ioaddr, 0x10, TLanSignature) == NULL) -- goto out; -- -- if (inw(ioaddr + EISA_ID) != 0x110E) { -- release_region(ioaddr, 0x10); -- goto out; -- } -- -- device_id = inw(ioaddr + EISA_ID2); -- if (device_id != 0x20F1 && device_id != 0x40F1) { -- release_region (ioaddr, 0x10); -- goto out; -- } -- -- if (inb(ioaddr + EISA_CR) != 0x1) { /* Check if adapter is enabled */ -- release_region (ioaddr, 0x10); -- goto out2; -- } -- -- if (debug == 0x10) -- printk("Found one\n"); -+ if ((tmpCStat & TLAN_CSTAT_FRM_CMP) && !retrieve) -+ return 1; - -- /* Get irq from board */ -- switch (inb(ioaddr + 0xCC0)) { -- case(0x10): -- irq=5; -- break; -- case(0x20): -- irq=9; -- break; -- case(0x40): -- irq=10; -- break; -- case(0x80): -- irq=11; -- break; -- default: -- goto out; -- } -- -- -- /* Setup the newly found eisa adapter */ -- rc = TLan_probe1( NULL, ioaddr, irq, -- 12, NULL); -- continue; -- -- out: -- if (debug == 0x10) -- printk("None found\n"); -- continue; -- -- out2: if (debug == 0x10) -- printk("Card found but it is not enabled, skipping\n"); -- continue; -- -- } -+ outw(host_int, BASE + TLAN_HOST_INT); - --} /* TLan_EisaProbe */ -+ if (!(tmpCStat & TLAN_CSTAT_FRM_CMP)) -+ return 0; - -- -+ /* printf("PI-1: 0x%hX\n", host_int); */ -+ if (tmpCStat & TLAN_CSTAT_EOC) -+ eoc = 1; - -- /*************************************************************** -- * TLan_Init -- * -- * Returns: -- * 0 on success, error code otherwise. -- * Parms: -- * dev The structure of the device to be -- * init'ed. -- * -- * This function completes the initialization of the -- * device structure and driver. It reserves the IO -- * addresses, allocates memory for the lists and bounce -- * buffers, retrieves the MAC address from the eeprom -- * and assignes the device's methods. -- * -- **************************************************************/ -+ framesize = rx_ring[entry].frameSize; - --static int TLan_Init( struct net_device *dev ) --{ -- int dma_size; -- int err; -- int i; -- TLanPrivateInfo *priv; -+ nic->packetlen = framesize; - -- priv = dev->priv; -- -- if (!priv->is_eisa) /* EISA devices have already requested IO */ -- if (!request_region( dev->base_addr, 0x10, TLanSignature )) { -- printk(KERN_ERR "TLAN: %s: IO port region 0x%lx size 0x%x in use.\n", -- dev->name, -- dev->base_addr, -- 0x10 ); -- return -EIO; -+#ifdef EBDEBUG -+ printf(".%d.", framesize); -+#endif -+ -+ memcpy(nic->packet, rxb + -+ (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen); -+ -+ rx_ring[entry].cStat = 0; -+#ifdef EBDEBUG -+ //hex_dump(nic->packet, nic->packetlen); -+ printf("%d", entry); -+#endif -+ entry = (entry + 1) % TLAN_NUM_RX_LISTS; -+ priv->cur_rx = entry; -+ if (eoc) { -+ if ((rx_ring[entry].cStat & TLAN_CSTAT_READY) == -+ TLAN_CSTAT_READY) { -+ ack |= TLAN_HC_GO | TLAN_HC_RT; -+ host_cmd = TLAN_HC_ACK | ack | 0x001C0000; -+ outl(host_cmd, BASE + TLAN_HOST_CMD); - } -- -- if ( bbuf ) { -- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) -- * ( sizeof(TLanList) + TLAN_MAX_FRAME_SIZE ); - } else { -- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) -- * ( sizeof(TLanList) ); -- } -- priv->dmaStorage = kmalloc(dma_size, GFP_KERNEL | GFP_DMA); -- if ( priv->dmaStorage == NULL ) { -- printk(KERN_ERR "TLAN: Could not allocate lists and buffers for %s.\n", -- dev->name ); -- release_region( dev->base_addr, 0x10 ); -- return -ENOMEM; -- } -- memset( priv->dmaStorage, 0, dma_size ); -- priv->rxList = (TLanList *) -- ( ( ( (u32) priv->dmaStorage ) + 7 ) & 0xFFFFFFF8 ); -- priv->txList = priv->rxList + TLAN_NUM_RX_LISTS; -- if ( bbuf ) { -- priv->rxBuffer = (u8 *) ( priv->txList + TLAN_NUM_TX_LISTS ); -- priv->txBuffer = priv->rxBuffer -- + ( TLAN_NUM_RX_LISTS * TLAN_MAX_FRAME_SIZE ); -- } -- -- err = 0; -- for ( i = 0; i < 6 ; i++ ) -- err |= TLan_EeReadByte( dev, -- (u8) priv->adapter->addrOfs + i, -- (u8 *) &dev->dev_addr[i] ); -- if ( err ) { -- printk(KERN_ERR "TLAN: %s: Error reading MAC from eeprom: %d\n", -- dev->name, -- err ); -- } -- dev->addr_len = 6; -- -- /* Device methods */ -- dev->open = &TLan_Open; -- dev->hard_start_xmit = &TLan_StartTx; -- dev->stop = &TLan_Close; -- dev->get_stats = &TLan_GetStats; -- dev->set_multicast_list = &TLan_SetMulticastList; -- dev->do_ioctl = &TLan_ioctl; -- dev->tx_timeout = &TLan_tx_timeout; -- dev->watchdog_timeo = TX_TIMEOUT; -- -- return 0; -- --} /* TLan_Init */ -- -- /*************************************************************** -- * TLan_Open -- * -- * Returns: -- * 0 on success, error code otherwise. -- * Parms: -- * dev Structure of device to be opened. -- * -- * This routine puts the driver and TLAN adapter in a -- * state where it is ready to send and receive packets. -- * It allocates the IRQ, resets and brings the adapter -- * out of reset, and allows interrupts. It also delays -- * the startup for autonegotiation or sends a Rx GO -- * command to the adapter, as appropriate. -- * -- **************************************************************/ -- --static int TLan_Open( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- int err; -- -- priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); -- err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); -- -- if ( err ) { -- printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); -- return err; -+ host_cmd = TLAN_HC_ACK | ack | (0x000C0000); -+ outl(host_cmd, BASE + TLAN_HOST_CMD); -+#ifdef EBDEBUG -+ printf("AC: 0x%hX\n", inw(BASE + TLAN_CH_PARM)); -+ host_int = inw(BASE + TLAN_HOST_INT); -+ printf("PI-2: 0x%hX\n", host_int); -+#endif - } -- -- init_timer(&priv->timer); -- netif_start_queue(dev); -- -- /* NOTE: It might not be necessary to read the stats before a -- reset if you don't care what the values are. -- */ -- TLan_ResetLists( dev ); -- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); -- TLan_ResetAdapter( dev ); -- -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Opened. TLAN Chip Rev: %x\n", dev->name, priv->tlanRev ); -- -- return 0; -- --} /* TLan_Open */ -- -- /************************************************************** -- * TLan_ioctl -- * -- * Returns: -- * 0 on success, error code otherwise -- * Params: -- * dev structure of device to receive ioctl. -- * -- * rq ifreq structure to hold userspace data. -- * -- * cmd ioctl command. -- * -- * -- *************************************************************/ -+ refill_rx(nic); -+ return (1); /* initially as this is called to flush the input */ -+} - --static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -+static void refill_rx(struct nic *nic __unused) - { -- TLanPrivateInfo *priv = dev->priv; -- struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; -- u32 phy = priv->phy[priv->phyNum]; -- -- if (!priv->phyOnline) -- return -EAGAIN; -- -- switch(cmd) { -- case SIOCGMIIPHY: /* Get address of MII PHY in use. */ -- case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */ -- data->phy_id = phy; -- -- case SIOCGMIIREG: /* Read MII PHY register. */ -- case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */ -- TLan_MiiReadReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, &data->val_out); -- return 0; -- -+ int entry = 0; - -- case SIOCSMIIREG: /* Write MII PHY register. */ -- case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ -- if (!capable(CAP_NET_ADMIN)) -- return -EPERM; -- TLan_MiiWriteReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); -- return 0; -- default: -- return -EOPNOTSUPP; -+ for (; -+ (priv->cur_rx - priv->dirty_rx + -+ TLAN_NUM_RX_LISTS) % TLAN_NUM_RX_LISTS > 0; -+ priv->dirty_rx = (priv->dirty_rx + 1) % TLAN_NUM_RX_LISTS) { -+ entry = priv->dirty_rx % TLAN_NUM_TX_LISTS; -+ rx_ring[entry].frameSize = TLAN_MAX_FRAME_SIZE; -+ rx_ring[entry].cStat = TLAN_CSTAT_READY; - } --} /* tlan_ioctl */ -- -- /*************************************************************** -- * TLan_tx_timeout -- * -- * Returns: nothing -- * -- * Params: -- * dev structure of device which timed out -- * during transmit. -- * -- **************************************************************/ -- --static void TLan_tx_timeout(struct net_device *dev) --{ -- -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Transmit timed out.\n", dev->name); -- -- /* Ok so we timed out, lets see what we can do about it...*/ -- TLan_FreeLists( dev ); -- TLan_ResetLists( dev ); -- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); -- TLan_ResetAdapter( dev ); -- dev->trans_start = jiffies; -- netif_wake_queue( dev ); - - } -- - -- /*************************************************************** -- * TLan_StartTx -- * -- * Returns: -- * 0 on success, non-zero on failure. -- * Parms: -- * skb A pointer to the sk_buff containing the -- * frame to be sent. -- * dev The device to send the data on. -- * -- * This function adds a frame to the Tx list to be sent -- * ASAP. First it verifies that the adapter is ready and -- * there is room in the queue. Then it sets up the next -- * available list, copies the frame to the corresponding -- * buffer. If the adapter Tx channel is idle, it gives -- * the adapter a Tx Go command on the list, otherwise it -- * sets the forward address of the previous list to point -- * to this one. Then it frees the sk_buff. -- * -- **************************************************************/ -+/* #define EBDEBUG */ -+/************************************************************************** -+TRANSMIT - Transmit a frame -+***************************************************************************/ -+static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ -+ unsigned int t, /* Type */ -+ unsigned int s, /* size */ -+ const char *p) -+{ /* Packet */ -+ u16 nstype; -+ u32 to; -+ struct TLanList *tail_list; -+ struct TLanList *head_list; -+ u8 *tail_buffer; -+ u32 ack = 0; -+ u32 host_cmd; -+ int eoc = 0; -+ u16 tmpCStat; -+#ifdef EBDEBUG -+ u16 host_int = inw(BASE + TLAN_HOST_INT); -+#endif -+ int entry = 0; - --static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- TLanList *tail_list; -- u8 *tail_buffer; -- int pad; -- unsigned long flags; -- -- if ( ! priv->phyOnline ) { -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n", dev->name ); -- dev_kfree_skb_any(skb); -- return 0; -+#ifdef EBDEBUG -+ printf("INT0-0x%hX\n", host_int); -+#endif -+ -+ if (!priv->phyOnline) { -+ printf("TRANSMIT: %s PHY is not ready\n", priv->nic_name); -+ return; - } - - tail_list = priv->txList + priv->txTail; -- -- if ( tail_list->cStat != TLAN_CSTAT_UNUSED ) { -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s is busy (Head=%d Tail=%d)\n", dev->name, priv->txHead, priv->txTail ); -- netif_stop_queue(dev); -+ -+ if (tail_list->cStat != TLAN_CSTAT_UNUSED) { -+ printf("TRANSMIT: %s is busy (Head=%d Tail=%d)\n", -+ priv->nic_name, priv->txList, priv->txTail); -+ tx_ring[entry].cStat = TLAN_CSTAT_UNUSED; - priv->txBusyCount++; -- return 1; -+ return; - } - - tail_list->forward = 0; - -- if ( bbuf ) { -- tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE ); -- memcpy( tail_buffer, skb->data, skb->len ); -- } else { -- tail_list->buffer[0].address = virt_to_bus( skb->data ); -- tail_list->buffer[9].address = (u32) skb; -- } -+ tail_buffer = txb + (priv->txTail * TLAN_MAX_FRAME_SIZE); - -- pad = TLAN_MIN_FRAME_SIZE - skb->len; -- -- if ( pad > 0 ) { -- tail_list->frameSize = (u16) skb->len + pad; -- tail_list->buffer[0].count = (u32) skb->len; -- tail_list->buffer[1].count = TLAN_LAST_BUFFER | (u32) pad; -- tail_list->buffer[1].address = virt_to_bus( TLanPadBuffer ); -- } else { -- tail_list->frameSize = (u16) skb->len; -- tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len; -- tail_list->buffer[1].count = 0; -- tail_list->buffer[1].address = 0; -- } -+ /* send the packet to destination */ -+ memcpy(tail_buffer, d, ETH_ALEN); -+ memcpy(tail_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); -+ nstype = htons((u16) t); -+ memcpy(tail_buffer + 2 * ETH_ALEN, (u8 *) & nstype, 2); -+ memcpy(tail_buffer + ETH_HLEN, p, s); -+ -+ s += ETH_HLEN; -+ s &= 0x0FFF; -+ while (s < ETH_ZLEN) -+ tail_buffer[s++] = '\0'; -+ -+ /*=====================================================*/ -+ /* Receive -+ * 0000 0000 0001 1100 -+ * 0000 0000 0000 1100 -+ * 0000 0000 0000 0011 = 0x0003 -+ * -+ * 0000 0000 0000 0000 0000 0000 0000 0011 -+ * 0000 0000 0000 1100 0000 0000 0000 0000 = 0x000C0000 -+ * -+ * Transmit -+ * 0000 0000 0001 1100 -+ * 0000 0000 0000 0100 -+ * 0000 0000 0000 0001 = 0x0001 -+ * -+ * 0000 0000 0000 0000 0000 0000 0000 0001 -+ * 0000 0000 0000 0100 0000 0000 0000 0000 = 0x00040000 -+ * */ -+ -+ /* Setup the transmit descriptor */ -+ tail_list->frameSize = (u16) s; -+ tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) s; -+ tail_list->buffer[1].count = 0; -+ tail_list->buffer[1].address = 0; - -- spin_lock_irqsave(&priv->lock, flags); - tail_list->cStat = TLAN_CSTAT_READY; -- if ( ! priv->txInProgress ) { -+ -+#ifdef EBDEBUG -+ host_int = inw(BASE + TLAN_HOST_INT); -+ printf("INT1-0x%hX\n", host_int); -+#endif -+ -+ if (!priv->txInProgress) { - priv->txInProgress = 1; -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Starting TX on buffer %d\n", priv->txTail ); -- outl( virt_to_bus( tail_list ), dev->base_addr + TLAN_CH_PARM ); -- outl( TLAN_HC_GO, dev->base_addr + TLAN_HOST_CMD ); -+ outl(virt_to_le32desc(tail_list), BASE + TLAN_CH_PARM); -+ outl(TLAN_HC_GO, BASE + TLAN_HOST_CMD); - } else { -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Adding buffer %d to TX channel\n", priv->txTail ); -- if ( priv->txTail == 0 ) { -- ( priv->txList + ( TLAN_NUM_TX_LISTS - 1 ) )->forward = virt_to_bus( tail_list ); -+ if (priv->txTail == 0) { -+#ifdef EBDEBUG -+ printf("Out buffer\n"); -+#endif -+ (priv->txList + (TLAN_NUM_TX_LISTS - 1))->forward = -+ virt_to_le32desc(tail_list); - } else { -- ( priv->txList + ( priv->txTail - 1 ) )->forward = virt_to_bus( tail_list ); -+#ifdef EBDEBUG -+ printf("Fix this \n"); -+#endif -+ (priv->txList + (priv->txTail - 1))->forward = -+ virt_to_le32desc(tail_list); - } - } -- spin_unlock_irqrestore(&priv->lock, flags); -- -- CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); -- -- if ( bbuf ) -- dev_kfree_skb_any(skb); -- -- dev->trans_start = jiffies; -- return 0; -- --} /* TLan_StartTx */ -- -- /*************************************************************** -- * TLan_HandleInterrupt -- * -- * Returns: -- * Nothing -- * Parms: -- * irq The line on which the interrupt -- * occurred. -- * dev_id A pointer to the device assigned to -- * this irq line. -- * regs ??? -- * -- * This function handles an interrupt generated by its -- * assigned TLAN adapter. The function deactivates -- * interrupts on its adapter, records the type of -- * interrupt, executes the appropriate subhandler, and -- * acknowdges the interrupt to the adapter (thus -- * re-enabling adapter interrupts. -- * -- **************************************************************/ -- --static void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) --{ -- u32 ack; -- struct net_device *dev; -- u32 host_cmd; -- u16 host_int; -- int type; -- TLanPrivateInfo *priv; -- -- dev = dev_id; -- priv = dev->priv; -- -- spin_lock(&priv->lock); -- -- host_int = inw( dev->base_addr + TLAN_HOST_INT ); -- outw( host_int, dev->base_addr + TLAN_HOST_INT ); -+ -+ CIRC_INC(priv->txTail, TLAN_NUM_TX_LISTS); - -- type = ( host_int & TLAN_HI_IT_MASK ) >> 2; -+#ifdef EBDEBUG -+ host_int = inw(BASE + TLAN_HOST_INT); -+ printf("INT2-0x%hX\n", host_int); -+#endif - -- ack = TLanIntVector[type]( dev, host_int ); -+ to = currticks() + TX_TIME_OUT; -+ while ((tail_list->cStat == TLAN_CSTAT_READY) && currticks() < to); - -- if ( ack ) { -- host_cmd = TLAN_HC_ACK | ack | ( type << 18 ); -- outl( host_cmd, dev->base_addr + TLAN_HOST_CMD ); -+ head_list = priv->txList + priv->txHead; -+ while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) -+ && (ack < 255)) { -+ ack++; -+ if(tmpCStat & TLAN_CSTAT_EOC) -+ eoc =1; -+ head_list->cStat = TLAN_CSTAT_UNUSED; -+ CIRC_INC(priv->txHead, TLAN_NUM_TX_LISTS); -+ head_list = priv->txList + priv->txHead; -+ - } -+ if(!ack) -+ printf("Incomplete TX Frame\n"); - -- spin_unlock(&priv->lock); -- --} /* TLan_HandleInterrupts */ -- -- /*************************************************************** -- * TLan_Close -- * -- * Returns: -- * An error code. -- * Parms: -- * dev The device structure of the device to -- * close. -- * -- * This function shuts down the adapter. It records any -- * stats, puts the adapter into reset state, deactivates -- * its time as needed, and frees the irq it is using. -- * -- **************************************************************/ -- --static int TLan_Close(struct net_device *dev) --{ -- TLanPrivateInfo *priv = dev->priv; -- -- netif_stop_queue(dev); -- priv->neg_be_verbose = 0; -- -- TLan_ReadAndClearStats( dev, TLAN_RECORD ); -- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); -- if ( priv->timer.function != NULL ) { -- del_timer_sync( &priv->timer ); -- priv->timer.function = NULL; -+ if(eoc) { -+ head_list = priv->txList + priv->txHead; -+ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { -+ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); -+ ack |= TLAN_HC_GO; -+ } else { -+ priv->txInProgress = 0; -+ } - } -- -- free_irq( dev->irq, dev ); -- TLan_FreeLists( dev ); -- TLAN_DBG( TLAN_DEBUG_GNRL, "Device %s closed.\n", dev->name ); -- -- return 0; -- --} /* TLan_Close */ -- -- /*************************************************************** -- * TLan_GetStats -- * -- * Returns: -- * A pointer to the device's statistics structure. -- * Parms: -- * dev The device structure to return the -- * stats for. -- * -- * This function updates the devices statistics by reading -- * the TLAN chip's onboard registers. Then it returns the -- * address of the statistics structure. -- * -- **************************************************************/ -- --static struct net_device_stats *TLan_GetStats( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- int i; -- -- /* Should only read stats if open ? */ -- TLan_ReadAndClearStats( dev, TLAN_RECORD ); -- -- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: %s EOC count = %d\n", dev->name, priv->rxEocCount ); -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s Busy count = %d\n", dev->name, priv->txBusyCount ); -- if ( debug & TLAN_DEBUG_GNRL ) { -- TLan_PrintDio( dev->base_addr ); -- TLan_PhyPrint( dev ); -- } -- if ( debug & TLAN_DEBUG_LIST ) { -- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) -- TLan_PrintList( priv->rxList + i, "RX", i ); -- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) -- TLan_PrintList( priv->txList + i, "TX", i ); -+ if(ack) { -+ host_cmd = TLAN_HC_ACK | ack; -+ outl(host_cmd, BASE + TLAN_HOST_CMD); - } - -- return ( &( (TLanPrivateInfo *) dev->priv )->stats ); -- --} /* TLan_GetStats */ -- -- /*************************************************************** -- * TLan_SetMulticastList -- * -- * Returns: -- * Nothing -- * Parms: -- * dev The device structure to set the -- * multicast list for. -- * -- * This function sets the TLAN adaptor to various receive -- * modes. If the IFF_PROMISC flag is set, promiscuous -- * mode is acitviated. Otherwise, promiscuous mode is -- * turned off. If the IFF_ALLMULTI flag is set, then -- * the hash table is set to receive all group addresses. -- * Otherwise, the first three multicast addresses are -- * stored in AREG_1-3, and the rest are selected via the -- * hash table, as necessary. -- * -- **************************************************************/ -- --static void TLan_SetMulticastList( struct net_device *dev ) --{ -- struct dev_mc_list *dmi = dev->mc_list; -- u32 hash1 = 0; -- u32 hash2 = 0; -- int i; -- u32 offset; -- u8 tmp; -- -- if ( dev->flags & IFF_PROMISC ) { -- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); -- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp | TLAN_NET_CMD_CAF ); -- } else { -- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); -- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF ); -- if ( dev->flags & IFF_ALLMULTI ) { -- for ( i = 0; i < 3; i++ ) -- TLan_SetMac( dev, i + 1, NULL ); -- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF ); -- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); -+ if(priv->tlanRev < 0x30 ) { -+ ack = 1; -+ head_list = priv->txList + priv->txHead; -+ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { -+ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); -+ ack |= TLAN_HC_GO; - } else { -- for ( i = 0; i < dev->mc_count; i++ ) { -- if ( i < 3 ) { -- TLan_SetMac( dev, i + 1, (char *) &dmi->dmi_addr ); -- } else { -- offset = TLan_HashFunc( (u8 *) &dmi->dmi_addr ); -- if ( offset < 32 ) -- hash1 |= ( 1 << offset ); -- else -- hash2 |= ( 1 << ( offset - 32 ) ); -- } -- dmi = dmi->next; -- } -- for ( ; i < 3; i++ ) -- TLan_SetMac( dev, i + 1, NULL ); -- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, hash1 ); -- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, hash2 ); -+ priv->txInProgress = 0; - } -+ host_cmd = TLAN_HC_ACK | ack | 0x00140000; -+ outl(host_cmd, BASE + TLAN_HOST_CMD); -+ - } -+ -+ if (currticks() >= to) { -+ printf("TX Time Out"); -+ } -+} - --} /* TLan_SetMulticastList */ -- --/***************************************************************************** --****************************************************************************** -- -- ThunderLAN Driver Interrupt Vectors and Table -- -- Please see Chap. 4, "Interrupt Handling" of the "ThunderLAN -- Programmer's Guide" for more informations on handling interrupts -- generated by TLAN based adapters. -- --****************************************************************************** --*****************************************************************************/ -- -- /*************************************************************** -- * TLan_HandleInvalid -- * -- * Returns: -- * 0 -- * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles invalid interrupts. This should -- * never happen unless some other adapter is trying to use -- * the IRQ line assigned to the device. -- * -- **************************************************************/ -- --u32 TLan_HandleInvalid( struct net_device *dev, u16 host_int ) -+/************************************************************************** -+DISABLE - Turn off ethernet interface -+***************************************************************************/ -+#ifdef EB51 -+static void tlan_disable(struct dev *dev __unused) -+#else -+static void tlan_disable(struct nic *nic __unused) -+#endif - { -- /* printk( "TLAN: Invalid interrupt on %s.\n", dev->name ); */ -- return 0; -- --} /* TLan_HandleInvalid */ -- -- /*************************************************************** -- * TLan_HandleTxEOF -- * -- * Returns: -- * 1 -- * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles Tx EOF interrupts which are raised -- * by the adapter when it has completed sending the -- * contents of a buffer. If detemines which list/buffer -- * was completed and resets it. If the buffer was the last -- * in the channel (EOC), then the function checks to see if -- * another buffer is ready to send, and if so, sends a Tx -- * Go command. Finally, the driver activates/continues the -- * activity LED. -+ /* put the card in its initial state */ -+ /* This function serves 3 purposes. -+ * This disables DMA and interrupts so we don't receive -+ * unexpected packets or interrupts from the card after -+ * etherboot has finished. -+ * This frees resources so etherboot may use -+ * this driver on another interface -+ * This allows etherboot to reinitialize the interface -+ * if something is something goes wrong. - * -- **************************************************************/ -+ */ -+ outl(TLAN_HC_AD_RST, BASE + TLAN_HOST_CMD); -+} - --u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) -+/************************************************************************** -+IRQ - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void tlan_irq(struct nic *nic __unused, irq_action_t action __unused) - { -- TLanPrivateInfo *priv = dev->priv; -- int eoc = 0; -- TLanList *head_list; -- u32 ack = 0; -- u16 tmpCStat; -- -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOF (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); -- head_list = priv->txList + priv->txHead; -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} - -- while (((tmpCStat = head_list->cStat ) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { -- ack++; -- if ( ! bbuf ) { -- dev_kfree_skb_any( (struct sk_buff *) head_list->buffer[9].address ); -- head_list->buffer[9].address = 0; -- } -- -- if ( tmpCStat & TLAN_CSTAT_EOC ) -- eoc = 1; -- -- priv->stats.tx_bytes += head_list->frameSize; -+static void TLan_SetMulticastList(struct nic *nic) { -+ int i; -+ u8 tmp; - -- head_list->cStat = TLAN_CSTAT_UNUSED; -- netif_start_queue(dev); -- CIRC_INC( priv->txHead, TLAN_NUM_TX_LISTS ); -- head_list = priv->txList + priv->txHead; -- } -+ /* !IFF_PROMISC */ -+ tmp = TLan_DioRead8(BASE, TLAN_NET_CMD); -+ TLan_DioWrite8(BASE, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF); -+ -+ /* IFF_ALLMULTI */ -+ for(i = 0; i< 3; i++) -+ TLan_SetMac(nic, i + 1, NULL); -+ TLan_DioWrite32(BASE, TLAN_HASH_1, 0xFFFFFFFF); -+ TLan_DioWrite32(BASE, TLAN_HASH_2, 0xFFFFFFFF); - -- if (!ack) -- printk(KERN_INFO "TLAN: Received interrupt for uncompleted TX frame.\n"); -- -- if ( eoc ) { -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); -- head_list = priv->txList + priv->txHead; -- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { -- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); -- ack |= TLAN_HC_GO; -- } else { -- priv->txInProgress = 0; -- } -- } - -- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { -- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); -- if ( priv->timer.function == NULL ) { -- priv->timer.function = &TLan_Timer; -- priv->timer.data = (unsigned long) dev; -- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; -- priv->timerSetAt = jiffies; -- priv->timerType = TLAN_TIMER_ACTIVITY; -- add_timer(&priv->timer); -- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { -- priv->timerSetAt = jiffies; -+} -+/************************************************************************** -+PROBE - Look for an adapter, this routine's visible to the outside -+***************************************************************************/ -+ -+#define board_found 1 -+#define valid_link 0 -+#ifdef EB51 -+static int tlan_probe(struct dev *dev, struct pci_device *pci) -+{ -+ struct nic *nic = (struct nic *) dev; -+#else -+struct nic *tlan_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) -+{ -+#endif -+ u16 data = 0; -+ int err; -+ int i; -+ -+ if (pci->ioaddr == 0) -+ return 0; -+ -+ nic->irqno = 0; -+ nic->ioaddr = pci->ioaddr & ~3; -+ -+ BASE = pci->ioaddr; -+ printf("\n"); -+ printf("tlan.c: %s, %s\n", drv_version, drv_date); -+ printf("%s: Probing for Vendor 0x%hX, Device 0x%hX", -+ pci->name, pci->vendor, pci->dev_id); -+ -+ -+ /* I really must find out what this does */ -+ adjust_pci_device(pci); -+ -+ /* Point to private storage */ -+ priv = &TLanPrivateInfo; -+ /* Figure out which chip we're dealing with */ -+ i = 0; -+ chip_idx = -1; -+ -+ while (tlan_pci_tbl[i].name) { -+ if ((((u32) pci->dev_id << 16) | pci->vendor) == -+ (tlan_pci_tbl[i].id.pci & 0xffffffff)) { -+ chip_idx = i; -+ break; - } -+ i++; - } - -- return ack; -+ priv->vendor_id = pci->vendor; -+ priv->dev_id = pci->dev_id; -+ priv->nic_name = pci->name; -+ priv->eoc = 0; - --} /* TLan_HandleTxEOF */ -+ err = 0; -+ for (i = 0; i < 6; i++) -+ err |= TLan_EeReadByte(BASE, -+ (u8) tlan_pci_tbl[chip_idx]. -+ addrOfs + i, -+ (u8 *) & nic->node_addr[i]); -+ if (err) { -+ printf("TLAN: %s: Error reading MAC from eeprom: %d\n", -+ pci->name, err); -+ } else -+ printf("\nAddress: %!\n", nic->node_addr); - -- /*************************************************************** -- * TLan_HandleStatOverflow -- * -- * Returns: -- * 1 -- * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles the Statistics Overflow interrupt -- * which means that one or more of the TLAN statistics -- * registers has reached 1/2 capacity and needs to be read. -- * -- **************************************************************/ -+ priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION); -+ printf("\nRevision = 0x%hX\n", priv->tlanRev); - --u32 TLan_HandleStatOverflow( struct net_device *dev, u16 host_int ) --{ -- TLan_ReadAndClearStats( dev, TLAN_RECORD ); -+ TLan_ResetLists(nic); -+ TLan_ResetAdapter(nic); -+/* -+ data = inl(BASE + TLAN_HOST_CMD); -+ data |= TLAN_HC_EOC; -+ outw(data, BASE + TLAN_HOST_CMD); -+*/ -+ -+ data = inl(BASE + TLAN_HOST_CMD); -+ data |= TLAN_HC_INT_OFF; -+ outw(data, BASE + TLAN_HOST_CMD); - -+ TLan_SetMulticastList(nic); -+ udelay(100); -+ priv->txList = tx_ring; -+ priv->rxList = rx_ring; -+/* if (board_found && valid_link) -+ {*/ -+ /* point to NIC specific routines */ -+#ifdef EB51 -+ dev->disable = tlan_disable; -+ nic->poll = tlan_poll; -+ nic->transmit = tlan_transmit; -+ nic->irq = tlan_irq; - return 1; -+#else -+ nic->disable = tlan_disable; -+ nic->poll = tlan_poll; -+ nic->transmit = tlan_transmit; -+ nic->irq = tlan_irq; -+ return nic; -+#endif -+} -+ -+ -+/***************************************************************************** -+****************************************************************************** -+ -+ ThunderLAN Driver Eeprom routines -+ -+ The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A -+ EEPROM. These functions are based on information in Microchip's -+ data sheet. I don't know how well this functions will work with -+ other EEPROMs. -+ -+****************************************************************************** -+*****************************************************************************/ - --} /* TLan_HandleStatOverflow */ - - /*************************************************************** -- * TLan_HandleRxEOF -+ * TLan_EeSendStart - * - * Returns: -- * 1 -+ * Nothing - * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles the Rx EOF interrupt which -- * indicates a frame has been received by the adapter from -- * the net and the frame has been transferred to memory. -- * The function determines the bounce buffer the frame has -- * been loaded into, creates a new sk_buff big enough to -- * hold the frame, and sends it to protocol stack. It -- * then resets the used buffer and appends it to the end -- * of the list. If the frame was the last in the Rx -- * channel (EOC), the function restarts the receive channel -- * by sending an Rx Go command to the adapter. Then it -- * activates/continues the activity LED. -+ * io_base The IO port base address for the -+ * TLAN device with the EEPROM to -+ * use. -+ * -+ * This function sends a start cycle to an EEPROM attached -+ * to a TLAN chip. - * - **************************************************************/ - --u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) -+void TLan_EeSendStart(u16 io_base) - { -- TLanPrivateInfo *priv = dev->priv; -- u32 ack = 0; -- int eoc = 0; -- u8 *head_buffer; -- TLanList *head_list; -- struct sk_buff *skb; -- TLanList *tail_list; -- void *t; -- u32 frameSize; -- u16 tmpCStat; -- -- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOF (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); -- head_list = priv->rxList + priv->rxHead; -- -- while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { -- frameSize = head_list->frameSize; -- ack++; -- if (tmpCStat & TLAN_CSTAT_EOC) -- eoc = 1; -- -- if (bbuf) { -- skb = dev_alloc_skb(frameSize + 7); -- if (skb == NULL) -- printk(KERN_INFO "TLAN: Couldn't allocate memory for received data.\n"); -- else { -- head_buffer = priv->rxBuffer + (priv->rxHead * TLAN_MAX_FRAME_SIZE); -- skb->dev = dev; -- skb_reserve(skb, 2); -- t = (void *) skb_put(skb, frameSize); -- -- priv->stats.rx_bytes += head_list->frameSize; -- -- memcpy( t, head_buffer, frameSize ); -- skb->protocol = eth_type_trans( skb, dev ); -- netif_rx( skb ); -- } -- } else { -- struct sk_buff *new_skb; -- -- /* -- * I changed the algorithm here. What we now do -- * is allocate the new frame. If this fails we -- * simply recycle the frame. -- */ -- -- new_skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); -- -- if ( new_skb != NULL ) { -- /* If this ever happened it would be a problem */ -- /* not any more - ac */ -- skb = (struct sk_buff *) head_list->buffer[9].address; -- skb_trim( skb, frameSize ); -- -- priv->stats.rx_bytes += frameSize; -+ u16 sio; - -- skb->protocol = eth_type_trans( skb, dev ); -- netif_rx( skb ); -- -- new_skb->dev = dev; -- skb_reserve( new_skb, 2 ); -- t = (void *) skb_put( new_skb, TLAN_MAX_FRAME_SIZE ); -- head_list->buffer[0].address = virt_to_bus( t ); -- head_list->buffer[8].address = (u32) t; -- head_list->buffer[9].address = (u32) new_skb; -- } else -- printk(KERN_WARNING "TLAN: Couldn't allocate memory for received data.\n" ); -- } -+ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); -+ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; - -- head_list->forward = 0; -- head_list->cStat = 0; -- tail_list = priv->rxList + priv->rxTail; -- tail_list->forward = virt_to_bus( head_list ); -- -- CIRC_INC( priv->rxHead, TLAN_NUM_RX_LISTS ); -- CIRC_INC( priv->rxTail, TLAN_NUM_RX_LISTS ); -- head_list = priv->rxList + priv->rxHead; -- } -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); -+ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); -+ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); - -- if (!ack) -- printk(KERN_INFO "TLAN: Received interrupt for uncompleted RX frame.\n"); -- -+} /* TLan_EeSendStart */ - -- if ( eoc ) { -- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); -- head_list = priv->rxList + priv->rxHead; -- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); -- ack |= TLAN_HC_GO | TLAN_HC_RT; -- priv->rxEocCount++; -- } -- -- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { -- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); -- if ( priv->timer.function == NULL ) { -- priv->timer.function = &TLan_Timer; -- priv->timer.data = (unsigned long) dev; -- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; -- priv->timerSetAt = jiffies; -- priv->timerType = TLAN_TIMER_ACTIVITY; -- add_timer(&priv->timer); -- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { -- priv->timerSetAt = jiffies; -- } -- } - -- dev->last_rx = jiffies; -- -- return ack; - --} /* TLan_HandleRxEOF */ - - /*************************************************************** -- * TLan_HandleDummy -+ * TLan_EeSendByte - * - * Returns: -- * 1 -- * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles the Dummy interrupt, which is -- * raised whenever a test interrupt is generated by setting -- * the Req_Int bit of HOST_CMD to 1. -+ * If the correct ack was received, 0, otherwise 1 -+ * Parms: io_base The IO port base address for the -+ * TLAN device with the EEPROM to -+ * use. -+ * data The 8 bits of information to -+ * send to the EEPROM. -+ * stop If TLAN_EEPROM_STOP is passed, a -+ * stop cycle is sent after the -+ * byte is sent after the ack is -+ * read. -+ * -+ * This function sends a byte on the serial EEPROM line, -+ * driving the clock to send each bit. The function then -+ * reverses transmission direction and reads an acknowledge -+ * bit. - * - **************************************************************/ - --u32 TLan_HandleDummy( struct net_device *dev, u16 host_int ) -+int TLan_EeSendByte(u16 io_base, u8 data, int stop) - { -- printk( "TLAN: Test interrupt on %s.\n", dev->name ); -- return 1; -+ int err; -+ u8 place; -+ u16 sio; - --} /* TLan_HandleDummy */ -+ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); -+ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; - -- /*************************************************************** -- * TLan_HandleTxEOC -- * -- * Returns: -- * 1 -- * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This driver is structured to determine EOC occurances by -- * reading the CSTAT member of the list structure. Tx EOC -- * interrupts are disabled via the DIO INTDIS register. -- * However, TLAN chips before revision 3.0 didn't have this -- * functionality, so process EOC events if this is the -- * case. -- * -- **************************************************************/ -+ /* Assume clock is low, tx is enabled; */ -+ for (place = 0x80; place != 0; place >>= 1) { -+ if (place & data) -+ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); -+ else -+ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); -+ } -+ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ err = TLan_GetBit(TLAN_NET_SIO_EDATA, sio); -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); - --u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int ) --{ -- TLanPrivateInfo *priv = dev->priv; -- TLanList *head_list; -- u32 ack = 1; -- -- host_int = 0; -- if ( priv->tlanRev < 0x30 ) { -- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d) -- IRQ\n", priv->txHead, priv->txTail ); -- head_list = priv->txList + priv->txHead; -- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { -- netif_stop_queue(dev); -- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); -- ack |= TLAN_HC_GO; -- } else { -- priv->txInProgress = 0; -- } -+ if ((!err) && stop) { -+ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); - } - -- return ack; -+ return (err); -+ -+} /* TLan_EeSendByte */ -+ -+ - --} /* TLan_HandleTxEOC */ - - /*************************************************************** -- * TLan_HandleStatusCheck -+ * TLan_EeReceiveByte - * - * Returns: -- * 0 if Adapter check, 1 if Network Status check. -+ * Nothing - * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This function handles Adapter Check/Network Status -- * interrupts generated by the adapter. It checks the -- * vector in the HOST_INT register to determine if it is -- * an Adapter Check interrupt. If so, it resets the -- * adapter. Otherwise it clears the status registers -- * and services the PHY. -+ * io_base The IO port base address for the -+ * TLAN device with the EEPROM to -+ * use. -+ * data An address to a char to hold the -+ * data sent from the EEPROM. -+ * stop If TLAN_EEPROM_STOP is passed, a -+ * stop cycle is sent after the -+ * byte is received, and no ack is -+ * sent. -+ * -+ * This function receives 8 bits of data from the EEPROM -+ * over the serial link. It then sends and ack bit, or no -+ * ack and a stop bit. This function is used to retrieve -+ * data after the address of a byte in the EEPROM has been -+ * sent. - * - **************************************************************/ - --u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int ) --{ -- TLanPrivateInfo *priv = dev->priv; -- u32 ack; -- u32 error; -- u8 net_sts; -- u32 phy; -- u16 tlphy_ctl; -- u16 tlphy_sts; -- -- ack = 1; -- if ( host_int & TLAN_HI_IV_MASK ) { -- netif_stop_queue( dev ); -- error = inl( dev->base_addr + TLAN_CH_PARM ); -- printk( "TLAN: %s: Adaptor Error = 0x%x\n", dev->name, error ); -- TLan_ReadAndClearStats( dev, TLAN_RECORD ); -- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); -- -- queue_task(&priv->tlan_tqueue, &tq_immediate); -- mark_bh(IMMEDIATE_BH); -- -- netif_wake_queue(dev); -- ack = 0; -- } else { -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Status Check\n", dev->name ); -- phy = priv->phy[priv->phyNum]; -+void TLan_EeReceiveByte(u16 io_base, u8 * data, int stop) -+{ -+ u8 place; -+ u16 sio; - -- net_sts = TLan_DioRead8( dev->base_addr, TLAN_NET_STS ); -- if ( net_sts ) { -- TLan_DioWrite8( dev->base_addr, TLAN_NET_STS, net_sts ); -- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Net_Sts = %x\n", dev->name, (unsigned) net_sts ); -- } -- if ( ( net_sts & TLAN_NET_STS_MIRQ ) && ( priv->phyNum == 0 ) ) { -- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_STS, &tlphy_sts ); -- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); -- if ( ! ( tlphy_sts & TLAN_TS_POLOK ) && ! ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { -- tlphy_ctl |= TLAN_TC_SWAPOL; -- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); -- } else if ( ( tlphy_sts & TLAN_TS_POLOK ) && ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { -- tlphy_ctl &= ~TLAN_TC_SWAPOL; -- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); -- } -+ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); -+ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; -+ *data = 0; - -- if (debug) { -- TLan_PhyPrint( dev ); -- } -- } -+ /* Assume clock is low, tx is enabled; */ -+ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); -+ for (place = 0x80; place; place >>= 1) { -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ if (TLan_GetBit(TLAN_NET_SIO_EDATA, sio)) -+ *data |= place; -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); -+ } -+ -+ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); -+ if (!stop) { -+ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* Ack = 0 */ -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); -+ } else { -+ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); /* No ack = 1 (?) */ -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ -+ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); -+ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); - } - -- return ack; -+} /* TLan_EeReceiveByte */ -+ - --} /* TLan_HandleStatusCheck */ - - /*************************************************************** -- * TLan_HandleRxEOC -+ * TLan_EeReadByte - * - * Returns: -- * 1 -+ * No error = 0, else, the stage at which the error -+ * occurred. - * Parms: -- * dev Device assigned the IRQ that was -- * raised. -- * host_int The contents of the HOST_INT -- * port. -- * -- * This driver is structured to determine EOC occurances by -- * reading the CSTAT member of the list structure. Rx EOC -- * interrupts are disabled via the DIO INTDIS register. -- * However, TLAN chips before revision 3.0 didn't have this -- * CSTAT member or a INTDIS register, so if this chip is -- * pre-3.0, process EOC interrupts normally. -+ * io_base The IO port base address for the -+ * TLAN device with the EEPROM to -+ * use. -+ * ee_addr The address of the byte in the -+ * EEPROM whose contents are to be -+ * retrieved. -+ * data An address to a char to hold the -+ * data obtained from the EEPROM. -+ * -+ * This function reads a byte of information from an byte -+ * cell in the EEPROM. - * - **************************************************************/ - --u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int ) -+int TLan_EeReadByte(u16 io_base, u8 ee_addr, u8 * data) - { -- TLanPrivateInfo *priv = dev->priv; -- TLanList *head_list; -- u32 ack = 1; -+ int err; -+ int ret = 0; - -- if ( priv->tlanRev < 0x30 ) { -- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d) -- IRQ\n", priv->rxHead, priv->rxTail ); -- head_list = priv->rxList + priv->rxHead; -- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); -- ack |= TLAN_HC_GO | TLAN_HC_RT; -- priv->rxEocCount++; -+ -+ TLan_EeSendStart(io_base); -+ err = TLan_EeSendByte(io_base, 0xA0, TLAN_EEPROM_ACK); -+ if (err) { -+ ret = 1; -+ goto fail; -+ } -+ err = TLan_EeSendByte(io_base, ee_addr, TLAN_EEPROM_ACK); -+ if (err) { -+ ret = 2; -+ goto fail; -+ } -+ TLan_EeSendStart(io_base); -+ err = TLan_EeSendByte(io_base, 0xA1, TLAN_EEPROM_ACK); -+ if (err) { -+ ret = 3; -+ goto fail; - } -+ TLan_EeReceiveByte(io_base, data, TLAN_EEPROM_STOP); -+ fail: - -- return ack; -+ return ret; -+ -+} /* TLan_EeReadByte */ - --} /* TLan_HandleRxEOC */ - - /***************************************************************************** - ****************************************************************************** - -- ThunderLAN Driver Timer Function -+ ThunderLAN Driver MII Routines -+ -+ These routines are based on the information in Chap. 2 of the -+ "ThunderLAN Programmer's Guide", pp. 15-24. - - ****************************************************************************** - *****************************************************************************/ - -+ - /*************************************************************** -- * TLan_Timer -+ * TLan_MiiReadReg - * - * Returns: -- * Nothing -+ * 0 if ack received ok -+ * 1 otherwise. -+ * - * Parms: -- * data A value given to add timer when -- * add_timer was called. -+ * dev The device structure containing -+ * The io address and interrupt count -+ * for this device. -+ * phy The address of the PHY to be queried. -+ * reg The register whose contents are to be -+ * retreived. -+ * val A pointer to a variable to store the -+ * retrieved value. - * -- * This function handles timed functionality for the -- * TLAN driver. The two current timer uses are for -- * delaying for autonegotionation and driving the ACT LED. -- * - Autonegotiation requires being allowed about -- * 2 1/2 seconds before attempting to transmit a -- * packet. It would be a very bad thing to hang -- * the kernel this long, so the driver doesn't -- * allow transmission 'til after this time, for -- * certain PHYs. It would be much nicer if all -- * PHYs were interrupt-capable like the internal -- * PHY. -- * - The ACT LED, which shows adapter activity, is -- * driven by the driver, and so must be left on -- * for a short period to power up the LED so it -- * can be seen. This delay can be changed by -- * changing the TLAN_TIMER_ACT_DELAY in tlan.h, -- * if desired. 100 ms produces a slightly -- * sluggish response. -+ * This function uses the TLAN's MII bus to retreive the contents -+ * of a given register on a PHY. It sends the appropriate info -+ * and then reads the 16-bit register value from the MII bus via -+ * the TLAN SIO register. - * - **************************************************************/ - --void TLan_Timer( unsigned long data ) -+int TLan_MiiReadReg(struct nic *nic __unused, u16 phy, u16 reg, u16 * val) - { -- struct net_device *dev = (struct net_device *) data; -- TLanPrivateInfo *priv = dev->priv; -- u32 elapsed; -- unsigned long flags = 0; -- -- priv->timer.function = NULL; -- -- switch ( priv->timerType ) { --#ifdef MONITOR -- case TLAN_TIMER_LINK_BEAT: -- TLan_PhyMonitor( dev ); -- break; --#endif -- case TLAN_TIMER_PHY_PDOWN: -- TLan_PhyPowerDown( dev ); -- break; -- case TLAN_TIMER_PHY_PUP: -- TLan_PhyPowerUp( dev ); -- break; -- case TLAN_TIMER_PHY_RESET: -- TLan_PhyReset( dev ); -- break; -- case TLAN_TIMER_PHY_START_LINK: -- TLan_PhyStartLink( dev ); -- break; -- case TLAN_TIMER_PHY_FINISH_AN: -- TLan_PhyFinishAutoNeg( dev ); -- break; -- case TLAN_TIMER_FINISH_RESET: -- TLan_FinishReset( dev ); -- break; -- case TLAN_TIMER_ACTIVITY: -- spin_lock_irqsave(&priv->lock, flags); -- if ( priv->timer.function == NULL ) { -- elapsed = jiffies - priv->timerSetAt; -- if ( elapsed >= TLAN_TIMER_ACT_DELAY ) { -- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); -- } else { -- priv->timer.function = &TLan_Timer; -- priv->timer.expires = priv->timerSetAt + TLAN_TIMER_ACT_DELAY; -- spin_unlock_irqrestore(&priv->lock, flags); -- add_timer( &priv->timer ); -- break; -- } -- } -- spin_unlock_irqrestore(&priv->lock, flags); -- break; -- default: -- break; -+ u8 nack; -+ u16 sio, tmp; -+ u32 i; -+ int err; -+ int minten; -+ -+ err = FALSE; -+ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); -+ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; -+ -+ TLan_MiiSync(BASE); -+ -+ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); -+ if (minten) -+ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); -+ -+ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ -+ TLan_MiiSendData(BASE, 0x2, 2); /* Read ( 10b ) */ -+ TLan_MiiSendData(BASE, phy, 5); /* Device # */ -+ TLan_MiiSendData(BASE, reg, 5); /* Register # */ -+ -+ -+ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ -+ -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ -+ -+ nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ -+ if (nack) { /* No ACK, so fake it */ -+ for (i = 0; i < 16; i++) { -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -+ } -+ tmp = 0xffff; -+ err = TRUE; -+ } else { /* ACK, so read data */ -+ for (tmp = 0, i = 0x8000; i; i >>= 1) { -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -+ if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) -+ tmp |= i; -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -+ } - } - --} /* TLan_Timer */ - --/***************************************************************************** --****************************************************************************** -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); - -- ThunderLAN Driver Adapter Related Routines -+ if (minten) -+ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); - --****************************************************************************** --*****************************************************************************/ -+ *val = tmp; -+ -+ return err; -+ -+} /* TLan_MiiReadReg */ - - /*************************************************************** -- * TLan_ResetLists -- * -+ * TLan_MiiSendData -+ * - * Returns: - * Nothing - * Parms: -- * dev The device structure with the list -- * stuctures to be reset. -+ * base_port The base IO port of the adapter in -+ * question. -+ * dev The address of the PHY to be queried. -+ * data The value to be placed on the MII bus. -+ * num_bits The number of bits in data that are to -+ * be placed on the MII bus. - * -- * This routine sets the variables associated with managing -- * the TLAN lists to their initial values. -+ * This function sends on sequence of bits on the MII -+ * configuration bus. - * - **************************************************************/ - --void TLan_ResetLists( struct net_device *dev ) -+void TLan_MiiSendData(u16 base_port, u32 data, unsigned num_bits) - { -- TLanPrivateInfo *priv = dev->priv; -- int i; -- TLanList *list; -- struct sk_buff *skb; -- void *t = NULL; -+ u16 sio; -+ u32 i; - -- priv->txHead = 0; -- priv->txTail = 0; -- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { -- list = priv->txList + i; -- list->cStat = TLAN_CSTAT_UNUSED; -- if ( bbuf ) { -- list->buffer[0].address = virt_to_bus( priv->txBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); -- } else { -- list->buffer[0].address = 0; -- } -- list->buffer[2].count = 0; -- list->buffer[2].address = 0; -- list->buffer[9].address = 0; -- } -+ if (num_bits == 0) -+ return; -+ -+ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); -+ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; -+ TLan_SetBit(TLAN_NET_SIO_MTXEN, sio); - -- priv->rxHead = 0; -- priv->rxTail = TLAN_NUM_RX_LISTS - 1; -- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { -- list = priv->rxList + i; -- list->cStat = TLAN_CSTAT_READY; -- list->frameSize = TLAN_MAX_FRAME_SIZE; -- list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; -- if ( bbuf ) { -- list->buffer[0].address = virt_to_bus( priv->rxBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); -- } else { -- skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); -- if ( skb == NULL ) { -- printk( "TLAN: Couldn't allocate memory for received data.\n" ); -- /* If this ever happened it would be a problem */ -- } else { -- skb->dev = dev; -- skb_reserve( skb, 2 ); -- t = (void *) skb_put( skb, TLAN_MAX_FRAME_SIZE ); -- } -- list->buffer[0].address = virt_to_bus( t ); -- list->buffer[8].address = (u32) t; -- list->buffer[9].address = (u32) skb; -- } -- list->buffer[1].count = 0; -- list->buffer[1].address = 0; -- if ( i < TLAN_NUM_RX_LISTS - 1 ) -- list->forward = virt_to_bus( list + 1 ); -+ for (i = (0x1 << (num_bits - 1)); i; i >>= 1) { -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -+ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); -+ if (data & i) -+ TLan_SetBit(TLAN_NET_SIO_MDATA, sio); - else -- list->forward = 0; -+ TLan_ClearBit(TLAN_NET_SIO_MDATA, sio); -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -+ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); - } - --} /* TLan_ResetLists */ -+} /* TLan_MiiSendData */ - --void TLan_FreeLists( struct net_device *dev ) --{ -- TLanPrivateInfo *priv = dev->priv; -- int i; -- TLanList *list; -- struct sk_buff *skb; -- -- if ( ! bbuf ) { -- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { -- list = priv->txList + i; -- skb = (struct sk_buff *) list->buffer[9].address; -- if ( skb ) { -- dev_kfree_skb_any( skb ); -- list->buffer[9].address = 0; -- } -- } - -- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { -- list = priv->rxList + i; -- skb = (struct sk_buff *) list->buffer[9].address; -- if ( skb ) { -- dev_kfree_skb_any( skb ); -- list->buffer[9].address = 0; -- } -- } -- } - --} /* TLan_FreeLists */ - - /*************************************************************** -- * TLan_PrintDio -- * -+ * TLan_MiiSync -+ * - * Returns: - * Nothing - * Parms: -- * io_base Base IO port of the device of -- * which to print DIO registers. -+ * base_port The base IO port of the adapter in -+ * question. - * -- * This function prints out all the internal (DIO) -- * registers of a TLAN chip. -+ * This functions syncs all PHYs in terms of the MII configuration -+ * bus. - * - **************************************************************/ - --void TLan_PrintDio( u16 io_base ) -+void TLan_MiiSync(u16 base_port) - { -- u32 data0, data1; -- int i; -+ int i; -+ u16 sio; - -- printk( "TLAN: Contents of internal registers for io base 0x%04hx.\n", io_base ); -- printk( "TLAN: Off. +0 +4\n" ); -- for ( i = 0; i < 0x4C; i+= 8 ) { -- data0 = TLan_DioRead32( io_base, i ); -- data1 = TLan_DioRead32( io_base, i + 0x4 ); -- printk( "TLAN: 0x%02x 0x%08x 0x%08x\n", i, data0, data1 ); -+ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); -+ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; -+ -+ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); -+ for (i = 0; i < 32; i++) { -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); - } - --} /* TLan_PrintDio */ -+} /* TLan_MiiSync */ -+ -+ -+ - - /*************************************************************** -- * TLan_PrintList -- * -+ * TLan_MiiWriteReg -+ * - * Returns: - * Nothing - * Parms: -- * list A pointer to the TLanList structure to -- * be printed. -- * type A string to designate type of list, -- * "Rx" or "Tx". -- * num The index of the list. -+ * dev The device structure for the device -+ * to write to. -+ * phy The address of the PHY to be written to. -+ * reg The register whose contents are to be -+ * written. -+ * val The value to be written to the register. - * -- * This function prints out the contents of the list -- * pointed to by the list parameter. -+ * This function uses the TLAN's MII bus to write the contents of a -+ * given register on a PHY. It sends the appropriate info and then -+ * writes the 16-bit register value from the MII configuration bus -+ * via the TLAN SIO register. - * - **************************************************************/ - --void TLan_PrintList( TLanList *list, char *type, int num) -+void TLan_MiiWriteReg(struct nic *nic __unused, u16 phy, u16 reg, u16 val) - { -- int i; -+ u16 sio; -+ int minten; -+ -+ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); -+ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; -+ -+ TLan_MiiSync(BASE); -+ -+ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); -+ if (minten) -+ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); -+ -+ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ -+ TLan_MiiSendData(BASE, 0x1, 2); /* Write ( 01b ) */ -+ TLan_MiiSendData(BASE, phy, 5); /* Device # */ -+ TLan_MiiSendData(BASE, reg, 5); /* Register # */ -+ -+ TLan_MiiSendData(BASE, 0x2, 2); /* Send ACK */ -+ TLan_MiiSendData(BASE, val, 16); /* Send Data */ -+ -+ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ -+ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); -+ -+ if (minten) -+ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); - -- printk( "TLAN: %s List %d at 0x%08x\n", type, num, (u32) list ); -- printk( "TLAN: Forward = 0x%08x\n", list->forward ); -- printk( "TLAN: CSTAT = 0x%04hx\n", list->cStat ); -- printk( "TLAN: Frame Size = 0x%04hx\n", list->frameSize ); -- /* for ( i = 0; i < 10; i++ ) { */ -- for ( i = 0; i < 2; i++ ) { -- printk( "TLAN: Buffer[%d].count, addr = 0x%08x, 0x%08x\n", i, list->buffer[i].count, list->buffer[i].address ); -- } - --} /* TLan_PrintList */ -+} /* TLan_MiiWriteReg */ - - /*************************************************************** -- * TLan_ReadAndClearStats -+ * TLan_SetMac - * - * Returns: - * Nothing - * Parms: - * dev Pointer to device structure of adapter -- * to which to read stats. -- * record Flag indicating whether to add -+ * on which to change the AREG. -+ * areg The AREG to set the address in (0 - 3). -+ * mac A pointer to an array of chars. Each -+ * element stores one byte of the address. -+ * IE, it isn't in ascii. - * -- * This functions reads all the internal status registers -- * of the TLAN chip, which clears them as a side effect. -- * It then either adds the values to the device's status -- * struct, or discards them, depending on whether record -- * is TLAN_RECORD (!=0) or TLAN_IGNORE (==0). -+ * This function transfers a MAC address to one of the -+ * TLAN AREGs (address registers). The TLAN chip locks -+ * the register on writing to offset 0 and unlocks the -+ * register after writing to offset 5. If NULL is passed -+ * in mac, then the AREG is filled with 0's. - * - **************************************************************/ - --void TLan_ReadAndClearStats( struct net_device *dev, int record ) -+void TLan_SetMac(struct nic *nic __unused, int areg, char *mac) - { -- TLanPrivateInfo *priv = dev->priv; -- u32 tx_good, tx_under; -- u32 rx_good, rx_over; -- u32 def_tx, crc, code; -- u32 multi_col, single_col; -- u32 excess_col, late_col, loss; -- -- outw( TLAN_GOOD_TX_FRMS, dev->base_addr + TLAN_DIO_ADR ); -- tx_good = inb( dev->base_addr + TLAN_DIO_DATA ); -- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; -- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; -- tx_under = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); -- -- outw( TLAN_GOOD_RX_FRMS, dev->base_addr + TLAN_DIO_ADR ); -- rx_good = inb( dev->base_addr + TLAN_DIO_DATA ); -- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; -- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; -- rx_over = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); -- -- outw( TLAN_DEFERRED_TX, dev->base_addr + TLAN_DIO_ADR ); -- def_tx = inb( dev->base_addr + TLAN_DIO_DATA ); -- def_tx += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; -- crc = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); -- code = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); -- -- outw( TLAN_MULTICOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); -- multi_col = inb( dev->base_addr + TLAN_DIO_DATA ); -- multi_col += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; -- single_col = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); -- single_col += inb( dev->base_addr + TLAN_DIO_DATA + 3 ) << 8; -- -- outw( TLAN_EXCESSCOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); -- excess_col = inb( dev->base_addr + TLAN_DIO_DATA ); -- late_col = inb( dev->base_addr + TLAN_DIO_DATA + 1 ); -- loss = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); -- -- if ( record ) { -- priv->stats.rx_packets += rx_good; -- priv->stats.rx_errors += rx_over + crc + code; -- priv->stats.tx_packets += tx_good; -- priv->stats.tx_errors += tx_under + loss; -- priv->stats.collisions += multi_col + single_col + excess_col + late_col; -- -- priv->stats.rx_over_errors += rx_over; -- priv->stats.rx_crc_errors += crc; -- priv->stats.rx_frame_errors += code; -+ int i; - -- priv->stats.tx_aborted_errors += tx_under; -- priv->stats.tx_carrier_errors += loss; -+ areg *= 6; -+ -+ if (mac != NULL) { -+ for (i = 0; i < 6; i++) -+ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, -+ mac[i]); -+ } else { -+ for (i = 0; i < 6; i++) -+ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, 0); - } -- --} /* TLan_ReadAndClearStats */ - -- /*************************************************************** -- * TLan_Reset -+} /* TLan_SetMac */ -+ -+ /********************************************************************* -+ * TLan_PhyDetect - * - * Returns: -- * 0 -+ * Nothing - * Parms: -- * dev Pointer to device structure of adapter -- * to be reset. -+ * dev A pointer to the device structure of the adapter -+ * for which the PHY needs determined. - * -- * This function resets the adapter and it's physical -- * device. See Chap. 3, pp. 9-10 of the "ThunderLAN -- * Programmer's Guide" for details. The routine tries to -- * implement what is detailed there, though adjustments -- * have been made. -+ * So far I've found that adapters which have external PHYs -+ * may also use the internal PHY for part of the functionality. -+ * (eg, AUI/Thinnet). This function finds out if this TLAN -+ * chip has an internal PHY, and then finds the first external -+ * PHY (starting from address 0) if it exists). - * -- **************************************************************/ -+ ********************************************************************/ - --void --TLan_ResetAdapter( struct net_device *dev ) -+void TLan_PhyDetect(struct nic *nic) - { -- TLanPrivateInfo *priv = dev->priv; -- int i; -- u32 addr; -- u32 data; -- u8 data8; -+ u16 control; -+ u16 hi; -+ u16 lo; -+ u32 phy; - -- priv->tlanFullDuplex = FALSE; -- priv->phyOnline=0; --/* 1. Assert reset bit. */ -+ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { -+ priv->phyNum = 0xFFFF; -+ return; -+ } - -- data = inl(dev->base_addr + TLAN_HOST_CMD); -- data |= TLAN_HC_AD_RST; -- outl(data, dev->base_addr + TLAN_HOST_CMD); -- -- udelay(1000); -+ TLan_MiiReadReg(nic, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi); - --/* 2. Turn off interrupts. ( Probably isn't necessary ) */ -+ if (hi != 0xFFFF) { -+ priv->phy[0] = TLAN_PHY_MAX_ADDR; -+ } else { -+ priv->phy[0] = TLAN_PHY_NONE; -+ } - -- data = inl(dev->base_addr + TLAN_HOST_CMD); -- data |= TLAN_HC_INT_OFF; -- outl(data, dev->base_addr + TLAN_HOST_CMD); -+ priv->phy[1] = TLAN_PHY_NONE; -+ for (phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++) { -+ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &control); -+ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &hi); -+ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo); -+ if ((control != 0xFFFF) || (hi != 0xFFFF) -+ || (lo != 0xFFFF)) { -+ printf("PHY found at %hX %hX %hX %hX\n", phy, -+ control, hi, lo); -+ if ((priv->phy[1] == TLAN_PHY_NONE) -+ && (phy != TLAN_PHY_MAX_ADDR)) { -+ priv->phy[1] = phy; -+ } -+ } -+ } - --/* 3. Clear AREGs and HASHs. */ -+ if (priv->phy[1] != TLAN_PHY_NONE) { -+ priv->phyNum = 1; -+ } else if (priv->phy[0] != TLAN_PHY_NONE) { -+ priv->phyNum = 0; -+ } else { -+ printf -+ ("TLAN: Cannot initialize device, no PHY was found!\n"); -+ } -+ -+} /* TLan_PhyDetect */ - -- for ( i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4 ) { -- TLan_DioWrite32( dev->base_addr, (u16) i, 0 ); -+void TLan_PhyPowerDown(struct nic *nic) -+{ -+ -+ u16 value; -+ printf("%s: Powering down PHY(s).\n", priv->nic_name); -+ value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; -+ TLan_MiiSync(BASE); -+ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); -+ if ((priv->phyNum == 0) && (priv->phy[1] != TLAN_PHY_NONE) -+ && -+ (!(tlan_pci_tbl[chip_idx]. -+ flags & TLAN_ADAPTER_USE_INTERN_10))) { -+ TLan_MiiSync(BASE); -+ TLan_MiiWriteReg(nic, priv->phy[1], MII_GEN_CTL, value); - } - --/* 4. Setup NetConfig register. */ -+ /* Wait for 50 ms and powerup -+ * This is abitrary. It is intended to make sure the -+ * tranceiver settles. -+ */ -+ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); */ -+ mdelay(50); -+ TLan_PhyPowerUp(nic); - -- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; -- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); -+} /* TLan_PhyPowerDown */ - --/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ - -- outl( TLAN_HC_LD_TMR | 0x3f, dev->base_addr + TLAN_HOST_CMD ); -- outl( TLAN_HC_LD_THR | 0x9, dev->base_addr + TLAN_HOST_CMD ); -+void TLan_PhyPowerUp(struct nic *nic) -+{ -+ u16 value; - --/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ -+ printf("%s: Powering up PHY.\n", priv->nic_name); -+ TLan_MiiSync(BASE); -+ value = MII_GC_LOOPBK; -+ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); -+ TLan_MiiSync(BASE); -+ /* Wait for 500 ms and reset the -+ * tranceiver. The TLAN docs say both 50 ms and -+ * 500 ms, so do the longer, just in case. -+ */ -+ mdelay(500); -+ TLan_PhyReset(nic); -+ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); */ - -- outw( TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR ); -- addr = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; -- TLan_SetBit( TLAN_NET_SIO_NMRST, addr ); -+} /* TLan_PhyPowerUp */ - --/* 7. Setup the remaining registers. */ -+void TLan_PhyReset(struct nic *nic) -+{ -+ u16 phy; -+ u16 value; - -- if ( priv->tlanRev >= 0x30 ) { -- data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; -- TLan_DioWrite8( dev->base_addr, TLAN_INT_DIS, data8 ); -+ phy = priv->phy[priv->phyNum]; -+ -+ printf("%s: Reseting PHY.\n", priv->nic_name); -+ TLan_MiiSync(BASE); -+ value = MII_GC_LOOPBK | MII_GC_RESET; -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, value); -+ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); -+ while (value & MII_GC_RESET) { -+ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); - } -- TLan_PhyDetect( dev ); -- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; -- -- if ( priv->adapter->flags & TLAN_ADAPTER_BIT_RATE_PHY ) { -- data |= TLAN_NET_CFG_BIT; -- if ( priv->aui == 1 ) { -- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x0a ); -- } else if ( priv->duplex == TLAN_DUPLEX_FULL ) { -- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x00 ); -+ -+ /* Wait for 500 ms and initialize. -+ * I don't remember why I wait this long. -+ * I've changed this to 50ms, as it seems long enough. -+ */ -+ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); */ -+ mdelay(50); -+ TLan_PhyStartLink(nic); -+ -+} /* TLan_PhyReset */ -+ -+ -+void TLan_PhyStartLink(struct nic *nic) -+{ -+ -+ u16 ability; -+ u16 control; -+ u16 data; -+ u16 phy; -+ u16 status; -+ u16 tctl; -+ -+ phy = priv->phy[priv->phyNum]; -+ printf("%s: Trying to activate link.\n", priv->nic_name); -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &ability); -+ -+ if ((status & MII_GS_AUTONEG) && (!priv->aui)) { -+ ability = status >> 11; -+ if (priv->speed == TLAN_SPEED_10 && -+ priv->duplex == TLAN_DUPLEX_HALF) { -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0000); -+ } else if (priv->speed == TLAN_SPEED_10 && -+ priv->duplex == TLAN_DUPLEX_FULL) { -+ priv->tlanFullDuplex = TRUE; -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0100); -+ } else if (priv->speed == TLAN_SPEED_100 && -+ priv->duplex == TLAN_DUPLEX_HALF) { -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2000); -+ } else if (priv->speed == TLAN_SPEED_100 && -+ priv->duplex == TLAN_DUPLEX_FULL) { - priv->tlanFullDuplex = TRUE; -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2100); - } else { -- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x08 ); -+ -+ /* Set Auto-Neg advertisement */ -+ TLan_MiiWriteReg(nic, phy, MII_AN_ADV, -+ (ability << 5) | 1); -+ /* Enablee Auto-Neg */ -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1000); -+ /* Restart Auto-Neg */ -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1200); -+ /* Wait for 4 sec for autonegotiation -+ * to complete. The max spec time is less than this -+ * but the card need additional time to start AN. -+ * .5 sec should be plenty extra. -+ */ -+ printf("TLAN: %s: Starting autonegotiation.\n", -+ priv->nic_name); -+ mdelay(4000); -+ TLan_PhyFinishAutoNeg(nic); -+ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ -+ return; - } -- } - -- if ( priv->phyNum == 0 ) { -- data |= TLAN_NET_CFG_PHY_EN; - } -- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); - -- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { -- TLan_FinishReset( dev ); -- } else { -- TLan_PhyPowerDown( dev ); -+ if ((priv->aui) && (priv->phyNum != 0)) { -+ priv->phyNum = 0; -+ data = -+ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | -+ TLAN_NET_CFG_PHY_EN; -+ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); -+ mdelay(50); -+ /* TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ -+ TLan_PhyPowerDown(nic); -+ return; -+ } else if (priv->phyNum == 0) { -+ control = 0; -+ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tctl); -+ if (priv->aui) { -+ tctl |= TLAN_TC_AUISEL; -+ } else { -+ tctl &= ~TLAN_TC_AUISEL; -+ if (priv->duplex == TLAN_DUPLEX_FULL) { -+ control |= MII_GC_DUPLEX; -+ priv->tlanFullDuplex = TRUE; -+ } -+ if (priv->speed == TLAN_SPEED_100) { -+ control |= MII_GC_SPEEDSEL; -+ } -+ } -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, control); -+ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tctl); - } - --} /* TLan_ResetAdapter */ -+ /* Wait for 2 sec to give the tranceiver time -+ * to establish link. -+ */ -+ /* TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); */ -+ mdelay(2000); -+ TLan_FinishReset(nic); -+ -+} /* TLan_PhyStartLink */ - --void --TLan_FinishReset( struct net_device *dev ) -+void TLan_PhyFinishAutoNeg(struct nic *nic) - { -- TLanPrivateInfo *priv = dev->priv; -- u8 data; -- u32 phy; -- u8 sio; -- u16 status; -- u16 partner; -- u16 tlphy_ctl; -- u16 tlphy_par; -- u16 tlphy_id1, tlphy_id2; -- int i; -+ -+ u16 an_adv; -+ u16 an_lpa; -+ u16 data; -+ u16 mode; -+ u16 phy; -+ u16 status; - - phy = priv->phy[priv->phyNum]; - -- data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; -- if ( priv->tlanFullDuplex ) { -- data |= TLAN_NET_CMD_DUPLEX; -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); -+ udelay(1000); -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); -+ -+ if (!(status & MII_GS_AUTOCMPLT)) { -+ /* Wait for 8 sec to give the process -+ * more time. Perhaps we should fail after a while. -+ */ -+ if (!priv->neg_be_verbose++) { -+ printf -+ ("TLAN: Giving autonegotiation more time.\n"); -+ printf -+ ("TLAN: Please check that your adapter has\n"); -+ printf -+ ("TLAN: been properly connected to a HUB or Switch.\n"); -+ printf -+ ("TLAN: Trying to establish link in the background...\n"); -+ } -+ mdelay(8000); -+ TLan_PhyFinishAutoNeg(nic); -+ /* TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ -+ return; - } -- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, data ); -- data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; -- if ( priv->phyNum == 0 ) { -- data |= TLAN_NET_MASK_MASK7; -- } -- TLan_DioWrite8( dev->base_addr, TLAN_NET_MASK, data ); -- TLan_DioWrite16( dev->base_addr, TLAN_MAX_RX, ((1536)+7)&~7 ); -- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &tlphy_id1 ); -- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &tlphy_id2 ); -- -- if ( ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) || ( priv->aui ) ) { -- status = MII_GS_LINK; -- printk( "TLAN: %s: Link forced.\n", dev->name ); -- } else { -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); -- udelay( 1000 ); -- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); -- if ( (status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ -- (tlphy_id1 == NAT_SEM_ID1) && -- (tlphy_id2 == NAT_SEM_ID2) ) { -- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &partner ); -- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_PAR, &tlphy_par ); -- -- printk( "TLAN: %s: Link active with ", dev->name ); -- if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { -- printk( "forced 10%sMbps %s-Duplex\n", -- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", -- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); -- } else { -- printk( "AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", -- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", -- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); -- printk("TLAN: Partner capability: "); -- for (i = 5; i <= 10; i++) -- if (partner & (1<base_addr, TLAN_LED_REG, TLAN_LED_LINK ); --#ifdef MONITOR -- /* We have link beat..for now anyway */ -- priv->link = 1; -- /*Enabling link beat monitoring */ -- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_LINK_BEAT ); --#endif -- } else if (status & MII_GS_LINK) { -- printk( "TLAN: %s: Link active\n", dev->name ); -- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); -- } -+ printf("TLAN: %s: Autonegotiation complete.\n", priv->nic_name); -+ TLan_MiiReadReg(nic, phy, MII_AN_ADV, &an_adv); -+ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &an_lpa); -+ mode = an_adv & an_lpa & 0x03E0; -+ if (mode & 0x0100) { -+ printf("Full Duplex\n"); -+ priv->tlanFullDuplex = TRUE; -+ } else if (!(mode & 0x0080) && (mode & 0x0040)) { -+ priv->tlanFullDuplex = TRUE; -+ printf("Full Duplex\n"); - } - -- if ( priv->phyNum == 0 ) { -- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); -- tlphy_ctl |= TLAN_TC_INTEN; -- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl ); -- sio = TLan_DioRead8( dev->base_addr, TLAN_NET_SIO ); -- sio |= TLAN_NET_SIO_MINTEN; -- TLan_DioWrite8( dev->base_addr, TLAN_NET_SIO, sio ); -+ if ((!(mode & 0x0180)) -+ && (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_USE_INTERN_10) -+ && (priv->phyNum != 0)) { -+ priv->phyNum = 0; -+ data = -+ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | -+ TLAN_NET_CFG_PHY_EN; -+ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); -+ /* TLan_SetTimer( nic, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ -+ mdelay(400); -+ TLan_PhyPowerDown(nic); -+ return; - } - -- if ( status & MII_GS_LINK ) { -- TLan_SetMac( dev, 0, dev->dev_addr ); -- priv->phyOnline = 1; -- outb( ( TLAN_HC_INT_ON >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); -- if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { -- outb( ( TLAN_HC_REQ_INT >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); -+ if (priv->phyNum == 0) { -+ if ((priv->duplex == TLAN_DUPLEX_FULL) -+ || (an_adv & an_lpa & 0x0040)) { -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, -+ MII_GC_AUTOENB | MII_GC_DUPLEX); -+ printf -+ ("TLAN: Starting internal PHY with FULL-DUPLEX\n"); -+ } else { -+ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, -+ MII_GC_AUTOENB); -+ printf -+ ("TLAN: Starting internal PHY with HALF-DUPLEX\n"); - } -- outl( virt_to_bus( priv->rxList ), dev->base_addr + TLAN_CH_PARM ); -- outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD ); -- } else { -- printk( "TLAN: %s: Link inactive, will retry in 10 secs...\n", dev->name ); -- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_FINISH_RESET ); -- return; - } - --} /* TLan_FinishReset */ -+ /* Wait for 100 ms. No reason in partiticular. -+ */ -+ /* TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); */ -+ mdelay(100); -+ TLan_FinishReset(nic); - -- /*************************************************************** -- * TLan_SetMac -- * -- * Returns: -- * Nothing -- * Parms: -- * dev Pointer to device structure of adapter -- * on which to change the AREG. -- * areg The AREG to set the address in (0 - 3). -- * mac A pointer to an array of chars. Each -- * element stores one byte of the address. -- * IE, it isn't in ascii. -- * -- * This function transfers a MAC address to one of the -- * TLAN AREGs (address registers). The TLAN chip locks -- * the register on writing to offset 0 and unlocks the -- * register after writing to offset 5. If NULL is passed -- * in mac, then the AREG is filled with 0's. -- * -- **************************************************************/ -+} /* TLan_PhyFinishAutoNeg */ -+ -+#ifdef MONITOR -+ -+ /********************************************************************* -+ * -+ * TLan_phyMonitor -+ * -+ * Returns: -+ * None -+ * -+ * Params: -+ * dev The device structure of this device. -+ * -+ * -+ * This function monitors PHY condition by reading the status -+ * register via the MII bus. This can be used to give info -+ * about link changes (up/down), and possible switch to alternate -+ * media. -+ * -+ * ******************************************************************/ - --void TLan_SetMac( struct net_device *dev, int areg, char *mac ) -+void TLan_PhyMonitor(struct net_device *dev) - { -- int i; -- -- areg *= 6; -+ TLanPrivateInfo *priv = dev->priv; -+ u16 phy; -+ u16 phy_status; - -- if ( mac != NULL ) { -- for ( i = 0; i < 6; i++ ) -- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, mac[i] ); -- } else { -- for ( i = 0; i < 6; i++ ) -- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, 0 ); -+ phy = priv->phy[priv->phyNum]; -+ -+ /* Get PHY status register */ -+ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &phy_status); -+ -+ /* Check if link has been lost */ -+ if (!(phy_status & MII_GS_LINK)) { -+ if (priv->link) { -+ priv->link = 0; -+ printf("TLAN: %s has lost link\n", priv->nic_name); -+ priv->flags &= ~IFF_RUNNING; -+ mdelay(2000); -+ TLan_PhyMonitor(nic); -+ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ -+ return; -+ } - } - --} /* TLan_SetMac */ -+ /* Link restablished? */ -+ if ((phy_status & MII_GS_LINK) && !priv->link) { -+ priv->link = 1; -+ printf("TLAN: %s has reestablished link\n", -+ priv->nic_name); -+ priv->flags |= IFF_RUNNING; -+ } -+ -+ /* Setup a new monitor */ -+ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ -+ mdelay(2000); -+ TLan_PhyMonitor(nic); -+} - -+#endif /* MONITOR */ -+ -+#ifdef EB51 -+static struct pci_id tlan_nics[] = { -+ PCI_ROM(0x0e11, 0xae34, "netel10", "Compaq Netelligent 10 T PCI UTP"), -+ PCI_ROM(0x0e11, 0xae32, "netel100","Compaq Netelligent 10/100 TX PCI UTP"), -+ PCI_ROM(0x0e11, 0xae35, "netflex3i", "Compaq Integrated NetFlex-3/P"), -+ PCI_ROM(0x0e11, 0xf130, "thunder", "Compaq NetFlex-3/P"), -+ PCI_ROM(0x0e11, 0xf150, "netflex3b", "Compaq NetFlex-3/P"), -+ PCI_ROM(0x0e11, 0xae43, "netel100pi", "Compaq Netelligent Integrated 10/100 TX UTP"), -+ PCI_ROM(0x0e11, 0xae40, "netel100d", "Compaq Netelligent Dual 10/100 TX PCI UTP"), -+ PCI_ROM(0x0e11, 0xb011, "netel100i", "Compaq Netelligent 10/100 TX Embedded UTP"), -+ PCI_ROM(0x108d, 0x0013, "oc2183", "Olicom OC-2183/2185"), -+ PCI_ROM(0x108d, 0x0012, "oc2325", "Olicom OC-2325"), -+ PCI_ROM(0x108d, 0x0014, "oc2326", "Olicom OC-2326"), -+ PCI_ROM(0x0e11, 0xb030, "netelligent_10_100_ws_5100", "Compaq Netelligent 10/100 TX UTP"), -+ PCI_ROM(0x0e11, 0xb012, "netelligent_10_t2", "Compaq Netelligent 10 T/2 PCI UTP/Coax"), -+}; -+ -+struct pci_driver tlan_driver = { -+ .type = NIC_DRIVER, -+ .name = "TLAN/PCI", -+ .probe = tlan_probe, -+ .ids = tlan_nics, -+ .id_count = sizeof(tlan_nics) / sizeof(tlan_nics[0]), -+ .class = 0, -+}; - #endif -Index: b/netboot/tlan.h -=================================================================== ---- /dev/null -+++ b/netboot/tlan.h -@@ -0,0 +1,536 @@ -+/************************************************************************** -+* -+* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN -+* Written 2003-2003 by Timothy Legge -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2 of the License, or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with this program; if not, write to the Free Software -+* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+* -+* Portions of this code (almost all) based on: -+* tlan.c: Linux ThunderLan Driver: -+* -+* by James Banks -+* -+* (C) 1997-1998 Caldera, Inc. -+* (C) 1998 James Banks -+* (C) 1999-2001 Torben Mathiasen -+* (C) 2002 Samuel Chessman -+* -+* REVISION HISTORY: -+* ================ -+* v1.0 07-08-2003 timlegge Initial not quite working version -+* -+* Indent Style: indent -kr -i8 -+***************************************************************************/ -+ -+/* -+#include -+#include -+#include -+*/ -+ -+typedef unsigned char u8; -+typedef signed char s8; -+typedef unsigned short u16; -+typedef signed short s16; -+typedef unsigned int u32; -+typedef signed int s32; -+ /***************************************************************** -+ * TLan Definitions -+ * -+ ****************************************************************/ -+ -+#define FALSE 0 -+#define TRUE 1 -+ -+#define TLAN_MIN_FRAME_SIZE 64 -+#define TLAN_MAX_FRAME_SIZE 1600 -+ -+#define TLAN_NUM_RX_LISTS 4 -+#define TLAN_NUM_TX_LISTS 2 -+ -+#define TLAN_IGNORE 0 -+#define TLAN_RECORD 1 -+/* -+#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); -+*/ -+#define TLAN_DEBUG_GNRL 0x0001 -+#define TLAN_DEBUG_TX 0x0002 -+#define TLAN_DEBUG_RX 0x0004 -+#define TLAN_DEBUG_LIST 0x0008 -+#define TLAN_DEBUG_PROBE 0x0010 -+ -+#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ -+#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ -+ -+ -+ /***************************************************************** -+ * Device Identification Definitions -+ * -+ ****************************************************************/ -+ -+#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 -+#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 -+#ifndef PCI_DEVICE_ID_OLICOM_OC2183 -+#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 -+#endif -+#ifndef PCI_DEVICE_ID_OLICOM_OC2325 -+#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 -+#endif -+#ifndef PCI_DEVICE_ID_OLICOM_OC2326 -+#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 -+#endif -+ -+typedef struct tlan_adapter_entry { -+ u16 vendorId; -+ u16 deviceId; -+ char *deviceLabel; -+ u32 flags; -+ u16 addrOfs; -+} TLanAdapterEntry; -+ -+#define TLAN_ADAPTER_NONE 0x00000000 -+#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 -+#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 -+#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 -+#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 -+ -+#define TLAN_SPEED_DEFAULT 0 -+#define TLAN_SPEED_10 10 -+#define TLAN_SPEED_100 100 -+ -+#define TLAN_DUPLEX_DEFAULT 0 -+#define TLAN_DUPLEX_HALF 1 -+#define TLAN_DUPLEX_FULL 2 -+ -+ -+ -+ /***************************************************************** -+ * EISA Definitions -+ * -+ ****************************************************************/ -+ -+#define EISA_ID 0xc80 /* EISA ID Registers */ -+#define EISA_ID0 0xc80 /* EISA ID Register 0 */ -+#define EISA_ID1 0xc81 /* EISA ID Register 1 */ -+#define EISA_ID2 0xc82 /* EISA ID Register 2 */ -+#define EISA_ID3 0xc83 /* EISA ID Register 3 */ -+#define EISA_CR 0xc84 /* EISA Control Register */ -+#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ -+#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ -+#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ -+#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ -+#define EISA_APROM 0xc90 /* Ethernet Address PROM */ -+ -+ -+ -+ /***************************************************************** -+ * Rx/Tx List Definitions -+ * -+ ****************************************************************/ -+ -+#define TLAN_BUFFERS_PER_LIST 10 -+#define TLAN_LAST_BUFFER 0x80000000 -+#define TLAN_CSTAT_UNUSED 0x8000 -+#define TLAN_CSTAT_FRM_CMP 0x4000 -+#define TLAN_CSTAT_READY 0x3000 -+#define TLAN_CSTAT_EOC 0x0800 -+#define TLAN_CSTAT_RX_ERROR 0x0400 -+#define TLAN_CSTAT_PASS_CRC 0x0200 -+#define TLAN_CSTAT_DP_PR 0x0100 -+ -+ -+ -+ -+ -+ -+ /***************************************************************** -+ * PHY definitions -+ * -+ ****************************************************************/ -+ -+#define TLAN_PHY_MAX_ADDR 0x1F -+#define TLAN_PHY_NONE 0x20 -+ -+ -+ -+ /***************************************************************** -+ * TLan Driver Timer Definitions -+ * -+ ****************************************************************/ -+ -+#define TLAN_TIMER_LINK_BEAT 1 -+#define TLAN_TIMER_ACTIVITY 2 -+#define TLAN_TIMER_PHY_PDOWN 3 -+#define TLAN_TIMER_PHY_PUP 4 -+#define TLAN_TIMER_PHY_RESET 5 -+#define TLAN_TIMER_PHY_START_LINK 6 -+#define TLAN_TIMER_PHY_FINISH_AN 7 -+#define TLAN_TIMER_FINISH_RESET 8 -+ -+#define TLAN_TIMER_ACT_DELAY (HZ/10) -+ -+ -+ -+ -+ /***************************************************************** -+ * TLan Driver Eeprom Definitions -+ * -+ ****************************************************************/ -+ -+#define TLAN_EEPROM_ACK 0 -+#define TLAN_EEPROM_STOP 1 -+ -+ -+ -+ -+ /***************************************************************** -+ * Host Register Offsets and Contents -+ * -+ ****************************************************************/ -+ -+#define TLAN_HOST_CMD 0x00 -+#define TLAN_HC_GO 0x80000000 -+#define TLAN_HC_STOP 0x40000000 -+#define TLAN_HC_ACK 0x20000000 -+#define TLAN_HC_CS_MASK 0x1FE00000 -+#define TLAN_HC_EOC 0x00100000 -+#define TLAN_HC_RT 0x00080000 -+#define TLAN_HC_NES 0x00040000 -+#define TLAN_HC_AD_RST 0x00008000 -+#define TLAN_HC_LD_TMR 0x00004000 -+#define TLAN_HC_LD_THR 0x00002000 -+#define TLAN_HC_REQ_INT 0x00001000 -+#define TLAN_HC_INT_OFF 0x00000800 -+#define TLAN_HC_INT_ON 0x00000400 -+#define TLAN_HC_AC_MASK 0x000000FF -+#define TLAN_CH_PARM 0x04 -+#define TLAN_DIO_ADR 0x08 -+#define TLAN_DA_ADR_INC 0x8000 -+#define TLAN_DA_RAM_ADR 0x4000 -+#define TLAN_HOST_INT 0x0A -+#define TLAN_HI_IV_MASK 0x1FE0 -+#define TLAN_HI_IT_MASK 0x001C -+#define TLAN_DIO_DATA 0x0C -+ -+ -+/* ThunderLAN Internal Register DIO Offsets */ -+ -+#define TLAN_NET_CMD 0x00 -+#define TLAN_NET_CMD_NRESET 0x80 -+#define TLAN_NET_CMD_NWRAP 0x40 -+#define TLAN_NET_CMD_CSF 0x20 -+#define TLAN_NET_CMD_CAF 0x10 -+#define TLAN_NET_CMD_NOBRX 0x08 -+#define TLAN_NET_CMD_DUPLEX 0x04 -+#define TLAN_NET_CMD_TRFRAM 0x02 -+#define TLAN_NET_CMD_TXPACE 0x01 -+#define TLAN_NET_SIO 0x01 -+#define TLAN_NET_SIO_MINTEN 0x80 -+#define TLAN_NET_SIO_ECLOK 0x40 -+#define TLAN_NET_SIO_ETXEN 0x20 -+#define TLAN_NET_SIO_EDATA 0x10 -+#define TLAN_NET_SIO_NMRST 0x08 -+#define TLAN_NET_SIO_MCLK 0x04 -+#define TLAN_NET_SIO_MTXEN 0x02 -+#define TLAN_NET_SIO_MDATA 0x01 -+#define TLAN_NET_STS 0x02 -+#define TLAN_NET_STS_MIRQ 0x80 -+#define TLAN_NET_STS_HBEAT 0x40 -+#define TLAN_NET_STS_TXSTOP 0x20 -+#define TLAN_NET_STS_RXSTOP 0x10 -+#define TLAN_NET_STS_RSRVD 0x0F -+#define TLAN_NET_MASK 0x03 -+#define TLAN_NET_MASK_MASK7 0x80 -+#define TLAN_NET_MASK_MASK6 0x40 -+#define TLAN_NET_MASK_MASK5 0x20 -+#define TLAN_NET_MASK_MASK4 0x10 -+#define TLAN_NET_MASK_RSRVD 0x0F -+#define TLAN_NET_CONFIG 0x04 -+#define TLAN_NET_CFG_RCLK 0x8000 -+#define TLAN_NET_CFG_TCLK 0x4000 -+#define TLAN_NET_CFG_BIT 0x2000 -+#define TLAN_NET_CFG_RXCRC 0x1000 -+#define TLAN_NET_CFG_PEF 0x0800 -+#define TLAN_NET_CFG_1FRAG 0x0400 -+#define TLAN_NET_CFG_1CHAN 0x0200 -+#define TLAN_NET_CFG_MTEST 0x0100 -+#define TLAN_NET_CFG_PHY_EN 0x0080 -+#define TLAN_NET_CFG_MSMASK 0x007F -+#define TLAN_MAN_TEST 0x06 -+#define TLAN_DEF_VENDOR_ID 0x08 -+#define TLAN_DEF_DEVICE_ID 0x0A -+#define TLAN_DEF_REVISION 0x0C -+#define TLAN_DEF_SUBCLASS 0x0D -+#define TLAN_DEF_MIN_LAT 0x0E -+#define TLAN_DEF_MAX_LAT 0x0F -+#define TLAN_AREG_0 0x10 -+#define TLAN_AREG_1 0x16 -+#define TLAN_AREG_2 0x1C -+#define TLAN_AREG_3 0x22 -+#define TLAN_HASH_1 0x28 -+#define TLAN_HASH_2 0x2C -+#define TLAN_GOOD_TX_FRMS 0x30 -+#define TLAN_TX_UNDERUNS 0x33 -+#define TLAN_GOOD_RX_FRMS 0x34 -+#define TLAN_RX_OVERRUNS 0x37 -+#define TLAN_DEFERRED_TX 0x38 -+#define TLAN_CRC_ERRORS 0x3A -+#define TLAN_CODE_ERRORS 0x3B -+#define TLAN_MULTICOL_FRMS 0x3C -+#define TLAN_SINGLECOL_FRMS 0x3E -+#define TLAN_EXCESSCOL_FRMS 0x40 -+#define TLAN_LATE_COLS 0x41 -+#define TLAN_CARRIER_LOSS 0x42 -+#define TLAN_ACOMMIT 0x43 -+#define TLAN_LED_REG 0x44 -+#define TLAN_LED_ACT 0x10 -+#define TLAN_LED_LINK 0x01 -+#define TLAN_BSIZE_REG 0x45 -+#define TLAN_MAX_RX 0x46 -+#define TLAN_INT_DIS 0x48 -+#define TLAN_ID_TX_EOC 0x04 -+#define TLAN_ID_RX_EOF 0x02 -+#define TLAN_ID_RX_EOC 0x01 -+ -+ -+ -+/* ThunderLAN Interrupt Codes */ -+ -+#define TLAN_INT_NUMBER_OF_INTS 8 -+ -+#define TLAN_INT_NONE 0x0000 -+#define TLAN_INT_TX_EOF 0x0001 -+#define TLAN_INT_STAT_OVERFLOW 0x0002 -+#define TLAN_INT_RX_EOF 0x0003 -+#define TLAN_INT_DUMMY 0x0004 -+#define TLAN_INT_TX_EOC 0x0005 -+#define TLAN_INT_STATUS_CHECK 0x0006 -+#define TLAN_INT_RX_EOC 0x0007 -+ -+ -+ -+/* ThunderLAN MII Registers */ -+ -+/* Generic MII/PHY Registers */ -+ -+#define MII_GEN_CTL 0x00 -+#define MII_GC_RESET 0x8000 -+#define MII_GC_LOOPBK 0x4000 -+#define MII_GC_SPEEDSEL 0x2000 -+#define MII_GC_AUTOENB 0x1000 -+#define MII_GC_PDOWN 0x0800 -+#define MII_GC_ISOLATE 0x0400 -+#define MII_GC_AUTORSRT 0x0200 -+#define MII_GC_DUPLEX 0x0100 -+#define MII_GC_COLTEST 0x0080 -+#define MII_GC_RESERVED 0x007F -+#define MII_GEN_STS 0x01 -+#define MII_GS_100BT4 0x8000 -+#define MII_GS_100BTXFD 0x4000 -+#define MII_GS_100BTXHD 0x2000 -+#define MII_GS_10BTFD 0x1000 -+#define MII_GS_10BTHD 0x0800 -+#define MII_GS_RESERVED 0x07C0 -+#define MII_GS_AUTOCMPLT 0x0020 -+#define MII_GS_RFLT 0x0010 -+#define MII_GS_AUTONEG 0x0008 -+#define MII_GS_LINK 0x0004 -+#define MII_GS_JABBER 0x0002 -+#define MII_GS_EXTCAP 0x0001 -+#define MII_GEN_ID_HI 0x02 -+#define MII_GEN_ID_LO 0x03 -+#define MII_GIL_OUI 0xFC00 -+#define MII_GIL_MODEL 0x03F0 -+#define MII_GIL_REVISION 0x000F -+#define MII_AN_ADV 0x04 -+#define MII_AN_LPA 0x05 -+#define MII_AN_EXP 0x06 -+ -+/* ThunderLAN Specific MII/PHY Registers */ -+ -+#define TLAN_TLPHY_ID 0x10 -+#define TLAN_TLPHY_CTL 0x11 -+#define TLAN_TC_IGLINK 0x8000 -+#define TLAN_TC_SWAPOL 0x4000 -+#define TLAN_TC_AUISEL 0x2000 -+#define TLAN_TC_SQEEN 0x1000 -+#define TLAN_TC_MTEST 0x0800 -+#define TLAN_TC_RESERVED 0x07F8 -+#define TLAN_TC_NFEW 0x0004 -+#define TLAN_TC_INTEN 0x0002 -+#define TLAN_TC_TINT 0x0001 -+#define TLAN_TLPHY_STS 0x12 -+#define TLAN_TS_MINT 0x8000 -+#define TLAN_TS_PHOK 0x4000 -+#define TLAN_TS_POLOK 0x2000 -+#define TLAN_TS_TPENERGY 0x1000 -+#define TLAN_TS_RESERVED 0x0FFF -+#define TLAN_TLPHY_PAR 0x19 -+#define TLAN_PHY_CIM_STAT 0x0020 -+#define TLAN_PHY_SPEED_100 0x0040 -+#define TLAN_PHY_DUPLEX_FULL 0x0080 -+#define TLAN_PHY_AN_EN_STAT 0x0400 -+ -+/* National Sem. & Level1 PHY id's */ -+#define NAT_SEM_ID1 0x2000 -+#define NAT_SEM_ID2 0x5C01 -+#define LEVEL1_ID1 0x7810 -+#define LEVEL1_ID2 0x0000 -+ -+#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 -+ -+/* Routines to access internal registers. */ -+ -+inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); -+ -+} /* TLan_DioRead8 */ -+ -+ -+ -+ -+inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); -+ -+} /* TLan_DioRead16 */ -+ -+ -+ -+ -+inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ return (inl(base_addr + TLAN_DIO_DATA)); -+ -+} /* TLan_DioRead32 */ -+ -+ -+ -+ -+inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); -+ -+} -+ -+ -+ -+ -+inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); -+ -+} -+ -+ -+ -+ -+inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) -+{ -+ outw(internal_addr, base_addr + TLAN_DIO_ADR); -+ outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); -+ -+} -+ -+ -+ -+#if 0 -+inline void TLan_ClearBit(u8 bit, u16 port) -+{ -+ outb_p(inb_p(port) & ~bit, port); -+} -+ -+ -+ -+ -+inline int TLan_GetBit(u8 bit, u16 port) -+{ -+ return ((int) (inb_p(port) & bit)); -+} -+ -+ -+ -+ -+inline void TLan_SetBit(u8 bit, u16 port) -+{ -+ outb_p(inb_p(port) | bit, port); -+} -+#endif -+ -+#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) -+#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) -+#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) -+ -+#ifdef I_LIKE_A_FAST_HASH_FUNCTION -+/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ -+/* the code below is about seven times as fast as the original code */ -+inline u32 TLan_HashFunc(u8 * a) -+{ -+ u8 hash; -+ -+ hash = (a[0] ^ a[3]); /* & 077 */ -+ hash ^= ((a[0] ^ a[3]) >> 6); /* & 003 */ -+ hash ^= ((a[1] ^ a[4]) << 2); /* & 074 */ -+ hash ^= ((a[1] ^ a[4]) >> 4); /* & 017 */ -+ hash ^= ((a[2] ^ a[5]) << 4); /* & 060 */ -+ hash ^= ((a[2] ^ a[5]) >> 2); /* & 077 */ -+ -+ return (hash & 077); -+} -+ -+#else /* original code */ -+ -+inline u32 xor(u32 a, u32 b) -+{ -+ return ((a && !b) || (!a && b)); -+} -+ -+#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) -+#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) -+ -+inline u32 TLan_HashFunc(u8 * a) -+{ -+ u32 hash; -+ -+ hash = -+ XOR8(DA(a, 0), DA(a, 6), DA(a, 12), DA(a, 18), DA(a, 24), -+ DA(a, 30), DA(a, 36), DA(a, 42)); -+ hash |= -+ XOR8(DA(a, 1), DA(a, 7), DA(a, 13), DA(a, 19), DA(a, 25), -+ DA(a, 31), DA(a, 37), DA(a, 43)) << 1; -+ hash |= -+ XOR8(DA(a, 2), DA(a, 8), DA(a, 14), DA(a, 20), DA(a, 26), -+ DA(a, 32), DA(a, 38), DA(a, 44)) << 2; -+ hash |= -+ XOR8(DA(a, 3), DA(a, 9), DA(a, 15), DA(a, 21), DA(a, 27), -+ DA(a, 33), DA(a, 39), DA(a, 45)) << 3; -+ hash |= -+ XOR8(DA(a, 4), DA(a, 10), DA(a, 16), DA(a, 22), DA(a, 28), -+ DA(a, 34), DA(a, 40), DA(a, 46)) << 4; -+ hash |= -+ XOR8(DA(a, 5), DA(a, 11), DA(a, 17), DA(a, 23), DA(a, 29), -+ DA(a, 35), DA(a, 41), DA(a, 47)) << 5; -+ -+ return hash; -+ -+} -+ -+#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ -Index: b/netboot/tulip.c -=================================================================== ---- a/netboot/tulip.c -+++ b/netboot/tulip.c -@@ -48,6 +48,7 @@ - /*********************************************************************/ - - /* -+ 07 Sep 2003 timlegge Multicast Support Added - 11 Apr 2001 mdc [patch to etherboot 4.7.24] - Major rewrite to include Linux tulip driver media detection - code. This driver should support a lot more cards now. -@@ -98,7 +99,6 @@ - and thinguin mailing lists. - */ - -- - /*********************************************************************/ - /* Declarations */ - /*********************************************************************/ -@@ -106,31 +106,29 @@ - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - - /* User settable parameters */ - --#undef TULIP_DEBUG --#undef TULIP_DEBUG_WHERE -+#undef TULIP_DEBUG -+#undef TULIP_DEBUG_WHERE -+#ifdef TULIP_DEBUG - static int tulip_debug = 2; /* 1 normal messages, 0 quiet .. 7 verbose. */ -+#endif - - #define TX_TIME_OUT 2*TICKS_PER_SEC - --typedef unsigned char u8; --typedef signed char s8; --typedef unsigned short u16; --typedef signed short s16; --typedef unsigned int u32; --typedef signed int s32; -+typedef uint8_t u8; -+typedef int8_t s8; -+typedef uint16_t u16; -+typedef int16_t s16; -+typedef uint32_t u32; -+typedef int32_t s32; - - /* helpful macros if on a big_endian machine for changing byte order. - not strictly needed on Intel */ --#define le16_to_cpu(val) (val) --#define cpu_to_le32(val) (val) - #define get_unaligned(ptr) (*(ptr)) - #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) - #define get_u16(ptr) (*(u16 *)(ptr)) --#define virt_to_bus(x) ((unsigned long)x) - #define virt_to_le32desc(addr) virt_to_bus(addr) - - #define TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 -@@ -212,6 +210,8 @@ - TULIP_IOTYPE, 256, PNIC2 }, - { "ADMtek AN981 Comet", { 0x09811317, 0xffffffff, 0, 0, 0, 0 }, - TULIP_IOTYPE, 256, COMET }, -+ { "ADMTek AN983 Comet", { 0x12161113, 0xffffffff, 0, 0, 0, 0 }, -+ TULIP_IOTYPE, 256, COMET }, - { "ADMtek Centaur-P", { 0x09851317, 0xffffffff, 0, 0, 0, 0 }, - TULIP_IOTYPE, 256, COMET }, - { "ADMtek Centaur-C", { 0x19851317, 0xffffffff, 0, 0, 0, 0 }, -@@ -280,9 +280,13 @@ - static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, }; - static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; - -+/* not used - static u16 t21142_csr13[] = { 0x0001, 0x0009, 0x0009, 0x0000, 0x0001, }; -+*/ - static u16 t21142_csr14[] = { 0xFFFF, 0x0705, 0x0705, 0x0000, 0x7F3D, }; -+/* not used - static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; -+*/ - - /* Offsets to the Command and Status Registers, "CSRs". All accesses - must be longword instructions and quadword aligned. */ -@@ -300,6 +304,14 @@ - TxFIFOUnderflow=0x20, TxJabber=0x08, TxNoBuf=0x04, TxDied=0x02, TxIntr=0x01, - }; - -+/* The configuration bits in CSR6. */ -+enum csr6_mode_bits { -+ TxOn=0x2000, RxOn=0x0002, FullDuplex=0x0200, -+ AcceptBroadcast=0x0100, AcceptAllMulticast=0x0080, -+ AcceptAllPhys=0x0040, AcceptRunt=0x0008, -+}; -+ -+ - enum desc_status_bits { - DescOwnded=0x80000000, RxDescFatalErr=0x8000, RxWholePkt=0x0300, - }; -@@ -384,21 +396,11 @@ - - #define TX_RING_SIZE 2 - static struct tulip_tx_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned(4))); -- --#ifdef USE_LOWMEM_BUFFER --#define txb ((char *)0x10000 - BUFLEN) --#else - static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); --#endif - - #define RX_RING_SIZE 4 - static struct tulip_rx_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned(4))); -- --#ifdef USE_LOWMEM_BUFFER --#define rxb ((char *)0x10000 - RX_RING_SIZE * BUFLEN - BUFLEN) --#else - static unsigned char rxb[RX_RING_SIZE * BUFLEN] __attribute__ ((aligned(4))); --#endif - - static struct tulip_private { - int cur_rx; -@@ -471,7 +473,6 @@ - static const char * block_name[] = {"21140 non-MII", "21140 MII PHY", - "21142 Serial PHY", "21142 MII PHY", "21143 SYM PHY", "21143 reset method"}; - -- - /*********************************************************************/ - /* Function Prototypes */ - /*********************************************************************/ -@@ -479,14 +480,13 @@ - static void mdio_write(struct nic *nic, int phy_id, int location, int value); - static int read_eeprom(unsigned long ioaddr, int location, int addr_len); - static void parse_eeprom(struct nic *nic); --struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, -- struct pci_device *pci); -+static int tulip_probe(struct dev *dev, struct pci_device *pci); - static void tulip_init_ring(struct nic *nic); - static void tulip_reset(struct nic *nic); - static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, - unsigned int s, const char *p); --static int tulip_poll(struct nic *nic); --static void tulip_disable(struct nic *nic); -+static int tulip_poll(struct nic *nic, int retrieve); -+static void tulip_disable(struct dev *dev); - static void nway_start(struct nic *nic); - static void pnic_do_nway(struct nic *nic); - static void select_media(struct nic *nic, int startup); -@@ -504,7 +504,6 @@ - static void tulip_more(void); - #endif - -- - /*********************************************************************/ - /* Utility Routines */ - /*********************************************************************/ -@@ -535,7 +534,6 @@ - /* wait */ ; - } - -- - /*********************************************************************/ - /* Media Descriptor Code */ - /*********************************************************************/ -@@ -565,7 +563,7 @@ - MDIO protocol. See the MII specifications or DP83840A data sheet - for details. */ - --int mdio_read(struct nic *nic, int phy_id, int location) -+int mdio_read(struct nic *nic __unused, int phy_id, int location) - { - int i; - int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; -@@ -626,7 +624,7 @@ - return (retval>>1) & 0xffff; - } - --void mdio_write(struct nic *nic, int phy_id, int location, int value) -+void mdio_write(struct nic *nic __unused, int phy_id, int location, int value) - { - int i; - int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; -@@ -682,7 +680,6 @@ - } - } - -- - /*********************************************************************/ - /* EEPROM Reading Code */ - /*********************************************************************/ -@@ -727,7 +724,6 @@ - return retval; - } - -- - /*********************************************************************/ - /* EEPROM Parsing Code */ - /*********************************************************************/ -@@ -895,11 +891,10 @@ - } - } - -- - /*********************************************************************/ - /* tulip_init_ring - setup the tx and rx descriptors */ - /*********************************************************************/ --static void tulip_init_ring(struct nic *nic) -+static void tulip_init_ring(struct nic *nic __unused) - { - int i; - -@@ -935,7 +930,22 @@ - /* Mark the last entry as wrapping the ring, though this should never happen */ - tx_ring[1].length = cpu_to_le32(DESC_RING_WRAP | BUFLEN); - } -- -+ -+static void set_rx_mode(struct nic *nic __unused) { -+ int csr6 = inl(ioaddr + CSR6) & ~0x00D5; -+ -+ tp->csr6 &= ~0x00D5; -+ -+ /* !IFF_PROMISC */ -+ tp->csr6 |= AcceptAllMulticast; -+ csr6 |= AcceptAllMulticast; -+ -+ outl(csr6, ioaddr + CSR6); -+ -+ -+ -+} -+ - /*********************************************************************/ - /* eth_reset - Reset adapter */ - /*********************************************************************/ -@@ -943,7 +953,6 @@ - { - int i; - unsigned long to; -- u32 addr_low, addr_high; - - #ifdef TULIP_DEBUG_WHERE - whereami("tulip_reset\n"); -@@ -956,7 +965,7 @@ - if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii)) { - outl(0x814C0000, ioaddr + CSR6); - } -- -+ - /* Reset the chip, holding bit 0 set at least 50 PCI cycles. */ - outl(0x00000001, ioaddr + CSR0); - tulip_wait(1); -@@ -1022,8 +1031,8 @@ - } - - /* Point to rx and tx descriptors */ -- outl((unsigned long)&rx_ring[0], ioaddr + CSR3); -- outl((unsigned long)&tx_ring[0], ioaddr + CSR4); -+ outl(virt_to_le32desc(&rx_ring[0]), ioaddr + CSR3); -+ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); - - init_media(nic); - -@@ -1049,11 +1058,12 @@ - if (tp->chip_id == LC82C168) - tulip_check_duplex(nic); - -+ set_rx_mode(nic); -+ - /* enable transmit and receive */ - outl(tp->csr6 | 0x00002002, ioaddr + CSR6); - } - -- - /*********************************************************************/ - /* eth_transmit - Transmit a frame */ - /*********************************************************************/ -@@ -1095,7 +1105,7 @@ - tx_ring[0].status = cpu_to_le32(0x80000000); - - /* Point to transmit descriptor */ -- outl((u32)&tx_ring[0], ioaddr + CSR4); -+ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); - - /* Enable Tx */ - outl(csr6 | 0x00002000, ioaddr + CSR6); -@@ -1113,11 +1123,11 @@ - /* Disable Tx */ - outl(csr6 & ~0x00002000, ioaddr + CSR6); - } -- -+ - /*********************************************************************/ - /* eth_poll - Wait for a frame */ - /*********************************************************************/ --static int tulip_poll(struct nic *nic) -+static int tulip_poll(struct nic *nic, int retrieve) - { - - #ifdef TULIP_DEBUG_WHERE -@@ -1128,6 +1138,8 @@ - if (rx_ring[tp->cur_rx].status & 0x80000000) - return 0; - -+ if ( ! retrieve ) return 1; -+ - #ifdef TULIP_DEBUG_WHERE - whereami("tulip_poll got one\n"); - #endif -@@ -1151,17 +1163,20 @@ - - return 1; - } -- -+ - /*********************************************************************/ - /* eth_disable - Disable the interface */ - /*********************************************************************/ --static void tulip_disable(struct nic *nic) -+static void tulip_disable(struct dev *dev) - { -- -+ struct nic *nic = (struct nic *)dev; - #ifdef TULIP_DEBUG_WHERE - whereami("tulip_disable\n"); - #endif - -+ /* merge reset and disable */ -+ tulip_reset(nic); -+ - /* disable interrupts */ - outl(0x00000000, ioaddr + CSR7); - -@@ -1171,24 +1186,41 @@ - /* Clear the missed-packet counter. */ - (volatile unsigned long)inl(ioaddr + CSR8); - } -- -+ -+/*********************************************************************/ -+/*IRQ - Enable, Disable, or Force interrupts */ -+/*********************************************************************/ -+static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ - /*********************************************************************/ - /* eth_probe - Look for an adapter */ - /*********************************************************************/ --struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, -- struct pci_device *pci) -+static int tulip_probe(struct dev *dev, struct pci_device *pci) - { -- u32 i, l1, l2; -+ struct nic *nic = (struct nic *)dev; -+ u32 i; - u8 chip_rev; - u8 ee_data[EEPROM_SIZE]; - unsigned short sum; - int chip_idx; - static unsigned char last_phys_addr[ETH_ALEN] = {0x00, 'L', 'i', 'n', 'u', 'x'}; - -- if (io_addrs == 0 || *io_addrs == 0) -+ if (pci->ioaddr == 0) - return 0; - -- ioaddr = *io_addrs; -+ ioaddr = pci->ioaddr; -+ nic->ioaddr = pci->ioaddr & ~3; -+ nic->irqno = 0; - - /* point to private storage */ - tp = &tpx; -@@ -1378,15 +1410,15 @@ - /* reset the device and make ready for tx and rx of packets */ - tulip_reset(nic); - -- nic->reset = tulip_reset; -+ dev->disable = tulip_disable; - nic->poll = tulip_poll; - nic->transmit = tulip_transmit; -- nic->disable = tulip_disable; -+ nic->irq = tulip_irq; - - /* give the board a chance to reset before returning */ - tulip_wait(4*TICKS_PER_SEC); - -- return nic; -+ return 1; - } - - static void start_link(struct nic *nic) -@@ -1508,7 +1540,7 @@ - } - } - --static void nway_start(struct nic *nic) -+static void nway_start(struct nic *nic __unused) - { - int csr14 = ((tp->sym_advertise & 0x0780) << 9) | - ((tp->sym_advertise&0x0020)<<1) | 0xffbf; -@@ -1662,7 +1694,7 @@ - } - } - --static void pnic_do_nway(struct nic *nic) -+static void pnic_do_nway(struct nic *nic __unused) - { - u32 phy_reg = inl(ioaddr + 0xB8); - u32 new_csr6 = tp->csr6 & ~0x40C40200; -@@ -1886,8 +1918,8 @@ - } - } else if (tp->chip_id == DC21040) { /* 21040 */ - /* Turn on the xcvr interface. */ -- int csr12 = inl(ioaddr + CSR12); - #ifdef TULIP_DEBUG -+ int csr12 = inl(ioaddr + CSR12); - if (tulip_debug > 1) - printf("%s: 21040 media type is %s, CSR12 is %hhX.\n", - tp->nic_name, medianame[tp->if_port], csr12); -@@ -1987,3 +2019,51 @@ - - return 0; - } -+ -+static struct pci_id tulip_nics[] = { -+PCI_ROM(0x1011, 0x0002, "dc21040", "Digital Tulip"), -+PCI_ROM(0x1011, 0x0009, "ds21140", "Digital Tulip Fast"), -+PCI_ROM(0x1011, 0x0014, "dc21041", "Digital Tulip+"), -+PCI_ROM(0x1011, 0x0019, "ds21142", "Digital Tulip 21142"), -+PCI_ROM(0x10b7, 0x9300, "3csoho100b-tx","3ComSOHO100B-TX"), -+PCI_ROM(0x10b9, 0x5261, "ali1563", "ALi 1563 integrated ethernet"), -+PCI_ROM(0x10d9, 0x0512, "mx98713", "Macronix MX987x3"), -+PCI_ROM(0x10d9, 0x0531, "mx98715", "Macronix MX987x5"), -+PCI_ROM(0x1113, 0x1217, "mxic-98715", "Macronix MX987x5"), -+PCI_ROM(0x11ad, 0xc115, "lc82c115", "LinkSys LNE100TX"), -+PCI_ROM(0x11ad, 0x0002, "82c168", "Netgear FA310TX"), -+PCI_ROM(0x1282, 0x9100, "dm9100", "Davicom 9100"), -+PCI_ROM(0x1282, 0x9102, "dm9102", "Davicom 9102"), -+PCI_ROM(0x1282, 0x9009, "dm9009", "Davicom 9009"), -+PCI_ROM(0x1282, 0x9132, "dm9132", "Davicom 9132"), -+PCI_ROM(0x1317, 0x0985, "centaur-p", "ADMtek Centaur-P"), -+PCI_ROM(0x1317, 0x0981, "an981", "ADMtek AN981 Comet"), /* ADMTek Centaur-P (stmicro) */ -+PCI_ROM(0x1113, 0x1216, "an983", "ADMTek AN983 Comet"), -+PCI_ROM(0x1317, 0x9511, "an983b", "ADMTek Comet 983b"), -+PCI_ROM(0x1317, 0x1985, "centaur-c", "ADMTek Centaur-C"), -+PCI_ROM(0x8086, 0x0039, "intel21145", "Intel Tulip"), -+PCI_ROM(0x125b, 0x1400, "ax88140", "ASIX AX88140"), -+PCI_ROM(0x11f6, 0x9881, "rl100tx", "Compex RL100-TX"), -+PCI_ROM(0x115d, 0x0003, "xircomtulip", "Xircom Tulip"), -+PCI_ROM(0x104a, 0x0981, "tulip-0981", "Tulip 0x104a 0x0981"), -+PCI_ROM(0x104a, 0x2774, "tulip-2774", "Tulip 0x104a 0x2774"), -+PCI_ROM(0x1113, 0x9511, "tulip-9511", "Tulip 0x1113 0x9511"), -+PCI_ROM(0x1186, 0x1561, "tulip-1561", "Tulip 0x1186 0x1561"), -+PCI_ROM(0x1259, 0xa120, "tulip-a120", "Tulip 0x1259 0xa120"), -+PCI_ROM(0x13d1, 0xab02, "tulip-ab02", "Tulip 0x13d1 0xab02"), -+PCI_ROM(0x13d1, 0xab03, "tulip-ab03", "Tulip 0x13d1 0xab03"), -+PCI_ROM(0x13d1, 0xab08, "tulip-ab08", "Tulip 0x13d1 0xab08"), -+PCI_ROM(0x14f1, 0x1803, "lanfinity", "Conexant LANfinity"), -+PCI_ROM(0x1626, 0x8410, "tulip-8410", "Tulip 0x1626 0x8410"), -+PCI_ROM(0x1737, 0xab08, "tulip-1737-ab08","Tulip 0x1737 0xab08"), -+PCI_ROM(0x1737, 0xab09, "tulip-ab09", "Tulip 0x1737 0xab09"), -+}; -+ -+struct pci_driver tulip_driver = { -+ .type = NIC_DRIVER, -+ .name = "Tulip", -+ .probe = tulip_probe, -+ .ids = tulip_nics, -+ .id_count = sizeof(tulip_nics)/sizeof(tulip_nics[0]), -+ .class = 0, -+}; -Index: b/netboot/tulip.txt -=================================================================== ---- a/netboot/tulip.txt -+++ /dev/null -@@ -1,53 +0,0 @@ --This software may be used and distributed according to the terms of --the GNU Public License, incorporated herein by reference. -- --This is a tulip and clone driver for Etherboot. See the revision --history in the tulip.c file for information on changes. This version --of the driver incorporates changes from Bob Edwards and Paul Mackerras --who cantributed changes to support the TRENDnet TE100-PCIA NIC which --uses a genuine Intel 21143-PD chipset. There are also various code --cleanups to make time-based activities more reliable. -- --Of course you have to have all the usual Etherboot environment --(bootp/dhcp/NFS) set up, and you need a Linux kernel with v0.91g --(7.16.99) or later of the tulip.c driver compiled in to support some --MX98715 based cards. That file is available at: -- -- http://cesdis.gsfc.nasa.gov/linux/drivers/test/tulip.c -- --NOTES -- --I've tested this driver with a SOHOware Fast 10/100 Model SDA110A, --a Linksys LNE100TX v2.0, and a Netgear FA310TX card, and it worked at --both 10 and 100 mbits. Other cards based on the tulip family may work as --well. -- --These cards are about 20$US, are supported by Linux and now Etherboot, --and being PCI, they auto-configure IRQ and IOADDR and auto-negotiate --10/100 half/full duplex. It seems like a pretty good value compared to --some of the pricier cards, and can lower the cost of building/adapting --thin client workstations substantially while giving a considerable --performance increase. -- --On some PCI tulip clone chipsets (MX987x5, LC82C115, LC82C168) this driver --lets the card choose the fastest speed it can negotiate with the peer --device. On other cards, it chooses 10mbit half-duplex. -- --I burned an AM27C256 (32KByte) EPROM with mx987x5.lzrom and it worked. --According to the data sheet the MX98715A supports up to 64K (27C512) --EPROMs, -- --I've liberally commented the code and header files in the hope that it --will help the next person who hacks the code or needs to support some --tulip clone card, or wishes to add functionality. -- --Anyway, please test this if you can on your tulip based card, and let --me (mdc@thinguin.org) and the netboot list (netboot@baghira.han.de) --know how things go. I also would appreciate code review by people who --program. I'm a strong believer in "another set of eyes". -- --Regards, -- --Marty Connor --mdc@thinguin.org --http://www.thinguin.org/ -Index: b/netboot/types.h -=================================================================== ---- /dev/null -+++ b/netboot/types.h -@@ -0,0 +1,44 @@ -+#ifndef _TYPES_H -+#define _TYPES_H -+ -+/* I'm architecture independed :-) */ -+ -+/* -+ * It's architecture depended headers for common integer types -+ */ -+#include "stdint.h" -+ -+/* -+ * Here are some RPC types define from linux /usr/include/rpc/types.h -+ */ -+typedef int bool_t; -+typedef int enum_t; -+typedef uint32_t rpcprog_t; -+typedef uint32_t rpcvers_t; -+typedef uint32_t rpcproc_t; -+typedef uint32_t rpcprot_t; -+typedef uint32_t rpcport_t; -+ -+/* For bool_t */ -+/* typedef enum { */ -+/* FALSE = 0, */ -+/* TRUE = 1 */ -+/* } boolean_t; */ -+ -+ -+ -+/* Some BSD or RPC style types */ -+typedef unsigned char u_char; -+typedef unsigned short u_short; -+typedef unsigned int u_int; -+typedef unsigned long u_long; -+typedef long long quad_t; -+typedef unsigned long long u_quad_t; -+typedef struct { -+ int __val[2]; -+}fsid_t; /* Type of file system IDs, from bits/types.h */ -+ -+typedef int daddr_t; /* The type of a disk address, from bits/types.h */ -+typedef char * caddr_t; -+ -+#endif /* _TYPES_H */ -Index: b/netboot/udp.h -=================================================================== ---- /dev/null -+++ b/netboot/udp.h -@@ -0,0 +1,30 @@ -+#ifndef _UDP_H -+#define _UDP_H -+ -+/* We need 'uint16_t' and 'uint8_t' */ -+#include "types.h" -+/* We need 'in_addr' */ -+#include "in.h" -+ -+struct udp_pseudo_hdr { -+ in_addr src; -+ in_addr dest; -+ uint8_t unused; -+ uint8_t protocol; -+ uint16_t len; -+}; -+struct udphdr { -+ uint16_t src; -+ uint16_t dest; -+ uint16_t len; -+ uint16_t chksum; -+}; -+ -+extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock, -+ unsigned int __destsock, int __ttl, int __len, -+ const void * __buf); -+ -+extern int udp_transmit(unsigned long __destip, unsigned int __srcsock, -+ unsigned int __destsock, int __len, const void * __buf); -+ -+#endif /* _UDP_H */ -Index: b/netboot/via-rhine.c -=================================================================== ---- a/netboot/via-rhine.c -+++ b/netboot/via-rhine.c -@@ -18,7 +18,7 @@ - - */ - --static const char *version = "rhine.c v1.0.0 2000-01-07\n"; -+static const char *version = "rhine.c v1.0.1 2003-02-06\n"; - - /* A few user-configurable values. */ - -@@ -46,7 +46,6 @@ - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - - /* define all ioaddr */ - -@@ -103,6 +102,11 @@ - #define byCFGD ioaddr + 0x7b - #define wTallyCntMPA ioaddr + 0x7c - #define wTallyCntCRC ioaddr + 0x7d -+#define bySTICKHW ioaddr + 0x83 -+#define byWOLcrClr ioaddr + 0xA4 -+#define byWOLcgClr ioaddr + 0xA7 -+#define byPwrcsrClr ioaddr + 0xAC -+ - /*--------------------- Exioaddr Definitions -------------------------*/ - - /* -@@ -617,9 +621,6 @@ - - */ - --#define PCI_VENDOR_ID_FET 0x1106 --#define PCI_DEVICE_ID_FET_3043 0x3043 -- - /* The rest of these values should never change. */ - #define NUM_TX_DESC 2 /* Number of Tx descriptor registers. */ - -@@ -652,23 +653,19 @@ - } - rhine; - --static struct nic *rhine_probe1 (struct nic *dev, int ioaddr, -+static void rhine_probe1 (struct nic *nic, int ioaddr, - int chip_id, int options); - static int QueryAuto (int); - static int ReadMII (int byMIIIndex, int); - static void WriteMII (char, char, char, int); - static void MIIDelay (void); - static void rhine_init_ring (struct nic *dev); --static void rhine_disable (struct nic *nic); -+static void rhine_disable (struct dev *dev); - static void rhine_reset (struct nic *nic); --static int rhine_poll (struct nic *nic); -+static int rhine_poll (struct nic *nic, int retreive); - static void rhine_transmit (struct nic *nic, const char *d, unsigned int t, - unsigned int s, const char *p); - --/* Linux support functions */ --#define virt_to_bus(x) ((unsigned long)x) --#define bus_to_virt(x) ((void *)x) -- - /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ - static void - rhine_init_ring (struct nic *nic) -@@ -854,26 +851,99 @@ - } - } - --struct nic * --rhine_probe (struct nic *nic, unsigned short *probeaddrs, -- struct pci_device *pci) -+/* Offsets to the device registers. */ -+enum register_offsets { -+ StationAddr=0x00, RxConfig=0x06, TxConfig=0x07, ChipCmd=0x08, -+ IntrStatus=0x0C, IntrEnable=0x0E, -+ MulticastFilter0=0x10, MulticastFilter1=0x14, -+ RxRingPtr=0x18, TxRingPtr=0x1C, GFIFOTest=0x54, -+ MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E, -+ MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74, -+ ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B, -+ RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81, -+ StickyHW=0x83, IntrStatus2=0x84, WOLcrClr=0xA4, WOLcgClr=0xA7, -+ PwrcsrClr=0xAC, -+}; -+ -+/* Bits in the interrupt status/mask registers. */ -+enum intr_status_bits { -+ IntrRxDone=0x0001, IntrRxErr=0x0004, IntrRxEmpty=0x0020, -+ IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0210, -+ IntrPCIErr=0x0040, -+ IntrStatsMax=0x0080, IntrRxEarly=0x0100, -+ IntrRxOverflow=0x0400, IntrRxDropped=0x0800, IntrRxNoBuf=0x1000, -+ IntrTxAborted=0x2000, IntrLinkChange=0x4000, -+ IntrRxWakeUp=0x8000, -+ IntrNormalSummary=0x0003, IntrAbnormalSummary=0xC260, -+ IntrTxDescRace=0x080000, /* mapped from IntrStatus2 */ -+ IntrTxErrSummary=0x082218, -+}; -+#define DEFAULT_INTR (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | \ -+ IntrRxDropped | IntrRxNoBuf) -+ -+/*************************************************************************** -+ IRQ - PXE IRQ Handler -+***************************************************************************/ -+void rhine_irq ( struct nic *nic, irq_action_t action ) { -+ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; -+ /* Enable interrupts by setting the interrupt mask. */ -+ unsigned int intr_status; -+ -+ switch ( action ) { -+ case DISABLE : -+ case ENABLE : -+ intr_status = inw(nic->ioaddr + IntrStatus); -+ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ -+ if (tp->chip_id == 0x3065) -+ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; -+ intr_status = (intr_status & ~DEFAULT_INTR); -+ if ( action == ENABLE ) -+ intr_status = intr_status | DEFAULT_INTR; -+ outw(intr_status, nic->ioaddr + IntrEnable); -+ break; -+ case FORCE : -+ outw(0x0010, nic->ioaddr + 0x84); -+ break; -+ } -+} -+ -+static int -+rhine_probe (struct dev *dev, struct pci_device *pci) - { -+ struct nic *nic = (struct nic *)dev; -+ struct rhine_private *tp = &rhine; - if (!pci->ioaddr) -- return NULL; -- nic = rhine_probe1 (nic, pci->ioaddr, 0, -1); -+ return 0; -+ rhine_probe1 (nic, pci->ioaddr, pci->dev_id, -1); - -- if (nic) -- adjust_pci_device(pci); -- nic->poll = rhine_poll; -- nic->transmit = rhine_transmit; -- nic->reset = rhine_reset; -- nic->disable = rhine_disable; -+ adjust_pci_device(pci); - rhine_reset (nic); - -- return nic; -+ dev->disable = rhine_disable; -+ nic->poll = rhine_poll; -+ nic->transmit = rhine_transmit; -+ nic->irqno = pci->irq; -+ nic->irq = rhine_irq; -+ nic->ioaddr = tp->ioaddr; -+ -+ -+ return 1; -+} -+ -+static void set_rx_mode(struct nic *nic __unused) { -+ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; -+ unsigned char rx_mode; -+ int ioaddr = tp->ioaddr; -+ -+ /* ! IFF_PROMISC */ -+ outl(0xffffffff, byMAR0); -+ outl(0xffffffff, byMAR4); -+ rx_mode = 0x0C; -+ -+ outb(0x60 /* thresh */ | rx_mode, byRCR ); - } - --static struct nic * -+static void - rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options) - { - struct rhine_private *tp; -@@ -885,6 +955,29 @@ - - if (rhine_debug > 0 && did_version++ == 0) - printf (version); -+ -+ /* D-Link provided reset code (with comment additions) */ -+ if((chip_id != 0x3043) && (chip_id != 0x6100)) { -+ unsigned char byOrgValue; -+ -+ if(rhine_debug > 0) -+ printf("Enabling Sticky Bit Workaround for Chip_id: 0x%hX\n" -+ , chip_id); -+ /* clear sticky bit before reset & read ethernet address */ -+ byOrgValue = inb(bySTICKHW); -+ byOrgValue = byOrgValue & 0xFC; -+ outb(byOrgValue, bySTICKHW); -+ -+ /* (bits written are cleared?) */ -+ /* disable force PME-enable */ -+ outb(0x80, byWOLcgClr); -+ /* disable power-event config bit */ -+ outb(0xFF, byWOLcrClr); -+ /* clear power status (undocumented in vt6102 docs?) */ -+ outb(0xFF, byPwrcsrClr); -+ -+ } -+ - /* Perhaps this should be read from the EEPROM? */ - for (i = 0; i < ETH_ALEN; i++) - nic->node_addr[i] = inb (byPAR0 + i); -@@ -920,6 +1013,7 @@ - } - #endif - -+ - /* query MII to know LineSpeed,duplex mode */ - byMIIvalue = inb (ioaddr + 0x6d); - LineSpeed = byMIIvalue & MIISR_SPEED; -@@ -971,15 +1065,19 @@ - if (tp->default_port) - tp->medialock = 1; - } -- return nic; -+ return; - } - --static void --rhine_disable (struct nic *nic) -+static void -+rhine_disable (struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; - struct rhine_private *tp = (struct rhine_private *) nic->priv_data; - int ioaddr = tp->ioaddr; - -+ /* merge reset and disable */ -+ rhine_reset(nic); -+ - printf ("rhine disable\n"); - /* Switch to loopback mode to avoid hardware races. */ - writeb(0x60 | 0x01, byTCR); -@@ -1002,17 +1100,10 @@ - int rx_bufs_tmp, rx_bufs_tmp1; - int tx_bufs_tmp, tx_bufs_tmp1; - --#ifdef USE_LOWMEM_BUFFER --#define buf1 (0x10000 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) --#define buf2 (buf1 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) --#define desc1 (buf2 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) --#define desc2 (desc1 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) --#else - static char buf1[RX_RING_SIZE * PKT_BUF_SZ + 32]; - static char buf2[RX_RING_SIZE * PKT_BUF_SZ + 32]; - static char desc1[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; - static char desc2[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; --#endif - - /* printf ("rhine_reset\n"); */ - /* Soft reset the chip. */ -@@ -1069,6 +1160,9 @@ - outl (virt_to_bus (tp->rx_ring), dwCurrentRxDescAddr); - outl (virt_to_bus (tp->tx_ring), dwCurrentTxDescAddr); - -+ /* Setup Multicast */ -+ set_rx_mode(nic); -+ - /* close IMR */ - outw (0x0000, byIMR0); - -@@ -1093,15 +1187,34 @@ - /*set IMR to work */ - outw (IMRShadow, byIMR0); - } -+/* Beware of PCI posted writes */ -+#define IOSYNC do { readb(nic->ioaddr + StationAddr); } while (0) - - static int --rhine_poll (struct nic *nic) -+rhine_poll (struct nic *nic, int retreive) - { - struct rhine_private *tp = (struct rhine_private *) nic->priv_data; - int rxstatus, good = 0;; - - if (tp->rx_ring[tp->cur_rx].rx_status.bits.own_bit == 0) - { -+ unsigned int intr_status; -+ /* There is a packet ready */ -+ if(!retreive) -+ return 1; -+ -+ intr_status = inw(nic->ioaddr + IntrStatus); -+ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ -+#if 0 -+ if (tp->chip_id == 0x3065) -+ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; -+#endif -+ /* Acknowledge all of the current interrupt sources ASAP. */ -+ if (intr_status & IntrTxDescRace) -+ outb(0x08, nic->ioaddr + IntrStatus2); -+ outw(intr_status & 0xffff, nic->ioaddr + IntrStatus); -+ IOSYNC; -+ - rxstatus = tp->rx_ring[tp->cur_rx].rx_status.lw; - if ((rxstatus & 0x0300) != 0x0300) - { -@@ -1124,6 +1237,11 @@ - tp->cur_rx++; - tp->cur_rx = tp->cur_rx % RX_RING_SIZE; - } -+ /* Acknowledge all of the current interrupt sources ASAP. */ -+ outw(DEFAULT_INTR & ~IntrRxDone, nic->ioaddr + IntrStatus); -+ -+ IOSYNC; -+ - return good; - } - -@@ -1152,7 +1270,7 @@ - while (s < ETH_ZLEN) - *((char *) tp->tx_buffs[entry] + ETH_HLEN + (s++)) = 0; - -- tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = ETH_HLEN + s; -+ tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = s; - - tp->tx_ring[entry].tx_status.bits.own_bit = 1; - -@@ -1170,6 +1288,9 @@ - /*printf("td4=[%X]",inl(dwCurrentTDSE3)); */ - - outb (CR1bak, byCR1); -+ /* Wait until transmit is finished */ -+ while (tp->tx_ring[entry].tx_status.bits.own_bit != 0) -+ ; - tp->cur_tx++; - - /*outw(IMRShadow,byIMR0); */ -@@ -1177,4 +1298,21 @@ - /*tp->tx_skbuff[entry] = 0; */ - } - -+static struct pci_id rhine_nics[] = { -+PCI_ROM(0x1106, 0x3065, "dlink-530tx", "VIA 6102"), -+PCI_ROM(0x1106, 0x3106, "via-rhine-6105", "VIA 6105"), -+PCI_ROM(0x1106, 0x3043, "dlink-530tx-old", "VIA 3043"), /* Rhine-I 86c100a */ -+PCI_ROM(0x1106, 0x3053, "via6105m", "VIA 6105M"), -+PCI_ROM(0x1106, 0x6100, "via-rhine-old", "VIA 86C100A"), /* Rhine-II */ -+}; -+ -+struct pci_driver rhine_driver = { -+ .type = NIC_DRIVER, -+ .name = "VIA 86C100", -+ .probe = rhine_probe, -+ .ids = rhine_nics, -+ .id_count = sizeof(rhine_nics)/sizeof(rhine_nics[0]), -+ .class = 0, -+}; -+ - /* EOF via-rhine.c */ -Index: b/netboot/w89c840.c -=================================================================== ---- a/netboot/w89c840.c -+++ b/netboot/w89c840.c -@@ -43,6 +43,9 @@ - * using timer2 routines. Proposed - * by Ken Yap to eliminate CPU speed - * dependency. -+ * Dec 12 2003 V0.94 timlegge Fixed issues in 5.2, removed -+ * interrupt usage, enabled -+ * multicast support - * - * This is the etherboot driver for cards based on Winbond W89c840F chip. - * -@@ -77,10 +80,9 @@ - #include "etherboot.h" - #include "nic.h" - #include "pci.h" --#include "cards.h" - #include "timer.h" - --static const char *w89c840_version = "diver Version 0.92 - August 27, 2000"; -+static const char *w89c840_version = "driver Version 0.94 - December 12, 2003"; - - typedef unsigned char u8; - typedef signed char s8; -@@ -90,9 +92,6 @@ - typedef signed int s32; - - /* Linux support functions */ --#define virt_to_bus(x) ((unsigned long)x) --#define bus_to_virt(x) ((void *)x) -- - #define virt_to_le32desc(addr) virt_to_bus(addr) - #define le32desc_to_virt(addr) bus_to_virt(addr) - -@@ -109,7 +108,6 @@ - bonding and packet priority. - There are no ill effects from too-large receive rings. */ - #define TX_RING_SIZE 2 -- - #define RX_RING_SIZE 2 - - /* The presumed FIFO size for working around the Tx-FIFO-overflow bug. -@@ -260,32 +258,20 @@ - - static int ioaddr; - static unsigned short eeprom [0x40]; -- --#ifdef USE_LOWMEM_BUFFER --#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) --#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) --#else - static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; - static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; --#endif - - static int eeprom_read(long ioaddr, int location); - static int mdio_read(int base_address, int phy_id, int location); -+#if 0 - static void mdio_write(int base_address, int phy_id, int location, int value); -+#endif - - static void check_duplex(void); - static void set_rx_mode(void); - static void init_ring(void); - --/* --static void wait_long_time(void) --{ -- printf("Paused - please read output above this line\n"); -- sleep(3); --} --*/ -- --#if defined W89C840_DEBUG -+#if defined(W89C840_DEBUG) - static void decode_interrupt(u32 intr_status) - { - printf("Interrupt status: "); -@@ -349,15 +335,17 @@ - check_duplex(); - set_rx_mode(); - -- /* Clear and Enable interrupts by setting the interrupt mask. */ -+ /* Do not enable the interrupts Etherboot doesn't need them */ -+/* - writel(0x1A0F5, ioaddr + IntrStatus); - writel(0x1A0F5, ioaddr + IntrEnable); -- -+*/ - #if defined(W89C840_DEBUG) - printf("winbond-840 : Done reset.\n"); - #endif - } - -+#if 0 - static void handle_intr(u32 intr_stat) - { - if ((intr_stat & (NormalIntr|AbnormalIntr)) == 0) { -@@ -372,7 +360,7 @@ - /* There was an abnormal interrupt */ - printf("\n-=- Abnormal interrupt.\n"); - --#if defined (W89C840_DEBUG) -+#if defined(W89C840_DEBUG) - decode_interrupt(intr_stat); - #endif - -@@ -383,19 +371,21 @@ - } - } - } -+#endif - - /************************************************************************** - w89c840_poll - Wait for a frame - ***************************************************************************/ --static int w89c840_poll(struct nic *nic) -+static int w89c840_poll(struct nic *nic, int retrieve) - { - /* return true if there's an ethernet packet ready to read */ - /* nic->packet should contain data on return */ - /* nic->packetlen should contain length of data */ - int packet_received = 0; - -+#if defined(W89C840_DEBUG) - u32 intr_status = readl(ioaddr + IntrStatus); -- /* handle_intr(intr_status); */ /* -- handled later */ -+#endif - - do { - /* Code from netdev_rx(dev) */ -@@ -411,6 +401,11 @@ - break; - } - -+ if ( !retrieve ) { -+ packet_received = 1; -+ break; -+ } -+ - if ((status & 0x38008300) != 0x0300) { - if ((status & 0x38000300) != 0x0300) { - /* Ingore earlier buffers. */ -@@ -478,11 +473,7 @@ - entry = (++w840private.cur_rx) % RX_RING_SIZE; - w840private.rx_head_desc = &w840private.rx_ring[entry]; - } while (0); -- -- if (intr_status & (AbnormalIntr | TxFIFOUnderflow | IntrPCIErr |TimerInt | IntrTxStopped)) { -- handle_intr(intr_status); -- } -- -+ - return packet_received; - } - -@@ -521,13 +512,13 @@ - - w840private.tx_ring[entry].buffer1 = virt_to_le32desc(tx_packet); - -- w840private.tx_ring[entry].length = (DescWholePkt | s); -+ w840private.tx_ring[entry].length = (DescWholePkt | (u32) s); - if (entry >= TX_RING_SIZE-1) /* Wrap ring */ - w840private.tx_ring[entry].length |= (DescIntr | DescEndRing); - w840private.tx_ring[entry].status = (DescOwn); - w840private.cur_tx++; - -- w840private.tx_q_bytes += s; -+ w840private.tx_q_bytes = (u16) s; - writel(0, ioaddr + TxStartDemand); - - /* Work around horrible bug in the chip by marking the queue as full -@@ -550,33 +541,29 @@ - load_timer2(TX_TIMEOUT); - - { -+#if defined W89C840_DEBUG - u32 intr_stat = 0; -- -+#endif - while (1) { - -- intr_stat = readl(ioaddr + IntrStatus); - #if defined(W89C840_DEBUG) -- decode_interrupt(intr_stat); -+ decode_interrupt(intr_stat); - #endif - -- if (intr_stat & (NormalIntr | IntrTxDone)) { -- - while ( (transmit_status & DescOwn) && timer2_running()) { - - transmit_status = w840private.tx_ring[entry].status; - } - -- writel(intr_stat & 0x0001ffff, ioaddr + IntrStatus); - break; -- } - } - } - - if ((transmit_status & DescOwn) == 0) { - - #if defined(W89C840_DEBUG) -- printf("winbond-840 : transmission complete after %d wait loop iterations, status %X\n", -- TX_LOOP_COUNT - transmit_loop_counter, w840private.tx_ring[entry].status); -+ printf("winbond-840 : transmission complete after wait loop iterations, status %X\n", -+ w840private.tx_ring[entry].status); - #endif - - return; -@@ -592,8 +579,12 @@ - /************************************************************************** - w89c840_disable - Turn off ethernet interface - ***************************************************************************/ --static void w89c840_disable(struct nic *nic) -+static void w89c840_disable(struct dev *dev) - { -+ struct nic *nic = (struct nic *)dev; -+ /* merge reset and disable */ -+ w89c840_reset(nic); -+ - /* Don't know what to do to disable the board. Is this needed at all? */ - /* Yes, a live NIC can corrupt the loaded memory later [Ken] */ - /* Stop the chip's Tx and Rx processes. */ -@@ -601,20 +592,37 @@ - } - - /************************************************************************** -+w89c840_irq - Enable, Disable, or Force interrupts -+***************************************************************************/ -+static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused) -+{ -+ switch ( action ) { -+ case DISABLE : -+ break; -+ case ENABLE : -+ break; -+ case FORCE : -+ break; -+ } -+} -+ -+/************************************************************************** - w89c840_probe - Look for an adapter, this routine's visible to the outside - ***************************************************************************/ --struct nic *w89c840_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *p) -+static int w89c840_probe(struct dev *dev, struct pci_device *p) - { -+ struct nic *nic = (struct nic *)dev; - u16 sum = 0; -- int i, j, to; -+ int i, j; - unsigned short value; -- int options; -- int promisc; - -- if (probe_addrs == 0 || probe_addrs[0] == 0) -+ if (p->ioaddr == 0) - return 0; - -- ioaddr = probe_addrs[0]; /* Mask the bit that says "this is an io addr" */ -+ ioaddr = p->ioaddr; -+ nic->ioaddr = p->ioaddr & ~3; -+ nic->irqno = 0; -+ - - #if defined(W89C840_DEBUG) - printf("winbond-840: PCI bus %hhX device function %hhX: I/O address: %hX\n", p->bus, p->devfn, ioaddr); -@@ -622,8 +630,6 @@ - - ioaddr = ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ - -- /* if probe_addrs is 0, then routine can use a hardwired default */ -- - /* From Matt Hortman */ - if (p->vendor == PCI_VENDOR_ID_WINBOND2 - && p->dev_id == PCI_DEVICE_ID_WINBOND2_89C840) { -@@ -689,14 +695,14 @@ - } - - /* point to NIC specific routines */ -- nic->reset = w89c840_reset; -- nic->poll = w89c840_poll; -+ dev->disable = w89c840_disable; -+ nic->poll = w89c840_poll; - nic->transmit = w89c840_transmit; -- nic->disable = w89c840_disable; -+ nic->irq = w89c840_irq; - - w89c840_reset(nic); - -- return nic; -+ return 1; - } - - /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. These are -@@ -814,6 +820,7 @@ - return (retval>>1) & 0xffff; - } - -+#if 0 - static void mdio_write(int base_address, int phy_id, int location, int value) - { - long mdio_addr = base_address + MIICtrl; -@@ -844,6 +851,7 @@ - } - return; - } -+#endif - - static void check_duplex(void) - { -@@ -877,12 +885,10 @@ - memset(mc_filter, 0xff, sizeof(mc_filter)); - - /* -- * Actually, should work OK with multicast enabled. -- iko -- */ --/* -- * rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; -+ * works OK with multicast enabled. - */ -- rx_mode = AcceptBroadcast | AcceptMyPhys; -+ -+ rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; - - writel(mc_filter[0], ioaddr + MulticastFilter0); - writel(mc_filter[1], ioaddr + MulticastFilter1); -@@ -932,3 +938,18 @@ - } - return; - } -+ -+ -+static struct pci_id w89c840_nics[] = { -+PCI_ROM(0x1050, 0x0840, "winbond840", "Winbond W89C840F"), -+PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"), -+}; -+ -+struct pci_driver w89c840_driver = { -+ .type = NIC_DRIVER, -+ .name = "W89C840F", -+ .probe = w89c840_probe, -+ .ids = w89c840_nics, -+ .id_count = sizeof(w89c840_nics)/sizeof(w89c840_nics[0]), -+ .class = 0, -+}; -Index: b/stage2/disk_io.c -=================================================================== ---- a/stage2/disk_io.c -+++ b/stage2/disk_io.c -@@ -25,6 +25,7 @@ - #ifdef SUPPORT_NETBOOT - # define GRUB 1 - # include -+# include - #endif - - #ifdef GRUB_UTIL diff --git a/buildroot/boot/grub/grub.mk b/buildroot/boot/grub/grub.mk deleted file mode 100644 index ae687d6b1..000000000 --- a/buildroot/boot/grub/grub.mk +++ /dev/null @@ -1,109 +0,0 @@ -################################################################################ -# -# grub -# -################################################################################ - -GRUB_VERSION = 0.97 -GRUB_SOURCE = grub_$(GRUB_VERSION).orig.tar.gz -GRUB_PATCH = grub_$(GRUB_VERSION)-68.diff.gz -GRUB_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/g/grub - -GRUB_LICENSE = GPLv2+ -GRUB_LICENSE_FILES = COPYING - -# Passing -O0 since the default -O2 passed by Buildroot generates -# non-working stage2. Passing --build-id=none to the linker, because -# the ".note.gnu.build-id" ELF sections generated by default confuse -# objcopy when generating raw binaries. Passing -fno-stack-protector -# to avoid undefined references to __stack_chk_fail. -GRUB_CFLAGS = \ - -DSUPPORT_LOOPDEV \ - -O0 -Wl,--build-id=none \ - -fno-stack-protector - -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_SPLASH),--enable-graphics,--disable-graphics) - -GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless -GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595 -GRUB_CONFIG-$(BR2_TARGET_GRUB_3c90x) += --enable-3c90x -GRUB_CONFIG-$(BR2_TARGET_GRUB_davicom) += --enable-davicom -GRUB_CONFIG-$(BR2_TARGET_GRUB_e1000) += --enable-e1000 -GRUB_CONFIG-$(BR2_TARGET_GRUB_eepro100) += --enable-eepro100 -GRUB_CONFIG-$(BR2_TARGET_GRUB_epic100) += --enable-epic100 -GRUB_CONFIG-$(BR2_TARGET_GRUB_forcedeth) += --enable-forcedeth -GRUB_CONFIG-$(BR2_TARGET_GRUB_natsemi) += --enable-natsemi -GRUB_CONFIG-$(BR2_TARGET_GRUB_ns83820) += --enable-ns83820 -GRUB_CONFIG-$(BR2_TARGET_GRUB_ns8390) += --enable-ns8390 -GRUB_CONFIG-$(BR2_TARGET_GRUB_pcnet32) += --enable-pcnet32 -GRUB_CONFIG-$(BR2_TARGET_GRUB_pnic) += --enable-pnic -GRUB_CONFIG-$(BR2_TARGET_GRUB_rtl8139) += --enable-rtl8139 -GRUB_CONFIG-$(BR2_TARGET_GRUB_r8169) += --enable-r8169 -GRUB_CONFIG-$(BR2_TARGET_GRUB_sis900) += --enable-sis900 -GRUB_CONFIG-$(BR2_TARGET_GRUB_tg3) += --enable-tg3 -GRUB_CONFIG-$(BR2_TARGET_GRUB_tulip) += --enable-tulip -GRUB_CONFIG-$(BR2_TARGET_GRUB_tlan) += --enable-tlan -GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi -GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine -GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840 - -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_EXT2),--enable-ext2fs,--disable-ext2fs) -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_FAT),--enable-fat,--disable-fat) -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_ISO9660),--enable-iso9660,--disable-iso9660) -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_JFS),--enable-jfs,--disable-jfs) -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_REISERFS),--enable-reiserfs,--disable-reiserfs) -GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_XFS),--enable-xfs,--disable-xfs) -GRUB_CONFIG-y += --disable-ffs --disable-ufs2 --disable-minix --disable-vstafs - -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_EXT2),e2fs) -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_FAT),fat) -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_ISO9660),iso9660) -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_JFS),jfs) -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_REISERFS),reiserfs) -GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_XFS),xfs) - -define GRUB_DEBIAN_PATCHES - # Apply the patches from the Debian patch - (cd $(@D) ; for f in `cat debian/patches/series | grep -v ^#` ; do \ - cat debian/patches/$$f | patch -g0 -p1 ; \ - done) -endef - -GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES - -GRUB_CONF_ENV = \ - $(HOST_CONFIGURE_OPTS) \ - CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS) -m32" - -GRUB_CONF_OPTS = \ - --disable-auto-linux-mem-opt \ - $(GRUB_CONFIG-y) - -ifeq ($(BR2_TARGET_GRUB_SPLASH),y) -define GRUB_INSTALL_SPLASH - $(INSTALL) -D -m 0644 boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/splash.xpm.gz -endef -else -define GRUB_INSTALL_SPLASH - $(SED) '/^splashimage/d' $(TARGET_DIR)/boot/grub/menu.lst -endef -endif - -# We're cheating here as we're installing the grub binary not in the -# target directory (where it is useless), but in the host -# directory. This grub binary can be used to install grub into the MBR -# of a disk or disk image. - -define GRUB_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/grub/grub $(HOST_DIR)/sbin/grub - $(INSTALL) -D -m 0755 $(@D)/stage1/stage1 $(TARGET_DIR)/boot/grub/stage1 - for f in $(GRUB_STAGE_1_5_TO_INSTALL) ; do \ - $(INSTALL) -D -m 0755 $(@D)/stage2/$${f}_stage1_5 \ - $(TARGET_DIR)/boot/grub/$${f}_stage1_5 ; \ - done - $(INSTALL) -D -m 0644 $(@D)/stage2/stage2 $(TARGET_DIR)/boot/grub/stage2 - $(INSTALL) -D -m 0644 boot/grub/menu.lst $(TARGET_DIR)/boot/grub/menu.lst - $(GRUB_INSTALL_SPLASH) -endef - -$(eval $(autotools-package)) diff --git a/buildroot/boot/grub/menu.lst b/buildroot/boot/grub/menu.lst deleted file mode 100644 index a231f7eaa..000000000 --- a/buildroot/boot/grub/menu.lst +++ /dev/null @@ -1,16 +0,0 @@ -default 0 -timeout 10 - -# Used when no splashimage is used -color cyan/blue white/blue - -# Gets enabled/disabled depending on Grub support for splashimage -splashimage (hd0,0)/boot/grub/splash.xpm.gz - -# Used when a splashimage is enabled -foreground 000000 -background cccccc - -title Buildroot - root (hd0,0) - kernel /boot/bzImage rw root=/dev/sda1 diff --git a/buildroot/boot/grub/splash.xpm.gz b/buildroot/boot/grub/splash.xpm.gz deleted file mode 100644 index 6b30d3de0..000000000 Binary files a/buildroot/boot/grub/splash.xpm.gz and /dev/null differ diff --git a/buildroot/boot/grub2/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch b/buildroot/boot/grub2/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch new file mode 100644 index 000000000..357c825f3 --- /dev/null +++ b/buildroot/boot/grub2/0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch @@ -0,0 +1,313 @@ +From 6643507ce30f775008e093580f0c9499dfb2c485 Mon Sep 17 00:00:00 2001 +From: Simon Hardy +Date: Tue, 24 Mar 2020 13:29:12 +0000 +Subject: build: Fix GRUB i386-pc build with Ubuntu gcc + +With recent versions of gcc on Ubuntu a very large lzma_decompress.img file is +output. (e.g. 134479600 bytes instead of 2864.) This causes grub-mkimage to +fail with: "error: Decompressor is too big." + +This seems to be caused by a section .note.gnu.property that is placed at an +offset such that objcopy needs to pad the img file with zeros. + +This issue is present on: +Ubuntu 19.10 with gcc (Ubuntu 8.3.0-26ubuntu1~19.10) 8.3.0 +Ubuntu 19.10 with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 + +This issue is not present on: +Ubuntu 19.10 with gcc (Ubuntu 7.5.0-3ubuntu1~19.10) 7.5.0 +RHEL 8.0 with gcc 8.3.1 20190507 (Red Hat 8.3.1-4) + +The issue can be fixed by removing the section using objcopy as shown in +this patch. + +Signed-off-by: Simon Hardy +Reviewed-by: Daniel Kiper +[Retrieved (and updated to directly patch Makefile.in instead of +gentpl.py to avoid adding a dependency on python) from: +http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485] +Signed-off-by: Fabrice Fontaine +[yann.morin.1998@free.fr: + - keep the part patching gentpl.py + - restore it as a git-formatted patch + - introduce the hunk about the generated .am file +] +Signed-off-by: Yann E. MORIN +--- + gentpl.py | 2 1 1 0 +- + grub-core/Makefile.in | 38 19 19 0 +++++++++++++++++++------------------- + 2 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/gentpl.py b/gentpl.py +index 387588c05..c86550d4f 100644 +--- a/gentpl.py ++++ b/gentpl.py +@@ -766,7 +766,7 @@ def image(defn, platform): + if test x$(TARGET_APPLE_LINKER) = x1; then \ + $(MACHO2IMG) $< $@; \ + else \ +- $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \ ++ $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; \ + fi + """) + +diff --git a/grub-core/Makefile.core.am b/grub-core/Makefile.core.am +index 387588c05..c86550d4f 100644 +--- a/grub-core/Makefile.core.am ++++ 2/grub-core/Makefile.core.am +@@ -22897,7 +22897,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22918,7 +22918,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22939,7 +22939,7 @@ + CLEANFILES += boot.img + + boot.img: boot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22960,7 +22960,7 @@ + CLEANFILES += boot_hybrid.img + + boot_hybrid.img: boot_hybrid.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -22981,7 +22981,7 @@ + CLEANFILES += cdboot.img + + cdboot.img: cdboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23002,7 +23002,7 @@ + CLEANFILES += cdboot.img + + cdboot.img: cdboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23023,7 +23023,7 @@ + CLEANFILES += pxeboot.img + + pxeboot.img: pxeboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23044,7 +23044,7 @@ + CLEANFILES += diskboot.img + + diskboot.img: diskboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23065,7 +23065,7 @@ + CLEANFILES += diskboot.img + + diskboot.img: diskboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23086,7 +23086,7 @@ + CLEANFILES += lnxboot.img + + lnxboot.img: lnxboot.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23107,7 +23107,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23128,7 +23128,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23149,7 +23149,7 @@ + CLEANFILES += xz_decompress.img + + xz_decompress.img: xz_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23170,7 +23170,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23191,7 +23191,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23212,7 +23212,7 @@ + CLEANFILES += none_decompress.img + + none_decompress.img: none_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23233,7 +23233,7 @@ + CLEANFILES += lzma_decompress.img + + lzma_decompress.img: lzma_decompress.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23254,7 +23254,7 @@ + CLEANFILES += fwstart.img + + fwstart.img: fwstart.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +@@ -23275,7 +23275,7 @@ + CLEANFILES += fwstart_fuloong2f.img + + fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) +- if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + endif + +diff --git a/grub-core/Makefile.in b/grub-core/Makefile.in +index 387588c05..c86550d4f 100644 +--- a/grub-core/Makefile.in ++++ b/grub-core/Makefile.in +@@ -46531,61 +46531,61 @@ + @COND_riscv64_efi_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(TARGET_STRIP) -S -x $(kernel_exec) -o $@.bin $<; $(TARGET_OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd $@.bin $@; rm -f $@.bin; elif test ! -z '$(TARGET_OBJ2ELF)'; then $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@.bin $< && $(TARGET_OBJ2ELF) $@.bin $@ || (rm -f $@; rm -f $@.bin; exit 1); rm -f $@.bin; else $(TARGET_STRIP) $(kernel_exec_STRIPFLAGS) -o $@ $<; fi + + @COND_i386_pc_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_qemu_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_qemu_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@boot.img: boot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@boot_hybrid.img: boot_hybrid.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(boot_hybrid_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@cdboot.img: cdboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@cdboot.img: cdboot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(cdboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@pxeboot.img: pxeboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(pxeboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@diskboot.img: diskboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_sparc64_ieee1275_TRUE@diskboot.img: diskboot.image$(EXEEXT) +-@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_sparc64_ieee1275_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(diskboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@lnxboot.img: lnxboot.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lnxboot_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_arc_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_qemu_mips_TRUE@xz_decompress.img: xz_decompress.image$(EXEEXT) +-@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(xz_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_arc_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_arc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_qemu_mips_TRUE@none_decompress.img: none_decompress.image$(EXEEXT) +-@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_qemu_mips_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(none_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_i386_pc_TRUE@lzma_decompress.img: lzma_decompress.image$(EXEEXT) +-@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_i386_pc_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(lzma_decompress_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@fwstart.img: fwstart.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_mips_loongson_TRUE@fwstart_fuloong2f.img: fwstart_fuloong2f.image$(EXEEXT) +-@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; fi ++@COND_mips_loongson_TRUE@ if test x$(TARGET_APPLE_LINKER) = x1; then $(MACHO2IMG) $< $@; else $(TARGET_OBJCOPY) $(fwstart_fuloong2f_image_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; fi + + @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@grub-emu.1: grub-emu + @COND_MAN_PAGES_TRUE@@COND_emu_TRUE@ chmod a+x grub-emu diff --git a/buildroot/boot/grub2/0002-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch b/buildroot/boot/grub2/0002-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch new file mode 100644 index 000000000..001dda820 --- /dev/null +++ b/buildroot/boot/grub2/0002-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch @@ -0,0 +1,73 @@ +From a7ab0cc98fa89a3d5098c29cbe44bcd24b0a6454 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 15 Apr 2020 15:45:02 -0400 +Subject: [PATCH] yylex: Make lexer fatal errors actually be fatal +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When presented with a command that can't be tokenized to anything +smaller than YYLMAX characters, the parser calls YY_FATAL_ERROR(errmsg), +expecting that will stop further processing, as such: + + #define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + if ( yyleng >= YYLMAX ) \ + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ + yy_flex_strncpy( yytext, yyg->yytext_ptr, yyleng + 1 , yyscanner); \ + yyg->yy_c_buf_p = yy_cp; + +The code flex generates expects that YY_FATAL_ERROR() will either return +for it or do some form of longjmp(), or handle the error in some way at +least, and so the strncpy() call isn't in an "else" clause, and thus if +YY_FATAL_ERROR() is *not* actually fatal, it does the call with the +questionable limit, and predictable results ensue. + +Unfortunately, our implementation of YY_FATAL_ERROR() is: + + #define YY_FATAL_ERROR(msg) \ + do { \ + grub_printf (_("fatal error: %s\n"), _(msg)); \ + } while (0) + +The same pattern exists in yyless(), and similar problems exist in users +of YY_INPUT(), several places in the main parsing loop, +yy_get_next_buffer(), yy_load_buffer_state(), yyensure_buffer_stack, +yy_scan_buffer(), etc. + +All of these callers expect YY_FATAL_ERROR() to actually be fatal, and +the things they do if it returns after calling it are wildly unsafe. + +Fixes: CVE-2020-10713 + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/script/yylex.l | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l +index 7b44c37b7..b7203c823 100644 +--- a/grub-core/script/yylex.l ++++ b/grub-core/script/yylex.l +@@ -37,11 +37,11 @@ + + /* + * As we don't have access to yyscanner, we cannot do much except to +- * print the fatal error. ++ * print the fatal error and exit. + */ + #define YY_FATAL_ERROR(msg) \ + do { \ +- grub_printf (_("fatal error: %s\n"), _(msg)); \ ++ grub_fatal (_("fatal error: %s\n"), _(msg));\ + } while (0) + + #define COPY(str, hint) \ +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0003-safemath-Add-some-arithmetic-primitives-that-check-f.patch b/buildroot/boot/grub2/0003-safemath-Add-some-arithmetic-primitives-that-check-f.patch new file mode 100644 index 000000000..5c5211346 --- /dev/null +++ b/buildroot/boot/grub2/0003-safemath-Add-some-arithmetic-primitives-that-check-f.patch @@ -0,0 +1,128 @@ +From 782a4580a5e347793443aa8e9152db1bf4a0fff8 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 15 Jun 2020 10:58:42 -0400 +Subject: [PATCH] safemath: Add some arithmetic primitives that check for + overflow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This adds a new header, include/grub/safemath.h, that includes easy to +use wrappers for __builtin_{add,sub,mul}_overflow() declared like: + + bool OP(a, b, res) + +where OP is grub_add, grub_sub or grub_mul. OP() returns true in the +case where the operation would overflow and res is not modified. +Otherwise, false is returned and the operation is executed. + +These arithmetic primitives require newer compiler versions. So, bump +these requirements in the INSTALL file too. + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + INSTALL | 22 ++-------------------- + include/grub/compiler.h | 8 ++++++++ + include/grub/safemath.h | 37 +++++++++++++++++++++++++++++++++++++ + 3 files changed, 47 insertions(+), 20 deletions(-) + create mode 100644 include/grub/safemath.h + +diff --git a/INSTALL b/INSTALL +index 8acb40902..dcb9b7d7b 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -11,27 +11,9 @@ GRUB depends on some software packages installed into your system. If + you don't have any of them, please obtain and install them before + configuring the GRUB. + +-* GCC 4.1.3 or later +- Note: older versions may work but support is limited +- +- Experimental support for clang 3.3 or later (results in much bigger binaries) ++* GCC 5.1.0 or later ++ Experimental support for clang 3.8.0 or later (results in much bigger binaries) + for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64 +- Note: clang 3.2 or later works for i386 and x86_64 targets but results in +- much bigger binaries. +- earlier versions not tested +- Note: clang 3.2 or later works for arm +- earlier versions not tested +- Note: clang on arm64 is not supported due to +- https://llvm.org/bugs/show_bug.cgi?id=26030 +- Note: clang 3.3 or later works for mips(el) +- earlier versions fail to generate .reginfo and hence gprel relocations +- fail. +- Note: clang 3.2 or later works for powerpc +- earlier versions not tested +- Note: clang 3.5 or later works for sparc64 +- earlier versions return "error: unable to interface with target machine" +- Note: clang has no support for ia64 and hence you can't compile GRUB +- for ia64 with clang + * GNU Make + * GNU Bison 2.3 or later + * GNU gettext 0.17 or later +diff --git a/include/grub/compiler.h b/include/grub/compiler.h +index c9e1d7a73..8f3be3ae7 100644 +--- a/include/grub/compiler.h ++++ b/include/grub/compiler.h +@@ -48,4 +48,12 @@ + # define WARN_UNUSED_RESULT + #endif + ++#if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__) ++# define CLANG_PREREQ(maj,min) \ ++ ((__clang_major__ > (maj)) || \ ++ (__clang_major__ == (maj) && __clang_minor__ >= (min))) ++#else ++# define CLANG_PREREQ(maj,min) 0 ++#endif ++ + #endif /* ! GRUB_COMPILER_HEADER */ +diff --git a/include/grub/safemath.h b/include/grub/safemath.h +new file mode 100644 +index 000000000..c17b89bba +--- /dev/null ++++ b/include/grub/safemath.h +@@ -0,0 +1,37 @@ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2020 Free Software Foundation, Inc. ++ * ++ * GRUB is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * GRUB is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with GRUB. If not, see . ++ * ++ * Arithmetic operations that protect against overflow. ++ */ ++ ++#ifndef GRUB_SAFEMATH_H ++#define GRUB_SAFEMATH_H 1 ++ ++#include ++ ++/* These appear in gcc 5.1 and clang 3.8. */ ++#if GNUC_PREREQ(5, 1) || CLANG_PREREQ(3, 8) ++ ++#define grub_add(a, b, res) __builtin_add_overflow(a, b, res) ++#define grub_sub(a, b, res) __builtin_sub_overflow(a, b, res) ++#define grub_mul(a, b, res) __builtin_mul_overflow(a, b, res) ++ ++#else ++#error gcc 5.1 or newer or clang 3.8 or newer is required ++#endif ++ ++#endif /* GRUB_SAFEMATH_H */ +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0004-calloc-Make-sure-we-always-have-an-overflow-checking.patch b/buildroot/boot/grub2/0004-calloc-Make-sure-we-always-have-an-overflow-checking.patch new file mode 100644 index 000000000..a2e19f0ea --- /dev/null +++ b/buildroot/boot/grub2/0004-calloc-Make-sure-we-always-have-an-overflow-checking.patch @@ -0,0 +1,246 @@ +From 5775eb40862b67468ced816e6d7560dbe22a3670 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 15 Jun 2020 12:15:29 -0400 +Subject: [PATCH] calloc: Make sure we always have an overflow-checking + calloc() available +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This tries to make sure that everywhere in this source tree, we always have +an appropriate version of calloc() (i.e. grub_calloc(), xcalloc(), etc.) +available, and that they all safely check for overflow and return NULL when +it would occur. + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/kern/emu/misc.c | 12 +++++++++ + grub-core/kern/emu/mm.c | 10 ++++++++ + grub-core/kern/mm.c | 40 ++++++++++++++++++++++++++++++ + grub-core/lib/libgcrypt_wrap/mem.c | 11 ++++++-- + grub-core/lib/posix_wrap/stdlib.h | 8 +++++- + include/grub/emu/misc.h | 1 + + include/grub/mm.h | 6 +++++ + 7 files changed, 85 insertions(+), 3 deletions(-) + +diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c +index 65db79baa..dfd8a8ec4 100644 +--- a/grub-core/kern/emu/misc.c ++++ b/grub-core/kern/emu/misc.c +@@ -85,6 +85,18 @@ grub_util_error (const char *fmt, ...) + exit (1); + } + ++void * ++xcalloc (grub_size_t nmemb, grub_size_t size) ++{ ++ void *p; ++ ++ p = calloc (nmemb, size); ++ if (!p) ++ grub_util_error ("%s", _("out of memory")); ++ ++ return p; ++} ++ + void * + xmalloc (grub_size_t size) + { +diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c +index f262e95e3..145b01d37 100644 +--- a/grub-core/kern/emu/mm.c ++++ b/grub-core/kern/emu/mm.c +@@ -25,6 +25,16 @@ + #include + #include + ++void * ++grub_calloc (grub_size_t nmemb, grub_size_t size) ++{ ++ void *ret; ++ ret = calloc (nmemb, size); ++ if (!ret) ++ grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); ++ return ret; ++} ++ + void * + grub_malloc (grub_size_t size) + { +diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c +index ee88ff611..f2822a836 100644 +--- a/grub-core/kern/mm.c ++++ b/grub-core/kern/mm.c +@@ -67,8 +67,10 @@ + #include + #include + #include ++#include + + #ifdef MM_DEBUG ++# undef grub_calloc + # undef grub_malloc + # undef grub_zalloc + # undef grub_realloc +@@ -375,6 +377,30 @@ grub_memalign (grub_size_t align, grub_size_t size) + return 0; + } + ++/* ++ * Allocate NMEMB instances of SIZE bytes and return the pointer, or error on ++ * integer overflow. ++ */ ++void * ++grub_calloc (grub_size_t nmemb, grub_size_t size) ++{ ++ void *ret; ++ grub_size_t sz = 0; ++ ++ if (grub_mul (nmemb, size, &sz)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ return NULL; ++ } ++ ++ ret = grub_memalign (0, sz); ++ if (!ret) ++ return NULL; ++ ++ grub_memset (ret, 0, sz); ++ return ret; ++} ++ + /* Allocate SIZE bytes and return the pointer. */ + void * + grub_malloc (grub_size_t size) +@@ -561,6 +587,20 @@ grub_mm_dump (unsigned lineno) + grub_printf ("\n"); + } + ++void * ++grub_debug_calloc (const char *file, int line, grub_size_t nmemb, grub_size_t size) ++{ ++ void *ptr; ++ ++ if (grub_mm_debug) ++ grub_printf ("%s:%d: calloc (0x%" PRIxGRUB_SIZE ", 0x%" PRIxGRUB_SIZE ") = ", ++ file, line, size); ++ ptr = grub_calloc (nmemb, size); ++ if (grub_mm_debug) ++ grub_printf ("%p\n", ptr); ++ return ptr; ++} ++ + void * + grub_debug_malloc (const char *file, int line, grub_size_t size) + { +diff --git a/grub-core/lib/libgcrypt_wrap/mem.c b/grub-core/lib/libgcrypt_wrap/mem.c +index beeb661a3..74c6eafe5 100644 +--- a/grub-core/lib/libgcrypt_wrap/mem.c ++++ b/grub-core/lib/libgcrypt_wrap/mem.c +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -36,7 +37,10 @@ void * + gcry_xcalloc (size_t n, size_t m) + { + void *ret; +- ret = grub_zalloc (n * m); ++ size_t sz; ++ if (grub_mul (n, m, &sz)) ++ grub_fatal ("gcry_xcalloc would overflow"); ++ ret = grub_zalloc (sz); + if (!ret) + grub_fatal ("gcry_xcalloc failed"); + return ret; +@@ -56,7 +60,10 @@ void * + gcry_xcalloc_secure (size_t n, size_t m) + { + void *ret; +- ret = grub_zalloc (n * m); ++ size_t sz; ++ if (grub_mul (n, m, &sz)) ++ grub_fatal ("gcry_xcalloc would overflow"); ++ ret = grub_zalloc (sz); + if (!ret) + grub_fatal ("gcry_xcalloc failed"); + return ret; +diff --git a/grub-core/lib/posix_wrap/stdlib.h b/grub-core/lib/posix_wrap/stdlib.h +index 3b46f47ff..7a8d385e9 100644 +--- a/grub-core/lib/posix_wrap/stdlib.h ++++ b/grub-core/lib/posix_wrap/stdlib.h +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + static inline void + free (void *ptr) +@@ -37,7 +38,12 @@ malloc (grub_size_t size) + static inline void * + calloc (grub_size_t size, grub_size_t nelem) + { +- return grub_zalloc (size * nelem); ++ grub_size_t sz; ++ ++ if (grub_mul (size, nelem, &sz)) ++ return NULL; ++ ++ return grub_zalloc (sz); + } + + static inline void * +diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h +index ce464cfd0..ff9c48a64 100644 +--- a/include/grub/emu/misc.h ++++ b/include/grub/emu/misc.h +@@ -47,6 +47,7 @@ grub_util_device_is_mapped (const char *dev); + #define GRUB_HOST_PRIuLONG_LONG "llu" + #define GRUB_HOST_PRIxLONG_LONG "llx" + ++void * EXPORT_FUNC(xcalloc) (grub_size_t nmemb, grub_size_t size) WARN_UNUSED_RESULT; + void * EXPORT_FUNC(xmalloc) (grub_size_t size) WARN_UNUSED_RESULT; + void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) WARN_UNUSED_RESULT; + char * EXPORT_FUNC(xstrdup) (const char *str) WARN_UNUSED_RESULT; +diff --git a/include/grub/mm.h b/include/grub/mm.h +index 28e2e53eb..9c38dd3ca 100644 +--- a/include/grub/mm.h ++++ b/include/grub/mm.h +@@ -29,6 +29,7 @@ + #endif + + void grub_mm_init_region (void *addr, grub_size_t size); ++void *EXPORT_FUNC(grub_calloc) (grub_size_t nmemb, grub_size_t size); + void *EXPORT_FUNC(grub_malloc) (grub_size_t size); + void *EXPORT_FUNC(grub_zalloc) (grub_size_t size); + void EXPORT_FUNC(grub_free) (void *ptr); +@@ -48,6 +49,9 @@ extern int EXPORT_VAR(grub_mm_debug); + void grub_mm_dump_free (void); + void grub_mm_dump (unsigned lineno); + ++#define grub_calloc(nmemb, size) \ ++ grub_debug_calloc (GRUB_FILE, __LINE__, nmemb, size) ++ + #define grub_malloc(size) \ + grub_debug_malloc (GRUB_FILE, __LINE__, size) + +@@ -63,6 +67,8 @@ void grub_mm_dump (unsigned lineno); + #define grub_free(ptr) \ + grub_debug_free (GRUB_FILE, __LINE__, ptr) + ++void *EXPORT_FUNC(grub_debug_calloc) (const char *file, int line, ++ grub_size_t nmemb, grub_size_t size); + void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line, + grub_size_t size); + void *EXPORT_FUNC(grub_debug_zalloc) (const char *file, int line, +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0005-calloc-Use-calloc-at-most-places.patch b/buildroot/boot/grub2/0005-calloc-Use-calloc-at-most-places.patch new file mode 100644 index 000000000..096c2dfc4 --- /dev/null +++ b/buildroot/boot/grub2/0005-calloc-Use-calloc-at-most-places.patch @@ -0,0 +1,1840 @@ +From 8185711241d73931269f402bb6799f7e2c58f04b Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 15 Jun 2020 12:26:01 -0400 +Subject: [PATCH] calloc: Use calloc() at most places +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This modifies most of the places we do some form of: + + X = malloc(Y * Z); + +to use calloc(Y, Z) instead. + +Among other issues, this fixes: + - allocation of integer overflow in grub_png_decode_image_header() + reported by Chris Coulson, + - allocation of integer overflow in luks_recover_key() + reported by Chris Coulson, + - allocation of integer overflow in grub_lvm_detect() + reported by Chris Coulson. + +Fixes: CVE-2020-14308 + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/bus/usb/usbhub.c | 8 ++++---- + grub-core/commands/efi/lsefisystab.c | 3 ++- + grub-core/commands/legacycfg.c | 6 +++--- + grub-core/commands/menuentry.c | 2 +- + grub-core/commands/nativedisk.c | 2 +- + grub-core/commands/parttool.c | 12 +++++++++--- + grub-core/commands/regexp.c | 2 +- + grub-core/commands/search_wrap.c | 2 +- + grub-core/disk/diskfilter.c | 4 ++-- + grub-core/disk/ieee1275/ofdisk.c | 2 +- + grub-core/disk/ldm.c | 14 +++++++------- + grub-core/disk/luks.c | 2 +- + grub-core/disk/lvm.c | 8 ++++---- + grub-core/disk/xen/xendisk.c | 2 +- + grub-core/efiemu/loadcore.c | 2 +- + grub-core/efiemu/mm.c | 6 +++--- + grub-core/font/font.c | 3 +-- + grub-core/fs/affs.c | 6 +++--- + grub-core/fs/btrfs.c | 6 +++--- + grub-core/fs/hfs.c | 2 +- + grub-core/fs/hfsplus.c | 6 +++--- + grub-core/fs/iso9660.c | 2 +- + grub-core/fs/ntfs.c | 4 ++-- + grub-core/fs/sfs.c | 2 +- + grub-core/fs/tar.c | 2 +- + grub-core/fs/udf.c | 4 ++-- + grub-core/fs/zfs/zfs.c | 4 ++-- + grub-core/gfxmenu/gui_string_util.c | 2 +- + grub-core/gfxmenu/widget-box.c | 4 ++-- + grub-core/io/gzio.c | 2 +- + grub-core/kern/efi/efi.c | 6 +++--- + grub-core/kern/emu/hostdisk.c | 2 +- + grub-core/kern/fs.c | 2 +- + grub-core/kern/misc.c | 2 +- + grub-core/kern/parser.c | 2 +- + grub-core/kern/uboot/uboot.c | 2 +- + grub-core/lib/libgcrypt/cipher/ac.c | 8 ++++---- + grub-core/lib/libgcrypt/cipher/primegen.c | 4 ++-- + grub-core/lib/libgcrypt/cipher/pubkey.c | 4 ++-- + grub-core/lib/priority_queue.c | 2 +- + grub-core/lib/reed_solomon.c | 7 +++---- + grub-core/lib/relocator.c | 10 +++++----- + grub-core/lib/zstd/fse_decompress.c | 2 +- + grub-core/loader/arm/linux.c | 2 +- + grub-core/loader/efi/chainloader.c | 2 +- + grub-core/loader/i386/bsdXX.c | 2 +- + grub-core/loader/i386/xnu.c | 4 ++-- + grub-core/loader/macho.c | 2 +- + grub-core/loader/multiboot_elfxx.c | 2 +- + grub-core/loader/xnu.c | 2 +- + grub-core/mmap/mmap.c | 4 ++-- + grub-core/net/bootp.c | 2 +- + grub-core/net/dns.c | 10 +++++----- + grub-core/net/net.c | 4 ++-- + grub-core/normal/charset.c | 10 +++++----- + grub-core/normal/cmdline.c | 14 +++++++------- + grub-core/normal/menu_entry.c | 14 +++++++------- + grub-core/normal/menu_text.c | 4 ++-- + grub-core/normal/term.c | 4 ++-- + grub-core/osdep/linux/getroot.c | 6 +++--- + grub-core/osdep/unix/config.c | 2 +- + grub-core/osdep/windows/getroot.c | 2 +- + grub-core/osdep/windows/hostdisk.c | 4 ++-- + grub-core/osdep/windows/init.c | 2 +- + grub-core/osdep/windows/platform.c | 4 ++-- + grub-core/osdep/windows/relpath.c | 2 +- + grub-core/partmap/gpt.c | 2 +- + grub-core/partmap/msdos.c | 2 +- + grub-core/script/execute.c | 2 +- + grub-core/tests/fake_input.c | 2 +- + grub-core/tests/video_checksum.c | 6 +++--- + grub-core/video/capture.c | 2 +- + grub-core/video/emu/sdl.c | 2 +- + grub-core/video/i386/pc/vga.c | 2 +- + grub-core/video/readers/png.c | 2 +- + include/grub/unicode.h | 4 ++-- + util/getroot.c | 2 +- + util/grub-file.c | 2 +- + util/grub-fstest.c | 4 ++-- + util/grub-install-common.c | 2 +- + util/grub-install.c | 4 ++-- + util/grub-mkimagexx.c | 6 ++---- + util/grub-mkrescue.c | 4 ++-- + util/grub-mkstandalone.c | 2 +- + util/grub-pe2elf.c | 12 +++++------- + util/grub-probe.c | 4 ++-- + 86 files changed, 176 insertions(+), 175 deletions(-) + +diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c +index 34a7ff1b5..a06cce302 100644 +--- a/grub-core/bus/usb/usbhub.c ++++ b/grub-core/bus/usb/usbhub.c +@@ -149,8 +149,8 @@ grub_usb_add_hub (grub_usb_device_t dev) + grub_usb_set_configuration (dev, 1); + + dev->nports = hubdesc.portcnt; +- dev->children = grub_zalloc (hubdesc.portcnt * sizeof (dev->children[0])); +- dev->ports = grub_zalloc (dev->nports * sizeof (dev->ports[0])); ++ dev->children = grub_calloc (hubdesc.portcnt, sizeof (dev->children[0])); ++ dev->ports = grub_calloc (dev->nports, sizeof (dev->ports[0])); + if (!dev->children || !dev->ports) + { + grub_free (dev->children); +@@ -268,8 +268,8 @@ grub_usb_controller_dev_register_iter (grub_usb_controller_t controller, void *d + + /* Query the number of ports the root Hub has. */ + hub->nports = controller->dev->hubports (controller); +- hub->devices = grub_zalloc (sizeof (hub->devices[0]) * hub->nports); +- hub->ports = grub_zalloc (sizeof (hub->ports[0]) * hub->nports); ++ hub->devices = grub_calloc (hub->nports, sizeof (hub->devices[0])); ++ hub->ports = grub_calloc (hub->nports, sizeof (hub->ports[0])); + if (!hub->devices || !hub->ports) + { + grub_free (hub->devices); +diff --git a/grub-core/commands/efi/lsefisystab.c b/grub-core/commands/efi/lsefisystab.c +index df1030221..cd81507f5 100644 +--- a/grub-core/commands/efi/lsefisystab.c ++++ b/grub-core/commands/efi/lsefisystab.c +@@ -71,7 +71,8 @@ grub_cmd_lsefisystab (struct grub_command *cmd __attribute__ ((unused)), + grub_printf ("Vendor: "); + + for (vendor_utf16 = st->firmware_vendor; *vendor_utf16; vendor_utf16++); +- vendor = grub_malloc (4 * (vendor_utf16 - st->firmware_vendor) + 1); ++ /* Allocate extra 3 bytes to simplify math. */ ++ vendor = grub_calloc (4, vendor_utf16 - st->firmware_vendor + 1); + if (!vendor) + return grub_errno; + *grub_utf16_to_utf8 ((grub_uint8_t *) vendor, st->firmware_vendor, +diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c +index db7a8f002..5e3ec0d5e 100644 +--- a/grub-core/commands/legacycfg.c ++++ b/grub-core/commands/legacycfg.c +@@ -314,7 +314,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)), + if (argc < 2) + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); + +- cutargs = grub_malloc (sizeof (cutargs[0]) * (argc - 1)); ++ cutargs = grub_calloc (argc - 1, sizeof (cutargs[0])); + if (!cutargs) + return grub_errno; + cutargc = argc - 1; +@@ -436,7 +436,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)), + { + char rbuf[3] = "-r"; + bsdargc = cutargc + 2; +- bsdargs = grub_malloc (sizeof (bsdargs[0]) * bsdargc); ++ bsdargs = grub_calloc (bsdargc, sizeof (bsdargs[0])); + if (!bsdargs) + { + err = grub_errno; +@@ -559,7 +559,7 @@ grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"), + "module"); + +- newargs = grub_malloc ((argc + 1) * sizeof (newargs[0])); ++ newargs = grub_calloc (argc + 1, sizeof (newargs[0])); + if (!newargs) + return grub_errno; + grub_memcpy (newargs + 1, args, argc * sizeof (newargs[0])); +diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c +index 2c5363da7..9164df744 100644 +--- a/grub-core/commands/menuentry.c ++++ b/grub-core/commands/menuentry.c +@@ -154,7 +154,7 @@ grub_normal_add_menu_entry (int argc, const char **args, + goto fail; + + /* Save argc, args to pass as parameters to block arg later. */ +- menu_args = grub_malloc (sizeof (char*) * (argc + 1)); ++ menu_args = grub_calloc (argc + 1, sizeof (char *)); + if (! menu_args) + goto fail; + +diff --git a/grub-core/commands/nativedisk.c b/grub-core/commands/nativedisk.c +index 699447d11..7c8f97f6a 100644 +--- a/grub-core/commands/nativedisk.c ++++ b/grub-core/commands/nativedisk.c +@@ -195,7 +195,7 @@ grub_cmd_nativedisk (grub_command_t cmd __attribute__ ((unused)), + else + path_prefix = prefix; + +- mods = grub_malloc (argc * sizeof (mods[0])); ++ mods = grub_calloc (argc, sizeof (mods[0])); + if (!mods) + return grub_errno; + +diff --git a/grub-core/commands/parttool.c b/grub-core/commands/parttool.c +index 22b46b187..051e31320 100644 +--- a/grub-core/commands/parttool.c ++++ b/grub-core/commands/parttool.c +@@ -59,7 +59,13 @@ grub_parttool_register(const char *part_name, + for (nargs = 0; args[nargs].name != 0; nargs++); + cur->nargs = nargs; + cur->args = (struct grub_parttool_argdesc *) +- grub_malloc ((nargs + 1) * sizeof (struct grub_parttool_argdesc)); ++ grub_calloc (nargs + 1, sizeof (struct grub_parttool_argdesc)); ++ if (!cur->args) ++ { ++ grub_free (cur); ++ curhandle--; ++ return -1; ++ } + grub_memcpy (cur->args, args, + (nargs + 1) * sizeof (struct grub_parttool_argdesc)); + +@@ -257,7 +263,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)), + return err; + } + +- parsed = (int *) grub_zalloc (argc * sizeof (int)); ++ parsed = (int *) grub_calloc (argc, sizeof (int)); + + for (i = 1; i < argc; i++) + if (! parsed[i]) +@@ -290,7 +296,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)), + } + ptool = cur; + pargs = (struct grub_parttool_args *) +- grub_zalloc (ptool->nargs * sizeof (struct grub_parttool_args)); ++ grub_calloc (ptool->nargs, sizeof (struct grub_parttool_args)); + for (j = i; j < argc; j++) + if (! parsed[j]) + { +diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c +index f00b184c8..4019164f3 100644 +--- a/grub-core/commands/regexp.c ++++ b/grub-core/commands/regexp.c +@@ -116,7 +116,7 @@ grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args) + if (ret) + goto fail; + +- matches = grub_zalloc (sizeof (*matches) * (regex.re_nsub + 1)); ++ matches = grub_calloc (regex.re_nsub + 1, sizeof (*matches)); + if (! matches) + goto fail; + +diff --git a/grub-core/commands/search_wrap.c b/grub-core/commands/search_wrap.c +index d7fd26b94..47fc8eb99 100644 +--- a/grub-core/commands/search_wrap.c ++++ b/grub-core/commands/search_wrap.c +@@ -122,7 +122,7 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args) + for (i = 0; state[SEARCH_HINT_BAREMETAL].args[i]; i++) + nhints++; + +- hints = grub_malloc (sizeof (hints[0]) * nhints); ++ hints = grub_calloc (nhints, sizeof (hints[0])); + if (!hints) + return grub_errno; + j = 0; +diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c +index c3b578acf..68ca9e0be 100644 +--- a/grub-core/disk/diskfilter.c ++++ b/grub-core/disk/diskfilter.c +@@ -1134,7 +1134,7 @@ grub_diskfilter_make_raid (grub_size_t uuidlen, char *uuid, int nmemb, + array->lvs->segments->node_count = nmemb; + array->lvs->segments->raid_member_size = disk_size; + array->lvs->segments->nodes +- = grub_zalloc (nmemb * sizeof (array->lvs->segments->nodes[0])); ++ = grub_calloc (nmemb, sizeof (array->lvs->segments->nodes[0])); + array->lvs->segments->stripe_size = stripe_size; + for (i = 0; i < nmemb; i++) + { +@@ -1226,7 +1226,7 @@ insert_array (grub_disk_t disk, const struct grub_diskfilter_pv_id *id, + grub_partition_t p; + for (p = disk->partition; p; p = p->parent) + s++; +- pv->partmaps = xmalloc (s * sizeof (pv->partmaps[0])); ++ pv->partmaps = xcalloc (s, sizeof (pv->partmaps[0])); + s = 0; + for (p = disk->partition; p; p = p->parent) + pv->partmaps[s++] = xstrdup (p->partmap->name); +diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c +index f73257e66..03674cb47 100644 +--- a/grub-core/disk/ieee1275/ofdisk.c ++++ b/grub-core/disk/ieee1275/ofdisk.c +@@ -297,7 +297,7 @@ dev_iterate (const struct grub_ieee1275_devalias *alias) + /* Power machines documentation specify 672 as maximum SAS disks in + one system. Using a slightly larger value to be safe. */ + table_size = 768; +- table = grub_malloc (table_size * sizeof (grub_uint64_t)); ++ table = grub_calloc (table_size, sizeof (grub_uint64_t)); + + if (!table) + { +diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c +index 2a22d2d6c..e6323701a 100644 +--- a/grub-core/disk/ldm.c ++++ b/grub-core/disk/ldm.c +@@ -323,8 +323,8 @@ make_vg (grub_disk_t disk, + lv->segments->type = GRUB_DISKFILTER_MIRROR; + lv->segments->node_count = 0; + lv->segments->node_alloc = 8; +- lv->segments->nodes = grub_zalloc (sizeof (*lv->segments->nodes) +- * lv->segments->node_alloc); ++ lv->segments->nodes = grub_calloc (lv->segments->node_alloc, ++ sizeof (*lv->segments->nodes)); + if (!lv->segments->nodes) + goto fail2; + ptr = vblk[i].dynamic; +@@ -543,8 +543,8 @@ make_vg (grub_disk_t disk, + { + comp->segment_alloc = 8; + comp->segment_count = 0; +- comp->segments = grub_malloc (sizeof (*comp->segments) +- * comp->segment_alloc); ++ comp->segments = grub_calloc (comp->segment_alloc, ++ sizeof (*comp->segments)); + if (!comp->segments) + goto fail2; + } +@@ -590,8 +590,8 @@ make_vg (grub_disk_t disk, + } + comp->segments->node_count = read_int (ptr + 1, *ptr); + comp->segments->node_alloc = comp->segments->node_count; +- comp->segments->nodes = grub_zalloc (sizeof (*comp->segments->nodes) +- * comp->segments->node_alloc); ++ comp->segments->nodes = grub_calloc (comp->segments->node_alloc, ++ sizeof (*comp->segments->nodes)); + if (!lv->segments->nodes) + goto fail2; + } +@@ -1017,7 +1017,7 @@ grub_util_ldm_embed (struct grub_disk *disk, unsigned int *nsectors, + *nsectors = lv->size; + if (*nsectors > max_nsectors) + *nsectors = max_nsectors; +- *sectors = grub_malloc (*nsectors * sizeof (**sectors)); ++ *sectors = grub_calloc (*nsectors, sizeof (**sectors)); + if (!*sectors) + return grub_errno; + for (i = 0; i < *nsectors; i++) +diff --git a/grub-core/disk/luks.c b/grub-core/disk/luks.c +index 86c50c612..18b3a8bb1 100644 +--- a/grub-core/disk/luks.c ++++ b/grub-core/disk/luks.c +@@ -336,7 +336,7 @@ luks_recover_key (grub_disk_t source, + && grub_be_to_cpu32 (header.keyblock[i].stripes) > max_stripes) + max_stripes = grub_be_to_cpu32 (header.keyblock[i].stripes); + +- split_key = grub_malloc (keysize * max_stripes); ++ split_key = grub_calloc (keysize, max_stripes); + if (!split_key) + return grub_errno; + +diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c +index 7b265c780..d1df640b3 100644 +--- a/grub-core/disk/lvm.c ++++ b/grub-core/disk/lvm.c +@@ -173,7 +173,7 @@ grub_lvm_detect (grub_disk_t disk, + first one. */ + + /* Allocate buffer space for the circular worst-case scenario. */ +- metadatabuf = grub_malloc (2 * mda_size); ++ metadatabuf = grub_calloc (2, mda_size); + if (! metadatabuf) + goto fail; + +@@ -426,7 +426,7 @@ grub_lvm_detect (grub_disk_t disk, + #endif + goto lvs_fail; + } +- lv->segments = grub_zalloc (sizeof (*seg) * lv->segment_count); ++ lv->segments = grub_calloc (lv->segment_count, sizeof (*seg)); + seg = lv->segments; + + for (i = 0; i < lv->segment_count; i++) +@@ -483,8 +483,8 @@ grub_lvm_detect (grub_disk_t disk, + if (seg->node_count != 1) + seg->stripe_size = grub_lvm_getvalue (&p, "stripe_size = "); + +- seg->nodes = grub_zalloc (sizeof (*stripe) +- * seg->node_count); ++ seg->nodes = grub_calloc (seg->node_count, ++ sizeof (*stripe)); + stripe = seg->nodes; + + p = grub_strstr (p, "stripes = ["); +diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c +index 48476cbbf..d6612eebd 100644 +--- a/grub-core/disk/xen/xendisk.c ++++ b/grub-core/disk/xen/xendisk.c +@@ -426,7 +426,7 @@ grub_xendisk_init (void) + if (!ctr) + return; + +- virtdisks = grub_malloc (ctr * sizeof (virtdisks[0])); ++ virtdisks = grub_calloc (ctr, sizeof (virtdisks[0])); + if (!virtdisks) + return; + if (grub_xenstore_dir ("device/vbd", fill, &ctr)) +diff --git a/grub-core/efiemu/loadcore.c b/grub-core/efiemu/loadcore.c +index 44085ef81..2b924623f 100644 +--- a/grub-core/efiemu/loadcore.c ++++ b/grub-core/efiemu/loadcore.c +@@ -201,7 +201,7 @@ grub_efiemu_count_symbols (const Elf_Ehdr *e) + + grub_efiemu_nelfsyms = (unsigned) s->sh_size / (unsigned) s->sh_entsize; + grub_efiemu_elfsyms = (struct grub_efiemu_elf_sym *) +- grub_malloc (sizeof (struct grub_efiemu_elf_sym) * grub_efiemu_nelfsyms); ++ grub_calloc (grub_efiemu_nelfsyms, sizeof (struct grub_efiemu_elf_sym)); + + /* Relocators */ + for (i = 0, s = (Elf_Shdr *) ((char *) e + e->e_shoff); +diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c +index 52a032f7b..9b8e0d0ad 100644 +--- a/grub-core/efiemu/mm.c ++++ b/grub-core/efiemu/mm.c +@@ -554,11 +554,11 @@ grub_efiemu_mmap_sort_and_uniq (void) + /* Initialize variables*/ + grub_memset (present, 0, sizeof (int) * GRUB_EFI_MAX_MEMORY_TYPE); + scanline_events = (struct grub_efiemu_mmap_scan *) +- grub_malloc (sizeof (struct grub_efiemu_mmap_scan) * 2 * mmap_num); ++ grub_calloc (mmap_num, sizeof (struct grub_efiemu_mmap_scan) * 2); + + /* Number of chunks can't increase more than by factor of 2 */ + result = (grub_efi_memory_descriptor_t *) +- grub_malloc (sizeof (grub_efi_memory_descriptor_t) * 2 * mmap_num); ++ grub_calloc (mmap_num, sizeof (grub_efi_memory_descriptor_t) * 2); + if (!result || !scanline_events) + { + grub_free (result); +@@ -660,7 +660,7 @@ grub_efiemu_mm_do_alloc (void) + + /* Preallocate mmap */ + efiemu_mmap = (grub_efi_memory_descriptor_t *) +- grub_malloc (mmap_reserved_size * sizeof (grub_efi_memory_descriptor_t)); ++ grub_calloc (mmap_reserved_size, sizeof (grub_efi_memory_descriptor_t)); + if (!efiemu_mmap) + { + grub_efiemu_unload (); +diff --git a/grub-core/font/font.c b/grub-core/font/font.c +index 85a292557..8e118b315 100644 +--- a/grub-core/font/font.c ++++ b/grub-core/font/font.c +@@ -293,8 +293,7 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct + font->num_chars = sect_length / FONT_CHAR_INDEX_ENTRY_SIZE; + + /* Allocate the character index array. */ +- font->char_index = grub_malloc (font->num_chars +- * sizeof (struct char_index_entry)); ++ font->char_index = grub_calloc (font->num_chars, sizeof (struct char_index_entry)); + if (!font->char_index) + return 1; + font->bmp_idx = grub_malloc (0x10000 * sizeof (grub_uint16_t)); +diff --git a/grub-core/fs/affs.c b/grub-core/fs/affs.c +index 6b6a2bc91..220b3712f 100644 +--- a/grub-core/fs/affs.c ++++ b/grub-core/fs/affs.c +@@ -301,7 +301,7 @@ grub_affs_read_symlink (grub_fshelp_node_t node) + return 0; + } + latin1[symlink_size] = 0; +- utf8 = grub_malloc (symlink_size * GRUB_MAX_UTF8_PER_LATIN1 + 1); ++ utf8 = grub_calloc (GRUB_MAX_UTF8_PER_LATIN1 + 1, symlink_size); + if (!utf8) + { + grub_free (latin1); +@@ -422,7 +422,7 @@ grub_affs_iterate_dir (grub_fshelp_node_t dir, + return 1; + } + +- hashtable = grub_zalloc (data->htsize * sizeof (*hashtable)); ++ hashtable = grub_calloc (data->htsize, sizeof (*hashtable)); + if (!hashtable) + return 1; + +@@ -628,7 +628,7 @@ grub_affs_label (grub_device_t device, char **label) + len = file.namelen; + if (len > sizeof (file.name)) + len = sizeof (file.name); +- *label = grub_malloc (len * GRUB_MAX_UTF8_PER_LATIN1 + 1); ++ *label = grub_calloc (GRUB_MAX_UTF8_PER_LATIN1 + 1, len); + if (*label) + *grub_latin1_to_utf8 ((grub_uint8_t *) *label, file.name, len) = '\0'; + } +diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +index 48bd3d04a..11272efc1 100644 +--- a/grub-core/fs/btrfs.c ++++ b/grub-core/fs/btrfs.c +@@ -413,7 +413,7 @@ lower_bound (struct grub_btrfs_data *data, + { + desc->allocated = 16; + desc->depth = 0; +- desc->data = grub_malloc (sizeof (desc->data[0]) * desc->allocated); ++ desc->data = grub_calloc (desc->allocated, sizeof (desc->data[0])); + if (!desc->data) + return grub_errno; + } +@@ -752,7 +752,7 @@ raid56_read_retry (struct grub_btrfs_data *data, + grub_err_t ret = GRUB_ERR_OUT_OF_MEMORY; + grub_uint64_t i, failed_devices; + +- buffers = grub_zalloc (sizeof(*buffers) * nstripes); ++ buffers = grub_calloc (nstripes, sizeof (*buffers)); + if (!buffers) + goto cleanup; + +@@ -2160,7 +2160,7 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)), + *nsectors = 64 * 2 - 1; + if (*nsectors > max_nsectors) + *nsectors = max_nsectors; +- *sectors = grub_malloc (*nsectors * sizeof (**sectors)); ++ *sectors = grub_calloc (*nsectors, sizeof (**sectors)); + if (!*sectors) + return grub_errno; + for (i = 0; i < *nsectors; i++) +diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c +index ac0a40990..3fe842b4d 100644 +--- a/grub-core/fs/hfs.c ++++ b/grub-core/fs/hfs.c +@@ -1360,7 +1360,7 @@ grub_hfs_label (grub_device_t device, char **label) + grub_size_t len = data->sblock.volname[0]; + if (len > sizeof (data->sblock.volname) - 1) + len = sizeof (data->sblock.volname) - 1; +- *label = grub_malloc (len * MAX_UTF8_PER_MAC_ROMAN + 1); ++ *label = grub_calloc (MAX_UTF8_PER_MAC_ROMAN + 1, len); + if (*label) + macroman_to_utf8 (*label, data->sblock.volname + 1, + len + 1, 0); +diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c +index 54786bb1c..dae43becc 100644 +--- a/grub-core/fs/hfsplus.c ++++ b/grub-core/fs/hfsplus.c +@@ -720,7 +720,7 @@ list_nodes (void *record, void *hook_arg) + if (! filename) + return 0; + +- keyname = grub_malloc (grub_be_to_cpu16 (catkey->namelen) * sizeof (*keyname)); ++ keyname = grub_calloc (grub_be_to_cpu16 (catkey->namelen), sizeof (*keyname)); + if (!keyname) + { + grub_free (filename); +@@ -1007,7 +1007,7 @@ grub_hfsplus_label (grub_device_t device, char **label) + grub_hfsplus_btree_recptr (&data->catalog_tree, node, ptr); + + label_len = grub_be_to_cpu16 (catkey->namelen); +- label_name = grub_malloc (label_len * sizeof (*label_name)); ++ label_name = grub_calloc (label_len, sizeof (*label_name)); + if (!label_name) + { + grub_free (node); +@@ -1029,7 +1029,7 @@ grub_hfsplus_label (grub_device_t device, char **label) + } + } + +- *label = grub_malloc (label_len * GRUB_MAX_UTF8_PER_UTF16 + 1); ++ *label = grub_calloc (label_len, GRUB_MAX_UTF8_PER_UTF16 + 1); + if (! *label) + { + grub_free (label_name); +diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c +index 49c0c632b..4f1b52a55 100644 +--- a/grub-core/fs/iso9660.c ++++ b/grub-core/fs/iso9660.c +@@ -331,7 +331,7 @@ grub_iso9660_convert_string (grub_uint8_t *us, int len) + int i; + grub_uint16_t t[MAX_NAMELEN / 2 + 1]; + +- p = grub_malloc (len * GRUB_MAX_UTF8_PER_UTF16 + 1); ++ p = grub_calloc (len, GRUB_MAX_UTF8_PER_UTF16 + 1); + if (! p) + return NULL; + +diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c +index fc4e1f678..2f34f76da 100644 +--- a/grub-core/fs/ntfs.c ++++ b/grub-core/fs/ntfs.c +@@ -556,8 +556,8 @@ get_utf8 (grub_uint8_t *in, grub_size_t len) + grub_uint16_t *tmp; + grub_size_t i; + +- buf = grub_malloc (len * GRUB_MAX_UTF8_PER_UTF16 + 1); +- tmp = grub_malloc (len * sizeof (tmp[0])); ++ buf = grub_calloc (len, GRUB_MAX_UTF8_PER_UTF16 + 1); ++ tmp = grub_calloc (len, sizeof (tmp[0])); + if (!buf || !tmp) + { + grub_free (buf); +diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c +index 50c1fe72f..90f7fb379 100644 +--- a/grub-core/fs/sfs.c ++++ b/grub-core/fs/sfs.c +@@ -266,7 +266,7 @@ grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) + node->next_extent = node->block; + node->cache_size = 0; + +- node->cache = grub_malloc (sizeof (node->cache[0]) * cache_size); ++ node->cache = grub_calloc (cache_size, sizeof (node->cache[0])); + if (!node->cache) + { + grub_errno = 0; +diff --git a/grub-core/fs/tar.c b/grub-core/fs/tar.c +index 7d63e0c99..c551ed6b5 100644 +--- a/grub-core/fs/tar.c ++++ b/grub-core/fs/tar.c +@@ -120,7 +120,7 @@ grub_cpio_find_file (struct grub_archelp_data *data, char **name, + if (data->linkname_alloc < linksize + 1) + { + char *n; +- n = grub_malloc (2 * (linksize + 1)); ++ n = grub_calloc (2, linksize + 1); + if (!n) + return grub_errno; + grub_free (data->linkname); +diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c +index dc8b6e2d1..a83761674 100644 +--- a/grub-core/fs/udf.c ++++ b/grub-core/fs/udf.c +@@ -873,7 +873,7 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) + { + unsigned i; + utf16len = sz - 1; +- utf16 = grub_malloc (utf16len * sizeof (utf16[0])); ++ utf16 = grub_calloc (utf16len, sizeof (utf16[0])); + if (!utf16) + return NULL; + for (i = 0; i < utf16len; i++) +@@ -883,7 +883,7 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) + { + unsigned i; + utf16len = (sz - 1) / 2; +- utf16 = grub_malloc (utf16len * sizeof (utf16[0])); ++ utf16 = grub_calloc (utf16len, sizeof (utf16[0])); + if (!utf16) + return NULL; + for (i = 0; i < utf16len; i++) +diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c +index 2f72e42bf..381dde556 100644 +--- a/grub-core/fs/zfs/zfs.c ++++ b/grub-core/fs/zfs/zfs.c +@@ -3325,7 +3325,7 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol, + } + subvol->nkeys = 0; + zap_iterate (&keychain_dn, 8, count_zap_keys, &ctx, data); +- subvol->keyring = grub_zalloc (subvol->nkeys * sizeof (subvol->keyring[0])); ++ subvol->keyring = grub_calloc (subvol->nkeys, sizeof (subvol->keyring[0])); + if (!subvol->keyring) + { + grub_free (fsname); +@@ -4336,7 +4336,7 @@ grub_zfs_embed (grub_device_t device __attribute__ ((unused)), + *nsectors = (VDEV_BOOT_SIZE >> GRUB_DISK_SECTOR_BITS); + if (*nsectors > max_nsectors) + *nsectors = max_nsectors; +- *sectors = grub_malloc (*nsectors * sizeof (**sectors)); ++ *sectors = grub_calloc (*nsectors, sizeof (**sectors)); + if (!*sectors) + return grub_errno; + for (i = 0; i < *nsectors; i++) +diff --git a/grub-core/gfxmenu/gui_string_util.c b/grub-core/gfxmenu/gui_string_util.c +index a9a415e31..ba1e1eab3 100644 +--- a/grub-core/gfxmenu/gui_string_util.c ++++ b/grub-core/gfxmenu/gui_string_util.c +@@ -55,7 +55,7 @@ canonicalize_path (const char *path) + if (*p == '/') + components++; + +- char **path_array = grub_malloc (components * sizeof (*path_array)); ++ char **path_array = grub_calloc (components, sizeof (*path_array)); + if (! path_array) + return 0; + +diff --git a/grub-core/gfxmenu/widget-box.c b/grub-core/gfxmenu/widget-box.c +index b60602889..470597ded 100644 +--- a/grub-core/gfxmenu/widget-box.c ++++ b/grub-core/gfxmenu/widget-box.c +@@ -303,10 +303,10 @@ grub_gfxmenu_create_box (const char *pixmaps_prefix, + box->content_height = 0; + box->raw_pixmaps = + (struct grub_video_bitmap **) +- grub_malloc (BOX_NUM_PIXMAPS * sizeof (struct grub_video_bitmap *)); ++ grub_calloc (BOX_NUM_PIXMAPS, sizeof (struct grub_video_bitmap *)); + box->scaled_pixmaps = + (struct grub_video_bitmap **) +- grub_malloc (BOX_NUM_PIXMAPS * sizeof (struct grub_video_bitmap *)); ++ grub_calloc (BOX_NUM_PIXMAPS, sizeof (struct grub_video_bitmap *)); + + /* Initialize all pixmap pointers to NULL so that proper destruction can + be performed if an error is encountered partway through construction. */ +diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c +index 6208a9763..43d98a7bd 100644 +--- a/grub-core/io/gzio.c ++++ b/grub-core/io/gzio.c +@@ -554,7 +554,7 @@ huft_build (unsigned *b, /* code lengths in bits (all assumed <= BMAX) */ + z = 1 << j; /* table entries for j-bit table */ + + /* allocate and link in new table */ +- q = (struct huft *) grub_zalloc ((z + 1) * sizeof (struct huft)); ++ q = (struct huft *) grub_calloc (z + 1, sizeof (struct huft)); + if (! q) + { + if (h) +diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c +index 6e1ceb905..dc31caa21 100644 +--- a/grub-core/kern/efi/efi.c ++++ b/grub-core/kern/efi/efi.c +@@ -202,7 +202,7 @@ grub_efi_set_variable(const char *var, const grub_efi_guid_t *guid, + + len = grub_strlen (var); + len16 = len * GRUB_MAX_UTF16_PER_UTF8; +- var16 = grub_malloc ((len16 + 1) * sizeof (var16[0])); ++ var16 = grub_calloc (len16 + 1, sizeof (var16[0])); + if (!var16) + return grub_errno; + len16 = grub_utf8_to_utf16 (var16, len16, (grub_uint8_t *) var, len, NULL); +@@ -237,7 +237,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, + + len = grub_strlen (var); + len16 = len * GRUB_MAX_UTF16_PER_UTF8; +- var16 = grub_malloc ((len16 + 1) * sizeof (var16[0])); ++ var16 = grub_calloc (len16 + 1, sizeof (var16[0])); + if (!var16) + return NULL; + len16 = grub_utf8_to_utf16 (var16, len16, (grub_uint8_t *) var, len, NULL); +@@ -383,7 +383,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) + while (len > 0 && fp->path_name[len - 1] == 0) + len--; + +- dup_name = grub_malloc (len * sizeof (*dup_name)); ++ dup_name = grub_calloc (len, sizeof (*dup_name)); + if (!dup_name) + { + grub_free (name); +diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c +index e9ec680cd..d975265b2 100644 +--- a/grub-core/kern/emu/hostdisk.c ++++ b/grub-core/kern/emu/hostdisk.c +@@ -615,7 +615,7 @@ static char * + grub_util_path_concat_real (size_t n, int ext, va_list ap) + { + size_t totlen = 0; +- char **l = xmalloc ((n + ext) * sizeof (l[0])); ++ char **l = xcalloc (n + ext, sizeof (l[0])); + char *r, *p, *pi; + size_t i; + int first = 1; +diff --git a/grub-core/kern/fs.c b/grub-core/kern/fs.c +index 2b85f4950..f90be6566 100644 +--- a/grub-core/kern/fs.c ++++ b/grub-core/kern/fs.c +@@ -151,7 +151,7 @@ grub_fs_blocklist_open (grub_file_t file, const char *name) + while (p); + + /* Allocate a block list. */ +- blocks = grub_zalloc (sizeof (struct grub_fs_block) * (num + 1)); ++ blocks = grub_calloc (num + 1, sizeof (struct grub_fs_block)); + if (! blocks) + return 0; + +diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c +index 3b633d51f..a7abd367a 100644 +--- a/grub-core/kern/misc.c ++++ b/grub-core/kern/misc.c +@@ -690,7 +690,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args, + args->ptr = args->prealloc; + else + { +- args->ptr = grub_malloc (args->count * sizeof (args->ptr[0])); ++ args->ptr = grub_calloc (args->count, sizeof (args->ptr[0])); + if (!args->ptr) + { + grub_errno = GRUB_ERR_NONE; +diff --git a/grub-core/kern/parser.c b/grub-core/kern/parser.c +index 78175aac2..619db3122 100644 +--- a/grub-core/kern/parser.c ++++ b/grub-core/kern/parser.c +@@ -213,7 +213,7 @@ grub_parser_split_cmdline (const char *cmdline, + return grub_errno; + grub_memcpy (args, buffer, bp - buffer); + +- *argv = grub_malloc (sizeof (char *) * (*argc + 1)); ++ *argv = grub_calloc (*argc + 1, sizeof (char *)); + if (!*argv) + { + grub_free (args); +diff --git a/grub-core/kern/uboot/uboot.c b/grub-core/kern/uboot/uboot.c +index be4816fe6..aac8f9ae1 100644 +--- a/grub-core/kern/uboot/uboot.c ++++ b/grub-core/kern/uboot/uboot.c +@@ -133,7 +133,7 @@ grub_uboot_dev_enum (void) + return num_devices; + + max_devices = 2; +- enum_devices = grub_malloc (sizeof(struct device_info) * max_devices); ++ enum_devices = grub_calloc (max_devices, sizeof(struct device_info)); + if (!enum_devices) + return 0; + +diff --git a/grub-core/lib/libgcrypt/cipher/ac.c b/grub-core/lib/libgcrypt/cipher/ac.c +index f5e946a2d..63f6fcd11 100644 +--- a/grub-core/lib/libgcrypt/cipher/ac.c ++++ b/grub-core/lib/libgcrypt/cipher/ac.c +@@ -185,7 +185,7 @@ ac_data_mpi_copy (gcry_ac_mpi_t *data_mpis, unsigned int data_mpis_n, + gcry_mpi_t mpi; + char *label; + +- data_mpis_new = gcry_malloc (sizeof (*data_mpis_new) * data_mpis_n); ++ data_mpis_new = gcry_calloc (data_mpis_n, sizeof (*data_mpis_new)); + if (! data_mpis_new) + { + err = gcry_error_from_errno (errno); +@@ -572,7 +572,7 @@ _gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, + } + + /* Add MPI list. */ +- arg_list = gcry_malloc (sizeof (*arg_list) * (data_n + 1)); ++ arg_list = gcry_calloc (data_n + 1, sizeof (*arg_list)); + if (! arg_list) + { + err = gcry_error_from_errno (errno); +@@ -1283,7 +1283,7 @@ ac_data_construct (const char *identifier, int include_flags, + /* We build a list of arguments to pass to + gcry_sexp_build_array(). */ + data_length = _gcry_ac_data_length (data); +- arg_list = gcry_malloc (sizeof (*arg_list) * (data_length * 2)); ++ arg_list = gcry_calloc (data_length, sizeof (*arg_list) * 2); + if (! arg_list) + { + err = gcry_error_from_errno (errno); +@@ -1593,7 +1593,7 @@ _gcry_ac_key_pair_generate (gcry_ac_handle_t handle, unsigned int nbits, + arg_list_n += 2; + + /* Allocate list. */ +- arg_list = gcry_malloc (sizeof (*arg_list) * arg_list_n); ++ arg_list = gcry_calloc (arg_list_n, sizeof (*arg_list)); + if (! arg_list) + { + err = gcry_error_from_errno (errno); +diff --git a/grub-core/lib/libgcrypt/cipher/primegen.c b/grub-core/lib/libgcrypt/cipher/primegen.c +index 2788e349f..b12e79b19 100644 +--- a/grub-core/lib/libgcrypt/cipher/primegen.c ++++ b/grub-core/lib/libgcrypt/cipher/primegen.c +@@ -383,7 +383,7 @@ prime_generate_internal (int need_q_factor, + } + + /* Allocate an array to track pool usage. */ +- pool_in_use = gcry_malloc (n * sizeof *pool_in_use); ++ pool_in_use = gcry_calloc (n, sizeof *pool_in_use); + if (!pool_in_use) + { + err = gpg_err_code_from_errno (errno); +@@ -765,7 +765,7 @@ gen_prime (unsigned int nbits, int secret, int randomlevel, + if (nbits < 16) + log_fatal ("can't generate a prime with less than %d bits\n", 16); + +- mods = gcry_xmalloc( no_of_small_prime_numbers * sizeof *mods ); ++ mods = gcry_xcalloc( no_of_small_prime_numbers, sizeof *mods); + /* Make nbits fit into gcry_mpi_t implementation. */ + val_2 = mpi_alloc_set_ui( 2 ); + val_3 = mpi_alloc_set_ui( 3); +diff --git a/grub-core/lib/libgcrypt/cipher/pubkey.c b/grub-core/lib/libgcrypt/cipher/pubkey.c +index 910982141..ca087ad75 100644 +--- a/grub-core/lib/libgcrypt/cipher/pubkey.c ++++ b/grub-core/lib/libgcrypt/cipher/pubkey.c +@@ -2941,7 +2941,7 @@ gcry_pk_encrypt (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t s_pkey) + * array to a format string, so we have to do it this way :-(. */ + /* FIXME: There is now such a format specifier, so we can + change the code to be more clear. */ +- arg_list = malloc (nelem * sizeof *arg_list); ++ arg_list = calloc (nelem, sizeof *arg_list); + if (!arg_list) + { + rc = gpg_err_code_from_syserror (); +@@ -3233,7 +3233,7 @@ gcry_pk_sign (gcry_sexp_t *r_sig, gcry_sexp_t s_hash, gcry_sexp_t s_skey) + } + strcpy (p, "))"); + +- arg_list = malloc (nelem * sizeof *arg_list); ++ arg_list = calloc (nelem, sizeof *arg_list); + if (!arg_list) + { + rc = gpg_err_code_from_syserror (); +diff --git a/grub-core/lib/priority_queue.c b/grub-core/lib/priority_queue.c +index 659be0b7f..7d5e7c05a 100644 +--- a/grub-core/lib/priority_queue.c ++++ b/grub-core/lib/priority_queue.c +@@ -92,7 +92,7 @@ grub_priority_queue_new (grub_size_t elsize, + { + struct grub_priority_queue *ret; + void *els; +- els = grub_malloc (elsize * 8); ++ els = grub_calloc (8, elsize); + if (!els) + return 0; + ret = (struct grub_priority_queue *) grub_malloc (sizeof (*ret)); +diff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c +index ee9fa7b4f..467305b46 100644 +--- a/grub-core/lib/reed_solomon.c ++++ b/grub-core/lib/reed_solomon.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#define xcalloc calloc + #define xmalloc malloc + #define grub_memset memset + #define grub_memcpy memcpy +@@ -158,11 +159,9 @@ rs_encode (gf_single_t *data, grub_size_t s, grub_size_t rs) + gf_single_t *rs_polynomial; + int i, j; + gf_single_t *m; +- m = xmalloc ((s + rs) * sizeof (gf_single_t)); ++ m = xcalloc (s + rs, sizeof (gf_single_t)); + grub_memcpy (m, data, s * sizeof (gf_single_t)); +- grub_memset (m + s, 0, rs * sizeof (gf_single_t)); +- rs_polynomial = xmalloc ((rs + 1) * sizeof (gf_single_t)); +- grub_memset (rs_polynomial, 0, (rs + 1) * sizeof (gf_single_t)); ++ rs_polynomial = xcalloc (rs + 1, sizeof (gf_single_t)); + rs_polynomial[rs] = 1; + /* Multiply with X - a^r */ + for (j = 0; j < rs; j++) +diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c +index ea3ebc719..5847aac36 100644 +--- a/grub-core/lib/relocator.c ++++ b/grub-core/lib/relocator.c +@@ -495,9 +495,9 @@ malloc_in_range (struct grub_relocator *rel, + } + #endif + +- eventt = grub_malloc (maxevents * sizeof (events[0])); ++ eventt = grub_calloc (maxevents, sizeof (events[0])); + counter = grub_malloc ((DIGITSORT_MASK + 2) * sizeof (counter[0])); +- events = grub_malloc (maxevents * sizeof (events[0])); ++ events = grub_calloc (maxevents, sizeof (events[0])); + if (!events || !eventt || !counter) + { + grub_dprintf ("relocator", "events or counter allocation failed %d\n", +@@ -963,7 +963,7 @@ malloc_in_range (struct grub_relocator *rel, + #endif + unsigned cural = 0; + int oom = 0; +- res->subchunks = grub_malloc (sizeof (res->subchunks[0]) * nallocs); ++ res->subchunks = grub_calloc (nallocs, sizeof (res->subchunks[0])); + if (!res->subchunks) + oom = 1; + res->nsubchunks = nallocs; +@@ -1562,8 +1562,8 @@ grub_relocator_prepare_relocs (struct grub_relocator *rel, grub_addr_t addr, + count[(chunk->src & 0xff) + 1]++; + } + } +- from = grub_malloc (nchunks * sizeof (sorted[0])); +- to = grub_malloc (nchunks * sizeof (sorted[0])); ++ from = grub_calloc (nchunks, sizeof (sorted[0])); ++ to = grub_calloc (nchunks, sizeof (sorted[0])); + if (!from || !to) + { + grub_free (from); +diff --git a/grub-core/lib/zstd/fse_decompress.c b/grub-core/lib/zstd/fse_decompress.c +index 72bbead5b..2227b84bc 100644 +--- a/grub-core/lib/zstd/fse_decompress.c ++++ b/grub-core/lib/zstd/fse_decompress.c +@@ -82,7 +82,7 @@ + FSE_DTable* FSE_createDTable (unsigned tableLog) + { + if (tableLog > FSE_TABLELOG_ABSOLUTE_MAX) tableLog = FSE_TABLELOG_ABSOLUTE_MAX; +- return (FSE_DTable*)malloc( FSE_DTABLE_SIZE_U32(tableLog) * sizeof (U32) ); ++ return (FSE_DTable*)calloc( FSE_DTABLE_SIZE_U32(tableLog), sizeof (U32) ); + } + + void FSE_freeDTable (FSE_DTable* dt) +diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c +index 51684914c..d70c17486 100644 +--- a/grub-core/loader/arm/linux.c ++++ b/grub-core/loader/arm/linux.c +@@ -78,7 +78,7 @@ linux_prepare_atag (void *target_atag) + + /* some place for cmdline, initrd and terminator. */ + tmp_size = get_atag_size (atag_orig) + 20 + (arg_size) / 4; +- tmp_atag = grub_malloc (tmp_size * sizeof (grub_uint32_t)); ++ tmp_atag = grub_calloc (tmp_size, sizeof (grub_uint32_t)); + if (!tmp_atag) + return grub_errno; + +diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c +index cd92ea3f2..daf8c6b54 100644 +--- a/grub-core/loader/efi/chainloader.c ++++ b/grub-core/loader/efi/chainloader.c +@@ -116,7 +116,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, + fp->header.type = GRUB_EFI_MEDIA_DEVICE_PATH_TYPE; + fp->header.subtype = GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE; + +- path_name = grub_malloc (len * GRUB_MAX_UTF16_PER_UTF8 * sizeof (*path_name)); ++ path_name = grub_calloc (len, GRUB_MAX_UTF16_PER_UTF8 * sizeof (*path_name)); + if (!path_name) + return; + +diff --git a/grub-core/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c +index af6741d15..a8d8bf7da 100644 +--- a/grub-core/loader/i386/bsdXX.c ++++ b/grub-core/loader/i386/bsdXX.c +@@ -48,7 +48,7 @@ read_headers (grub_file_t file, const char *filename, Elf_Ehdr *e, char **shdr) + if (e->e_ident[EI_CLASS] != SUFFIX (ELFCLASS)) + return grub_error (GRUB_ERR_BAD_OS, N_("invalid arch-dependent ELF magic")); + +- *shdr = grub_malloc ((grub_uint32_t) e->e_shnum * e->e_shentsize); ++ *shdr = grub_calloc (e->e_shnum, e->e_shentsize); + if (! *shdr) + return grub_errno; + +diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c +index e64ed08f5..b7d176b5d 100644 +--- a/grub-core/loader/i386/xnu.c ++++ b/grub-core/loader/i386/xnu.c +@@ -295,7 +295,7 @@ grub_xnu_devprop_add_property_utf8 (struct grub_xnu_devprop_device_descriptor *d + return grub_errno; + + len = grub_strlen (name); +- utf16 = grub_malloc (sizeof (grub_uint16_t) * len); ++ utf16 = grub_calloc (len, sizeof (grub_uint16_t)); + if (!utf16) + { + grub_free (utf8); +@@ -331,7 +331,7 @@ grub_xnu_devprop_add_property_utf16 (struct grub_xnu_devprop_device_descriptor * + grub_uint16_t *utf16; + grub_err_t err; + +- utf16 = grub_malloc (sizeof (grub_uint16_t) * namelen); ++ utf16 = grub_calloc (namelen, sizeof (grub_uint16_t)); + if (!utf16) + return grub_errno; + grub_memcpy (utf16, name, sizeof (grub_uint16_t) * namelen); +diff --git a/grub-core/loader/macho.c b/grub-core/loader/macho.c +index 085f9c689..05710c48e 100644 +--- a/grub-core/loader/macho.c ++++ b/grub-core/loader/macho.c +@@ -97,7 +97,7 @@ grub_macho_file (grub_file_t file, const char *filename, int is_64bit) + if (grub_file_seek (macho->file, sizeof (struct grub_macho_fat_header)) + == (grub_off_t) -1) + goto fail; +- archs = grub_malloc (sizeof (struct grub_macho_fat_arch) * narchs); ++ archs = grub_calloc (narchs, sizeof (struct grub_macho_fat_arch)); + if (!archs) + goto fail; + if (grub_file_read (macho->file, archs, +diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c +index 70cd1db51..cc6853692 100644 +--- a/grub-core/loader/multiboot_elfxx.c ++++ b/grub-core/loader/multiboot_elfxx.c +@@ -217,7 +217,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + { + grub_uint8_t *shdr, *shdrptr; + +- shdr = grub_malloc ((grub_uint32_t) ehdr->e_shnum * ehdr->e_shentsize); ++ shdr = grub_calloc (ehdr->e_shnum, ehdr->e_shentsize); + if (!shdr) + return grub_errno; + +diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c +index 7f74d1d6f..77d7060e1 100644 +--- a/grub-core/loader/xnu.c ++++ b/grub-core/loader/xnu.c +@@ -800,7 +800,7 @@ grub_cmd_xnu_mkext (grub_command_t cmd __attribute__ ((unused)), + if (grub_be_to_cpu32 (head.magic) == GRUB_MACHO_FAT_MAGIC) + { + narchs = grub_be_to_cpu32 (head.nfat_arch); +- archs = grub_malloc (sizeof (struct grub_macho_fat_arch) * narchs); ++ archs = grub_calloc (narchs, sizeof (struct grub_macho_fat_arch)); + if (! archs) + { + grub_file_close (file); +diff --git a/grub-core/mmap/mmap.c b/grub-core/mmap/mmap.c +index 6a31cbae3..57b4e9a72 100644 +--- a/grub-core/mmap/mmap.c ++++ b/grub-core/mmap/mmap.c +@@ -143,9 +143,9 @@ grub_mmap_iterate (grub_memory_hook_t hook, void *hook_data) + + /* Initialize variables. */ + ctx.scanline_events = (struct grub_mmap_scan *) +- grub_malloc (sizeof (struct grub_mmap_scan) * 2 * mmap_num); ++ grub_calloc (mmap_num, sizeof (struct grub_mmap_scan) * 2); + +- present = grub_zalloc (sizeof (present[0]) * current_priority); ++ present = grub_calloc (current_priority, sizeof (present[0])); + + if (! ctx.scanline_events || !present) + { +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index 04cfbb045..653957200 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -766,7 +766,7 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), + if (ncards == 0) + return grub_error (GRUB_ERR_NET_NO_CARD, N_("no network card found")); + +- ifaces = grub_zalloc (ncards * sizeof (ifaces[0])); ++ ifaces = grub_calloc (ncards, sizeof (ifaces[0])); + if (!ifaces) + return grub_errno; + +diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c +index 5d9afe093..e332d5eb4 100644 +--- a/grub-core/net/dns.c ++++ b/grub-core/net/dns.c +@@ -285,8 +285,8 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)), + ptr++; + ptr += 4; + } +- *data->addresses = grub_malloc (sizeof ((*data->addresses)[0]) +- * grub_be_to_cpu16 (head->ancount)); ++ *data->addresses = grub_calloc (grub_be_to_cpu16 (head->ancount), ++ sizeof ((*data->addresses)[0])); + if (!*data->addresses) + { + grub_errno = GRUB_ERR_NONE; +@@ -406,8 +406,8 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)), + dns_cache[h].addresses = 0; + dns_cache[h].name = grub_strdup (data->oname); + dns_cache[h].naddresses = *data->naddresses; +- dns_cache[h].addresses = grub_malloc (*data->naddresses +- * sizeof (dns_cache[h].addresses[0])); ++ dns_cache[h].addresses = grub_calloc (*data->naddresses, ++ sizeof (dns_cache[h].addresses[0])); + dns_cache[h].limit_time = grub_get_time_ms () + 1000 * ttl_all; + if (!dns_cache[h].addresses || !dns_cache[h].name) + { +@@ -479,7 +479,7 @@ grub_net_dns_lookup (const char *name, + } + } + +- sockets = grub_malloc (sizeof (sockets[0]) * n_servers); ++ sockets = grub_calloc (n_servers, sizeof (sockets[0])); + if (!sockets) + return grub_errno; + +diff --git a/grub-core/net/net.c b/grub-core/net/net.c +index d5d726a31..38f19dfc9 100644 +--- a/grub-core/net/net.c ++++ b/grub-core/net/net.c +@@ -333,8 +333,8 @@ grub_cmd_ipv6_autoconf (struct grub_command *cmd __attribute__ ((unused)), + ncards++; + } + +- ifaces = grub_zalloc (ncards * sizeof (ifaces[0])); +- slaacs = grub_zalloc (ncards * sizeof (slaacs[0])); ++ ifaces = grub_calloc (ncards, sizeof (ifaces[0])); ++ slaacs = grub_calloc (ncards, sizeof (slaacs[0])); + if (!ifaces || !slaacs) + { + grub_free (ifaces); +diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c +index b0ab47d73..d57fb72fa 100644 +--- a/grub-core/normal/charset.c ++++ b/grub-core/normal/charset.c +@@ -203,7 +203,7 @@ grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg, + { + grub_size_t msg_len = grub_strlen (msg); + +- *unicode_msg = grub_malloc (msg_len * sizeof (grub_uint32_t)); ++ *unicode_msg = grub_calloc (msg_len, sizeof (grub_uint32_t)); + + if (!*unicode_msg) + return -1; +@@ -488,7 +488,7 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, + } + else + { +- n = grub_malloc (sizeof (n[0]) * (out->ncomb + 1)); ++ n = grub_calloc (out->ncomb + 1, sizeof (n[0])); + if (!n) + { + grub_errno = GRUB_ERR_NONE; +@@ -842,7 +842,7 @@ grub_bidi_line_logical_to_visual (const grub_uint32_t *logical, + } \ + } + +- visual = grub_malloc (sizeof (visual[0]) * logical_len); ++ visual = grub_calloc (logical_len, sizeof (visual[0])); + if (!visual) + return -1; + +@@ -1165,8 +1165,8 @@ grub_bidi_logical_to_visual (const grub_uint32_t *logical, + { + const grub_uint32_t *line_start = logical, *ptr; + struct grub_unicode_glyph *visual_ptr; +- *visual_out = visual_ptr = grub_malloc (3 * sizeof (visual_ptr[0]) +- * (logical_len + 2)); ++ *visual_out = visual_ptr = grub_calloc (logical_len + 2, ++ 3 * sizeof (visual_ptr[0])); + if (!visual_ptr) + return -1; + for (ptr = logical; ptr <= logical + logical_len; ptr++) +diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c +index c037d5050..c57242e2e 100644 +--- a/grub-core/normal/cmdline.c ++++ b/grub-core/normal/cmdline.c +@@ -41,7 +41,7 @@ grub_err_t + grub_set_history (int newsize) + { + grub_uint32_t **old_hist_lines = hist_lines; +- hist_lines = grub_malloc (sizeof (grub_uint32_t *) * newsize); ++ hist_lines = grub_calloc (newsize, sizeof (grub_uint32_t *)); + + /* Copy the old lines into the new buffer. */ + if (old_hist_lines) +@@ -114,7 +114,7 @@ static void + grub_history_set (int pos, grub_uint32_t *s, grub_size_t len) + { + grub_free (hist_lines[pos]); +- hist_lines[pos] = grub_malloc ((len + 1) * sizeof (grub_uint32_t)); ++ hist_lines[pos] = grub_calloc (len + 1, sizeof (grub_uint32_t)); + if (!hist_lines[pos]) + { + grub_print_error (); +@@ -349,7 +349,7 @@ grub_cmdline_get (const char *prompt_translated) + char *ret; + unsigned nterms; + +- buf = grub_malloc (max_len * sizeof (grub_uint32_t)); ++ buf = grub_calloc (max_len, sizeof (grub_uint32_t)); + if (!buf) + return 0; + +@@ -377,7 +377,7 @@ grub_cmdline_get (const char *prompt_translated) + FOR_ACTIVE_TERM_OUTPUTS(cur) + nterms++; + +- cl_terms = grub_malloc (sizeof (cl_terms[0]) * nterms); ++ cl_terms = grub_calloc (nterms, sizeof (cl_terms[0])); + if (!cl_terms) + { + grub_free (buf); +@@ -385,7 +385,7 @@ grub_cmdline_get (const char *prompt_translated) + } + cl_term_cur = cl_terms; + +- unicode_msg = grub_malloc (msg_len * sizeof (grub_uint32_t)); ++ unicode_msg = grub_calloc (msg_len, sizeof (grub_uint32_t)); + if (!unicode_msg) + { + grub_free (buf); +@@ -495,7 +495,7 @@ grub_cmdline_get (const char *prompt_translated) + grub_uint32_t *insert; + + insertlen = grub_strlen (insertu8); +- insert = grub_malloc ((insertlen + 1) * sizeof (grub_uint32_t)); ++ insert = grub_calloc (insertlen + 1, sizeof (grub_uint32_t)); + if (!insert) + { + grub_free (insertu8); +@@ -602,7 +602,7 @@ grub_cmdline_get (const char *prompt_translated) + + grub_free (kill_buf); + +- kill_buf = grub_malloc ((n + 1) * sizeof(grub_uint32_t)); ++ kill_buf = grub_calloc (n + 1, sizeof (grub_uint32_t)); + if (grub_errno) + { + grub_print_error (); +diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c +index cdf3590a3..1993995be 100644 +--- a/grub-core/normal/menu_entry.c ++++ b/grub-core/normal/menu_entry.c +@@ -95,8 +95,8 @@ init_line (struct screen *screen, struct line *linep) + { + linep->len = 0; + linep->max_len = 80; +- linep->buf = grub_malloc ((linep->max_len + 1) * sizeof (linep->buf[0])); +- linep->pos = grub_zalloc (screen->nterms * sizeof (linep->pos[0])); ++ linep->buf = grub_calloc (linep->max_len + 1, sizeof (linep->buf[0])); ++ linep->pos = grub_calloc (screen->nterms, sizeof (linep->pos[0])); + if (! linep->buf || !linep->pos) + { + grub_free (linep->buf); +@@ -287,7 +287,7 @@ update_screen (struct screen *screen, struct per_term_screen *term_screen, + pos = linep->pos + (term_screen - screen->terms); + + if (!*pos) +- *pos = grub_zalloc ((linep->len + 1) * sizeof (**pos)); ++ *pos = grub_calloc (linep->len + 1, sizeof (**pos)); + + if (i == region_start || linep == screen->lines + screen->line + || (i > region_start && mode == ALL_LINES)) +@@ -471,7 +471,7 @@ insert_string (struct screen *screen, const char *s, int update) + + /* Insert the string. */ + current_linep = screen->lines + screen->line; +- unicode_msg = grub_malloc ((p - s) * sizeof (grub_uint32_t)); ++ unicode_msg = grub_calloc (p - s, sizeof (grub_uint32_t)); + + if (!unicode_msg) + return 0; +@@ -1023,7 +1023,7 @@ complete (struct screen *screen, int continuous, int update) + if (completion_buffer.buf) + { + buflen = grub_strlen (completion_buffer.buf); +- ucs4 = grub_malloc (sizeof (grub_uint32_t) * (buflen + 1)); ++ ucs4 = grub_calloc (buflen + 1, sizeof (grub_uint32_t)); + + if (!ucs4) + { +@@ -1268,7 +1268,7 @@ grub_menu_entry_run (grub_menu_entry_t entry) + for (i = 0; i < (unsigned) screen->num_lines; i++) + { + grub_free (screen->lines[i].pos); +- screen->lines[i].pos = grub_zalloc (screen->nterms * sizeof (screen->lines[i].pos[0])); ++ screen->lines[i].pos = grub_calloc (screen->nterms, sizeof (screen->lines[i].pos[0])); + if (! screen->lines[i].pos) + { + grub_print_error (); +@@ -1278,7 +1278,7 @@ grub_menu_entry_run (grub_menu_entry_t entry) + } + } + +- screen->terms = grub_zalloc (screen->nterms * sizeof (screen->terms[0])); ++ screen->terms = grub_calloc (screen->nterms, sizeof (screen->terms[0])); + if (!screen->terms) + { + grub_print_error (); +diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c +index e22bb91f6..18240e76c 100644 +--- a/grub-core/normal/menu_text.c ++++ b/grub-core/normal/menu_text.c +@@ -78,7 +78,7 @@ grub_print_message_indented_real (const char *msg, int margin_left, + grub_size_t msg_len = grub_strlen (msg) + 2; + int ret = 0; + +- unicode_msg = grub_malloc (msg_len * sizeof (grub_uint32_t)); ++ unicode_msg = grub_calloc (msg_len, sizeof (grub_uint32_t)); + + if (!unicode_msg) + return 0; +@@ -211,7 +211,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry, + + title = entry ? entry->title : ""; + title_len = grub_strlen (title); +- unicode_title = grub_malloc (title_len * sizeof (*unicode_title)); ++ unicode_title = grub_calloc (title_len, sizeof (*unicode_title)); + if (! unicode_title) + /* XXX How to show this error? */ + return; +diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c +index a1e5c5a0d..cc8c173b6 100644 +--- a/grub-core/normal/term.c ++++ b/grub-core/normal/term.c +@@ -264,7 +264,7 @@ grub_term_save_pos (void) + FOR_ACTIVE_TERM_OUTPUTS(cur) + cnt++; + +- ret = grub_malloc (cnt * sizeof (ret[0])); ++ ret = grub_calloc (cnt, sizeof (ret[0])); + if (!ret) + return NULL; + +@@ -1013,7 +1013,7 @@ grub_xnputs (const char *str, grub_size_t msg_len) + + grub_error_push (); + +- unicode_str = grub_malloc (msg_len * sizeof (grub_uint32_t)); ++ unicode_str = grub_calloc (msg_len, sizeof (grub_uint32_t)); + + grub_error_pop (); + +diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c +index 90d92d3ad..5b41ad022 100644 +--- a/grub-core/osdep/linux/getroot.c ++++ b/grub-core/osdep/linux/getroot.c +@@ -168,7 +168,7 @@ grub_util_raid_getmembers (const char *name, int bootable) + if (ret != 0) + grub_util_error (_("ioctl GET_ARRAY_INFO error: %s"), strerror (errno)); + +- devicelist = xmalloc ((info.nr_disks + 1) * sizeof (char *)); ++ devicelist = xcalloc (info.nr_disks + 1, sizeof (char *)); + + for (i = 0, j = 0; j < info.nr_disks; i++) + { +@@ -241,7 +241,7 @@ grub_find_root_devices_from_btrfs (const char *dir) + return NULL; + } + +- ret = xmalloc ((fsi.num_devices + 1) * sizeof (ret[0])); ++ ret = xcalloc (fsi.num_devices + 1, sizeof (ret[0])); + + for (i = 1; i <= fsi.max_id && j < fsi.num_devices; i++) + { +@@ -396,7 +396,7 @@ grub_find_root_devices_from_mountinfo (const char *dir, char **relroot) + if (relroot) + *relroot = NULL; + +- entries = xmalloc (entry_max * sizeof (*entries)); ++ entries = xcalloc (entry_max, sizeof (*entries)); + + again: + fp = grub_util_fopen ("/proc/self/mountinfo", "r"); +diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c +index 65effa9f3..7d6325138 100644 +--- a/grub-core/osdep/unix/config.c ++++ b/grub-core/osdep/unix/config.c +@@ -89,7 +89,7 @@ grub_util_load_config (struct grub_util_config *cfg) + argv[0] = "sh"; + argv[1] = "-c"; + +- script = xmalloc (4 * strlen (cfgfile) + 300); ++ script = xcalloc (4, strlen (cfgfile) + 300); + + ptr = script; + memcpy (ptr, ". '", 3); +diff --git a/grub-core/osdep/windows/getroot.c b/grub-core/osdep/windows/getroot.c +index 661d95461..eada663b2 100644 +--- a/grub-core/osdep/windows/getroot.c ++++ b/grub-core/osdep/windows/getroot.c +@@ -59,7 +59,7 @@ grub_get_mount_point (const TCHAR *path) + + for (ptr = path; *ptr; ptr++); + allocsize = (ptr - path + 10) * 2; +- out = xmalloc (allocsize * sizeof (out[0])); ++ out = xcalloc (allocsize, sizeof (out[0])); + + /* When pointing to EFI system partition GetVolumePathName fails + for ESP root and returns abberant information for everything +diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c +index 355100789..0be327394 100644 +--- a/grub-core/osdep/windows/hostdisk.c ++++ b/grub-core/osdep/windows/hostdisk.c +@@ -111,7 +111,7 @@ grub_util_get_windows_path_real (const char *path) + + while (1) + { +- fpa = xmalloc (alloc * sizeof (fpa[0])); ++ fpa = xcalloc (alloc, sizeof (fpa[0])); + + len = GetFullPathName (tpath, alloc, fpa, NULL); + if (len >= alloc) +@@ -399,7 +399,7 @@ grub_util_fd_opendir (const char *name) + for (l = 0; name_windows[l]; l++); + for (l--; l >= 0 && (name_windows[l] == '\\' || name_windows[l] == '/'); l--); + l++; +- pattern = xmalloc ((l + 3) * sizeof (pattern[0])); ++ pattern = xcalloc (l + 3, sizeof (pattern[0])); + memcpy (pattern, name_windows, l * sizeof (pattern[0])); + pattern[l] = '\\'; + pattern[l + 1] = '*'; +diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c +index e8ffd62c6..6297de632 100644 +--- a/grub-core/osdep/windows/init.c ++++ b/grub-core/osdep/windows/init.c +@@ -161,7 +161,7 @@ grub_util_host_init (int *argc __attribute__ ((unused)), + LPWSTR *targv; + + targv = CommandLineToArgvW (tcmdline, argc); +- *argv = xmalloc ((*argc + 1) * sizeof (argv[0])); ++ *argv = xcalloc (*argc + 1, sizeof (argv[0])); + + for (i = 0; i < *argc; i++) + (*argv)[i] = grub_util_tchar_to_utf8 (targv[i]); +diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c +index 7eb53fe01..1ef86bf58 100644 +--- a/grub-core/osdep/windows/platform.c ++++ b/grub-core/osdep/windows/platform.c +@@ -225,8 +225,8 @@ grub_install_register_efi (grub_device_t efidir_grub_dev, + grub_util_error ("%s", _("no EFI routines are available when running in BIOS mode")); + + distrib8_len = grub_strlen (efi_distributor); +- distributor16 = xmalloc ((distrib8_len + 1) * GRUB_MAX_UTF16_PER_UTF8 +- * sizeof (grub_uint16_t)); ++ distributor16 = xcalloc (distrib8_len + 1, ++ GRUB_MAX_UTF16_PER_UTF8 * sizeof (grub_uint16_t)); + distrib16_len = grub_utf8_to_utf16 (distributor16, distrib8_len * GRUB_MAX_UTF16_PER_UTF8, + (const grub_uint8_t *) efi_distributor, + distrib8_len, 0); +diff --git a/grub-core/osdep/windows/relpath.c b/grub-core/osdep/windows/relpath.c +index cb0861744..478e8ef14 100644 +--- a/grub-core/osdep/windows/relpath.c ++++ b/grub-core/osdep/windows/relpath.c +@@ -72,7 +72,7 @@ grub_make_system_path_relative_to_its_root (const char *path) + if (dirwindows[0] && dirwindows[1] == ':') + offset = 2; + } +- ret = xmalloc (sizeof (ret[0]) * (flen - offset + 2)); ++ ret = xcalloc (flen - offset + 2, sizeof (ret[0])); + if (dirwindows[offset] != '\\' + && dirwindows[offset] != '/' + && dirwindows[offset]) +diff --git a/grub-core/partmap/gpt.c b/grub-core/partmap/gpt.c +index 103f6796f..72a2e37cd 100644 +--- a/grub-core/partmap/gpt.c ++++ b/grub-core/partmap/gpt.c +@@ -199,7 +199,7 @@ gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, + *nsectors = ctx.len; + if (*nsectors > max_nsectors) + *nsectors = max_nsectors; +- *sectors = grub_malloc (*nsectors * sizeof (**sectors)); ++ *sectors = grub_calloc (*nsectors, sizeof (**sectors)); + if (!*sectors) + return grub_errno; + for (i = 0; i < *nsectors; i++) +diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c +index 7b8e45076..ee3f24982 100644 +--- a/grub-core/partmap/msdos.c ++++ b/grub-core/partmap/msdos.c +@@ -337,7 +337,7 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, + avail_nsectors = *nsectors; + if (*nsectors > max_nsectors) + *nsectors = max_nsectors; +- *sectors = grub_malloc (*nsectors * sizeof (**sectors)); ++ *sectors = grub_calloc (*nsectors, sizeof (**sectors)); + if (!*sectors) + return grub_errno; + for (i = 0; i < *nsectors; i++) +diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c +index ee299fd0e..c8d6806fe 100644 +--- a/grub-core/script/execute.c ++++ b/grub-core/script/execute.c +@@ -553,7 +553,7 @@ gettext_append (struct grub_script_argv *result, const char *orig_str) + for (iptr = orig_str; *iptr; iptr++) + if (*iptr == '$') + dollar_cnt++; +- ctx.allowed_strings = grub_malloc (sizeof (ctx.allowed_strings[0]) * dollar_cnt); ++ ctx.allowed_strings = grub_calloc (dollar_cnt, sizeof (ctx.allowed_strings[0])); + + if (parse_string (orig_str, gettext_save_allow, &ctx, 0)) + goto fail; +diff --git a/grub-core/tests/fake_input.c b/grub-core/tests/fake_input.c +index 2d6085298..b5eb516be 100644 +--- a/grub-core/tests/fake_input.c ++++ b/grub-core/tests/fake_input.c +@@ -49,7 +49,7 @@ grub_terminal_input_fake_sequence (int *seq_in, int nseq_in) + saved = grub_term_inputs; + if (seq) + grub_free (seq); +- seq = grub_malloc (nseq_in * sizeof (seq[0])); ++ seq = grub_calloc (nseq_in, sizeof (seq[0])); + if (!seq) + return; + +diff --git a/grub-core/tests/video_checksum.c b/grub-core/tests/video_checksum.c +index 74d5b65e5..44d081069 100644 +--- a/grub-core/tests/video_checksum.c ++++ b/grub-core/tests/video_checksum.c +@@ -336,7 +336,7 @@ grub_video_capture_write_bmp (const char *fname, + { + case 4: + { +- grub_uint8_t *buffer = xmalloc (mode_info->width * 3); ++ grub_uint8_t *buffer = xcalloc (3, mode_info->width); + grub_uint32_t rmask = ((1 << mode_info->red_mask_size) - 1); + grub_uint32_t gmask = ((1 << mode_info->green_mask_size) - 1); + grub_uint32_t bmask = ((1 << mode_info->blue_mask_size) - 1); +@@ -367,7 +367,7 @@ grub_video_capture_write_bmp (const char *fname, + } + case 3: + { +- grub_uint8_t *buffer = xmalloc (mode_info->width * 3); ++ grub_uint8_t *buffer = xcalloc (3, mode_info->width); + grub_uint32_t rmask = ((1 << mode_info->red_mask_size) - 1); + grub_uint32_t gmask = ((1 << mode_info->green_mask_size) - 1); + grub_uint32_t bmask = ((1 << mode_info->blue_mask_size) - 1); +@@ -407,7 +407,7 @@ grub_video_capture_write_bmp (const char *fname, + } + case 2: + { +- grub_uint8_t *buffer = xmalloc (mode_info->width * 3); ++ grub_uint8_t *buffer = xcalloc (3, mode_info->width); + grub_uint16_t rmask = ((1 << mode_info->red_mask_size) - 1); + grub_uint16_t gmask = ((1 << mode_info->green_mask_size) - 1); + grub_uint16_t bmask = ((1 << mode_info->blue_mask_size) - 1); +diff --git a/grub-core/video/capture.c b/grub-core/video/capture.c +index 4f83c7441..4d3195e01 100644 +--- a/grub-core/video/capture.c ++++ b/grub-core/video/capture.c +@@ -89,7 +89,7 @@ grub_video_capture_start (const struct grub_video_mode_info *mode_info, + framebuffer.mode_info = *mode_info; + framebuffer.mode_info.blit_format = grub_video_get_blit_format (&framebuffer.mode_info); + +- framebuffer.ptr = grub_malloc (framebuffer.mode_info.height * framebuffer.mode_info.pitch); ++ framebuffer.ptr = grub_calloc (framebuffer.mode_info.height, framebuffer.mode_info.pitch); + if (!framebuffer.ptr) + return grub_errno; + +diff --git a/grub-core/video/emu/sdl.c b/grub-core/video/emu/sdl.c +index a2f639f66..0ebab6f57 100644 +--- a/grub-core/video/emu/sdl.c ++++ b/grub-core/video/emu/sdl.c +@@ -172,7 +172,7 @@ grub_video_sdl_set_palette (unsigned int start, unsigned int count, + if (start + count > mode_info.number_of_colors) + count = mode_info.number_of_colors - start; + +- tmp = grub_malloc (count * sizeof (tmp[0])); ++ tmp = grub_calloc (count, sizeof (tmp[0])); + for (i = 0; i < count; i++) + { + tmp[i].r = palette_data[i].r; +diff --git a/grub-core/video/i386/pc/vga.c b/grub-core/video/i386/pc/vga.c +index 01f47112d..b2f776c99 100644 +--- a/grub-core/video/i386/pc/vga.c ++++ b/grub-core/video/i386/pc/vga.c +@@ -127,7 +127,7 @@ grub_video_vga_setup (unsigned int width, unsigned int height, + + vga_height = height ? : 480; + +- framebuffer.temporary_buffer = grub_malloc (vga_height * VGA_WIDTH); ++ framebuffer.temporary_buffer = grub_calloc (vga_height, VGA_WIDTH); + framebuffer.front_page = 0; + framebuffer.back_page = 0; + if (!framebuffer.temporary_buffer) +diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c +index 777e71334..61bd64537 100644 +--- a/grub-core/video/readers/png.c ++++ b/grub-core/video/readers/png.c +@@ -309,7 +309,7 @@ grub_png_decode_image_header (struct grub_png_data *data) + if (data->is_16bit || data->is_gray || data->is_palette) + #endif + { +- data->image_data = grub_malloc (data->image_height * data->row_bytes); ++ data->image_data = grub_calloc (data->image_height, data->row_bytes); + if (grub_errno) + return grub_errno; + +diff --git a/include/grub/unicode.h b/include/grub/unicode.h +index a0403e91f..4de986a85 100644 +--- a/include/grub/unicode.h ++++ b/include/grub/unicode.h +@@ -293,7 +293,7 @@ grub_unicode_glyph_dup (const struct grub_unicode_glyph *in) + grub_memcpy (out, in, sizeof (*in)); + if (in->ncomb > ARRAY_SIZE (out->combining_inline)) + { +- out->combining_ptr = grub_malloc (in->ncomb * sizeof (out->combining_ptr[0])); ++ out->combining_ptr = grub_calloc (in->ncomb, sizeof (out->combining_ptr[0])); + if (!out->combining_ptr) + { + grub_free (out); +@@ -315,7 +315,7 @@ grub_unicode_set_glyph (struct grub_unicode_glyph *out, + grub_memcpy (out, in, sizeof (*in)); + if (in->ncomb > ARRAY_SIZE (out->combining_inline)) + { +- out->combining_ptr = grub_malloc (in->ncomb * sizeof (out->combining_ptr[0])); ++ out->combining_ptr = grub_calloc (in->ncomb, sizeof (out->combining_ptr[0])); + if (!out->combining_ptr) + return; + grub_memcpy (out->combining_ptr, in->combining_ptr, +diff --git a/util/getroot.c b/util/getroot.c +index 847406fba..a5eaa64fd 100644 +--- a/util/getroot.c ++++ b/util/getroot.c +@@ -200,7 +200,7 @@ make_device_name (const char *drive) + char *ret, *ptr; + const char *iptr; + +- ret = xmalloc (strlen (drive) * 2); ++ ret = xcalloc (2, strlen (drive)); + ptr = ret; + for (iptr = drive; *iptr; iptr++) + { +diff --git a/util/grub-file.c b/util/grub-file.c +index 50c18b683..b2e7dd69f 100644 +--- a/util/grub-file.c ++++ b/util/grub-file.c +@@ -54,7 +54,7 @@ main (int argc, char *argv[]) + + grub_util_host_init (&argc, &argv); + +- argv2 = xmalloc (argc * sizeof (argv2[0])); ++ argv2 = xcalloc (argc, sizeof (argv2[0])); + + if (argc == 2 && strcmp (argv[1], "--version") == 0) + { +diff --git a/util/grub-fstest.c b/util/grub-fstest.c +index f14e02d97..57246af7c 100644 +--- a/util/grub-fstest.c ++++ b/util/grub-fstest.c +@@ -650,7 +650,7 @@ argp_parser (int key, char *arg, struct argp_state *state) + if (args_count < num_disks) + { + if (args_count == 0) +- images = xmalloc (num_disks * sizeof (images[0])); ++ images = xcalloc (num_disks, sizeof (images[0])); + images[args_count] = grub_canonicalize_file_name (arg); + args_count++; + return 0; +@@ -734,7 +734,7 @@ main (int argc, char *argv[]) + + grub_util_host_init (&argc, &argv); + +- args = xmalloc (argc * sizeof (args[0])); ++ args = xcalloc (argc, sizeof (args[0])); + + argp_parse (&argp, argc, argv, 0, 0, 0); + +diff --git a/util/grub-install-common.c b/util/grub-install-common.c +index ca0ac612a..0295d40f5 100644 +--- a/util/grub-install-common.c ++++ b/util/grub-install-common.c +@@ -286,7 +286,7 @@ handle_install_list (struct install_list *il, const char *val, + il->n_entries++; + } + il->n_alloc = il->n_entries + 1; +- il->entries = xmalloc (il->n_alloc * sizeof (il->entries[0])); ++ il->entries = xcalloc (il->n_alloc, sizeof (il->entries[0])); + ptr = val; + for (ce = il->entries; ; ce++) + { +diff --git a/util/grub-install.c b/util/grub-install.c +index 8a55ad4b8..a82725f29 100644 +--- a/util/grub-install.c ++++ b/util/grub-install.c +@@ -626,7 +626,7 @@ device_map_check_duplicates (const char *dev_map) + if (! fp) + return; + +- d = xmalloc (alloced * sizeof (d[0])); ++ d = xcalloc (alloced, sizeof (d[0])); + + while (fgets (buf, sizeof (buf), fp)) + { +@@ -1260,7 +1260,7 @@ main (int argc, char *argv[]) + ndev++; + } + +- grub_drives = xmalloc (sizeof (grub_drives[0]) * (ndev + 1)); ++ grub_drives = xcalloc (ndev + 1, sizeof (grub_drives[0])); + + for (curdev = grub_devices, curdrive = grub_drives; *curdev; curdev++, + curdrive++) +diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c +index bc087c2b5..d97d0e7be 100644 +--- a/util/grub-mkimagexx.c ++++ b/util/grub-mkimagexx.c +@@ -2294,10 +2294,8 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path, + + grub_host_to_target16 (e->e_shstrndx) * smd.section_entsize); + smd.strtab = (char *) e + grub_host_to_target_addr (s->sh_offset); + +- smd.addrs = xmalloc (sizeof (*smd.addrs) * smd.num_sections); +- memset (smd.addrs, 0, sizeof (*smd.addrs) * smd.num_sections); +- smd.vaddrs = xmalloc (sizeof (*smd.vaddrs) * smd.num_sections); +- memset (smd.vaddrs, 0, sizeof (*smd.vaddrs) * smd.num_sections); ++ smd.addrs = xcalloc (smd.num_sections, sizeof (*smd.addrs)); ++ smd.vaddrs = xcalloc (smd.num_sections, sizeof (*smd.vaddrs)); + + SUFFIX (locate_sections) (e, kernel_path, &smd, layout, image_target); + +diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c +index ce2cbc4f1..51831027f 100644 +--- a/util/grub-mkrescue.c ++++ b/util/grub-mkrescue.c +@@ -441,8 +441,8 @@ main (int argc, char *argv[]) + xorriso = xstrdup ("xorriso"); + label_font = grub_util_path_concat (2, pkgdatadir, "unicode.pf2"); + +- argp_argv = xmalloc (sizeof (argp_argv[0]) * argc); +- xorriso_tail_argv = xmalloc (sizeof (argp_argv[0]) * argc); ++ argp_argv = xcalloc (argc, sizeof (argp_argv[0])); ++ xorriso_tail_argv = xcalloc (argc, sizeof (argp_argv[0])); + + xorriso_tail_argc = 0; + /* Program name */ +diff --git a/util/grub-mkstandalone.c b/util/grub-mkstandalone.c +index 4907d44c0..edf309717 100644 +--- a/util/grub-mkstandalone.c ++++ b/util/grub-mkstandalone.c +@@ -296,7 +296,7 @@ main (int argc, char *argv[]) + grub_util_host_init (&argc, &argv); + grub_util_disable_fd_syncs (); + +- files = xmalloc ((argc + 1) * sizeof (files[0])); ++ files = xcalloc (argc + 1, sizeof (files[0])); + + argp_parse (&argp, argc, argv, 0, 0, 0); + +diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c +index 0d4084a10..11331294f 100644 +--- a/util/grub-pe2elf.c ++++ b/util/grub-pe2elf.c +@@ -100,9 +100,9 @@ write_section_data (FILE* fp, const char *name, char *image, + char *pe_strtab = (image + pe_chdr->symtab_offset + + pe_chdr->num_symbols * sizeof (struct grub_pe32_symbol)); + +- section_map = xmalloc ((2 * pe_chdr->num_sections + 5) * sizeof (int)); ++ section_map = xcalloc (2 * pe_chdr->num_sections + 5, sizeof (int)); + section_map[0] = 0; +- shdr = xmalloc ((2 * pe_chdr->num_sections + 5) * sizeof (shdr[0])); ++ shdr = xcalloc (2 * pe_chdr->num_sections + 5, sizeof (shdr[0])); + idx = 1; + idx_reloc = pe_chdr->num_sections + 1; + +@@ -233,7 +233,7 @@ write_reloc_section (FILE* fp, const char *name, char *image, + + pe_sec = pe_shdr + shdr[i].sh_link; + pe_rel = (struct grub_pe32_reloc *) (image + pe_sec->relocations_offset); +- rel = (elf_reloc_t *) xmalloc (pe_sec->num_relocations * sizeof (elf_reloc_t)); ++ rel = (elf_reloc_t *) xcalloc (pe_sec->num_relocations, sizeof (elf_reloc_t)); + num_rels = 0; + modified = 0; + +@@ -365,12 +365,10 @@ write_symbol_table (FILE* fp, const char *name, char *image, + pe_symtab = (struct grub_pe32_symbol *) (image + pe_chdr->symtab_offset); + pe_strtab = (char *) (pe_symtab + pe_chdr->num_symbols); + +- symtab = (Elf_Sym *) xmalloc ((pe_chdr->num_symbols + 1) * +- sizeof (Elf_Sym)); +- memset (symtab, 0, (pe_chdr->num_symbols + 1) * sizeof (Elf_Sym)); ++ symtab = (Elf_Sym *) xcalloc (pe_chdr->num_symbols + 1, sizeof (Elf_Sym)); + num_syms = 1; + +- symtab_map = (int *) xmalloc (pe_chdr->num_symbols * sizeof (int)); ++ symtab_map = (int *) xcalloc (pe_chdr->num_symbols, sizeof (int)); + + for (i = 0; i < (int) pe_chdr->num_symbols; + i += pe_symtab->num_aux + 1, pe_symtab += pe_symtab->num_aux + 1) +diff --git a/util/grub-probe.c b/util/grub-probe.c +index 81d27eead..cbe6ed94c 100644 +--- a/util/grub-probe.c ++++ b/util/grub-probe.c +@@ -361,8 +361,8 @@ probe (const char *path, char **device_names, char delim) + grub_util_pull_device (*curdev); + ndev++; + } +- +- drives_names = xmalloc (sizeof (drives_names[0]) * (ndev + 1)); ++ ++ drives_names = xcalloc (ndev + 1, sizeof (drives_names[0])); + + for (curdev = device_names, curdrive = drives_names; *curdev; curdev++, + curdrive++) +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0006-malloc-Use-overflow-checking-primitives-where-we-do-.patch b/buildroot/boot/grub2/0006-malloc-Use-overflow-checking-primitives-where-we-do-.patch new file mode 100644 index 000000000..aaad72563 --- /dev/null +++ b/buildroot/boot/grub2/0006-malloc-Use-overflow-checking-primitives-where-we-do-.patch @@ -0,0 +1,1326 @@ +From 4ad7e85adc3803788d65707a9db11fd681aebe4a Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 15 Jun 2020 12:28:27 -0400 +Subject: [PATCH] malloc: Use overflow checking primitives where we do + complex allocations +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This attempts to fix the places where we do the following where +arithmetic_expr may include unvalidated data: + + X = grub_malloc(arithmetic_expr); + +It accomplishes this by doing the arithmetic ahead of time using grub_add(), +grub_sub(), grub_mul() and testing for overflow before proceeding. + +Among other issues, this fixes: + - allocation of integer overflow in grub_video_bitmap_create() + reported by Chris Coulson, + - allocation of integer overflow in grub_png_decode_image_header() + reported by Chris Coulson, + - allocation of integer overflow in grub_squash_read_symlink() + reported by Chris Coulson, + - allocation of integer overflow in grub_ext2_read_symlink() + reported by Chris Coulson, + - allocation of integer overflow in read_section_as_string() + reported by Chris Coulson. + +Fixes: CVE-2020-14309, CVE-2020-14310, CVE-2020-14311 + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/commands/legacycfg.c | 29 +++++++++++++++---- + grub-core/commands/wildcard.c | 36 ++++++++++++++++++++---- + grub-core/disk/ldm.c | 32 +++++++++++++++------ + grub-core/font/font.c | 7 ++++- + grub-core/fs/btrfs.c | 28 +++++++++++++------ + grub-core/fs/ext2.c | 10 ++++++- + grub-core/fs/iso9660.c | 51 ++++++++++++++++++++++++---------- + grub-core/fs/sfs.c | 27 ++++++++++++++---- + grub-core/fs/squash4.c | 45 ++++++++++++++++++++++-------- + grub-core/fs/udf.c | 41 +++++++++++++++++---------- + grub-core/fs/xfs.c | 11 +++++--- + grub-core/fs/zfs/zfs.c | 22 ++++++++++----- + grub-core/fs/zfs/zfscrypt.c | 7 ++++- + grub-core/lib/arg.c | 20 +++++++++++-- + grub-core/loader/i386/bsd.c | 8 +++++- + grub-core/net/dns.c | 9 +++++- + grub-core/normal/charset.c | 10 +++++-- + grub-core/normal/cmdline.c | 14 ++++++++-- + grub-core/normal/menu_entry.c | 13 +++++++-- + grub-core/script/argv.c | 16 +++++++++-- + grub-core/script/lexer.c | 21 ++++++++++++-- + grub-core/video/bitmap.c | 25 +++++++++++------ + grub-core/video/readers/png.c | 13 +++++++-- + 23 files changed, 382 insertions(+), 113 deletions(-) + +diff --git a/grub-core/commands/legacycfg.c b/grub-core/commands/legacycfg.c +index 5e3ec0d5e..cc5971f4d 100644 +--- a/grub-core/commands/legacycfg.c ++++ b/grub-core/commands/legacycfg.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -104,13 +105,22 @@ legacy_file (const char *filename) + if (newsuffix) + { + char *t; +- ++ grub_size_t sz; ++ ++ if (grub_add (grub_strlen (suffix), grub_strlen (newsuffix), &sz) || ++ grub_add (sz, 1, &sz)) ++ { ++ grub_errno = GRUB_ERR_OUT_OF_RANGE; ++ goto fail_0; ++ } ++ + t = suffix; +- suffix = grub_realloc (suffix, grub_strlen (suffix) +- + grub_strlen (newsuffix) + 1); ++ suffix = grub_realloc (suffix, sz); + if (!suffix) + { + grub_free (t); ++ ++ fail_0: + grub_free (entrysrc); + grub_free (parsed); + grub_free (newsuffix); +@@ -154,13 +164,22 @@ legacy_file (const char *filename) + else + { + char *t; ++ grub_size_t sz; ++ ++ if (grub_add (grub_strlen (entrysrc), grub_strlen (parsed), &sz) || ++ grub_add (sz, 1, &sz)) ++ { ++ grub_errno = GRUB_ERR_OUT_OF_RANGE; ++ goto fail_1; ++ } + + t = entrysrc; +- entrysrc = grub_realloc (entrysrc, grub_strlen (entrysrc) +- + grub_strlen (parsed) + 1); ++ entrysrc = grub_realloc (entrysrc, sz); + if (!entrysrc) + { + grub_free (t); ++ ++ fail_1: + grub_free (parsed); + grub_free (suffix); + return grub_errno; +diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c +index 4a106ca04..cc3290311 100644 +--- a/grub-core/commands/wildcard.c ++++ b/grub-core/commands/wildcard.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + +@@ -48,6 +49,7 @@ merge (char **dest, char **ps) + int i; + int j; + char **p; ++ grub_size_t sz; + + if (! dest) + return ps; +@@ -60,7 +62,12 @@ merge (char **dest, char **ps) + for (j = 0; ps[j]; j++) + ; + +- p = grub_realloc (dest, sizeof (char*) * (i + j + 1)); ++ if (grub_add (i, j, &sz) || ++ grub_add (sz, 1, &sz) || ++ grub_mul (sz, sizeof (char *), &sz)) ++ return dest; ++ ++ p = grub_realloc (dest, sz); + if (! p) + { + grub_free (dest); +@@ -115,8 +122,15 @@ make_regex (const char *start, const char *end, regex_t *regexp) + char ch; + int i = 0; + unsigned len = end - start; +- char *buffer = grub_malloc (len * 2 + 2 + 1); /* worst case size. */ ++ char *buffer; ++ grub_size_t sz; + ++ /* Worst case size is (len * 2 + 2 + 1). */ ++ if (grub_mul (len, 2, &sz) || ++ grub_add (sz, 3, &sz)) ++ return 1; ++ ++ buffer = grub_malloc (sz); + if (! buffer) + return 1; + +@@ -226,6 +240,7 @@ match_devices_iter (const char *name, void *data) + struct match_devices_ctx *ctx = data; + char **t; + char *buffer; ++ grub_size_t sz; + + /* skip partitions if asked to. */ + if (ctx->noparts && grub_strchr (name, ',')) +@@ -239,11 +254,16 @@ match_devices_iter (const char *name, void *data) + if (regexec (ctx->regexp, buffer, 0, 0, 0)) + { + grub_dprintf ("expand", "not matched\n"); ++ fail: + grub_free (buffer); + return 0; + } + +- t = grub_realloc (ctx->devs, sizeof (char*) * (ctx->ndev + 2)); ++ if (grub_add (ctx->ndev, 2, &sz) || ++ grub_mul (sz, sizeof (char *), &sz)) ++ goto fail; ++ ++ t = grub_realloc (ctx->devs, sz); + if (! t) + { + grub_free (buffer); +@@ -300,6 +320,7 @@ match_files_iter (const char *name, + struct match_files_ctx *ctx = data; + char **t; + char *buffer; ++ grub_size_t sz; + + /* skip . and .. names */ + if (grub_strcmp(".", name) == 0 || grub_strcmp("..", name) == 0) +@@ -315,9 +336,14 @@ match_files_iter (const char *name, + if (! buffer) + return 1; + +- t = grub_realloc (ctx->files, sizeof (char*) * (ctx->nfile + 2)); +- if (! t) ++ if (grub_add (ctx->nfile, 2, &sz) || ++ grub_mul (sz, sizeof (char *), &sz)) ++ goto fail; ++ ++ t = grub_realloc (ctx->files, sz); ++ if (!t) + { ++ fail: + grub_free (buffer); + return 1; + } +diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c +index e6323701a..58f8a53e1 100644 +--- a/grub-core/disk/ldm.c ++++ b/grub-core/disk/ldm.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #ifdef GRUB_UTIL + #include +@@ -289,6 +290,7 @@ make_vg (grub_disk_t disk, + struct grub_ldm_vblk vblk[GRUB_DISK_SECTOR_SIZE + / sizeof (struct grub_ldm_vblk)]; + unsigned i; ++ grub_size_t sz; + err = grub_disk_read (disk, cursec, 0, + sizeof(vblk), &vblk); + if (err) +@@ -350,7 +352,13 @@ make_vg (grub_disk_t disk, + grub_free (lv); + goto fail2; + } +- lv->name = grub_malloc (*ptr + 1); ++ if (grub_add (*ptr, 1, &sz)) ++ { ++ grub_free (lv->internal_id); ++ grub_free (lv); ++ goto fail2; ++ } ++ lv->name = grub_malloc (sz); + if (!lv->name) + { + grub_free (lv->internal_id); +@@ -599,10 +607,13 @@ make_vg (grub_disk_t disk, + if (lv->segments->node_alloc == lv->segments->node_count) + { + void *t; +- lv->segments->node_alloc *= 2; +- t = grub_realloc (lv->segments->nodes, +- sizeof (*lv->segments->nodes) +- * lv->segments->node_alloc); ++ grub_size_t sz; ++ ++ if (grub_mul (lv->segments->node_alloc, 2, &lv->segments->node_alloc) || ++ grub_mul (lv->segments->node_alloc, sizeof (*lv->segments->nodes), &sz)) ++ goto fail2; ++ ++ t = grub_realloc (lv->segments->nodes, sz); + if (!t) + goto fail2; + lv->segments->nodes = t; +@@ -723,10 +734,13 @@ make_vg (grub_disk_t disk, + if (comp->segment_alloc == comp->segment_count) + { + void *t; +- comp->segment_alloc *= 2; +- t = grub_realloc (comp->segments, +- comp->segment_alloc +- * sizeof (*comp->segments)); ++ grub_size_t sz; ++ ++ if (grub_mul (comp->segment_alloc, 2, &comp->segment_alloc) || ++ grub_mul (comp->segment_alloc, sizeof (*comp->segments), &sz)) ++ goto fail2; ++ ++ t = grub_realloc (comp->segments, sz); + if (!t) + goto fail2; + comp->segments = t; +diff --git a/grub-core/font/font.c b/grub-core/font/font.c +index 8e118b315..5edb477ac 100644 +--- a/grub-core/font/font.c ++++ b/grub-core/font/font.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -360,9 +361,13 @@ static char * + read_section_as_string (struct font_file_section *section) + { + char *str; ++ grub_size_t sz; + grub_ssize_t ret; + +- str = grub_malloc (section->length + 1); ++ if (grub_add (section->length, 1, &sz)) ++ return NULL; ++ ++ str = grub_malloc (sz); + if (!str) + return 0; + +diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +index 11272efc1..2b65bd56a 100644 +--- a/grub-core/fs/btrfs.c ++++ b/grub-core/fs/btrfs.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -329,9 +330,13 @@ save_ref (struct grub_btrfs_leaf_descriptor *desc, + if (desc->allocated < desc->depth) + { + void *newdata; +- desc->allocated *= 2; +- newdata = grub_realloc (desc->data, sizeof (desc->data[0]) +- * desc->allocated); ++ grub_size_t sz; ++ ++ if (grub_mul (desc->allocated, 2, &desc->allocated) || ++ grub_mul (desc->allocated, sizeof (desc->data[0]), &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ newdata = grub_realloc (desc->data, sz); + if (!newdata) + return grub_errno; + desc->data = newdata; +@@ -622,16 +627,21 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id) + if (data->n_devices_attached > data->n_devices_allocated) + { + void *tmp; +- data->n_devices_allocated = 2 * data->n_devices_attached + 1; +- data->devices_attached +- = grub_realloc (tmp = data->devices_attached, +- data->n_devices_allocated +- * sizeof (data->devices_attached[0])); ++ grub_size_t sz; ++ ++ if (grub_mul (data->n_devices_attached, 2, &data->n_devices_allocated) || ++ grub_add (data->n_devices_allocated, 1, &data->n_devices_allocated) || ++ grub_mul (data->n_devices_allocated, sizeof (data->devices_attached[0]), &sz)) ++ goto fail; ++ ++ data->devices_attached = grub_realloc (tmp = data->devices_attached, sz); + if (!data->devices_attached) + { ++ data->devices_attached = tmp; ++ ++ fail: + if (ctx.dev_found) + grub_device_close (ctx.dev_found); +- data->devices_attached = tmp; + return NULL; + } + } +diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c +index 9b389802a..ac33bcd68 100644 +--- a/grub-core/fs/ext2.c ++++ b/grub-core/fs/ext2.c +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -703,6 +704,7 @@ grub_ext2_read_symlink (grub_fshelp_node_t node) + { + char *symlink; + struct grub_fshelp_node *diro = node; ++ grub_size_t sz; + + if (! diro->inode_read) + { +@@ -717,7 +719,13 @@ grub_ext2_read_symlink (grub_fshelp_node_t node) + } + } + +- symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1); ++ if (grub_add (grub_le_to_cpu32 (diro->inode.size), 1, &sz)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ return NULL; ++ } ++ ++ symlink = grub_malloc (sz); + if (! symlink) + return 0; + +diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c +index 4f1b52a55..7ba5b300b 100644 +--- a/grub-core/fs/iso9660.c ++++ b/grub-core/fs/iso9660.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -531,8 +532,13 @@ add_part (struct iterate_dir_ctx *ctx, + int len2) + { + int size = ctx->symlink ? grub_strlen (ctx->symlink) : 0; ++ grub_size_t sz; + +- ctx->symlink = grub_realloc (ctx->symlink, size + len2 + 1); ++ if (grub_add (size, len2, &sz) || ++ grub_add (sz, 1, &sz)) ++ return; ++ ++ ctx->symlink = grub_realloc (ctx->symlink, sz); + if (! ctx->symlink) + return; + +@@ -560,17 +566,24 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry, + { + grub_size_t off = 0, csize = 1; + char *old; ++ grub_size_t sz; ++ + csize = entry->len - 5; + old = ctx->filename; + if (ctx->filename_alloc) + { + off = grub_strlen (ctx->filename); +- ctx->filename = grub_realloc (ctx->filename, csize + off + 1); ++ if (grub_add (csize, off, &sz) || ++ grub_add (sz, 1, &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ctx->filename = grub_realloc (ctx->filename, sz); + } + else + { + off = 0; +- ctx->filename = grub_zalloc (csize + 1); ++ if (grub_add (csize, 1, &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ctx->filename = grub_zalloc (sz); + } + if (!ctx->filename) + { +@@ -776,14 +789,18 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, + if (node->have_dirents >= node->alloc_dirents) + { + struct grub_fshelp_node *new_node; +- node->alloc_dirents *= 2; +- new_node = grub_realloc (node, +- sizeof (struct grub_fshelp_node) +- + ((node->alloc_dirents +- - ARRAY_SIZE (node->dirents)) +- * sizeof (node->dirents[0]))); ++ grub_size_t sz; ++ ++ if (grub_mul (node->alloc_dirents, 2, &node->alloc_dirents) || ++ grub_sub (node->alloc_dirents, ARRAY_SIZE (node->dirents), &sz) || ++ grub_mul (sz, sizeof (node->dirents[0]), &sz) || ++ grub_add (sz, sizeof (struct grub_fshelp_node), &sz)) ++ goto fail_0; ++ ++ new_node = grub_realloc (node, sz); + if (!new_node) + { ++ fail_0: + if (ctx.filename_alloc) + grub_free (ctx.filename); + grub_free (node); +@@ -799,14 +816,18 @@ grub_iso9660_iterate_dir (grub_fshelp_node_t dir, + * sizeof (node->dirents[0]) < grub_strlen (ctx.symlink) + 1) + { + struct grub_fshelp_node *new_node; +- new_node = grub_realloc (node, +- sizeof (struct grub_fshelp_node) +- + ((node->alloc_dirents +- - ARRAY_SIZE (node->dirents)) +- * sizeof (node->dirents[0])) +- + grub_strlen (ctx.symlink) + 1); ++ grub_size_t sz; ++ ++ if (grub_sub (node->alloc_dirents, ARRAY_SIZE (node->dirents), &sz) || ++ grub_mul (sz, sizeof (node->dirents[0]), &sz) || ++ grub_add (sz, sizeof (struct grub_fshelp_node) + 1, &sz) || ++ grub_add (sz, grub_strlen (ctx.symlink), &sz)) ++ goto fail_1; ++ ++ new_node = grub_realloc (node, sz); + if (!new_node) + { ++ fail_1: + if (ctx.filename_alloc) + grub_free (ctx.filename); + grub_free (node); +diff --git a/grub-core/fs/sfs.c b/grub-core/fs/sfs.c +index 90f7fb379..de2b107a4 100644 +--- a/grub-core/fs/sfs.c ++++ b/grub-core/fs/sfs.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -307,10 +308,15 @@ grub_sfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) + if (node->cache && node->cache_size >= node->cache_allocated) + { + struct cache_entry *e = node->cache; +- e = grub_realloc (node->cache,node->cache_allocated * 2 +- * sizeof (e[0])); ++ grub_size_t sz; ++ ++ if (grub_mul (node->cache_allocated, 2 * sizeof (e[0]), &sz)) ++ goto fail; ++ ++ e = grub_realloc (node->cache, sz); + if (!e) + { ++ fail: + grub_errno = 0; + grub_free (node->cache); + node->cache = 0; +@@ -477,10 +483,16 @@ grub_sfs_create_node (struct grub_fshelp_node **node, + grub_size_t len = grub_strlen (name); + grub_uint8_t *name_u8; + int ret; ++ grub_size_t sz; ++ ++ if (grub_mul (len, GRUB_MAX_UTF8_PER_LATIN1, &sz) || ++ grub_add (sz, 1, &sz)) ++ return 1; ++ + *node = grub_malloc (sizeof (**node)); + if (!*node) + return 1; +- name_u8 = grub_malloc (len * GRUB_MAX_UTF8_PER_LATIN1 + 1); ++ name_u8 = grub_malloc (sz); + if (!name_u8) + { + grub_free (*node); +@@ -724,8 +736,13 @@ grub_sfs_label (grub_device_t device, char **label) + data = grub_sfs_mount (disk); + if (data) + { +- grub_size_t len = grub_strlen (data->label); +- *label = grub_malloc (len * GRUB_MAX_UTF8_PER_LATIN1 + 1); ++ grub_size_t sz, len = grub_strlen (data->label); ++ ++ if (grub_mul (len, GRUB_MAX_UTF8_PER_LATIN1, &sz) || ++ grub_add (sz, 1, &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ *label = grub_malloc (sz); + if (*label) + *grub_latin1_to_utf8 ((grub_uint8_t *) *label, + (const grub_uint8_t *) data->label, +diff --git a/grub-core/fs/squash4.c b/grub-core/fs/squash4.c +index 95d5c1e1f..785123894 100644 +--- a/grub-core/fs/squash4.c ++++ b/grub-core/fs/squash4.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + + #include "xz.h" +@@ -459,7 +460,17 @@ grub_squash_read_symlink (grub_fshelp_node_t node) + { + char *ret; + grub_err_t err; +- ret = grub_malloc (grub_le_to_cpu32 (node->ino.symlink.namelen) + 1); ++ grub_size_t sz; ++ ++ if (grub_add (grub_le_to_cpu32 (node->ino.symlink.namelen), 1, &sz)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ return NULL; ++ } ++ ++ ret = grub_malloc (sz); ++ if (!ret) ++ return NULL; + + err = read_chunk (node->data, ret, + grub_le_to_cpu32 (node->ino.symlink.namelen), +@@ -506,11 +517,16 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, + + { + grub_fshelp_node_t node; +- node = grub_malloc (sizeof (*node) + dir->stsize * sizeof (dir->stack[0])); ++ grub_size_t sz; ++ ++ if (grub_mul (dir->stsize, sizeof (dir->stack[0]), &sz) || ++ grub_add (sz, sizeof (*node), &sz)) ++ return 0; ++ ++ node = grub_malloc (sz); + if (!node) + return 0; +- grub_memcpy (node, dir, +- sizeof (*node) + dir->stsize * sizeof (dir->stack[0])); ++ grub_memcpy (node, dir, sz); + if (hook (".", GRUB_FSHELP_DIR, node, hook_data)) + return 1; + +@@ -518,12 +534,15 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, + { + grub_err_t err; + +- node = grub_malloc (sizeof (*node) + dir->stsize * sizeof (dir->stack[0])); ++ if (grub_mul (dir->stsize, sizeof (dir->stack[0]), &sz) || ++ grub_add (sz, sizeof (*node), &sz)) ++ return 0; ++ ++ node = grub_malloc (sz); + if (!node) + return 0; + +- grub_memcpy (node, dir, +- sizeof (*node) + dir->stsize * sizeof (dir->stack[0])); ++ grub_memcpy (node, dir, sz); + + node->stsize--; + err = read_chunk (dir->data, &node->ino, sizeof (node->ino), +@@ -557,6 +576,7 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, + enum grub_fshelp_filetype filetype = GRUB_FSHELP_REG; + struct grub_squash_dirent di; + struct grub_squash_inode ino; ++ grub_size_t sz; + + err = read_chunk (dir->data, &di, sizeof (di), + grub_le_to_cpu64 (dir->data->sb.diroffset) +@@ -589,13 +609,16 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir, + if (grub_le_to_cpu16 (di.type) == SQUASH_TYPE_SYMLINK) + filetype = GRUB_FSHELP_SYMLINK; + +- node = grub_malloc (sizeof (*node) +- + (dir->stsize + 1) * sizeof (dir->stack[0])); ++ if (grub_add (dir->stsize, 1, &sz) || ++ grub_mul (sz, sizeof (dir->stack[0]), &sz) || ++ grub_add (sz, sizeof (*node), &sz)) ++ return 0; ++ ++ node = grub_malloc (sz); + if (! node) + return 0; + +- grub_memcpy (node, dir, +- sizeof (*node) + dir->stsize * sizeof (dir->stack[0])); ++ grub_memcpy (node, dir, sz - sizeof(dir->stack[0])); + + node->ino = ino; + node->stack[node->stsize].ino_chunk = grub_le_to_cpu32 (dh.ino_chunk); +diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c +index a83761674..21ac7f446 100644 +--- a/grub-core/fs/udf.c ++++ b/grub-core/fs/udf.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -890,9 +891,19 @@ read_string (const grub_uint8_t *raw, grub_size_t sz, char *outbuf) + utf16[i] = (raw[2 * i + 1] << 8) | raw[2*i + 2]; + } + if (!outbuf) +- outbuf = grub_malloc (utf16len * GRUB_MAX_UTF8_PER_UTF16 + 1); ++ { ++ grub_size_t size; ++ ++ if (grub_mul (utf16len, GRUB_MAX_UTF8_PER_UTF16, &size) || ++ grub_add (size, 1, &size)) ++ goto fail; ++ ++ outbuf = grub_malloc (size); ++ } + if (outbuf) + *grub_utf16_to_utf8 ((grub_uint8_t *) outbuf, utf16, utf16len) = '\0'; ++ ++ fail: + grub_free (utf16); + return outbuf; + } +@@ -1005,7 +1016,7 @@ grub_udf_read_symlink (grub_fshelp_node_t node) + grub_size_t sz = U64 (node->block.fe.file_size); + grub_uint8_t *raw; + const grub_uint8_t *ptr; +- char *out, *optr; ++ char *out = NULL, *optr; + + if (sz < 4) + return NULL; +@@ -1013,14 +1024,16 @@ grub_udf_read_symlink (grub_fshelp_node_t node) + if (!raw) + return NULL; + if (grub_udf_read_file (node, NULL, NULL, 0, sz, (char *) raw) < 0) +- { +- grub_free (raw); +- return NULL; +- } ++ goto fail_1; + +- out = grub_malloc (sz * 2 + 1); ++ if (grub_mul (sz, 2, &sz) || ++ grub_add (sz, 1, &sz)) ++ goto fail_0; ++ ++ out = grub_malloc (sz); + if (!out) + { ++ fail_0: + grub_free (raw); + return NULL; + } +@@ -1031,17 +1044,17 @@ grub_udf_read_symlink (grub_fshelp_node_t node) + { + grub_size_t s; + if ((grub_size_t) (ptr - raw + 4) > sz) +- goto fail; ++ goto fail_1; + if (!(ptr[2] == 0 && ptr[3] == 0)) +- goto fail; ++ goto fail_1; + s = 4 + ptr[1]; + if ((grub_size_t) (ptr - raw + s) > sz) +- goto fail; ++ goto fail_1; + switch (*ptr) + { + case 1: + if (ptr[1]) +- goto fail; ++ goto fail_1; + /* Fallthrough. */ + case 2: + /* in 4 bytes. out: 1 byte. */ +@@ -1066,11 +1079,11 @@ grub_udf_read_symlink (grub_fshelp_node_t node) + if (optr != out) + *optr++ = '/'; + if (!read_string (ptr + 4, s - 4, optr)) +- goto fail; ++ goto fail_1; + optr += grub_strlen (optr); + break; + default: +- goto fail; ++ goto fail_1; + } + ptr += s; + } +@@ -1078,7 +1091,7 @@ grub_udf_read_symlink (grub_fshelp_node_t node) + grub_free (raw); + return out; + +- fail: ++ fail_1: + grub_free (raw); + grub_free (out); + grub_error (GRUB_ERR_BAD_FS, "invalid symlink"); +diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c +index 96ffecbfc..ea6590290 100644 +--- a/grub-core/fs/xfs.c ++++ b/grub-core/fs/xfs.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -899,6 +900,7 @@ static struct grub_xfs_data * + grub_xfs_mount (grub_disk_t disk) + { + struct grub_xfs_data *data = 0; ++ grub_size_t sz; + + data = grub_zalloc (sizeof (struct grub_xfs_data)); + if (!data) +@@ -913,10 +915,11 @@ grub_xfs_mount (grub_disk_t disk) + if (!grub_xfs_sb_valid(data)) + goto fail; + +- data = grub_realloc (data, +- sizeof (struct grub_xfs_data) +- - sizeof (struct grub_xfs_inode) +- + grub_xfs_inode_size(data) + 1); ++ if (grub_add (grub_xfs_inode_size (data), ++ sizeof (struct grub_xfs_data) - sizeof (struct grub_xfs_inode) + 1, &sz)) ++ goto fail; ++ ++ data = grub_realloc (data, sz); + + if (! data) + goto fail; +diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c +index 381dde556..36d0373a6 100644 +--- a/grub-core/fs/zfs/zfs.c ++++ b/grub-core/fs/zfs/zfs.c +@@ -55,6 +55,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -773,11 +774,14 @@ fill_vdev_info (struct grub_zfs_data *data, + if (data->n_devices_attached > data->n_devices_allocated) + { + void *tmp; +- data->n_devices_allocated = 2 * data->n_devices_attached + 1; +- data->devices_attached +- = grub_realloc (tmp = data->devices_attached, +- data->n_devices_allocated +- * sizeof (data->devices_attached[0])); ++ grub_size_t sz; ++ ++ if (grub_mul (data->n_devices_attached, 2, &data->n_devices_allocated) || ++ grub_add (data->n_devices_allocated, 1, &data->n_devices_allocated) || ++ grub_mul (data->n_devices_allocated, sizeof (data->devices_attached[0]), &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ data->devices_attached = grub_realloc (tmp = data->devices_attached, sz); + if (!data->devices_attached) + { + data->devices_attached = tmp; +@@ -3468,14 +3472,18 @@ grub_zfs_nvlist_lookup_nvlist (const char *nvlist, const char *name) + { + char *nvpair; + char *ret; +- grub_size_t size; ++ grub_size_t size, sz; + int found; + + found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair, + &size, 0); + if (!found) + return 0; +- ret = grub_zalloc (size + 3 * sizeof (grub_uint32_t)); ++ ++ if (grub_add (size, 3 * sizeof (grub_uint32_t), &sz)) ++ return 0; ++ ++ ret = grub_zalloc (sz); + if (!ret) + return 0; + grub_memcpy (ret, nvlist, sizeof (grub_uint32_t)); +diff --git a/grub-core/fs/zfs/zfscrypt.c b/grub-core/fs/zfs/zfscrypt.c +index 1402e0bc2..de3b015f5 100644 +--- a/grub-core/fs/zfs/zfscrypt.c ++++ b/grub-core/fs/zfs/zfscrypt.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -82,9 +83,13 @@ grub_zfs_add_key (grub_uint8_t *key_in, + int passphrase) + { + struct grub_zfs_wrap_key *key; ++ grub_size_t sz; ++ + if (!passphrase && keylen > 32) + keylen = 32; +- key = grub_malloc (sizeof (*key) + keylen); ++ if (grub_add (sizeof (*key), keylen, &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ key = grub_malloc (sz); + if (!key) + return grub_errno; + key->is_passphrase = passphrase; +diff --git a/grub-core/lib/arg.c b/grub-core/lib/arg.c +index fd7744a6f..3288609a5 100644 +--- a/grub-core/lib/arg.c ++++ b/grub-core/lib/arg.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + /* Built-in parser for default options. */ + static const struct grub_arg_option help_options[] = +@@ -216,7 +217,13 @@ static inline grub_err_t + add_arg (char ***argl, int *num, char *s) + { + char **p = *argl; +- *argl = grub_realloc (*argl, (++(*num) + 1) * sizeof (char *)); ++ grub_size_t sz; ++ ++ if (grub_add (++(*num), 1, &sz) || ++ grub_mul (sz, sizeof (char *), &sz)) ++ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ ++ *argl = grub_realloc (*argl, sz); + if (! *argl) + { + grub_free (p); +@@ -431,6 +438,7 @@ grub_arg_list_alloc(grub_extcmd_t extcmd, int argc, + grub_size_t argcnt; + struct grub_arg_list *list; + const struct grub_arg_option *options; ++ grub_size_t sz0, sz1; + + options = extcmd->options; + if (! options) +@@ -443,7 +451,15 @@ grub_arg_list_alloc(grub_extcmd_t extcmd, int argc, + argcnt += ((grub_size_t) argc + 1) / 2 + 1; /* max possible for any option */ + } + +- list = grub_zalloc (sizeof (*list) * i + sizeof (char*) * argcnt); ++ if (grub_mul (sizeof (*list), i, &sz0) || ++ grub_mul (sizeof (char *), argcnt, &sz1) || ++ grub_add (sz0, sz1, &sz0)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ return 0; ++ } ++ ++ list = grub_zalloc (sz0); + if (! list) + return 0; + +diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c +index 3730ed382..b92cbe98d 100644 +--- a/grub-core/loader/i386/bsd.c ++++ b/grub-core/loader/i386/bsd.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + #ifdef GRUB_MACHINE_PCBIOS + #include +@@ -1012,11 +1013,16 @@ grub_netbsd_add_modules (void) + struct grub_netbsd_btinfo_modules *mods; + unsigned i; + grub_err_t err; ++ grub_size_t sz; + + for (mod = netbsd_mods; mod; mod = mod->next) + modcnt++; + +- mods = grub_malloc (sizeof (*mods) + sizeof (mods->mods[0]) * modcnt); ++ if (grub_mul (modcnt, sizeof (mods->mods[0]), &sz) || ++ grub_add (sz, sizeof (*mods), &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ mods = grub_malloc (sz); + if (!mods) + return grub_errno; + +diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c +index e332d5eb4..906ec7d67 100644 +--- a/grub-core/net/dns.c ++++ b/grub-core/net/dns.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + struct dns_cache_element + { +@@ -51,9 +52,15 @@ grub_net_add_dns_server (const struct grub_net_network_level_address *s) + { + int na = dns_servers_alloc * 2; + struct grub_net_network_level_address *ns; ++ grub_size_t sz; ++ + if (na < 8) + na = 8; +- ns = grub_realloc (dns_servers, na * sizeof (ns[0])); ++ ++ if (grub_mul (na, sizeof (ns[0]), &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ ns = grub_realloc (dns_servers, sz); + if (!ns) + return grub_errno; + dns_servers_alloc = na; +diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c +index d57fb72fa..4dfcc3107 100644 +--- a/grub-core/normal/charset.c ++++ b/grub-core/normal/charset.c +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + + #if HAVE_FONT_SOURCE + #include "widthspec.h" +@@ -464,6 +465,7 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, + { + struct grub_unicode_combining *n; + unsigned j; ++ grub_size_t sz; + + if (!haveout) + continue; +@@ -477,10 +479,14 @@ grub_unicode_aglomerate_comb (const grub_uint32_t *in, grub_size_t inlen, + n = out->combining_inline; + else if (out->ncomb > (int) ARRAY_SIZE (out->combining_inline)) + { +- n = grub_realloc (out->combining_ptr, +- sizeof (n[0]) * (out->ncomb + 1)); ++ if (grub_add (out->ncomb, 1, &sz) || ++ grub_mul (sz, sizeof (n[0]), &sz)) ++ goto fail; ++ ++ n = grub_realloc (out->combining_ptr, sz); + if (!n) + { ++ fail: + grub_errno = GRUB_ERR_NONE; + continue; + } +diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c +index c57242e2e..de03fe63b 100644 +--- a/grub-core/normal/cmdline.c ++++ b/grub-core/normal/cmdline.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + static grub_uint32_t *kill_buf; + +@@ -307,12 +308,21 @@ cl_insert (struct cmdline_term *cl_terms, unsigned nterms, + if (len + (*llen) >= (*max_len)) + { + grub_uint32_t *nbuf; +- (*max_len) *= 2; +- nbuf = grub_realloc ((*buf), sizeof (grub_uint32_t) * (*max_len)); ++ grub_size_t sz; ++ ++ if (grub_mul (*max_len, 2, max_len) || ++ grub_mul (*max_len, sizeof (grub_uint32_t), &sz)) ++ { ++ grub_errno = GRUB_ERR_OUT_OF_RANGE; ++ goto fail; ++ } ++ ++ nbuf = grub_realloc ((*buf), sz); + if (nbuf) + (*buf) = nbuf; + else + { ++ fail: + grub_print_error (); + grub_errno = GRUB_ERR_NONE; + (*max_len) /= 2; +diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c +index 1993995be..50eef918c 100644 +--- a/grub-core/normal/menu_entry.c ++++ b/grub-core/normal/menu_entry.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + enum update_mode + { +@@ -113,10 +114,18 @@ ensure_space (struct line *linep, int extra) + { + if (linep->max_len < linep->len + extra) + { +- linep->max_len = 2 * (linep->len + extra); +- linep->buf = grub_realloc (linep->buf, (linep->max_len + 1) * sizeof (linep->buf[0])); ++ grub_size_t sz0, sz1; ++ ++ if (grub_add (linep->len, extra, &sz0) || ++ grub_mul (sz0, 2, &sz0) || ++ grub_add (sz0, 1, &sz1) || ++ grub_mul (sz1, sizeof (linep->buf[0]), &sz1)) ++ return 0; ++ ++ linep->buf = grub_realloc (linep->buf, sz1); + if (! linep->buf) + return 0; ++ linep->max_len = sz0; + } + + return 1; +diff --git a/grub-core/script/argv.c b/grub-core/script/argv.c +index 217ec5d1e..5751fdd57 100644 +--- a/grub-core/script/argv.c ++++ b/grub-core/script/argv.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + /* Return nearest power of two that is >= v. */ + static unsigned +@@ -81,11 +82,16 @@ int + grub_script_argv_next (struct grub_script_argv *argv) + { + char **p = argv->args; ++ grub_size_t sz; + + if (argv->args && argv->argc && argv->args[argv->argc - 1] == 0) + return 0; + +- p = grub_realloc (p, round_up_exp ((argv->argc + 2) * sizeof (char *))); ++ if (grub_add (argv->argc, 2, &sz) || ++ grub_mul (sz, sizeof (char *), &sz)) ++ return 1; ++ ++ p = grub_realloc (p, round_up_exp (sz)); + if (! p) + return 1; + +@@ -105,13 +111,19 @@ grub_script_argv_append (struct grub_script_argv *argv, const char *s, + { + grub_size_t a; + char *p = argv->args[argv->argc - 1]; ++ grub_size_t sz; + + if (! s) + return 0; + + a = p ? grub_strlen (p) : 0; + +- p = grub_realloc (p, round_up_exp ((a + slen + 1) * sizeof (char))); ++ if (grub_add (a, slen, &sz) || ++ grub_add (sz, 1, &sz) || ++ grub_mul (sz, sizeof (char), &sz)) ++ return 1; ++ ++ p = grub_realloc (p, round_up_exp (sz)); + if (! p) + return 1; + +diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c +index c6bd3172f..5fb0cbd0b 100644 +--- a/grub-core/script/lexer.c ++++ b/grub-core/script/lexer.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #define yytext_ptr char * + #include "grub_script.tab.h" +@@ -110,10 +111,14 @@ grub_script_lexer_record (struct grub_parser_param *parser, char *str) + old = lexer->recording; + if (lexer->recordlen < len) + lexer->recordlen = len; +- lexer->recordlen *= 2; ++ ++ if (grub_mul (lexer->recordlen, 2, &lexer->recordlen)) ++ goto fail; ++ + lexer->recording = grub_realloc (lexer->recording, lexer->recordlen); + if (!lexer->recording) + { ++ fail: + grub_free (old); + lexer->recordpos = 0; + lexer->recordlen = 0; +@@ -130,7 +135,7 @@ int + grub_script_lexer_yywrap (struct grub_parser_param *parserstate, + const char *input) + { +- grub_size_t len = 0; ++ grub_size_t len = 0, sz; + char *p = 0; + char *line = 0; + YY_BUFFER_STATE buffer; +@@ -168,12 +173,22 @@ grub_script_lexer_yywrap (struct grub_parser_param *parserstate, + } + else if (len && line[len - 1] != '\n') + { +- p = grub_realloc (line, len + 2); ++ if (grub_add (len, 2, &sz)) ++ { ++ grub_free (line); ++ grub_script_yyerror (parserstate, N_("overflow is detected")); ++ return 1; ++ } ++ ++ p = grub_realloc (line, sz); + if (p) + { + p[len++] = '\n'; + p[len] = '\0'; + } ++ else ++ grub_free (line); ++ + line = p; + } + +diff --git a/grub-core/video/bitmap.c b/grub-core/video/bitmap.c +index b2e031566..6256e209a 100644 +--- a/grub-core/video/bitmap.c ++++ b/grub-core/video/bitmap.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -58,7 +59,7 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap, + enum grub_video_blit_format blit_format) + { + struct grub_video_mode_info *mode_info; +- unsigned int size; ++ grub_size_t size; + + if (!bitmap) + return grub_error (GRUB_ERR_BUG, "invalid argument"); +@@ -137,19 +138,25 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap, + + mode_info->pitch = width * mode_info->bytes_per_pixel; + +- /* Calculate size needed for the data. */ +- size = (width * mode_info->bytes_per_pixel) * height; ++ /* Calculate size needed for the data. */ ++ if (grub_mul (width, mode_info->bytes_per_pixel, &size) || ++ grub_mul (size, height, &size)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ goto fail; ++ } + + (*bitmap)->data = grub_zalloc (size); + if (! (*bitmap)->data) +- { +- grub_free (*bitmap); +- *bitmap = 0; +- +- return grub_errno; +- } ++ goto fail; + + return GRUB_ERR_NONE; ++ ++ fail: ++ grub_free (*bitmap); ++ *bitmap = NULL; ++ ++ return grub_errno; + } + + /* Frees all resources allocated by bitmap. */ +diff --git a/grub-core/video/readers/png.c b/grub-core/video/readers/png.c +index 61bd64537..0157ff742 100644 +--- a/grub-core/video/readers/png.c ++++ b/grub-core/video/readers/png.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -301,9 +302,17 @@ grub_png_decode_image_header (struct grub_png_data *data) + data->bpp <<= 1; + + data->color_bits = color_bits; +- data->row_bytes = data->image_width * data->bpp; ++ ++ if (grub_mul (data->image_width, data->bpp, &data->row_bytes)) ++ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ + if (data->color_bits <= 4) +- data->row_bytes = (data->image_width * data->color_bits + 7) / 8; ++ { ++ if (grub_mul (data->image_width, data->color_bits + 7, &data->row_bytes)) ++ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ ++ data->row_bytes >>= 3; ++ } + + #ifndef GRUB_CPU_WORDS_BIGENDIAN + if (data->is_16bit || data->is_gray || data->is_palette) +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0007-iso9660-Don-t-leak-memory-on-realloc-failures.patch b/buildroot/boot/grub2/0007-iso9660-Don-t-leak-memory-on-realloc-failures.patch new file mode 100644 index 000000000..6b0aee080 --- /dev/null +++ b/buildroot/boot/grub2/0007-iso9660-Don-t-leak-memory-on-realloc-failures.patch @@ -0,0 +1,72 @@ +From e0dd17a3ce79c6622dc78c96e1f2ef1b20e2bf7b Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Sat, 4 Jul 2020 12:25:09 -0400 +Subject: [PATCH] iso9660: Don't leak memory on realloc() failures +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/fs/iso9660.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c +index 7ba5b300b..5ec4433b8 100644 +--- a/grub-core/fs/iso9660.c ++++ b/grub-core/fs/iso9660.c +@@ -533,14 +533,20 @@ add_part (struct iterate_dir_ctx *ctx, + { + int size = ctx->symlink ? grub_strlen (ctx->symlink) : 0; + grub_size_t sz; ++ char *new; + + if (grub_add (size, len2, &sz) || + grub_add (sz, 1, &sz)) + return; + +- ctx->symlink = grub_realloc (ctx->symlink, sz); +- if (! ctx->symlink) +- return; ++ new = grub_realloc (ctx->symlink, sz); ++ if (!new) ++ { ++ grub_free (ctx->symlink); ++ ctx->symlink = NULL; ++ return; ++ } ++ ctx->symlink = new; + + grub_memcpy (ctx->symlink + size, part, len2); + ctx->symlink[size + len2] = 0; +@@ -634,7 +640,12 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry, + is the length. Both are part of the `Component + Record'. */ + if (ctx->symlink && !ctx->was_continue) +- add_part (ctx, "/", 1); ++ { ++ add_part (ctx, "/", 1); ++ if (grub_errno) ++ return grub_errno; ++ } ++ + add_part (ctx, (char *) &entry->data[pos + 2], + entry->data[pos + 1]); + ctx->was_continue = (entry->data[pos] & 1); +@@ -653,6 +664,11 @@ susp_iterate_dir (struct grub_iso9660_susp_entry *entry, + add_part (ctx, "/", 1); + break; + } ++ ++ /* Check if grub_realloc() failed in add_part(). */ ++ if (grub_errno) ++ return grub_errno; ++ + /* In pos + 1 the length of the `Component Record' is + stored. */ + pos += entry->data[pos + 1] + 2; +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0008-font-Do-not-load-more-than-one-NAME-section.patch b/buildroot/boot/grub2/0008-font-Do-not-load-more-than-one-NAME-section.patch new file mode 100644 index 000000000..f4616292f --- /dev/null +++ b/buildroot/boot/grub2/0008-font-Do-not-load-more-than-one-NAME-section.patch @@ -0,0 +1,41 @@ +From 73bc7a964c9496d5b0f00dbd69959dacf5adcebe Mon Sep 17 00:00:00 2001 +From: Daniel Kiper +Date: Tue, 7 Jul 2020 15:36:26 +0200 +Subject: [PATCH] font: Do not load more than one NAME section +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The GRUB font file can have one NAME section only. Though if somebody +crafts a broken font file with many NAME sections and loads it then the +GRUB leaks memory. So, prevent against that by loading first NAME +section and failing in controlled way on following one. + +Reported-by: Chris Coulson +Signed-off-by: Daniel Kiper +Reviewed-by: Jan Setje-Eilers +Signed-off-by: Stefan Sørensen +--- + grub-core/font/font.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/grub-core/font/font.c b/grub-core/font/font.c +index 5edb477ac..d09bb38d8 100644 +--- a/grub-core/font/font.c ++++ b/grub-core/font/font.c +@@ -532,6 +532,12 @@ grub_font_load (const char *filename) + if (grub_memcmp (section.name, FONT_FORMAT_SECTION_NAMES_FONT_NAME, + sizeof (FONT_FORMAT_SECTION_NAMES_FONT_NAME) - 1) == 0) + { ++ if (font->name != NULL) ++ { ++ grub_error (GRUB_ERR_BAD_FONT, "invalid font file: too many NAME sections"); ++ goto fail; ++ } ++ + font->name = read_section_as_string (§ion); + if (!font->name) + goto fail; +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0009-gfxmenu-Fix-double-free-in-load_image.patch b/buildroot/boot/grub2/0009-gfxmenu-Fix-double-free-in-load_image.patch new file mode 100644 index 000000000..732d16664 --- /dev/null +++ b/buildroot/boot/grub2/0009-gfxmenu-Fix-double-free-in-load_image.patch @@ -0,0 +1,39 @@ +From 9ff609f0e7798bc5fb04f791131c98e7693bdd9b Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Wed, 8 Jul 2020 20:41:56 +0000 +Subject: [PATCH] gfxmenu: Fix double free in load_image() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +self->bitmap should be zeroed after free. Otherwise, there is a chance +to double free (USE_AFTER_FREE) it later in rescale_image(). + +Fixes: CID 292472 + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/gfxmenu/gui_image.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/grub-core/gfxmenu/gui_image.c b/grub-core/gfxmenu/gui_image.c +index 29784ed2d..6b2e976f1 100644 +--- a/grub-core/gfxmenu/gui_image.c ++++ b/grub-core/gfxmenu/gui_image.c +@@ -195,7 +195,10 @@ load_image (grub_gui_image_t self, const char *path) + return grub_errno; + + if (self->bitmap && (self->bitmap != self->raw_bitmap)) +- grub_video_bitmap_destroy (self->bitmap); ++ { ++ grub_video_bitmap_destroy (self->bitmap); ++ self->bitmap = 0; ++ } + if (self->raw_bitmap) + grub_video_bitmap_destroy (self->raw_bitmap); + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0010-xnu-Fix-double-free-in-grub_xnu_devprop_add_property.patch b/buildroot/boot/grub2/0010-xnu-Fix-double-free-in-grub_xnu_devprop_add_property.patch new file mode 100644 index 000000000..72cf58d44 --- /dev/null +++ b/buildroot/boot/grub2/0010-xnu-Fix-double-free-in-grub_xnu_devprop_add_property.patch @@ -0,0 +1,58 @@ +From dc9777dc17697b196c415c53187a55861d41fd2a Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Wed, 8 Jul 2020 21:30:43 +0000 +Subject: [PATCH] xnu: Fix double free in grub_xnu_devprop_add_property() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +grub_xnu_devprop_add_property() should not free utf8 and utf16 as it get +allocated and freed in the caller. + +Minor improvement: do prop fields initialization after memory allocations. + +Fixes: CID 292442, CID 292457, CID 292460, CID 292466 + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/i386/xnu.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c +index b7d176b5d..e9e119259 100644 +--- a/grub-core/loader/i386/xnu.c ++++ b/grub-core/loader/i386/xnu.c +@@ -262,20 +262,19 @@ grub_xnu_devprop_add_property (struct grub_xnu_devprop_device_descriptor *dev, + if (!prop) + return grub_errno; + +- prop->name = utf8; +- prop->name16 = utf16; +- prop->name16len = utf16len; +- +- prop->length = datalen; +- prop->data = grub_malloc (prop->length); ++ prop->data = grub_malloc (datalen); + if (!prop->data) + { +- grub_free (prop->name); +- grub_free (prop->name16); + grub_free (prop); + return grub_errno; + } +- grub_memcpy (prop->data, data, prop->length); ++ grub_memcpy (prop->data, data, datalen); ++ ++ prop->name = utf8; ++ prop->name16 = utf16; ++ prop->name16len = utf16len; ++ prop->length = datalen; ++ + grub_list_push (GRUB_AS_LIST_P (&dev->properties), + GRUB_AS_LIST (prop)); + return GRUB_ERR_NONE; +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0011-lzma-Make-sure-we-don-t-dereference-past-array.patch b/buildroot/boot/grub2/0011-lzma-Make-sure-we-don-t-dereference-past-array.patch new file mode 100644 index 000000000..a7d5a48e5 --- /dev/null +++ b/buildroot/boot/grub2/0011-lzma-Make-sure-we-don-t-dereference-past-array.patch @@ -0,0 +1,55 @@ +From 78829f0c230680e386fff9f420bb1631bc20f761 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Thu, 9 Jul 2020 03:05:23 +0000 +Subject: [PATCH] lzma: Make sure we don't dereference past array +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The two dimensional array p->posSlotEncoder[4][64] is being dereferenced +using the GetLenToPosState() macro which checks if len is less than 5, +and if so subtracts 2 from it. If len = 0, that is 0 - 2 = 4294967294. +Obviously we don't want to dereference that far out so we check if the +position found is greater or equal kNumLenToPosStates (4) and bail out. + +N.B.: Upstream LZMA 18.05 and later has this function completely rewritten +without any history. + +Fixes: CID 51526 + +Signed-off-by: Konrad Rzeszutek Wilk +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/lib/LzmaEnc.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/grub-core/lib/LzmaEnc.c b/grub-core/lib/LzmaEnc.c +index f2ec04a8c..753e56a95 100644 +--- a/grub-core/lib/LzmaEnc.c ++++ b/grub-core/lib/LzmaEnc.c +@@ -1877,13 +1877,19 @@ static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize + } + else + { +- UInt32 posSlot; ++ UInt32 posSlot, lenToPosState; + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + pos -= LZMA_NUM_REPS; + GetPosSlot(pos, posSlot); +- RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); ++ lenToPosState = GetLenToPosState(len); ++ if (lenToPosState >= kNumLenToPosStates) ++ { ++ p->result = SZ_ERROR_DATA; ++ return CheckErrors(p); ++ } ++ RcTree_Encode(&p->rc, p->posSlotEncoder[lenToPosState], kNumPosSlotBits, posSlot); + + if (posSlot >= kStartPosModelIndex) + { +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0012-term-Fix-overflow-on-user-inputs.patch b/buildroot/boot/grub2/0012-term-Fix-overflow-on-user-inputs.patch new file mode 100644 index 000000000..77b01a481 --- /dev/null +++ b/buildroot/boot/grub2/0012-term-Fix-overflow-on-user-inputs.patch @@ -0,0 +1,69 @@ +From 8d3b6f9da468f666e3a7976657f2ab5c52762a21 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Tue, 7 Jul 2020 15:12:25 -0400 +Subject: [PATCH] term: Fix overflow on user inputs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This requires a very weird input from the serial interface but can cause +an overflow in input_buf (keys) overwriting the next variable (npending) +with the user choice: + +(pahole output) + +struct grub_terminfo_input_state { + int input_buf[6]; /* 0 24 */ + int npending; /* 24 4 */ <- CORRUPT + ...snip... + +The magic string requires causing this is "ESC,O,],0,1,2,q" and we overflow +npending with "q" (aka increase npending to 161). The simplest fix is to +just to disallow overwrites input_buf, which exactly what this patch does. + +Fixes: CID 292449 + +Signed-off-by: Konrad Rzeszutek Wilk +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/term/terminfo.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c +index d317efa36..5fa94c0c3 100644 +--- a/grub-core/term/terminfo.c ++++ b/grub-core/term/terminfo.c +@@ -398,7 +398,7 @@ grub_terminfo_getwh (struct grub_term_output *term) + } + + static void +-grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, ++grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, int max_len, + int (*readkey) (struct grub_term_input *term)) + { + int c; +@@ -414,6 +414,9 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, + if (c == -1) \ + return; \ + \ ++ if (*len >= max_len) \ ++ return; \ ++ \ + keys[*len] = c; \ + (*len)++; \ + } +@@ -602,8 +605,8 @@ grub_terminfo_getkey (struct grub_term_input *termi) + return ret; + } + +- grub_terminfo_readkey (termi, data->input_buf, +- &data->npending, data->readkey); ++ grub_terminfo_readkey (termi, data->input_buf, &data->npending, ++ GRUB_TERMINFO_READKEY_MAX_LEN, data->readkey); + + #if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275) + if (data->npending == 1 && data->input_buf[0] == GRUB_TERM_ESC +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0013-udf-Fix-memory-leak.patch b/buildroot/boot/grub2/0013-udf-Fix-memory-leak.patch new file mode 100644 index 000000000..d79de9059 --- /dev/null +++ b/buildroot/boot/grub2/0013-udf-Fix-memory-leak.patch @@ -0,0 +1,59 @@ +From 748b691761d31bfff7e9d0d210caa606294c2b52 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Tue, 7 Jul 2020 22:02:31 -0400 +Subject: [PATCH] udf: Fix memory leak +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CID 73796 + +Signed-off-by: Konrad Rzeszutek Wilk +Reviewed-by: Daniel Kiper +Reviewed-by: Jan Setje-Eilers +Signed-off-by: Stefan Sørensen +--- + grub-core/fs/udf.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c +index 21ac7f446..2ac5c1d00 100644 +--- a/grub-core/fs/udf.c ++++ b/grub-core/fs/udf.c +@@ -965,8 +965,10 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir, + return 0; + + if (grub_udf_read_icb (dir->data, &dirent.icb, child)) +- return 0; +- ++ { ++ grub_free (child); ++ return 0; ++ } + if (dirent.characteristics & GRUB_UDF_FID_CHAR_PARENT) + { + /* This is the parent directory. */ +@@ -988,11 +990,18 @@ grub_udf_iterate_dir (grub_fshelp_node_t dir, + dirent.file_ident_length, + (char *) raw)) + != dirent.file_ident_length) +- return 0; ++ { ++ grub_free (child); ++ return 0; ++ } + + filename = read_string (raw, dirent.file_ident_length, 0); + if (!filename) +- grub_print_error (); ++ { ++ /* As the hook won't get called. */ ++ grub_free (child); ++ grub_print_error (); ++ } + + if (filename && hook (filename, type, child, hook_data)) + { +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0014-multiboot2-Fix-memory-leak-if-grub_create_loader_cmd.patch b/buildroot/boot/grub2/0014-multiboot2-Fix-memory-leak-if-grub_create_loader_cmd.patch new file mode 100644 index 000000000..f3e2a0414 --- /dev/null +++ b/buildroot/boot/grub2/0014-multiboot2-Fix-memory-leak-if-grub_create_loader_cmd.patch @@ -0,0 +1,38 @@ +From 49bf3faa106498e151306fc780c63194a14751e3 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Fri, 26 Jun 2020 10:51:43 -0400 +Subject: [PATCH] multiboot2: Fix memory leak if + grub_create_loader_cmdline() fails +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: CID 292468 + +Signed-off-by: Konrad Rzeszutek Wilk +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/multiboot_mbi2.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c +index 53da78615..0efc66062 100644 +--- a/grub-core/loader/multiboot_mbi2.c ++++ b/grub-core/loader/multiboot_mbi2.c +@@ -1070,7 +1070,11 @@ grub_multiboot2_add_module (grub_addr_t start, grub_size_t size, + err = grub_create_loader_cmdline (argc, argv, newmod->cmdline, + newmod->cmdline_size, GRUB_VERIFY_MODULE_CMDLINE); + if (err) +- return err; ++ { ++ grub_free (newmod->cmdline); ++ grub_free (newmod); ++ return err; ++ } + + if (modules_last) + modules_last->next = newmod; +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0015-tftp-Do-not-use-priority-queue.patch b/buildroot/boot/grub2/0015-tftp-Do-not-use-priority-queue.patch new file mode 100644 index 000000000..833606bef --- /dev/null +++ b/buildroot/boot/grub2/0015-tftp-Do-not-use-priority-queue.patch @@ -0,0 +1,283 @@ +From b6c4a1b204740fe52b32e7f530831a59f4038e20 Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Thu, 9 Jul 2020 08:10:40 +0000 +Subject: [PATCH] tftp: Do not use priority queue +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There is not need to reassemble the order of blocks. Per RFC 1350, +server must wait for the ACK, before sending next block. Data packets +can be served immediately without putting them to priority queue. + +Logic to handle incoming packet is this: + - if packet block id equal to expected block id, then + process the packet, + - if packet block id is less than expected - this is retransmit + of old packet, then ACK it and drop the packet, + - if packet block id is more than expected - that shouldn't + happen, just drop the packet. + +It makes the tftp receive path code simpler, smaller and faster. +As a benefit, this change fixes CID# 73624 and CID# 96690, caused +by following while loop: + + while (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) == 0) + +where tftph pointer is not moving from one iteration to another, causing +to serve same packet again. Luckily, double serving didn't happen due to +data->block++ during the first iteration. + +Fixes: CID 73624, CID 96690 + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/net/tftp.c | 168 ++++++++++++++----------------------------- + 1 file changed, 53 insertions(+), 115 deletions(-) + +diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c +index 7d90bf66e..b4297bc8d 100644 +--- a/grub-core/net/tftp.c ++++ b/grub-core/net/tftp.c +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + #include + + GRUB_MOD_LICENSE ("GPLv3+"); +@@ -106,31 +105,8 @@ typedef struct tftp_data + int have_oack; + struct grub_error_saved save_err; + grub_net_udp_socket_t sock; +- grub_priority_queue_t pq; + } *tftp_data_t; + +-static int +-cmp_block (grub_uint16_t a, grub_uint16_t b) +-{ +- grub_int16_t i = (grub_int16_t) (a - b); +- if (i > 0) +- return +1; +- if (i < 0) +- return -1; +- return 0; +-} +- +-static int +-cmp (const void *a__, const void *b__) +-{ +- struct grub_net_buff *a_ = *(struct grub_net_buff **) a__; +- struct grub_net_buff *b_ = *(struct grub_net_buff **) b__; +- struct tftphdr *a = (struct tftphdr *) a_->data; +- struct tftphdr *b = (struct tftphdr *) b_->data; +- /* We want the first elements to be on top. */ +- return -cmp_block (grub_be_to_cpu16 (a->u.data.block), grub_be_to_cpu16 (b->u.data.block)); +-} +- + static grub_err_t + ack (tftp_data_t data, grub_uint64_t block) + { +@@ -207,73 +183,60 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), + return GRUB_ERR_NONE; + } + +- err = grub_priority_queue_push (data->pq, &nb); +- if (err) +- return err; +- +- { +- struct grub_net_buff **nb_top_p, *nb_top; +- while (1) +- { +- nb_top_p = grub_priority_queue_top (data->pq); +- if (!nb_top_p) +- return GRUB_ERR_NONE; +- nb_top = *nb_top_p; +- tftph = (struct tftphdr *) nb_top->data; +- if (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) >= 0) +- break; +- ack (data, grub_be_to_cpu16 (tftph->u.data.block)); +- grub_netbuff_free (nb_top); +- grub_priority_queue_pop (data->pq); +- } +- while (cmp_block (grub_be_to_cpu16 (tftph->u.data.block), data->block + 1) == 0) +- { +- unsigned size; +- +- grub_priority_queue_pop (data->pq); +- +- if (file->device->net->packs.count < 50) ++ /* Ack old/retransmitted block. */ ++ if (grub_be_to_cpu16 (tftph->u.data.block) < data->block + 1) ++ ack (data, grub_be_to_cpu16 (tftph->u.data.block)); ++ /* Ignore unexpected block. */ ++ else if (grub_be_to_cpu16 (tftph->u.data.block) > data->block + 1) ++ grub_dprintf ("tftp", "TFTP unexpected block # %d\n", tftph->u.data.block); ++ else ++ { ++ unsigned size; ++ ++ if (file->device->net->packs.count < 50) ++ { + err = ack (data, data->block + 1); +- else +- { +- file->device->net->stall = 1; +- err = 0; +- } +- if (err) +- return err; +- +- err = grub_netbuff_pull (nb_top, sizeof (tftph->opcode) + +- sizeof (tftph->u.data.block)); +- if (err) +- return err; +- size = nb_top->tail - nb_top->data; +- +- data->block++; +- if (size < data->block_size) +- { +- if (data->ack_sent < data->block) +- ack (data, data->block); +- file->device->net->eof = 1; +- file->device->net->stall = 1; +- grub_net_udp_close (data->sock); +- data->sock = NULL; +- } +- /* Prevent garbage in broken cards. Is it still necessary +- given that IP implementation has been fixed? +- */ +- if (size > data->block_size) +- { +- err = grub_netbuff_unput (nb_top, size - data->block_size); +- if (err) +- return err; +- } +- /* If there is data, puts packet in socket list. */ +- if ((nb_top->tail - nb_top->data) > 0) +- grub_net_put_packet (&file->device->net->packs, nb_top); +- else +- grub_netbuff_free (nb_top); +- } +- } ++ if (err) ++ return err; ++ } ++ else ++ file->device->net->stall = 1; ++ ++ err = grub_netbuff_pull (nb, sizeof (tftph->opcode) + ++ sizeof (tftph->u.data.block)); ++ if (err) ++ return err; ++ size = nb->tail - nb->data; ++ ++ data->block++; ++ if (size < data->block_size) ++ { ++ if (data->ack_sent < data->block) ++ ack (data, data->block); ++ file->device->net->eof = 1; ++ file->device->net->stall = 1; ++ grub_net_udp_close (data->sock); ++ data->sock = NULL; ++ } ++ /* ++ * Prevent garbage in broken cards. Is it still necessary ++ * given that IP implementation has been fixed? ++ */ ++ if (size > data->block_size) ++ { ++ err = grub_netbuff_unput (nb, size - data->block_size); ++ if (err) ++ return err; ++ } ++ /* If there is data, puts packet in socket list. */ ++ if ((nb->tail - nb->data) > 0) ++ { ++ grub_net_put_packet (&file->device->net->packs, nb); ++ /* Do not free nb. */ ++ return GRUB_ERR_NONE; ++ } ++ } ++ grub_netbuff_free (nb); + return GRUB_ERR_NONE; + case TFTP_ERROR: + data->have_oack = 1; +@@ -287,19 +250,6 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)), + } + } + +-static void +-destroy_pq (tftp_data_t data) +-{ +- struct grub_net_buff **nb_p; +- while ((nb_p = grub_priority_queue_top (data->pq))) +- { +- grub_netbuff_free (*nb_p); +- grub_priority_queue_pop (data->pq); +- } +- +- grub_priority_queue_destroy (data->pq); +-} +- + static grub_err_t + tftp_open (struct grub_file *file, const char *filename) + { +@@ -372,17 +322,9 @@ tftp_open (struct grub_file *file, const char *filename) + file->not_easily_seekable = 1; + file->data = data; + +- data->pq = grub_priority_queue_new (sizeof (struct grub_net_buff *), cmp); +- if (!data->pq) +- { +- grub_free (data); +- return grub_errno; +- } +- + err = grub_net_resolve_address (file->device->net->server, &addr); + if (err) + { +- destroy_pq (data); + grub_free (data); + return err; + } +@@ -392,7 +334,6 @@ tftp_open (struct grub_file *file, const char *filename) + file); + if (!data->sock) + { +- destroy_pq (data); + grub_free (data); + return grub_errno; + } +@@ -406,7 +347,6 @@ tftp_open (struct grub_file *file, const char *filename) + if (err) + { + grub_net_udp_close (data->sock); +- destroy_pq (data); + grub_free (data); + return err; + } +@@ -423,7 +363,6 @@ tftp_open (struct grub_file *file, const char *filename) + if (grub_errno) + { + grub_net_udp_close (data->sock); +- destroy_pq (data); + grub_free (data); + return grub_errno; + } +@@ -466,7 +405,6 @@ tftp_close (struct grub_file *file) + grub_print_error (); + grub_net_udp_close (data->sock); + } +- destroy_pq (data); + grub_free (data); + return GRUB_ERR_NONE; + } +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0016-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch b/buildroot/boot/grub2/0016-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch new file mode 100644 index 000000000..293b9f89b --- /dev/null +++ b/buildroot/boot/grub2/0016-relocator-Protect-grub_relocator_alloc_chunk_addr-in.patch @@ -0,0 +1,153 @@ +From 1c7b619c84f229c1602c1958bcd054b6d9937562 Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Wed, 15 Jul 2020 06:42:37 +0000 +Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_addr() + input args against integer underflow/overflow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use arithmetic macros from safemath.h to accomplish it. In this commit, +I didn't want to be too paranoid to check every possible math equation +for overflow/underflow. Only obvious places (with non zero chance of +overflow/underflow) were refactored. + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/i386/linux.c | 9 +++++++-- + grub-core/loader/i386/pc/linux.c | 9 +++++++-- + grub-core/loader/i386/xen.c | 12 ++++++++++-- + grub-core/loader/xnu.c | 11 +++++++---- + 4 files changed, 31 insertions(+), 10 deletions(-) + +diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c +index d0501e229..02a73463a 100644 +--- a/grub-core/loader/i386/linux.c ++++ b/grub-core/loader/i386/linux.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -547,9 +548,13 @@ grub_linux_boot (void) + + { + grub_relocator_chunk_t ch; ++ grub_size_t sz; ++ ++ if (grub_add (ctx.real_size, efi_mmap_size, &sz)) ++ return GRUB_ERR_OUT_OF_RANGE; ++ + err = grub_relocator_alloc_chunk_addr (relocator, &ch, +- ctx.real_mode_target, +- (ctx.real_size + efi_mmap_size)); ++ ctx.real_mode_target, sz); + if (err) + return err; + real_mode_mem = get_virtual_current_address (ch); +diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c +index 47ea2945e..31f09922b 100644 +--- a/grub-core/loader/i386/pc/linux.c ++++ b/grub-core/loader/i386/pc/linux.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -218,8 +219,12 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), + setup_sects = GRUB_LINUX_DEFAULT_SETUP_SECTS; + + real_size = setup_sects << GRUB_DISK_SECTOR_BITS; +- grub_linux16_prot_size = grub_file_size (file) +- - real_size - GRUB_DISK_SECTOR_SIZE; ++ if (grub_sub (grub_file_size (file), real_size, &grub_linux16_prot_size) || ++ grub_sub (grub_linux16_prot_size, GRUB_DISK_SECTOR_SIZE, &grub_linux16_prot_size)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ goto fail; ++ } + + if (! grub_linux_is_bzimage + && GRUB_LINUX_ZIMAGE_ADDR + grub_linux16_prot_size +diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c +index 8f662c8ac..cd24874ca 100644 +--- a/grub-core/loader/i386/xen.c ++++ b/grub-core/loader/i386/xen.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -636,6 +637,7 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), + grub_relocator_chunk_t ch; + grub_addr_t kern_start; + grub_addr_t kern_end; ++ grub_size_t sz; + + if (argc == 0) + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); +@@ -703,8 +705,14 @@ grub_cmd_xen (grub_command_t cmd __attribute__ ((unused)), + + xen_state.max_addr = ALIGN_UP (kern_end, PAGE_SIZE); + +- err = grub_relocator_alloc_chunk_addr (xen_state.relocator, &ch, kern_start, +- kern_end - kern_start); ++ ++ if (grub_sub (kern_end, kern_start, &sz)) ++ { ++ err = GRUB_ERR_OUT_OF_RANGE; ++ goto fail; ++ } ++ ++ err = grub_relocator_alloc_chunk_addr (xen_state.relocator, &ch, kern_start, sz); + if (err) + goto fail; + kern_chunk_src = get_virtual_current_address (ch); +diff --git a/grub-core/loader/xnu.c b/grub-core/loader/xnu.c +index 77d7060e1..9ae4ceb35 100644 +--- a/grub-core/loader/xnu.c ++++ b/grub-core/loader/xnu.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -59,15 +60,17 @@ grub_xnu_heap_malloc (int size, void **src, grub_addr_t *target) + { + grub_err_t err; + grub_relocator_chunk_t ch; ++ grub_addr_t tgt; ++ ++ if (grub_add (grub_xnu_heap_target_start, grub_xnu_heap_size, &tgt)) ++ return GRUB_ERR_OUT_OF_RANGE; + +- err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch, +- grub_xnu_heap_target_start +- + grub_xnu_heap_size, size); ++ err = grub_relocator_alloc_chunk_addr (grub_xnu_relocator, &ch, tgt, size); + if (err) + return err; + + *src = get_virtual_current_address (ch); +- *target = grub_xnu_heap_target_start + grub_xnu_heap_size; ++ *target = tgt; + grub_xnu_heap_size += size; + grub_dprintf ("xnu", "val=%p\n", *src); + return GRUB_ERR_NONE; +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0017-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch b/buildroot/boot/grub2/0017-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch new file mode 100644 index 000000000..e04e72aba --- /dev/null +++ b/buildroot/boot/grub2/0017-relocator-Protect-grub_relocator_alloc_chunk_align-m.patch @@ -0,0 +1,341 @@ +From 0cfbbca3ccd84d36ffb1bcd6644ada7c73b19fc0 Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Wed, 8 Jul 2020 01:44:38 +0000 +Subject: [PATCH] relocator: Protect grub_relocator_alloc_chunk_align() + max_addr against integer underflow +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This commit introduces integer underflow mitigation in max_addr calculation +in grub_relocator_alloc_chunk_align() invocation. + +It consists of 2 fixes: + 1. Introduced grub_relocator_alloc_chunk_align_safe() wrapper function to perform + sanity check for min/max and size values, and to make safe invocation of + grub_relocator_alloc_chunk_align() with validated max_addr value. Replace all + invocations such as grub_relocator_alloc_chunk_align(..., min_addr, max_addr - size, size, ...) + by grub_relocator_alloc_chunk_align_safe(..., min_addr, max_addr, size, ...). + 2. Introduced UP_TO_TOP32(s) macro for the cases where max_addr is 32-bit top + address (0xffffffff - size + 1) or similar. + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/lib/i386/relocator.c | 28 ++++++++++---------------- + grub-core/lib/mips/relocator.c | 6 ++---- + grub-core/lib/powerpc/relocator.c | 6 ++---- + grub-core/lib/x86_64/efi/relocator.c | 7 +++---- + grub-core/loader/i386/linux.c | 5 ++--- + grub-core/loader/i386/multiboot_mbi.c | 7 +++---- + grub-core/loader/i386/pc/linux.c | 6 ++---- + grub-core/loader/mips/linux.c | 9 +++------ + grub-core/loader/multiboot.c | 2 +- + grub-core/loader/multiboot_elfxx.c | 10 ++++----- + grub-core/loader/multiboot_mbi2.c | 10 ++++----- + grub-core/loader/xnu_resume.c | 2 +- + include/grub/relocator.h | 29 +++++++++++++++++++++++++++ + 13 files changed, 69 insertions(+), 58 deletions(-) + +diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c +index 71dd4f0ab..34cbe834f 100644 +--- a/grub-core/lib/i386/relocator.c ++++ b/grub-core/lib/i386/relocator.c +@@ -83,11 +83,10 @@ grub_relocator32_boot (struct grub_relocator *rel, + /* Specific memory range due to Global Descriptor Table for use by payload + that we will store in returned chunk. The address range and preference + are based on "THE LINUX/x86 BOOT PROTOCOL" specification. */ +- err = grub_relocator_alloc_chunk_align (rel, &ch, 0x1000, +- 0x9a000 - RELOCATOR_SIZEOF (32), +- RELOCATOR_SIZEOF (32), 16, +- GRUB_RELOCATOR_PREFERENCE_LOW, +- avoid_efi_bootservices); ++ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0x1000, 0x9a000, ++ RELOCATOR_SIZEOF (32), 16, ++ GRUB_RELOCATOR_PREFERENCE_LOW, ++ avoid_efi_bootservices); + if (err) + return err; + +@@ -125,13 +124,10 @@ grub_relocator16_boot (struct grub_relocator *rel, + grub_relocator_chunk_t ch; + + /* Put it higher than the byte it checks for A20 check. */ +- err = grub_relocator_alloc_chunk_align (rel, &ch, 0x8010, +- 0xa0000 - RELOCATOR_SIZEOF (16) +- - GRUB_RELOCATOR16_STACK_SIZE, +- RELOCATOR_SIZEOF (16) +- + GRUB_RELOCATOR16_STACK_SIZE, 16, +- GRUB_RELOCATOR_PREFERENCE_NONE, +- 0); ++ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0x8010, 0xa0000, ++ RELOCATOR_SIZEOF (16) + ++ GRUB_RELOCATOR16_STACK_SIZE, 16, ++ GRUB_RELOCATOR_PREFERENCE_NONE, 0); + if (err) + return err; + +@@ -183,11 +179,9 @@ grub_relocator64_boot (struct grub_relocator *rel, + void *relst; + grub_relocator_chunk_t ch; + +- err = grub_relocator_alloc_chunk_align (rel, &ch, min_addr, +- max_addr - RELOCATOR_SIZEOF (64), +- RELOCATOR_SIZEOF (64), 16, +- GRUB_RELOCATOR_PREFERENCE_NONE, +- 0); ++ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, min_addr, max_addr, ++ RELOCATOR_SIZEOF (64), 16, ++ GRUB_RELOCATOR_PREFERENCE_NONE, 0); + if (err) + return err; + +diff --git a/grub-core/lib/mips/relocator.c b/grub-core/lib/mips/relocator.c +index 9d5f49cb9..743b213e6 100644 +--- a/grub-core/lib/mips/relocator.c ++++ b/grub-core/lib/mips/relocator.c +@@ -120,10 +120,8 @@ grub_relocator32_boot (struct grub_relocator *rel, + unsigned i; + grub_addr_t vtarget; + +- err = grub_relocator_alloc_chunk_align (rel, &ch, 0, +- (0xffffffff - stateset_size) +- + 1, stateset_size, +- sizeof (grub_uint32_t), ++ err = grub_relocator_alloc_chunk_align (rel, &ch, 0, UP_TO_TOP32 (stateset_size), ++ stateset_size, sizeof (grub_uint32_t), + GRUB_RELOCATOR_PREFERENCE_NONE, 0); + if (err) + return err; +diff --git a/grub-core/lib/powerpc/relocator.c b/grub-core/lib/powerpc/relocator.c +index bdf2b111b..8ffb8b686 100644 +--- a/grub-core/lib/powerpc/relocator.c ++++ b/grub-core/lib/powerpc/relocator.c +@@ -115,10 +115,8 @@ grub_relocator32_boot (struct grub_relocator *rel, + unsigned i; + grub_relocator_chunk_t ch; + +- err = grub_relocator_alloc_chunk_align (rel, &ch, 0, +- (0xffffffff - stateset_size) +- + 1, stateset_size, +- sizeof (grub_uint32_t), ++ err = grub_relocator_alloc_chunk_align (rel, &ch, 0, UP_TO_TOP32 (stateset_size), ++ stateset_size, sizeof (grub_uint32_t), + GRUB_RELOCATOR_PREFERENCE_NONE, 0); + if (err) + return err; +diff --git a/grub-core/lib/x86_64/efi/relocator.c b/grub-core/lib/x86_64/efi/relocator.c +index 3caef7a40..7d200a125 100644 +--- a/grub-core/lib/x86_64/efi/relocator.c ++++ b/grub-core/lib/x86_64/efi/relocator.c +@@ -50,10 +50,9 @@ grub_relocator64_efi_boot (struct grub_relocator *rel, + * 64-bit relocator code may live above 4 GiB quite well. + * However, I do not want ask for problems. Just in case. + */ +- err = grub_relocator_alloc_chunk_align (rel, &ch, 0, +- 0x100000000 - RELOCATOR_SIZEOF (64_efi), +- RELOCATOR_SIZEOF (64_efi), 16, +- GRUB_RELOCATOR_PREFERENCE_NONE, 1); ++ err = grub_relocator_alloc_chunk_align_safe (rel, &ch, 0, 0x100000000, ++ RELOCATOR_SIZEOF (64_efi), 16, ++ GRUB_RELOCATOR_PREFERENCE_NONE, 1); + if (err) + return err; + +diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c +index 02a73463a..efbb99307 100644 +--- a/grub-core/loader/i386/linux.c ++++ b/grub-core/loader/i386/linux.c +@@ -181,9 +181,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align, + for (; err && *align + 1 > min_align; (*align)--) + { + grub_errno = GRUB_ERR_NONE; +- err = grub_relocator_alloc_chunk_align (relocator, &ch, +- 0x1000000, +- 0xffffffff & ~prot_size, ++ err = grub_relocator_alloc_chunk_align (relocator, &ch, 0x1000000, ++ UP_TO_TOP32 (prot_size), + prot_size, 1 << *align, + GRUB_RELOCATOR_PREFERENCE_LOW, + 1); +diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c +index ad3cc292f..a67d9d0a8 100644 +--- a/grub-core/loader/i386/multiboot_mbi.c ++++ b/grub-core/loader/i386/multiboot_mbi.c +@@ -466,10 +466,9 @@ grub_multiboot_make_mbi (grub_uint32_t *target) + + bufsize = grub_multiboot_get_mbi_size (); + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, +- 0x10000, 0xa0000 - bufsize, +- bufsize, 4, +- GRUB_RELOCATOR_PREFERENCE_NONE, 0); ++ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot_relocator, &ch, ++ 0x10000, 0xa0000, bufsize, 4, ++ GRUB_RELOCATOR_PREFERENCE_NONE, 0); + if (err) + return err; + ptrorig = get_virtual_current_address (ch); +diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c +index 31f09922b..5fed5ffdf 100644 +--- a/grub-core/loader/i386/pc/linux.c ++++ b/grub-core/loader/i386/pc/linux.c +@@ -453,10 +453,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), + + { + grub_relocator_chunk_t ch; +- err = grub_relocator_alloc_chunk_align (relocator, &ch, +- addr_min, addr_max - size, +- size, 0x1000, +- GRUB_RELOCATOR_PREFERENCE_HIGH, 0); ++ err = grub_relocator_alloc_chunk_align_safe (relocator, &ch, addr_min, addr_max, size, ++ 0x1000, GRUB_RELOCATOR_PREFERENCE_HIGH, 0); + if (err) + return err; + initrd_chunk = get_virtual_current_address (ch); +diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c +index 7b723bf18..e4ed95921 100644 +--- a/grub-core/loader/mips/linux.c ++++ b/grub-core/loader/mips/linux.c +@@ -442,12 +442,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), + { + grub_relocator_chunk_t ch; + +- err = grub_relocator_alloc_chunk_align (relocator, &ch, +- (target_addr & 0x1fffffff) +- + linux_size + 0x10000, +- (0x10000000 - size), +- size, 0x10000, +- GRUB_RELOCATOR_PREFERENCE_NONE, 0); ++ err = grub_relocator_alloc_chunk_align_safe (relocator, &ch, (target_addr & 0x1fffffff) + ++ linux_size + 0x10000, 0x10000000, size, ++ 0x10000, GRUB_RELOCATOR_PREFERENCE_NONE, 0); + + if (err) + goto fail; +diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c +index 4a98d7082..facb13f3d 100644 +--- a/grub-core/loader/multiboot.c ++++ b/grub-core/loader/multiboot.c +@@ -403,7 +403,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), + { + grub_relocator_chunk_t ch; + err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, +- lowest_addr, (0xffffffff - size) + 1, ++ lowest_addr, UP_TO_TOP32 (size), + size, MULTIBOOT_MOD_ALIGN, + GRUB_RELOCATOR_PREFERENCE_NONE, 1); + if (err) +diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c +index cc6853692..f2318e0d1 100644 +--- a/grub-core/loader/multiboot_elfxx.c ++++ b/grub-core/loader/multiboot_elfxx.c +@@ -109,10 +109,10 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + if (load_size > mld->max_addr || mld->min_addr > mld->max_addr - load_size) + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + +- err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, +- mld->min_addr, mld->max_addr - load_size, +- load_size, mld->align ? mld->align : 1, +- mld->preference, mld->avoid_efi_boot_services); ++ err = grub_relocator_alloc_chunk_align_safe (GRUB_MULTIBOOT (relocator), &ch, ++ mld->min_addr, mld->max_addr, ++ load_size, mld->align ? mld->align : 1, ++ mld->preference, mld->avoid_efi_boot_services); + + if (err) + { +@@ -256,7 +256,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + continue; + + err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, 0, +- (0xffffffff - sh->sh_size) + 1, ++ UP_TO_TOP32 (sh->sh_size), + sh->sh_size, sh->sh_addralign, + GRUB_RELOCATOR_PREFERENCE_NONE, + mld->avoid_efi_boot_services); +diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c +index 0efc66062..03967839c 100644 +--- a/grub-core/loader/multiboot_mbi2.c ++++ b/grub-core/loader/multiboot_mbi2.c +@@ -295,10 +295,10 @@ grub_multiboot2_load (grub_file_t file, const char *filename) + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + } + +- err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch, +- mld.min_addr, mld.max_addr - code_size, +- code_size, mld.align ? mld.align : 1, +- mld.preference, keep_bs); ++ err = grub_relocator_alloc_chunk_align_safe (grub_multiboot2_relocator, &ch, ++ mld.min_addr, mld.max_addr, ++ code_size, mld.align ? mld.align : 1, ++ mld.preference, keep_bs); + } + else + err = grub_relocator_alloc_chunk_addr (grub_multiboot2_relocator, +@@ -708,7 +708,7 @@ grub_multiboot2_make_mbi (grub_uint32_t *target) + COMPILE_TIME_ASSERT (MULTIBOOT_TAG_ALIGN % sizeof (grub_properly_aligned_t) == 0); + + err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch, +- 0, 0xffffffff - bufsize, ++ 0, UP_TO_TOP32 (bufsize), + bufsize, MULTIBOOT_TAG_ALIGN, + GRUB_RELOCATOR_PREFERENCE_NONE, 1); + if (err) +diff --git a/grub-core/loader/xnu_resume.c b/grub-core/loader/xnu_resume.c +index 8089804d4..d648ef0cd 100644 +--- a/grub-core/loader/xnu_resume.c ++++ b/grub-core/loader/xnu_resume.c +@@ -129,7 +129,7 @@ grub_xnu_resume (char *imagename) + { + grub_relocator_chunk_t ch; + err = grub_relocator_alloc_chunk_align (grub_xnu_relocator, &ch, 0, +- (0xffffffff - hibhead.image_size) + 1, ++ UP_TO_TOP32 (hibhead.image_size), + hibhead.image_size, + GRUB_XNU_PAGESIZE, + GRUB_RELOCATOR_PREFERENCE_NONE, 0); +diff --git a/include/grub/relocator.h b/include/grub/relocator.h +index 24d8672d2..1b3bdd92a 100644 +--- a/include/grub/relocator.h ++++ b/include/grub/relocator.h +@@ -49,6 +49,35 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, + int preference, + int avoid_efi_boot_services); + ++/* ++ * Wrapper for grub_relocator_alloc_chunk_align() with purpose of ++ * protecting against integer underflow. ++ * ++ * Compare to its callee, max_addr has different meaning here. ++ * It covers entire chunk and not just start address of the chunk. ++ */ ++static inline grub_err_t ++grub_relocator_alloc_chunk_align_safe (struct grub_relocator *rel, ++ grub_relocator_chunk_t *out, ++ grub_phys_addr_t min_addr, ++ grub_phys_addr_t max_addr, ++ grub_size_t size, grub_size_t align, ++ int preference, ++ int avoid_efi_boot_services) ++{ ++ /* Sanity check and ensure following equation (max_addr - size) is safe. */ ++ if (max_addr < size || (max_addr - size) < min_addr) ++ return GRUB_ERR_OUT_OF_RANGE; ++ ++ return grub_relocator_alloc_chunk_align (rel, out, min_addr, ++ max_addr - size, ++ size, align, preference, ++ avoid_efi_boot_services); ++} ++ ++/* Top 32-bit address minus s bytes and plus 1 byte. */ ++#define UP_TO_TOP32(s) ((~(s) & 0xffffffff) + 1) ++ + #define GRUB_RELOCATOR_PREFERENCE_NONE 0 + #define GRUB_RELOCATOR_PREFERENCE_LOW 1 + #define GRUB_RELOCATOR_PREFERENCE_HIGH 2 +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0018-script-Remove-unused-fields-from-grub_script_functio.patch b/buildroot/boot/grub2/0018-script-Remove-unused-fields-from-grub_script_functio.patch new file mode 100644 index 000000000..7b0a5e514 --- /dev/null +++ b/buildroot/boot/grub2/0018-script-Remove-unused-fields-from-grub_script_functio.patch @@ -0,0 +1,37 @@ +From 73aa0776457066ee6ebc93486c3cf0e6b755d1b8 Mon Sep 17 00:00:00 2001 +From: Chris Coulson +Date: Fri, 10 Jul 2020 11:21:14 +0100 +Subject: [PATCH] script: Remove unused fields from grub_script_function + struct +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Chris Coulson +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + include/grub/script_sh.h | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h +index 360c2be1f..b382bcf09 100644 +--- a/include/grub/script_sh.h ++++ b/include/grub/script_sh.h +@@ -359,13 +359,8 @@ struct grub_script_function + /* The script function. */ + struct grub_script *func; + +- /* The flags. */ +- unsigned flags; +- + /* The next element. */ + struct grub_script_function *next; +- +- int references; + }; + typedef struct grub_script_function *grub_script_function_t; + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0019-script-Avoid-a-use-after-free-when-redefining-a-func.patch b/buildroot/boot/grub2/0019-script-Avoid-a-use-after-free-when-redefining-a-func.patch new file mode 100644 index 000000000..0fd60357d --- /dev/null +++ b/buildroot/boot/grub2/0019-script-Avoid-a-use-after-free-when-redefining-a-func.patch @@ -0,0 +1,113 @@ +From 26349fcf80982b4d0120b73b2836e88bcf16853c Mon Sep 17 00:00:00 2001 +From: Chris Coulson +Date: Fri, 10 Jul 2020 14:41:45 +0100 +Subject: [PATCH] script: Avoid a use-after-free when redefining a + function during execution +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Defining a new function with the same name as a previously defined +function causes the grub_script and associated resources for the +previous function to be freed. If the previous function is currently +executing when a function with the same name is defined, this results +in use-after-frees when processing subsequent commands in the original +function. + +Instead, reject a new function definition if it has the same name as +a previously defined function, and that function is currently being +executed. Although a behavioural change, this should be backwards +compatible with existing configurations because they can't be +dependent on the current behaviour without being broken. + +Fixes: CVE-2020-15706 + +Signed-off-by: Chris Coulson +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/script/execute.c | 2 ++ + grub-core/script/function.c | 16 +++++++++++++--- + grub-core/script/parser.y | 3 ++- + include/grub/script_sh.h | 2 ++ + 4 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c +index c8d6806fe..7e028e135 100644 +--- a/grub-core/script/execute.c ++++ b/grub-core/script/execute.c +@@ -838,7 +838,9 @@ grub_script_function_call (grub_script_function_t func, int argc, char **args) + old_scope = scope; + scope = &new_scope; + ++ func->executing++; + ret = grub_script_execute (func->func); ++ func->executing--; + + function_return = 0; + active_loops = loops; +diff --git a/grub-core/script/function.c b/grub-core/script/function.c +index d36655e51..3aad04bf9 100644 +--- a/grub-core/script/function.c ++++ b/grub-core/script/function.c +@@ -34,6 +34,7 @@ grub_script_function_create (struct grub_script_arg *functionname_arg, + func = (grub_script_function_t) grub_malloc (sizeof (*func)); + if (! func) + return 0; ++ func->executing = 0; + + func->name = grub_strdup (functionname_arg->str); + if (! func->name) +@@ -60,10 +61,19 @@ grub_script_function_create (struct grub_script_arg *functionname_arg, + grub_script_function_t q; + + q = *p; +- grub_script_free (q->func); +- q->func = cmd; + grub_free (func); +- func = q; ++ if (q->executing > 0) ++ { ++ grub_error (GRUB_ERR_BAD_ARGUMENT, ++ N_("attempt to redefine a function being executed")); ++ func = NULL; ++ } ++ else ++ { ++ grub_script_free (q->func); ++ q->func = cmd; ++ func = q; ++ } + } + else + { +diff --git a/grub-core/script/parser.y b/grub-core/script/parser.y +index 4f0ab8319..f80b86b6f 100644 +--- a/grub-core/script/parser.y ++++ b/grub-core/script/parser.y +@@ -289,7 +289,8 @@ function: "function" "name" + grub_script_mem_free (state->func_mem); + else { + script->children = state->scripts; +- grub_script_function_create ($2, script); ++ if (!grub_script_function_create ($2, script)) ++ grub_script_free (script); + } + + state->scripts = $3; +diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h +index b382bcf09..6c48e0751 100644 +--- a/include/grub/script_sh.h ++++ b/include/grub/script_sh.h +@@ -361,6 +361,8 @@ struct grub_script_function + + /* The next element. */ + struct grub_script_function *next; ++ ++ unsigned executing; + }; + typedef struct grub_script_function *grub_script_function_t; + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0020-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch b/buildroot/boot/grub2/0020-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch new file mode 100644 index 000000000..fc518c5f3 --- /dev/null +++ b/buildroot/boot/grub2/0020-relocator-Fix-grub_relocator_alloc_chunk_align-top-m.patch @@ -0,0 +1,49 @@ +From 06aa91f79f902752cb7e5d22ac0ea8e13bffd056 Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Fri, 17 Jul 2020 05:17:26 +0000 +Subject: [PATCH] relocator: Fix grub_relocator_alloc_chunk_align() top + memory allocation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Current implementation of grub_relocator_alloc_chunk_align() +does not allow allocation of the top byte. + +Assuming input args are: + max_addr = 0xfffff000; + size = 0x1000; + +And this is valid. But following overflow protection will +unnecessarily move max_addr one byte down (to 0xffffefff): + if (max_addr > ~size) + max_addr = ~size; + +~size + 1 will fix the situation. In addition, check size +for non zero to do not zero max_addr. + +Signed-off-by: Alexey Makhalov +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/lib/relocator.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c +index 5847aac36..f2c1944c2 100644 +--- a/grub-core/lib/relocator.c ++++ b/grub-core/lib/relocator.c +@@ -1386,8 +1386,8 @@ grub_relocator_alloc_chunk_align (struct grub_relocator *rel, + }; + grub_addr_t min_addr2 = 0, max_addr2; + +- if (max_addr > ~size) +- max_addr = ~size; ++ if (size && (max_addr > ~size)) ++ max_addr = ~size + 1; + + #ifdef GRUB_MACHINE_PCBIOS + if (min_addr < 0x1000) +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0021-hfsplus-Fix-two-more-overflows.patch b/buildroot/boot/grub2/0021-hfsplus-Fix-two-more-overflows.patch new file mode 100644 index 000000000..9ea678021 --- /dev/null +++ b/buildroot/boot/grub2/0021-hfsplus-Fix-two-more-overflows.patch @@ -0,0 +1,61 @@ +From feec993673d8e13fcf22fe2389ac29222b6daebd Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Sun, 19 Jul 2020 14:43:31 -0400 +Subject: [PATCH] hfsplus: Fix two more overflows +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Both node->size and node->namelen come from the supplied filesystem, +which may be user-supplied. We can't trust them for the math unless we +know they don't overflow. Making sure they go through grub_add() or +grub_calloc() first will give us that. + +Signed-off-by: Peter Jones +Reviewed-by: Darren Kenny +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/fs/hfsplus.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c +index dae43becc..9c4e4c88c 100644 +--- a/grub-core/fs/hfsplus.c ++++ b/grub-core/fs/hfsplus.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -475,8 +476,12 @@ grub_hfsplus_read_symlink (grub_fshelp_node_t node) + { + char *symlink; + grub_ssize_t numread; ++ grub_size_t sz = node->size; + +- symlink = grub_malloc (node->size + 1); ++ if (grub_add (sz, 1, &sz)) ++ return NULL; ++ ++ symlink = grub_malloc (sz); + if (!symlink) + return 0; + +@@ -715,8 +720,8 @@ list_nodes (void *record, void *hook_arg) + if (type == GRUB_FSHELP_UNKNOWN) + return 0; + +- filename = grub_malloc (grub_be_to_cpu16 (catkey->namelen) +- * GRUB_MAX_UTF8_PER_UTF16 + 1); ++ filename = grub_calloc (grub_be_to_cpu16 (catkey->namelen), ++ GRUB_MAX_UTF8_PER_UTF16 + 1); + if (! filename) + return 0; + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0022-lvm-Fix-two-more-potential-data-dependent-alloc-over.patch b/buildroot/boot/grub2/0022-lvm-Fix-two-more-potential-data-dependent-alloc-over.patch new file mode 100644 index 000000000..ad97ad0b1 --- /dev/null +++ b/buildroot/boot/grub2/0022-lvm-Fix-two-more-potential-data-dependent-alloc-over.patch @@ -0,0 +1,116 @@ +From a1845e90fc19fb5e904091bad8a378f458798e4a Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Sun, 19 Jul 2020 15:48:20 -0400 +Subject: [PATCH] lvm: Fix two more potential data-dependent alloc + overflows +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It appears to be possible to make a (possibly invalid) lvm PV with +a metadata size field that overflows our type when adding it to the +address we've allocated. Even if it doesn't, it may be possible to do so +with the math using the outcome of that as an operand. Check them both. + +Signed-off-by: Peter Jones +Signed-off-by: Darren Kenny +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/disk/lvm.c | 48 ++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 40 insertions(+), 8 deletions(-) + +diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c +index d1df640b3..139fafd47 100644 +--- a/grub-core/disk/lvm.c ++++ b/grub-core/disk/lvm.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #ifdef GRUB_UTIL + #include +@@ -102,10 +103,11 @@ grub_lvm_detect (grub_disk_t disk, + { + grub_err_t err; + grub_uint64_t mda_offset, mda_size; ++ grub_size_t ptr; + char buf[GRUB_LVM_LABEL_SIZE]; + char vg_id[GRUB_LVM_ID_STRLEN+1]; + char pv_id[GRUB_LVM_ID_STRLEN+1]; +- char *metadatabuf, *p, *q, *vgname; ++ char *metadatabuf, *p, *q, *mda_end, *vgname; + struct grub_lvm_label_header *lh = (struct grub_lvm_label_header *) buf; + struct grub_lvm_pv_header *pvh; + struct grub_lvm_disk_locn *dlocn; +@@ -205,19 +207,31 @@ grub_lvm_detect (grub_disk_t disk, + grub_le_to_cpu64 (rlocn->size) - + grub_le_to_cpu64 (mdah->size)); + } +- p = q = metadatabuf + grub_le_to_cpu64 (rlocn->offset); + +- while (*q != ' ' && q < metadatabuf + mda_size) +- q++; +- +- if (q == metadatabuf + mda_size) ++ if (grub_add ((grub_size_t)metadatabuf, ++ (grub_size_t)grub_le_to_cpu64 (rlocn->offset), ++ &ptr)) + { ++ error_parsing_metadata: + #ifdef GRUB_UTIL + grub_util_info ("error parsing metadata"); + #endif + goto fail2; + } + ++ p = q = (char *)ptr; ++ ++ if (grub_add ((grub_size_t)metadatabuf, (grub_size_t)mda_size, &ptr)) ++ goto error_parsing_metadata; ++ ++ mda_end = (char *)ptr; ++ ++ while (*q != ' ' && q < mda_end) ++ q++; ++ ++ if (q == mda_end) ++ goto error_parsing_metadata; ++ + vgname_len = q - p; + vgname = grub_malloc (vgname_len + 1); + if (!vgname) +@@ -367,8 +381,26 @@ grub_lvm_detect (grub_disk_t disk, + { + const char *iptr; + char *optr; +- lv->fullname = grub_malloc (sizeof ("lvm/") - 1 + 2 * vgname_len +- + 1 + 2 * s + 1); ++ ++ /* ++ * This is kind of hard to read with our safe (but rather ++ * baroque) math primatives, but it boils down to: ++ * ++ * sz0 = vgname_len * 2 + 1 + ++ * s * 2 + 1 + ++ * sizeof ("lvm/") - 1; ++ */ ++ grub_size_t sz0 = vgname_len, sz1 = s; ++ ++ if (grub_mul (sz0, 2, &sz0) || ++ grub_add (sz0, 1, &sz0) || ++ grub_mul (sz1, 2, &sz1) || ++ grub_add (sz1, 1, &sz1) || ++ grub_add (sz0, sz1, &sz0) || ++ grub_add (sz0, sizeof ("lvm/") - 1, &sz0)) ++ goto lvs_fail; ++ ++ lv->fullname = grub_malloc (sz0); + if (!lv->fullname) + goto lvs_fail; + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0023-emu-Make-grub_free-NULL-safe.patch b/buildroot/boot/grub2/0023-emu-Make-grub_free-NULL-safe.patch new file mode 100644 index 000000000..f30e56a8b --- /dev/null +++ b/buildroot/boot/grub2/0023-emu-Make-grub_free-NULL-safe.patch @@ -0,0 +1,38 @@ +From 320e86747a32e4d46d24ee4b64493741c161da50 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Sun, 19 Jul 2020 16:08:08 -0400 +Subject: [PATCH] emu: Make grub_free(NULL) safe +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The grub_free() implementation in grub-core/kern/mm.c safely handles +NULL pointers, and code at many places depends on this. We don't know +that the same is true on all host OSes, so we need to handle the same +behavior in grub-emu's implementation. + +Signed-off-by: Peter Jones +Reviewed-by: Darren Kenny +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/kern/emu/mm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/grub-core/kern/emu/mm.c b/grub-core/kern/emu/mm.c +index 145b01d37..4d1046a21 100644 +--- a/grub-core/kern/emu/mm.c ++++ b/grub-core/kern/emu/mm.c +@@ -60,7 +60,8 @@ grub_zalloc (grub_size_t size) + void + grub_free (void *ptr) + { +- free (ptr); ++ if (ptr) ++ free (ptr); + } + + void * +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0024-efi-Fix-some-malformed-device-path-arithmetic-errors.patch b/buildroot/boot/grub2/0024-efi-Fix-some-malformed-device-path-arithmetic-errors.patch new file mode 100644 index 000000000..48b5b8912 --- /dev/null +++ b/buildroot/boot/grub2/0024-efi-Fix-some-malformed-device-path-arithmetic-errors.patch @@ -0,0 +1,239 @@ +From c330aa099a38bc5c4d3066954fe35767cc06adb1 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Sun, 19 Jul 2020 16:53:27 -0400 +Subject: [PATCH] efi: Fix some malformed device path arithmetic errors +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Several places we take the length of a device path and subtract 4 from +it, without ever checking that it's >= 4. There are also cases where +this kind of malformation will result in unpredictable iteration, +including treating the length from one dp node as the type in the next +node. These are all errors, no matter where the data comes from. + +This patch adds a checking macro, GRUB_EFI_DEVICE_PATH_VALID(), which +can be used in several places, and makes GRUB_EFI_NEXT_DEVICE_PATH() +return NULL and GRUB_EFI_END_ENTIRE_DEVICE_PATH() evaluate as true when +the length is too small. Additionally, it makes several places in the +code check for and return errors in these cases. + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/kern/efi/efi.c | 64 +++++++++++++++++++++++++----- + grub-core/loader/efi/chainloader.c | 13 +++++- + grub-core/loader/i386/xnu.c | 9 +++-- + include/grub/efi/api.h | 14 ++++--- + 4 files changed, 79 insertions(+), 21 deletions(-) + +diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c +index dc31caa21..c97969a65 100644 +--- a/grub-core/kern/efi/efi.c ++++ b/grub-core/kern/efi/efi.c +@@ -332,7 +332,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) + + dp = dp0; + +- while (1) ++ while (dp) + { + grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); + grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); +@@ -342,9 +342,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) + if (type == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE + && subtype == GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE) + { +- grub_efi_uint16_t len; +- len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4) +- / sizeof (grub_efi_char16_t)); ++ grub_efi_uint16_t len = GRUB_EFI_DEVICE_PATH_LENGTH (dp); ++ ++ if (len < 4) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, ++ "malformed EFI Device Path node has length=%d", len); ++ return NULL; ++ } ++ len = (len - 4) / sizeof (grub_efi_char16_t); + filesize += GRUB_MAX_UTF8_PER_UTF16 * len + 2; + } + +@@ -360,7 +366,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) + if (!name) + return NULL; + +- while (1) ++ while (dp) + { + grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); + grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); +@@ -376,8 +382,15 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0) + + *p++ = '/'; + +- len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4) +- / sizeof (grub_efi_char16_t)); ++ len = GRUB_EFI_DEVICE_PATH_LENGTH (dp); ++ if (len < 4) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, ++ "malformed EFI Device Path node has length=%d", len); ++ return NULL; ++ } ++ ++ len = (len - 4) / sizeof (grub_efi_char16_t); + fp = (grub_efi_file_path_device_path_t *) dp; + /* According to EFI spec Path Name is NULL terminated */ + while (len > 0 && fp->path_name[len - 1] == 0) +@@ -452,7 +465,26 @@ grub_efi_duplicate_device_path (const grub_efi_device_path_t *dp) + ; + p = GRUB_EFI_NEXT_DEVICE_PATH (p)) + { +- total_size += GRUB_EFI_DEVICE_PATH_LENGTH (p); ++ grub_size_t len = GRUB_EFI_DEVICE_PATH_LENGTH (p); ++ ++ /* ++ * In the event that we find a node that's completely garbage, for ++ * example if we get to 0x7f 0x01 0x02 0x00 ... (EndInstance with a size ++ * of 2), GRUB_EFI_END_ENTIRE_DEVICE_PATH() will be true and ++ * GRUB_EFI_NEXT_DEVICE_PATH() will return NULL, so we won't continue, ++ * and neither should our consumers, but there won't be any error raised ++ * even though the device path is junk. ++ * ++ * This keeps us from passing junk down back to our caller. ++ */ ++ if (len < 4) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, ++ "malformed EFI Device Path node has length=%d", len); ++ return NULL; ++ } ++ ++ total_size += len; + if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (p)) + break; + } +@@ -497,7 +529,7 @@ dump_vendor_path (const char *type, grub_efi_vendor_device_path_t *vendor) + void + grub_efi_print_device_path (grub_efi_device_path_t *dp) + { +- while (1) ++ while (GRUB_EFI_DEVICE_PATH_VALID (dp)) + { + grub_efi_uint8_t type = GRUB_EFI_DEVICE_PATH_TYPE (dp); + grub_efi_uint8_t subtype = GRUB_EFI_DEVICE_PATH_SUBTYPE (dp); +@@ -909,7 +941,10 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1, + /* Return non-zero. */ + return 1; + +- while (1) ++ if (dp1 == dp2) ++ return 0; ++ ++ while (GRUB_EFI_DEVICE_PATH_VALID (dp1) && GRUB_EFI_DEVICE_PATH_VALID (dp2)) + { + grub_efi_uint8_t type1, type2; + grub_efi_uint8_t subtype1, subtype2; +@@ -945,5 +980,14 @@ grub_efi_compare_device_paths (const grub_efi_device_path_t *dp1, + dp2 = (grub_efi_device_path_t *) ((char *) dp2 + len2); + } + ++ /* ++ * There's no "right" answer here, but we probably don't want to call a valid ++ * dp and an invalid dp equal, so pick one way or the other. ++ */ ++ if (GRUB_EFI_DEVICE_PATH_VALID (dp1) && !GRUB_EFI_DEVICE_PATH_VALID (dp2)) ++ return 1; ++ else if (!GRUB_EFI_DEVICE_PATH_VALID (dp1) && GRUB_EFI_DEVICE_PATH_VALID (dp2)) ++ return -1; ++ + return 0; + } +diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c +index daf8c6b54..a8d7b9155 100644 +--- a/grub-core/loader/efi/chainloader.c ++++ b/grub-core/loader/efi/chainloader.c +@@ -156,9 +156,18 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) + + size = 0; + d = dp; +- while (1) ++ while (d) + { +- size += GRUB_EFI_DEVICE_PATH_LENGTH (d); ++ grub_size_t len = GRUB_EFI_DEVICE_PATH_LENGTH (d); ++ ++ if (len < 4) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, ++ "malformed EFI Device Path node has length=%d", len); ++ return NULL; ++ } ++ ++ size += len; + if ((GRUB_EFI_END_ENTIRE_DEVICE_PATH (d))) + break; + d = GRUB_EFI_NEXT_DEVICE_PATH (d); +diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c +index e9e119259..a70093607 100644 +--- a/grub-core/loader/i386/xnu.c ++++ b/grub-core/loader/i386/xnu.c +@@ -515,14 +515,15 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)), + + devhead = buf; + buf = devhead + 1; +- dpstart = buf; ++ dp = dpstart = buf; + +- do ++ while (GRUB_EFI_DEVICE_PATH_VALID (dp) && buf < bufend) + { +- dp = buf; + buf = (char *) buf + GRUB_EFI_DEVICE_PATH_LENGTH (dp); ++ if (GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp)) ++ break; ++ dp = buf; + } +- while (!GRUB_EFI_END_ENTIRE_DEVICE_PATH (dp) && buf < bufend); + + dev = grub_xnu_devprop_add_device (dpstart, (char *) buf + - (char *) dpstart); +diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h +index addcbfa8f..cf1355a8c 100644 +--- a/include/grub/efi/api.h ++++ b/include/grub/efi/api.h +@@ -625,6 +625,7 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t; + #define GRUB_EFI_DEVICE_PATH_TYPE(dp) ((dp)->type & 0x7f) + #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype) + #define GRUB_EFI_DEVICE_PATH_LENGTH(dp) ((dp)->length) ++#define GRUB_EFI_DEVICE_PATH_VALID(dp) ((dp) != NULL && GRUB_EFI_DEVICE_PATH_LENGTH (dp) >= 4) + + /* The End of Device Path nodes. */ + #define GRUB_EFI_END_DEVICE_PATH_TYPE (0xff & 0x7f) +@@ -633,13 +634,16 @@ typedef struct grub_efi_device_path grub_efi_device_path_protocol_t; + #define GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE 0x01 + + #define GRUB_EFI_END_ENTIRE_DEVICE_PATH(dp) \ +- (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_END_DEVICE_PATH_TYPE \ +- && (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) \ +- == GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)) ++ (!GRUB_EFI_DEVICE_PATH_VALID (dp) || \ ++ (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_END_DEVICE_PATH_TYPE \ ++ && (GRUB_EFI_DEVICE_PATH_SUBTYPE (dp) \ ++ == GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE))) + + #define GRUB_EFI_NEXT_DEVICE_PATH(dp) \ +- ((grub_efi_device_path_t *) ((char *) (dp) \ +- + GRUB_EFI_DEVICE_PATH_LENGTH (dp))) ++ (GRUB_EFI_DEVICE_PATH_VALID (dp) \ ++ ? ((grub_efi_device_path_t *) \ ++ ((char *) (dp) + GRUB_EFI_DEVICE_PATH_LENGTH (dp))) \ ++ : NULL) + + /* Hardware Device Path. */ + #define GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE 1 +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0025-efi-chainloader-Propagate-errors-from-copy_file_path.patch b/buildroot/boot/grub2/0025-efi-chainloader-Propagate-errors-from-copy_file_path.patch new file mode 100644 index 000000000..eb3e0f0e2 --- /dev/null +++ b/buildroot/boot/grub2/0025-efi-chainloader-Propagate-errors-from-copy_file_path.patch @@ -0,0 +1,78 @@ +From fb55bc37dd510911df4eaf649da939f5fafdc7ce Mon Sep 17 00:00:00 2001 +From: Daniel Kiper +Date: Wed, 29 Jul 2020 13:38:31 +0200 +Subject: [PATCH] efi/chainloader: Propagate errors from copy_file_path() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without any error propagated to the caller, make_file_path() +would then try to advance the invalid device path node with +GRUB_EFI_NEXT_DEVICE_PATH(), which would fail, returning a NULL +pointer that would subsequently be dereferenced. Hence, propagate +errors from copy_file_path(). + +Signed-off-by: Chris Coulson +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/efi/chainloader.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c +index a8d7b9155..7b31c3fb9 100644 +--- a/grub-core/loader/efi/chainloader.c ++++ b/grub-core/loader/efi/chainloader.c +@@ -106,7 +106,7 @@ grub_chainloader_boot (void) + return grub_errno; + } + +-static void ++static grub_err_t + copy_file_path (grub_efi_file_path_device_path_t *fp, + const char *str, grub_efi_uint16_t len) + { +@@ -118,7 +118,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, + + path_name = grub_calloc (len, GRUB_MAX_UTF16_PER_UTF8 * sizeof (*path_name)); + if (!path_name) +- return; ++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, "failed to allocate path buffer"); + + size = grub_utf8_to_utf16 (path_name, len * GRUB_MAX_UTF16_PER_UTF8, + (const grub_uint8_t *) str, len, 0); +@@ -131,6 +131,7 @@ copy_file_path (grub_efi_file_path_device_path_t *fp, + fp->path_name[size++] = '\0'; + fp->header.length = size * sizeof (grub_efi_char16_t) + sizeof (*fp); + grub_free (path_name); ++ return GRUB_ERR_NONE; + } + + static grub_efi_device_path_t * +@@ -189,13 +190,19 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) + d = (grub_efi_device_path_t *) ((char *) file_path + + ((char *) d - (char *) dp)); + grub_efi_print_device_path (d); +- copy_file_path ((grub_efi_file_path_device_path_t *) d, +- dir_start, dir_end - dir_start); ++ if (copy_file_path ((grub_efi_file_path_device_path_t *) d, ++ dir_start, dir_end - dir_start) != GRUB_ERR_NONE) ++ { ++ fail: ++ grub_free (file_path); ++ return 0; ++ } + + /* Fill the file path for the file. */ + d = GRUB_EFI_NEXT_DEVICE_PATH (d); +- copy_file_path ((grub_efi_file_path_device_path_t *) d, +- dir_end + 1, grub_strlen (dir_end + 1)); ++ if (copy_file_path ((grub_efi_file_path_device_path_t *) d, ++ dir_end + 1, grub_strlen (dir_end + 1)) != GRUB_ERR_NONE) ++ goto fail; + + /* Fill the end of device path nodes. */ + d = GRUB_EFI_NEXT_DEVICE_PATH (d); +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0026-efi-Fix-use-after-free-in-halt-reboot-path.patch b/buildroot/boot/grub2/0026-efi-Fix-use-after-free-in-halt-reboot-path.patch new file mode 100644 index 000000000..75dd05d48 --- /dev/null +++ b/buildroot/boot/grub2/0026-efi-Fix-use-after-free-in-halt-reboot-path.patch @@ -0,0 +1,183 @@ +From 8a6d6299efcffd14c1130942195e6c0d9b50cacd Mon Sep 17 00:00:00 2001 +From: Alexey Makhalov +Date: Mon, 20 Jul 2020 23:03:05 +0000 +Subject: [PATCH] efi: Fix use-after-free in halt/reboot path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 92bfc33db984 ("efi: Free malloc regions on exit") +introduced memory freeing in grub_efi_fini(), which is +used not only by exit path but by halt/reboot one as well. +As result of memory freeing, code and data regions used by +modules, such as halt, reboot, acpi (used by halt) also got +freed. After return to module code, CPU executes, filled +by UEFI firmware (tested with edk2), 0xAFAFAFAF pattern as +a code. Which leads to #UD exception later. + +grub> halt +!!!! X64 Exception Type - 06(#UD - Invalid Opcode) CPU Apic ID - 00000000 !!!! +RIP - 0000000003F4EC28, CS - 0000000000000038, RFLAGS - 0000000000200246 +RAX - 0000000000000000, RCX - 00000000061DA188, RDX - 0A74C0854DC35D41 +RBX - 0000000003E10E08, RSP - 0000000007F0F860, RBP - 0000000000000000 +RSI - 00000000064DB768, RDI - 000000000832C5C3 +R8 - 0000000000000002, R9 - 0000000000000000, R10 - 00000000061E2E52 +R11 - 0000000000000020, R12 - 0000000003EE5C1F, R13 - 00000000061E0FF4 +R14 - 0000000003E10D80, R15 - 00000000061E2F60 +DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030 +GS - 0000000000000030, SS - 0000000000000030 +CR0 - 0000000080010033, CR2 - 0000000000000000, CR3 - 0000000007C01000 +CR4 - 0000000000000668, CR8 - 0000000000000000 +DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000 +DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400 +GDTR - 00000000079EEA98 0000000000000047, LDTR - 0000000000000000 +IDTR - 0000000007598018 0000000000000FFF, TR - 0000000000000000 +FXSAVE_STATE - 0000000007F0F4C0 + +Proposal here is to continue to free allocated memory for +exit boot services path but keep it for halt/reboot path +as it won't be much security concern here. +Introduced GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY +loader flag to be used by efi halt/reboot path. + +Signed-off-by: Alexey Makhalov +Reviewed-by: Darren Kenny +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/kern/arm/efi/init.c | 3 +++ + grub-core/kern/arm64/efi/init.c | 3 +++ + grub-core/kern/efi/efi.c | 3 ++- + grub-core/kern/efi/init.c | 1 - + grub-core/kern/i386/efi/init.c | 9 +++++++-- + grub-core/kern/ia64/efi/init.c | 9 +++++++-- + grub-core/kern/riscv/efi/init.c | 3 +++ + grub-core/lib/efi/halt.c | 3 ++- + include/grub/loader.h | 1 + + 9 files changed, 28 insertions(+), 7 deletions(-) + +diff --git a/grub-core/kern/arm/efi/init.c b/grub-core/kern/arm/efi/init.c +index 06df60e2f..40c3b467f 100644 +--- a/grub-core/kern/arm/efi/init.c ++++ b/grub-core/kern/arm/efi/init.c +@@ -71,4 +71,7 @@ grub_machine_fini (int flags) + efi_call_1 (b->close_event, tmr_evt); + + grub_efi_fini (); ++ ++ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY)) ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/arm64/efi/init.c b/grub-core/kern/arm64/efi/init.c +index 6224999ec..5010caefd 100644 +--- a/grub-core/kern/arm64/efi/init.c ++++ b/grub-core/kern/arm64/efi/init.c +@@ -57,4 +57,7 @@ grub_machine_fini (int flags) + return; + + grub_efi_fini (); ++ ++ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY)) ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c +index c97969a65..9cfd88d77 100644 +--- a/grub-core/kern/efi/efi.c ++++ b/grub-core/kern/efi/efi.c +@@ -157,7 +157,8 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle) + void + grub_reboot (void) + { +- grub_machine_fini (GRUB_LOADER_FLAG_NORETURN); ++ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN | ++ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY); + efi_call_4 (grub_efi_system_table->runtime_services->reset_system, + GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL); + for (;;) ; +diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c +index 3dfdf2d22..2c31847bf 100644 +--- a/grub-core/kern/efi/init.c ++++ b/grub-core/kern/efi/init.c +@@ -80,5 +80,4 @@ grub_efi_fini (void) + { + grub_efidisk_fini (); + grub_console_fini (); +- grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c +index da499aba0..deb2eacd8 100644 +--- a/grub-core/kern/i386/efi/init.c ++++ b/grub-core/kern/i386/efi/init.c +@@ -39,6 +39,11 @@ grub_machine_init (void) + void + grub_machine_fini (int flags) + { +- if (flags & GRUB_LOADER_FLAG_NORETURN) +- grub_efi_fini (); ++ if (!(flags & GRUB_LOADER_FLAG_NORETURN)) ++ return; ++ ++ grub_efi_fini (); ++ ++ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY)) ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/ia64/efi/init.c b/grub-core/kern/ia64/efi/init.c +index b5ecbd091..f1965571b 100644 +--- a/grub-core/kern/ia64/efi/init.c ++++ b/grub-core/kern/ia64/efi/init.c +@@ -70,6 +70,11 @@ grub_machine_init (void) + void + grub_machine_fini (int flags) + { +- if (flags & GRUB_LOADER_FLAG_NORETURN) +- grub_efi_fini (); ++ if (!(flags & GRUB_LOADER_FLAG_NORETURN)) ++ return; ++ ++ grub_efi_fini (); ++ ++ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY)) ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/riscv/efi/init.c b/grub-core/kern/riscv/efi/init.c +index 7eb1969d0..38795fe67 100644 +--- a/grub-core/kern/riscv/efi/init.c ++++ b/grub-core/kern/riscv/efi/init.c +@@ -73,4 +73,7 @@ grub_machine_fini (int flags) + return; + + grub_efi_fini (); ++ ++ if (!(flags & GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY)) ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/lib/efi/halt.c b/grub-core/lib/efi/halt.c +index 5859f0498..29d413641 100644 +--- a/grub-core/lib/efi/halt.c ++++ b/grub-core/lib/efi/halt.c +@@ -28,7 +28,8 @@ + void + grub_halt (void) + { +- grub_machine_fini (GRUB_LOADER_FLAG_NORETURN); ++ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN | ++ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY); + #if !defined(__ia64__) && !defined(__arm__) && !defined(__aarch64__) && \ + !defined(__riscv) + grub_acpi_halt (); +diff --git a/include/grub/loader.h b/include/grub/loader.h +index 7f82a499f..b20864282 100644 +--- a/include/grub/loader.h ++++ b/include/grub/loader.h +@@ -33,6 +33,7 @@ enum + { + GRUB_LOADER_FLAG_NORETURN = 1, + GRUB_LOADER_FLAG_PXE_NOT_UNLOAD = 2, ++ GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY = 4, + }; + + void EXPORT_FUNC (grub_loader_set) (grub_err_t (*boot) (void), +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0027-loader-linux-Avoid-overflow-on-initrd-size-calculati.patch b/buildroot/boot/grub2/0027-loader-linux-Avoid-overflow-on-initrd-size-calculati.patch new file mode 100644 index 000000000..823f20556 --- /dev/null +++ b/buildroot/boot/grub2/0027-loader-linux-Avoid-overflow-on-initrd-size-calculati.patch @@ -0,0 +1,32 @@ +From a2a7464e9f10a677d6f91e1c4fa527d084c22e7c Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Fri, 24 Jul 2020 13:57:27 -0400 +Subject: [PATCH] loader/linux: Avoid overflow on initrd size calculation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Peter Jones +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/linux.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c +index 471b214d6..4cd8c20c7 100644 +--- a/grub-core/loader/linux.c ++++ b/grub-core/loader/linux.c +@@ -151,8 +151,7 @@ grub_initrd_init (int argc, char *argv[], + initrd_ctx->nfiles = 0; + initrd_ctx->components = 0; + +- initrd_ctx->components = grub_zalloc (argc +- * sizeof (initrd_ctx->components[0])); ++ initrd_ctx->components = grub_calloc (argc, sizeof (initrd_ctx->components[0])); + if (!initrd_ctx->components) + return grub_errno; + +-- +2.26.2 + diff --git a/buildroot/boot/grub2/0028-linux-Fix-integer-overflows-in-initrd-size-handling.patch b/buildroot/boot/grub2/0028-linux-Fix-integer-overflows-in-initrd-size-handling.patch new file mode 100644 index 000000000..bf6590d8e --- /dev/null +++ b/buildroot/boot/grub2/0028-linux-Fix-integer-overflows-in-initrd-size-handling.patch @@ -0,0 +1,173 @@ +From 0367e7d1b9bac3a78608a672bf6e4ace6a28b964 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sat, 25 Jul 2020 12:15:37 +0100 +Subject: [PATCH] linux: Fix integer overflows in initrd size handling +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These could be triggered by a crafted filesystem with very large files. + +Fixes: CVE-2020-15707 + +Signed-off-by: Colin Watson +Reviewed-by: Jan Setje-Eilers +Reviewed-by: Daniel Kiper +Signed-off-by: Stefan Sørensen +--- + grub-core/loader/linux.c | 74 +++++++++++++++++++++++++++++----------- + 1 file changed, 54 insertions(+), 20 deletions(-) + +diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c +index 4cd8c20c7..3fe390f17 100644 +--- a/grub-core/loader/linux.c ++++ b/grub-core/loader/linux.c +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + struct newc_head + { +@@ -98,13 +99,13 @@ free_dir (struct dir *root) + grub_free (root); + } + +-static grub_size_t ++static grub_err_t + insert_dir (const char *name, struct dir **root, +- grub_uint8_t *ptr) ++ grub_uint8_t *ptr, grub_size_t *size) + { + struct dir *cur, **head = root; + const char *cb, *ce = name; +- grub_size_t size = 0; ++ *size = 0; + while (1) + { + for (cb = ce; *cb == '/'; cb++); +@@ -130,14 +131,22 @@ insert_dir (const char *name, struct dir **root, + ptr = make_header (ptr, name, ce - name, + 040777, 0); + } +- size += ALIGN_UP ((ce - (char *) name) +- + sizeof (struct newc_head), 4); ++ if (grub_add (*size, ++ ALIGN_UP ((ce - (char *) name) ++ + sizeof (struct newc_head), 4), ++ size)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); ++ grub_free (n->name); ++ grub_free (n); ++ return grub_errno; ++ } + *head = n; + cur = n; + } + root = &cur->next; + } +- return size; ++ return GRUB_ERR_NONE; + } + + grub_err_t +@@ -172,26 +181,33 @@ grub_initrd_init (int argc, char *argv[], + eptr = grub_strchr (ptr, ':'); + if (eptr) + { ++ grub_size_t dir_size, name_len; ++ + initrd_ctx->components[i].newc_name = grub_strndup (ptr, eptr - ptr); +- if (!initrd_ctx->components[i].newc_name) ++ if (!initrd_ctx->components[i].newc_name || ++ insert_dir (initrd_ctx->components[i].newc_name, &root, 0, ++ &dir_size)) + { + grub_initrd_close (initrd_ctx); + return grub_errno; + } +- initrd_ctx->size +- += ALIGN_UP (sizeof (struct newc_head) +- + grub_strlen (initrd_ctx->components[i].newc_name), +- 4); +- initrd_ctx->size += insert_dir (initrd_ctx->components[i].newc_name, +- &root, 0); ++ name_len = grub_strlen (initrd_ctx->components[i].newc_name); ++ if (grub_add (initrd_ctx->size, ++ ALIGN_UP (sizeof (struct newc_head) + name_len, 4), ++ &initrd_ctx->size) || ++ grub_add (initrd_ctx->size, dir_size, &initrd_ctx->size)) ++ goto overflow; + newc = 1; + fname = eptr + 1; + } + } + else if (newc) + { +- initrd_ctx->size += ALIGN_UP (sizeof (struct newc_head) +- + sizeof ("TRAILER!!!") - 1, 4); ++ if (grub_add (initrd_ctx->size, ++ ALIGN_UP (sizeof (struct newc_head) ++ + sizeof ("TRAILER!!!") - 1, 4), ++ &initrd_ctx->size)) ++ goto overflow; + free_dir (root); + root = 0; + newc = 0; +@@ -207,19 +223,29 @@ grub_initrd_init (int argc, char *argv[], + initrd_ctx->nfiles++; + initrd_ctx->components[i].size + = grub_file_size (initrd_ctx->components[i].file); +- initrd_ctx->size += initrd_ctx->components[i].size; ++ if (grub_add (initrd_ctx->size, initrd_ctx->components[i].size, ++ &initrd_ctx->size)) ++ goto overflow; + } + + if (newc) + { + initrd_ctx->size = ALIGN_UP (initrd_ctx->size, 4); +- initrd_ctx->size += ALIGN_UP (sizeof (struct newc_head) +- + sizeof ("TRAILER!!!") - 1, 4); ++ if (grub_add (initrd_ctx->size, ++ ALIGN_UP (sizeof (struct newc_head) ++ + sizeof ("TRAILER!!!") - 1, 4), ++ &initrd_ctx->size)) ++ goto overflow; + free_dir (root); + root = 0; + } + + return GRUB_ERR_NONE; ++ ++ overflow: ++ free_dir (root); ++ grub_initrd_close (initrd_ctx); ++ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected")); + } + + grub_size_t +@@ -260,8 +286,16 @@ grub_initrd_load (struct grub_linux_initrd_context *initrd_ctx, + + if (initrd_ctx->components[i].newc_name) + { +- ptr += insert_dir (initrd_ctx->components[i].newc_name, +- &root, ptr); ++ grub_size_t dir_size; ++ ++ if (insert_dir (initrd_ctx->components[i].newc_name, &root, ptr, ++ &dir_size)) ++ { ++ free_dir (root); ++ grub_initrd_close (initrd_ctx); ++ return grub_errno; ++ } ++ ptr += dir_size; + ptr = make_header (ptr, initrd_ctx->components[i].newc_name, + grub_strlen (initrd_ctx->components[i].newc_name), + 0100777, +-- +2.26.2 + diff --git a/buildroot/boot/grub2/Config.in b/buildroot/boot/grub2/Config.in index 626344a3c..e45133999 100644 --- a/buildroot/boot/grub2/Config.in +++ b/buildroot/boot/grub2/Config.in @@ -1,6 +1,15 @@ +config BR2_TARGET_GRUB2_ARCH_SUPPORTS + bool + default y if BR2_i386 + default y if BR2_x86_64 + default y if BR2_arm + default y if BR2_aarch64 + depends on BR2_USE_MMU + config BR2_TARGET_GRUB2 bool "grub2" - depends on BR2_i386 || BR2_x86_64 + depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS + depends on BR2_USE_WCHAR help GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally @@ -11,104 +20,8 @@ config BR2_TARGET_GRUB2 Amongst others, GRUB2 offers EFI support, which GRUB Legacy doesn't provide. - Notes on using Grub2 for BIOS-based platforms - ============================================= - - 1. Create a disk image - dd if=/dev/zero of=disk.img bs=1M count=32 - 2. Partition it (either legacy or GPT style partitions work) - cfdisk disk.img - - Create one partition, type Linux, for the root - filesystem. The only constraint is to make sure there - is enough free space *before* the first partition to - store Grub2. Leaving 1 MB of free space is safe. - 3. Setup loop device and loop partitions - sudo losetup -f disk.img - sudo partx -a /dev/loop0 - 4. Prepare the root partition - sudo mkfs.ext3 -L root /dev/loop0p1 - sudo mount /dev/loop0p1 /mnt - sudo tar -C /mnt -xf output/images/rootfs.tar - sudo umount /mnt - 5. Install Grub2 - sudo ./output/host/usr/sbin/grub-bios-setup \ - -b ./output/host/usr/lib/grub/i386-pc/boot.img \ - -c ./output/images/grub.img -d . /dev/loop0 - 6. Cleanup loop device - sudo partx -d /dev/loop0 - sudo losetup -d /dev/loop0 - 7. Your disk.img is ready! - - Using genimage - -------------- - - If you use genimage to generate your complete image, - installing Grub can be tricky. Here is how to achieve Grub's - installation with genimage: - - partition boot { - in-partition-table = "no" - image = "path_to_boot.img" - offset = 0 - size = 512 - } - partition grub { - in-partition-table = "no" - image = "path_to_grub.img" - offset = 512 - } - - The result is not byte to byte identical to what - grub-bios-setup does but it works anyway. - - To test your BIOS image in Qemu - ------------------------------- - - qemu-system-{i386,x86-64} -hda disk.img - - Notes on using Grub2 for EFI-based platforms - ============================================ - - 1. Create a disk image - dd if=/dev/zero of=disk.img bs=1M count=32 - 2. Partition it with GPT partitions - cgdisk disk.img - - Create a first partition, type EF00, for the - bootloader and kernel image - - Create a second partition, type 8300, for the root - filesystem. - 3. Setup loop device and loop partitions - sudo losetup -f disk.img - sudo partx -a /dev/loop0 - 4. Prepare the boot partition - sudo mkfs.vfat -n boot /dev/loop0p1 - sudo mount /dev/loop0p1 /mnt - sudo cp -a output/images/efi-part/* /mnt/ - sudo cp output/images/bzImage /mnt/ - sudo umount /mnt - 5. Prepare the root partition - sudo mkfs.ext3 -L root /dev/loop0p2 - sudo mount /dev/loop0p2 /mnt - sudo tar -C /mnt -xf output/images/rootfs.tar - sudo umount /mnt - 6 Cleanup loop device - sudo partx -d /dev/loop0 - sudo losetup -d /dev/loop0 - 7. Your disk.img is ready! - - To test your EFI image in Qemu - ------------------------------ - - 1. Download the EFI BIOS for Qemu - Version IA32 or X64 depending on the chosen Grub2 - platform (i386-efi vs. x86-64-efi) - http://sourceforge.net/projects/edk2/files/OVMF/ - 2. Extract, and rename OVMF.fd to bios.bin and - CirrusLogic5446.rom to vgabios-cirrus.bin. - 3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img - 4. Make sure to pass pci=nocrs to the kernel command line, - to workaround a bug in the EFI BIOS regarding the - EFI framebuffer. + For additional notes on using Grub 2 with Buildroot, see + boot/grub2/readme.txt http://www.gnu.org/software/grub/ @@ -119,12 +32,14 @@ choice config BR2_TARGET_GRUB2_I386_PC bool "i386-pc" + depends on BR2_i386 || BR2_x86_64 help Select this option if the platform you're targetting is a x86 or x86-64 legacy BIOS based platform. config BR2_TARGET_GRUB2_I386_EFI bool "i386-efi" + depends on BR2_i386 || BR2_x86_64 help Select this option if the platform you're targetting has a 32 bits EFI BIOS. Note that some x86-64 platforms use a 32 @@ -132,13 +47,38 @@ config BR2_TARGET_GRUB2_I386_EFI config BR2_TARGET_GRUB2_X86_64_EFI bool "x86-64-efi" + depends on BR2_x86_64 help Select this option if the platform you're targetting has a 64 bits EFI BIOS. +config BR2_TARGET_GRUB2_ARM_UBOOT + bool "arm-uboot" + depends on BR2_arm + help + Select this option if the platform you're targetting is an + ARM u-boot platform, and you want to boot Grub 2 as an u-boot + compatible image. + +config BR2_TARGET_GRUB2_ARM_EFI + bool "arm-efi" + depends on BR2_arm + help + Select this option if the platform you're targetting is an + ARM platform and you want to boot Grub 2 as an EFI + application. + +config BR2_TARGET_GRUB2_ARM64_EFI + bool "arm64-efi" + depends on BR2_aarch64 + help + Select this option if the platform you're targetting is an + Aarch64 platform and you want to boot Grub 2 as an EFI + application. + endchoice -if BR2_TARGET_GRUB2_I386_PC +if BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_GRUB2_ARM_UBOOT config BR2_TARGET_GRUB2_BOOT_PARTITION string "boot partition" @@ -149,13 +89,15 @@ config BR2_TARGET_GRUB2_BOOT_PARTITION first disk if using a legacy partition table, or 'hd0,gpt1' if using GPT partition table. -endif # BR2_TARGET_GRUB2_I386_PC +endif # BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_GRUB2_ARM_UBOOT config BR2_TARGET_GRUB2_BUILTIN_MODULES string "builtin modules" - default "boot linux ext2 fat part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC - default "boot linux ext2 fat part_msdos part_gpt normal efi_gop" \ - if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI + default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC + default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop" \ + if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI || \ + BR2_TARGET_GRUB2_ARM_EFI || BR2_TARGET_GRUB2_ARM64_EFI + default "linux ext2 fat part_msdos normal" if BR2_TARGET_GRUB2_ARM_UBOOT config BR2_TARGET_GRUB2_BUILTIN_CONFIG string "builtin config" @@ -165,4 +107,17 @@ config BR2_TARGET_GRUB2_BUILTIN_CONFIG device and other configuration parameters, but however menu entries cannot be described in this embedded configuration. +config BR2_TARGET_GRUB2_INSTALL_TOOLS + bool "install tools" + help + Install support tools to interact with GNU GRUB Multiboot + boot loader. + + This will also install the Grub 2 loadable modules to the + target. + endif # BR2_TARGET_GRUB2 + +comment "grub2 needs a toolchain w/ wchar" + depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS + depends on !BR2_USE_WCHAR diff --git a/buildroot/boot/grub2/grub.cfg b/buildroot/boot/grub2/grub.cfg index c8abbd344..bd3e3f000 100644 --- a/buildroot/boot/grub2/grub.cfg +++ b/buildroot/boot/grub2/grub.cfg @@ -2,5 +2,5 @@ set default="0" set timeout="5" menuentry "Buildroot" { - linux /boot/bzImage root=/dev/sda1 console=tty1 + linux /boot/bzImage root=/dev/sda1 rootwait console=tty1 } diff --git a/buildroot/boot/grub2/grub2-remove-gets.patch b/buildroot/boot/grub2/grub2-remove-gets.patch deleted file mode 100644 index 0da71b329..000000000 --- a/buildroot/boot/grub2/grub2-remove-gets.patch +++ /dev/null @@ -1,21 +0,0 @@ -ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it - -Signed-off-by: Khem Raj -Signed-off-by: Thomas Petazzoni - -Upstream-Status: Pending -Index: grub-1.99/grub-core/gnulib/stdio.in.h -=================================================================== ---- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800 -+++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700 -@@ -140,8 +140,10 @@ - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -+#if defined gets - #undef gets - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ diff --git a/buildroot/boot/grub2/grub2.hash b/buildroot/boot/grub2/grub2.hash new file mode 100644 index 000000000..338fe5972 --- /dev/null +++ b/buildroot/boot/grub2/grub2.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d grub-2.04.tar.xz +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING diff --git a/buildroot/boot/grub2/grub2.mk b/buildroot/boot/grub2/grub2.mk index 697f0adc1..5fca2315e 100644 --- a/buildroot/boot/grub2/grub2.mk +++ b/buildroot/boot/grub2/grub2.mk @@ -4,12 +4,39 @@ # ################################################################################ -GRUB2_VERSION = 2.00 -GRUB2_SITE = $(BR2_GNU_MIRROR)/grub +GRUB2_VERSION = 2.04 +GRUB2_SITE = http://ftp.gnu.org/gnu/grub GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz -GRUB2_LICENSE = GPLv3+ +GRUB2_LICENSE = GPL-3.0+ GRUB2_LICENSE_FILES = COPYING -GRUB2_DEPENDENCIES = host-bison host-flex +GRUB2_DEPENDENCIES = host-bison host-flex host-grub2 +HOST_GRUB2_DEPENDENCIES = host-bison host-flex +GRUB2_INSTALL_IMAGES = YES + +# 0001-build-Fix-GRUB-i386-pc-build-with-Ubuntu-gcc.patch +define GRUB2_AVOID_AUTORECONF + $(Q)touch $(@D)/Makefile.util.am + $(Q)touch $(@D)/Makefile.in +endef +GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF +HOST_GRUB2_POST_PATCH_HOOKS += GRUB2_AVOID_AUTORECONF + +# 0002-yylex-Make-lexer-fatal-errors-actually-be-fatal.patch +GRUB2_IGNORE_CVES += CVE-2020-10713 +# 0005-calloc-Use-calloc-at-most-places.patch +GRUB2_IGNORE_CVES += CVE-2020-14308 +# 0006-malloc-Use-overflow-checking-primitives-where-we-do-.patch +GRUB2_IGNORE_CVES += CVE-2020-14309 CVE-2020-14310 CVE-2020-14311 +# 0019-script-Avoid-a-use-after-free-when-redefining-a-func.patch +GRUB2_IGNORE_CVES += CVE-2020-15706 +# 0028-linux-Fix-integer-overflows-in-initrd-size-handling.patch +GRUB2_IGNORE_CVES += CVE-2020-15707 + +ifeq ($(BR2_TARGET_GRUB2_INSTALL_TOOLS),y) +GRUB2_INSTALL_TARGET = YES +else +GRUB2_INSTALL_TARGET = NO +endif GRUB2_BUILTIN_MODULES = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)) GRUB2_BUILTIN_CONFIG = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_CONFIG)) @@ -36,41 +63,80 @@ GRUB2_PREFIX = /EFI/BOOT GRUB2_TUPLE = x86_64-efi GRUB2_TARGET = x86_64 GRUB2_PLATFORM = efi +else ifeq ($(BR2_TARGET_GRUB2_ARM_UBOOT),y) +GRUB2_IMAGE = $(BINARIES_DIR)/boot-part/grub/grub.img +GRUB2_CFG = $(BINARIES_DIR)/boot-part/grub/grub.cfg +GRUB2_PREFIX = ($(GRUB2_BOOT_PARTITION))/boot/grub +GRUB2_TUPLE = arm-uboot +GRUB2_TARGET = arm +GRUB2_PLATFORM = uboot +else ifeq ($(BR2_TARGET_GRUB2_ARM_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootarm.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = arm-efi +GRUB2_TARGET = arm +GRUB2_PLATFORM = efi +else ifeq ($(BR2_TARGET_GRUB2_ARM64_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootaa64.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = arm64-efi +GRUB2_TARGET = aarch64 +GRUB2_PLATFORM = efi endif # Grub2 is kind of special: it considers CC, LD and so on to be the -# tools to build the native tools (i.e to be executed on the build -# machine), and uses TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS to -# build the bootloader itself. +# tools to build the host programs and uses TARGET_CC, TARGET_CFLAGS, +# TARGET_CPPFLAGS, TARGET_LDFLAGS to build the bootloader itself. +# +# NOTE: TARGET_STRIP is overridden by !BR2_STRIP_strip, so always +# use the cross compile variant to ensure grub2 builds + +HOST_GRUB2_CONF_ENV = \ + CPP="$(HOSTCC) -E" GRUB2_CONF_ENV = \ - $(HOST_CONFIGURE_OPTS) \ - CPP="$(HOSTCC) -E" \ + CPP="$(TARGET_CC) -E" \ TARGET_CC="$(TARGET_CC)" \ TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" + TARGET_CPPFLAGS="$(TARGET_CPPFLAGS) -fno-stack-protector" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + TARGET_NM="$(TARGET_NM)" \ + TARGET_OBJCOPY="$(TARGET_OBJCOPY)" \ + TARGET_STRIP="$(TARGET_CROSS)strip" GRUB2_CONF_OPTS = \ --target=$(GRUB2_TARGET) \ --with-platform=$(GRUB2_PLATFORM) \ + --prefix=/ \ + --exec-prefix=/ \ --disable-grub-mkfont \ --enable-efiemu=no \ - --enable-liblzma=no \ + ac_cv_lib_lzma_lzma_code=no \ --enable-device-mapper=no \ --enable-libzfs=no \ --disable-werror -# We don't want all the native tools and Grub2 modules to be installed -# in the target. So we in fact install everything into the host -# directory, and the image generation process (below) will use the -# grub-mkimage tool and Grub2 modules from the host directory. +HOST_GRUB2_CONF_OPTS = \ + --disable-grub-mkfont \ + --enable-efiemu=no \ + ac_cv_lib_lzma_lzma_code=no \ + --enable-device-mapper=no \ + --enable-libzfs=no \ + --disable-werror -GRUB2_INSTALL_TARGET_OPTS = DESTDIR=$(HOST_DIR) install +ifeq ($(BR2_TARGET_GRUB2_I386_PC),y) +define GRUB2_IMAGE_INSTALL_ELTORITO + cat $(HOST_DIR)/lib/grub/$(GRUB2_TUPLE)/cdboot.img $(GRUB2_IMAGE) > \ + $(BINARIES_DIR)/grub-eltorito.img +endef +endif -define GRUB2_IMAGE_INSTALLATION +define GRUB2_INSTALL_IMAGES_CMDS mkdir -p $(dir $(GRUB2_IMAGE)) $(HOST_DIR)/usr/bin/grub-mkimage \ - -d $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE) \ + -d $(@D)/grub-core/ \ -O $(GRUB2_TUPLE) \ -o $(GRUB2_IMAGE) \ -p "$(GRUB2_PREFIX)" \ @@ -78,15 +144,16 @@ define GRUB2_IMAGE_INSTALLATION $(GRUB2_BUILTIN_MODULES) mkdir -p $(dir $(GRUB2_CFG)) $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG) + $(GRUB2_IMAGE_INSTALL_ELTORITO) endef -GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_IMAGE_INSTALLATION ifeq ($(GRUB2_PLATFORM),efi) define GRUB2_EFI_STARTUP_NSH echo $(notdir $(GRUB2_IMAGE)) > \ $(BINARIES_DIR)/efi-part/startup.nsh endef -GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_EFI_STARTUP_NSH +GRUB2_POST_INSTALL_IMAGES_HOOKS += GRUB2_EFI_STARTUP_NSH endif $(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/buildroot/boot/grub2/readme.txt b/buildroot/boot/grub2/readme.txt new file mode 100644 index 000000000..0282fbdd1 --- /dev/null +++ b/buildroot/boot/grub2/readme.txt @@ -0,0 +1,190 @@ +Notes on using Grub2 for BIOS-based platforms +============================================= + +1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 +2. Partition it (either legacy or GPT style partitions work) + cfdisk disk.img + - Create one partition, type Linux, for the root + filesystem. The only constraint is to make sure there + is enough free space *before* the first partition to + store Grub2. Leaving 1 MB of free space is safe. +3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a /dev/loop0 +4. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt +5. Install Grub2 + sudo ./output/host/sbin/grub-bios-setup \ + -b ./output/host/lib/grub/i386-pc/boot.img \ + -c ./output/images/grub.img -d . /dev/loop0 +6. Cleanup loop device + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 +7. Your disk.img is ready! + +Using genimage +-------------- + +If you use genimage to generate your complete image, +installing Grub can be tricky. Here is how to achieve Grub's +installation with genimage: + +partition boot { + in-partition-table = "no" + image = "path_to_boot.img" + offset = 0 + size = 512 +} +partition grub { + in-partition-table = "no" + image = "path_to_grub.img" + offset = 512 +} + +The result is not byte to byte identical to what +grub-bios-setup does but it works anyway. + +To test your BIOS image in Qemu +------------------------------- + +qemu-system-{i386,x86-64} -hda disk.img + +Notes on using Grub2 for x86/x86_64 EFI-based platforms +======================================================= + +1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 +2. Partition it with GPT partitions + cgdisk disk.img + - Create a first partition, type EF00, for the + bootloader and kernel image + - Create a second partition, type 8300, for the root + filesystem. +3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a /dev/loop0 +4. Prepare the boot partition + sudo mkfs.vfat -n boot /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo cp -a output/images/efi-part/* /mnt/ + sudo cp output/images/bzImage /mnt/ + sudo umount /mnt +5. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p2 + sudo mount /dev/loop0p2 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt +6 Cleanup loop device + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 +7. Your disk.img is ready! + +To test your i386/x86-64 EFI image in Qemu +------------------------------------------ + +1. Download the EFI BIOS for Qemu + Version IA32 or X64 depending on the chosen Grub2 + platform (i386-efi vs. x86-64-efi) + https://www.kraxel.org/repos/jenkins/edk2/ + (or use one provided by your distribution as OVMF) +2. Extract, and rename OVMF.fd to bios.bin and + CirrusLogic5446.rom to vgabios-cirrus.bin. +3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img +4. Make sure to pass pci=nocrs to the kernel command line, + to workaround a bug in the EFI BIOS regarding the + EFI framebuffer. + +Notes on using Grub2 for ARM u-boot-based platforms +=================================================== + +The following steps show how to use the Grub2 arm-uboot platform +support in the simplest way possible and with a single +buildroot-generated filesystem. + + 1. Load qemu_arm_vexpress_defconfig + + 2. Enable u-boot with the vexpress_ca9x4 board name and with + u-boot.elf image format. + + 3. Enable grub2 for the arm-uboot platform. + + 4. Enable "Install kernel image to /boot in target" in the kernel + menu to populate a /boot directory with zImage in it. + + 5. The upstream u-boot vexpress_ca9x4 doesn't have CONFIG_API enabled + by default, which is required. + + Before building, patch u-boot (for example, make u-boot-extract to + edit the source before building) file + include/configs/vexpress_common.h to define: + + #define CONFIG_API + #define CONFIG_SYS_MMC_MAX_DEVICE 1 + + 6. Create a custom grub2 config file with the following contents and + set its path in BR2_TARGET_GRUB2_CFG: + + set default="0" + set timeout="5" + + menuentry "Buildroot" { + set root='(hd0)' + linux /boot/zImage root=/dev/mmcblk0 console=ttyAMA0 + devicetree /boot/vexpress-v2p-ca9.dtb + } + + 7. Create a custom builtin config file with the following contents + and set its path in BR2_TARGET_GRUB2_BUILTIN_CONFIG: + + set root=(hd0) + set prefix=/boot/grub + + 8. Create a custom post-build script which copies files from + ${BINARIES_DIR}/boot-part to $(TARGET_DIR)/boot (set its path in + BR2_ROOTFS_POST_BUILD_SCRIPT): + + #!/bin/sh + cp -r ${BINARIES_DIR}/boot-part/* ${TARGET_DIR}/boot/ + + 9. make + +10. Run qemu with: + + qemu-system-arm -M vexpress-a9 -kernel output/images/u-boot -m 1024 \ + -nographic -sd output/images/rootfs.ext2 + +11. In u-boot, stop at the prompt and run grub2 with: + + => ext2load mmc 0:0 ${loadaddr} /boot/grub/grub.img + => bootm + +12. This should bring the grub2 menu, upon which selecting the "Buildroot" + entry should boot Linux. + + +Notes on using Grub2 for Aarch64 EFI-based platforms +==================================================== + +The following steps show how to use the Grub2 arm64-efi platform, +using qemu and EFI firmware built for qemu. + + 1. Load aarch64_efi_defconfig + + 2. make + + 3. Download the EFI firmware for qemu aarch64 + https://www.kraxel.org/repos/jenkins/edk2/ + (or use one provided by your distribution as OVMF-aarch64 or AAVMF) + + 4. Run qemu with: + + qemu-system-aarch64 -M virt -cpu cortex-a57 -m 512 -nographic \ + -bios /QEMU_EFI.fd -hda output/images/disk.img \ + -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 + + 5. This should bring the grub2 menu, upon which selecting the + "Buildroot" entry should boot Linux. diff --git a/buildroot/boot/gummiboot/0001-Allow-building-with-newer-glibc-versions.patch b/buildroot/boot/gummiboot/0001-Allow-building-with-newer-glibc-versions.patch new file mode 100644 index 000000000..b35cd499b --- /dev/null +++ b/buildroot/boot/gummiboot/0001-Allow-building-with-newer-glibc-versions.patch @@ -0,0 +1,31 @@ +From 40ab4167b5a45c772304a879c71b47d54de3b0e3 Mon Sep 17 00:00:00 2001 +From: Esben Haabendal +Date: Wed, 20 Mar 2019 14:19:40 +0100 +Subject: [PATCH] Allow building with newer glibc versions + +Newer glibc versions does not include sys/sysmacros.h from sys/types.h +anymore. Including it unconditionally should be safe. + +See https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html for why +this was done. + +Signed-off-by: Esben Haabendal +--- + src/setup/setup.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/setup/setup.c b/src/setup/setup.c +index 6a4275a2ae36..53429375a146 100644 +--- a/src/setup/setup.c ++++ b/src/setup/setup.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include "efivars.h" + +-- +2.21.0 + diff --git a/buildroot/boot/gummiboot/0002-Fix-linking-for-non-host-compatible-targets.patch b/buildroot/boot/gummiboot/0002-Fix-linking-for-non-host-compatible-targets.patch new file mode 100644 index 000000000..7104a581e --- /dev/null +++ b/buildroot/boot/gummiboot/0002-Fix-linking-for-non-host-compatible-targets.patch @@ -0,0 +1,54 @@ +From fc05ced797b87286b8ec7303fe32bf200a072972 Mon Sep 17 00:00:00 2001 +From: Esben Haabendal +Date: Mon, 18 Mar 2019 11:14:31 +0100 +Subject: [PATCH] Fix linking for non-host compatible targets + +Without this, gummiboot build system will use host 'ld' when linking +target binary, which is obviously not a good idea. + +Signed-off-by: Esben Haabendal +--- + Makefile.am | 4 ++-- + configure.ac | 4 ++++ + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 6568a355ed74..9051dd44edd9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -142,7 +142,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir) + $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ + + $(gummiboot_solib): $(gummiboot_objects) +- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(gummiboot_objects) \ ++ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(gummiboot_objects) \ + -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ + nm -D -u $@ | grep ' U ' && exit 1 || : + .DELETE_ON_ERROR: $(gummboot_solib) +@@ -177,7 +177,7 @@ $(top_builddir)/src/efi/%.o: $(top_srcdir)/src/efi/%.c $(addprefix $(top_srcdir) + $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ + + $(stub_solib): $(stub_objects) +- $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \ ++ $(AM_V_CCLD)$(EFI_LD) $(efi_ldflags) $(stub_objects) \ + -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ + nm -D -u $@ | grep ' U ' && exit 1 || : + .DELETE_ON_ERROR: $(gummboot_solib) +diff --git a/configure.ac b/configure.ac +index 27bbe1d73396..b948696c220b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,6 +40,10 @@ dnl Don't try to use things like -std=c99 for efi compilation + EFI_CC=$CC + AC_SUBST([EFI_CC]) + ++dnl Allow specifying linker compatible with the compiler ++EFI_LD=$LD ++AC_SUBST([EFI_LD]) ++ + AC_PROG_CC_C99 + AM_PROG_CC_C_O + AC_PROG_GCC_TRADITIONAL +-- +2.21.0 + diff --git a/buildroot/boot/gummiboot/Config.in b/buildroot/boot/gummiboot/Config.in index 8d70680d2..1b5c4279f 100644 --- a/buildroot/boot/gummiboot/Config.in +++ b/buildroot/boot/gummiboot/Config.in @@ -1,11 +1,10 @@ config BR2_TARGET_GUMMIBOOT bool "gummiboot" depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS select BR2_PACKAGE_GNU_EFI select BR2_PACKAGE_UTIL_LINUX select BR2_PACKAGE_UTIL_LINUX_LIBBLKID - depends on BR2_LARGEFILE # util-linux - depends on BR2_USE_WCHAR # util-linux help gummiboot is a simple UEFI boot manager which executes configured EFI images. The default entry is selected by a @@ -23,6 +22,3 @@ config BR2_TARGET_GUMMIBOOT files will be located in /loader/ inside the EFI partition. http://freedesktop.org/wiki/Software/gummiboot/ - -comment "gummiboot needs a toolchain w/ largefile, wchar" - depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/buildroot/boot/gummiboot/gummiboot.mk b/buildroot/boot/gummiboot/gummiboot.mk index 72f9c53ca..748e87030 100644 --- a/buildroot/boot/gummiboot/gummiboot.mk +++ b/buildroot/boot/gummiboot/gummiboot.mk @@ -4,9 +4,10 @@ # ################################################################################ -GUMMIBOOT_SITE = git://anongit.freedesktop.org/gummiboot -GUMMIBOOT_VERSION = 43 -GUMMIBOOT_LICENSE = LGPLv2.1+ +GUMMIBOOT_SITE = https://gitlab.freedesktop.org/archived-projects/gummiboot.git +GUMMIBOOT_SITE_METHOD = git +GUMMIBOOT_VERSION = 2bcd919c681c952eb867ef1bdb458f1bc49c2d55 +GUMMIBOOT_LICENSE = LGPL-2.1+ GUMMIBOOT_LICENSE_FILES = LICENSE # The git archive does not have the autoconf/automake stuff generated. diff --git a/buildroot/boot/lpc32xxcdl/Config.in b/buildroot/boot/lpc32xxcdl/Config.in index ce7589c35..97137aa7d 100644 --- a/buildroot/boot/lpc32xxcdl/Config.in +++ b/buildroot/boot/lpc32xxcdl/Config.in @@ -1,6 +1,6 @@ config BR2_TARGET_LPC32XXCDL - depends on BR2_arm926t bool "LPC32XX CDL (kickstart and S1L)" + depends on BR2_arm926t if BR2_TARGET_LPC32XXCDL diff --git a/buildroot/boot/lpc32xxcdl/lpc32xxcdl.mk b/buildroot/boot/lpc32xxcdl/lpc32xxcdl.mk index 04c1c7f06..30afed050 100644 --- a/buildroot/boot/lpc32xxcdl/lpc32xxcdl.mk +++ b/buildroot/boot/lpc32xxcdl/lpc32xxcdl.mk @@ -33,10 +33,10 @@ LPC32XXCDL_S1L_BURNER = nand/s1lapp_jtag endif LPC32XXCDL_BUILD_FLAGS = \ - CROSS_COMPILE=$(TARGET_CROSS) \ - NXPMCU_WINBASE=$(@D) \ - NXPMCU_SOFTWARE=$(@D) \ - BSP=$(BR2_TARGET_LPC32XXCDL_BOARDNAME) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + NXPMCU_WINBASE=$(@D) \ + NXPMCU_SOFTWARE=$(@D) \ + BSP=$(BR2_TARGET_LPC32XXCDL_BOARDNAME) \ CSP=lpc32xx TOOL=gnu GEN=lpc LPC32XXCDL_BOARD_STARTUP_DIR = \ diff --git a/buildroot/boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch b/buildroot/boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch new file mode 100644 index 000000000..eada18b47 --- /dev/null +++ b/buildroot/boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch @@ -0,0 +1,31 @@ +From 5867fcad6e88af3d843bfa831648d84a53732d57 Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Wed, 19 Dec 2018 17:17:13 +0100 +Subject: [PATCH] mv_ddr: mv_ddr4_training_leveling.c: uninitialized variable + +With GCC 8.2 uninitialized variables lead to a build error. + +Signed-off-by: Heinrich Schuchardt +Signed-off-by: Baruch Siach +--- +Upstream status: commit 5867fcad6e8 + + mv_ddr4_training_leveling.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mv_ddr4_training_leveling.c b/mv_ddr4_training_leveling.c +index 144e21a03c01..cb95389f5466 100644 +--- a/mv_ddr4_training_leveling.c ++++ b/mv_ddr4_training_leveling.c +@@ -368,7 +368,7 @@ static int mv_ddr4_dynamic_pb_wl_supp(u32 dev_num, enum mv_wl_supp_mode ecc_mode + u32 subphy_num = ddr3_tip_dev_attr_get(dev_num, MV_ATTR_OCTET_PER_INTERFACE); + u8 compare_result = 0; + u32 orig_phase; +- u32 rd_data, wr_data; ++ u32 rd_data, wr_data = 0; + u32 flag, step; + struct mv_ddr_topology_map *tm = mv_ddr_topology_map_get(); + u32 ecc_phy_access_id; +-- +2.20.1 + diff --git a/buildroot/boot/mv-ddr-marvell/Config.in b/buildroot/boot/mv-ddr-marvell/Config.in new file mode 100644 index 000000000..4ee8c95b2 --- /dev/null +++ b/buildroot/boot/mv-ddr-marvell/Config.in @@ -0,0 +1,10 @@ +config BR2_TARGET_MV_DDR_MARVELL + bool "mv-ddr-marvell" + depends on BR2_aarch64 + help + Marvell keeps algorithms for DDR training in a separate + repository. This code is not built separately, it is needed + as a dependency to build ATF firmware for Marvell Armada 7040 + and 8040 SoCs. + + https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/ diff --git a/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.hash b/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.hash new file mode 100644 index 000000000..ec2fe6ed3 --- /dev/null +++ b/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 39dcc8baccb82cbc746d8f82ce7f673e1b1236e8aee0d09e7ab12c27eeb6ecda mv-ddr-marvell-618dadd1491eb2f7b2fd74313c04f7accddae475.tar.gz +sha256 69208236fc322026920b92d1d839ebdc521ca65379bfdb3368a24945e794fc78 ddr3_init.c diff --git a/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.mk b/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.mk new file mode 100644 index 000000000..a4e0c0467 --- /dev/null +++ b/buildroot/boot/mv-ddr-marvell/mv-ddr-marvell.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# mv-ddr-marvell +# +################################################################################ + +# This is the commit for mv_ddr-armada-18.12.0 +MV_DDR_MARVELL_VERSION = 618dadd1491eb2f7b2fd74313c04f7accddae475 +MV_DDR_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(MV_DDR_MARVELL_VERSION)) +MV_DDR_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial +MV_DDR_MARVELL_LICENSE_FILES = ddr3_init.c + +$(eval $(generic-package)) diff --git a/buildroot/boot/mxs-bootlets/Config.in b/buildroot/boot/mxs-bootlets/Config.in index 4bb07a06f..b3e392afa 100644 --- a/buildroot/boot/mxs-bootlets/Config.in +++ b/buildroot/boot/mxs-bootlets/Config.in @@ -24,8 +24,8 @@ config BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT endchoice config BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL - depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL string "URL of custom bootlets tarball" + depends on BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL if BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT @@ -43,16 +43,16 @@ choice Select which bootstream to generate config BR2_TARGET_MXS_BOOTLETS_BAREBOX - depends on BR2_TARGET_BAREBOX bool "Barebox Bootloader" + depends on BR2_TARGET_BAREBOX config BR2_TARGET_MXS_BOOTLETS_LINUX - depends on BR2_LINUX_KERNEL bool "Linux Kernel" + depends on BR2_LINUX_KERNEL config BR2_TARGET_MXS_BOOTLETS_UBOOT - depends on BR2_TARGET_UBOOT bool "U-boot bootloader" + depends on BR2_TARGET_UBOOT endchoice diff --git a/buildroot/boot/mxs-bootlets/mxs-bootlets.hash b/buildroot/boot/mxs-bootlets/mxs-bootlets.hash new file mode 100644 index 000000000..6d3483c76 --- /dev/null +++ b/buildroot/boot/mxs-bootlets/mxs-bootlets.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 63f6068ae36884adef4259bbb1fe2591755718f22c46d0a59d854883dfab1ffc imx-bootlets-src-10.12.01.tar.gz diff --git a/buildroot/boot/mxs-bootlets/mxs-bootlets.mk b/buildroot/boot/mxs-bootlets/mxs-bootlets.mk index 2452a6bd9..adc22767f 100644 --- a/buildroot/boot/mxs-bootlets/mxs-bootlets.mk +++ b/buildroot/boot/mxs-bootlets/mxs-bootlets.mk @@ -5,36 +5,38 @@ ################################################################################ ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL),y) - MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL)) - MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL))) - MXS_BOOTLETS_SOURCE = $(notdir $(MXS_BOOTLETS_TARBALL)) +MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL)) +MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL))) +MXS_BOOTLETS_SOURCE = $(notdir $(MXS_BOOTLETS_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(MXS_BOOTLETS_SOURCE) else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT),y) - MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL) - MXS_BOOTLETS_SITE_METHOD = git - MXS_BOOTLETS_VERSION = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION)) +MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL) +MXS_BOOTLETS_SITE_METHOD = git +MXS_BOOTLETS_VERSION = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_VERSION)) +BR_NO_CHECK_HASH_FOR += $(MXS_BOOTLETS_SOURCE) else - MXS_BOOTLETS_VERSION = 10.12.01 - MXS_BOOTLETS_SITE = http://download.ossystems.com.br/bsp/freescale/source - MXS_BOOTLETS_SOURCE = imx-bootlets-src-$(MXS_BOOTLETS_VERSION).tar.gz +MXS_BOOTLETS_VERSION = 10.12.01 +MXS_BOOTLETS_SITE = http://download.ossystems.com.br/bsp/freescale/source +MXS_BOOTLETS_SOURCE = imx-bootlets-src-$(MXS_BOOTLETS_VERSION).tar.gz endif ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP37xx),y) - MXS_BOOTLETS_BOARD = stmp37xx_dev +MXS_BOOTLETS_BOARD = stmp37xx_dev else ifeq ($(BR2_TARGET_MXS_BOOTLETS_STMP378x),y) - MXS_BOOTLETS_BOARD = stmp378x_dev +MXS_BOOTLETS_BOARD = stmp378x_dev else ifeq ($(BR2_TARGET_MXS_BOOTLETS_IMX28EVK),y) - MXS_BOOTLETS_BOARD = iMX28_EVK +MXS_BOOTLETS_BOARD = iMX28_EVK else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD),y) - MXS_BOOTLETS_BOARD = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME)) +MXS_BOOTLETS_BOARD = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME)) endif ifeq ($(BR2_TARGET_MXS_BOOTLETS_HAS_IVT),y) - MXS_BOOTLETS_IVT_SUFFIX = _ivt - MXS_BOOTLETS_ELFTOSB_OPTIONS += -f imx28 +MXS_BOOTLETS_IVT_SUFFIX = _ivt +MXS_BOOTLETS_ELFTOSB_OPTIONS += -f imx28 endif MXS_BOOTLETS_DEPENDENCIES = host-elftosb -MXS_BOOTLETS_LICENSE = GPLv2+ +MXS_BOOTLETS_LICENSE = GPL-2.0+ ifeq ($(BR2_TARGET_MXS_BOOTLETS_BAREBOX),y) MXS_BOOTLETS_DEPENDENCIES += barebox @@ -92,7 +94,7 @@ define MXS_BOOTLETS_BUILD_CMDS $(MXS_BOOTLETS_SED_BAREBOX) $(MXS_BOOTLETS_SED_LINUX) $(MXS_BOOTLETS_SED_UBOOT) - $(HOST_DIR)/usr/bin/elftosb $(MXS_BOOTLETS_ELFTOSB_OPTIONS) \ + $(HOST_DIR)/bin/elftosb $(MXS_BOOTLETS_ELFTOSB_OPTIONS) \ -z -c $(@D)/$(MXS_BOOTLETS_BOOTDESC) \ -o $(@D)/$(MXS_BOOTLETS_BOOTSTREAM) endef diff --git a/buildroot/boot/opensbi/0001-Makefile-Don-t-specify-mabi-or-march.patch b/buildroot/boot/opensbi/0001-Makefile-Don-t-specify-mabi-or-march.patch new file mode 100644 index 000000000..5f554a6c2 --- /dev/null +++ b/buildroot/boot/opensbi/0001-Makefile-Don-t-specify-mabi-or-march.patch @@ -0,0 +1,37 @@ +From f5871e1f3650d6c8a032928cb5d8ca00c275c377 Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Fri, 15 Feb 2019 14:57:41 -0800 +Subject: [PATCH] Makefile: Don't specify mabi or march + +To avoid + can't link double-float modules with soft-float modules +errors when building 32-bit openSBI don't specify mabi or march. + +Signed-off-by: Alistair Francis +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index ae68f55..10851fc 100644 +--- a/Makefile ++++ b/Makefile +@@ -145,7 +145,6 @@ GENFLAGS += $(firmware-genflags-y) + CFLAGS = -g -Wall -Werror -nostdlib -fno-strict-aliasing -O2 + CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + CFLAGS += -mno-save-restore -mstrict-align +-CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) + CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) + CFLAGS += $(GENFLAGS) + CFLAGS += $(platform-cflags-y) +@@ -158,7 +157,6 @@ CPPFLAGS += $(firmware-cppflags-y) + ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__ + ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ASFLAGS += -mno-save-restore -mstrict-align +-ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) + ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) + ASFLAGS += $(GENFLAGS) + ASFLAGS += $(platform-asflags-y) +-- +2.20.1 + diff --git a/buildroot/boot/opensbi/Config.in b/buildroot/boot/opensbi/Config.in new file mode 100644 index 000000000..b9b0ace8a --- /dev/null +++ b/buildroot/boot/opensbi/Config.in @@ -0,0 +1,34 @@ +config BR2_TARGET_OPENSBI + bool "opensbi" + depends on BR2_riscv + help + OpenSBI aims to provide an open-source and extensible + implementation of the RISC-V SBI specification for a platform + specific firmware (M-mode) and a general purpose OS, + hypervisor or bootloader (S-mode or HS-mode). OpenSBI + implementation can be easily extended by RISC-V platform or + System-on-Chip vendors to fit a particular hadware + configuration. + + https://github.com/riscv/opensbi.git + +if BR2_TARGET_OPENSBI +config BR2_TARGET_OPENSBI_PLAT + string "OpenSBI Platform" + default "" + help + Specifies the OpenSBI platform to build. If no platform is + specified only the OpenSBI platform independent static + library libsbi.a is built. If a platform is specified then + the platform specific static library libplatsbi.a and firmware + examples are built. + +config BR2_TARGET_OPENSBI_LINUX_PAYLOAD + bool "Include Linux as OpenSBI Payload" + depends on BR2_TARGET_OPENSBI_PLAT != "" + depends on BR2_LINUX_KERNEL + depends on BR2_LINUX_KERNEL_IMAGE + help + Build OpenSBI with the Linux kernel as a Payload. + +endif diff --git a/buildroot/boot/opensbi/opensbi.hash b/buildroot/boot/opensbi/opensbi.hash new file mode 100644 index 000000000..f7280b890 --- /dev/null +++ b/buildroot/boot/opensbi/opensbi.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 17e048ac765e92e15f7436b604452614cf88dc2bcbbaab18cdc024f3fdd4c575 opensbi-0.8.tar.gz +sha256 82d13fb1bf6bb162629deeea9eb9c117e74548d3b707e478967691fe79a68e21 COPYING.BSD diff --git a/buildroot/boot/opensbi/opensbi.mk b/buildroot/boot/opensbi/opensbi.mk new file mode 100644 index 000000000..60b87c268 --- /dev/null +++ b/buildroot/boot/opensbi/opensbi.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# opensbi +# +################################################################################ + +OPENSBI_VERSION = 0.8 +OPENSBI_SITE = $(call github,riscv,opensbi,v$(OPENSBI_VERSION)) +OPENSBI_LICENSE = BSD-2-Clause +OPENSBI_LICENSE_FILES = COPYING.BSD +OPENSBI_INSTALL_TARGET = NO +OPENSBI_INSTALL_STAGING = YES + +OPENSBI_MAKE_ENV = \ + CROSS_COMPILE=$(TARGET_CROSS) + +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT)) +ifneq ($(OPENSBI_PLAT),) +OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT) +endif + +ifeq ($(BR2_TARGET_OPENSBI_LINUX_PAYLOAD),y) +OPENSBI_DEPENDENCIES += linux +OPENSBI_MAKE_ENV += FW_PAYLOAD_PATH="$(BINARIES_DIR)/Image" +endif + +define OPENSBI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D) +endef + +ifneq ($(OPENSBI_PLAT),) +OPENSBI_INSTALL_IMAGES = YES +OPENSBI_FW_IMAGES += jump dynamic +ifeq ($(BR2_TARGET_OPENSBI_LINUX_PAYLOAD),y) +OPENSBI_FW_IMAGES += payload +endif +endif + +define OPENSBI_INSTALL_IMAGES_CMDS + $(foreach f,$(OPENSBI_FW_IMAGES),\ + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_$(f).bin \ + $(BINARIES_DIR)/fw_$(f).bin + $(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_$(f).elf \ + $(BINARIES_DIR)/fw_$(f).elf + ) +endef + +# libsbi.a is not a library meant to be linked in user-space code, but +# with bare metal code, which is why we don't install it in +# $(STAGING_DIR)/usr/lib +define OPENSBI_INSTALL_STAGING_CMDS + $(INSTALL) -m 0644 -D $(@D)/build/lib/libsbi.a $(STAGING_DIR)/usr/share/opensbi/libsbi.a +endef + +$(eval $(generic-package)) diff --git a/buildroot/boot/optee-os/0001-scripts-pem_to_pub.py-use-Cryptodome-module-instead-.patch b/buildroot/boot/optee-os/0001-scripts-pem_to_pub.py-use-Cryptodome-module-instead-.patch new file mode 100644 index 000000000..822ef4b39 --- /dev/null +++ b/buildroot/boot/optee-os/0001-scripts-pem_to_pub.py-use-Cryptodome-module-instead-.patch @@ -0,0 +1,34 @@ +From 04a8def18caccad27292ba97dc8ea8b3eb3a6afd Mon Sep 17 00:00:00 2001 +From: Etienne Carriere +Date: Tue, 26 May 2020 11:10:45 +0200 +Subject: [PATCH] scripts/pem_to_pub.py: use Cryptodome module instead of + Crypto + +Upgrade scripts/pem_to_pub.py to use module Cryptodome instead of +module Crypto for consistency with the other helper Python scripts +of OP-TEE OS package. + +Signed-off-by: Etienne Carriere +Acked-by: Jens Wiklander +--- + scripts/pem_to_pub_c.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py +index 3a896a393..d3f0e5006 100755 +--- a/scripts/pem_to_pub_c.py ++++ b/scripts/pem_to_pub_c.py +@@ -21,8 +21,8 @@ def get_args(): + + def main(): + import array +- from Crypto.PublicKey import RSA +- from Crypto.Util.number import long_to_bytes ++ from Cryptodome.PublicKey import RSA ++ from Cryptodome.Util.number import long_to_bytes + + args = get_args() + +-- +2.17.1 + diff --git a/buildroot/boot/optee-os/0002-config.mk-fix-CFG_OPTEE_REVISION_MINOR.patch b/buildroot/boot/optee-os/0002-config.mk-fix-CFG_OPTEE_REVISION_MINOR.patch new file mode 100644 index 000000000..867836ef0 --- /dev/null +++ b/buildroot/boot/optee-os/0002-config.mk-fix-CFG_OPTEE_REVISION_MINOR.patch @@ -0,0 +1,32 @@ +From c5f5e6bf6644a536a0d53bfb9f5c5419150035dd Mon Sep 17 00:00:00 2001 +From: Jens Wiklander +Date: Mon, 25 May 2020 12:20:08 +0200 +Subject: [PATCH] config.mk: fix CFG_OPTEE_REVISION_MINOR + +The current release is 3.9.0, change the revision to match. + +Fixes: af141c61fe7a ("Update CHANGELOG for 3.9.0") +Reviewed-by: Joakim Bech +Reported-by: Etienne Carriere +Signed-off-by: Jens Wiklander +Signed-off-by: Etienne Carriere +--- + mk/config.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mk/config.mk b/mk/config.mk +index c00a14618..bc49f83d8 100644 +--- a/mk/config.mk ++++ b/mk/config.mk +@@ -116,7 +116,7 @@ endif + # with limited depth not including any tag, so there is really no guarantee + # that TEE_IMPL_VERSION contains the major and minor revision numbers. + CFG_OPTEE_REVISION_MAJOR ?= 3 +-CFG_OPTEE_REVISION_MINOR ?= 8 ++CFG_OPTEE_REVISION_MINOR ?= 9 + + # Trusted OS implementation manufacturer name + CFG_TEE_MANUFACTURER ?= LINARO +-- +2.17.1 + diff --git a/buildroot/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch b/buildroot/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch new file mode 100644 index 000000000..911a09b98 --- /dev/null +++ b/buildroot/boot/optee-os/0003-mk-core-ta-Configurable-Python-interpreter.patch @@ -0,0 +1,249 @@ +From 49c7d2557d92993a1e09e50c961b9d4f7ab1091b Mon Sep 17 00:00:00 2001 +From: Dick Olsson +Date: Wed, 22 Jul 2020 08:49:12 +0200 +Subject: [PATCH] mk: core: ta: Configurable Python interpreter + +Build systems that manage multiple different python interpreters need +explicit control over which version of the interpreter to use. +This patch enables one to override the default interpreter with the path +to a specific one. + +Signed-off-by: Dick Olsson +Reviewed-by: Jens Wiklander +Reviewed-by: Jerome Forissier +--- + core/arch/arm/arm.mk | 2 ++ + core/arch/arm/kernel/link.mk | 22 +++++++++++----------- + core/sub.mk | 10 +++++----- + mk/config.mk | 6 ++++++ + mk/lib.mk | 2 +- + ta/arch/arm/link.mk | 2 +- + ta/arch/arm/link_shlib.mk | 2 +- + ta/ta.mk | 2 +- + 8 files changed, 28 insertions(+), 20 deletions(-) + +diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk +index 5c9f16ef..878035c5 100644 +--- a/core/arch/arm/arm.mk ++++ b/core/arch/arm/arm.mk +@@ -245,6 +245,7 @@ ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE32 ?= $$(CROSS_COMPILE)_nl_ + ta-mk-file-export-add-ta_arm32 += CROSS_COMPILE_ta_arm32 ?= $$(CROSS_COMPILE32)_nl_ + ta-mk-file-export-add-ta_arm32 += COMPILER ?= gcc_nl_ + ta-mk-file-export-add-ta_arm32 += COMPILER_ta_arm32 ?= $$(COMPILER)_nl_ ++ta-mk-file-export-add-ta_arm32 += PYTHON3 ?= python3_nl_ + endif + + ifneq ($(filter ta_arm64,$(ta-targets)),) +@@ -275,6 +276,7 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_ + ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_ + ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_ + ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_ ++ta-mk-file-export-add-ta_arm64 += PYTHON3 ?= python3_nl_ + endif + + # Set cross compiler prefix for each TA target +diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk +index 1b89b895..69375ad6 100644 +--- a/core/arch/arm/kernel/link.mk ++++ b/core/arch/arm/kernel/link.mk +@@ -62,13 +62,13 @@ cleanfiles += $(link-out-dir)/text_unpaged.ld.S + $(link-out-dir)/text_unpaged.ld.S: $(link-out-dir)/unpaged.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .text. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@ + + cleanfiles += $(link-out-dir)/rodata_unpaged.ld.S + $(link-out-dir)/rodata_unpaged.ld.S: $(link-out-dir)/unpaged.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .rodata. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@ + + + cleanfiles += $(link-out-dir)/init_entries.txt +@@ -92,12 +92,12 @@ cleanfiles += $(link-out-dir)/text_init.ld.S + $(link-out-dir)/text_init.ld.S: $(link-out-dir)/init.o + @$(cmd-echo-silent) ' GEN $@' + $(q)$(READELFcore) -S -W $< | \ +- ./scripts/gen_ld_sects.py .text. > $@ ++ $(PYTHON3) ./scripts/gen_ld_sects.py .text. > $@ + + cleanfiles += $(link-out-dir)/rodata_init.ld.S + $(link-out-dir)/rodata_init.ld.S: $(link-out-dir)/init.o + @$(cmd-echo-silent) ' GEN $@' +- $(q)$(READELFcore) -S -W $< | ./scripts/gen_ld_sects.py .rodata. > $@ ++ $(q)$(READELFcore) -S -W $< | $(PYTHON3) ./scripts/gen_ld_sects.py .rodata. > $@ + + -include $(link-script-dep) + +@@ -176,39 +176,39 @@ cleanfiles += $(link-out-dir)/tee-pager.bin + $(link-out-dir)/tee-pager.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @echo Warning: $@ is deprecated + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pager_bin $@ + + cleanfiles += $(link-out-dir)/tee-pageable.bin + $(link-out-dir)/tee-pageable.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @echo Warning: $@ is deprecated + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_pageable_bin $@ + + all: $(link-out-dir)/tee.bin + cleanfiles += $(link-out-dir)/tee.bin + $(link-out-dir)/tee.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_tee_bin $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_tee_bin $@ + + all: $(link-out-dir)/tee-header_v2.bin + cleanfiles += $(link-out-dir)/tee-header_v2.bin + $(link-out-dir)/tee-header_v2.bin: $(link-out-dir)/tee.elf \ + scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_header_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_header_v2 $@ + + all: $(link-out-dir)/tee-pager_v2.bin + cleanfiles += $(link-out-dir)/tee-pager_v2.bin + $(link-out-dir)/tee-pager_v2.bin: $(link-out-dir)/tee.elf scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_pager_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pager_v2 $@ + + all: $(link-out-dir)/tee-pageable_v2.bin + cleanfiles += $(link-out-dir)/tee-pageable_v2.bin + $(link-out-dir)/tee-pageable_v2.bin: $(link-out-dir)/tee.elf \ + scripts/gen_tee_bin.py + @$(cmd-echo-silent) ' GEN $@' +- $(q)scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@ ++ $(q)$(PYTHON3) scripts/gen_tee_bin.py --input $< --out_pageable_v2 $@ + + all: $(link-out-dir)/tee.symb_sizes + cleanfiles += $(link-out-dir)/tee.symb_sizes +@@ -222,5 +222,5 @@ mem_usage: $(link-out-dir)/tee.mem_usage + + $(link-out-dir)/tee.mem_usage: $(link-out-dir)/tee.elf + @$(cmd-echo-silent) ' GEN $@' +- $(q)./scripts/mem_usage.py $< > $@ ++ $(q)$(PYTHON3) ./scripts/mem_usage.py $< > $@ + endif +diff --git a/core/sub.mk b/core/sub.mk +index 03cc6bc7..0959c9a9 100644 +--- a/core/sub.mk ++++ b/core/sub.mk +@@ -9,13 +9,13 @@ ifeq ($(CFG_WITH_USER_TA),y) + gensrcs-y += ta_pub_key + produce-ta_pub_key = ta_pub_key.c + depends-ta_pub_key = $(TA_SIGN_KEY) scripts/pem_to_pub_c.py +-recipe-ta_pub_key = scripts/pem_to_pub_c.py --prefix ta_pub_key \ ++recipe-ta_pub_key = $(PYTHON3) scripts/pem_to_pub_c.py --prefix ta_pub_key \ + --key $(TA_SIGN_KEY) --out $(sub-dir-out)/ta_pub_key.c + + gensrcs-y += ldelf + produce-ldelf = ldelf_hex.c + depends-ldelf = scripts/gen_ldelf_hex.py $(out-dir)/ldelf/ldelf.elf +-recipe-ldelf = scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \ ++recipe-ldelf = $(PYTHON3) scripts/gen_ldelf_hex.py --input $(out-dir)/ldelf/ldelf.elf \ + --output $(sub-dir-out)/ldelf_hex.c + endif + +@@ -25,7 +25,7 @@ early-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1))) + gensrcs-y += early-ta-$1 + produce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c + depends-early-ta-$1 = $1 scripts/ta_bin_to_c.py +-recipe-early-ta-$1 = scripts/ta_bin_to_c.py --compress --ta $1 \ ++recipe-early-ta-$1 = $(PYTHON3) scripts/ta_bin_to_c.py --compress --ta $1 \ + --out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c + endef + $(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f)))) +@@ -40,7 +40,7 @@ core-embed-fdt-c = $(out-dir)/$(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=. + gensrcs-y += embedded_secure_dtb + produce-embedded_secure_dtb = arch/$(ARCH)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.c) + depends-embedded_secure_dtb = $(core-embed-fdt-dtb) scripts/bin_to_c.py +-recipe-embedded_secure_dtb = scripts/bin_to_c.py \ ++recipe-embedded_secure_dtb = $(PYTHON3) scripts/bin_to_c.py \ + --bin $(core-embed-fdt-dtb) \ + --vname embedded_secure_dtb \ + --out $(core-embed-fdt-c) +@@ -58,7 +58,7 @@ $(conf-mk-xz-base64): $(conf-mk-file) + gensrcs-y += conf_str + produce-conf_str = conf.mk.xz.base64.c + depends-conf_str = $(conf-mk-xz-base64) +-recipe-conf_str = scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \ ++recipe-conf_str = $(PYTHON3) scripts/bin_to_c.py --text --bin $(conf-mk-xz-base64) \ + --out $(sub-dir-out)/conf.mk.xz.base64.c \ + --vname conf_str + endif +diff --git a/mk/config.mk b/mk/config.mk +index 70732c4d..1fe65576 100644 +--- a/mk/config.mk ++++ b/mk/config.mk +@@ -32,6 +32,12 @@ endif + # Supported values: undefined, 1, 2 and 3. 3 gives more warnings. + WARNS ?= 3 + ++# Path to the Python interpreter used by the build system. ++# This variable is set to the default python3 interpreter in the user's ++# path. But build environments that require more explicit control can ++# set the path to a specific interpreter through this variable. ++PYTHON3 ?= python3 ++ + # Define DEBUG=1 to compile without optimization (forces -O0) + # DEBUG=1 + +diff --git a/mk/lib.mk b/mk/lib.mk +index 6e890893..3bd422d6 100644 +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -72,7 +72,7 @@ $(lib-shlibstrippedfile): $(lib-shlibfile) + + $(lib-shlibtafile): $(lib-shlibstrippedfile) $(TA_SIGN_KEY) + @$(cmd-echo-silent) ' SIGN $$@' +- $$(q)$$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@ ++ $$(q)$$(PYTHON3) $$(SIGN) --key $(TA_SIGN_KEY) --uuid $(libuuid) --in $$< --out $$@ + + $(lib-libuuidln): $(lib-shlibfile) + @$(cmd-echo-silent) ' LN $$@' +diff --git a/ta/arch/arm/link.mk b/ta/arch/arm/link.mk +index db7d0b9a..b95c0cba 100644 +--- a/ta/arch/arm/link.mk ++++ b/ta/arch/arm/link.mk +@@ -2,7 +2,7 @@ link-script$(sm) = $(ta-dev-kit-dir$(sm))/src/ta.ld.S + link-script-pp$(sm) = $(link-out-dir$(sm))/ta.lds + link-script-dep$(sm) = $(link-out-dir$(sm))/.ta.ld.d + +-SIGN_ENC ?= $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py ++SIGN_ENC ?= $(PYTHON3) $(ta-dev-kit-dir$(sm))/scripts/sign_encrypt.py + TA_SIGN_KEY ?= $(ta-dev-kit-dir$(sm))/keys/default_ta.pem + + ifeq ($(CFG_ENCRYPT_TA),y) +diff --git a/ta/arch/arm/link_shlib.mk b/ta/arch/arm/link_shlib.mk +index ed81e59a..cc177ef0 100644 +--- a/ta/arch/arm/link_shlib.mk ++++ b/ta/arch/arm/link_shlib.mk +@@ -47,5 +47,5 @@ $(link-out-dir)/$(shlibuuid).elf: $(link-out-dir)/$(shlibname).so + $(link-out-dir)/$(shlibuuid).ta: $(link-out-dir)/$(shlibname).stripped.so \ + $(TA_SIGN_KEY) + @$(cmd-echo-silent) ' SIGN $@' +- $(q)$(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \ ++ $(q)$(PYTHON3) $(SIGN) --key $(TA_SIGN_KEY) --uuid $(shlibuuid) \ + --in $< --out $@ +diff --git a/ta/ta.mk b/ta/ta.mk +index 918880f4..59ed87f7 100644 +--- a/ta/ta.mk ++++ b/ta/ta.mk +@@ -67,7 +67,7 @@ $$(arm32-user-sysregs-out)/$$(arm32-user-sysregs-$(1)-h): \ + $(1) scripts/arm32_sysreg.py + @$(cmd-echo-silent) ' GEN $$@' + $(q)mkdir -p $$(dir $$@) +- $(q)scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \ ++ $(q)$(PYTHON3) scripts/arm32_sysreg.py --guard __$$(arm32-user-sysregs-$(1)-h) \ + < $$< > $$@ + + endef #process-arm32-user-sysreg +-- +2.20.1 + diff --git a/buildroot/boot/optee-os/Config.in b/buildroot/boot/optee-os/Config.in new file mode 100644 index 000000000..5a786833e --- /dev/null +++ b/buildroot/boot/optee-os/Config.in @@ -0,0 +1,109 @@ +config BR2_TARGET_OPTEE_OS + bool "optee_os" + depends on BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A + help + OP-TEE OS provides the secure world boot image and the trust + application development kit of the OP-TEE project. OP-TEE OS + also provides generic trusted application one can embedded + into its system. + + http://github.com/OP-TEE/optee_os + +if BR2_TARGET_OPTEE_OS + +choice + prompt "OP-TEE OS version" + default BR2_TARGET_OPTEE_OS_LATEST + help + Select the version of OP-TEE OS you want to use + +config BR2_TARGET_OPTEE_OS_LATEST + bool "3.9.0" + help + Use the latest release tag from the OP-TEE OS official Git + repository. + +config BR2_TARGET_OPTEE_OS_CUSTOM_GIT + bool "Custom Git repository" + help + Use a custom version fetched from a Git repository. + +endchoice + +if BR2_TARGET_OPTEE_OS_CUSTOM_GIT + +config BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL + string "URL of custom repository" + depends on BR2_TARGET_OPTEE_OS_CUSTOM_GIT + help + Specific location of the reference source tree Git + repository. + +config BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION + string "Custom repository version" + depends on BR2_TARGET_OPTEE_OS_CUSTOM_GIT + help + Revision to use in the typical format used by Git, i.e a + SHA1 or a tag. + +endif + +config BR2_TARGET_OPTEE_OS_VERSION + string + default "3.9.0" if BR2_TARGET_OPTEE_OS_LATEST + default BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION \ + if BR2_TARGET_OPTEE_OS_CUSTOM_GIT + +config BR2_TARGET_OPTEE_OS_CORE + bool "Build core" + default y + help + This option will build and install the OP-TEE core + boot images. + +config BR2_TARGET_OPTEE_OS_SDK + bool "Build TA devkit" + default y + help + This option will build and install the OP-TEE development + kit for building OP-TEE trusted application images. It is + installed in the staging directory /lib/optee. + +config BR2_TARGET_OPTEE_OS_SERVICES + bool "Build service TAs and libs" + default y + select BR2_TARGET_OPTEE_OS_CORE + help + This option installs the service trusted applications and + trusted shared libraries built from OP-TEE OS source tree. + These are installed in target /lib/optee_armtz directory + as other trusted applications. At runtime OP-TEE OS can + load these from this non-secure filesystem/directory into + the secure world for execution. + +config BR2_TARGET_OPTEE_OS_PLATFORM + string "Target platform (mandatory)" + help + Value for the mandated PLATFORM build directive provided to + OP-TEE OS. + +config BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR + string "Target platform flavor (optional)" + help + Value for the optional PLATFORM_FLAVOR build directive + provided to OP-TEE OS. + +config BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES + string "Additional build variables" + help + Additional parameters for the OP-TEE OS build + E.g. 'CFG_TEE_CORE_LOG_LEVEL=3 CFG_UNWIND=y' + +config BR2_TARGET_OPTEE_OS_CORE_IMAGES + string "Binary boot images" + default "tee.bin tee-*_v2.bin" + help + Names of generated image files that are installed in the + output images/ directory. + +endif # BR2_TARGET_OPTEE_OS diff --git a/buildroot/boot/optee-os/optee-os.hash b/buildroot/boot/optee-os/optee-os.hash new file mode 100644 index 000000000..f38ebc569 --- /dev/null +++ b/buildroot/boot/optee-os/optee-os.hash @@ -0,0 +1,4 @@ +# From https://github.com/OP-TEE/optee_os/archive/3.9.0.tar.gz +sha256 ac6f145ebde715d4d7a1d5277f4e08a06b660e1c0237c926a274d86cd90ef4c5 optee-os-3.9.0.tar.gz +# Locally computed +sha256 1247ee90858f4037b6cac63cbffddfed435d0d73c631b37d78c1e6e6ab3e5d1a LICENSE diff --git a/buildroot/boot/optee-os/optee-os.mk b/buildroot/boot/optee-os/optee-os.mk new file mode 100644 index 000000000..03ce08ffb --- /dev/null +++ b/buildroot/boot/optee-os/optee-os.mk @@ -0,0 +1,121 @@ +################################################################################ +# +# optee-os +# +################################################################################ + +OPTEE_OS_VERSION = $(call qstrip,$(BR2_TARGET_OPTEE_OS_VERSION)) +OPTEE_OS_LICENSE = BSD-2-Clause +ifeq ($(BR2_TARGET_OPTEE_OS_LATEST),y) +OPTEE_OS_LICENSE_FILES = LICENSE +endif + +OPTEE_OS_INSTALL_STAGING = YES +OPTEE_OS_INSTALL_IMAGES = YES + +ifeq ($(BR2_TARGET_OPTEE_OS_CUSTOM_GIT),y) +OPTEE_OS_SITE = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL)) +OPTEE_OS_SITE_METHOD = git +BR_NO_CHECK_HASH_FOR += $(OPTEE_OS_SOURCE) +else +OPTEE_OS_SITE = $(call github,OP-TEE,optee_os,$(OPTEE_OS_VERSION)) +endif + +OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python3-pycryptodomex host-python3-pyelftools + +# On 64bit targets, OP-TEE OS can be built in 32bit mode, or +# can be built in 64bit mode and support 32bit and 64bit +# trusted applications. Since buildroot currently references +# a single cross compiler, build exclusively in 32bit +# or 64bit mode. +OPTEE_OS_MAKE_OPTS = \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CROSS_COMPILE_core="$(TARGET_CROSS)" \ + CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \ + CROSS_COMPILE_ta_arm32="$(TARGET_CROSS)" \ + PYTHON3="$(HOST_DIR)/bin/python3" + +ifeq ($(BR2_aarch64),y) +OPTEE_OS_MAKE_OPTS += \ + CFG_ARM64_core=y \ + CFG_USER_TA_TARGETS=ta_arm64 +else +OPTEE_OS_MAKE_OPTS += \ + CFG_ARM32_core=y +endif + +# Get mandatory PLAFORM and optional PLATFORM_FLAVOR and additional +# variables +OPTEE_OS_MAKE_OPTS += PLATFORM=$(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM)) +ifneq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR)),) +OPTEE_OS_MAKE_OPTS += PLATFORM_FLAVOR=$(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR)) +endif +OPTEE_OS_MAKE_OPTS += $(call qstrip,$(BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES)) + +# Requests OP-TEE OS to build from subdirectory out/ of its sourcetree +# root path otherwise the output directory path depends on the target +# platform name. +OPTEE_OS_BUILDDIR_OUT = out +ifeq ($(BR2_aarch64),y) +OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm64 +OPTEE_OS_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64 +endif +ifeq ($(BR2_arm),y) +OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm32 +OPTEE_OS_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32 +endif + +OPTEE_OS_IMAGE_FILES = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CORE_IMAGES)) + +ifeq ($(BR2_TARGET_OPTEE_OS_CORE),y) +define OPTEE_OS_BUILD_CORE + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \ + $(TARGET_CONFIGURE_OPTS) $(OPTEE_OS_MAKE_OPTS) all +endef +define OPTEE_OS_INSTALL_IMAGES_CORE + mkdir -p $(BINARIES_DIR) + $(foreach f,$(OPTEE_OS_IMAGE_FILES), \ + cp -dpf $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f)) $(BINARIES_DIR)/ + ) +endef +endif # BR2_TARGET_OPTEE_OS_CORE + +ifeq ($(BR2_TARGET_OPTEE_OS_SERVICES),y) +define OPTEE_OS_INSTALL_TARGET_CMDS + $(if $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta), + $(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \ + $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta) + $(if $(wildcard $(@D)/$(OPTEE_OS_LOCAL_SDK)/lib/*.ta), + $(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \ + $(@D)/$(OPTEE_OS_LOCAL_SDK)/lib/*.ta) +endef +endif # BR2_TARGET_OPTEE_OS_SERVICES + +ifeq ($(BR2_TARGET_OPTEE_OS_SDK),y) +define OPTEE_OS_BUILD_SDK + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \ + $(TARGET_CONFIGURE_OPTS) $(OPTEE_OS_MAKE_OPTS) ta_dev_kit +endef +define OPTEE_OS_INSTALL_STAGING_CMDS + mkdir -p $(OPTEE_OS_SDK) + cp -ardpf $(@D)/$(OPTEE_OS_LOCAL_SDK)/* $(OPTEE_OS_SDK) +endef +endif # BR2_TARGET_OPTEE_OS_SDK + +define OPTEE_OS_BUILD_CMDS + $(OPTEE_OS_BUILD_CORE) + $(OPTEE_OS_BUILD_SDK) +endef + +define OPTEE_OS_INSTALL_IMAGES_CMDS + $(OPTEE_OS_INSTALL_IMAGES_CORE) + $(OPTEE_OS_INSTALL_IMAGES_SERVICES) +endef + +ifeq ($(BR2_TARGET_OPTEE_OS)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_TARGET_OPTEE_OS_PLATFORM)),) +$(error No OP-TEE OS platform set. Check your BR2_TARGET_OPTEE_OS_PLATFORM setting) +endif +endif # BR2_TARGET_OPTEE_OS && BR2_BUILDING + +$(eval $(generic-package)) diff --git a/buildroot/boot/s500-bootloader/Config.in b/buildroot/boot/s500-bootloader/Config.in new file mode 100644 index 000000000..7bb689f30 --- /dev/null +++ b/buildroot/boot/s500-bootloader/Config.in @@ -0,0 +1,17 @@ +config BR2_TARGET_S500_BOOTLOADER + bool "s500-bootloader" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + 1st level bootloader for Actions Semiconductor S500 SoC. + + https://github.com/xapp-le/owl + +config BR2_TARGET_S500_BOOTLOADER_BOARD + string "board to configure for" + depends on BR2_TARGET_S500_BOOTLOADER + help + Specify the board to configure the bootloader for. + This should be the name of a directory under s500/boards + containing a suitable bootloader.ini file. diff --git a/buildroot/boot/s500-bootloader/s500-bootloader.hash b/buildroot/boot/s500-bootloader/s500-bootloader.hash new file mode 100644 index 000000000..d538f23b2 --- /dev/null +++ b/buildroot/boot/s500-bootloader/s500-bootloader.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b183024ac69f51ea7befd28d03b2ec35a7280e270405600fb4f37aa91d9c9571 s500-bootloader-a8d7fa1d9a7f353ec4613febf30f4ca99a10a106.tar.gz diff --git a/buildroot/boot/s500-bootloader/s500-bootloader.mk b/buildroot/boot/s500-bootloader/s500-bootloader.mk new file mode 100644 index 000000000..bc87b091c --- /dev/null +++ b/buildroot/boot/s500-bootloader/s500-bootloader.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# s500-bootloader +# +################################################################################ + +S500_BOOTLOADER_VERSION = a8d7fa1d9a7f353ec4613febf30f4ca99a10a106 +S500_BOOTLOADER_SITE = $(call github,xapp-le,owl,$(S500_BOOTLOADER_VERSION)) +S500_BOOTLOADER_LICENSE = PROPRIETARY +S500_BOOTLOADER_INSTALL_TARGET = NO +S500_BOOTLOADER_INSTALL_IMAGES = YES + +S500_BOOTLOADER_BOARD = $(call qstrip,$(BR2_TARGET_S500_BOOTLOADER_BOARD)) + +define S500_BOOTLOADER_BUILD_CMDS + cd $(@D) && ./tools/utils/bootloader_pack \ + s500/bootloader/bootloader.bin \ + s500/boards/$(S500_BOOTLOADER_BOARD)/bootloader.ini \ + s500-bootloader.bin +endef + +define S500_BOOTLOADER_INSTALL_IMAGES_CMDS + $(INSTALL) -m 0644 -D $(@D)/s500-bootloader.bin \ + $(BINARIES_DIR)/s500-bootloader.bin +endef + +$(eval $(generic-package)) + +ifeq ($(BR2_TARGET_S500_BOOTLOADER)$(BR_BUILDING),yy) +# we NEED a board name +ifeq ($(S500_BOOTLOADER_BOARD),) +$(error No s500-bootloader board specified. Check your BR2_TARGET_S500_BOOTLOADER settings) +endif +endif diff --git a/buildroot/boot/shim/Config.in b/buildroot/boot/shim/Config.in new file mode 100644 index 000000000..ea6650f54 --- /dev/null +++ b/buildroot/boot/shim/Config.in @@ -0,0 +1,19 @@ +config BR2_TARGET_SHIM + bool "shim" + depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS + # ARM32 build currently broken + depends on !BR2_ARM_CPU_HAS_ARM + select BR2_PACKAGE_GNU_EFI + help + Boot loader to chain-load signed boot loaders under Secure + Boot. + + This package provides a minimalist boot loader which allows + verifying signatures of other UEFI binaries against either + the Secure Boot DB/DBX or against a built-in signature + database. Its purpose is to allow a small, + infrequently-changing binary to be signed by the UEFI CA, + while allowing an OS distributor to revision their main + bootloader independently of the CA. + + https://github.com/rhboot/shim diff --git a/buildroot/boot/shim/shim.hash b/buildroot/boot/shim/shim.hash new file mode 100644 index 000000000..318390f80 --- /dev/null +++ b/buildroot/boot/shim/shim.hash @@ -0,0 +1,3 @@ +# locally computed hash +sha256 279d19cc95b9974ea2379401a6a0653d949c3fa3d61f0c4bd6a7b9e840bdc425 shim-15.tar.gz +sha256 15edf527919ddcb2f514ab9d16ad07ef219e4bb490e0b79560be510f0c159cc2 COPYRIGHT diff --git a/buildroot/boot/shim/shim.mk b/buildroot/boot/shim/shim.mk new file mode 100644 index 000000000..ba5bc5195 --- /dev/null +++ b/buildroot/boot/shim/shim.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# shim +# +################################################################################ + +SHIM_VERSION = 15 +SHIM_SITE = $(call github,rhboot,shim,$(SHIM_VERSION)) +SHIM_LICENSE = BSD-2-Clause +SHIM_LICENSE_FILES = COPYRIGHT +SHIM_DEPENDENCIES = gnu-efi +SHIM_INSTALL_TARGET = NO +SHIM_INSTALL_IMAGES = YES + +SHIM_MAKE_OPTS = \ + ARCH="$(GNU_EFI_PLATFORM)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DASHJ="-j$(PARALLEL_JOBS)" \ + EFI_INCLUDE="$(STAGING_DIR)/usr/include/efi" \ + EFI_PATH="$(STAGING_DIR)/usr/lib" \ + LIBDIR="$(STAGING_DIR)/usr/lib" + +define SHIM_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(SHIM_MAKE_OPTS) +endef + +define SHIM_INSTALL_IMAGES_CMDS + $(INSTALL) -m 0755 -t $(BINARIES_DIR) $(@D)/*.efi +endef + +$(eval $(generic-package)) diff --git a/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch b/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch new file mode 100644 index 000000000..633d996ed --- /dev/null +++ b/buildroot/boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch @@ -0,0 +1,82 @@ +From da5cbd1a3b248f2d32281a1766a3d1414c0e8e03 Mon Sep 17 00:00:00 2001 +From: Sylvain Gault +Date: Tue, 29 Sep 2015 02:38:25 +0200 +Subject: [PATCH] bios: Fix alignment change with gcc 5 + +The section aligment specified in the ld scripts have to be greater or +equal to those in the .o files generated by gcc. + +Signed-off-by: Sylvain Gault +Tested-by: poma +Signed-off-by: Paulo Alcantara +Signed-off-by: Frank Hunleth +--- + core/i386/syslinux.ld | 6 +++--- + core/x86_64/syslinux.ld | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld +index 7b4e012..7390451 100644 +--- a/core/i386/syslinux.ld ++++ b/core/i386/syslinux.ld +@@ -266,7 +266,7 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __rodata_vma = .; + __rodata_lma = __rodata_vma + __text_lma - __text_vma; +@@ -361,7 +361,7 @@ SECTIONS + __dynamic_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __data_vma = .; + __data_lma = __data_vma + __text_lma - __text_vma; +@@ -377,7 +377,7 @@ SECTIONS + __pm_code_dwords = (__pm_code_len + 3) >> 2; + + . = ALIGN(128); +- ++ + __bss_vma = .; + __bss_lma = .; /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { +diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld +index 1057112..bf815c4 100644 +--- a/core/x86_64/syslinux.ld ++++ b/core/x86_64/syslinux.ld +@@ -266,7 +266,7 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __rodata_vma = .; + __rodata_lma = __rodata_vma + __text_lma - __text_vma; +@@ -361,7 +361,7 @@ SECTIONS + __dynamic_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __data_vma = .; + __data_lma = __data_vma + __text_lma - __text_vma; +@@ -377,7 +377,7 @@ SECTIONS + __pm_code_dwords = (__pm_code_len + 3) >> 2; + + . = ALIGN(128); +- ++ + __bss_vma = .; + __bss_lma = .; /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { +-- +2.7.4 + diff --git a/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch b/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch new file mode 100644 index 000000000..64a08b857 --- /dev/null +++ b/buildroot/boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch @@ -0,0 +1,30 @@ +From 250bf2c921713434627dc7bc8b0918fa0841f9b7 Mon Sep 17 00:00:00 2001 +From: Graham Inggs +Date: Wed, 5 Apr 2017 22:03:12 +0200 +Subject: [PATCH] Disable PIE to avoid FTBFS on amd64 + +gcc 6.x has PIE support enabled by default, which causes a build issue +with syslinux. This patch disables PIE support in the relevant +syslinux Makefile. + +Signed-off-by: Ryan Coe +--- + gpxe/src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gpxe/src/Makefile b/gpxe/src/Makefile +index cc91d78..077af64 100644 +--- a/gpxe/src/Makefile ++++ b/gpxe/src/Makefile +@@ -4,7 +4,7 @@ + # + + CLEANUP := +-CFLAGS := ++CFLAGS := -fno-PIE + ASFLAGS := + LDFLAGS := + MAKEDEPS := Makefile +-- +2.7.4 + diff --git a/buildroot/boot/syslinux/0003-memdisk-Force-ld-output-format-to-32-bits.patch b/buildroot/boot/syslinux/0003-memdisk-Force-ld-output-format-to-32-bits.patch new file mode 100644 index 000000000..4eedf4973 --- /dev/null +++ b/buildroot/boot/syslinux/0003-memdisk-Force-ld-output-format-to-32-bits.patch @@ -0,0 +1,32 @@ +From c0287594239d5af2082cac20817f8e8b11a4b1b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Wed, 5 Apr 2017 14:18:09 +0200 +Subject: [PATCH] memdisk: Force ld output format to 32-bits +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On toolchains where the default output is x86_64, we need to be +consistent with the other .o files + +Signed-off-by: Benoît Allard +--- + memdisk/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/memdisk/Makefile b/memdisk/Makefile +index e6557d8..06613ff 100644 +--- a/memdisk/Makefile ++++ b/memdisk/Makefile +@@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm + $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< + + memdisk_%.o: memdisk_%.bin +- $(LD) -r -b binary -o $@ $< ++ $(LD) --oformat elf32-i386 -r -b binary -o $@ $< + + memdisk16.elf: $(OBJS16) + $(LD) -Ttext 0 -o $@ $^ +-- +2.7.4 + diff --git a/buildroot/boot/syslinux/0004-utils-Use-the-host-toolchain-to-build.patch b/buildroot/boot/syslinux/0004-utils-Use-the-host-toolchain-to-build.patch new file mode 100644 index 000000000..e091a3a89 --- /dev/null +++ b/buildroot/boot/syslinux/0004-utils-Use-the-host-toolchain-to-build.patch @@ -0,0 +1,60 @@ +From e000251144056c99e390a2a4449d06cbd2a19c0a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Wed, 5 Apr 2017 14:25:02 +0200 +Subject: [PATCH] utils: Use the host toolchain to build. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The utilities are meant to run on the host machine, hence must be built using +the host toolchain. + +Signed-off-by: Benoît Allard +--- + utils/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/utils/Makefile b/utils/Makefile +index dfe6259..ac91aaa 100644 +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -17,8 +17,8 @@ + VPATH = $(SRC) + include $(MAKEDIR)/syslinux.mk + +-CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) +-LDFLAGS = -O2 ++CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) ++LDFLAGS = $(LDFLAGS_FOR_BUILD) -O2 + + C_TARGETS = isohybrid gethostip memdiskfind + SCRIPT_TARGETS = mkdiskimage +@@ -35,7 +35,7 @@ ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \ + all: $(TARGETS) + + %.o: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< + + mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl + $(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat $(SRC)/mkdiskimage.in - > $@ +@@ -51,13 +51,13 @@ isohdpfx.c: $(ISOHDPFX) isohdpfxarray.pl + $(PERL) $(SRC)/isohdpfxarray.pl $(ISOHDPFX) > $@ + + isohybrid: isohybrid.o isohdpfx.o +- $(CC) $(LDFLAGS) -o $@ $^ -luuid ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ -luuid + + gethostip: gethostip.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + memdiskfind: memdiskfind.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + tidy dist: + rm -f *.o .*.d isohdpfx.c +-- +2.1.4 + diff --git a/buildroot/boot/syslinux/0005-lzo-Use-the-host-toolchain-for-prepcore.patch b/buildroot/boot/syslinux/0005-lzo-Use-the-host-toolchain-for-prepcore.patch new file mode 100644 index 000000000..c6fa7febf --- /dev/null +++ b/buildroot/boot/syslinux/0005-lzo-Use-the-host-toolchain-for-prepcore.patch @@ -0,0 +1,44 @@ +From 83e1f00990c25554723609bb549e18b987034317 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Thu, 6 Apr 2017 09:43:46 +0200 +Subject: [PATCH] lzo: Use the host toolchain for prepcore +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Benoît Allard +--- + lzo/Makefile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/lzo/Makefile b/lzo/Makefile +index 29f1fa6..c016e5a 100644 +--- a/lzo/Makefile ++++ b/lzo/Makefile +@@ -11,10 +11,13 @@ + ## ----------------------------------------------------------------------- + + VPATH = $(SRC) +-include $(MAKEDIR)/build.mk ++include $(MAKEDIR)/syslinux.mk + + INCLUDES += -I$(SRC)/include + ++%.o: %.c ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS_FOR_BUILD) $(INCLUDES) -c -o $@ $< ++ + LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(wildcard $(SRC)/src/*.c))) + LIB = lzo.a + BINS = prepcore +@@ -30,7 +33,7 @@ $(LIB) : $(LIBOBJS) + $(RANLIB) $@ + + prepcore : prepcore.o $(LIB) +- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $^ $(LIBS) + + tidy dist clean spotless: + rm -f $(BINS) +-- +2.1.4 + diff --git a/buildroot/boot/syslinux/0006-The-VPrint-definition-is-now-part-of-the-exports-of-.patch b/buildroot/boot/syslinux/0006-The-VPrint-definition-is-now-part-of-the-exports-of-.patch new file mode 100644 index 000000000..c37601023 --- /dev/null +++ b/buildroot/boot/syslinux/0006-The-VPrint-definition-is-now-part-of-the-exports-of-.patch @@ -0,0 +1,37 @@ +From 39274503292a6003b1b0c93f694e34f11e85ea44 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Fri, 9 Jun 2017 11:55:14 +0200 +Subject: [PATCH] The VPrint definition is now part of the exports of + gnu-efi +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Benoît Allard +--- + efi/fio.h | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/efi/fio.h b/efi/fio.h +index 65fff8d..a1bfe68 100644 +--- a/efi/fio.h ++++ b/efi/fio.h +@@ -11,15 +11,6 @@ + #define MAX_EFI_ARGS 64 + #define WS(c16) (c16 == L' ' || c16 == CHAR_TAB) + +-/* VPrint is not in export declarations in gnu-efi lib yet +- * although it is a global function; declare it here +- */ +-extern UINTN +-VPrint ( +- IN CHAR16 *fmt, +- va_list args +- ); +- + extern EFI_STATUS efi_errno; + + void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len); +-- +2.1.4 + diff --git a/buildroot/boot/syslinux/0007-Update-the-longjump-calls-to-fit-the-new-declaration.patch b/buildroot/boot/syslinux/0007-Update-the-longjump-calls-to-fit-the-new-declaration.patch new file mode 100644 index 000000000..90d0b81f0 --- /dev/null +++ b/buildroot/boot/syslinux/0007-Update-the-longjump-calls-to-fit-the-new-declaration.patch @@ -0,0 +1,37 @@ +From 3bd5c2d951421a89f76b2423e5810862f53486c1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Fri, 9 Jun 2017 11:59:43 +0200 +Subject: [PATCH] Update the longjump calls to fit the new declaration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Benoît Allard +--- + efi/main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/efi/main.c b/efi/main.c +index 208fee4f..71d31a5c 100644 +--- a/efi/main.c ++++ b/efi/main.c +@@ -10,7 +10,6 @@ + #include + #include + #include +-#include + + #include "efi.h" + #include "fio.h" +@@ -30,7 +29,7 @@ uint32_t timer_irq; + __export uint8_t KbdMap[256]; + char aux_seg[256]; + +-static jmp_buf load_error_buf; ++static jmp_buf *load_error_buf; + + static inline EFI_STATUS + efi_close_protocol(EFI_HANDLE handle, EFI_GUID *guid, EFI_HANDLE agent, +-- +2.13.3 + diff --git a/buildroot/boot/syslinux/0008-efi-wrapper-build-it-with-the-host-toolchain.patch b/buildroot/boot/syslinux/0008-efi-wrapper-build-it-with-the-host-toolchain.patch new file mode 100644 index 000000000..9ec12a179 --- /dev/null +++ b/buildroot/boot/syslinux/0008-efi-wrapper-build-it-with-the-host-toolchain.patch @@ -0,0 +1,32 @@ +From ca8aaded0c7c3900397029bd9520132b62629308 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Beno=C3=AEt=20Allard?= +Date: Mon, 12 Jun 2017 14:59:16 +0200 +Subject: [PATCH] efi/wrapper: build it with the host toolchain. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The wrapper program is executed on the build machine, so it should be +built with CC_FOR_BUILD. + +Signed-off-by: Benoît Allard +--- + efi/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/efi/Makefile b/efi/Makefile +index d5443bd5..d24d16db 100644 +--- a/efi/Makefile ++++ b/efi/Makefile +@@ -79,7 +79,7 @@ syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) + # cp $^ $@ + + wrapper: wrapper.c +- $(CC) $^ -o $@ ++ $(CC_FOR_BUILD) $^ -o $@ + + # + # Build the wrapper app and wrap our .so to produce a .efi +-- +2.13.3 + diff --git a/buildroot/boot/syslinux/0009-bios-Don-t-try-to-guess-the-sections-alignment.patch b/buildroot/boot/syslinux/0009-bios-Don-t-try-to-guess-the-sections-alignment.patch new file mode 100644 index 000000000..916012f61 --- /dev/null +++ b/buildroot/boot/syslinux/0009-bios-Don-t-try-to-guess-the-sections-alignment.patch @@ -0,0 +1,295 @@ +From 76946dd67bc856eaf4fe69d0826547a794176f78 Mon Sep 17 00:00:00 2001 +From: Sylvain Gault +Date: Tue, 29 Sep 2015 04:45:09 +0200 +Subject: [PATCH] bios: Don't try to guess the sections alignment + +For the compression / decompression to succeed, the sections layout must +be the same between the virtual memory and load memory. The section +alignment was kept in sync by introducing aligment that should be +greater or equal to the actual section alignment. + +This patch compute the load memory addresses of the sections so that +the layout is the same as the virtual memory addresses. + +Signed-off-by: Sylvain Gault +Tested-by: poma +Signed-off-by: Paulo Alcantara + +Upstream: 0cc9a99e560a2f52bcf052fd85b1efae35ee812f +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + core/i386/syslinux.ld | 63 ++++++++++--------------------------------------- + core/x86_64/syslinux.ld | 63 ++++++++++--------------------------------------- + 2 files changed, 24 insertions(+), 102 deletions(-) + +diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld +index 73904510..92b75b11 100644 +--- a/core/i386/syslinux.ld ++++ b/core/i386/syslinux.ld +@@ -255,10 +255,9 @@ SECTIONS + . = 0x100000; + + __pm_code_start = .; ++ __vma_to_lma = __pm_code_lma - __pm_code_start; + +- __text_vma = .; +- __text_lma = __pm_code_lma; +- .text : AT(__text_lma) { ++ .text : AT(ADDR(.text) + __vma_to_lma) { + FILL(0x90909090) + __text_start = .; + *(.text) +@@ -266,106 +265,68 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(32); +- +- __rodata_vma = .; +- __rodata_lma = __rodata_vma + __text_lma - __text_vma; +- .rodata : AT(__rodata_lma) { ++ .rodata : AT(ADDR(.rodata) + __vma_to_lma) { + __rodata_start = .; + *(.rodata) + *(.rodata.*) + __rodata_end = .; + } + +- . = ALIGN(4); +- +- __ctors_vma = .; +- __ctors_lma = __ctors_vma + __text_lma - __text_vma; +- .ctors : AT(__ctors_lma) { ++ .ctors : AT(ADDR(.ctors) + __vma_to_lma) { + __ctors_start = .; + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + __ctors_end = .; + } + +- __dtors_vma = .; +- __dtors_lma = __dtors_vma + __text_lma - __text_vma; +- .dtors : AT(__dtors_lma) { ++ .dtors : AT(ADDR(.dtors) + __vma_to_lma) { + __dtors_start = .; + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + __dtors_end = .; + } + +- . = ALIGN(4); +- +- __dynsym_vma = .; +- __dynsym_lma = __dynsym_vma + __text_lma - __text_vma; +- .dynsym : AT(__dynsym_lma) { ++ .dynsym : AT(ADDR(.dynsym) + __vma_to_lma) { + __dynsym_start = .; + *(.dynsym) + __dynsym_end = .; + } + __dynsym_len = __dynsym_end - __dynsym_start; + +- . = ALIGN(4); +- +- __dynstr_vma = .; +- __dynstr_lma = __dynstr_vma + __text_lma - __text_vma; +- .dynstr : AT(__dynstr_lma) { ++ .dynstr : AT(ADDR(.dynstr) + __vma_to_lma) { + __dynstr_start = .; + *(.dynstr) + __dynstr_end = .; + } + __dynstr_len = __dynstr_end - __dynstr_start; + +- . = ALIGN(4); +- +- __gnu_hash_vma = .; +- __gnu_hash_lma = __gnu_hash_vma + __text_lma - __text_vma; +- .gnu.hash : AT(__gnu_hash_lma) { ++ .gnu.hash : AT(ADDR(.gnu.hash) + __vma_to_lma) { + __gnu_hash_start = .; + *(.gnu.hash) + __gnu_hash_end = .; + } + + +- . = ALIGN(4); +- +- __dynlink_vma = .; +- __dynlink_lma = __dynlink_vma + __text_lma - __text_vma; +- .dynlink : AT(__dynlink_lma) { ++ .dynlink : AT(ADDR(.dynlink) + __vma_to_lma) { + __dynlink_start = .; + *(.dynlink) + __dynlink_end = .; + } + +- . = ALIGN(4); +- +- __got_vma = .; +- __got_lma = __got_vma + __text_lma - __text_vma; +- .got : AT(__got_lma) { ++ .got : AT(ADDR(.got) + __vma_to_lma) { + __got_start = .; + KEEP (*(.got.plt)) + KEEP (*(.got)) + __got_end = .; + } + +- . = ALIGN(4); +- +- __dynamic_vma = .; +- __dynamic_lma = __dynamic_vma + __text_lma - __text_vma; +- .dynamic : AT(__dynamic_lma) { ++ .dynamic : AT(ADDR(.dynamic) + __vma_to_lma) { + __dynamic_start = .; + *(.dynamic) + __dynamic_end = .; + } + +- . = ALIGN(32); +- +- __data_vma = .; +- __data_lma = __data_vma + __text_lma - __text_vma; +- .data : AT(__data_lma) { ++ .data : AT(ADDR(.data) + __vma_to_lma) { + __data_start = .; + *(.data) + *(.data.*) +diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld +index bf815c46..70c6e00a 100644 +--- a/core/x86_64/syslinux.ld ++++ b/core/x86_64/syslinux.ld +@@ -255,10 +255,9 @@ SECTIONS + . = 0x100000; + + __pm_code_start = .; ++ __vma_to_lma = __pm_code_lma - __pm_code_start; + +- __text_vma = .; +- __text_lma = __pm_code_lma; +- .text : AT(__text_lma) { ++ .text : AT(ADDR(.text) + __vma_to_lma) { + FILL(0x90909090) + __text_start = .; + *(.text) +@@ -266,106 +265,68 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(32); +- +- __rodata_vma = .; +- __rodata_lma = __rodata_vma + __text_lma - __text_vma; +- .rodata : AT(__rodata_lma) { ++ .rodata : AT(ADDR(.rodata) + __vma_to_lma) { + __rodata_start = .; + *(.rodata) + *(.rodata.*) + __rodata_end = .; + } + +- . = ALIGN(4); +- +- __ctors_vma = .; +- __ctors_lma = __ctors_vma + __text_lma - __text_vma; +- .ctors : AT(__ctors_lma) { ++ .ctors : AT(ADDR(.ctors) + __vma_to_lma) { + __ctors_start = .; + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + __ctors_end = .; + } + +- __dtors_vma = .; +- __dtors_lma = __dtors_vma + __text_lma - __text_vma; +- .dtors : AT(__dtors_lma) { ++ .dtors : AT(ADDR(.dtors) + __vma_to_lma) { + __dtors_start = .; + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + __dtors_end = .; + } + +- . = ALIGN(4); +- +- __dynsym_vma = .; +- __dynsym_lma = __dynsym_vma + __text_lma - __text_vma; +- .dynsym : AT(__dynsym_lma) { ++ .dynsym : AT(ADDR(.dynsym) + __vma_to_lma) { + __dynsym_start = .; + *(.dynsym) + __dynsym_end = .; + } + __dynsym_len = __dynsym_end - __dynsym_start; + +- . = ALIGN(4); +- +- __dynstr_vma = .; +- __dynstr_lma = __dynstr_vma + __text_lma - __text_vma; +- .dynstr : AT(__dynstr_lma) { ++ .dynstr : AT(ADDR(.dynstr) + __vma_to_lma) { + __dynstr_start = .; + *(.dynstr) + __dynstr_end = .; + } + __dynstr_len = __dynstr_end - __dynstr_start; + +- . = ALIGN(4); +- +- __gnu_hash_vma = .; +- __gnu_hash_lma = __gnu_hash_vma + __text_lma - __text_vma; +- .gnu.hash : AT(__gnu_hash_lma) { ++ .gnu.hash : AT(ADDR(.gnu.hash) + __vma_to_lma) { + __gnu_hash_start = .; + *(.gnu.hash) + __gnu_hash_end = .; + } + + +- . = ALIGN(4); +- +- __dynlink_vma = .; +- __dynlink_lma = __dynlink_vma + __text_lma - __text_vma; +- .dynlink : AT(__dynlink_lma) { ++ .dynlink : AT(ADDR(.dynlink) + __vma_to_lma) { + __dynlink_start = .; + *(.dynlink) + __dynlink_end = .; + } + +- . = ALIGN(4); +- +- __got_vma = .; +- __got_lma = __got_vma + __text_lma - __text_vma; +- .got : AT(__got_lma) { ++ .got : AT(ADDR(.got) + __vma_to_lma) { + __got_start = .; + KEEP (*(.got.plt)) + KEEP (*(.got)) + __got_end = .; + } + +- . = ALIGN(4); +- +- __dynamic_vma = .; +- __dynamic_lma = __dynamic_vma + __text_lma - __text_vma; +- .dynamic : AT(__dynamic_lma) { ++ .dynamic : AT(ADDR(.dynamic) + __vma_to_lma) { + __dynamic_start = .; + *(.dynamic) + __dynamic_end = .; + } + +- . = ALIGN(32); +- +- __data_vma = .; +- __data_lma = __data_vma + __text_lma - __text_vma; +- .data : AT(__data_lma) { ++ .data : AT(ADDR(.data) + __vma_to_lma) { + __data_start = .; + *(.data) + *(.data.*) +-- +2.13.3 + diff --git a/buildroot/boot/syslinux/0010-core-Clean-up-the-i386-bios-build.patch b/buildroot/boot/syslinux/0010-core-Clean-up-the-i386-bios-build.patch new file mode 100644 index 000000000..8b6d52544 --- /dev/null +++ b/buildroot/boot/syslinux/0010-core-Clean-up-the-i386-bios-build.patch @@ -0,0 +1,622 @@ +From a14b1b3d3e375d2e8af8804171ef5e52574dbb2a Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin" +Date: Tue, 9 Feb 2016 18:15:50 -0800 +Subject: [PATCH] core: Clean up the i386-bios build + +Remove symbols and data structures not used in the i386-bios build, +and clean up the linker script so that most internal symbols are +HIDDEN. + +Signed-off-by: H. Peter Anvin + +Upstream: ff859050fa4e6535cae098dc35d88a265466448d + +This patch fixes the following build failure with i386 binutils 2.28.1: + +/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld -Bsymbolic -pie -E --hash-style=gnu -T +/builds/arnout/buildroot/output/build/syslinux-6.03/core/i386/syslinux.ld -M -o ldlinux.elf ldlinux.o \ + --start-group libcom32.a --whole-archive /builds/arnout/buildroot/output/build/syslinux-6.03/bios/com32/lib/libcom32core.a libldlinux.a --end-group -N +--no-omagic \ + > ldlinux.map +/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld: ldlinux.elf: Not enough room for program headers, try linking with -N +/builds/arnout/buildroot/output/host/bin/i586-buildroot-linux-uclibc-ld: final link failed: Bad value +/builds/arnout/buildroot/output/build/syslinux-6.03/core/Makefile:167: recipe for target 'ldlinux.elf' failed + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + core/extern.inc | 17 +-- + core/i386/syslinux.ld | 287 +++++++++++++++++++++++++------------------------- + core/layout.inc | 11 -- + 3 files changed, 143 insertions(+), 172 deletions(-) + +diff --git a/core/extern.inc b/core/extern.inc +index af8eb04c..ce4abfab 100644 +--- a/core/extern.inc ++++ b/core/extern.inc +@@ -12,27 +12,17 @@ + ; hello.c + extern hello + +- ;abort.c +- extern abort_load_new +- + ; elflink/load_env32.c + extern load_env32, pm_env32_run + +- ; memscan.c +- extern highmem_init +- +- extern linux_kernel +- + extern mp1, mp2, mp3, mp4, mp5 + +- extern hexdump, mydump ++ extern hexdump + + extern mem_init + + ; fs.c +- extern pm_fs_init, pm_searchdir, getfssec, getfsbytes +- extern pm_mangle_name, pm_load_config +- extern pm_open_file, pm_close_file ++ extern pm_fs_init + extern SectorSize, SectorShift + + ; chdir.c +@@ -41,9 +31,6 @@ + ; readdir.c + extern opendir, readdir, closedir + +- ; newconfig.c +- extern pm_is_config_file +- + ; idle.c + extern __idle + +diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld +index 92b75b11..39198d75 100644 +--- a/core/i386/syslinux.ld ++++ b/core/i386/syslinux.ld +@@ -1,7 +1,7 @@ + /* ----------------------------------------------------------------------- + * + * Copyright 2008-2009 H. Peter Anvin - All Rights Reserved +- * Copyright 2009 Intel Corporation; author: H. Peter Anvin ++ * Copyright 2009-2016 Intel Corporation; author: H. Peter Anvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -12,7 +12,7 @@ + * ----------------------------------------------------------------------- */ + + /* +- * Linker script for the SYSLINUX core ++ * Linker script for the SYSLINUX core when built for i386-bios + */ + + OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +@@ -26,7 +26,7 @@ SECTIONS + { + /* Prefix structure for the compression program */ + . = 0; +- __module_start = .; ++ HIDDEN(__module_start = ABSOLUTE(.)); + .prefix : { + *(.prefix) + } +@@ -35,81 +35,82 @@ SECTIONS + . = 0x1000; + + .earlybss (NOLOAD) : { +- __earlybss_start = .; ++ HIDDEN(__earlybss_start = .); + *(.earlybss) +- __earlybss_end = .; ++ HIDDEN(__earlybss_end = .); + } +- __earlybss_len = ABSOLUTE(__earlybss_end) - ABSOLUTE(__earlybss_start); +- __earlybss_dwords = (__earlybss_len + 3) >> 2; ++ HIDDEN(__earlybss_len = ABSOLUTE(__earlybss_end) - ABSOLUTE(__earlybss_start)); ++ HIDDEN(__earlybss_dwords = (__earlybss_len + 3) >> 2); + + . = ALIGN(4); + .bss16 (NOLOAD) : { +- __bss16_start = .; ++ HIDDEN(__bss16_start = .); + *(.bss16) +- __bss16_end = .; ++ HIDDEN(__bss16_end = .); + } +- __bss16_len = ABSOLUTE(__bss16_end) - ABSOLUTE(__bss16_start); +- __bss16_dwords = (__bss16_len + 3) >> 2; ++ HIDDEN(__bss16_len = ABSOLUTE(__bss16_end) - ABSOLUTE(__bss16_start)); ++ HIDDEN(__bss16_dwords = (__bss16_len + 3) >> 2); + + . = ALIGN(4); + .config : AT (__config_lma) { +- __config_start = .; ++ HIDDEN(__config_start = .); + *(.config) +- __config_end = .; ++ HIDDEN(__config_end = .); + } +- __config_len = ABSOLUTE(__config_end) - ABSOLUTE(__config_start); +- __config_dwords = (__config_len + 3) >> 2; ++ HIDDEN(__config_len = ABSOLUTE(__config_end) - ABSOLUTE(__config_start)); ++ HIDDEN(__config_dwords = (__config_len + 3) >> 2); + + /* Generated and/or copied code */ + + . = ALIGN(128); /* Minimum separation from mutable data */ + .replacestub : AT (__replacestub_lma) { +- __replacestub_start = .; ++ HIDDEN(__replacestub_start = .); + *(.replacestub) +- __replacestub_end = .; ++ HIDDEN(__replacestub_end = .); + } +- __replacestub_len = ABSOLUTE(__replacestub_end) - ABSOLUTE(__replacestub_start); +- __replacestub_dwords = (__replacestub_len + 3) >> 2; ++ HIDDEN(__replacestub_len = ABSOLUTE(__replacestub_end) - ABSOLUTE(__replacestub_start)); ++ HIDDEN(__replacestub_dwords = (__replacestub_len + 3) >> 2); + + . = ALIGN(16); +- __gentextnr_lma = .; ++ HIDDEN(__gentextnr_lma = .); + .gentextnr : AT(__gentextnr_lma) { +- __gentextnr_start = .; ++ HIDDEN(__gentextnr_start = .); + *(.gentextnr) +- __gentextnr_end = .; ++ HIDDEN(__gentextnr_end = .); + } +- __gentextnr_len = ABSOLUTE(__gentextnr_end) - ABSOLUTE(__gentextnr_start); +- __gentextnr_dwords = (__gentextnr_len + 3) >> 2; ++ HIDDEN(__gentextnr_len = ABSOLUTE(__gentextnr_end) - ABSOLUTE(__gentextnr_start)); ++ HIDDEN(__gentextnr_dwords = (__gentextnr_len + 3) >> 2); + + . = STACK_BASE; + .stack16 : AT(STACK_BASE) { +- __stack16_start = .; ++ HIDDEN(__stack16_start = .); + . += STACK_LEN; +- __stack16_end = .; ++ HIDDEN(__stack16_end = .); + } +- __stack16_len = ABSOLUTE(__stack16_end) - ABSOLUTE(__stack16_start); +- __stack16_dwords = (__stack16_len + 3) >> 2; ++ HIDDEN(__stack16_len = ABSOLUTE(__stack16_end) - ABSOLUTE(__stack16_start)); ++ HIDDEN(__stack16_dwords = (__stack16_len + 3) >> 2); + + /* Initialized sections */ + + . = 0x7c00; + .init : { + FILL(0x90909090) +- __init_start = .; ++ HIDDEN(__init_start = .); + *(.init) +- __init_end = .; ++ HIDDEN(__init_end = .); + } +- __init_len = ABSOLUTE(__init_end) - ABSOLUTE(__init_start); +- __init_dwords = (__init_len + 3) >> 2; ++ HIDDEN(__init_len = ABSOLUTE(__init_end) - ABSOLUTE(__init_start)); ++ HIDDEN(__init_dwords = (__init_len + 3) >> 2); + ++ . = ALIGN(4); + .text16 : { + FILL(0x90909090) +- __text16_start = .; ++ HIDDEN(__text16_start = .); + *(.text16) +- __text16_end = .; ++ HIDDEN(__text16_end = .); + } +- __text16_len = ABSOLUTE(__text16_end) - ABSOLUTE(__text16_start); +- __text16_dwords = (__text16_len + 3) >> 2; ++ HIDDEN(__text16_len = ABSOLUTE(__text16_end) - ABSOLUTE(__text16_start)); ++ HIDDEN(__text16_dwords = (__text16_len + 3) >> 2); + + /* + * .textnr is used for 32-bit code that is used on the code +@@ -118,99 +119,92 @@ SECTIONS + . = ALIGN(16); + .textnr : { + FILL(0x90909090) +- __textnr_start = .; ++ HIDDEN(__textnr_start = .); + *(.textnr) +- __textnr_end = .; ++ HIDDEN(__textnr_end = .); + } +- __textnr_len = ABSOLUTE(__textnr_end) - ABSOLUTE(__textnr_start); +- __textnr_dwords = (__textnr_len + 3) >> 2; ++ HIDDEN(__textnr_len = ABSOLUTE(__textnr_end) - ABSOLUTE(__textnr_start)); ++ HIDDEN(__textnr_dwords = (__textnr_len + 3) >> 2); + + . = ALIGN(16); +- __bcopyxx_start = .; ++ HIDDEN(__bcopyxx_start = .); + + .bcopyxx.text : { + FILL(0x90909090) +- __bcopyxx_text_start = .; ++ HIDDEN(__bcopyxx_text_start = .); + *(.bcopyxx.text) +- __bcopyxx_text_end = .; ++ HIDDEN(__bcopyxx_text_end = .); + } +- __bcopyxx_text_len = ABSOLUTE(__bcopyxx_text_end) - ABSOLUTE(__bcopyxx_text_start); +- __bcopyxx_text_dwords = (__bcopyxx_text_len + 3) >> 2; ++ HIDDEN(__bcopyxx_text_len = ABSOLUTE(__bcopyxx_text_end) - ABSOLUTE(__bcopyxx_text_start)); ++ HIDDEN(__bcopyxx_text_dwords = (__bcopyxx_text_len + 3) >> 2); + + .bcopyxx.data : { +- __bcopyxx_data_start = .; ++ HIDDEN(__bcopyxx_data_start = .); + *(.bcopyxx.text) +- __bcopyxx_data_end = .; ++ HIDDEN(__bcopyxx_data_end = .); + } +- __bcopyxx_data_len = ABSOLUTE(__bcopyxx_data_end) - ABSOLUTE(__bcopyxx_data_start); +- __bcopyxx_data_dwords = (__bcopyxx_data_len + 3) >> 2; ++ HIDDEN(__bcopyxx_data_len = ABSOLUTE(__bcopyxx_data_end) - ABSOLUTE(__bcopyxx_data_start)); ++ HIDDEN(__bcopyxx_data_dwords = (__bcopyxx_data_len + 3) >> 2); + +- __bcopyxx_end = .; +- __bcopyxx_len = ABSOLUTE(__bcopyxx_end) - ABSOLUTE(__bcopyxx_start); +- __bcopyxx_dwords = (__bcopyxx_len + 3) >> 2; ++ HIDDEN(__bcopyxx_end = .); ++ HIDDEN(__bcopyxx_len = ABSOLUTE(__bcopyxx_end) - ABSOLUTE(__bcopyxx_start)); ++ HIDDEN(__bcopyxx_dwords = (__bcopyxx_len + 3) >> 2); + + . = ALIGN(4); + .data16 : { +- __data16_start = .; ++ HIDDEN(__data16_start = .); + *(.data16) +- __data16_end = .; ++ HIDDEN(__data16_end = .); + } +- __data16_len = ABSOLUTE(__data16_end) - ABSOLUTE(__data16_start); +- __data16_dwords = (__data16_len + 3) >> 2; ++ HIDDEN(__data16_len = ABSOLUTE(__data16_end) - ABSOLUTE(__data16_start)); ++ HIDDEN(__data16_dwords = (__data16_len + 3) >> 2); + + . = ALIGN(4); +- __config_lma = .; ++ HIDDEN(__config_lma = ABSOLUTE(.)); + . += SIZEOF(.config); + + . = ALIGN(4); +- __replacestub_lma = .; ++ HIDDEN(__replacestub_lma = ABSOLUTE(.)); + . += SIZEOF(.replacestub); + + /* The 32-bit code loads above the non-progbits sections */ + + . = ALIGN(16); +- __pm_code_lma = .; ++ HIDDEN(__pm_code_lma = ABSOLUTE(.)); + +- __high_clear_start = .; ++ HIDDEN(__high_clear_start = .); + + . = ALIGN(512); + .adv (NOLOAD) : { +- __adv_start = .; ++ HIDDEN(__adv_start = .); + *(.adv) +- __adv_end = .; ++ HIDDEN(__adv_end = .); + } +- __adv_len = ABSOLUTE(__adv_end) - ABSOLUTE(__adv_start); +- __adv_dwords = (__adv_len + 3) >> 2; ++ HIDDEN(__adv_len = ABSOLUTE(__adv_end) - ABSOLUTE(__adv_start)); ++ HIDDEN(__adv_dwords = (__adv_len + 3) >> 2); + + /* Late uninitialized sections */ + + . = ALIGN(4); + .uibss (NOLOAD) : { +- __uibss_start = .; ++ HIDDEN(__uibss_start = .); + *(.uibss) +- __uibss_end = .; ++ HIDDEN(__uibss_end = .); + } +- __uibss_len = ABSOLUTE(__uibss_end) - ABSOLUTE(__uibss_start); +- __uibss_dwords = (__uibss_len + 3) >> 2; ++ HIDDEN(__uibss_len = ABSOLUTE(__uibss_end) - ABSOLUTE(__uibss_start)); ++ HIDDEN(__uibss_dwords = (__uibss_len + 3) >> 2); + +- _end16 = .; +- __assert_end16 = ASSERT(_end16 <= 0x10000, "64K overflow"); ++ HIDDEN(_end16 = .); ++ HIDDEN(__assert_end16 = ASSERT(_end16 <= 0x10000, "64K overflow")); + + /* + * Special 16-bit segments + */ +- +- . = ALIGN(65536); +- .real_mode (NOLOAD) : { +- *(.real_mode) +- } +- real_mode_seg = core_real_mode >> 4; +- + . = ALIGN(65536); + .xfer_buf (NOLOAD) : { + *(.xfer_buf) + } +- xfer_buf_seg = core_xfer_buf >> 4; ++ HIDDEN(xfer_buf_seg = core_xfer_buf >> 4); + + /* + * The auxilliary data segment is used by the 16-bit code +@@ -219,33 +213,33 @@ SECTIONS + + . = ALIGN(16); + .auxseg (NOLOAD) : { +- __auxseg_start = .; ++ HIDDEN(__auxseg_start = .); + *(.auxseg) +- __auxseg_end = .; ++ HIDDEN(__auxseg_end = .); + } +- __auxseg_len = ABSOLUTE(__auxseg_end) - ABSOLUTE(__auxseg_start); +- __auxseg_dwords = (__auxseg_len + 3) >> 2; +- aux_seg = __auxseg_start >> 4; ++ HIDDEN(__auxseg_len = ABSOLUTE(__auxseg_end) - ABSOLUTE(__auxseg_start)); ++ HIDDEN(__auxseg_dwords = (__auxseg_len + 3) >> 2); ++ HIDDEN(aux_seg = __auxseg_start >> 4); + + /* + * Used to allocate lowmem buffers from 32-bit code + */ + .lowmem (NOLOAD) : { +- __lowmem_start = .; ++ HIDDEN(__lowmem_start = .); + *(.lowmem) +- __lowmem_end = .; ++ HIDDEN(__lowmem_end = .); + } +- __lowmem_len = ABSOLUTE(__lowmem_end) - ABSOLUTE(__lowmem_start); +- __lowmem_dwords = (__lowmem_len + 3) >> 2; ++ HIDDEN(__lowmem_len = ABSOLUTE(__lowmem_end) - ABSOLUTE(__lowmem_start)); ++ HIDDEN(__lowmem_dwords = (__lowmem_len + 3) >> 2); + +- __high_clear_end = .; ++ HIDDEN(__high_clear_end = .); + +- __high_clear_len = ABSOLUTE(__high_clear_end) - ABSOLUTE(__high_clear_start); +- __high_clear_dwords = (__high_clear_len + 3) >> 2; ++ HIDDEN(__high_clear_len = ABSOLUTE(__high_clear_end) - ABSOLUTE(__high_clear_start)); ++ HIDDEN(__high_clear_dwords = (__high_clear_len + 3) >> 2); + + /* Start of the lowmem heap */ + . = ALIGN(16); +- __lowmem_heap = .; ++ HIDDEN(__lowmem_heap = .); + + /* + * 32-bit code. This is a hack for the moment due to the +@@ -254,136 +248,137 @@ SECTIONS + + . = 0x100000; + +- __pm_code_start = .; +- __vma_to_lma = __pm_code_lma - __pm_code_start; ++ HIDDEN(__pm_code_start = .); ++ HIDDEN(__vma_to_lma = ABSOLUTE(__pm_code_lma - __pm_code_start)); + + .text : AT(ADDR(.text) + __vma_to_lma) { + FILL(0x90909090) +- __text_start = .; ++ HIDDEN(__text_start = .); + *(.text) + *(.text.*) +- __text_end = .; ++ HIDDEN(__text_end = .); + } + + .rodata : AT(ADDR(.rodata) + __vma_to_lma) { +- __rodata_start = .; ++ HIDDEN(__rodata_start = .); + *(.rodata) + *(.rodata.*) +- __rodata_end = .; ++ HIDDEN(__rodata_end = .); + } + + .ctors : AT(ADDR(.ctors) + __vma_to_lma) { +- __ctors_start = .; ++ HIDDEN(__ctors_start = .); + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) +- __ctors_end = .; ++ HIDDEN(__ctors_end = .); + } + + .dtors : AT(ADDR(.dtors) + __vma_to_lma) { +- __dtors_start = .; ++ HIDDEN(__dtors_start = .); + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) +- __dtors_end = .; ++ HIDDEN(__dtors_end = .); + } + + .dynsym : AT(ADDR(.dynsym) + __vma_to_lma) { +- __dynsym_start = .; +- *(.dynsym) +- __dynsym_end = .; ++ HIDDEN(__dynsym_start = .); ++ KEEP (*(.dynsym)) ++ HIDDEN(__dynsym_end = .); + } +- __dynsym_len = __dynsym_end - __dynsym_start; ++ HIDDEN(__dynsym_len = __dynsym_end - __dynsym_start); + + .dynstr : AT(ADDR(.dynstr) + __vma_to_lma) { +- __dynstr_start = .; +- *(.dynstr) +- __dynstr_end = .; ++ HIDDEN(__dynstr_start = .); ++ KEEP (*(.dynstr)) ++ HIDDEN(__dynstr_end = .); + } +- __dynstr_len = __dynstr_end - __dynstr_start; ++ HIDDEN(__dynstr_len = __dynstr_end - __dynstr_start); + + .gnu.hash : AT(ADDR(.gnu.hash) + __vma_to_lma) { +- __gnu_hash_start = .; +- *(.gnu.hash) +- __gnu_hash_end = .; ++ HIDDEN(__gnu_hash_start = .); ++ KEEP (*(.gnu.hash)) ++ HIDDEN(__gnu_hash_end = .); + } + + + .dynlink : AT(ADDR(.dynlink) + __vma_to_lma) { +- __dynlink_start = .; +- *(.dynlink) +- __dynlink_end = .; ++ HIDDEN(__dynlink_start = .); ++ KEEP (*(.dynlink)) ++ HIDDEN(__dynlink_end = .); + } + + .got : AT(ADDR(.got) + __vma_to_lma) { +- __got_start = .; +- KEEP (*(.got.plt)) ++ HIDDEN(__got_start = .); + KEEP (*(.got)) +- __got_end = .; ++ KEEP (*(.got.plt)) ++ HIDDEN(__got_end = .); + } + + .dynamic : AT(ADDR(.dynamic) + __vma_to_lma) { +- __dynamic_start = .; +- *(.dynamic) +- __dynamic_end = .; ++ HIDDEN(__dynamic_start = .); ++ KEEP (*(.dynamic)) ++ HIDDEN(__dynamic_end = .); + } + + .data : AT(ADDR(.data) + __vma_to_lma) { +- __data_start = .; ++ HIDDEN(__data_start = .); + *(.data) + *(.data.*) +- __data_end = .; ++ HIDDEN(__data_end = .); + } + +- __pm_code_end = .; +- __pm_code_len = ABSOLUTE(__pm_code_end) - ABSOLUTE(__pm_code_start); +- __pm_code_dwords = (__pm_code_len + 3) >> 2; ++ HIDDEN(__pm_code_end = .); ++ HIDDEN(__pm_code_len = ABSOLUTE(__pm_code_end) - ABSOLUTE(__pm_code_start)); ++ HIDDEN(__pm_code_dwords = (__pm_code_len + 3) >> 2); + + . = ALIGN(128); + +- __bss_vma = .; +- __bss_lma = .; /* Dummy */ ++ HIDDEN(__bss_vma = .); ++ HIDDEN(__bss_lma = ABSOLUTE(.)); /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { +- __bss_start = .; ++ HIDDEN(__bss_start = .); + *(.bss) + *(.bss.*) + *(COMMON) +- __bss_end = .; ++ HIDDEN(__bss_end = .); + } +- __bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start); +- __bss_dwords = (__bss_len + 3) >> 2; ++ HIDDEN(__bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start)); ++ HIDDEN(__bss_dwords = (__bss_len + 3) >> 2); + + /* Very large objects which don't need to be zeroed */ + +- __hugebss_vma = .; +- __hugebss_lma = .; /* Dummy */ ++ HIDDEN(__hugebss_vma = .); ++ HIDDEN(__hugebss_lma = ABSOLUTE(.)); /* Dummy */ + .hugebss (NOLOAD) : AT (__hugebss_lma) { +- __hugebss_start = .; ++ HIDDEN(__hugebss_start = .); + *(.hugebss) + *(.hugebss.*) +- __hugebss_end = .; ++ HIDDEN(__hugebss_end = .); + } +- __hugebss_len = ABSOLUTE(__hugebss_end) - ABSOLUTE(__hugebss_start); +- __hugebss_dwords = (__hugebss_len + 3) >> 2; ++ HIDDEN(__hugebss_len = ABSOLUTE(__hugebss_end) - ABSOLUTE(__hugebss_start)); ++ HIDDEN(__hugebss_dwords = (__hugebss_len + 3) >> 2); + + + /* XXX: This stack should be unified with the COM32 stack */ +- __stack_vma = .; +- __stack_lma = .; /* Dummy */ ++ HIDDEN(__stack_vma = .); ++ HIDDEN(__stack_lma = ABSOLUTE(.)); /* Dummy */ + .stack (NOLOAD) : AT(__stack_lma) { +- __stack_start = .; ++ HIDDEN(__stack_start = .); + *(.stack) +- __stack_end = .; ++ HIDDEN(__stack_end = .); + } +- __stack_len = ABSOLUTE(__stack_end) - ABSOLUTE(__stack_start); +- __stack_dwords = (__stack_len + 3) >> 2; ++ HIDDEN(__stack_len = ABSOLUTE(__stack_end) - ABSOLUTE(__stack_start)); ++ HIDDEN(__stack_dwords = (__stack_len + 3) >> 2); + +- _end = .; ++ HIDDEN(_end = .); + + /* COM32R and kernels are loaded after our own PM code */ + . = ALIGN(65536); +- free_high_memory = .; ++ HIDDEN(free_high_memory = .); + + /* Stuff we don't need... */ + /DISCARD/ : { + *(.eh_frame) ++ *(.interp) + } + } +diff --git a/core/layout.inc b/core/layout.inc +index 53ca783d..635df537 100644 +--- a/core/layout.inc ++++ b/core/layout.inc +@@ -139,17 +139,6 @@ serial_buf_size equ 4096 ; Should be a power of 2 + core_xfer_buf resb 65536 + + ; +-; Segment for the real mode code (needed as long as we have a in-kernel +-; loader and/or COM16 support. +-; One symbol for the segment number, one for the absolute address +-; +- extern real_mode_seg +- section .real_mode write nobits align=65536 +- global core_real_mode:data hidden +-core_real_mode resb 65536 +-comboot_seg equ real_mode_seg ; COMBOOT image loading zone +- +-; + ; At the very end, the lowmem heap + ; + extern __lowmem_heap +-- +2.13.3 + diff --git a/buildroot/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch b/buildroot/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch new file mode 100644 index 000000000..62675cf6c --- /dev/null +++ b/buildroot/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch @@ -0,0 +1,53 @@ +From 4df2e7c0ae84bfbdba0ed285c0664aa089b38b7e Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sat, 30 Sep 2017 19:49:55 -0300 +Subject: [PATCH] extlinux: Use the host toolchain to build. + +It is meant to run on the host machine, hence must be built using the +host toolchain. + +Signed-off-by: Carlos Santos +--- + extlinux/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/extlinux/Makefile b/extlinux/Makefile +index 02d1db51..5c4baa5a 100644 +--- a/extlinux/Makefile ++++ b/extlinux/Makefile +@@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk + + OPTFLAGS = -g -Os + INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller +-CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ ++CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ + $(OPTFLAGS) $(INCLUDES) +-LDFLAGS = ++LDFLAGS = $(LDFLAGS_FOR_BUILD) + + SRCS = main.c \ + mountinfo.c \ +@@ -52,16 +52,16 @@ spotless: clean + installer: extlinux + + extlinux: $(OBJS) +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + strip: + $(STRIP) extlinux + + %.o: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< + %.i: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $< + %.s: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $< + + -include .*.d +-- +2.13.5 + diff --git a/buildroot/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch b/buildroot/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch new file mode 100644 index 000000000..beba5cc24 --- /dev/null +++ b/buildroot/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch @@ -0,0 +1,34 @@ +From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Tue, 19 Apr 2016 06:50:31 -0400 +Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev + +These functions are defined in sys/sysmacros.h, so add the include to +main.c. This is already handled correctly in mountinfo.c. Otherwise +we get build failures like: + +main.o: In function 'find_device_sysfs': +extlinux/main.c:1131: undefined reference to 'minor' + +Signed-off-by: Mike Frysinger +Signed-off-by: Gene Cumm +Signed-off-by: Alexander Sverdlin +--- + extlinux/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/extlinux/main.c b/extlinux/main.c +index a7ebd49..ebff7ea 100644 +--- a/extlinux/main.c ++++ b/extlinux/main.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.10.5.GIT + diff --git a/buildroot/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch b/buildroot/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch new file mode 100644 index 000000000..17a6d37ce --- /dev/null +++ b/buildroot/boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch @@ -0,0 +1,45 @@ +From 44a1b42e561b9a257209300e2860b901b100cc17 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Tue, 26 Feb 2019 08:07:22 -0300 +Subject: [PATCH] Fix build with gnu-efi version 3.0.9 + +Adapt a patch already applied upstream to prevent multiple definitions +of 'memset' and 'memcpy'. + +Signed-off-by: Carlos Santos +(adapted from commit 363d61c4f112b972649b19d67e96b9321f738f00) +--- + mk/lib.mk | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/mk/lib.mk b/mk/lib.mk +index ceb95bd0..c9b6eaf3 100644 +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -186,9 +186,9 @@ MINLIBOBJS = \ + # $(LIBVESA_OBJS) + + CORELIBOBJS = \ +- memcpy.o memset.o memcmp.o printf.o strncmp.o vfprintf.o \ ++ memcmp.o printf.o strncmp.o vfprintf.o \ + strlen.o vsnprintf.o snprintf.o stpcpy.o strcmp.o strdup.o \ +- strcpy.o strncpy.o setjmp.o fopen.o fread.o fread2.o puts.o \ ++ strcpy.o strncpy.o fopen.o fread.o fread2.o puts.o \ + strtoul.o strntoumax.o strcasecmp.o \ + sprintf.o strlcat.o strchr.o strlcpy.o strncasecmp.o ctypes.o \ + fputs.o fwrite2.o fwrite.o fgetc.o fclose.o lmalloc.o \ +@@ -203,6 +203,11 @@ CORELIBOBJS = \ + $(LIBENTRY_OBJS) \ + $(LIBMODULE_OBJS) + ++ifndef EFI_BUILD ++# For EFI, these are part of gnu-efi ++CORELIBOBJS += setjmp.o memcpy.o memset.o ++endif ++ + LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld + + .SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss +-- +2.14.5 + diff --git a/buildroot/boot/syslinux/0014-Fix-build-with-binutils-note-gnu-property-section.patch b/buildroot/boot/syslinux/0014-Fix-build-with-binutils-note-gnu-property-section.patch new file mode 100644 index 000000000..fedd81569 --- /dev/null +++ b/buildroot/boot/syslinux/0014-Fix-build-with-binutils-note-gnu-property-section.patch @@ -0,0 +1,47 @@ +From beb526ca925983c7da229043790ecd552d910650 Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Thu, 4 Apr 2019 23:24:31 -0700 +Subject: [PATCH] Fix build with binutils note gnu property section + +This fixes the following build error with newer binutils: + + objcopy -O binary mbr.elf mbr.bin + perl /build/syslinux/src/syslinux/mbr/checksize.pl mbr.bin + mbr.bin: too big (452 > 440) + +Corresponding bug reports: + + - https://bugs.archlinux.org/task/60405 + - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906414 + +Strips the .note.gnu.property in the linker scripts for the MBRs. + +Signed-off-by: Christian Stewart +--- + mbr/i386/mbr.ld | 1 + + mbr/x86_64/mbr.ld | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld +index d14ba802..53683461 100644 +--- a/mbr/i386/mbr.ld ++++ b/mbr/i386/mbr.ld +@@ -70,4 +70,5 @@ SECTIONS + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : { *(.note.gnu.property) } + } +diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld +index ae27d49a..b8c0d895 100644 +--- a/mbr/x86_64/mbr.ld ++++ b/mbr/x86_64/mbr.ld +@@ -69,4 +69,5 @@ SECTIONS + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /DISCARD/ : { *(.note.GNU-stack) } ++ /DISCARD/ : { *(.note.gnu.property) } + } +-- +2.21.0 + diff --git a/buildroot/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch b/buildroot/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch new file mode 100644 index 000000000..2fd61ecbc --- /dev/null +++ b/buildroot/boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch @@ -0,0 +1,60 @@ +From 7d68fa68cd9f2987bd85339f3391913a8b0e58c7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 24 Mar 2020 10:21:27 +0100 +Subject: [PATCH] efi/main.c: include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building syslinux against gnu-efi 3.0.10 currently fails with: + +syslinux/efi/main.c:33:8: error: unknown type name ‘jmp_buf’ + 33 | static jmp_buf load_error_buf; + | ^~~~~~~ +syslinux/efi/main.c: In function ‘local_boot’: +syslinux/efi/main.c:189:5: warning: implicit declaration of function ‘longjmp’ [-Wimplicit-function-declaration] + 189 | longjmp(&load_error_buf, 1); + | ^~~~~~~ +syslinux/efi/main.c: In function ‘build_gdt’: +syslinux/efi/main.c:907:75: warning: taking address of packed member of ‘struct dt_desc’ may result in an unaligned pointer value [-Waddress-of-packed-member] + 907 | status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base); + | ^~~~~~~~~ +syslinux/efi/main.c: In function ‘efi_main’: +syslinux/efi/main.c:1390:7: warning: implicit declaration of function ‘setjmp’ [-Wimplicit-function-declaration] + 1390 | if (!setjmp(&load_error_buf)) + | ^~~~~~ +make[3]: *** [syslinux/mk/efi.mk:63: main.o] Error 1 + +This is due to gnu-efi commit 486ba3c3bdd147b7d98159b9e650be60bce0f027 +("Do not include efisetjmp.h on efi.h"), in which they state: + + Do not include efisetjmp.h on efi.h + + People than really want to use efisetjmp implementation can include + the header on their own. + + Signed-off-by: leo + +So we act as specified, and include from efi/main.c. + +Signed-off-by: Thomas Petazzoni +Upstream: https://www.syslinux.org/archives/2020-March/026621.html +--- + efi/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/efi/main.c b/efi/main.c +index 6a748412..e924cfb1 100644 +--- a/efi/main.c ++++ b/efi/main.c +@@ -12,6 +12,7 @@ + #include + + #include "efi.h" ++#include + #include "fio.h" + #include "version.h" + #include "efi_pxe.h" +-- +2.25.1 + diff --git a/buildroot/boot/syslinux/Config.in b/buildroot/boot/syslinux/Config.in index f4b987021..339a97f0e 100644 --- a/buildroot/boot/syslinux/Config.in +++ b/buildroot/boot/syslinux/Config.in @@ -1,7 +1,13 @@ config BR2_TARGET_SYSLINUX bool "syslinux" depends on BR2_i386 || BR2_x86_64 - select BR2_HOSTARCH_NEEDS_IA32_COMPILER + # Make sure at least one of the flavors is installed + select BR2_TARGET_SYSLINUX_ISOLINUX \ + if !BR2_TARGET_SYSLINUX_PXELINUX && \ + !BR2_TARGET_SYSLINUX_MBR && \ + !BR2_TARGET_SYSLINUX_EFI + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux. @@ -13,25 +19,23 @@ if BR2_TARGET_SYSLINUX config BR2_TARGET_SYSLINUX_LEGACY_BIOS bool -choice - bool "Image to install" - config BR2_TARGET_SYSLINUX_ISOLINUX - bool "isolinux" + bool "install isolinux" select BR2_TARGET_SYSLINUX_LEGACY_BIOS help Install the legacy-BIOS 'isolinux' image, to boot off optical media (CDROM, DVD.) config BR2_TARGET_SYSLINUX_PXELINUX - bool "pxelinux" + bool "install pxelinux" select BR2_TARGET_SYSLINUX_LEGACY_BIOS help Install the legacy-BIOS 'pxelinux' image, to boot off the network using PXE. config BR2_TARGET_SYSLINUX_MBR - bool "mbr" + bool "install mbr" + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615 select BR2_TARGET_SYSLINUX_LEGACY_BIOS help Install the legacy-BIOS 'mbr' image, to boot off a @@ -39,13 +43,12 @@ config BR2_TARGET_SYSLINUX_MBR or 'syslinux'). config BR2_TARGET_SYSLINUX_EFI - bool "efi" + bool "install efi" + depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS select BR2_PACKAGE_GNU_EFI help Install the 'efi' image, to boot from an EFI environment. -endchoice - if BR2_TARGET_SYSLINUX_LEGACY_BIOS config BR2_TARGET_SYSLINUX_C32 diff --git a/buildroot/boot/syslinux/syslinux-000-user-headers-from-sysroot.patch b/buildroot/boot/syslinux/syslinux-000-user-headers-from-sysroot.patch deleted file mode 100644 index 5edf79f05..000000000 --- a/buildroot/boot/syslinux/syslinux-000-user-headers-from-sysroot.patch +++ /dev/null @@ -1,37 +0,0 @@ -efi: look for headers and libs in the sysroot - -Currently, syslinux hard-codes search paths to /usr/.... directories. -This does not play well in cross-compilation. - -If $SYSROOT is defined, prepend it to the search paths. - -Signed-off-by: "Yann E. MORIN" - -diff -durN syslinux-6.02.orig/efi/find-gnu-efi.sh syslinux-6.02/efi/find-gnu-efi.sh ---- syslinux-6.02.orig/efi/find-gnu-efi.sh 2013-10-13 19:59:03.000000000 +0200 -+++ syslinux-6.02/efi/find-gnu-efi.sh 2014-04-22 00:19:23.638483887 +0200 -@@ -9,7 +9,7 @@ - find_include() - { - for d in $include_dirs; do -- found=`find $d -name efi -type d 2> /dev/null` -+ found=`find $SYSROOT$d -name efi -type d 2> /dev/null` - if [ "$found"x != "x" ] && [ -e $found/$ARCH/efibind.h ]; then - echo $found - break; -@@ -20,12 +20,12 @@ - find_lib() - { - for d in $lib_dirs; do -- found=`find $d -name libgnuefi.a 2> /dev/null` -+ found=`find $SYSROOT$d -name libgnuefi.a 2> /dev/null` - if [ "$found"x != "x" ]; then - crt_name='crt0-efi-'$ARCH'.o' -- crt=`find $d -name $crt_name 2> /dev/null` -+ crt=`find $SYSROOT$d -name $crt_name 2> /dev/null` - if [ "$crt"x != "x" ]; then -- echo $d -+ echo $SYSROOT$d - break; - fi - fi diff --git a/buildroot/boot/syslinux/syslinux.hash b/buildroot/boot/syslinux/syslinux.hash new file mode 100644 index 000000000..9bec3a20e --- /dev/null +++ b/buildroot/boot/syslinux/syslinux.hash @@ -0,0 +1,4 @@ +# From https://www.kernel.org/pub/linux/utils/boot/syslinux/sha256sums.asc +sha256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e syslinux-6.03.tar.xz +# Locally computed +sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING diff --git a/buildroot/boot/syslinux/syslinux.mk b/buildroot/boot/syslinux/syslinux.mk index 8ef53f922..67bc69254 100644 --- a/buildroot/boot/syslinux/syslinux.mk +++ b/buildroot/boot/syslinux/syslinux.mk @@ -4,21 +4,26 @@ # ################################################################################ -SYSLINUX_VERSION = 6.02 +SYSLINUX_VERSION = 6.03 SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux -SYSLINUX_LICENSE = GPLv2+ +SYSLINUX_LICENSE = GPL-2.0+ SYSLINUX_LICENSE_FILES = COPYING SYSLINUX_INSTALL_IMAGES = YES -SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx +# host-util-linux needed to provide libuuid when building host tools +SYSLINUX_DEPENDENCIES = host-nasm host-upx util-linux host-util-linux ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y) -SYSLINUX_TARGET = bios +SYSLINUX_TARGET += bios endif +# The syslinux build system must be forced to use Buildroot's gnu-efi +# package by setting EFIINC, LIBDIR and LIBEFI. Otherwise, it uses its +# own copy of gnu-efi included in syslinux's sources since 6.03 +# release. ifeq ($(BR2_TARGET_SYSLINUX_EFI),y) ifeq ($(BR2_ARCH_IS_64),y) SYSLINUX_EFI_BITS = efi64 @@ -26,7 +31,11 @@ else SYSLINUX_EFI_BITS = efi32 endif # 64-bit SYSLINUX_DEPENDENCIES += gnu-efi -SYSLINUX_TARGET = $(SYSLINUX_EFI_BITS) +SYSLINUX_TARGET += $(SYSLINUX_EFI_BITS) +SYSLINUX_EFI_ARGS = \ + EFIINC=$(STAGING_DIR)/usr/include/efi \ + LIBDIR=$(STAGING_DIR)/usr/lib \ + LIBEFI=$(STAGING_DIR)/usr/lib/libefi.a endif # EFI # The syslinux tarball comes with pre-compiled binaries. @@ -43,21 +52,36 @@ SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP # and the internal zlib should take precedence so -I shouldn't # be used. define SYSLINUX_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ - AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) -C $(@D) $(SYSLINUX_TARGET) + $(TARGET_MAKE_ENV) $(MAKE1) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + NASM="$(HOST_DIR)/bin/nasm" \ + CC_FOR_BUILD="$(HOSTCC)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET) endef # While the actual bootloader is compiled for the target, several # utilities for installing the bootloader are meant for the host. # Repeat the target, otherwise syslinux will try to build everything -# Repeat CC and AR, since syslinux really wants to check them at -# install time +# Repeat LD (and CC) as it happens that some binaries are linked at +# install-time. define SYSLINUX_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ - AR="$(HOSTAR)" SYSROOT=$(STAGING_DIR) INSTALLROOT=$(HOST_DIR) \ - -C $(@D) $(SYSLINUX_TARGET) install + $(TARGET_MAKE_ENV) $(MAKE1) $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + -C $(@D) $(SYSLINUX_TARGET) install endef +# That 'syslinux' binary is an installer actually built for the target. +# However, buildroot makes no usage of it, so better delete it than have it +# installed at the wrong place +define SYSLINUX_POST_INSTALL_CLEANUP + rm -rf $(HOST_DIR)/bin/syslinux +endef +SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP + SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_MBR) += bios/mbr/mbr.bin @@ -73,8 +97,8 @@ define SYSLINUX_INSTALL_IMAGES_CMDS $(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \ done for i in $(SYSLINUX_C32); do \ - $(INSTALL) -D -m 0755 $(HOST_DIR)/usr/share/syslinux/$${i} \ - $(BINARIES_DIR)/syslinux/$${i}; \ + $(INSTALL) -D -m 0755 $(HOST_DIR)/share/syslinux/$${i} \ + $(BINARIES_DIR)/syslinux/$${i}; \ done endef diff --git a/buildroot/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch b/buildroot/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch new file mode 100644 index 000000000..8b814f2d6 --- /dev/null +++ b/buildroot/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch @@ -0,0 +1,742 @@ +From ee11fed43e2bd029f71af1e72ab9bb5652f5fc54 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 29 Jul 2015 20:32:59 +0300 +Subject: [PATCH] Revert "arch: Make board selection choices optional" + +This reverts commit a26cd04920dc069fd6e91abb785426cf6c29f45f. + +Reverted commit caused an issue with "make oldconfig" - default prompt +for target selection was set as No that lead to missing platform +selection by automated scripts like that: +------------------>8------------------ +"yes "" | make oldconfig" on defconfig +------------------>8------------------ + +And that lead to build failure: +------------------>8------------------ +$ make +scripts/kconfig/conf --silentoldconfig Kconfig + CHK include/config.h + UPD include/config.h + GEN include/autoconf.mk +In file included from ./include/common.h:18:0: +include/config.h:5:22: fatal error: configs/.h: No such file or directory + #include + ^ +compilation terminated. +scripts/Makefile.autoconf:72: recipe for target 'include/autoconf.mk' failed +make[1]: *** [include/autoconf.mk] Error 1 +------------------>8------------------ + +Signed-off-by: Alexey Brodkin +--- + arch/arc/Kconfig | 1 - + arch/arm/Kconfig | 1 - + arch/arm/cpu/armv7/exynos/Kconfig | 1 - + arch/arm/cpu/armv7/mx5/Kconfig | 1 - + arch/arm/cpu/armv7/mx6/Kconfig | 1 - + arch/arm/cpu/armv7/omap3/Kconfig | 1 - + arch/arm/cpu/armv7/omap4/Kconfig | 1 - + arch/arm/cpu/armv7/omap5/Kconfig | 1 - + arch/arm/cpu/armv7/rmobile/Kconfig | 1 - + arch/arm/cpu/armv7/s5pc1xx/Kconfig | 1 - + arch/arm/mach-at91/Kconfig | 1 - + arch/arm/mach-bcm283x/Kconfig | 1 - + arch/arm/mach-davinci/Kconfig | 1 - + arch/arm/mach-integrator/Kconfig | 2 -- + arch/arm/mach-keystone/Kconfig | 1 - + arch/arm/mach-kirkwood/Kconfig | 1 - + arch/arm/mach-nomadik/Kconfig | 1 - + arch/arm/mach-orion5x/Kconfig | 1 - + arch/arm/mach-socfpga/Kconfig | 1 - + arch/arm/mach-tegra/Kconfig | 1 - + arch/arm/mach-tegra/tegra114/Kconfig | 1 - + arch/arm/mach-tegra/tegra124/Kconfig | 1 - + arch/arm/mach-tegra/tegra20/Kconfig | 1 - + arch/arm/mach-tegra/tegra30/Kconfig | 1 - + arch/arm/mach-zynq/Kconfig | 1 - + arch/avr32/Kconfig | 1 - + arch/blackfin/Kconfig | 1 - + arch/m68k/Kconfig | 1 - + arch/microblaze/Kconfig | 1 - + arch/mips/Kconfig | 1 - + arch/nds32/Kconfig | 1 - + arch/nios2/Kconfig | 1 - + arch/openrisc/Kconfig | 1 - + arch/powerpc/Kconfig | 1 - + arch/powerpc/cpu/mpc512x/Kconfig | 1 - + arch/powerpc/cpu/mpc5xx/Kconfig | 1 - + arch/powerpc/cpu/mpc5xxx/Kconfig | 1 - + arch/powerpc/cpu/mpc8260/Kconfig | 1 - + arch/powerpc/cpu/mpc83xx/Kconfig | 1 - + arch/powerpc/cpu/mpc85xx/Kconfig | 1 - + arch/powerpc/cpu/mpc86xx/Kconfig | 1 - + arch/powerpc/cpu/mpc8xx/Kconfig | 1 - + arch/powerpc/cpu/ppc4xx/Kconfig | 1 - + arch/sh/Kconfig | 1 - + arch/sparc/Kconfig | 1 - + board/amcc/canyonlands/Kconfig | 1 - + board/coreboot/Kconfig | 1 - + board/dbau1x00/Kconfig | 1 - + board/google/Kconfig | 1 - + board/intel/Kconfig | 1 - + board/micronas/vct/Kconfig | 1 - + board/seco/Kconfig | 2 -- + board/sunxi/Kconfig | 1 - + 53 files changed, 55 deletions(-) + +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig +index 925e312..640cda8 100644 +--- a/arch/arc/Kconfig ++++ b/arch/arc/Kconfig +@@ -129,7 +129,6 @@ config ARC_CACHE_LINE_SHIFT + + choice + prompt "Target select" +- optional + + config TARGET_TB100 + bool "Support tb100" +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 9908b43..8eeb46c 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -64,7 +64,6 @@ config SEMIHOSTING + + choice + prompt "Target select" +- optional + + config ARCH_AT91 + bool "Atmel AT91" +diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig +index 4a7d82f..f2fe748 100644 +--- a/arch/arm/cpu/armv7/exynos/Kconfig ++++ b/arch/arm/cpu/armv7/exynos/Kconfig +@@ -2,7 +2,6 @@ if ARCH_EXYNOS + + choice + prompt "EXYNOS board select" +- optional + + config TARGET_SMDKV310 + select SUPPORT_SPL +diff --git a/arch/arm/cpu/armv7/mx5/Kconfig b/arch/arm/cpu/armv7/mx5/Kconfig +index 9f250c6..2d6c0ce 100644 +--- a/arch/arm/cpu/armv7/mx5/Kconfig ++++ b/arch/arm/cpu/armv7/mx5/Kconfig +@@ -12,7 +12,6 @@ config MX53 + + choice + prompt "MX5 board select" +- optional + + config TARGET_USBARMORY + bool "Support USB armory" +diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig +index 10908c4..662596f 100644 +--- a/arch/arm/cpu/armv7/mx6/Kconfig ++++ b/arch/arm/cpu/armv7/mx6/Kconfig +@@ -27,7 +27,6 @@ config MX6SX + + choice + prompt "MX6 board select" +- optional + + config TARGET_SECOMX6 + bool "Support secomx6 boards" +diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig +index b32a6b0..cc82c50 100644 +--- a/arch/arm/cpu/armv7/omap3/Kconfig ++++ b/arch/arm/cpu/armv7/omap3/Kconfig +@@ -2,7 +2,6 @@ if OMAP34XX + + choice + prompt "OMAP3 board select" +- optional + + config TARGET_AM3517_EVM + bool "AM3517 EVM" +diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig +index df27ea1..eccf897 100644 +--- a/arch/arm/cpu/armv7/omap4/Kconfig ++++ b/arch/arm/cpu/armv7/omap4/Kconfig +@@ -2,7 +2,6 @@ if OMAP44XX + + choice + prompt "OMAP4 board select" +- optional + + config TARGET_DUOVERO + bool "OMAP4430 Gumstix Duovero" +diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig +index 20c3bd9..aca862d 100644 +--- a/arch/arm/cpu/armv7/omap5/Kconfig ++++ b/arch/arm/cpu/armv7/omap5/Kconfig +@@ -2,7 +2,6 @@ if OMAP54XX + + choice + prompt "OMAP5 board select" +- optional + + config TARGET_CM_T54 + bool "CompuLab CM-T54" +diff --git a/arch/arm/cpu/armv7/rmobile/Kconfig b/arch/arm/cpu/armv7/rmobile/Kconfig +index ef56286..638b63d 100644 +--- a/arch/arm/cpu/armv7/rmobile/Kconfig ++++ b/arch/arm/cpu/armv7/rmobile/Kconfig +@@ -2,7 +2,6 @@ if RMOBILE + + choice + prompt "Renesus ARM SoCs board select" +- optional + + config TARGET_ARMADILLO_800EVA + bool "armadillo 800 eva board" +diff --git a/arch/arm/cpu/armv7/s5pc1xx/Kconfig b/arch/arm/cpu/armv7/s5pc1xx/Kconfig +index 792ef59..65cc9eb 100644 +--- a/arch/arm/cpu/armv7/s5pc1xx/Kconfig ++++ b/arch/arm/cpu/armv7/s5pc1xx/Kconfig +@@ -2,7 +2,6 @@ if ARCH_S5PC1XX + + choice + prompt "S5PC1XX board select" +- optional + + config TARGET_S5P_GONI + bool "S5P Goni board" +diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig +index bbf4228..5dc2cb2 100644 +--- a/arch/arm/mach-at91/Kconfig ++++ b/arch/arm/mach-at91/Kconfig +@@ -2,7 +2,6 @@ if ARCH_AT91 + + choice + prompt "Atmel AT91 board select" +- optional + + config TARGET_AT91RM9200EK + bool "Atmel AT91RM9200 evaluation kit" +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 2315a13..d40f505 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -3,7 +3,6 @@ menu "Broadcom BCM283X family" + + choice + prompt "Broadcom BCM283X board select" +- optional + + config TARGET_RPI + bool "Raspberry Pi" +diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig +index e6cb390..3ef55d3 100644 +--- a/arch/arm/mach-davinci/Kconfig ++++ b/arch/arm/mach-davinci/Kconfig +@@ -2,7 +2,6 @@ if ARCH_DAVINCI + + choice + prompt "DaVinci board select" +- optional + + config TARGET_ENBW_CMC + bool "EnBW CMC board" +diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig +index c54d69d..8ffc544 100644 +--- a/arch/arm/mach-integrator/Kconfig ++++ b/arch/arm/mach-integrator/Kconfig +@@ -3,7 +3,6 @@ menu "Integrator Options" + + choice + prompt "Integrator platform select" +- optional + + config ARCH_INTEGRATOR_AP + bool "Support Integrator/AP platform" +@@ -19,7 +18,6 @@ config ARCH_CINTEGRATOR + + choice + prompt "Integrator core module select" +- optional + + config CM720T + bool "Core Module for ARM720T" +diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig +index 67f1a33..134ae87 100644 +--- a/arch/arm/mach-keystone/Kconfig ++++ b/arch/arm/mach-keystone/Kconfig +@@ -2,7 +2,6 @@ if ARCH_KEYSTONE + + choice + prompt "TI Keystone board select" +- optional + + config TARGET_K2HK_EVM + bool "TI Keystone 2 Kepler/Hawking EVM" +diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig +index 1261885..45c6687 100644 +--- a/arch/arm/mach-kirkwood/Kconfig ++++ b/arch/arm/mach-kirkwood/Kconfig +@@ -2,7 +2,6 @@ if KIRKWOOD + + choice + prompt "Marvell Kirkwood board select" +- optional + + config TARGET_OPENRD + bool "Marvell OpenRD Board" +diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig +index ba72a41..265f336 100644 +--- a/arch/arm/mach-nomadik/Kconfig ++++ b/arch/arm/mach-nomadik/Kconfig +@@ -2,7 +2,6 @@ if ARCH_NOMADIK + + choice + prompt "Nomadik board select" +- optional + + config NOMADIK_NHK8815 + bool "ST 8815 Nomadik Hardware Kit" +diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig +index 7644b8d..291c511 100644 +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -2,7 +2,6 @@ if ORION5X + + choice + prompt "Marvell Orion board select" +- optional + + config TARGET_EDMINIV2 + bool "LaCie Ethernet Disk mini V2" +diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig +index e46c348..204efca 100644 +--- a/arch/arm/mach-socfpga/Kconfig ++++ b/arch/arm/mach-socfpga/Kconfig +@@ -2,7 +2,6 @@ if ARCH_SOCFPGA + + choice + prompt "Altera SOCFPGA board select" +- optional + + config TARGET_SOCFPGA_ARRIA5 + bool "Altera SOCFPGA Arria V" +diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig +index 54bd648..ef77c84 100644 +--- a/arch/arm/mach-tegra/Kconfig ++++ b/arch/arm/mach-tegra/Kconfig +@@ -2,7 +2,6 @@ if TEGRA + + choice + prompt "Tegra SoC select" +- optional + + config TEGRA20 + bool "Tegra20 family" +diff --git a/arch/arm/mach-tegra/tegra114/Kconfig b/arch/arm/mach-tegra/tegra114/Kconfig +index 1047b92..31012bc 100644 +--- a/arch/arm/mach-tegra/tegra114/Kconfig ++++ b/arch/arm/mach-tegra/tegra114/Kconfig +@@ -2,7 +2,6 @@ if TEGRA114 + + choice + prompt "Tegra114 board select" +- optional + + config TARGET_DALMORE + bool "NVIDIA Tegra114 Dalmore evaluation board" +diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig +index f3324ff..86c1301 100644 +--- a/arch/arm/mach-tegra/tegra124/Kconfig ++++ b/arch/arm/mach-tegra/tegra124/Kconfig +@@ -2,7 +2,6 @@ if TEGRA124 + + choice + prompt "Tegra124 board select" +- optional + + config TARGET_JETSON_TK1 + bool "NVIDIA Tegra124 Jetson TK1 board" +diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig +index 1bb8dff..7f09f81 100644 +--- a/arch/arm/mach-tegra/tegra20/Kconfig ++++ b/arch/arm/mach-tegra/tegra20/Kconfig +@@ -2,7 +2,6 @@ if TEGRA20 + + choice + prompt "Tegra20 board select" +- optional + + config TARGET_HARMONY + bool "NVIDIA Tegra20 Harmony evaluation board" +diff --git a/arch/arm/mach-tegra/tegra30/Kconfig b/arch/arm/mach-tegra/tegra30/Kconfig +index e78331e..3abdc7b 100644 +--- a/arch/arm/mach-tegra/tegra30/Kconfig ++++ b/arch/arm/mach-tegra/tegra30/Kconfig +@@ -2,7 +2,6 @@ if TEGRA30 + + choice + prompt "Tegra30 board select" +- optional + + config TARGET_APALIS_T30 + bool "Toradex Apalis T30 board" +diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig +index 1de5b07..6b0e295 100644 +--- a/arch/arm/mach-zynq/Kconfig ++++ b/arch/arm/mach-zynq/Kconfig +@@ -10,7 +10,6 @@ config ZYNQ_CUSTOM_INIT + + choice + prompt "Xilinx Zynq board select" +- optional + + config TARGET_ZYNQ_ZED + bool "Zynq ZedBoard" +diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig +index eb33774..801b9cc 100644 +--- a/arch/avr32/Kconfig ++++ b/arch/avr32/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_ATNGW100 + bool "Support atngw100" +diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig +index 0a2fb4d..31913fe 100644 +--- a/arch/blackfin/Kconfig ++++ b/arch/blackfin/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_BCT_BRETTL2 + bool "Support bct-brettl2" +diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig +index 26509b7..69cb0f7 100644 +--- a/arch/m68k/Kconfig ++++ b/arch/m68k/Kconfig +@@ -114,7 +114,6 @@ config M548x + + choice + prompt "Target select" +- optional + + config TARGET_M52277EVB + bool "Support M52277EVB" +diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig +index 077b2a7..6f419f0 100644 +--- a/arch/microblaze/Kconfig ++++ b/arch/microblaze/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_MICROBLAZE_GENERIC + bool "Support microblaze-generic" +diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig +index 7f7e258..87b94ac 100644 +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -10,7 +10,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_QEMU_MIPS + bool "Support qemu-mips" +diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig +index 98b0282..81b0a01 100644 +--- a/arch/nds32/Kconfig ++++ b/arch/nds32/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_ADP_AG101 + bool "Support adp-ag101" +diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig +index 8ae7f6e..b3be7b5 100644 +--- a/arch/nios2/Kconfig ++++ b/arch/nios2/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_NIOS2_GENERIC + bool "Support nios2-generic" +diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig +index 11014d1..4d62b4c 100644 +--- a/arch/openrisc/Kconfig ++++ b/arch/openrisc/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_OPENRISC_GENERIC + bool "Support openrisc-generic" +diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig +index 3b3f446..8e5a3e2 100644 +--- a/arch/powerpc/Kconfig ++++ b/arch/powerpc/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "CPU select" +- optional + + config MPC512X + bool "MPC512X" +diff --git a/arch/powerpc/cpu/mpc512x/Kconfig b/arch/powerpc/cpu/mpc512x/Kconfig +index 53450ae..a0f0ede 100644 +--- a/arch/powerpc/cpu/mpc512x/Kconfig ++++ b/arch/powerpc/cpu/mpc512x/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_PDM360NG + bool "Support pdm360ng" +diff --git a/arch/powerpc/cpu/mpc5xx/Kconfig b/arch/powerpc/cpu/mpc5xx/Kconfig +index 5275447..aad4a7c 100644 +--- a/arch/powerpc/cpu/mpc5xx/Kconfig ++++ b/arch/powerpc/cpu/mpc5xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_CMI_MPC5XX + bool "Support cmi_mpc5xx" +diff --git a/arch/powerpc/cpu/mpc5xxx/Kconfig b/arch/powerpc/cpu/mpc5xxx/Kconfig +index 5d49228..eec9d7d 100644 +--- a/arch/powerpc/cpu/mpc5xxx/Kconfig ++++ b/arch/powerpc/cpu/mpc5xxx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_A3M071 + bool "Support a3m071" +diff --git a/arch/powerpc/cpu/mpc8260/Kconfig b/arch/powerpc/cpu/mpc8260/Kconfig +index e93732d..55941c8 100644 +--- a/arch/powerpc/cpu/mpc8260/Kconfig ++++ b/arch/powerpc/cpu/mpc8260/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_KM82XX + bool "Support km82xx" +diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig +index 3fb901f..88a3bd6 100644 +--- a/arch/powerpc/cpu/mpc83xx/Kconfig ++++ b/arch/powerpc/cpu/mpc83xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_MPC8308_P1M + bool "Support mpc8308_p1m" +diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig +index 3e8d0b1..aff5fdb 100644 +--- a/arch/powerpc/cpu/mpc85xx/Kconfig ++++ b/arch/powerpc/cpu/mpc85xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_SBC8548 + bool "Support sbc8548" +diff --git a/arch/powerpc/cpu/mpc86xx/Kconfig b/arch/powerpc/cpu/mpc86xx/Kconfig +index fe1859d..14e8b1a 100644 +--- a/arch/powerpc/cpu/mpc86xx/Kconfig ++++ b/arch/powerpc/cpu/mpc86xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_SBC8641D + bool "Support sbc8641d" +diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig +index 79cee35..e8bcbe9 100644 +--- a/arch/powerpc/cpu/mpc8xx/Kconfig ++++ b/arch/powerpc/cpu/mpc8xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_TQM823L + bool "Support TQM823L" +diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig +index 10b86e0..4d5954a 100644 +--- a/arch/powerpc/cpu/ppc4xx/Kconfig ++++ b/arch/powerpc/cpu/ppc4xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_CSB272 + bool "Support csb272" +diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig +index 6ac22af..ff8f5b5 100644 +--- a/arch/sh/Kconfig ++++ b/arch/sh/Kconfig +@@ -29,7 +29,6 @@ config SH_32BIT + + choice + prompt "Target select" +- optional + + config TARGET_RSK7203 + bool "RSK+ 7203" +diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig +index 04dc08f..2df09b2 100644 +--- a/arch/sparc/Kconfig ++++ b/arch/sparc/Kconfig +@@ -14,7 +14,6 @@ config LEON3 + + choice + prompt "Board select" +- optional + + config TARGET_GRSIM_LEON2 + bool "GRSIM simulating a LEON2 board" +diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig +index a655dbc..ef66ad4 100644 +--- a/board/amcc/canyonlands/Kconfig ++++ b/board/amcc/canyonlands/Kconfig +@@ -11,7 +11,6 @@ config SYS_CONFIG_NAME + + choice BOARD_TYPE + prompt "Select which board to build for" +- optional + + config CANYONLANDS + bool "Glacier" +diff --git a/board/coreboot/Kconfig b/board/coreboot/Kconfig +index ede6065..dc9b70f 100644 +--- a/board/coreboot/Kconfig ++++ b/board/coreboot/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_COREBOOT + + choice + prompt "Mainboard model" +- optional + + config TARGET_COREBOOT + bool "coreboot" +diff --git a/board/dbau1x00/Kconfig b/board/dbau1x00/Kconfig +index b813adb..1286e45 100644 +--- a/board/dbau1x00/Kconfig ++++ b/board/dbau1x00/Kconfig +@@ -13,7 +13,6 @@ menu "dbau1x00 board options" + + choice + prompt "Select au1x00 SoC type" +- optional + + config DBAU1100 + bool "Select AU1100" +diff --git a/board/google/Kconfig b/board/google/Kconfig +index e9559c9..302f68e 100644 +--- a/board/google/Kconfig ++++ b/board/google/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_GOOGLE + + choice + prompt "Mainboard model" +- optional + + config TARGET_CHROMEBOOK_LINK + bool "Chromebook link" +diff --git a/board/intel/Kconfig b/board/intel/Kconfig +index 3d9ecf0..7fe21b9 100644 +--- a/board/intel/Kconfig ++++ b/board/intel/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_INTEL + + choice + prompt "Mainboard model" +- optional + + config TARGET_CROWNBAY + bool "Crown Bay" +diff --git a/board/micronas/vct/Kconfig b/board/micronas/vct/Kconfig +index c518079..288a1ae 100644 +--- a/board/micronas/vct/Kconfig ++++ b/board/micronas/vct/Kconfig +@@ -13,7 +13,6 @@ menu "vct board options" + + choice + prompt "Board variant" +- optional + + config VCT_PLATINUM + bool "Enable VCT_PLATINUM" +diff --git a/board/seco/Kconfig b/board/seco/Kconfig +index af16697..dcb1ac8 100644 +--- a/board/seco/Kconfig ++++ b/board/seco/Kconfig +@@ -2,7 +2,6 @@ if TARGET_SECOMX6 + + choice + prompt "SECO i.MX6 Board variant" +- optional + + config SECOMX6_Q7 + bool "Q7" +@@ -17,7 +16,6 @@ endchoice + + choice + prompt "SECO i.MX6 SoC variant" +- optional + + config SECOMX6Q + bool "i.MX6Q" +diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig +index 2a1cd3c..808de26 100644 +--- a/board/sunxi/Kconfig ++++ b/board/sunxi/Kconfig +@@ -18,7 +18,6 @@ config SUNXI_GEN_SUN6I + + choice + prompt "Sunxi SoC Variant" +- optional + + config MACH_SUN4I + bool "sun4i (Allwinner A10)" +-- +2.4.3 + diff --git a/buildroot/boot/uboot/2016.07/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch b/buildroot/boot/uboot/2016.07/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch new file mode 100644 index 000000000..eded9a312 --- /dev/null +++ b/buildroot/boot/uboot/2016.07/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch @@ -0,0 +1,39 @@ +From 7c8d81605302e7d7fdd3e7d8eb69302bddc64a2c Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Fri, 16 Sep 2016 12:12:26 +0300 +Subject: [PATCH] arc: Use -mcpu=XXX instead of obsolete -marcXXX + +With newer ARC tools old way of CPU specification gets obsolete, +so we're switching to newer and more common way of setting "-mcpu". + +Signed-off-by: Alexey Brodkin +--- + arch/arc/config.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arc/config.mk b/arch/arc/config.mk +index 7c974f0..13676bd 100644 +--- a/arch/arc/config.mk ++++ b/arch/arc/config.mk +@@ -31,15 +31,15 @@ CONFIG_MMU = 1 + endif + + ifdef CONFIG_CPU_ARC750D +-PLATFORM_CPPFLAGS += -marc700 ++PLATFORM_CPPFLAGS += -mcpu=arc700 + endif + + ifdef CONFIG_CPU_ARC770D +-PLATFORM_CPPFLAGS += -marc700 -mlock -mswape ++PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape + endif + + ifdef CONFIG_CPU_ARCEM6 +-PLATFORM_CPPFLAGS += -marcem ++PLATFORM_CPPFLAGS += -mcpu=arcem + endif + + ifdef CONFIG_CPU_ARCHS34 +-- +2.7.4 + diff --git a/buildroot/boot/uboot/2016.09.01/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch b/buildroot/boot/uboot/2016.09.01/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch new file mode 100644 index 000000000..eded9a312 --- /dev/null +++ b/buildroot/boot/uboot/2016.09.01/0001-arc-Use-mcpu-XXX-instead-of-obsolete-marcXXX.patch @@ -0,0 +1,39 @@ +From 7c8d81605302e7d7fdd3e7d8eb69302bddc64a2c Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Fri, 16 Sep 2016 12:12:26 +0300 +Subject: [PATCH] arc: Use -mcpu=XXX instead of obsolete -marcXXX + +With newer ARC tools old way of CPU specification gets obsolete, +so we're switching to newer and more common way of setting "-mcpu". + +Signed-off-by: Alexey Brodkin +--- + arch/arc/config.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arc/config.mk b/arch/arc/config.mk +index 7c974f0..13676bd 100644 +--- a/arch/arc/config.mk ++++ b/arch/arc/config.mk +@@ -31,15 +31,15 @@ CONFIG_MMU = 1 + endif + + ifdef CONFIG_CPU_ARC750D +-PLATFORM_CPPFLAGS += -marc700 ++PLATFORM_CPPFLAGS += -mcpu=arc700 + endif + + ifdef CONFIG_CPU_ARC770D +-PLATFORM_CPPFLAGS += -marc700 -mlock -mswape ++PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape + endif + + ifdef CONFIG_CPU_ARCEM6 +-PLATFORM_CPPFLAGS += -marcem ++PLATFORM_CPPFLAGS += -mcpu=arcem + endif + + ifdef CONFIG_CPU_ARCHS34 +-- +2.7.4 + diff --git a/buildroot/boot/uboot/Config.in b/buildroot/boot/uboot/Config.in index 03e6acc02..a87a64258 100644 --- a/buildroot/boot/uboot/Config.in +++ b/buildroot/boot/uboot/Config.in @@ -3,14 +3,37 @@ config BR2_TARGET_UBOOT help Build "Das U-Boot" Boot Monitor + https://www.denx.de/wiki/U-Boot + if BR2_TARGET_UBOOT +choice + prompt "Build system" + default BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG if BR2_TARGET_UBOOT_LATEST_VERSION + default BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + +config BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + bool "Kconfig" + help + Select this option if you use a recent U-Boot version (2015.04 + or newer), so that we use the Kconfig build system. + +config BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + bool "Legacy" + help + Select this option if you use an old U-Boot (older than + 2015.04), so that we use the old build system. + +endchoice + +if BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY config BR2_TARGET_UBOOT_BOARDNAME string "U-Boot board name" help One of U-Boot supported boards to be built. - This will be suffixed with _config to meet U-Boot standard naming. - See boards.cfg in U-Boot source code for the list of available - configurations. + This will be suffixed with _config to meet U-Boot standard + naming. See boards.cfg in U-Boot source code for the list of + available configurations. +endif choice prompt "U-Boot Version" @@ -18,7 +41,7 @@ choice Select the specific U-Boot version you want to use config BR2_TARGET_UBOOT_LATEST_VERSION - bool "2015.01" + bool "2020.07" config BR2_TARGET_UBOOT_CUSTOM_VERSION bool "Custom version" @@ -34,6 +57,9 @@ config BR2_TARGET_UBOOT_CUSTOM_GIT config BR2_TARGET_UBOOT_CUSTOM_HG bool "Custom Mercurial repository" +config BR2_TARGET_UBOOT_CUSTOM_SVN + bool "Custom Subversion repository" + endchoice config BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE @@ -44,44 +70,166 @@ config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION string "URL of custom U-Boot tarball" depends on BR2_TARGET_UBOOT_CUSTOM_TARBALL -if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG +if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN config BR2_TARGET_UBOOT_CUSTOM_REPO_URL string "URL of custom repository" - default BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL \ - if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" # legacy config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION string "Custom repository version" - default BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION \ - if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" # legacy help - Revision to use in the typical format used by Git/Mercurial - E.G. a sha id, a tag, branch, .. + Revision to use in the typical format used by + Git/Mercurial/Subversion E.G. a sha id, a tag, branch, .. endif config BR2_TARGET_UBOOT_VERSION string - default "2015.01" if BR2_TARGET_UBOOT_LATEST_VERSION + default "2020.07" if BR2_TARGET_UBOOT_LATEST_VERSION default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE \ if BR2_TARGET_UBOOT_CUSTOM_VERSION default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL default BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION \ - if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG + if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN -config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR - string "custom patch dir" +config BR2_TARGET_UBOOT_PATCH + string "Custom U-Boot patches" + default BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR if BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR != "" # legacy help - If your board requires custom patches, add the path to the - directory containing the patches here. The patches must be - named uboot-.patch. + A space-separated list of patches to apply to U-Boot. + Each patch can be described as an URL, a local file path, + or a directory. In the case of a directory, all files + matching *.patch in the directory will be applied. Most users may leave this empty +if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG +choice + prompt "U-Boot configuration" + default BR2_TARGET_UBOOT_USE_DEFCONFIG + +config BR2_TARGET_UBOOT_USE_DEFCONFIG + bool "Using an in-tree board defconfig file" + +config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + bool "Using a custom board (def)config file" + +endchoice + +config BR2_TARGET_UBOOT_BOARD_DEFCONFIG + string "Board defconfig" + depends on BR2_TARGET_UBOOT_USE_DEFCONFIG + help + Name of the board for which U-Boot should be built, without + the _defconfig suffix. + +config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + help + Path to the U-Boot configuration file. + +config BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES + string "Additional configuration fragment files" + help + A space-separated list of configuration fragment files, + that will be merged to the main U-Boot configuration file. +endif + +config BR2_TARGET_UBOOT_NEEDS_DTC + bool "U-Boot needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your U-Boot board configuration + requires the Device Tree compiler to be available. + +config BR2_TARGET_UBOOT_NEEDS_PYTHON + bool + +choice + bool "U-Boot needs host Python" + +config BR2_TARGET_UBOOT_NEEDS_PYTHON_NONE + bool "no" + depends on !BR2_TARGET_UBOOT_NEEDS_PYTHON + help + Select this option if U-Boot does not need any + host python to build. + +config BR2_TARGET_UBOOT_NEEDS_PYTHON2 + bool "python 2.x" + help + Select this option if U-Boot needs a host Python 2.x + interpreter. This is the case for some U-Boot + configurations, prior to U-Boot 2020.01. + +config BR2_TARGET_UBOOT_NEEDS_PYTHON3 + bool "python 3.x" + help + Select this option if U-Boot needs a host Python 3.x + interpreter. This is the case for some U-Boot + configurations, after U-Boot 2020.01. + +endchoice + +config BR2_TARGET_UBOOT_NEEDS_PYLIBFDT + bool "U-Boot needs pylibfdt" + select BR2_TARGET_UBOOT_NEEDS_PYTHON + help + Select this option if your U-Boot board configuration + requires the Python libfdt library to be available. + +config BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS + bool "U-Boot needs pyelftools" + select BR2_TARGET_UBOOT_NEEDS_PYTHON + help + Select this option if your U-Boot board configuration + requires the Python pyelftools library to be available. + This is used by some rockchip SOCs for elf parsing. + For example: rk3399 soc boards. + +config BR2_TARGET_UBOOT_NEEDS_OPENSSL + bool "U-Boot needs OpenSSL" + help + Select this option if your U-Boot board configuration + requires OpenSSL to be available on the host. This is + typically the case when the board configuration has + CONFIG_FIT_SIGNATURE enabled. + +config BR2_TARGET_UBOOT_NEEDS_LZOP + bool "U-Boot needs lzop" + help + Select this option if your U-Boot board configuration + requires lzop to be available on the host. This is typically + the case when the board configuration has CONFIG_SPL_LZO + enabled. + +config BR2_TARGET_UBOOT_NEEDS_ATF_BL31 + bool "U-Boot needs ATF BL31" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE + depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 + select BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31 + help + Some specific platforms (such as Allwinner A64/H5) + encapsulate the BL31 part of ATF inside U-Boot. This option + makes sure ATF gets built prior to U-Boot, and that the BL31 + variable pointing to ATF's BL31 binary, is passed during the + Buildroot build. + choice - prompt "U-Boot binary format" - default BR2_TARGET_UBOOT_FORMAT_BIN + prompt "U-Boot ATF BL31 format" + default BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN + depends on BR2_TARGET_UBOOT_NEEDS_ATF_BL31 + +config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_BIN + bool "bl31.bin" + +config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF + bool "bl31.elf" + +endchoice + +menu "U-Boot binary format" config BR2_TARGET_UBOOT_FORMAT_AIS bool "u-boot.ais" @@ -92,10 +240,23 @@ config BR2_TARGET_UBOOT_FORMAT_AIS config BR2_TARGET_UBOOT_FORMAT_BIN bool "u-boot.bin" + default y + +config BR2_TARGET_UBOOT_FORMAT_DTB_BIN + bool "u-boot-dtb.bin" + +config BR2_TARGET_UBOOT_FORMAT_DTB_IMG + bool "u-boot-dtb.img" + +config BR2_TARGET_UBOOT_FORMAT_DTB_IMX + bool "u-boot-dtb.imx" config BR2_TARGET_UBOOT_FORMAT_IMG bool "u-boot.img" +config BR2_TARGET_UBOOT_FORMAT_ITB + bool "u-boot.itb" + config BR2_TARGET_UBOOT_FORMAT_IMX bool "u-boot.imx" @@ -103,43 +264,111 @@ config BR2_TARGET_UBOOT_FORMAT_NAND_BIN bool "u-boot-nand.bin" config BR2_TARGET_UBOOT_FORMAT_KWB - depends on BR2_arm bool "u-boot.kwb (Marvell)" - -config BR2_TARGET_UBOOT_FORMAT_LDR - depends on BR2_bfin - bool "u-boot.ldr" + depends on BR2_arm config BR2_TARGET_UBOOT_FORMAT_ELF bool "u-boot.elf" config BR2_TARGET_UBOOT_FORMAT_SB + bool "u-boot.sb (Freescale i.MX28)" + depends on BR2_arm + +config BR2_TARGET_UBOOT_FORMAT_SD + bool "u-boot.sd (Freescale i.MX28)" + depends on BR2_arm + help + This is Freescale i.MX28 SB format, with a header for booting + from an SD card. + + U-Boot includes an mxsboot tool to generate this format, + starting from 2011.12. + + See doc/README.mxs (or doc/README.mx28_common before 2013.07) + +config BR2_TARGET_UBOOT_FORMAT_NAND + bool "u-boot.nand (Freescale i.MX28)" depends on BR2_arm - bool "u-boot.sb" + help + This is Freescale i.MX28 BootStream format (.sb), with a + header for booting from a NAND flash. + + U-Boot includes an mxsboot tool to generate this format, + starting from 2011.12. + + There are two possibilities when preparing an image writable + to NAND flash: + 1) The NAND was not written at all yet or the BCB (Boot + Control Blocks) is broken. In this case, the NAND image + 'u-boot.nand' needs to written. + 2) The NAND flash was already written with a good BCB. This + applies after 'u-boot.nand' was correctly written. There is no + need to write the BCB again. In this case, the bootloader can + be upgraded by writing 'u-boot.sb'. + + To satisfy both cases, the 'u-boot.nand' image obtained from + mxsboot as well as the U-Boot make target 'u-boot.sb' are + copied to the binaries directory. + + See doc/README.mxs (or doc/README.mx28_common before 2013.07) + +if BR2_TARGET_UBOOT_FORMAT_NAND + +config BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE + int "NAND page size" + default 2048 + help + The NAND page size of the targets NAND flash in bytes as a + decimal integer value. + + The value provided here is passed to the -w option of mxsboot. + +config BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE + int "NAND OOB size" + default 64 + help + The NAND OOB size of the targets NAND flash in bytes as a + decimal integer value. + + The value provided here is passed to the -o option of mxsboot. + +config BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE + int "NAND erase size" + default 131072 + help + The NAND eraseblock size of the targets NAND flash in bytes as + a decimal integer value. + + The value provided here is passed to the -e option of mxsboot. + +endif config BR2_TARGET_UBOOT_FORMAT_CUSTOM bool "Custom (specify below)" help On some platforms, the standard U-Boot binary is not called u-boot.bin, but u-boot.bin. If this is your case, - you should select this option and specify the correct name + you should select this option and specify the correct name(s) in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME. -endchoice - config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME - string "U-Boot binary format: custom name" + string "U-Boot binary format: custom names" depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM help - Specify the correct name of the output binary created by - U-Boot, if it is not one of the default names. For example: + In case the U-Boot binary for the target platform is not among + the default names, one or more custom names can be listed + here. + Use space to separate multiple names. + Example: u-boot_magic.bin +endmenu + config BR2_TARGET_UBOOT_OMAP_IFT + bool "produce a .ift signed image (OMAP)" depends on BR2_TARGET_UBOOT_FORMAT_BIN depends on BR2_arm || BR2_armeb select BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS - bool "produce a .ift signed image (OMAP)" help Use gpsign to produce an image of u-boot.bin signed with a Configuration Header for booting on OMAP processors. @@ -167,71 +396,142 @@ config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG endif -menuconfig BR2_TARGET_UBOOT_NETWORK - bool "Custom Network Settings" - depends on BR2_DEPRECATED_SINCE_2014_05 +config BR2_TARGET_UBOOT_SPL + bool "Install U-Boot SPL binary image" + depends on !BR2_TARGET_XLOADER help - Custom network settings for U-boot - -if BR2_TARGET_UBOOT_NETWORK + Install the U-Boot SPL binary image to the images + directory. + SPL is a first stage bootloader loaded into internal + memory in charge of enabling and configuring the + external memory (DDR), and load the u-boot program + into DDR. -config BR2_TARGET_UBOOT_SERVERIP - string "server ip" - default "10.175.196.221" +config BR2_TARGET_UBOOT_SPL_NAME + string "U-Boot SPL/TPL binary image name(s)" + default "spl/u-boot-spl.bin" + depends on BR2_TARGET_UBOOT_SPL help - TFTP server ip address + A space-separated list of SPL/TPL binaries, generated during + u-boot build. For most platform SPL name is spl/u-boot-spl.bin + and TPL name is tpl/u-boot-tpl.bin but not always. SPL name is + MLO on OMAP and SPL on i.MX6 for example. -config BR2_TARGET_UBOOT_IPADDR - string "ip address" - default "10.175.196.18" +config BR2_TARGET_UBOOT_ZYNQ_IMAGE + bool "Generate image for Xilinx Zynq" + depends on BR2_arm + depends on BR2_TARGET_UBOOT_SPL + depends on BR2_TARGET_UBOOT_FORMAT_DTB_IMG help - Target ip address - -config BR2_TARGET_UBOOT_GATEWAY - string "gateway ip" - default "10.175.196.1" + Generate the BOOT.BIN file from U-Boot's SPL. The image + boots the Xilinx Zynq chip without any FPGA bitstream. + A bitstream can be loaded by the U-Boot. The SPL searchs + for u-boot-dtb.img file so this U-Boot format is required + to be set. + +config BR2_TARGET_UBOOT_ZYNQMP + bool "Boot on the Xilinx ZynqMP SoCs" + depends on BR2_aarch64 help - Gateway ip address + Enable options specific to the Xilinx ZynqMP family of SoCs. -config BR2_TARGET_UBOOT_NETMASK - string "netmask" - default "255.255.255.0" - help - Network Mask +if BR2_TARGET_UBOOT_ZYNQMP -config BR2_TARGET_UBOOT_ETHADDR - string "ethernet address" - default "04:25:fe:ed:00:18" +config BR2_TARGET_UBOOT_ZYNQMP_PMUFW + string "PMU firmware location" + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG help - Target MAC address for the ethernet interface. - This should be changed for production units + Location of a PMU firmware binary. + + If not empty, instructs the U-Boot build process to generate + a boot.bin (to be loaded by the ZynqMP boot ROM) containing + both the U-Boot SPL and the PMU firmware in the + Xilinx-specific boot format. -config BR2_TARGET_UBOOT_ETH1ADDR - string "ethernet 2 address" + The value can be an absolute or relative path, and will be + used directly from where it is located, or an URI + (e.g. http://...), and it will be downloaded and used from + the download directory. + + If empty, the generated boot.bin will not contain a PMU + firmware. + + This feature requires U-Boot >= 2018.07. + +config BR2_TARGET_UBOOT_ZYNQMP_PM_CFG + string "PMU configuration location" + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG help - Target MAC address for the second ethernet interface. + Location of a PMU configuration file. -endif # BR2_TARGET_UBOOT_NETWORK + If not empty, Buildroot will convert the PMU configuration + file into a loadable blob and pass it to U-Boot. The blob gets + embedded into the U-Boot SPL and is used to configure the PMU + during board initialization. -config BR2_TARGET_UBOOT_SPL - bool "Install U-Boot SPL binary image" - depends on !BR2_TARGET_XLOADER + Unlike the PMU firmware, the PMU configuration file is unique + to each board configuration. A PMU configuration file can be + generated by building your Xilinx SDK BSP. It can be found in + the BSP source, for example at + ./psu_cortexa53_0/libsrc/xilpm_v2_4/src/pm_cfg_obj.c + + Leave this option empty if your PMU firmware has a hard-coded + configuration object or you are loading it by any other means. + + This feature requires U-Boot >= v2019.10. + +config BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE + string "Custom psu_init_gpl file" + depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG help - Install the U-Boot SPL binary image to the images - directory. - SPL is a first stage bootloader loaded into internal - memory in charge of enabling and configuring the - external memory (DDR), and load the u-boot program - into DDR. + On ZynqMP the booloader is responsible for some basic + initializations, such as enabling peripherals and + configuring pinmuxes. The psu_init_gpl.c file (and, + optionally, psu_init_gpl.h) contains the code for such + initializations. -config BR2_TARGET_UBOOT_SPL_NAME - string "U-Boot SPL binary image name" - default "spl/u-boot-spl.bin" - depends on BR2_TARGET_UBOOT_SPL + Although U-Boot contains psu_init_gpl.c files for some + boards, each of them describes only one specific + configuration. Users of a different board, or needing a + different configuration, can generate custom files using the + Xilinx development tools. + + Set this variable to the path to your psu_init_gpl.c file + (e.g. "board/myboard/psu_init_gpl.c"). psu_init_gpl.h, if + needed, should be in the same directory. U-Boot will build + and link the user-provided file instead of the built-in one. + + Leave empty to use the files provided by U-Boot. + + This feature requires commit + 6da4f67ad09cd8b311d77b2b04e557b7ef65b56c from upstream + U-Boot, available from versions after 2018.07. + +endif + +config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC + bool "CRC image for Altera SoC FPGA (mkpimage)" + depends on BR2_arm + depends on BR2_TARGET_UBOOT_SPL || BR2_TARGET_UBOOT_FORMAT_DTB_BIN help - This is the name of the SPL binary, generated during - u-boot build. For most platform it is spl/u-boot-spl.bin - but not always. It is MLO on OMAP for example. + Pass the U-Boot image through the mkpimage tool to enable + booting on the Altera SoC FPGA based platforms. + + On some platforms, it's the SPL that needs to be passed + through mkpimage. On some other platforms there is no SPL + because the internal SRAM is big enough to store the full + U-Boot. In this case, it's directly the full U-Boot image + that is passed through mkpimage. + + If BR2_TARGET_UBOOT_SPL is enabled then + BR2_TARGET_UBOOT_SPL_NAME is converted by mkpimage using + header version 0. + + Otherwise the full u-boot-dtb.bin is converted using + mkpimage header version 1. + + In either case the resulting file will be given a .crc + extension. menuconfig BR2_TARGET_UBOOT_ENVIMAGE bool "Environment image" @@ -244,9 +544,15 @@ menuconfig BR2_TARGET_UBOOT_ENVIMAGE if BR2_TARGET_UBOOT_ENVIMAGE config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE - string "Source file for environment" + string "Source files for environment" help - Text file describing the environment. + Text files describing the environment. Files should have + lines of the form var=value, one per line. Blank lines and + lines starting with a # are ignored. + + Multiple source files are concatenated in the order listed. + + Leave empty to generate image from compiled-in env. config BR2_TARGET_UBOOT_ENVIMAGE_SIZE string "Size of environment" @@ -270,4 +576,40 @@ config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT endif # BR2_TARGET_UBOOT_ENVIMAGE +config BR2_TARGET_UBOOT_BOOT_SCRIPT + bool "Generate a U-Boot boot script" + help + Generate a U-Boot boot script, given a file listing U-Boot + commands to be executed at boot time. The generated boot + script will be called 'boot.scr'. + +if BR2_TARGET_UBOOT_BOOT_SCRIPT + +config BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE + string "U-Boot boot script source" + help + Source file to generate the U-Boot boot script. + +endif + +if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + +config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + help + Space-separated list of paths to device tree source files + that will be copied to arch/ARCH/dts/ before starting the + build. + + To use this device tree source file, the U-Boot configuration + file must refer to it. + +endif + +config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS + string "Custom make options" + help + List of custom make options passed at build time. Can be + used for example to pass a DEVICE_TREE= value. + endif # BR2_TARGET_UBOOT diff --git a/buildroot/boot/uboot/uboot.hash b/buildroot/boot/uboot/uboot.hash new file mode 100644 index 000000000..4b660dd6d --- /dev/null +++ b/buildroot/boot/uboot/uboot.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a u-boot-2020.07.tar.bz2 +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 Licenses/gpl-2.0.txt diff --git a/buildroot/boot/uboot/uboot.mk b/buildroot/boot/uboot/uboot.mk index a9ba0549a..183146678 100644 --- a/buildroot/boot/uboot/uboot.mk +++ b/buildroot/boot/uboot/uboot.mk @@ -7,11 +7,17 @@ UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) -UBOOT_LICENSE = GPLv2+ +UBOOT_LICENSE = GPL-2.0+ +ifeq ($(BR2_TARGET_UBOOT_LATEST_VERSION),y) UBOOT_LICENSE_FILES = Licenses/gpl-2.0.txt +endif UBOOT_INSTALL_IMAGES = YES +# u-boot 2020.01+ needs make 4.0+ +UBOOT_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) +UBOOT_MAKE = $(BR2_MAKE) + ifeq ($(UBOOT_VERSION),custom) # Handle custom U-Boot tarballs as specified by the configuration UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) @@ -23,56 +29,162 @@ UBOOT_SITE_METHOD = git else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y) UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) UBOOT_SITE_METHOD = hg +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_SVN),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = svn else # Handle stable official U-Boot versions -UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_SITE = https://ftp.denx.de/pub/u-boot UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 endif +ifeq ($(BR2_TARGET_UBOOT)$(BR2_TARGET_UBOOT_LATEST_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_BIN),y) +UBOOT_BINS += u-boot.bin +endif + ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y) -UBOOT_BIN = u-boot -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) -UBOOT_BIN = u-boot.kwb -UBOOT_MAKE_TARGET = $(UBOOT_BIN) -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y) -UBOOT_BIN = u-boot.ais -UBOOT_MAKE_TARGET = $(UBOOT_BIN) -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) -UBOOT_BIN = u-boot.ldr -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y) -UBOOT_BIN = u-boot-nand.bin -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) -UBOOT_BIN = u-boot.img -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y) -UBOOT_BIN = u-boot.imx -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y) -UBOOT_BIN = u-boot.sb -UBOOT_MAKE_TARGET = $(UBOOT_BIN) -UBOOT_DEPENDENCIES += host-elftosb -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y) -UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)) -else -UBOOT_BIN = u-boot.bin -UBOOT_BIN_IFT = $(UBOOT_BIN).ift +UBOOT_BINS += u-boot +# To make elf usable for debuging on ARC use special target +ifeq ($(BR2_arc),y) +UBOOT_MAKE_TARGET += mdbtrick +endif +endif + +# Call 'make all' unconditionally +UBOOT_MAKE_TARGET += all + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) +UBOOT_BINS += u-boot.kwb +UBOOT_MAKE_TARGET += u-boot.kwb +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y) +UBOOT_BINS += u-boot.ais +UBOOT_MAKE_TARGET += u-boot.ais +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y) +UBOOT_BINS += u-boot-nand.bin +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y) +UBOOT_BINS += u-boot-dtb.img +UBOOT_MAKE_TARGET += u-boot-dtb.img +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMX),y) +UBOOT_BINS += u-boot-dtb.imx +UBOOT_MAKE_TARGET += u-boot-dtb.imx +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y) +UBOOT_BINS += u-boot-dtb.bin +UBOOT_MAKE_TARGET += u-boot-dtb.bin +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) +UBOOT_BINS += u-boot.img +UBOOT_MAKE_TARGET += u-boot.img +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_ITB),y) +UBOOT_BINS += u-boot.itb +UBOOT_MAKE_TARGET += u-boot.itb +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y) +UBOOT_BINS += u-boot.imx +UBOOT_MAKE_TARGET += u-boot.imx +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y) +UBOOT_BINS += u-boot.sb +UBOOT_MAKE_TARGET += u-boot.sb +# mxsimage needs OpenSSL +UBOOT_DEPENDENCIES += host-elftosb host-openssl endif +ifeq ($(BR2_TARGET_UBOOT_FORMAT_SD),y) +# BootStream (.sb) is generated by U-Boot, we convert it to SD format +UBOOT_BINS += u-boot.sd +UBOOT_MAKE_TARGET += u-boot.sb +UBOOT_DEPENDENCIES += host-elftosb host-openssl +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y) +UBOOT_BINS += u-boot.nand +UBOOT_MAKE_TARGET += u-boot.sb +UBOOT_DEPENDENCIES += host-elftosb host-openssl +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y) +UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)) +endif + +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y) +UBOOT_BINS += u-boot.bin +UBOOT_BIN_IFT = u-boot.bin.ift +endif + +# The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm', so +# we have to special case it. Similar for i386/x86_64 -> x86 +ifeq ($(KERNEL_ARCH),arm64) +UBOOT_ARCH = arm +else ifneq ($(filter $(KERNEL_ARCH),i386 x86_64),) +UBOOT_ARCH = x86 +else UBOOT_ARCH = $(KERNEL_ARCH) +endif UBOOT_MAKE_OPTS += \ - CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ - ARCH=$(UBOOT_ARCH) + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH=$(UBOOT_ARCH) \ + HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) -# Helper function to fill the U-Boot config.h file. -# Argument 1: option name -# Argument 2: option value -# If the option value is empty, this function does nothing. -define insert_define -$(if $(call qstrip,$(2)), - @echo "#ifdef $(strip $(1))" >> $(@D)/include/config.h - @echo "#undef $(strip $(1))" >> $(@D)/include/config.h - @echo "#endif" >> $(@D)/include/config.h - @echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h) -endef +ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y) +UBOOT_DEPENDENCIES += arm-trusted-firmware +ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y) +UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.elf +else +UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin +endif +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y) +UBOOT_DEPENDENCIES += host-dtc +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYTHON2),y) +UBOOT_DEPENDENCIES += host-python +else ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYTHON3),y) +UBOOT_DEPENDENCIES += host-python3 +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y) +UBOOT_DEPENDENCIES += host-swig +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS),y) +ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYTHON2),y) +UBOOT_DEPENDENCIES += host-python-pyelftools +else ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYTHON3),y) +UBOOT_DEPENDENCIES += host-python3-pyelftools +endif +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSSL),y) +UBOOT_DEPENDENCIES += host-openssl +endif + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_LZOP),y) +UBOOT_DEPENDENCIES += host-lzop +endif # prior to u-boot 2013.10 the license info was in COPYING. Copy it so # legal-info finds it @@ -83,63 +195,205 @@ define UBOOT_COPY_OLD_LICENSE_FILE endef UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE +UBOOT_POST_RSYNC_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE -ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) -define UBOOT_APPLY_CUSTOM_PATCHES - $(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \ - uboot-\*.patch +ifneq ($(ARCH_XTENSA_OVERLAY_FILE),) +define UBOOT_XTENSA_OVERLAY_EXTRACT + $(call arch-xtensa-overlay-extract,$(@D),u-boot) endef - -UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES +UBOOT_POST_EXTRACT_HOOKS += UBOOT_XTENSA_OVERLAY_EXTRACT +UBOOT_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL) endif +# Analogous code exists in linux/linux.mk. Basically, the generic +# package infrastructure handles downloading and applying remote +# patches. Local patches are handled depending on whether they are +# directories or files. +UBOOT_PATCHES = $(call qstrip,$(BR2_TARGET_UBOOT_PATCH)) +UBOOT_PATCH = $(filter ftp://% http://% https://%,$(UBOOT_PATCHES)) + +define UBOOT_APPLY_LOCAL_PATCHES + for p in $(filter-out ftp://% http://% https://%,$(UBOOT_PATCHES)) ; do \ + if test -d $$p ; then \ + $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \ + else \ + $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \ + fi \ + done +endef +UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES + +# Fixup inclusion of libfdt headers, which can fail in older u-boot versions +# when libfdt-devel is installed system-wide. +# The core change is equivalent to upstream commit +# e0d20dc1521e74b82dbd69be53a048847798a90a (first in v2018.03). However, the fixup +# is complicated by the fact that the underlying u-boot code changed multiple +# times in history: +# - The directory scripts/dtc/libfdt only exists since upstream commit +# c0e032e0090d6541549b19cc47e06ccd1f302893 (first in v2017.11). For earlier +# versions, create a dummy scripts/dtc/libfdt directory with symlinks for the +# fdt-related files. This allows to use the same -I option for both +# cases. +# - The variable 'srctree' used to be called 'SRCTREE' before upstream commit +# 01286329b27b27eaeda045b469d41b1d9fce545a (first in v2014.04). +# - The original location for libfdt, 'lib/libfdt/', used to be simply +# 'libfdt' before upstream commit 0de71d507157c4bd4fddcd3a419140d2b986eed2 +# (first in v2010.06). Make the 'lib' part optional in the substitution to +# handle this. +define UBOOT_FIXUP_LIBFDT_INCLUDE + $(Q)if [ ! -d $(@D)/scripts/dtc/libfdt ]; then \ + mkdir -p $(@D)/scripts/dtc/libfdt; \ + cd $(@D)/scripts/dtc/libfdt; \ + ln -s ../../../include/fdt.h .; \ + ln -s ../../../include/libfdt*.h .; \ + ln -s ../../../lib/libfdt/libfdt_internal.h .; \ + fi + $(Q)$(SED) \ + 's%-I\ *\$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%; \ + s%-I\ *\$$(SRCTREE)\(/lib\)\?/libfdt%-I$$(SRCTREE)/scripts/dtc/libfdt%' \ + $(@D)/tools/Makefile +endef +UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE + +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) define UBOOT_CONFIGURE_CMDS - $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(TARGET_CONFIGURE_OPTS) \ + $(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ $(UBOOT_BOARD_NAME)_config - @echo >> $(@D)/include/config.h - @echo "/* Add a wrapper around the values Buildroot sets. */" >> $(@D)/include/config.h - @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h - @echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h - $(call insert_define,DATE,$(DATE)) - $(call insert_define,CONFIG_LOAD_SCRIPTS,1) - $(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR)) - $(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY)) - $(call insert_define,CONFIG_NETMASK,$(BR2_TARGET_UBOOT_NETMASK)) - $(call insert_define,CONFIG_SERVERIP,$(BR2_TARGET_UBOOT_SERVERIP)) - $(call insert_define,CONFIG_ETHADDR,$(BR2_TARGET_UBOOT_ETHADDR)) - $(call insert_define,CONFIG_ETH1ADDR,$(BR2_TARGET_UBOOT_ETH1ADDR)) - @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h endef +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y) +UBOOT_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) +UBOOT_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)) +endif # BR2_TARGET_UBOOT_USE_DEFCONFIG + +UBOOT_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES)) +UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig + +# UBOOT_MAKE_OPTS overrides HOSTCC / HOSTLDFLAGS to allow the build to +# find our host-openssl. However, this triggers a bug in the kconfig +# build script that causes it to build with /usr/include/ncurses.h +# (which is typically wchar) but link with +# $(HOST_DIR)/lib/libncurses.so (which is not). We don't actually +# need any host-package for kconfig, so remove the HOSTCC/HOSTLDFLAGS +# override again. In addition, host-ccache is not ready at kconfig +# time, so use HOSTCC_NOCCACHE. +UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTLDFLAGS="" +define UBOOT_HELP_CMDS + @echo ' uboot-menuconfig - Run U-Boot menuconfig' + @echo ' uboot-savedefconfig - Run U-Boot savedefconfig' + @echo ' uboot-update-defconfig - Save the U-Boot configuration to the path specified' + @echo ' by BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE' +endef +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + +UBOOT_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH)) define UBOOT_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(if $(UBOOT_CUSTOM_DTS_PATH), + cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/ + ) + $(TARGET_CONFIGURE_OPTS) \ + $(UBOOT_MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ $(UBOOT_MAKE_TARGET) + $(if $(BR2_TARGET_UBOOT_FORMAT_SD), + $(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd) + $(if $(BR2_TARGET_UBOOT_FORMAT_NAND), + $(@D)/tools/mxsboot \ + -w $(BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE) \ + -o $(BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE) \ + -e $(BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE) \ + nand $(@D)/u-boot.sb $(@D)/u-boot.nand) endef define UBOOT_BUILD_OMAP_IFT - $(HOST_DIR)/usr/bin/gpsign -f $(@D)/u-boot.bin \ + $(HOST_DIR)/bin/gpsign -f $(@D)/u-boot.bin \ -c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)) endef +ifneq ($(BR2_TARGET_UBOOT_ENVIMAGE),) +UBOOT_GENERATE_ENV_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) +define UBOOT_GENERATE_ENV_IMAGE + $(if $(UBOOT_GENERATE_ENV_FILE), \ + cat $(UBOOT_GENERATE_ENV_FILE), \ + CROSS_COMPILE="$(TARGET_CROSS)" $(@D)/scripts/get_default_envs.sh $(@D)) \ + >$(@D)/buildroot-env.txt + $(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ + $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ + $(if $(filter "BIG",$(BR2_ENDIAN)),-b) \ + -o $(BINARIES_DIR)/uboot-env.bin \ + $(@D)/buildroot-env.txt +endef +endif + define UBOOT_INSTALL_IMAGES_CMDS - cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/ + $(foreach f,$(UBOOT_BINS), \ + cp -dpf $(@D)/$(f) $(BINARIES_DIR)/ + ) + $(if $(BR2_TARGET_UBOOT_FORMAT_NAND), + cp -dpf $(@D)/u-boot.sb $(BINARIES_DIR)) $(if $(BR2_TARGET_UBOOT_SPL), - cp -dpf $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) $(BINARIES_DIR)/) - $(if $(BR2_TARGET_UBOOT_ENVIMAGE), - $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ - $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ - -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) + $(foreach f,$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)), \ + cp -dpf $(@D)/$(f) $(BINARIES_DIR)/ + ) + ) + $(UBOOT_GENERATE_ENV_IMAGE) + $(if $(BR2_TARGET_UBOOT_BOOT_SCRIPT), + $(MKIMAGE) -C none -A $(MKIMAGE_ARCH) -T script \ + -d $(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)) \ + $(BINARIES_DIR)/boot.scr) endef +ifeq ($(BR2_TARGET_UBOOT_ZYNQMP),y) + +UBOOT_ZYNQMP_PMUFW = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PMUFW)) + +ifneq ($(findstring ://,$(UBOOT_ZYNQMP_PMUFW)),) +UBOOT_EXTRA_DOWNLOADS += $(UBOOT_ZYNQMP_PMUFW) +BR_NO_CHECK_HASH_FOR += $(notdir $(UBOOT_ZYNQMP_PMUFW)) +UBOOT_ZYNQMP_PMUFW_PATH = $(UBOOT_DL_DIR)/$(notdir $(UBOOT_ZYNQMP_PMUFW)) +else ifneq ($(UBOOT_ZYNQMP_PMUFW),) +UBOOT_ZYNQMP_PMUFW_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PMUFW)) +endif + +define UBOOT_ZYNQMP_KCONFIG_PMUFW + $(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_PATH)") +endef + +UBOOT_ZYNQMP_PM_CFG = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PM_CFG)) +ifneq ($(UBOOT_ZYNQMP_PM_CFG),) +UBOOT_ZYNQMP_PM_CFG_BIN = $(UBOOT_DIR)/pm_cfg_obj.bin +define UBOOT_ZYNQMP_KCONFIG_PM_CFG + $(call KCONFIG_SET_OPT,CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE,"$(UBOOT_ZYNQMP_PM_CFG_BIN)", \ + $(@D)/.config) +endef + +define UBOOT_ZYNQMP_PM_CFG_CONVERT + $(UBOOT_DIR)/tools/zynqmp_pm_cfg_obj_convert.py \ + "$(UBOOT_ZYNQMP_PM_CFG)" \ + "$(UBOOT_ZYNQMP_PM_CFG_BIN)" +endef +UBOOT_PRE_BUILD_HOOKS += UBOOT_ZYNQMP_PM_CFG_CONVERT +endif + +UBOOT_ZYNQMP_PSU_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE)) +UBOOT_ZYNQMP_PSU_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PSU_INIT)) + +ifneq ($(UBOOT_ZYNQMP_PSU_INIT),) +define UBOOT_ZYNQMP_KCONFIG_PSU_INIT + $(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQMP_PSU_INIT_PATH)") +endef +endif + +endif # BR2_TARGET_UBOOT_ZYNQMP + define UBOOT_INSTALL_OMAP_IFT_IMAGE cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/ endef ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y) -# we NEED a config file unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(BR_BUILDING),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),) $(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) endif @@ -152,40 +406,105 @@ UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE endif -ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y) -# we NEED a environment settings unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),) -$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting)) +ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y) +define UBOOT_GENERATE_ZYNQ_IMAGE + $(HOST_DIR)/bin/python2 \ + $(HOST_DIR)/bin/zynq-boot-bin.py \ + -u $(@D)/$(firstword $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))) \ + -o $(BINARIES_DIR)/BOOT.BIN +endef +UBOOT_DEPENDENCIES += host-zynq-boot-bin +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE +endif + +ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y) +ifeq ($(BR2_TARGET_UBOOT_SPL),y) +UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) +UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 0 +else +UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = u-boot-dtb.bin +UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 1 +endif +define UBOOT_CRC_ALTERA_SOCFPGA_IMAGE + $(foreach f,$(UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES), \ + $(HOST_DIR)/bin/mkpimage \ + -v $(UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION) \ + -o $(BINARIES_DIR)/$(notdir $(call qstrip,$(f))).crc \ + $(@D)/$(call qstrip,$(f)) + ) +endef +UBOOT_DEPENDENCIES += host-mkpimage +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_CRC_ALTERA_SOCFPGA_IMAGE endif + +define UBOOT_KCONFIG_FIXUP_CMDS + $(UBOOT_ZYNQMP_KCONFIG_PMUFW) + $(UBOOT_ZYNQMP_KCONFIG_PM_CFG) + $(UBOOT_ZYNQMP_KCONFIG_PSU_INIT) +endef + +ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y) +ifeq ($(BR_BUILDING),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),) -$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting)) +$(error Please provide U-Boot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting)) endif endif UBOOT_DEPENDENCIES += host-uboot-tools endif -$(eval $(generic-package)) +ifeq ($(BR2_TARGET_UBOOT_BOOT_SCRIPT),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)),) +$(error Please define a source file for U-Boot boot script (BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE setting)) +endif +endif +UBOOT_DEPENDENCIES += host-uboot-tools +endif -ifeq ($(BR2_TARGET_UBOOT),y) -# we NEED a board name unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy) + +# +# Check U-Boot board name (for legacy) or the defconfig/custom config +# file options (for kconfig) +# +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) ifeq ($(UBOOT_BOARD_NAME),) -$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) -endif +$(error No U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) +endif # UBOOT_BOARD_NAME +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG)),) +$(error No board defconfig name specified, check your BR2_TARGET_UBOOT_BOARD_DEFCONFIG setting) +endif # qstrip BR2_TARGET_UBOOT_BOARD_DEFCONFIG +endif # BR2_TARGET_UBOOT_USE_DEFCONFIG +ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)),) +$(error No board configuration file specified, check your BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE +endif # BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY +# +# Check custom version option +# ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE)),) $(error No custom U-Boot version specified. Check your BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE setting) endif # qstrip BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE endif # BR2_TARGET_UBOOT_CUSTOM_VERSION +# +# Check custom tarball option +# ifeq ($(BR2_TARGET_UBOOT_CUSTOM_TARBALL),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)),) $(error No custom U-Boot tarball specified. Check your BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION setting) endif # qstrip BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL +# +# Check Git/Mercurial repo options +# ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),) $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting) @@ -195,5 +514,17 @@ $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_C endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG -endif # filter source -endif # BR2_TARGET_UBOOT +endif # BR2_TARGET_UBOOT && BR_BUILDING + +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) +UBOOT_DEPENDENCIES += \ + $(BR2_BISON_HOST_DEPENDENCY) \ + $(BR2_FLEX_HOST_DEPENDENCY) +$(eval $(generic-package)) +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +UBOOT_MAKE_ENV = $(TARGET_MAKE_ENV) +UBOOT_KCONFIG_DEPENDENCIES = \ + $(BR2_BISON_HOST_DEPENDENCY) \ + $(BR2_FLEX_HOST_DEPENDENCY) +$(eval $(kconfig-package)) +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY diff --git a/buildroot/boot/vexpress-firmware/Config.in b/buildroot/boot/vexpress-firmware/Config.in new file mode 100644 index 000000000..265fb4be1 --- /dev/null +++ b/buildroot/boot/vexpress-firmware/Config.in @@ -0,0 +1,8 @@ +config BR2_TARGET_VEXPRESS_FIRMWARE + bool "vexpress-firmware" + depends on BR2_aarch64 + help + Versatile Express firmware from ARM, with Linaro mods last + change. + + https://git.linaro.org/arm/vexpress-firmware.git diff --git a/buildroot/boot/vexpress-firmware/vexpress-firmware.hash b/buildroot/boot/vexpress-firmware/vexpress-firmware.hash new file mode 100644 index 000000000..40f64c752 --- /dev/null +++ b/buildroot/boot/vexpress-firmware/vexpress-firmware.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 def599c86ab3606f7f67c0190e9b237fbc0cf934a951ffb1c5fb0c47d8a8f3d2 vexpress-firmware-901f81977c3b367a2e0bf3d6444be302822d97a3.tar.gz diff --git a/buildroot/boot/vexpress-firmware/vexpress-firmware.mk b/buildroot/boot/vexpress-firmware/vexpress-firmware.mk new file mode 100644 index 000000000..693a9cb86 --- /dev/null +++ b/buildroot/boot/vexpress-firmware/vexpress-firmware.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# vexpress-firmware +# +################################################################################ + +VEXPRESS_FIRMWARE_VERSION = 901f81977c3b367a2e0bf3d6444be302822d97a3 +VEXPRESS_FIRMWARE_SITE = https://git.linaro.org/arm/vexpress-firmware.git +VEXPRESS_FIRMWARE_SITE_METHOD = git +# The only available license files are in PDF and RTF formats, and we +# support only plain text. +VEXPRESS_FIRMWARE_LICENSE = ARM EULA + +VEXPRESS_FIRMWARE_INSTALL_IMAGES = YES + +define VEXPRESS_FIRMWARE_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/SOFTWARE/bl30.bin $(BINARIES_DIR)/scp-fw.bin +endef + +$(eval $(generic-package)) diff --git a/buildroot/boot/xloader/Config.in b/buildroot/boot/xloader/Config.in deleted file mode 100644 index c411be478..000000000 --- a/buildroot/boot/xloader/Config.in +++ /dev/null @@ -1,15 +0,0 @@ -config BR2_TARGET_XLOADER - bool "X-loader" - depends on BR2_cortex_a8 || BR2_cortex_a9 - help - The x-loader bootloader. It is mainly used on OMAP-based - platforms. - -if BR2_TARGET_XLOADER -config BR2_TARGET_XLOADER_BOARDNAME - string "x-loader board name" - help - One of x-loader supported boards to be built. - This will be suffixed with _config to meet x-loader - standard naming. -endif diff --git a/buildroot/boot/xloader/xloader.mk b/buildroot/boot/xloader/xloader.mk deleted file mode 100644 index 90d5fa2fc..000000000 --- a/buildroot/boot/xloader/xloader.mk +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# -# x-loader -# -################################################################################ - -XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e -XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git -XLOADER_BOARD_NAME = $(call qstrip,$(BR2_TARGET_XLOADER_BOARDNAME)) - -XLOADER_LICENSE = GPLv2+ -XLOADER_LICENSE_FILES = README - -XLOADER_INSTALL_IMAGES = YES - -define XLOADER_BUILD_CMDS - $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) $(XLOADER_BOARD_NAME)_config - $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all - $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) ift -endef - -define XLOADER_INSTALL_IMAGES_CMDS - $(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/ -endef - -$(eval $(generic-package)) - -ifeq ($(BR2_TARGET_XLOADER),y) -# we NEED a board name unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(XLOADER_BOARD_NAME),) -$(error NO x-loader board name set. Check your BR2_BOOT_XLOADER_BOARDNAME setting) -endif -endif - -endif diff --git a/buildroot/configs/aarch64_efi_defconfig b/buildroot/configs/aarch64_efi_defconfig new file mode 100644 index 000000000..2aab6e969 --- /dev/null +++ b/buildroot/configs/aarch64_efi_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_aarch64=y + +# Toolchain, required for eudev and grub +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +## Required tools to create bootable media +BR2_PACKAGE_HOST_GENIMAGE=y + +# Bootloader +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_ARM64_EFI=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/aarch64-efi/post-image.sh support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/aarch64-efi/genimage-efi.cfg" + +# Linux headers same as kernel, a 4.18 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.10" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Host tools for genimage +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/acmesystems_aria_g25_128mb_defconfig b/buildroot/configs/acmesystems_aria_g25_128mb_defconfig new file mode 100644 index 000000000..cf62b5b72 --- /dev/null +++ b/buildroot/configs/acmesystems_aria_g25_128mb_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Kernel headers +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# System configuration +BR2_TARGET_GENERIC_ISSUE="Welcome to Aria-G25 Buildroot" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/aria-g25/genimage.cfg" + +# Kernel configuration +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-ariag25" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Root filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# AT91bootstrap bootloader +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="aria-128m" + +# Tools to build sdcard.img +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/acmesystems_aria_g25_256mb_defconfig b/buildroot/configs/acmesystems_aria_g25_256mb_defconfig new file mode 100644 index 000000000..496ccd685 --- /dev/null +++ b/buildroot/configs/acmesystems_aria_g25_256mb_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Kernel headers +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# System configuration +BR2_TARGET_GENERIC_ISSUE="Welcome to Aria-G25 Buildroot" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/aria-g25/genimage.cfg" + +# Kernel configuration +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-ariag25" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Root filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# AT91bootstrap bootloader +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="aria-256m" + +# Tools to build sdcard.img +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/acmesystems_arietta_g25_128mb_defconfig b/buildroot/configs/acmesystems_arietta_g25_128mb_defconfig new file mode 100644 index 000000000..17ef7e757 --- /dev/null +++ b/buildroot/configs/acmesystems_arietta_g25_128mb_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Kernel headers +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# System configuration +BR2_TARGET_GENERIC_ISSUE="Welcome to Arietta-G25 Buildroot" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/arietta-g25/genimage.cfg" + +# Kernel configuration +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-ariettag25" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Root filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# AT91bootstrap bootloader +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="arietta-128m" + +# Tools to build sdcard.img +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/acmesystems_arietta_g25_256mb_defconfig b/buildroot/configs/acmesystems_arietta_g25_256mb_defconfig new file mode 100644 index 000000000..aa0236bbb --- /dev/null +++ b/buildroot/configs/acmesystems_arietta_g25_256mb_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Kernel headers +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# System configuration +BR2_TARGET_GENERIC_ISSUE="Welcome to Arietta-G25 Buildroot" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/arietta-g25/genimage.cfg" + +# Kernel configuration +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-ariettag25" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Root filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# AT91bootstrap bootloader +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="arietta-256m" + +# Tools to build sdcard.img +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/altera_sockit_defconfig b/buildroot/configs/altera_sockit_defconfig deleted file mode 100644 index d27b96bc7..000000000 --- a/buildroot/configs/altera_sockit_defconfig +++ /dev/null @@ -1,37 +0,0 @@ -BR2_arm=y -BR2_cortex_a9=y - -BR2_ARM_EABIHF=y -BR2_ARM_ENABLE_NEON=y -BR2_ARM_FPU_NEON=y -BR2_ARM_INSTRUCTIONS_THUMB2=y - -# Lock to 3.13 headers -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.13.5" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13=y - -BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600=y -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/altera/sockit/post-image.sh" - -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.rocketboards.org/linux-socfpga.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_socfpga-3.13_14.02.02" -BR2_LINUX_KERNEL_DEFCONFIG="socfpga" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="socfpga_cyclone5_sockit" - -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_3=y - -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="socfpga_cyclone5" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.rocketboards.org/u-boot-socfpga.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_acds13.0sp1" -BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/altera/sockit" -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" diff --git a/buildroot/configs/amarula_a64_relic_defconfig b/buildroot/configs/amarula_a64_relic_defconfig new file mode 100644 index 000000000..304a3ef82 --- /dev/null +++ b/buildroot/configs/amarula_a64_relic_defconfig @@ -0,0 +1,63 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.17 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="amarula_a64_relic" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,amarula,linux-amarula,v1.0a)/linux-amarula_v1.0a.tar.gz" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-amarula-relic" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_ANDROID_TOOLS=y +BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/amarula/a64-relic/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/amarula/a64-relic/post-build.sh" +BR2_ROOTFS_OVERLAY="board/amarula/a64-relic/rootfs_overlay" + +# wireless firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y diff --git a/buildroot/configs/amarula_vyasa_rk3288_defconfig b/buildroot/configs/amarula_vyasa_rk3288_defconfig new file mode 100644 index 000000000..760ad3f9f --- /dev/null +++ b/buildroot/configs/amarula_vyasa_rk3288_defconfig @@ -0,0 +1,47 @@ +# Architecture +BR2_arm=y +BR2_cortex_a17=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="vyasa-rk3288" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin tpl/u-boot-tpl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="multi_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x02000000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-vyasa" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/amarula/vyasa/linux_gmac.fragment" + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="vyasa-rk3288" +BR2_TARGET_GENERIC_ISSUE="Welcome to VYASA RK3288!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="512M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/amarula/vyasa/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/amarula/vyasa/post-build.sh" +BR2_GLOBAL_PATCH_DIR="board/amarula/vyasa/patches/" diff --git a/buildroot/configs/andes_ae3xx_defconfig b/buildroot/configs/andes_ae3xx_defconfig new file mode 100644 index 000000000..52634caa5 --- /dev/null +++ b/buildroot/configs/andes_ae3xx_defconfig @@ -0,0 +1,10 @@ +BR2_nds32=y +BR2_GLOBAL_PATCH_DIR="board/andes/patches/" +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_ANDES_NDS32=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/andes/ae3xx/ae3xx.fragment" +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/buildroot/configs/arcturus_ucls1012a_defconfig b/buildroot/configs/arcturus_ucls1012a_defconfig new file mode 100644 index 000000000..fd33ebf1f --- /dev/null +++ b/buildroot/configs/arcturus_ucls1012a_defconfig @@ -0,0 +1,36 @@ +# Architecture +BR2_aarch64=y + +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y + +# System settings +BR2_TARGET_GENERIC_HOSTNAME="ucls1012a" +BR2_TARGET_GENERIC_ISSUE="Welcome to uCLS1012A-SOM" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_OVERLAY="board/arcturus/aarch64-ucls1012a/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/arcturus/aarch64-ucls1012a/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/arcturus/aarch64-ucls1012a/post-image.sh" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-kernel,v.20.31)/linux-v.20.31.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="ucls1012a" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="arcturus/arc-ucls1012a" + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y + +# U-boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCLS1012A-uboot,v.20.31)/uboot-v.20.31.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="UCLS1012A_QSPI128" + +# Tools +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/arcturus_ucp1020_defconfig b/buildroot/configs/arcturus_ucp1020_defconfig new file mode 100644 index 000000000..8b90f4475 --- /dev/null +++ b/buildroot/configs/arcturus_ucp1020_defconfig @@ -0,0 +1,30 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_8548=y + +# Linux headers same as kernel, a 4.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y + +# System settings +BR2_TARGET_GENERIC_HOSTNAME="UCP1020" +BR2_TARGET_GENERIC_ISSUE="Welcome to Arcturus uCP1020 System on Module" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_SYSTEM_DHCP="eth0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCP1020-kernel,v20190618)/linux-v20190618.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="ucp1020" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="ucp1020" + +# Filesystem +BR2_TARGET_ROOTFS_JFFS2=y + +# U-boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,ArcturusNetworks,uCP1020-uboot,v20190618)/uboot-v20190618.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="UCP1020" diff --git a/buildroot/configs/arm_foundationv8_defconfig b/buildroot/configs/arm_foundationv8_defconfig index 228079200..ea19f3550 100644 --- a/buildroot/configs/arm_foundationv8_defconfig +++ b/buildroot/configs/arm_foundationv8_defconfig @@ -1,17 +1,15 @@ BR2_aarch64=y -BR2_TOOLCHAIN_EXTERNAL=y +# Linux headers same as kernel, a 4.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.13.6" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(LINUX_DIR)/arch/arm64/configs/defconfig" -BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y -BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.3" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="foundation-v8" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="arm/foundation-v8" BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_BOOT_WRAPPER_AARCH64=y -BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS="foundation-v8" +BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS="arm/foundation-v8" BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS="root=/dev/vda consolelog=9 console=ttyAMA0 rw" diff --git a/buildroot/configs/arm_juno_defconfig b/buildroot/configs/arm_juno_defconfig new file mode 100644 index 000000000..583298677 --- /dev/null +++ b/buildroot/configs/arm_juno_defconfig @@ -0,0 +1,23 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y +BR2_TARGET_GENERIC_HOSTNAME="juno-buildroot" +BR2_TARGET_GENERIC_ISSUE="Welcome to SNPS Juno by Buildroot" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/arm/juno/linux-juno-defconfig" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="arm/juno arm/juno-r1 arm/juno-r2" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v1.4" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="juno" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="vexpress_aemv8a_juno" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.03" +BR2_TARGET_VEXPRESS_FIRMWARE=y diff --git a/buildroot/configs/armadeus_apf27_defconfig b/buildroot/configs/armadeus_apf27_defconfig index 7e33a41f1..457a14b02 100644 --- a/buildroot/configs/armadeus_apf27_defconfig +++ b/buildroot/configs/armadeus_apf27_defconfig @@ -2,15 +2,12 @@ BR2_arm=y BR2_arm926t=y -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.13.2" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13=y +# Linux headers same as kernel, a 4.12 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_12=y # System BR2_TARGET_GENERIC_HOSTNAME="apf27" BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" # Filesystem @@ -21,13 +18,17 @@ BR2_TARGET_ROOTFS_UBI=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.13.2" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.12.4" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf27/linux-3.13.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf27/linux-4.12.config" +BR2_LINUX_KERNEL_UIMAGE=y BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xA0008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx27-apf27dev" # U-boot BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="apf27" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.09" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="apf27" diff --git a/buildroot/configs/armadeus_apf28_defconfig b/buildroot/configs/armadeus_apf28_defconfig index 95d56a5ed..56351ebde 100644 --- a/buildroot/configs/armadeus_apf28_defconfig +++ b/buildroot/configs/armadeus_apf28_defconfig @@ -2,23 +2,20 @@ BR2_arm=y BR2_arm926t=y -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.7" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y +# Linux headers same as kernel, a 4.9 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y # System BR2_TARGET_GENERIC_HOSTNAME="apf28" BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.7" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf28/linux-3.12.config" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.172" +BR2_LINUX_KERNEL_DEFCONFIG="mxs" +BR2_LINUX_KERNEL_UIMAGE=y BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx28-apf28dev" diff --git a/buildroot/configs/armadeus_apf51_defconfig b/buildroot/configs/armadeus_apf51_defconfig index 7e932fba0..26b6a447d 100644 --- a/buildroot/configs/armadeus_apf51_defconfig +++ b/buildroot/configs/armadeus_apf51_defconfig @@ -2,10 +2,8 @@ BR2_arm=y BR2_cortex_a8=y -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.6" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y +# Linux headers same as kernel, a 3.12 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y # System BR2_TARGET_GENERIC_HOSTNAME="apf51" @@ -15,9 +13,10 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc2" # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.6" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.186" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf51/linux-3.12.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/armadeus/apf51/linux-4.4.config" +BR2_LINUX_KERNEL_UIMAGE=y BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x90008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx51-apf51dev" diff --git a/buildroot/configs/armadeus_apf9328_defconfig b/buildroot/configs/armadeus_apf9328_defconfig deleted file mode 100644 index 36001995b..000000000 --- a/buildroot/configs/armadeus_apf9328_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm920t=y - -# Toolchain -BR2_PACKAGE_GDB=y -BR2_PACKAGE_HOST_GDB=y -BR2_ENABLE_LOCALE_PURGE=y -BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y -BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y -BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y -BR2_TOOLCHAIN_BUILDROOT_LOCALE=y -BR2_TOOLCHAIN_BUILDROOT_CXX=y - - -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.17" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17=y - -# System -BR2_TARGET_GENERIC_HOSTNAME="apf9328" -BR2_TARGET_GENERIC_ISSUE="Welcome to Armadeus development platform !" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y -BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" - -# Filesystem -BR2_TARGET_ROOTFS_JFFS2=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.17.2" -BR2_LINUX_KERNEL_DEFCONFIG="imx_v4_v5" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x08008000" diff --git a/buildroot/configs/asus_tinker_rk3288_defconfig b/buildroot/configs/asus_tinker_rk3288_defconfig new file mode 100644 index 000000000..e95a19a75 --- /dev/null +++ b/buildroot/configs/asus_tinker_rk3288_defconfig @@ -0,0 +1,46 @@ +# Architecture +BR2_arm=y +BR2_cortex_a17=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="tinker-rk3288" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="multi_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x02000000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-tinker" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="tinker-rk3288" +BR2_TARGET_GENERIC_ISSUE="Welcome to TINKER RK3288!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="512M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/asus/tinker/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/asus/tinker/post-build.sh" +BR2_GLOBAL_PATCH_DIR="board/asus/tinker/patches/" diff --git a/buildroot/configs/at91rm9200df_defconfig b/buildroot/configs/at91rm9200df_defconfig deleted file mode 100644 index 5994f43e9..000000000 --- a/buildroot/configs/at91rm9200df_defconfig +++ /dev/null @@ -1,30 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm920t=y - -# Filesystem -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056=y -BR2_TARGET_ROOTFS_JFFS2_PAGESIZE=0x420 -BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x2100 -BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y -BR2_TARGET_ROOTFS_JFFS2_LE=y - -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="2.6.38.8" -BR2_DEFAULT_KERNEL_HEADERS="2.6.38.8" - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91rm9200ek" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.06" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.38-at91.patch.gz" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="at91rm9200ek" diff --git a/buildroot/configs/at91sam9260dfc_defconfig b/buildroot/configs/at91sam9260dfc_defconfig deleted file mode 100644 index 20389f3ff..000000000 --- a/buildroot/configs/at91sam9260dfc_defconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Host utilities -# -BR2_PACKAGE_HOST_SAM_BA=y - -# First stage bootloader -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek" - -# Second stage bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9260ek_dataflash_cs0" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9260_9g20" diff --git a/buildroot/configs/at91sam9260eknf_defconfig b/buildroot/configs/at91sam9260eknf_defconfig index dba0cd5ea..807d0294e 100644 --- a/buildroot/configs/at91sam9260eknf_defconfig +++ b/buildroot/configs/at91sam9260eknf_defconfig @@ -2,32 +2,32 @@ BR2_arm=y BR2_arm926t=y -# Toolchain -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.9.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y +# Linux headers same as kernel, a 4.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8=y -# System -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y - -# Packages -BR2_PACKAGE_HOST_SAM_BA=y +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.8.6" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9260ek" # Filesystem BR2_TARGET_ROOTFS_UBIFS=y BR2_TARGET_ROOTFS_UBI=y # Bootloaders -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9260ek" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="at91sam9260ek" +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.10" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9260eknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9260ek_nandflash" -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/atmel/at91sam9260ek/linux-3.9.config" -BR2_LINUX_KERNEL_ZIMAGE=y +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9261ek_defconfig b/buildroot/configs/at91sam9261ek_defconfig deleted file mode 100644 index 0824a00fa..000000000 --- a/buildroot/configs/at91sam9261ek_defconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Host utilities -# -BR2_PACKAGE_HOST_SAM_BA=y - -# First stage bootloader -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9261ek" - -# Second stage bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9261ek_dataflash_cs0" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9261_9g10" diff --git a/buildroot/configs/at91sam9263ek_defconfig b/buildroot/configs/at91sam9263ek_defconfig deleted file mode 100644 index 208e0574d..000000000 --- a/buildroot/configs/at91sam9263ek_defconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Host utilities -# -BR2_PACKAGE_HOST_SAM_BA=y - -# First stage bootloader -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9263ek" - -# Second stage bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9263ek_dataflash_cs0" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9263" diff --git a/buildroot/configs/at91sam9g20dfc_defconfig b/buildroot/configs/at91sam9g20dfc_defconfig index 1d346c2f9..7511c96fe 100644 --- a/buildroot/configs/at91sam9g20dfc_defconfig +++ b/buildroot/configs/at91sam9g20dfc_defconfig @@ -2,30 +2,38 @@ BR2_arm=y BR2_arm926t=y -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.1.6" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1=y - -# Host utilities -# -BR2_PACKAGE_HOST_SAM_BA=y - -# First stage bootloader -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9g20ek" -BR2_TARGET_AT91BOOTSTRAP_DATAFLASHCARD=y - -# Second stage bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9g20ek_nandflash" +# Linux headers same as kernel, a 4.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.1.6" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g20ek" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.8.6" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g20ek" # Filesystem BR2_TARGET_ROOTFS_TAR=y +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=512 +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f800 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047 + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.10" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9g20eknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9g20ek_nandflash" + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9g45m10ek_defconfig b/buildroot/configs/at91sam9g45m10ek_defconfig index c958859df..c598527f9 100644 --- a/buildroot/configs/at91sam9g45m10ek_defconfig +++ b/buildroot/configs/at91sam9g45m10ek_defconfig @@ -1,9 +1,34 @@ +# Architecture BR2_arm=y BR2_arm926t=y -BR2_PACKAGE_HOST_SAM_BA=y -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9m10g45ek" -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="at91sam9m10g45ek_nandflash" + +# Linux headers same as kernel, a 4.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8=y + +# Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g45" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.8.6" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9m10g45ek" + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047 +BR2_TARGET_ROOTFS_UBI=y + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.10" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9m10g45eknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9m10g45ek_nandflash" + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9rlek_defconfig b/buildroot/configs/at91sam9rlek_defconfig new file mode 100644 index 000000000..ba3a94c08 --- /dev/null +++ b/buildroot/configs/at91sam9rlek_defconfig @@ -0,0 +1,34 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Linux headers same as kernel, a 4.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.8.6" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9rlek" + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047 +BR2_TARGET_ROOTFS_UBI=y + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.10" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9rleknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9rlek_nandflash" + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9x5ek_defconfig b/buildroot/configs/at91sam9x5ek_defconfig new file mode 100644 index 000000000..d544e277a --- /dev/null +++ b/buildroot/configs/at91sam9x5ek_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_arm926t=y +# Linux headers same as kernel, a 4.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.1)/linux-linux4sam_6.1.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9x5eknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux4sam/u-boot-at91.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="linux4sam_6.1" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9x5ek_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9x5ek_dev_defconfig b/buildroot/configs/at91sam9x5ek_dev_defconfig new file mode 100644 index 000000000..5f777fbc7 --- /dev/null +++ b/buildroot/configs/at91sam9x5ek_dev_defconfig @@ -0,0 +1,98 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.1)/linux-linux4sam_6.1.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9x5eknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux4sam/u-boot-at91.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="linux4sam_6.1" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9x5ek_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/at91sam9x5ek_mmc_defconfig b/buildroot/configs/at91sam9x5ek_mmc_defconfig new file mode 100644 index 000000000..633ca8e1c --- /dev/null +++ b/buildroot/configs/at91sam9x5ek_mmc_defconfig @@ -0,0 +1,46 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# Creation of the SD card image +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/at91sam9x5ek_mmc/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.1)/linux-linux4sam_6.1.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9x5eksd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux4sam/u-boot-at91.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="linux4sam_6.1" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9x5ek_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/atmel/at91sam9x5ek_mmc/uboot-env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x4000" + +# Host packages +# Needed to generate the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/at91sam9x5ek_mmc_dev_defconfig b/buildroot/configs/at91sam9x5ek_mmc_dev_defconfig new file mode 100644 index 000000000..e8246c8d5 --- /dev/null +++ b/buildroot/configs/at91sam9x5ek_mmc_dev_defconfig @@ -0,0 +1,106 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +# Creation of the SD card image +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/at91sam9x5ek_mmc/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.1)/linux-linux4sam_6.1.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="at91_dt" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL="https://github.com/linux4sam/at91bootstrap.git" +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="v3.8.13" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9x5eksd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux4sam/u-boot-at91.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="linux4sam_6.1" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="at91sam9x5ek_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/atmel/at91sam9x5ek_mmc/uboot-env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x4000" + +# Host packages +# Needed to generate the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d27_som1_ek_mmc_dev_defconfig b/buildroot/configs/atmel_sama5d27_som1_ek_mmc_dev_defconfig new file mode 100644 index 000000000..b608bac0c --- /dev/null +++ b/buildroot/configs/atmel_sama5d27_som1_ek_mmc_dev_defconfig @@ -0,0 +1,84 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_PTHREAD_DEBUG=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d27_som1_ek_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam-2020.04)/linux-at91-linux4sam-2020.04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d27_som1_ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_RNG_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.2)/at91bootstrap3-v3.9.2.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d27_som1_eksd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam-2020.04)/u-boot-at91-linux4sam-2020.04.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d27_som1_ek_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d2_xplained_mmc_defconfig b/buildroot/configs/atmel_sama5d2_xplained_mmc_defconfig new file mode 100644 index 000000000..2c73cc4c2 --- /dev/null +++ b/buildroot/configs/atmel_sama5d2_xplained_mmc_defconfig @@ -0,0 +1,30 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d2_xplained_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d2_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d2_xplainedsd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d2_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d2_xplained_mmc_dev_defconfig b/buildroot/configs/atmel_sama5d2_xplained_mmc_dev_defconfig new file mode 100644 index 000000000..6f641280c --- /dev/null +++ b/buildroot/configs/atmel_sama5d2_xplained_mmc_dev_defconfig @@ -0,0 +1,104 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +# Creation of the SD card image +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d2_xplained_mmc/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d2_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d2_xplainedsd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d2_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +# Needed to generate the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d3_xplained_defconfig b/buildroot/configs/atmel_sama5d3_xplained_defconfig new file mode 100644 index 000000000..65304a2e4 --- /dev/null +++ b/buildroot/configs/atmel_sama5d3_xplained_defconfig @@ -0,0 +1,27 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainednf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d3_xplained_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/atmel_sama5d3_xplained_dev_defconfig b/buildroot/configs/atmel_sama5d3_xplained_dev_defconfig new file mode 100644 index 000000000..28efe4cc8 --- /dev/null +++ b/buildroot/configs/atmel_sama5d3_xplained_dev_defconfig @@ -0,0 +1,98 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainednf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d3_xplained_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/atmel_sama5d3_xplained_mmc_defconfig b/buildroot/configs/atmel_sama5d3_xplained_mmc_defconfig new file mode 100644 index 000000000..3fd5f1dde --- /dev/null +++ b/buildroot/configs/atmel_sama5d3_xplained_mmc_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d3_xplained_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainedsd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d3_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d3_xplained_mmc_dev_defconfig b/buildroot/configs/atmel_sama5d3_xplained_mmc_dev_defconfig new file mode 100644 index 000000000..1f1881f8b --- /dev/null +++ b/buildroot/configs/atmel_sama5d3_xplained_mmc_dev_defconfig @@ -0,0 +1,103 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +# Creation of the SD card image +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d3_xplained_mmc/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainedsd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d3_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +# Needed to generate the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d3xek_defconfig b/buildroot/configs/atmel_sama5d3xek_defconfig new file mode 100644 index 000000000..63417eae7 --- /dev/null +++ b/buildroot/configs/atmel_sama5d3xek_defconfig @@ -0,0 +1,38 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_5.8)/linux-linux4sam_5.8.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sama5d31ek sama5d33ek sama5d34ek sama5d35ek sama5d36ek" + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048 + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.8.10)/at91bootstrap3-v3.8.10.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3xeknf_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_5.8)/u-boot-at91-linux4sam_5.8.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d3xek_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/atmel_sama5d4_xplained_defconfig b/buildroot/configs/atmel_sama5d4_xplained_defconfig new file mode 100644 index 000000000..319f31956 --- /dev/null +++ b/buildroot/configs/atmel_sama5d4_xplained_defconfig @@ -0,0 +1,31 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3e000 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2082 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=0 +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4_xplainednf_uboot_secure" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d4_xplained_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/atmel_sama5d4_xplained_dev_defconfig b/buildroot/configs/atmel_sama5d4_xplained_dev_defconfig new file mode 100644 index 000000000..71568f749 --- /dev/null +++ b/buildroot/configs/atmel_sama5d4_xplained_dev_defconfig @@ -0,0 +1,102 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_UBIFS=y +BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3e000 +BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000 +BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2082 +BR2_TARGET_ROOTFS_UBI=y +BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000 +BR2_TARGET_ROOTFS_UBI_SUBSIZE=0 + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4_xplainednf_uboot_secure" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d4_xplained_nandflash" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +BR2_PACKAGE_HOST_SAM_BA=y diff --git a/buildroot/configs/atmel_sama5d4_xplained_mmc_defconfig b/buildroot/configs/atmel_sama5d4_xplained_mmc_defconfig new file mode 100644 index 000000000..ed294c35a --- /dev/null +++ b/buildroot/configs/atmel_sama5d4_xplained_mmc_defconfig @@ -0,0 +1,30 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d4_xplained_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4_xplainedsd_uboot_secure" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d4_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_sama5d4_xplained_mmc_dev_defconfig b/buildroot/configs/atmel_sama5d4_xplained_mmc_dev_defconfig new file mode 100644 index 000000000..93a5bd929 --- /dev/null +++ b/buildroot/configs/atmel_sama5d4_xplained_mmc_dev_defconfig @@ -0,0 +1,104 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Needed for gdb +BR2_PTHREAD_DEBUG=y +# Needed for some packages +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System Configuration +# Needed for usb-utils +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +# Creation of the SD card image +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d4_xplained_mmc/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4_xplained" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Packages +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + +# Bootloaders +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap3-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4_xplainedsd_uboot_secure" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d4_xplained_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# Host packages +# Needed to generate the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/atmel_xplained_defconfig b/buildroot/configs/atmel_xplained_defconfig deleted file mode 100644 index 8c0648951..000000000 --- a/buildroot/configs/atmel_xplained_defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# Architecture -BR2_arm=y -BR2_cortex_a5=y - -# Toolchain configuration -BR2_ARM_EABIHF=y -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.15" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y - -# Kernel configuration -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.15" -BR2_LINUX_KERNEL_DEFCONFIG="sama5" -BR2_LINUX_KERNEL_ZIMAGE=y -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained" - -# First stage bootloader -BR2_TARGET_AT91BOOTSTRAP3=y -BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainedsd_uboot" - -# Second stage bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="sama5d3_xplained_mmc" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2014.04" diff --git a/buildroot/configs/atngw100_defconfig b/buildroot/configs/atngw100_defconfig deleted file mode 100644 index d410f5b5a..000000000 --- a/buildroot/configs/atngw100_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -# AVR32 is deprecated -BR2_DEPRECATED=y - -# Architecture -BR2_avr32=y - -# Lock down kernel headers version, to match the kernel version used -# below. -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.9.11" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y - -# Filesystems -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_FLASH_128=y -BR2_TARGET_ROOTFS_JFFS2_PAGESIZE=0x1000 -BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x20000 -BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y -BR2_TARGET_ROOTFS_JFFS2_BE=y -BR2_TARGET_ROOTFS_TAR=y -BR2_TARGET_ROOTFS_TAR_NONE=y - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="atngw100" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.09" - -# Kernel. Locked to 3.9.x, because 3.10.x fails to build with -# relocation truncated to fit: R_AVR32_16N_PCREL against symbol -# `_ctype' -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.11" -BR2_LINUX_KERNEL_DEFCONFIG="atngw100" diff --git a/buildroot/configs/atstk100x_defconfig b/buildroot/configs/atstk100x_defconfig deleted file mode 100644 index 0e17e36dc..000000000 --- a/buildroot/configs/atstk100x_defconfig +++ /dev/null @@ -1,26 +0,0 @@ -# AVR32 is deprecated -BR2_DEPRECATED=y - -# Architecture -BR2_avr32=y - -# Lock to same version as kernel -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.9.11" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y - -# U-Boot -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="atstk1002" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2010.09" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.11" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="atstk1002" - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y diff --git a/buildroot/configs/bananapi_m1_defconfig b/buildroot/configs/bananapi_m1_defconfig new file mode 100644 index 000000000..558ef3d4a --- /dev/null +++ b/buildroot/configs/bananapi_m1_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M1" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m1/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.12" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-bananapi" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Bananapi" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m1/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/bananapi_m2_plus_defconfig b/buildroot/configs/bananapi_m2_plus_defconfig new file mode 100644 index 000000000..0e2d91d21 --- /dev/null +++ b/buildroot/configs/bananapi_m2_plus_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Plus" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/sinovoip/m2-plus/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-bananapi-m2-plus" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Sinovoip_BPI_M2_Plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/sinovoip/m2-plus/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/bananapi_m2_ultra_defconfig b/buildroot/configs/bananapi_m2_ultra_defconfig new file mode 100644 index 000000000..bc1d31a60 --- /dev/null +++ b/buildroot/configs/bananapi_m2_ultra_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M2 Ultra" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-ultra/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.12" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-r40-bananapi-m2-ultra" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="bananapi_m2_berry" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m2-ultra/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/bananapi_m2_zero_defconfig b/buildroot/configs/bananapi_m2_zero_defconfig new file mode 100644 index 000000000..64f741d3c --- /dev/null +++ b/buildroot/configs/bananapi_m2_zero_defconfig @@ -0,0 +1,30 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Bananapi M2 Zero" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m2-zero/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.7" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-bananapi-m2-zero" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="bananapi_m2_zero" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m2-zero/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/bananapi_m64_defconfig b/buildroot/configs/bananapi_m64_defconfig new file mode 100644 index 000000000..5e56eaed8 --- /dev/null +++ b/buildroot/configs/bananapi_m64_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="bananapi_m64" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/bananapi/bananapi-m64/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-bananapi-m64" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Bananapi M64" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/bananapi/bananapi-m64/genimage.cfg" diff --git a/buildroot/configs/bananapro_defconfig b/buildroot/configs/bananapro_defconfig new file mode 100644 index 000000000..e87d9ba63 --- /dev/null +++ b/buildroot/configs/bananapro_defconfig @@ -0,0 +1,75 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_GLOBAL_PATCH_DIR="board/lemaker/bananapro/patches" +BR2_ARM_EABIHF=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Toolchain +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="bananapro" +BR2_TARGET_GENERIC_ISSUE="Welcome to Banana Pro!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_OVERLAY="board/lemaker/bananapro/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/lemaker/bananapro/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lemaker/bananapro/post-image.sh" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.7" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lemaker/bananapro/linux-wifi.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-bananapro" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Bananapro" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" + +# Wifi firmware for brcm43362 +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y + +# Audio +BR2_PACKAGE_ALSA_UTILS=y +# BR2_PACKAGE_ALSA_UTILS_ALSAMIXER is not set +BR2_PACKAGE_ALSA_UTILS_AMIXER=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# Wireless packages +BR2_PACKAGE_IW=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y + +# Host tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/beagleboardx15_defconfig b/buildroot/configs/beagleboardx15_defconfig new file mode 100644 index 000000000..039a07b11 --- /dev/null +++ b/buildroot/configs/beagleboardx15_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a15=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beagleboardx15/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am57xx-beagle-x15 am57xx-beagle-x15-revb1" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.11" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am57xx_evm" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/beaglebone_defconfig b/buildroot/configs/beaglebone_defconfig index ddb583c8f..9a4be13ec 100644 --- a/buildroot/configs/beaglebone_defconfig +++ b/buildroot/configs/beaglebone_defconfig @@ -1,42 +1,31 @@ -# architecture BR2_arm=y BR2_cortex_a8=y -BR2_ARM_EABIHF=y - -# system -BR2_TARGET_GENERIC_HOSTNAME="beaglebone" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyO0" -# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh" - -# filesystem -BR2_PACKAGE_AM33X_CM3=y +BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglebone/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglebone/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.19.79-ti-r30)/linux-4.19.79-ti-r30.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk am335x-boneblue" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.10" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y - -# bootloader +BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="am335x_evm" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="MLO" - -# kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="7f280334068b7c875ade51f8f3921ab311f0c824" -BR2_LINUX_KERNEL_PATCH="board/beaglebone/patches/linux/" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/beaglebone/linux-3.12.config" -BR2_LINUX_KERNEL_ZIMAGE=y -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-bone am335x-boneblack" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/beaglebone_qt5_defconfig b/buildroot/configs/beaglebone_qt5_defconfig new file mode 100644 index 000000000..5f7b911e5 --- /dev/null +++ b/buildroot/configs/beaglebone_qt5_defconfig @@ -0,0 +1,50 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_GLOBAL_PATCH_DIR="board/beaglebone/patches" +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beaglebone/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beaglebone/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.19.79-ti-r30)/linux-4.19.79-ti-r30.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/beaglebone/linux-sgx.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk am335x-boneblue" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FBV=y +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_EXAMPLES=y +BR2_PACKAGE_QT5BASE_EGLFS=y +BR2_PACKAGE_QT5BASE_DEFAULT_QPA="wayland" +BR2_PACKAGE_QT5QUICKCONTROLS=y +BR2_PACKAGE_QT5WAYLAND=y +BR2_PACKAGE_QT5WAYLAND_COMPOSITOR=y +BR2_PACKAGE_WESTON=y +BR2_PACKAGE_TI_SGX_DEMOS=y +BR2_PACKAGE_TI_SGX_KM=y +BR2_PACKAGE_TI_SGX_UM=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="250M" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am335x_evm" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/beagleboneai_defconfig b/buildroot/configs/beagleboneai_defconfig new file mode 100644 index 000000000..eb23cdf69 --- /dev/null +++ b/buildroot/configs/beagleboneai_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a15=y +BR2_GLOBAL_PATCH_DIR="board/beagleboneai/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beagleboneai/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beagleboneai/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,beagleboard,linux,4.14.108-ti-r117)/linux-4.14.108-ti-r117.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bb.org" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am5729-beagleboneai" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am57xx_evm" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/beelink_gs1_defconfig b/buildroot/configs/beelink_gs1_defconfig new file mode 100644 index 000000000..b461574a9 --- /dev/null +++ b/buildroot/configs/beelink_gs1_defconfig @@ -0,0 +1,44 @@ +# Architecture +BR2_aarch64=y +BR2_ARM_FPU_VFPV4=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Beelink GS1" +# MDEV is required to autoload the ethernet driver module +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/beelink/gs1/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/beelink/gs1/genimage.cfg" + +# Kernel Linux headers same as kernel, a 5.5 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_5=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.5.4" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h6-beelink-gs1" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.2" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_h6" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="beelink_gs1" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/calao_qil_a9260_defconfig b/buildroot/configs/calao_qil_a9260_defconfig deleted file mode 100644 index 05af114cf..000000000 --- a/buildroot/configs/calao_qil_a9260_defconfig +++ /dev/null @@ -1,22 +0,0 @@ -BR2_arm=y -BR2_arm926t=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4=y -BR2_PACKAGE_HOST_SAM_BA=y -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/qil-a9260/" -BR2_TARGET_AT91BOOTSTRAP_BOARD="qil_a9260" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/calao/qil-a9260/" -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="qil_a9260" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.4.7" -BR2_LINUX_KERNEL_PATCH="board/calao/qil-a9260/linux-3.4.7.patch" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/qil-a9260/linux-3.4.7.config" -BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/buildroot/configs/calao_snowball_defconfig b/buildroot/configs/calao_snowball_defconfig deleted file mode 100644 index 4c30a6b98..000000000 --- a/buildroot/configs/calao_snowball_defconfig +++ /dev/null @@ -1,23 +0,0 @@ -BR2_arm=y -BR2_cortex_a9=y -BR2_KERNEL_HEADERS_3_4=y -BR2_ARM_FPU_VFPV3D16=y -BR2_TOOLCHAIN_BUILDROOT_WCHAR=y -BR2_TOOLCHAIN_BUILDROOT_CXX=y -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA2" -BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y -BR2_PACKAGE_SNOWBALL_HDMISERVICE=y -BR2_PACKAGE_LIBNL=y -BR2_PACKAGE_SNOWBALL_INIT=y -BR2_PACKAGE_WPA_SUPPLICANT=y -BR2_TARGET_ROOTFS_TAR_GZIP=y -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="snowball" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/igloocommunity/igloo-kernel" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="stable-linux-ux500-3.4" -BR2_LINUX_KERNEL_PATCH="board/calao/snowball/" -BR2_LINUX_KERNEL_DEFCONFIG="u8500" -BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/buildroot/configs/calao_tny_a9g20_lpw_defconfig b/buildroot/configs/calao_tny_a9g20_lpw_defconfig deleted file mode 100644 index 6a719970d..000000000 --- a/buildroot/configs/calao_tny_a9g20_lpw_defconfig +++ /dev/null @@ -1,33 +0,0 @@ -# architecture -BR2_arm=y -BR2_arm926t=y - -# system -BR2_PACKAGE_HOST_SAM_BA=y -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y - -# filesystem -BR2_TARGET_ROOTFS_UBIFS=y - -# lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.9.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y - -# bootloaders -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/tny-a9g20-lpw/" -BR2_TARGET_AT91BOOTSTRAP_BOARD="tny_a9g20_lpw" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="tny_a9g20" - -# linux -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.4" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/tny-a9g20-lpw/linux-3.9.config" -BR2_LINUX_KERNEL_ZIMAGE=y -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="tny_a9g20" diff --git a/buildroot/configs/calao_usb_a9260_defconfig b/buildroot/configs/calao_usb_a9260_defconfig deleted file mode 100644 index 304dc5023..000000000 --- a/buildroot/configs/calao_usb_a9260_defconfig +++ /dev/null @@ -1,17 +0,0 @@ -BR2_arm=y -BR2_arm926t=y -BR2_PACKAGE_MTD=y -BR2_PACKAGE_HOST_SAM_BA=y -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9260" -BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9260" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9260" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9260/linux-3.7.4.config" -BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/buildroot/configs/calao_usb_a9263_defconfig b/buildroot/configs/calao_usb_a9263_defconfig deleted file mode 100644 index 8dc948a1d..000000000 --- a/buildroot/configs/calao_usb_a9263_defconfig +++ /dev/null @@ -1,16 +0,0 @@ -BR2_arm=y -BR2_arm926t=y -BR2_PACKAGE_HOST_SAM_BA=y -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9263/" -BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9263" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9263" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9263/linux-3.4.4.config" -BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/buildroot/configs/calao_usb_a9g20_lpw_defconfig b/buildroot/configs/calao_usb_a9g20_lpw_defconfig deleted file mode 100644 index cf114d9cd..000000000 --- a/buildroot/configs/calao_usb_a9g20_lpw_defconfig +++ /dev/null @@ -1,17 +0,0 @@ -BR2_arm=y -BR2_arm926t=y -BR2_PACKAGE_HOST_SAM_BA=y -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_AT91BOOTSTRAP=y -BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR="board/calao/usb-a9g20-lpw/" -BR2_TARGET_AT91BOOTSTRAP_BOARD="usb_a9g20_lpw" -BR2_TARGET_AT91BOOTSTRAP_NANDFLASH=y -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/calao/usb-a9g20-lpw/" -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="usb_a9g20" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.10" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/calao/usb-a9g20-lpw/linux-3.4.4.config" -BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/buildroot/configs/chromebook_snow_defconfig b/buildroot/configs/chromebook_snow_defconfig new file mode 100644 index 000000000..5558c101d --- /dev/null +++ b/buildroot/configs/chromebook_snow_defconfig @@ -0,0 +1,23 @@ +BR2_arm=y +BR2_cortex_a15=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y +BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_TARGET_GENERIC_GETTY_TERM="linux" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/chromebook/snow/sign.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/chromebook/snow/mksd.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15" +BR2_LINUX_KERNEL_PATCH="board/chromebook/snow/linux-4.15-dts-tpm.patch" +BR2_LINUX_KERNEL_DEFCONFIG="exynos" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/chromebook/snow/linux-4.15.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5250-snow" +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_PARTED=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y +BR2_PACKAGE_HOST_VBOOT_UTILS=y diff --git a/buildroot/configs/ci20_defconfig b/buildroot/configs/ci20_defconfig index a7b7622cd..076f21bdf 100644 --- a/buildroot/configs/ci20_defconfig +++ b/buildroot/configs/ci20_defconfig @@ -1,17 +1,36 @@ # architecture BR2_mipsel=y -BR2_mips_32r2=y +BR2_mips_xburst=y # BR2_MIPS_SOFT_FLOAT is not set +BR2_KERNEL_HEADERS_AS_KERNEL=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # system -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.0.8" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS4" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ci20/genimage.cfg" # kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/MIPS/CI20_linux.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ba11adc7ac8792b0eb7415a1cc9c0968604a6fac" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_DEFCONFIG="ci20" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# u-boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="ci20_mmc" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/ci20/uboot-env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="32768" + +# host +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/csky_gx6605s_defconfig b/buildroot/configs/csky_gx6605s_defconfig new file mode 100644 index 000000000..f1f9579dc --- /dev/null +++ b/buildroot/configs/csky_gx6605s_defconfig @@ -0,0 +1,19 @@ +# Architecture +BR2_csky=y +BR2_ck610=y + +# System +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck610.config.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/csky/gx6605s/gx6605s.dts" diff --git a/buildroot/configs/cubieboard2_defconfig b/buildroot/configs/cubieboard2_defconfig index f85760d51..fd50742d0 100644 --- a/buildroot/configs/cubieboard2_defconfig +++ b/buildroot/configs/cubieboard2_defconfig @@ -1,40 +1,31 @@ -# Architecture BR2_arm=y BR2_cortex_a7=y - -# System configuration +BR2_ARM_FPU_NEON_VFPV4=y +# Linux headers same as kernel, a 4.18 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y BR2_TARGET_GENERIC_HOSTNAME="Cubieboard2" -BR2_TARGET_GENERIC_ISSUE="Welcome to use Cubieboard!" -BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_ISSUE="Welcome to Cubieboard2!" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard/post-build.sh" - -# Additional tools -BR2_PACKAGE_HOST_SUNXI_TOOLS=y -BR2_PACKAGE_HOST_UBOOT_TOOLS=y -BR2_PACKAGE_SUNXI_TOOLS=y -BR2_PACKAGE_SUNXI_BOARDS=y -BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a20/cubieboard2.fex" - -# Kernel headers -BR2_KERNEL_HEADERS_3_4=y - -# Kernel +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard2/post-image.sh" BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux-sunxi/linux-sunxi.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="5dda5145c877335e17bd9ca48954841acc0f785a" -BR2_LINUX_KERNEL_VERSION="sunxi-3.4" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/cubietech/cubieboard/linux-cubieboard2.config" - -# Bootloaders +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.14" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-cubieboard2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="cubieboard2" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_VERSION="sunxi" -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux-sunxi/u-boot-sunxi.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="b4bca5e0651b460a4511582f07a935cb48f74948" -BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.09" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Cubieboard2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/cubietech/cubieboard2/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/cubieboard_defconfig b/buildroot/configs/cubieboard_defconfig deleted file mode 100644 index 1da019f21..000000000 --- a/buildroot/configs/cubieboard_defconfig +++ /dev/null @@ -1,39 +0,0 @@ -# Architecture -BR2_arm=y -BR2_cortex_a8=y - -# System configuration -BR2_TARGET_GENERIC_HOSTNAME="Cubieboard" -BR2_TARGET_GENERIC_ISSUE="Welcome to use Cubieboard!" -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard/post-build.sh" - -# Additional tools -BR2_PACKAGE_HOST_SUNXI_TOOLS=y -BR2_PACKAGE_HOST_UBOOT_TOOLS=y -BR2_PACKAGE_SUNXI_TOOLS=y -BR2_PACKAGE_SUNXI_BOARDS=y -BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a10/cubieboard.fex" - -# Kernel headers -BR2_KERNEL_HEADERS_3_4=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux-sunxi/linux-sunxi.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="274a66a7bfcbaabb88d63e4eba161965383cc416" -BR2_LINUX_KERNEL_VERSION="sunxi-3.4" -BR2_LINUX_KERNEL_DEFCONFIG="sun4i" - -# Bootloaders -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="cubieboard" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_VERSION="sunxi" -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/linux-sunxi/u-boot-sunxi.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="1a8ac55429f7f8cc9f100c1cf2dc0195cf81e76f" -BR2_TARGET_UBOOT_FORMAT_BIN=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" diff --git a/buildroot/configs/engicam_imx6qdl_icore_defconfig b/buildroot/configs/engicam_imx6qdl_icore_defconfig new file mode 100644 index 000000000..d8a51c7ab --- /dev/null +++ b/buildroot/configs/engicam_imx6qdl_icore_defconfig @@ -0,0 +1,43 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx6qdl_icore_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-icore imx6q-icore imx6q-icore-ofcap10 imx6q-icore-ofcap12" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Engicam i.CoreM6 Quad/Dual/DualLite/Solo" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/engicam/icorem6/genimage.cfg" diff --git a/buildroot/configs/engicam_imx6qdl_icore_qt5_defconfig b/buildroot/configs/engicam_imx6qdl_icore_qt5_defconfig new file mode 100644 index 000000000..b893c6aea --- /dev/null +++ b/buildroot/configs/engicam_imx6qdl_icore_qt5_defconfig @@ -0,0 +1,82 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 4.13 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx6qdl_icore_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-icore imx6q-icore imx6q-icore-ofcap10 imx6q-icore-ofcap12" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/engicam/icorem6/linux_qt5.fragment" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Engicam i.CoreM6 Quad/Dual/DualLite/Solo" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/engicam/icorem6/genimage.cfg" +BR2_ROOTFS_OVERLAY="board/engicam/icorem6/rootfs_overlay" + +# qt5 dependencies +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# qt5 +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_OPENGL_LIB=y +BR2_PACKAGE_QT5BASE_LINUXFB=y +BR2_PACKAGE_QT5BASE_FONTCONFIG=y +BR2_PACKAGE_QT5BASE_GIF=y +BR2_PACKAGE_QT5BASE_JPEG=y + +# mesa3d +BR2_PACKAGE_MESA3D=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y +BR2_PACKAGE_MESA3D_OPENGL_ES=y +BR2_PACKAGE_MESA3D_OPENGL_EGL=y + +# qt5 demo packages +BR2_PACKAGE_GLMARK2=y +BR2_PACKAGE_MESA3D_DEMOS=y +BR2_PACKAGE_KMSCUBE=y +BR2_PACKAGE_QT5CINEX=y +BR2_PACKAGE_QT5CINEX_HD=y + +# fonts +BR2_PACKAGE_BITSTREAM_VERA=y +BR2_PACKAGE_CANTARELL=y +BR2_PACKAGE_DEJAVU=y +BR2_PACKAGE_FONT_AWESOME=y +BR2_PACKAGE_GHOSTSCRIPT_FONTS=y +BR2_PACKAGE_INCONSOLATA=y +BR2_PACKAGE_LIBERATION=y diff --git a/buildroot/configs/engicam_imx6qdl_icore_rqs_defconfig b/buildroot/configs/engicam_imx6qdl_icore_rqs_defconfig new file mode 100644 index 000000000..45ed67be0 --- /dev/null +++ b/buildroot/configs/engicam_imx6qdl_icore_rqs_defconfig @@ -0,0 +1,43 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx6qdl_icore_rqs" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-icore-rqs imx6q-icore-rqs" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Engicam i.CoreM6 Quad/Dual/DualLite/Solo RQS Starter Kit" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/engicam/icorem6_rqs/genimage.cfg" diff --git a/buildroot/configs/engicam_imx6ul_geam_defconfig b/buildroot/configs/engicam_imx6ul_geam_defconfig new file mode 100644 index 000000000..aac8432ef --- /dev/null +++ b/buildroot/configs/engicam_imx6ul_geam_defconfig @@ -0,0 +1,43 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 4.11 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.07-rc1" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx6ul_geam_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.5" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ul-geam-kit" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Engicam GEAM6UL Starter Kit" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/engicam/geam6ul/genimage.cfg" diff --git a/buildroot/configs/engicam_imx6ul_isiot_defconfig b/buildroot/configs/engicam_imx6ul_isiot_defconfig new file mode 100644 index 000000000..57a66dea3 --- /dev/null +++ b/buildroot/configs/engicam_imx6ul_isiot_defconfig @@ -0,0 +1,43 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx6ul_isiot_emmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ul-isiot-emmc" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Engicam Is.IoT eMMC Starter Kit" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/engicam/isiot/genimage.cfg" diff --git a/buildroot/configs/freescale_imx28evk_defconfig b/buildroot/configs/freescale_imx28evk_defconfig new file mode 100644 index 000000000..bd5b007ed --- /dev/null +++ b/buildroot/configs/freescale_imx28evk_defconfig @@ -0,0 +1,34 @@ +# architecture +BR2_arm=y +BR2_arm926t=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.42" +BR2_LINUX_KERNEL_DEFCONFIG="mxs" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx28-evk" + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx28evk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_FORMAT_SD=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# To generate SD Image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/mxs/post-image.sh" diff --git a/buildroot/configs/freescale_imx6dlsabreauto_defconfig b/buildroot/configs/freescale_imx6dlsabreauto_defconfig new file mode 100644 index 000000000..f8659e876 --- /dev/null +++ b/buildroot/configs/freescale_imx6dlsabreauto_defconfig @@ -0,0 +1,44 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# patches +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabreauto" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabreauto" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/freescale_imx6dlsabresd_defconfig b/buildroot/configs/freescale_imx6dlsabresd_defconfig index 680031db4..069bfcbbb 100644 --- a/buildroot/configs/freescale_imx6dlsabresd_defconfig +++ b/buildroot/configs/freescale_imx6dlsabresd_defconfig @@ -1,14 +1,15 @@ # architecture BR2_arm=y BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y # patches -BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches" -# toolchain -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.10.17" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" @@ -16,20 +17,27 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" # kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-sabresd" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6dlsabresd" BR2_TARGET_UBOOT_FORMAT_IMX=y BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/freescale_imx6qsabreauto_defconfig b/buildroot/configs/freescale_imx6qsabreauto_defconfig new file mode 100644 index 000000000..8ce6e378c --- /dev/null +++ b/buildroot/configs/freescale_imx6qsabreauto_defconfig @@ -0,0 +1,44 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# patches +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabreauto" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6qsabreauto" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/freescale_imx6qsabresd_defconfig b/buildroot/configs/freescale_imx6qsabresd_defconfig index f2f702e55..b6cd1c40c 100644 --- a/buildroot/configs/freescale_imx6qsabresd_defconfig +++ b/buildroot/configs/freescale_imx6qsabresd_defconfig @@ -1,14 +1,15 @@ # architecture BR2_arm=y BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y # patches -BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabresd/patches" +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches" -# toolchain -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.10.17" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # system BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" @@ -16,20 +17,28 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" # kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y # filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y # bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx6qsabresd" BR2_TARGET_UBOOT_FORMAT_IMX=y BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/freescale_imx6sololiteevk_defconfig b/buildroot/configs/freescale_imx6sololiteevk_defconfig deleted file mode 100644 index f8ecc7b86..000000000 --- a/buildroot/configs/freescale_imx6sololiteevk_defconfig +++ /dev/null @@ -1,27 +0,0 @@ -# architecture -BR2_arm=y -BR2_cortex_a9=y - -# system -BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" - -# kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" -BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-evk" - -# filesystem -BR2_TARGET_ROOTFS_EXT2=y - -# bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="mx6slevk" -BR2_TARGET_UBOOT_FORMAT_IMX=y -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga" diff --git a/buildroot/configs/freescale_imx6sxsabresd_defconfig b/buildroot/configs/freescale_imx6sxsabresd_defconfig new file mode 100644 index 000000000..dd5283730 --- /dev/null +++ b/buildroot/configs/freescale_imx6sxsabresd_defconfig @@ -0,0 +1,43 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# patches +BR2_GLOBAL_PATCH_DIR="board/freescale/imx6sabre/patches" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-sdb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y + +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sxsabresd" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/freescale_imx6ullevk_defconfig b/buildroot/configs/freescale_imx6ullevk_defconfig new file mode 100644 index 000000000..6306c9720 --- /dev/null +++ b/buildroot/configs/freescale_imx6ullevk_defconfig @@ -0,0 +1,25 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ull-14x14-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6ull_14x14_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/freescale_imx7dsabresd_defconfig b/buildroot/configs/freescale_imx7dsabresd_defconfig new file mode 100644 index 000000000..d7119ef5a --- /dev/null +++ b/buildroot/configs/freescale_imx7dsabresd_defconfig @@ -0,0 +1,38 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-sdb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7dsabresd" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# required tools to create the microSD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" diff --git a/buildroot/configs/freescale_imx8mmevk_defconfig b/buildroot/configs/freescale_imx8mmevk_defconfig new file mode 100644 index 000000000..7bce834ab --- /dev/null +++ b/buildroot/configs/freescale_imx8mmevk_defconfig @@ -0,0 +1,42 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8mm-evk.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-imx8mm-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mm_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/freescale_imx8mnevk_defconfig b/buildroot/configs/freescale_imx8mnevk_defconfig new file mode 100644 index 000000000..e1804fad4 --- /dev/null +++ b/buildroot/configs/freescale_imx8mnevk_defconfig @@ -0,0 +1,43 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-ddr4-evk.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-ddr4-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_PACKAGE_FIRMWARE_IMX_DDR4=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_ddr4_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/freescale_imx8mqevk_defconfig b/buildroot/configs/freescale_imx8mqevk_defconfig new file mode 100644 index 000000000..62e530840 --- /dev/null +++ b/buildroot/configs/freescale_imx8mqevk_defconfig @@ -0,0 +1,42 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV3=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8mq-evk.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-imx8mq-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.1.0" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mq_evk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/freescale_imx8qmmek_defconfig b/buildroot/configs/freescale_imx8qmmek_defconfig new file mode 100644 index 000000000..2c55b3cd9 --- /dev/null +++ b/buildroot/configs/freescale_imx8qmmek_defconfig @@ -0,0 +1,40 @@ +BR2_aarch64=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8qm-mek.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8qm-mek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_PACKAGE_IMX_SC_FIRMWARE=y +BR2_PACKAGE_IMX_SECO=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8qm" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8qm_mek" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/freescale_imx8qxpmek_defconfig b/buildroot/configs/freescale_imx8qxpmek_defconfig new file mode 100644 index 000000000..2c3505556 --- /dev/null +++ b/buildroot/configs/freescale_imx8qxpmek_defconfig @@ -0,0 +1,42 @@ +BR2_aarch64=y +BR2_cortex_a35=y +BR2_ARM_FPU_VFPV3=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8qxp-mek.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8qxp-mek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_PACKAGE_IMX_SC_FIRMWARE=y +BR2_PACKAGE_IMX_SECO=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8qx" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_5.4.24_2.1.0" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8qxp_mek" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/freescale_mpc8315erdb_defconfig b/buildroot/configs/freescale_mpc8315erdb_defconfig deleted file mode 100644 index 85417e5e2..000000000 --- a/buildroot/configs/freescale_mpc8315erdb_defconfig +++ /dev/null @@ -1,37 +0,0 @@ -# Architecture -BR2_powerpc=y -BR2_powerpc_e300c3=y - -# Filesystem -# BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE=0x200 -BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x4000 -BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y - -# Lock headers version to match and avoid breakage -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/freescale/mpc8315erdb/linux-3.18.config" -BR2_LINUX_KERNEL_UIMAGE=y -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="mpc8315erdb" - -# Serial port config -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="MPC8315ERDB_NAND" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2014.04" -BR2_TARGET_UBOOT_FORMAT_NAND_BIN=y diff --git a/buildroot/configs/freescale_p1010rdb_pa_defconfig b/buildroot/configs/freescale_p1010rdb_pa_defconfig deleted file mode 100644 index ff5ee06d4..000000000 --- a/buildroot/configs/freescale_p1010rdb_pa_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -# Architecture -BR2_powerpc=y -BR2_powerpc_8548=y - -# Filesystem -# BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM=y -BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE=0x20 -BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE=0x20000 - -# Lock headers version to match and avoid breakage -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/freescale/p1010rdb/linux-3.18.config" -BR2_LINUX_KERNEL_UIMAGE=y -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="p1010rdb-pa" - -# Serial port config -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="P1010RDB-PA_NOR" -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2014.01" diff --git a/buildroot/configs/freescale_p1025twr_defconfig b/buildroot/configs/freescale_p1025twr_defconfig new file mode 100644 index 000000000..f476d9270 --- /dev/null +++ b/buildroot/configs/freescale_p1025twr_defconfig @@ -0,0 +1,24 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_8548=y + +# Linux headers same as kernel, a 4.15 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7" +BR2_LINUX_KERNEL_DEFCONFIG="mpc85xx_smp" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="fsl/p1025twr" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/buildroot/configs/freescale_p2020ds_defconfig b/buildroot/configs/freescale_p2020ds_defconfig deleted file mode 100644 index 387cf5818..000000000 --- a/buildroot/configs/freescale_p2020ds_defconfig +++ /dev/null @@ -1,26 +0,0 @@ -# Architecture -BR2_powerpc=y -BR2_powerpc_8548=y - -# Filesystem -# BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_ROOTFS_JFFS2=y - -# Lock to 3.12 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.33" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git/snapshot/fsl-sdk-v1.6.tar.bz2" -BR2_LINUX_KERNEL_PATCH="board/freescale/p2020ds/linux-fix-c6187597-breakage.patch" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/freescale/p2020ds/linux-3.12.config" -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="p2020ds" - -# Serial port config -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/buildroot/configs/freescale_t1040d4rdb_defconfig b/buildroot/configs/freescale_t1040d4rdb_defconfig new file mode 100644 index 000000000..df44046ef --- /dev/null +++ b/buildroot/configs/freescale_t1040d4rdb_defconfig @@ -0,0 +1,24 @@ +# Architecture +BR2_powerpc64=y +BR2_powerpc_e5500=y + +# Linux headers same as kernel, a 4.15 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7" +BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="fsl/t1040d4rdb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/buildroot/configs/freescale_t2080_qds_rdb_defconfig b/buildroot/configs/freescale_t2080_qds_rdb_defconfig new file mode 100644 index 000000000..3d03c32f7 --- /dev/null +++ b/buildroot/configs/freescale_t2080_qds_rdb_defconfig @@ -0,0 +1,25 @@ +# Architecture +BR2_powerpc64=y +BR2_powerpc_e6500=y + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17.14" +BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="fsl/t2080qds fsl/t2080rdb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +# BR2_TARGET_ROOTFS_TAR is not set + diff --git a/buildroot/configs/friendlyarm_nanopi_a64_defconfig b/buildroot/configs/friendlyarm_nanopi_a64_defconfig new file mode 100644 index 000000000..7d9535e6a --- /dev/null +++ b/buildroot/configs/friendlyarm_nanopi_a64_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_a64" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-a64/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-nanopi-a64" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM Nanopi A64" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-a64/genimage.cfg" diff --git a/buildroot/configs/friendlyarm_nanopi_neo2_defconfig b/buildroot/configs/friendlyarm_nanopi_neo2_defconfig new file mode 100644 index 000000000..e932ae3bb --- /dev/null +++ b/buildroot/configs/friendlyarm_nanopi_neo2_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +R2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-neo2/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM Nanopi NEO2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg" diff --git a/buildroot/configs/friendlyarm_nanopi_neo_plus2_defconfig b/buildroot/configs/friendlyarm_nanopi_neo_plus2_defconfig new file mode 100644 index 000000000..461e468cb --- /dev/null +++ b/buildroot/configs/friendlyarm_nanopi_neo_plus2_defconfig @@ -0,0 +1,62 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_ROOTFS_OVERLAY="board/friendlyarm/nanopi-neo-plus2/rootfs_overlay" + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +R2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo_plus2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.4" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo-plus2" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/friendlyarm/nanopi-neo-plus2/linux-extras.config" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM Nanopi NEO Plus2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo-plus2/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo-plus2/post-build.sh" + +# wireless firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WIRELESS_TOOLS_LIB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y diff --git a/buildroot/configs/galileo_defconfig b/buildroot/configs/galileo_defconfig new file mode 100644 index 000000000..03ca23f41 --- /dev/null +++ b/buildroot/configs/galileo_defconfig @@ -0,0 +1,24 @@ +BR2_x86_x1000=y +# Needed for TARGET_GRUB2 +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +# Linux headers same as kernel, a 3.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,mdr78,Linux-x1000,8b3c9d8ce1656a26b1097d9091d53bfb39fef640)/linux-8b3c9d8ce1656a26b1097d9091d53bfb39fef640.tar.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.14.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_I386_EFI=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/globalscale_espressobin_defconfig b/buildroot/configs/globalscale_espressobin_defconfig new file mode 100644 index 000000000..50cfc6b53 --- /dev/null +++ b/buildroot/configs/globalscale_espressobin_defconfig @@ -0,0 +1,27 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.11" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/globalscale/espressobin/linux-extras.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-3720-espressobin marvell/armada-3720-espressobin-emmc marvell/armada-3720-espressobin-v7 marvell/armada-3720-espressobin-v7-emmc" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Marvell ESPRESSObin" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_TAR_GZIP=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/globalscale/espressobin/genimage.cfg" diff --git a/buildroot/configs/gnublin_defconfig b/buildroot/configs/gnublin_defconfig deleted file mode 100644 index 369c9da62..000000000 --- a/buildroot/configs/gnublin_defconfig +++ /dev/null @@ -1,28 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# System -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.7" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7=y -BR2_TARGET_GENERIC_ISSUE="Welcome to Gnublin" - -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_BLOCKS=475000 - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="GNUBLIN" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://gitorious.org/u-boot-gnublin-support/u-boot-gnublin-support.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2009.11_gnublin_support_v2" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://gitorious.org/linux-3-7-gnublin/linux-3-7-gnublin.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v3.7-gnublin-2" -BR2_LINUX_KERNEL_DEFCONFIG="gnublin" -BR2_LINUX_KERNEL_INSTALL_TARGET=y diff --git a/buildroot/configs/grinn_chiliboard_defconfig b/buildroot/configs/grinn_chiliboard_defconfig new file mode 100644 index 000000000..5b05ed44d --- /dev/null +++ b/buildroot/configs/grinn_chiliboard_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/grinn/chiliboard/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.26" +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-chiliboard" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="chiliboard" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="spl/u-boot-spl.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="MLO" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/grinn_liteboard_defconfig b/buildroot/configs/grinn_liteboard_defconfig new file mode 100644 index 000000000..8bec2e1d5 --- /dev/null +++ b/buildroot/configs/grinn_liteboard_defconfig @@ -0,0 +1,26 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/grinn/liteboard/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.2" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ul-liteboard" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="liteboard" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/hifive_unleashed_defconfig b/buildroot/configs/hifive_unleashed_defconfig new file mode 100644 index 000000000..24576570d --- /dev/null +++ b/buildroot/configs/hifive_unleashed_defconfig @@ -0,0 +1,40 @@ +# Architecture +BR2_riscv=y +BR2_riscv_custom=y +BR2_RISCV_ISA_CUSTOM_RVM=y +BR2_RISCV_ISA_CUSTOM_RVF=y +BR2_RISCV_ISA_CUSTOM_RVD=y +BR2_RISCV_ISA_CUSTOM_RVC=y +BR2_RISCV_64=y +BR2_RISCV_ABI_LP64D=y + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttySIF0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/sifive/hifive-unleashed/genimage.cfg" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.1 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/alistair23/linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="hifive-unleashed-5.1" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sifive/hifive-unleashed/linux.config.fragment" +BR2_LINUX_KERNEL_IMAGE=y + +# Bootloader +BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_PLAT="sifive/fu540" +BR2_TARGET_OPENSBI_LINUX_PAYLOAD=y + +# Host tools +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/imx23evk_defconfig b/buildroot/configs/imx23evk_defconfig new file mode 100644 index 000000000..b5bfc849b --- /dev/null +++ b/buildroot/configs/imx23evk_defconfig @@ -0,0 +1,34 @@ +# architecture +BR2_arm=y +BR2_arm926t=y + +# Linux headers same as kernel, a 4.8 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_8=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.8.6" +BR2_LINUX_KERNEL_DEFCONFIG="mxs" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-evk" + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx23evk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_FORMAT_SD=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# To generate SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/mxs/post-image.sh" diff --git a/buildroot/configs/imx6-sabreauto_defconfig b/buildroot/configs/imx6-sabreauto_defconfig new file mode 100644 index 000000000..a77b57e4f --- /dev/null +++ b/buildroot/configs/imx6-sabreauto_defconfig @@ -0,0 +1,40 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sabreauto" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_NEEDS_LZOP=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.4" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabreauto imx6dl-sabreauto imx6qp-sabreauto" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/imx6-sabresd_defconfig b/buildroot/configs/imx6-sabresd_defconfig new file mode 100644 index 000000000..d244c5961 --- /dev/null +++ b/buildroot/configs/imx6-sabresd_defconfig @@ -0,0 +1,39 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sabresd" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd imx6dl-sabresd imx6qp-sabresd" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/imx6-sabresd_qt5_defconfig b/buildroot/configs/imx6-sabresd_qt5_defconfig new file mode 100644 index 000000000..df50990dc --- /dev/null +++ b/buildroot/configs/imx6-sabresd_qt5_defconfig @@ -0,0 +1,100 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Additional features needed for packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="320M" +BR2_ROOTFS_OVERLAY="board/freescale/imx6-sabresd/rootfs_overlay" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sabresd" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd imx6dl-sabresd imx6qp-sabresd" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/freescale/imx6-sabresd/linux_qt5.fragment" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# GL driver +BR2_PACKAGE_MESA3D=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y +BR2_PACKAGE_MESA3D_OPENGL_ES=y +BR2_PACKAGE_MESA3D_OPENGL_EGL=y + +# Fonts +BR2_PACKAGE_BITSTREAM_VERA=y +BR2_PACKAGE_CANTARELL=y +BR2_PACKAGE_DEJAVU=y +BR2_PACKAGE_FONT_AWESOME=y +BR2_PACKAGE_GHOSTSCRIPT_FONTS=y +BR2_PACKAGE_INCONSOLATA=y +BR2_PACKAGE_LIBERATION=y + +# GL demos +BR2_PACKAGE_GLMARK2=y +BR2_PACKAGE_KMSCUBE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_MESA3D_DEMOS=y + +# Qt5 +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_OPENGL_LIB=y +BR2_PACKAGE_QT5BASE_LINUXFB=y +BR2_PACKAGE_QT5BASE_FONTCONFIG=y +BR2_PACKAGE_QT5BASE_GIF=y +BR2_PACKAGE_QT5BASE_JPEG=y +BR2_PACKAGE_QT5CINEX=y +BR2_PACKAGE_QT5CINEX_HD=y + +# NXP firmware package +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y +BR2_PACKAGE_FIRMWARE_IMX=y + +# libdrm tests +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y + +# gstreamer-1.0 +BR2_PACKAGE_GSTREAMER1=y +BR2_PACKAGE_GST1_PLUGINS_GOOD=y +BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2=y +BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2_PROBE=y +BR2_PACKAGE_GST1_PLUGINS_BAD=y +BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS=y +BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_KMS=y +BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC=y + +# For automatic kernel module loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y diff --git a/buildroot/configs/imx6slevk_defconfig b/buildroot/configs/imx6slevk_defconfig new file mode 100644 index 000000000..90a02964e --- /dev/null +++ b/buildroot/configs/imx6slevk_defconfig @@ -0,0 +1,26 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6slevk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.11" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-evk" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/imx6sx-sdb_defconfig b/buildroot/configs/imx6sx-sdb_defconfig new file mode 100644 index 000000000..a87bdf84f --- /dev/null +++ b/buildroot/configs/imx6sx-sdb_defconfig @@ -0,0 +1,26 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6sxsabresd" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.14" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-sdb imx6sx-sdb-reva" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/imx6ulevk_defconfig b/buildroot/configs/imx6ulevk_defconfig new file mode 100644 index 000000000..53381d71a --- /dev/null +++ b/buildroot/configs/imx6ulevk_defconfig @@ -0,0 +1,39 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ul-14x14-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6ul_14x14_evk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# filesystem / image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y diff --git a/buildroot/configs/imx6ullevk_defconfig b/buildroot/configs/imx6ullevk_defconfig new file mode 100644 index 000000000..81db66268 --- /dev/null +++ b/buildroot/configs/imx6ullevk_defconfig @@ -0,0 +1,37 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.7 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ull-14x14-evk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6ull_14x14_evk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y +BR2_TARGET_UBOOT_NEEDS_DTC=y + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# filesystem / image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y diff --git a/buildroot/configs/imx6ulpico_defconfig b/buildroot/configs/imx6ulpico_defconfig new file mode 100644 index 000000000..56ae58875 --- /dev/null +++ b/buildroot/configs/imx6ulpico_defconfig @@ -0,0 +1,51 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 4.17 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_17=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc5" + +# rootfs overlay +BR2_ROOTFS_OVERLAY="board/technexion/imx6ulpico/rootfs_overlay" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.17" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6ul-pico-hobbit" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# wifi firmware for brcm4339 +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# wireless packages +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="pico-imx6ul" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# filesystem / image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y diff --git a/buildroot/configs/imx7d-sdb_defconfig b/buildroot/configs/imx7d-sdb_defconfig new file mode 100644 index 000000000..1a3494b4a --- /dev/null +++ b/buildroot/configs/imx7d-sdb_defconfig @@ -0,0 +1,36 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-sdb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7dsabresd" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/imx7dpico_defconfig b/buildroot/configs/imx7dpico_defconfig new file mode 100644 index 000000000..a3c2af164 --- /dev/null +++ b/buildroot/configs/imx7dpico_defconfig @@ -0,0 +1,50 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.7 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc4" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.1" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-pico-pi" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_TARGET_UBOOT_BOARDNAME="pico-pi-imx7d" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y + +# wifi firmware for brcm43439 +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# wireless packages +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_GENIMAGE=y + +# filesystem / image +BR2_ROOTFS_OVERLAY="board/technexion/imx7dpico/rootfs_overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y diff --git a/buildroot/configs/imx8mmpico_defconfig b/buildroot/configs/imx8mmpico_defconfig new file mode 100644 index 000000000..f04946a8d --- /dev/null +++ b/buildroot/configs/imx8mmpico_defconfig @@ -0,0 +1,38 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mm-pico-pi.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,TechNexion,linux,9146d4dcb2dda0c7614f74f824cfb20d29bd85f8)/linux-9146d4dcb2dda0c7614f74f824cfb20d29bd85f8.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="tn_imx8" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-pico-pi freescale/imx8mm-pico-pi-ili9881c freescale/imx8mm-pico-pi-sn65dsi84-hj070na" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.14.98_2.0.0_ga" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,TechNexion,u-boot-edm,9a070a5b4460124054bc459edfc9d1b43e5403bb)/u-boot-edm-9a070a5b4460124054bc459edfc9d1b43e5403bb.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pico-imx8mm" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/imx8mpico_defconfig b/buildroot/configs/imx8mpico_defconfig new file mode 100644 index 000000000..5478f267f --- /dev/null +++ b/buildroot/configs/imx8mpico_defconfig @@ -0,0 +1,38 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-pico-pi.dtb" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,TechNexion,linux,9146d4dcb2dda0c7614f74f824cfb20d29bd85f8)/linux-9146d4dcb2dda0c7614f74f824cfb20d29bd85f8.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="tn_imx8" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-pico-pi freescale/imx8mq-pico-pi-dcss-ili9881c" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y +BR2_PACKAGE_FIRMWARE_IMX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/imx-atf" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.14.98_2.0.0_ga" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,TechNexion,u-boot-edm,9a070a5b4460124054bc459edfc9d1b43e5403bb)/u-boot-edm-9a070a5b4460124054bc459edfc9d1b43e5403bb.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pico-imx8mq" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_SPL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y diff --git a/buildroot/configs/integrator926_defconfig b/buildroot/configs/integrator926_defconfig deleted file mode 100644 index e63f455df..000000000 --- a/buildroot/configs/integrator926_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="integratorcp_cm926ejs" - -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="2.6.35" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.35" -BR2_LINUX_KERNEL_DEFCONFIG="integrator" - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y diff --git a/buildroot/configs/kb9202_defconfig b/buildroot/configs/kb9202_defconfig deleted file mode 100644 index 1d01a22a0..000000000 --- a/buildroot/configs/kb9202_defconfig +++ /dev/null @@ -1,18 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm920t=y - -# Filesystem -BR2_TARGET_ROOTFS_TAR=y - -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="2.6.38.8" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="2.6.38.8" -BR2_LINUX_KERNEL_PATCH="http://maxim.org.za/AT91RM9200/2.6/2.6.38-at91.patch.gz" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="kb9202" diff --git a/buildroot/configs/lafrite_defconfig b/buildroot/configs/lafrite_defconfig new file mode 100644 index 000000000..63370928e --- /dev/null +++ b/buildroot/configs/lafrite_defconfig @@ -0,0 +1,20 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_2=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_OVERLAY="board/librecomputer/lafrite/overlay/" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/librecomputer/lafrite/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.2.14" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="amlogic/meson-gxl-s805x-libretech-ac" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/lego_ev3_defconfig b/buildroot/configs/lego_ev3_defconfig index e4c7facb9..b4a100003 100644 --- a/buildroot/configs/lego_ev3_defconfig +++ b/buildroot/configs/lego_ev3_defconfig @@ -2,27 +2,51 @@ BR2_arm=y BR2_arm926t=y -# toolchain -# Use gcc 4.7, as gcc 4.8 breaks the boot. -BR2_GCC_VERSION_4_7_X=y +# Toolchain +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y # system BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" - -# Lock to 3.3 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.3" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lego/ev3/post-image.sh" +# Linux headers same as kernel, a 4.19 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mindboards/ev3dev-kernel.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v3.3.0-2-ev3dev_0" -BR2_LINUX_KERNEL_DEFCONFIG="ev3dev" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19" +BR2_LINUX_KERNEL_DEFCONFIG="davinci_all" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lego/ev3/linux.fragment" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xc0008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="da850-lego-ev3" + +# Target packages +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/lego/ev3/busybox.fragment" +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y +BR2_PACKAGE_BRICKD=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_TI_CC2560=y # filesystem BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_3=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_SQUASHFS=y +BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y # BR2_TARGET_ROOTFS_TAR is not set + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.11" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="legoev3" + +# host +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/licheepi_zero_defconfig b/buildroot/configs/licheepi_zero_defconfig new file mode 100644 index 000000000..fd875d5f4 --- /dev/null +++ b/buildroot/configs/licheepi_zero_defconfig @@ -0,0 +1,51 @@ +# Target options +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="licheepi-zero" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the LicheePi Zero" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/licheepi/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.5" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v3s-licheepi-zero sun8i-v3s-licheepi-zero-dock" + +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y + +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=y + +# Filesystem images +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="LicheePi_Zero" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/licheepi/boot.cmd" + +# Required host utilities for building an SDCard image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/linksprite_pcduino_defconfig b/buildroot/configs/linksprite_pcduino_defconfig new file mode 100644 index 000000000..5a00e5728 --- /dev/null +++ b/buildroot/configs/linksprite_pcduino_defconfig @@ -0,0 +1,64 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# System settings +BR2_TARGET_GENERIC_HOSTNAME="pcduino" +BR2_TARGET_GENERIC_ISSUE="pcDuino buildroot is ready" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# SD image scripts +BR2_ROOTFS_POST_BUILD_SCRIPT="board/linksprite/pcduino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/linksprite/pcduino/post-image.sh" + +# For kernel modules autoloading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.8" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun4i-a10-pcduino" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/linksprite/pcduino/linux-extras.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_USE_DEFCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="Linksprite_pcDuino" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" + +# Host packages +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# Target packages: wireless support for pcduino-lite-wifi +BR2_PACKAGE_IW=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WIRELESS_TOOLS_LIB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y diff --git a/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_defconfig b/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_defconfig new file mode 100644 index 000000000..3bba4f6e3 --- /dev/null +++ b/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_defconfig @@ -0,0 +1,30 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d27_wlsom1_ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d27_wlsom1_eksd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d27_wlsom1_ek_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig b/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig new file mode 100644 index 000000000..031a533bc --- /dev/null +++ b/buildroot/configs/microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig @@ -0,0 +1,85 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_PTHREAD_DEBUG=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam_6.2)/linux-linux4sam_6.2.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d27_wlsom1_ek" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_ALSACONF=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MPG123=y +BR2_PACKAGE_BZIP2=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_UNZIP=y +BR2_PACKAGE_XZ=y +BR2_PACKAGE_ZIP=y +BR2_PACKAGE_GDB=y +BR2_PACKAGE_LMBENCH=y +BR2_PACKAGE_DOSFSTOOLS=y +BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y +BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y +BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y +BR2_PACKAGE_MMC_UTILS=y +BR2_PACKAGE_MTD=y +BR2_PACKAGE_WILC1000_FIRMWARE=y +BR2_PACKAGE_EVTEST=y +BR2_PACKAGE_I2C_TOOLS=y +BR2_PACKAGE_SETSERIAL=y +BR2_PACKAGE_SPI_TOOLS=y +BR2_PACKAGE_USBUTILS=y +BR2_PACKAGE_LIBSYSFS=y +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y +BR2_PACKAGE_DTC=y +BR2_PACKAGE_DTC_PROGRAMS=y +BR2_PACKAGE_ARGP_STANDALONE=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BRIDGE_UTILS=y +BR2_PACKAGE_CAN_UTILS=y +BR2_PACKAGE_ETHTOOL=y +BR2_PACKAGE_IPERF=y +BR2_PACKAGE_IPROUTE2=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_MII_DIAG=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_HTOP=y +BR2_PACKAGE_VIM=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v3.9.0)/at91bootstrap-v3.9.0.tar.gz" +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d27_wlsom1_eksd_uboot" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam_6.2)/u-boot-at91-linux4sam_6.2.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d27_wlsom1_ek_mmc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/mini2440_defconfig b/buildroot/configs/mini2440_defconfig deleted file mode 100644 index d7d9ab182..000000000 --- a/buildroot/configs/mini2440_defconfig +++ /dev/null @@ -1,37 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm920t=y - -# Serial port -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttySAC0" - -# Filesystem -BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y -BR2_TARGET_ROOTFS_JFFS2_PAGESIZE=0x800 -BR2_TARGET_ROOTFS_JFFS2_EBSIZE=0x20000 -BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER=y -BR2_TARGET_ROOTFS_JFFS2_LE=y -BR2_TARGET_ROOTFS_TAR=y - - -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.0.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y - -# Bootloader -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="mini2440" -BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://repo.or.cz/w/u-boot-openmoko/mini2440.git/snapshot/dev-mini2440-stable.tar.gz" - -# -# Kernel -# -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.4" -BR2_LINUX_KERNEL_DEFCONFIG="mini2440" -BR2_LINUX_KERNEL_UIMAGE=y diff --git a/buildroot/configs/minnowboard_defconfig b/buildroot/configs/minnowboard_defconfig deleted file mode 100644 index e6f1a5559..000000000 --- a/buildroot/configs/minnowboard_defconfig +++ /dev/null @@ -1,24 +0,0 @@ -# Architecture -BR2_x86_64=y -BR2_x86_atom=y - -# Misc -BR2_TARGET_GENERIC_GETTY_PORT="ttyPCH0" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh" - -# Lock to 3.8 headers -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.8" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y - -# Linux kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.yoctoproject.org/linux-yocto-3.8" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ba1587b9b62c801d161897303aa6d22809485f9b" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux-3.8.config" - -# Bootloader -BR2_TARGET_GRUB2=y -BR2_TARGET_GRUB2_I386_EFI=y diff --git a/buildroot/configs/minnowboard_max-graphical_defconfig b/buildroot/configs/minnowboard_max-graphical_defconfig new file mode 100644 index 000000000..910c324e2 --- /dev/null +++ b/buildroot/configs/minnowboard_max-graphical_defconfig @@ -0,0 +1,76 @@ +# Architecture +BR2_x86_64=y +BR2_x86_silvermont=y + +# Toolchain +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +# needed for TARGET_GRUB2 +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +# System configuration +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_OVERLAY="board/minnowboard/fs-overlay-graphical" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/minnowboard/genimage.cfg" + +# Host packages +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Linux +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.8" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux.config" + +# Bootloader +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_X86_64_EFI=y + +# ALSA +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y + +# OpenGL +BR2_PACKAGE_GLMARK2=y +BR2_PACKAGE_MESA3D_DEMOS=y +BR2_PACKAGE_MESA3D=y +BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y +BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y +BR2_PACKAGE_MESA3D_OPENGL_GLX=y + +# Framebuffer (just for testing purposes) +BR2_PACKAGE_FB_TEST_APP=y + +# X +BR2_PACKAGE_XORG7=y +BR2_PACKAGE_XSERVER_XORG_SERVER=y +BR2_PACKAGE_XAPP_XRANDR=y +BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV=y +BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y +BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y +BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL=y +BR2_PACKAGE_NODM=y +BR2_PACKAGE_XTERM=y +BR2_PACKAGE_OPENBOX=y + +# Firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y + +# Libraries +BR2_PACKAGE_IMLIB2=y +BR2_PACKAGE_IMLIB2_JPEG=y +BR2_PACKAGE_IMLIB2_PNG=y +BR2_PACKAGE_STARTUP_NOTIFICATION=y + +# Filesystem image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/buildroot/configs/minnowboard_max_defconfig b/buildroot/configs/minnowboard_max_defconfig index e8bd0abda..fef597c35 100644 --- a/buildroot/configs/minnowboard_max_defconfig +++ b/buildroot/configs/minnowboard_max_defconfig @@ -1,15 +1,21 @@ # Architecture BR2_x86_64=y -BR2_x86_atom=y +BR2_x86_silvermont=y # Misc -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard-max/post-build.sh" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/minnowboard/genimage.cfg" -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Linux headers same as kernel, a 4.19 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +# Needed for grub2 +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y # Needed for ethernet BR2_PACKAGE_LINUX_FIRMWARE=y @@ -18,10 +24,15 @@ BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y # Linux kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.8" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard-max/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard/linux.config" # Bootloader BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_X86_64_EFI=y + +# Filesystem image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/buildroot/configs/mx25pdk_defconfig b/buildroot/configs/mx25pdk_defconfig new file mode 100644 index 000000000..ec4f8b828 --- /dev/null +++ b/buildroot/configs/mx25pdk_defconfig @@ -0,0 +1,35 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Linux headers same as kernel, a 4.15 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx25pdk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v4_v5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx25-pdk" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/mx51evk_defconfig b/buildroot/configs/mx51evk_defconfig new file mode 100644 index 000000000..0cb8f476c --- /dev/null +++ b/buildroot/configs/mx51evk_defconfig @@ -0,0 +1,35 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# Linux headers same as kernel, a 5.1 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx51evk" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.10" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx51-babbage" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/mx53loco_defconfig b/buildroot/configs/mx53loco_defconfig index 942dedf22..69a94e071 100644 --- a/buildroot/configs/mx53loco_defconfig +++ b/buildroot/configs/mx53loco_defconfig @@ -2,26 +2,34 @@ BR2_arm=y BR2_cortex_a8=y +# Linux headers same as kernel, a 5.7 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y + # System -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="2.6.35" BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + # Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y -# Bootloader +# Bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BOARDNAME="mx53loco" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Freescale/u-boot-fslc.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="e36968af0a033e9d66535928886103370620cb4d" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" BR2_TARGET_UBOOT_FORMAT_IMX=y # Kernel BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="b3912bb8a4caf3ec50909135e88af959982c43ca" -BR2_LINUX_KERNEL_DEFCONFIG="imx5" -BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx53-qsb imx53-qsrb" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/mx6cubox_defconfig b/buildroot/configs/mx6cubox_defconfig new file mode 100644 index 000000000..7e9b16bd2 --- /dev/null +++ b/buildroot/configs/mx6cubox_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/mx6cubox/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/solidrun/mx6cubox/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6cuboxi" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.03" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-cubox-i imx6dl-cubox-i imx6q-hummingboard imx6dl-hummingboard" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/mx6sx_udoo_neo_defconfig b/buildroot/configs/mx6sx_udoo_neo_defconfig new file mode 100644 index 000000000..e2e36b907 --- /dev/null +++ b/buildroot/configs/mx6sx_udoo_neo_defconfig @@ -0,0 +1,30 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 4.13 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/udoo/neo/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/udoo/neo/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="udoo_neo" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.13.3" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-udoo-neo-basic imx6sx-udoo-neo-full imx6sx-udoo-neo-extended" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/mx6udoo_defconfig b/buildroot/configs/mx6udoo_defconfig new file mode 100644 index 000000000..86ad13bbf --- /dev/null +++ b/buildroot/configs/mx6udoo_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="udoo" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.01" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.13" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/udoo/mx6qdl/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-udoo imx6dl-udoo" +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/nanopi_m1_defconfig b/buildroot/configs/nanopi_m1_defconfig new file mode 100644 index 000000000..cf9521a3a --- /dev/null +++ b/buildroot/configs/nanopi_m1_defconfig @@ -0,0 +1,44 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="nanopi-m1" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi M1" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_m1" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-nanopi-m1" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-m1/boot.cmd" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-m1/genimage.cfg" +# BR2_TARGET_ROOTFS_TAR is not set + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/nanopi_m1_plus_defconfig b/buildroot/configs/nanopi_m1_plus_defconfig new file mode 100644 index 000000000..2f9d14f10 --- /dev/null +++ b/buildroot/configs/nanopi_m1_plus_defconfig @@ -0,0 +1,44 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="nanopi-m1-plus" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi M1 Plus" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_m1_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-nanopi-m1-plus" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-m1-plus/boot.cmd" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-m1-plus/genimage.cfg" +# BR2_TARGET_ROOTFS_TAR is not set + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/nanopi_neo4_defconfig b/buildroot/configs/nanopi_neo4_defconfig new file mode 100644 index 000000000..a11872ef2 --- /dev/null +++ b/buildroot/configs/nanopi_neo4_defconfig @@ -0,0 +1,55 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi-neo4-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-nanopi-neo4" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="NanoPi Neo4" +BR2_TARGET_GENERIC_ISSUE="Welcome to NanoPi Neo4!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="70M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo4/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo4/post-build.sh" diff --git a/buildroot/configs/nanopi_neo_defconfig b/buildroot/configs/nanopi_neo_defconfig new file mode 100644 index 000000000..be98918c6 --- /dev/null +++ b/buildroot/configs/nanopi_neo_defconfig @@ -0,0 +1,42 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +BR2_TARGET_GENERIC_HOSTNAME="nanopi-neo" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO" + +# Linux headers same as kernel, a 5.3 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y + +# Use a -rc kernel to get the DTS +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.13" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-nanopi-neo" + +# Use an -rc tag because the defconfig is very recent +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Build an sdcard image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-neo/boot.cmd" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg" +# BR2_TARGET_ROOTFS_TAR is not set + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/nanopi_r1_defconfig b/buildroot/configs/nanopi_r1_defconfig new file mode 100644 index 000000000..4c45110bd --- /dev/null +++ b/buildroot/configs/nanopi_r1_defconfig @@ -0,0 +1,48 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="nanopi-r1" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi R1" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts" +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG=y +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE="board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/friendlyarm/nanopi-r1/kernel/linux-extras.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-nanopi-r1" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-r1/boot.cmd" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-r1/genimage.cfg" +# BR2_TARGET_ROOTFS_TAR is not set + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/nexbox_a95x_defconfig b/buildroot/configs/nexbox_a95x_defconfig new file mode 100644 index 000000000..4820d47d5 --- /dev/null +++ b/buildroot/configs/nexbox_a95x_defconfig @@ -0,0 +1,21 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/nexbox/a95x/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/nexbox/a95x/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.8" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="amlogic/meson-gxbb-nexbox-a95x amlogic/meson-gxl-s905x-nexbox-a95x" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/nitrogen6sx_defconfig b/buildroot/configs/nitrogen6sx_defconfig new file mode 100644 index 000000000..d5bf87b08 --- /dev/null +++ b/buildroot/configs/nitrogen6sx_defconfig @@ -0,0 +1,43 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +# Last version of branch boundary-v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen6sx" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +# Last version of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sx-nitrogen6sx imx6sx-nitrogen6sx-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/nitrogen6x_defconfig b/buildroot/configs/nitrogen6x_defconfig index e56bd605c..01d49bb09 100644 --- a/buildroot/configs/nitrogen6x_defconfig +++ b/buildroot/configs/nitrogen6x_defconfig @@ -1,34 +1,43 @@ # architecture BR2_arm=y BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y # system BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/nitrogen6x/post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y # filesystem BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_2r1=y +BR2_TARGET_ROOTFS_EXT2_4=y -# Lock headers to match kernel -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.10.17" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="nitrogen6q" -BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y -BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/u-boot-imx6/tarball/f870252/u-boot-f870252.tar.gz" +# Last version of branch boundary-v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen6q" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd" # kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/linux-imx6/tarball/898627a/linux-imx6-898627a.tar.gz" -BR2_LINUX_KERNEL_DEFCONFIG="nitrogen6x" +# Last version of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_INSTALL_TARGET=y -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_max imx6dl-nitrogen6x imx6q-nitrogen6_max imx6q-nitrogen6x imx6q-sabrelite" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6dl-nitrogen6_som2 imx6q-nitrogen6_som2 imx6qp-nitrogen6_som2 imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/nitrogen7_defconfig b/buildroot/configs/nitrogen7_defconfig new file mode 100644 index 000000000..4178ca978 --- /dev/null +++ b/buildroot/configs/nitrogen7_defconfig @@ -0,0 +1,42 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +# Last version of branch boundary-v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen7" +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/boundarydevices/common/boot.cmd" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +# Last version of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-nitrogen7 imx7d-nitrogen7-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/nitrogen8m_defconfig b/buildroot/configs/nitrogen8m_defconfig new file mode 100644 index 000000000..6e104ce84 --- /dev/null +++ b/buildroot/configs/nitrogen8m_defconfig @@ -0,0 +1,57 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a53=y + +# System +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mq-nitrogen8m.dtb" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# DDR training binaries +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y +BR2_PACKAGE_FIRMWARE_IMX=y + +# ARM Trusted Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_4.14.98_2.3.0 +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/imx-atf/archive/99e07a29.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen8m" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mq-nitrogen8m freescale/imx8mq-nitrogen8m-m4 freescale/imx8mq-nitrogen8m_som freescale/imx8mq-nitrogen8m_som-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/nitrogen8mm_defconfig b/buildroot/configs/nitrogen8mm_defconfig new file mode 100644 index 000000000..2560b36c7 --- /dev/null +++ b/buildroot/configs/nitrogen8mm_defconfig @@ -0,0 +1,57 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a53=y + +# System +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mm-nitrogen8mm.dtb" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# DDR training binaries +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y +BR2_PACKAGE_FIRMWARE_IMX=y + +# ARM Trusted Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_4.14.98_2.3.0 +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/imx-atf/archive/99e07a29.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen8mm_2g" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-nitrogen8mm freescale/imx8mm-nitrogen8mm-m4 freescale/imx8mm-nitrogen8mm_rev2 freescale/imx8mm-nitrogen8mm_rev2-m4 freescale/imx8mm-nitrogen8mm_som freescale/imx8mm-nitrogen8mm_som-m4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/nitrogen8mn_defconfig b/buildroot/configs/nitrogen8mn_defconfig new file mode 100644 index 000000000..cb5cc2480 --- /dev/null +++ b/buildroot/configs/nitrogen8mn_defconfig @@ -0,0 +1,57 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a53=y + +# System +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/boundarydevices/common/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-nitrogen8_nano.dtb" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_IMX_MKIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# DDR training binaries +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y +BR2_PACKAGE_FIRMWARE_IMX=y + +# ARM Trusted Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_4.14.98_2.3.0 +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/imx-atf/archive/99e07a29.tar.gz" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nitrogen8_nano_8mn1gr0" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_v2018.07 +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/u-boot-imx6/archive/f9c6c45b.tar.gz" +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +# Latest revision of branch boundary-imx_5.4.x_2.1.0 +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/archive/62335a04.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="boundary" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-nitrogen8_nano freescale/imx8mn-nitrogen8mn freescale/imx8mn-nitrogen8mn_som" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/odroidxu4_defconfig b/buildroot/configs/odroidxu4_defconfig new file mode 100644 index 000000000..69958e138 --- /dev/null +++ b/buildroot/configs/odroidxu4_defconfig @@ -0,0 +1,27 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/hardkernel/odroidxu4/post-image.sh" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/hardkernel/linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="4.14.16-104" +BR2_LINUX_KERNEL_DEFCONFIG="odroidxu4" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/hardkernel/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="88af53fbcef8386cb4d5f04c19f4b2bcb69e90ca" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-xu4" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="sd_fuse/bl1.bin.hardkernel sd_fuse/bl2.bin.hardkernel.720k_uboot sd_fuse/tzsw.bin.hardkernel " +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/olimex_a10_olinuxino_lime_defconfig b/buildroot/configs/olimex_a10_olinuxino_lime_defconfig new file mode 100644 index 000000000..8248daf92 --- /dev/null +++ b/buildroot/configs/olimex_a10_olinuxino_lime_defconfig @@ -0,0 +1,47 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="a10-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a10_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a10_olinuxino/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.26" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun4i-a10-olinuxino-lime" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.03" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A10-OLinuXino-Lime" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a10_olinuxino/boot.cmd" + +# Additional tools +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/olimex_a13_olinuxino_defconfig b/buildroot/configs/olimex_a13_olinuxino_defconfig new file mode 100644 index 000000000..df2a72236 --- /dev/null +++ b/buildroot/configs/olimex_a13_olinuxino_defconfig @@ -0,0 +1,46 @@ +# Architecture +BR2_arm=y +BR2_cortex_a8=y + +# Linux headers same as kernel, a 4.11 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="a13-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A13-OLinuXino" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.5" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun5i-a13-olinuxino" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a13_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a13_olinuxino/genimage.cfg" + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/olimex_a20_olinuxino_lime2_defconfig b/buildroot/configs/olimex_a20_olinuxino_lime2_defconfig new file mode 100644 index 000000000..81777056e --- /dev/null +++ b/buildroot/configs/olimex_a20_olinuxino_lime2_defconfig @@ -0,0 +1,58 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Toolchain +# glibc is needed for sunxi-mali-mainline-package. +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a20_olinuxino/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.50" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-olinuxino-lime2" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# sunxi packages +BR2_PACKAGE_SUNXI_TOOLS=y +BR2_PACKAGE_SUNXI_MALI_MAINLINE=y +BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A20-OLinuXino-Lime2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a20_olinuxino/boot.cmd" + +# Additional tools +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/olimex_a20_olinuxino_lime_defconfig b/buildroot/configs/olimex_a20_olinuxino_lime_defconfig new file mode 100644 index 000000000..8e2b4feda --- /dev/null +++ b/buildroot/configs/olimex_a20_olinuxino_lime_defconfig @@ -0,0 +1,58 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Toolchain +# glibc is needed for sunxi-mali-mainline-package. +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a20_olinuxino/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.50" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-olinuxino-lime" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# sunxi packages +BR2_PACKAGE_SUNXI_TOOLS=y +BR2_PACKAGE_SUNXI_MALI_MAINLINE=y +BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A20-OLinuXino-Lime" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a20_olinuxino/boot.cmd" + +# Additional tools +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/olimex_a20_olinuxino_micro_defconfig b/buildroot/configs/olimex_a20_olinuxino_micro_defconfig new file mode 100644 index 000000000..a2aff0ca3 --- /dev/null +++ b/buildroot/configs/olimex_a20_olinuxino_micro_defconfig @@ -0,0 +1,45 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 4.12 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_12=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a20_olinuxino/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.12" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-olinuxino-micro" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A20-OLinuXino_MICRO" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a20_olinuxino/boot.cmd" + +# Additional tools +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/olimex_a33_olinuxino_defconfig b/buildroot/configs/olimex_a33_olinuxino_defconfig new file mode 100644 index 000000000..71b1669b2 --- /dev/null +++ b/buildroot/configs/olimex_a33_olinuxino_defconfig @@ -0,0 +1,49 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="A33-olinuxino" +BR2_TARGET_GENERIC_ISSUE="Welcome to A33 OLinuXino!" +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="A33-OLinuXino" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_BIN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a33_olinuxino/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-a33-olinuxino" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a33_olinuxino/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a33_olinuxino/genimage.cfg" + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/olimex_a64_olinuxino_defconfig b/buildroot/configs/olimex_a64_olinuxino_defconfig new file mode 100644 index 000000000..d5b2d3530 --- /dev/null +++ b/buildroot/configs/olimex_a64_olinuxino_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="a64-olinuxino" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/olimex/a64-olinuxino/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-olinuxino" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Olimex A64-OLinuXino" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olimex/a64-olinuxino/genimage.cfg" diff --git a/buildroot/configs/olimex_imx233_olinuxino_defconfig b/buildroot/configs/olimex_imx233_olinuxino_defconfig index 49a9f0f4f..275dd98af 100644 --- a/buildroot/configs/olimex_imx233_olinuxino_defconfig +++ b/buildroot/configs/olimex_imx233_olinuxino_defconfig @@ -2,39 +2,25 @@ BR2_arm=y BR2_arm926t=y -# Patches (mxs-bootlets) -BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # System -BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Lock headers version to match and avoid breakage -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.2" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Bootloader -BR2_TARGET_MXS_BOOTLETS=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.2" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.18.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8" +BR2_LINUX_KERNEL_DEFCONFIG="mxs" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olimex/imx233_olinuxino/linux-wifi.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" - -# For automatic firmware loading -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000" # Firmware for WiFi BR2_PACKAGE_LINUX_FIRMWARE=y @@ -44,3 +30,23 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_ZD1211_FIRMWARE=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.11" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y + +# To generate SD Image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/mxs/post-image.sh" + diff --git a/buildroot/configs/olpc_xo175_defconfig b/buildroot/configs/olpc_xo175_defconfig new file mode 100644 index 000000000..19075fe5a --- /dev/null +++ b/buildroot/configs/olpc_xo175_defconfig @@ -0,0 +1,29 @@ +BR2_arm=y +BR2_pj4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olpc/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olpc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olpc/xo-1.75/linux.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olpc/linux.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8887=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8897=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_LABEL="XO175" +BR2_TARGET_ROOTFS_EXT2_SIZE="32M" +BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O dir_index,^huge_file,^64bit,^extent" +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/olpc_xo1_defconfig b/buildroot/configs/olpc_xo1_defconfig new file mode 100644 index 000000000..41226d892 --- /dev/null +++ b/buildroot/configs/olpc_xo1_defconfig @@ -0,0 +1,27 @@ +BR2_x86_geode=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/olpc/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olpc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.1" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olpc/xo-1/linux.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olpc/linux.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB8388_V9=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB8388_OLPC=y +BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB_THINFIRM=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_LABEL="XO1" +BR2_TARGET_ROOTFS_EXT2_SIZE="32M" +BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O dir_index,^huge_file,^64bit,^extent" +BR2_TARGET_ROOTFS_JFFS2=y +BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K=y +BR2_TARGET_ROOTFS_JFFS2_PAD=y +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/openblocks_a6_defconfig b/buildroot/configs/openblocks_a6_defconfig index d9994f298..c805ae9c6 100644 --- a/buildroot/configs/openblocks_a6_defconfig +++ b/buildroot/configs/openblocks_a6_defconfig @@ -4,22 +4,20 @@ BR2_arm926t=y # system BR2_TARGET_GENERIC_HOSTNAME="openblocks-a6" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_SYSTEM_DHCP="eth0" # filesystem BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y +BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y # kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.13" BR2_LINUX_KERNEL_DEFCONFIG="mvebu_v5" BR2_LINUX_KERNEL_APPENDED_UIMAGE=y BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" diff --git a/buildroot/configs/orangepi_lite2_defconfig b/buildroot/configs/orangepi_lite2_defconfig new file mode 100644 index 000000000..c6be1c46b --- /dev/null +++ b/buildroot/configs/orangepi_lite2_defconfig @@ -0,0 +1,60 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.19 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_h6" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/amarula/u-boot-amarula" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="h6-v1.0a" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_lite2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,amarula,linux-amarula,h6-v1.0b)/linux-amarula_h6-v1.0b.tar.gz" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h6-orangepi-lite2" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Lite2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-lite2/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi-lite2/post-build.sh" +BR2_ROOTFS_OVERLAY="board/orangepi/orangepi-lite2/rootfs_overlay" + +# wireless firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y diff --git a/buildroot/configs/orangepi_lite_defconfig b/buildroot/configs/orangepi_lite_defconfig new file mode 100644 index 000000000..249224ed3 --- /dev/null +++ b/buildroot/configs/orangepi_lite_defconfig @@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Lite" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Lite" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.8" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-lite/linux-extras.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-lite" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_PACKAGE_RTL8189FS=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_lite" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-lite/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-lite/genimage.cfg" diff --git a/buildroot/configs/orangepi_one_defconfig b/buildroot/configs/orangepi_one_defconfig new file mode 100644 index 000000000..4863eebff --- /dev/null +++ b/buildroot/configs/orangepi_one_defconfig @@ -0,0 +1,33 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_One" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi One" +BR2_SYSTEM_DHCP="eth0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.8" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-one" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_one" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-one/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-one/genimage.cfg" diff --git a/buildroot/configs/orangepi_one_plus_defconfig b/buildroot/configs/orangepi_one_plus_defconfig new file mode 100644 index 000000000..1084d4223 --- /dev/null +++ b/buildroot/configs/orangepi_one_plus_defconfig @@ -0,0 +1,46 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.19 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v2.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_h6" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.09" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_one_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,amarula,linux-amarula,h6-v1.0b)/linux-amarula_h6-v1.0b.tar.gz" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h6-orangepi-one-plus" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi One+" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-one-plus/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepi-one-plus/post-build.sh" diff --git a/buildroot/configs/orangepi_pc2_defconfig b/buildroot/configs/orangepi_pc2_defconfig new file mode 100644 index 000000000..864f8bb8a --- /dev/null +++ b/buildroot/configs/orangepi_pc2_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_pc2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-pc2/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-pc2" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi PC2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-pc2/genimage.cfg" diff --git a/buildroot/configs/orangepi_pc_defconfig b/buildroot/configs/orangepi_pc_defconfig new file mode 100644 index 000000000..fcb6bdc9e --- /dev/null +++ b/buildroot/configs/orangepi_pc_defconfig @@ -0,0 +1,34 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi PC" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-pc/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.13" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-pc/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-pc" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_pc" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-pc/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/orangepi_pc_plus_defconfig b/buildroot/configs/orangepi_pc_plus_defconfig new file mode 100644 index 000000000..4d22e7840 --- /dev/null +++ b/buildroot/configs/orangepi_pc_plus_defconfig @@ -0,0 +1,49 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC_Plus" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi PC Plus" +BR2_SYSTEM_DHCP="eth0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.8" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-pc-plus" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-pc-plus/linux-extras.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_pc_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-pc-plus/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-pc-plus/genimage.cfg" + +# wireless driver and firmware +BR2_PACKAGE_RTL8189FS=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WIRELESS_TOOLS_LIB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y diff --git a/buildroot/configs/orangepi_plus_defconfig b/buildroot/configs/orangepi_plus_defconfig new file mode 100644 index 000000000..be3eba51f --- /dev/null +++ b/buildroot/configs/orangepi_plus_defconfig @@ -0,0 +1,43 @@ +# Architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# System configuration +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Plus" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Plus" + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-plus" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-plus/boot.cmd" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-plus/genimage.cfg" + +# Additional tools +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/orangepi_prime_defconfig b/buildroot/configs/orangepi_prime_defconfig new file mode 100644 index 000000000..f78711ce4 --- /dev/null +++ b/buildroot/configs/orangepi_prime_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_prime" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-prime/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-prime" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Prime" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-prime/genimage.cfg" diff --git a/buildroot/configs/orangepi_r1_defconfig b/buildroot/configs/orangepi_r1_defconfig new file mode 100644 index 000000000..b1d35f299 --- /dev/null +++ b/buildroot/configs/orangepi_r1_defconfig @@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_R1" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi R1" +BR2_SYSTEM_DHCP="eth0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.12" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-r1" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-r1/linux-extras.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_r1" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-r1/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-r1/genimage.cfg" + +# spi flash support +BR2_PACKAGE_MTD=y diff --git a/buildroot/configs/orangepi_win_defconfig b/buildroot/configs/orangepi_win_defconfig new file mode 100644 index 000000000..8aae60245 --- /dev/null +++ b/buildroot/configs/orangepi_win_defconfig @@ -0,0 +1,47 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.11" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_win" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-win/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-orangepi-win" + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Win/Win Plus" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-win/genimage.cfg" diff --git a/buildroot/configs/orangepi_zero_defconfig b/buildroot/configs/orangepi_zero_defconfig new file mode 100644 index 000000000..f674ceaa2 --- /dev/null +++ b/buildroot/configs/orangepi_zero_defconfig @@ -0,0 +1,54 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_VFPV4=y +BR2_GLOBAL_PATCH_DIR="board/orangepi/orangepi-zero/patches" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y +BR2_TARGET_GENERIC_HOSTNAME="OrangePi_Zero" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi Zero" +BR2_SYSTEM_DHCP="eth0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6" +BR2_LINUX_KERNEL_DEFCONFIG="sunxi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h2-plus-orangepi-zero" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero/linux-extras.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_zero" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-zero/boot.cmd" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-zero/genimage.cfg" + +# wireless driver and firmware +BR2_PACKAGE_XR819_XRADIO=y +BR2_PACKAGE_ARMBIAN_FIRMWARE=y +BR2_PACKAGE_ARMBIAN_FIRMWARE_XR819=y + +# wireless support +BR2_PACKAGE_IW=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WIRELESS_TOOLS_LIB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y + +# spi flash support +BR2_PACKAGE_MTD=y diff --git a/buildroot/configs/orangepi_zero_plus2_defconfig b/buildroot/configs/orangepi_zero_plus2_defconfig new file mode 100644 index 000000000..a0183714a --- /dev/null +++ b/buildroot/configs/orangepi_zero_plus2_defconfig @@ -0,0 +1,63 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_3=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_ROOTFS_OVERLAY="board/orangepi/orangepi-zero-plus2/rootfs_overlay" + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="orangepi_zero_plus2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-zero-plus2/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.3.8" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-orangepi-zero-plus2" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-zero-plus2/linux-extras.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# wireless firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y + +# wireless tools +BR2_PACKAGE_IW=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WIRELESS_TOOLS_LIB=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to Orangepi Zero Plus2" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-zero-plus2/genimage.cfg" diff --git a/buildroot/configs/pandaboard_defconfig b/buildroot/configs/pandaboard_defconfig index 50c3714d8..408bced9c 100644 --- a/buildroot/configs/pandaboard_defconfig +++ b/buildroot/configs/pandaboard_defconfig @@ -1,39 +1,32 @@ -# Architecture BR2_arm=y BR2_cortex_a9=y - -# system -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyO2" -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y - -# filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Lock to 3.12 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.2" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y - -# Kernel +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS2" +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pandaboard/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.12.2" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.62" BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x80008000" -BR2_LINUX_KERNEL_APPENDED_UIMAGE=y -BR2_LINUX_KERNEL_APPENDED_DTB=y -BR2_LINUX_KERNEL_USE_INTREE_DTS=y -# might need omap4-panda or omap4-panda-a4 instead -BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es" - -# Bootloaders +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es omap4-panda omap4-panda-a4" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="omap4_panda" BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_BOARDNAME="omap4_panda" BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="MLO" -BR2_TARGET_UBOOT_LATEST_VERSION=n -BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2012.07" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/pc_x86_64_bios_defconfig b/buildroot/configs/pc_x86_64_bios_defconfig new file mode 100644 index 000000000..1c1f7a366 --- /dev/null +++ b/buildroot/configs/pc_x86_64_bios_defconfig @@ -0,0 +1,65 @@ +# Architecture +BR2_x86_64=y + +# Toolchain, required for eudev (to autoload drivers) +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Required tools to create bootable media +BR2_PACKAGE_HOST_GENIMAGE=y + +# Bootloader +BR2_TARGET_GRUB2=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/pc/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pc/genimage-bios.cfg" + +# Linux headers same as kernel, a 4.18 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y + +# Packages +# +# Use connman so that networking setup is simpler, via connmanctl tool +# acpid is for seamless power button support +BR2_PACKAGE_ACPID=y +BR2_PACKAGE_CONNMAN=y +BR2_PACKAGE_CONNMAN_CLIENT=y +BR2_PACKAGE_CONNMAN_WIFI=y diff --git a/buildroot/configs/pc_x86_64_efi_defconfig b/buildroot/configs/pc_x86_64_efi_defconfig new file mode 100644 index 000000000..984fc8f92 --- /dev/null +++ b/buildroot/configs/pc_x86_64_efi_defconfig @@ -0,0 +1,67 @@ +# Architecture +BR2_x86_64=y + +# Toolchain, required for eudev (to autoload drivers) +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y + +# Required tools to create bootable media +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Bootloader +BR2_TARGET_GRUB2=y +BR2_TARGET_GRUB2_X86_64_EFI=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/pc/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image-efi.sh" + +# Linux headers same as kernel, a 4.18 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Firmware +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C=y +BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y + +# Packages +# +# Use connman so that networking setup is simpler, via connmanctl tool +# acpid is for seamless power button support +BR2_PACKAGE_ACPID=y +BR2_PACKAGE_CONNMAN=y +BR2_PACKAGE_CONNMAN_CLIENT=y +BR2_PACKAGE_CONNMAN_WIFI=y diff --git a/buildroot/configs/pine64_defconfig b/buildroot/configs/pine64_defconfig new file mode 100644 index 000000000..d2e3a360f --- /dev/null +++ b/buildroot/configs/pine64_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pine64_plus" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/pine64/pine64/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-pine64" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to PINE64" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/pine64/genimage.cfg" diff --git a/buildroot/configs/pine64_sopine_defconfig b/buildroot/configs/pine64_sopine_defconfig new file mode 100644 index 000000000..3007d5a64 --- /dev/null +++ b/buildroot/configs/pine64_sopine_defconfig @@ -0,0 +1,49 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +# Linux headers same as kernel, a 5.0 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/apritzel/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50iw1p1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="aa75c8da415158a94b82a430b2b40000778e851f" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sopine_baseboard" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/sunxi-spl.bin" +BR2_TARGET_UBOOT_BOOT_SCRIPT=y +BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/pine64/sopine/boot.cmd" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-sopine-baseboard" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_ISSUE="Welcome to PINE64 SOPINE" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/sopine/genimage.cfg" diff --git a/buildroot/configs/qemu_aarch64_virt_defconfig b/buildroot/configs/qemu_aarch64_virt_defconfig index 94ea2ed30..67dccc604 100644 --- a/buildroot/configs/qemu_aarch64_virt_defconfig +++ b/buildroot/configs/qemu_aarch64_virt_defconfig @@ -1,23 +1,31 @@ # Architecture BR2_aarch64=y +BR2_cortex_a53=y # System +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" # Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux-3.18.config" -BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y -BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_arm_nuri_defconfig b/buildroot/configs/qemu_arm_nuri_defconfig deleted file mode 100644 index 1b691d9bc..000000000 --- a/buildroot/configs/qemu_arm_nuri_defconfig +++ /dev/null @@ -1,27 +0,0 @@ -# Architecture -BR2_arm=y -BR2_cortex_a9=y -BR2_ARM_ENABLE_NEON=y -BR2_ARM_FPU_VFPV3D16=y - -# System -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttySAC1" - -# Filesystem -# BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_ROOTFS_INITRAMFS=y - -# Lock to 3.10 headers to avoid breaking with newer kernels -# Stuck at 3.10.x because there's no Nuri DTS -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.10.66" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.10.66" -BR2_LINUX_KERNEL_DEFCONFIG="exynos4" -BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/buildroot/configs/qemu_arm_versatile_defconfig b/buildroot/configs/qemu_arm_versatile_defconfig index f48a64df4..6dc212397 100644 --- a/buildroot/configs/qemu_arm_versatile_defconfig +++ b/buildroot/configs/qemu_arm_versatile_defconfig @@ -2,23 +2,30 @@ BR2_arm=y BR2_arm926t=y -# system -BR2_TARGET_GENERIC_GETTY=y +# System +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" -# filesystem +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-3.18.config" -BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="versatile-pb" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_arm_versatile_nommu_defconfig b/buildroot/configs/qemu_arm_versatile_nommu_defconfig new file mode 100644 index 000000000..4108e706c --- /dev/null +++ b/buildroot/configs/qemu_arm_versatile_nommu_defconfig @@ -0,0 +1,42 @@ +# Architecture +BR2_arm=y +BR2_arm926t=y + +# Toolchain +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set + +# Patches +BR2_GLOBAL_PATCH_DIR="board/qemu/arm-versatile/patches" + +# Busybox with hush +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem +# BR2_TARGET_ROOTFS_EXT2 is not set +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-nommu.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="versatile-pb" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_arm_vexpress_defconfig b/buildroot/configs/qemu_arm_vexpress_defconfig index 9574d95c8..f99b87c17 100644 --- a/buildroot/configs/qemu_arm_vexpress_defconfig +++ b/buildroot/configs/qemu_arm_vexpress_defconfig @@ -2,25 +2,32 @@ BR2_arm=y BR2_cortex_a9=y BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y BR2_ARM_FPU_VFPV3D16=y # System -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y -BR2_TARGET_GENERIC_GETTY=y +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" # Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_DEFCONFIG="vexpress" -BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_arm_vexpress_tz_defconfig b/buildroot/configs/qemu_arm_vexpress_tz_defconfig new file mode 100644 index 000000000..815a7987c --- /dev/null +++ b/buildroot/configs/qemu_arm_vexpress_tz_defconfig @@ -0,0 +1,53 @@ +# Architecture +BR2_arm=y +BR2_cortex_a15=y +BR2_ARM_FPU_VFPV3D16=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/arm-vexpress-tz/post-build.sh" + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_DEFCONFIG="vexpress" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/arm-vexpress-tz/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca15_a7" + +# TF-A for booting OP-TEE secure and uboot/linux non secure +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.2" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BL32_RAM_LOCATION=tdram" + +# OP-TEE components +BR2_TARGET_OPTEE_OS=y +BR2_TARGET_OPTEE_OS_PLATFORM="vexpress-qemu_virt" +BR2_PACKAGE_OPTEE_BENCHMARK=y +BR2_PACKAGE_OPTEE_EXAMPLES=y +BR2_PACKAGE_OPTEE_TEST=y + +# U-boot for booting the dear Linux kernel +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="qemu_arm" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/qemu/arm-vexpress-tz/u-boot.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_csky610_virt_defconfig b/buildroot/configs/qemu_csky610_virt_defconfig new file mode 100644 index 000000000..e7d75f5f4 --- /dev/null +++ b/buildroot/configs/qemu_csky610_virt_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_csky=y +BR2_ck610=y + +# System +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# linux kernel header, the same version with linux kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck610.config.fragment" diff --git a/buildroot/configs/qemu_csky807_virt_defconfig b/buildroot/configs/qemu_csky807_virt_defconfig new file mode 100644 index 000000000..df12450a5 --- /dev/null +++ b/buildroot/configs/qemu_csky807_virt_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_csky=y +BR2_ck807=y + +# System +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# linux kernel header, the same version with linux kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck807.config.fragment" diff --git a/buildroot/configs/qemu_csky810_virt_defconfig b/buildroot/configs/qemu_csky810_virt_defconfig new file mode 100644 index 000000000..dd1fd329f --- /dev/null +++ b/buildroot/configs/qemu_csky810_virt_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_csky=y +BR2_ck810=y + +# System +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# linux kernel header, the same version with linux kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck810.config.fragment" diff --git a/buildroot/configs/qemu_csky860_virt_defconfig b/buildroot/configs/qemu_csky860_virt_defconfig new file mode 100644 index 000000000..6edfba4e8 --- /dev/null +++ b/buildroot/configs/qemu_csky860_virt_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_csky=y +BR2_ck860=y + +# System +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# linux kernel header, the same version with linux kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_0=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck860.config.fragment" diff --git a/buildroot/configs/qemu_m68k_mcf5208_defconfig b/buildroot/configs/qemu_m68k_mcf5208_defconfig new file mode 100644 index 000000000..0806dc0ac --- /dev/null +++ b/buildroot/configs/qemu_m68k_mcf5208_defconfig @@ -0,0 +1,36 @@ +# Architecture +BR2_m68k=y +BR2_m68k_cf5208=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_INITRAMFS=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/m68k-mcf5208/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_m68k_q800_defconfig b/buildroot/configs/qemu_m68k_q800_defconfig new file mode 100644 index 000000000..b54d502be --- /dev/null +++ b/buildroot/configs/qemu_m68k_q800_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_m68k=y +BR2_m68k_68040=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/m68k-q800/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_microblazebe_mmu_defconfig b/buildroot/configs/qemu_microblazebe_mmu_defconfig index 93d43c193..a989e555b 100644 --- a/buildroot/configs/qemu_microblazebe_mmu_defconfig +++ b/buildroot/configs/qemu_microblazebe_mmu_defconfig @@ -3,22 +3,29 @@ BR2_microblaze=y BR2_microblazebe=y # System +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" # Filesystem # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazebe-mmu/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazebe-mmu/linux.config" BR2_LINUX_KERNEL_LINUX_BIN=y -BR2_LINUX_KERNEL_PATCH="board/qemu/microblazebe-mmu/xilinx-xemaclite.patch" +BR2_LINUX_KERNEL_PATCH="board/qemu/microblazebe-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_microblazeel_mmu_defconfig b/buildroot/configs/qemu_microblazeel_mmu_defconfig index dacc79c71..ccd679fd9 100644 --- a/buildroot/configs/qemu_microblazeel_mmu_defconfig +++ b/buildroot/configs/qemu_microblazeel_mmu_defconfig @@ -3,22 +3,29 @@ BR2_microblaze=y BR2_microblazeel=y # System +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" # Filesystem # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazeel-mmu/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazeel-mmu/linux.config" BR2_LINUX_KERNEL_LINUX_BIN=y -BR2_LINUX_KERNEL_PATCH="board/qemu/microblazeel-mmu/xilinx-xemaclite.patch" +BR2_LINUX_KERNEL_PATCH="board/qemu/microblazeel-mmu/0001-net-xilinx-xemaclite-add-2.00.b-revision.patch" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips32r2_malta_defconfig b/buildroot/configs/qemu_mips32r2_malta_defconfig new file mode 100644 index 000000000..f56e95b14 --- /dev/null +++ b/buildroot/configs/qemu_mips32r2_malta_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_mips=y +BR2_mips_32r2=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips32r2-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips32r2el_malta_defconfig b/buildroot/configs/qemu_mips32r2el_malta_defconfig new file mode 100644 index 000000000..9548a8218 --- /dev/null +++ b/buildroot/configs/qemu_mips32r2el_malta_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_mipsel=y +BR2_mips_32r2=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips32r2el-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips32r6_malta_defconfig b/buildroot/configs/qemu_mips32r6_malta_defconfig new file mode 100644 index 000000000..935fc4c2a --- /dev/null +++ b/buildroot/configs/qemu_mips32r6_malta_defconfig @@ -0,0 +1,34 @@ +# Architecture +BR2_mips=y +BR2_mips_32r6=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips32r6-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_GLOBAL_PATCH_DIR="board/qemu/mips32r6-malta/patches" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips32r6el_malta_defconfig b/buildroot/configs/qemu_mips32r6el_malta_defconfig new file mode 100644 index 000000000..dfaf11afb --- /dev/null +++ b/buildroot/configs/qemu_mips32r6el_malta_defconfig @@ -0,0 +1,34 @@ +# Architecture +BR2_mipsel=y +BR2_mips_32r6=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips32r6el-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_GLOBAL_PATCH_DIR="board/qemu/mips32r6el-malta/patches" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips64_malta_defconfig b/buildroot/configs/qemu_mips64_malta_defconfig index 2d6202e8f..4a0531947 100644 --- a/buildroot/configs/qemu_mips64_malta_defconfig +++ b/buildroot/configs/qemu_mips64_malta_defconfig @@ -2,23 +2,32 @@ BR2_mips64=y BR2_MIPS_NABI64=y +# System +BR2_SYSTEM_DHCP="eth0" + # Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.35" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64-malta/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64-malta/linux.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips64el_malta_defconfig b/buildroot/configs/qemu_mips64el_malta_defconfig index cbdb7f8a6..06e80b339 100644 --- a/buildroot/configs/qemu_mips64el_malta_defconfig +++ b/buildroot/configs/qemu_mips64el_malta_defconfig @@ -2,26 +2,32 @@ BR2_mips64el=y BR2_MIPS_NABI64=y -# Toolchain -BR2_TOOLCHAIN_BUILDROOT_EGLIBC=y +# System +BR2_SYSTEM_DHCP="eth0" # Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64el-malta/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64el-malta/linux.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips64r6_malta_defconfig b/buildroot/configs/qemu_mips64r6_malta_defconfig new file mode 100644 index 000000000..035c664fe --- /dev/null +++ b/buildroot/configs/qemu_mips64r6_malta_defconfig @@ -0,0 +1,35 @@ +# Architecture +BR2_mips64=y +BR2_mips_64r6=y +BR2_MIPS_NABI64=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64r6-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_GLOBAL_PATCH_DIR="board/qemu/mips64r6-malta/patches" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips64r6el_malta_defconfig b/buildroot/configs/qemu_mips64r6el_malta_defconfig new file mode 100644 index 000000000..26e945853 --- /dev/null +++ b/buildroot/configs/qemu_mips64r6el_malta_defconfig @@ -0,0 +1,35 @@ +# Architecture +BR2_mips64el=y +BR2_mips_64r6=y +BR2_MIPS_NABI64=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips64r6el-malta/linux.config" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_GLOBAL_PATCH_DIR="board/qemu/mips64r6el-malta/patches" + +# Serial port config +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_mips_malta_defconfig b/buildroot/configs/qemu_mips_malta_defconfig deleted file mode 100644 index f018317f2..000000000 --- a/buildroot/configs/qemu_mips_malta_defconfig +++ /dev/null @@ -1,24 +0,0 @@ -# Architecture -BR2_mips=y -BR2_mips_32r2=y - -# filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mips-malta/linux-3.18.config" -BR2_LINUX_KERNEL_VMLINUX=y - -# Serial port config -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/buildroot/configs/qemu_mipsel_malta_defconfig b/buildroot/configs/qemu_mipsel_malta_defconfig deleted file mode 100644 index 71dbe2333..000000000 --- a/buildroot/configs/qemu_mipsel_malta_defconfig +++ /dev/null @@ -1,24 +0,0 @@ -# Architecture -BR2_mipsel=y -BR2_mips_32r2=y - -# filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/mipsel-malta/linux-3.18.config" -BR2_LINUX_KERNEL_VMLINUX=y - -# Serial port config -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/buildroot/configs/qemu_nios2_10m50_defconfig b/buildroot/configs/qemu_nios2_10m50_defconfig new file mode 100644 index 000000000..cfb83ff66 --- /dev/null +++ b/buildroot/configs/qemu_nios2_10m50_defconfig @@ -0,0 +1,21 @@ +BR2_nios2=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_DEFCONFIG="10m50" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/nios2-10m50/linux.fragment" +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_or1k_defconfig b/buildroot/configs/qemu_or1k_defconfig new file mode 100644 index 000000000..4ccb58ef1 --- /dev/null +++ b/buildroot/configs/qemu_or1k_defconfig @@ -0,0 +1,24 @@ +# Architecture +BR2_or1k=y + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/or1k/linux.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc64_e5500_defconfig b/buildroot/configs/qemu_ppc64_e5500_defconfig new file mode 100644 index 000000000..1e030f5c7 --- /dev/null +++ b/buildroot/configs/qemu_ppc64_e5500_defconfig @@ -0,0 +1,29 @@ +# Architecture +BR2_powerpc64=y +BR2_powerpc_e5500=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as the kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc64_pseries_defconfig b/buildroot/configs/qemu_ppc64_pseries_defconfig index c2cf1afb0..91d0c528f 100644 --- a/buildroot/configs/qemu_ppc64_pseries_defconfig +++ b/buildroot/configs/qemu_ppc64_pseries_defconfig @@ -3,21 +3,27 @@ BR2_powerpc64=y BR2_powerpc_power7=y # System -BR2_TARGET_GENERIC_GETTY=y +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="hvc0" # Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_DEFCONFIG="pseries" BR2_LINUX_KERNEL_VMLINUX=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc64le_pseries_defconfig b/buildroot/configs/qemu_ppc64le_pseries_defconfig new file mode 100644 index 000000000..effc3cf8f --- /dev/null +++ b/buildroot/configs/qemu_ppc64le_pseries_defconfig @@ -0,0 +1,29 @@ +# Architecture +BR2_powerpc64le=y +BR2_powerpc_power8=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="hvc0" +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_DEFCONFIG="pseries_le" +BR2_LINUX_KERNEL_VMLINUX=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc_g3beige_defconfig b/buildroot/configs/qemu_ppc_g3beige_defconfig index a85e93ec1..c04260cf9 100644 --- a/buildroot/configs/qemu_ppc_g3beige_defconfig +++ b/buildroot/configs/qemu_ppc_g3beige_defconfig @@ -2,23 +2,32 @@ BR2_powerpc=y BR2_powerpc_750=y -# filesystem +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc_mac99_defconfig b/buildroot/configs/qemu_ppc_mac99_defconfig new file mode 100644 index 000000000..33e819426 --- /dev/null +++ b/buildroot/configs/qemu_ppc_mac99_defconfig @@ -0,0 +1,34 @@ +# Architecture +BR2_powerpc=y +BR2_powerpc_7400=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_DEFCONFIG="pmac32" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc-mac99/linux.fragment" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Serial port config +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc_mpc8544ds_defconfig b/buildroot/configs/qemu_ppc_mpc8544ds_defconfig index 33551ab61..98a10b353 100644 --- a/buildroot/configs/qemu_ppc_mpc8544ds_defconfig +++ b/buildroot/configs/qemu_ppc_mpc8544ds_defconfig @@ -2,22 +2,35 @@ BR2_powerpc=y BR2_powerpc_8548=y -# filesystem +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" -BR2_LINUX_KERNEL_DEFCONFIG="mpc85xx" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config" BR2_LINUX_KERNEL_VMLINUX=y # Serial port config BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_ppc_virtex_ml507_defconfig b/buildroot/configs/qemu_ppc_virtex_ml507_defconfig index c33aeecdb..6425e1a8b 100644 --- a/buildroot/configs/qemu_ppc_virtex_ml507_defconfig +++ b/buildroot/configs/qemu_ppc_virtex_ml507_defconfig @@ -6,19 +6,29 @@ BR2_powerpc_440=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Use soft float -BR2_SOFT_FLOAT=y +BR2_POWERPC_SOFT_FLOAT=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" -BR2_LINUX_KERNEL_DEFCONFIG="44x/virtex5" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config" BR2_LINUX_KERNEL_VMLINUX=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507" + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_riscv32_virt_defconfig b/buildroot/configs/qemu_riscv32_virt_defconfig new file mode 100644 index 000000000..166c41f1f --- /dev/null +++ b/buildroot/configs/qemu_riscv32_virt_defconfig @@ -0,0 +1,33 @@ +# Architecture +BR2_riscv=y +BR2_RISCV_32=y + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY=y +BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.1 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.1.12" +BR2_LINUX_KERNEL_DEFCONFIG="rv32" +BR2_LINUX_KERNEL_IMAGE=y + +# Bootloader +BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_PLAT="generic" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_riscv64_virt_defconfig b/buildroot/configs/qemu_riscv64_virt_defconfig new file mode 100644 index 000000000..01633d5ad --- /dev/null +++ b/buildroot/configs/qemu_riscv64_virt_defconfig @@ -0,0 +1,32 @@ +# Architecture +BR2_riscv=y +BR2_RISCV_64=y + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_IMAGE=y + +# Bootloader +BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_PLAT="generic" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_sh4_r2d_defconfig b/buildroot/configs/qemu_sh4_r2d_defconfig index fce1c4bcd..a465547c8 100644 --- a/buildroot/configs/qemu_sh4_r2d_defconfig +++ b/buildroot/configs/qemu_sh4_r2d_defconfig @@ -2,27 +2,30 @@ BR2_sh=y BR2_sh4=y -# system -BR2_TARGET_GENERIC_GETTY=y +# System +BR2_GLOBAL_PATCH_DIR="board/qemu/sh4-r2d/patches" +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttySC1" -# filesystem +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# The kernel wants to use the -m4-nofpu option to make sure that it -# doesn't use floating point operations. -BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-multilib-list=m4,m4-nofpu" +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Linux kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux.config" BR2_LINUX_KERNEL_ZIMAGE=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_sh4eb_r2d_defconfig b/buildroot/configs/qemu_sh4eb_r2d_defconfig new file mode 100644 index 000000000..24a9f2169 --- /dev/null +++ b/buildroot/configs/qemu_sh4eb_r2d_defconfig @@ -0,0 +1,30 @@ +# Architecture +BR2_sh=y +BR2_sh4eb=y + +# System +BR2_GLOBAL_PATCH_DIR="board/qemu/sh4eb-r2d/patches" +BR2_TARGET_GENERIC_GETTY_PORT="ttySC1" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Linux kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4eb-r2d/linux.config" +BR2_LINUX_KERNEL_ZIMAGE=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_sparc64_sun4u_defconfig b/buildroot/configs/qemu_sparc64_sun4u_defconfig new file mode 100644 index 000000000..254f2d924 --- /dev/null +++ b/buildroot/configs/qemu_sparc64_sun4u_defconfig @@ -0,0 +1,28 @@ +# Architecture +BR2_sparc64=y +BR2_sparc_v9=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Linux kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc64-sun4u/linux.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_sparc_ss10_defconfig b/buildroot/configs/qemu_sparc_ss10_defconfig index 8f2702b51..1fdebfced 100644 --- a/buildroot/configs/qemu_sparc_ss10_defconfig +++ b/buildroot/configs/qemu_sparc_ss10_defconfig @@ -2,21 +2,27 @@ BR2_sparc=y BR2_sparc_v8=y -BR2_GLOBAL_PATCH_DIR="board/qemu/sparc-ss10" +# System +BR2_SYSTEM_DHCP="eth0" -# filesystem +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Linux kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc-ss10/linux-3.18.config" -BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc-ss10/linux.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_x86_64_defconfig b/buildroot/configs/qemu_x86_64_defconfig index 4bc0b49e5..60b446861 100644 --- a/buildroot/configs/qemu_x86_64_defconfig +++ b/buildroot/configs/qemu_x86_64_defconfig @@ -1,22 +1,30 @@ # Architecture BR2_x86_64=y -# system -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" +# System +BR2_SYSTEM_DHCP="eth0" -# filesystem +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh" + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_x86_defconfig b/buildroot/configs/qemu_x86_defconfig index ce89ff71e..ef38d98dd 100644 --- a/buildroot/configs/qemu_x86_defconfig +++ b/buildroot/configs/qemu_x86_defconfig @@ -2,22 +2,30 @@ BR2_i386=y BR2_x86_pentiumpro=y -# system -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" +# System +BR2_SYSTEM_DHCP="eth0" -# filesystem +# Filesystem BR2_TARGET_ROOTFS_EXT2=y # BR2_TARGET_ROOTFS_TAR is not set -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86/post-build.sh" + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config" + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_xtensa_lx60_defconfig b/buildroot/configs/qemu_xtensa_lx60_defconfig index 8874c7c0d..79ae11d8f 100644 --- a/buildroot/configs/qemu_xtensa_lx60_defconfig +++ b/buildroot/configs/qemu_xtensa_lx60_defconfig @@ -1,30 +1,36 @@ # Architecture BR2_xtensa=y BR2_XTENSA_CUSTOM=y -BR2_XTENSA_CUSTOM_NAME="dc232b" -BR2_XTENSA_CORE_NAME="lx60" -BR2_XTENSA_OVERLAY_DIR="board/qemu/xtensa-lx60" - -BR2_GLOBAL_PATCH_DIR="board/qemu/xtensa-lx60" +BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" # System +BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" # Filesystem # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y -# Lock to 3.18 headers to avoid breaking with newer kernels -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.4" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.4" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux-3.18.config" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux.config" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_NAME="Image.elf" -BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qemu_xtensa_lx60_nommu_defconfig b/buildroot/configs/qemu_xtensa_lx60_nommu_defconfig new file mode 100644 index 000000000..09a388868 --- /dev/null +++ b/buildroot/configs/qemu_xtensa_lx60_nommu_defconfig @@ -0,0 +1,40 @@ +# Architecture +BR2_xtensa=y +BR2_XTENSA_CUSTOM=y +BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" + +# Toolchain +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set + +# System +BR2_SYSTEM_DHCP="eth0" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Filesystem +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.58" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux-nommu.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="Image.elf" +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" + +# Kernel needs mkimage +BR2_PACKAGE_HOST_UBOOT_TOOLS=y + +# host-qemu for gitlab testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y diff --git a/buildroot/configs/qmx6_defconfig b/buildroot/configs/qmx6_defconfig deleted file mode 100644 index 143e058cf..000000000 --- a/buildroot/configs/qmx6_defconfig +++ /dev/null @@ -1,16 +0,0 @@ -BR2_arm=y -BR2_cortex_a9=y -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.0.101" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y -BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/congatec/qmx6/post-build.sh" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.congatec.com/arm/qmx6_kernel.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.0.35_4.1.0_QMX6_R1.1.2" -BR2_LINUX_KERNEL_DEFCONFIG="qmx6" -BR2_LINUX_KERNEL_INSTALL_TARGET=y -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_3=y -BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/raspberrypi0_defconfig b/buildroot/configs/raspberrypi0_defconfig new file mode 100644 index 000000000..e4a704f2f --- /dev/null +++ b/buildroot/configs/raspberrypi0_defconfig @@ -0,0 +1,36 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_ARM_EABIHF=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" + +# Build the DTBs for A/B from the kernel sources: the zero is the same +# as the A+ model, just in a different form-factor +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y +# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi0/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi0/post-image.sh" diff --git a/buildroot/configs/raspberrypi0w_defconfig b/buildroot/configs/raspberrypi0w_defconfig new file mode 100644 index 000000000..d5670b19b --- /dev/null +++ b/buildroot/configs/raspberrypi0w_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_ARM_EABIHF=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero-w" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi0w/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi0w/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay" diff --git a/buildroot/configs/raspberrypi2_defconfig b/buildroot/configs/raspberrypi2_defconfig new file mode 100644 index 000000000..375cb8676 --- /dev/null +++ b/buildroot/configs/raspberrypi2_defconfig @@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=y +BR2_ARM_FPU_NEON_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y +# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi2/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi2/post-image.sh" diff --git a/buildroot/configs/raspberrypi3_64_defconfig b/buildroot/configs/raspberrypi3_64_defconfig new file mode 100644 index 000000000..9f9a14590 --- /dev/null +++ b/buildroot/configs/raspberrypi3_64_defconfig @@ -0,0 +1,37 @@ +BR2_aarch64=y +BR2_cortex_a53=y +BR2_ARM_FPU_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2837-rpi-3-b" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--aarch64 --add-miniuart-bt-overlay" diff --git a/buildroot/configs/raspberrypi3_defconfig b/buildroot/configs/raspberrypi3_defconfig new file mode 100644 index 000000000..1a1e7b3dd --- /dev/null +++ b/buildroot/configs/raspberrypi3_defconfig @@ -0,0 +1,37 @@ +BR2_arm=y +BR2_cortex_a53=y +BR2_ARM_FPU_NEON_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay" diff --git a/buildroot/configs/raspberrypi3_qt5we_defconfig b/buildroot/configs/raspberrypi3_qt5we_defconfig new file mode 100644 index 000000000..cbcbf6446 --- /dev/null +++ b/buildroot/configs/raspberrypi3_qt5we_defconfig @@ -0,0 +1,51 @@ +BR2_arm=y +BR2_cortex_a53=y +BR2_ARM_FPU_NEON_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Build Qt5 WebEngine +BR2_PACKAGE_LIBERATION=y +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_EXAMPLES=y +BR2_PACKAGE_QT5BASE_GIF=y +BR2_PACKAGE_QT5BASE_JPEG=y +BR2_PACKAGE_QT5BASE_PNG=y +BR2_PACKAGE_QT5WEBENGINE=y +BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NTP=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="400M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --gpu_mem_1024=200" diff --git a/buildroot/configs/raspberrypi4_64_defconfig b/buildroot/configs/raspberrypi4_64_defconfig new file mode 100644 index 000000000..f2b08f96a --- /dev/null +++ b/buildroot/configs/raspberrypi4_64_defconfig @@ -0,0 +1,38 @@ +BR2_aarch64=y +BR2_cortex_a72=y +BR2_ARM_FPU_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64" diff --git a/buildroot/configs/raspberrypi4_defconfig b/buildroot/configs/raspberrypi4_defconfig new file mode 100644 index 000000000..879ed0c1c --- /dev/null +++ b/buildroot/configs/raspberrypi4_defconfig @@ -0,0 +1,38 @@ +BR2_arm=y +BR2_cortex_a72=y +BR2_ARM_FPU_NEON_VFPV4=y + +BR2_TOOLCHAIN_BUILDROOT_CXX=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" + +# Build the DTB from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2711-rpi-4-b" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay" diff --git a/buildroot/configs/raspberrypi_defconfig b/buildroot/configs/raspberrypi_defconfig index 835657cbe..558c04ca6 100644 --- a/buildroot/configs/raspberrypi_defconfig +++ b/buildroot/configs/raspberrypi_defconfig @@ -1,22 +1,37 @@ BR2_arm=y BR2_arm1176jzf_s=y +BR2_ARM_EABIHF=y + +BR2_SYSTEM_DHCP="eth0" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y -BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y BR2_TOOLCHAIN_BUILDROOT_CXX=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,1c64f4bc22811d2d371b271daa3fb27895a8abdd)/linux-1c64f4bc22811d2d371b271daa3fb27895a8abdd.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" + +# Build the DTBs for A/B, A+/B+ and compute module from the kernel sources +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm" + +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_RPI_FIRMWARE=y +# BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS is not set -# Lock to 3.12 headers as the RPi kernel is based off the 3.12 branch -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.12.28" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="c256eb9968c8997dce47350d2075e42f1b3991d3" -BR2_LINUX_KERNEL_USE_DEFCONFIG=y -BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi_quick" -BR2_LINUX_KERNEL_ZIMAGE=y +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh" diff --git a/buildroot/configs/raspberrypi_dt_defconfig b/buildroot/configs/raspberrypi_dt_defconfig deleted file mode 100644 index 956b215c1..000000000 --- a/buildroot/configs/raspberrypi_dt_defconfig +++ /dev/null @@ -1,12 +0,0 @@ -BR2_arm=y -BR2_arm1176jzf_s=y -BR2_TARGET_GENERIC_GETTY_PORT="tty1" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="b9c9f8fc69aaba236169798c18dc1590fccf7acd" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi/linux-3.18-rpi-dt.defconfig" -BR2_LINUX_KERNEL_ZIMAGE=y -BR2_PACKAGE_RPI_FIRMWARE=y -BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y diff --git a/buildroot/configs/riotboard_defconfig b/buildroot/configs/riotboard_defconfig new file mode 100644 index 000000000..3efcd8859 --- /dev/null +++ b/buildroot/configs/riotboard_defconfig @@ -0,0 +1,42 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" + +# bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" +BR2_TARGET_UBOOT_BOARDNAME="riotboard" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# Linux headers same as kernel, a 4.18 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_18=y + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.10" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-riotboard" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# rootfs +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_ROOTFS_OVERLAY="board/embest/riotboard/rootfs_overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/embest/riotboard/genimage.cfg" diff --git a/buildroot/configs/roc_pc_rk3399_defconfig b/buildroot/configs/roc_pc_rk3399_defconfig new file mode 100644 index 000000000..dfbc5e4f4 --- /dev/null +++ b/buildroot/configs/roc_pc_rk3399_defconfig @@ -0,0 +1,55 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="roc-pc-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.18" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-roc-pc" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="roc-rk3399-pc" +BR2_TARGET_GENERIC_ISSUE="Welcome to ROC-RK3399-PC!" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="64M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/firefly/roc-rk3399-pc/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/firefly/roc-rk3399-pc/post-build.sh" diff --git a/buildroot/configs/rock64_defconfig b/buildroot/configs/rock64_defconfig new file mode 100644 index 000000000..30bf12c06 --- /dev/null +++ b/buildroot/configs/rock64_defconfig @@ -0,0 +1,38 @@ +BR2_aarch64=y +BR2_GLOBAL_PATCH_DIR="board/pine64/rock64/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS2" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/rock64/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/rock64/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.19" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3328-rock64" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="128M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v1.4" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/ayufan-rock64/linux-u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="2017.09-rockchip-ayufan-1035-gd646df03ac" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock64-rk3328" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin tpl/u-boot-tpl.bin" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/rock_pi_4_defconfig b/buildroot/configs/rock_pi_4_defconfig new file mode 100644 index 000000000..401a59bac --- /dev/null +++ b/buildroot/configs/rock_pi_4_defconfig @@ -0,0 +1,55 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/amarula/u-boot-amarula.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="cf2747360fdd1eb0d51dd01a984c7c62c7f714fe" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock-pi-4-rk3399" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.46" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399-rock-pi-4" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="rockpi4" +BR2_TARGET_GENERIC_ISSUE="Welcome to ROCK_PI_4" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="96M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/radxa/rockpi-4/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/radxa/rockpi-4/post-build.sh" diff --git a/buildroot/configs/rock_pi_n10_defconfig b/buildroot/configs/rock_pi_n10_defconfig new file mode 100644 index 000000000..c622839c8 --- /dev/null +++ b/buildroot/configs/rock_pi_n10_defconfig @@ -0,0 +1,55 @@ +# Architecture +BR2_aarch64=y +BR2_cortex_a72_a53=y + +# Linux headers same as kernel, a 5.7 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="11a0a46a899fcc3b1fdb214b382f3d7495d88eca" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3399" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/amarula/u-boot-amarula.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="cf2747360fdd1eb0d51dd01a984c7c62c7f714fe" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rock-pi-n10-rk3399pro" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="idbloader.img" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.2" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3399pro-rock-pi-n10" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Filesystem +BR2_TARGET_GENERIC_HOSTNAME="rockpi-n10" +BR2_TARGET_GENERIC_ISSUE="Welcome to ROCKPI-N10" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="160M" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/radxa/rockpi-n10/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/radxa/rockpi-n10/post-build.sh" diff --git a/buildroot/configs/roseapplepi_defconfig b/buildroot/configs/roseapplepi_defconfig new file mode 100644 index 000000000..d315a02e1 --- /dev/null +++ b/buildroot/configs/roseapplepi_defconfig @@ -0,0 +1,43 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y + +BR2_GLOBAL_PATCH_DIR="board/roseapplepi/patches" +# Linux headers same as kernel, a 3.10 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y +# kernel does not build with gcc 8.x +BR2_GCC_VERSION_7_X=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/roseapplepi/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/roseapplepi/genimage.cfg" + +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,xapp-le,kernel,59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b)/linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="actduino_bubble_gum_linux" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="actduino_bubble_gum_sdboot_linux" + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Bootloaders +BR2_TARGET_S500_BOOTLOADER=y +BR2_TARGET_S500_BOOTLOADER_BOARD="linux/bubble_gum_sd" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/xapp-le/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="a035d2673a90143a1a74557503b2e137b1447ae6" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="actduino_bubble_gum_v10" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y + +# Required tools to create the SD image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/s6lx9_microboard_defconfig b/buildroot/configs/s6lx9_microboard_defconfig index c54f3f491..97b2d3fe7 100644 --- a/buildroot/configs/s6lx9_microboard_defconfig +++ b/buildroot/configs/s6lx9_microboard_defconfig @@ -1,10 +1,13 @@ BR2_microblaze=y BR2_microblazeel=y +# Linux headers same as kernel, a 4.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y BR2_TARGET_GENERIC_GETTY_PORT="ttyUL0" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_ROOTFS_INITRAMFS=y BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.4.7" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/avnet/s6lx9_microboard/lx9_mmu_defconfig" -BR2_LINUX_KERNEL_USE_CUSTOM_DTS=y BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/avnet/s6lx9_microboard/lx9_mmu.dts" diff --git a/buildroot/configs/sheevaplug_defconfig b/buildroot/configs/sheevaplug_defconfig index 5422f673c..052e39398 100644 --- a/buildroot/configs/sheevaplug_defconfig +++ b/buildroot/configs/sheevaplug_defconfig @@ -5,28 +5,28 @@ BR2_arm926t=y # system BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_SYSTEM_DHCP="eth0" # filesystem BR2_TARGET_ROOTFS_JFFS2=y -BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K=y +BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K=y -# Lock down headers to avoid breaking with new defaults -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.18.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y # bootloader BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="sheevaplug" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sheevaplug" BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.07" BR2_TARGET_UBOOT_FORMAT_KWB=y # BR2_TARGET_UBOOT_NETWORK is not set # Kernel BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.63" BR2_LINUX_KERNEL_DEFCONFIG="mvebu_v5" BR2_LINUX_KERNEL_APPENDED_UIMAGE=y BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" diff --git a/buildroot/configs/snps_aarch64_vdk_defconfig b/buildroot/configs/snps_aarch64_vdk_defconfig new file mode 100644 index 000000000..b55dce1ad --- /dev/null +++ b/buildroot/configs/snps_aarch64_vdk_defconfig @@ -0,0 +1,12 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y +BR2_TARGET_GENERIC_HOSTNAME="vdk-buildroot" +BR2_TARGET_GENERIC_ISSUE="Welcome to SNPS VDK by Buildroot" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/synopsys/vdk/linux-vdk-aarch64-defconfig" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/buildroot/configs/snps_arc700_axs101_defconfig b/buildroot/configs/snps_arc700_axs101_defconfig new file mode 100644 index 000000000..080250e92 --- /dev/null +++ b/buildroot/configs/snps_arc700_axs101_defconfig @@ -0,0 +1,27 @@ +# Architecture +BR2_arcle=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="axs101" +BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC Software Development Platform" +BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/synopsys/axs10x/post-build.sh" + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="axs101" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="axs101" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/snps_archs38_axs103_defconfig b/buildroot/configs/snps_archs38_axs103_defconfig new file mode 100644 index 000000000..c5847809b --- /dev/null +++ b/buildroot/configs/snps_archs38_axs103_defconfig @@ -0,0 +1,28 @@ +# Architecture +BR2_arcle=y +BR2_archs38=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="axs103" +BR2_TARGET_GENERIC_ISSUE="Welcome to the ARC Software Development Platform" +BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/synopsys/axs10x/post-build.sh" + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="axs103_smp" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="axs103" +BR2_TARGET_UBOOT_NEEDS_DTC=y diff --git a/buildroot/configs/snps_archs38_haps_defconfig b/buildroot/configs/snps_archs38_haps_defconfig new file mode 100644 index 000000000..a95d760df --- /dev/null +++ b/buildroot/configs/snps_archs38_haps_defconfig @@ -0,0 +1,18 @@ +# Architecture +BR2_arcle=y +BR2_archs38=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="zebu_hs" +BR2_TARGET_GENERIC_ISSUE="Welcome to the HAPS Development Platform" +BR2_TARGET_ROOTFS_INITRAMFS=y + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="haps_hs_smp" +BR2_LINUX_KERNEL_VMLINUX=y diff --git a/buildroot/configs/snps_archs38_hsdk_defconfig b/buildroot/configs/snps_archs38_hsdk_defconfig new file mode 100644 index 000000000..af7cba6c2 --- /dev/null +++ b/buildroot/configs/snps_archs38_hsdk_defconfig @@ -0,0 +1,40 @@ +# Architecture +BR2_arcle=y +BR2_archs38_full=y + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="hsdk" +BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform" +BR2_SYSTEM_DHCP="eth0" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="hsdk" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment" + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/synopsys/hsdk/genimage.cfg" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="hsdk" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_ELF=y +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/synopsys/hsdk/uboot.env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x4000" diff --git a/buildroot/configs/snps_archs38_vdk_defconfig b/buildroot/configs/snps_archs38_vdk_defconfig new file mode 100644 index 000000000..8d8e9f755 --- /dev/null +++ b/buildroot/configs/snps_archs38_vdk_defconfig @@ -0,0 +1,20 @@ +# Architecture +BR2_arcle=y +BR2_archs38=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="archs38_vdk" +BR2_TARGET_GENERIC_ISSUE="Welcome to the HS38 VDK Software Development Platform" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/synopsys/axs10x/post-build.sh" +BR2_TARGET_ROOTFS_EXT2=y + +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="vdk_hs38_smp" +BR2_LINUX_KERNEL_VMLINUX=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y diff --git a/buildroot/configs/socrates_cyclone5_defconfig b/buildroot/configs/socrates_cyclone5_defconfig new file mode 100644 index 000000000..4c659263d --- /dev/null +++ b/buildroot/configs/socrates_cyclone5_defconfig @@ -0,0 +1,31 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_NEON=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_16=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/altera/socrates_cyclone5/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" +BR2_LINUX_KERNEL_DEFCONFIG="socfpga" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="socfpga_cyclone5_socrates" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.03" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="socfpga_socrates" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC=y +BR2_TARGET_UBOOT_ENVIMAGE=y +BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/altera/socrates_cyclone5/boot-env.txt" +BR2_TARGET_UBOOT_ENVIMAGE_SIZE="8192" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/solidrun_clearfog_defconfig b/buildroot/configs/solidrun_clearfog_defconfig new file mode 100644 index 000000000..b73b9e8ec --- /dev/null +++ b/buildroot/configs/solidrun_clearfog_defconfig @@ -0,0 +1,42 @@ +# Architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_NEON=y + +# Linux headers same as kernel, a 4.20 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_20=y + +# System configuration +BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/clearfog/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/solidrun/clearfog/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.20" +BR2_LINUX_KERNEL_DEFCONFIG="mvebu_v7" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/solidrun/clearfog/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="armada-388-clearfog-base" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_PACKAGE_HOST_GENIMAGE=y + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="clearfog" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-spl.kwb" diff --git a/buildroot/configs/solidrun_clearfog_gt_8k_defconfig b/buildroot/configs/solidrun_clearfog_gt_8k_defconfig new file mode 100644 index 000000000..8804ce047 --- /dev/null +++ b/buildroot/configs/solidrun_clearfog_gt_8k_defconfig @@ -0,0 +1,45 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_2=y +BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K" + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/atf-marvell.git" +# This commit corresponds to release armada-18.12.2 +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="9484123bfe29011ed44b717a23eb53a70b97ce3d" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="USE_COHERENT_MEM=0" +BR2_TARGET_BINARIES_MARVELL=y +BR2_TARGET_MV_DDR_MARVELL=y + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="clearfog_gt_8k" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/solidrun/clearfog_gt_8k/uboot-fragment.config" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.2.14" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/solidrun/clearfog_gt_8k/linux-extras.config" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-8040-clearfog-gt-8k" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# rootfs +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/clearfog_gt_8k/post-build-mainline.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/solidrun/clearfog_gt_8k/genimage.cfg" diff --git a/buildroot/configs/solidrun_macchiatobin_defconfig b/buildroot/configs/solidrun_macchiatobin_defconfig new file mode 100644 index 000000000..f1ca7764b --- /dev/null +++ b/buildroot/configs/solidrun_macchiatobin_defconfig @@ -0,0 +1,48 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y +BR2_TARGET_GENERIC_HOSTNAME="mcbin" +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for Marvell MacchiatoBin" + +# Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/atf-marvell.git" +# This commit corresponds to release armada-18.12.2 +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="9484123bfe29011ed44b717a23eb53a70b97ce3d" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="USE_COHERENT_MEM=0" +BR2_TARGET_BINARIES_MARVELL=y +BR2_TARGET_MV_DDR_MARVELL=y + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_USE_DEFCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mvebu_mcbin-88f8040" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/solidrun/macchiatobin/uboot-fragment.config" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="marvell/armada-8040-mcbin" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/solidrun/macchiatobin/linux-extras.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# rootfs +BR2_TARGET_ROOTFS_TAR=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/solidrun/macchiatobin/genimage.cfg" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/solidrun/macchiatobin/post-build-mainline.sh" diff --git a/buildroot/configs/stm32f429_disco_defconfig b/buildroot/configs/stm32f429_disco_defconfig new file mode 100644 index 000000000..2c0641a6c --- /dev/null +++ b/buildroot/configs/stm32f429_disco_defconfig @@ -0,0 +1,18 @@ +BR2_arm=y +BR2_cortex_m4=y +BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f429-disco/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" +BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f429-disco" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_TARGET_ROOTFS_INITRAMFS=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_AFBOOT_STM32=y +BR2_PACKAGE_HOST_OPENOCD=y diff --git a/buildroot/configs/stm32f469_disco_defconfig b/buildroot/configs/stm32f469_disco_defconfig new file mode 100644 index 000000000..9760d5187 --- /dev/null +++ b/buildroot/configs/stm32f469_disco_defconfig @@ -0,0 +1,19 @@ +BR2_arm=y +BR2_cortex_m4=y +BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" +BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_TARGET_ROOTFS_INITRAMFS=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_AFBOOT_STM32=y +BR2_PACKAGE_HOST_OPENOCD=y diff --git a/buildroot/configs/stm32mp157a_dk1_defconfig b/buildroot/configs/stm32mp157a_dk1_defconfig new file mode 100644 index 000000000..be5ea7581 --- /dev/null +++ b/buildroot/configs/stm32mp157a_dk1_defconfig @@ -0,0 +1,31 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157a-dk1/linux.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157a-dk1" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^metadata_csum" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config" +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157a-dk1" +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/stm32mp157c_dk2_defconfig b/buildroot/configs/stm32mp157c_dk2_defconfig new file mode 100644 index 000000000..86e1551a3 --- /dev/null +++ b/buildroot/configs/stm32mp157c_dk2_defconfig @@ -0,0 +1,31 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y +BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.10" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^metadata_csum" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config" +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2" +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/telit_evk_pro3_defconfig b/buildroot/configs/telit_evk_pro3_defconfig deleted file mode 100644 index 29a8d2a5e..000000000 --- a/buildroot/configs/telit_evk_pro3_defconfig +++ /dev/null @@ -1,34 +0,0 @@ -# Architecture -BR2_arm=y -BR2_arm926t=y - -# Toolchain -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.9.1" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y - -# System -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y - -# Watchdog is armed by the first stage bootloader -BR2_PACKAGE_BUSYBOX_WATCHDOG=y - -# Filesystem -BR2_TARGET_ROOTFS_UBIFS=y -BR2_TARGET_ROOTFS_UBI=y - -# Bootloader -BR2_TARGET_BAREBOX=y -BR2_TARGET_BAREBOX_CUSTOM_VERSION=y -BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE="2013.04.0" -BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/telit/evk-pro3" -BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="telit_evk_pro3" - -# Kernel -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.9.1" -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/telit/evk-pro3/linux-3.9.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="evk-pro3" diff --git a/buildroot/configs/toradex_apalis_imx6_defconfig b/buildroot/configs/toradex_apalis_imx6_defconfig new file mode 100644 index 000000000..40a2d2d52 --- /dev/null +++ b/buildroot/configs/toradex_apalis_imx6_defconfig @@ -0,0 +1,25 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/toradex/apalis-imx6/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.toradex.com/linux-toradex.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d899927728beca8357a5b4120b690cb3c1d80844" +BR2_LINUX_KERNEL_DEFCONFIG="apalis_imx6" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-apalis-eval imx6q-apalis-ixora imx6q-apalis-ixora-v1.1" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.toradex.com/u-boot-toradex.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="30a1208727729dae22cb42f9ba9ba17efe5e6f77" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="apalis_imx6" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/ts4900_defconfig b/buildroot/configs/ts4900_defconfig new file mode 100644 index 000000000..e7950cea4 --- /dev/null +++ b/buildroot/configs/ts4900_defconfig @@ -0,0 +1,16 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_12=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/technologic/ts4900/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.12" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-ts4900" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_TS4900_FPGA=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/ts5500_defconfig b/buildroot/configs/ts5500_defconfig new file mode 100644 index 000000000..871c02e95 --- /dev/null +++ b/buildroot/configs/ts5500_defconfig @@ -0,0 +1,26 @@ +# architecture +BR2_i386=y +BR2_x86_i586=y + +# Linux headers same as kernel, a 4.14 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" +BR2_ROOTFS_OVERLAY="board/technologic/ts5500/fs-overlay" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/technologic/ts5500/linux-4.14.config" +BR2_LINUX_KERNEL_INSTALL_TARGET=y + +# rootfs +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# bootloader +BR2_TARGET_SYSLINUX=y +BR2_TARGET_SYSLINUX_MBR=y diff --git a/buildroot/configs/ts5x00_defconfig b/buildroot/configs/ts5x00_defconfig deleted file mode 100644 index 336f6d936..000000000 --- a/buildroot/configs/ts5x00_defconfig +++ /dev/null @@ -1,14 +0,0 @@ -BR2_i386=y -BR2_x86_i586=y -BR2_KERNEL_HEADERS_3_17=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" -BR2_ROOTFS_OVERLAY="board/ts/ts5x00/fs-overlay" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_SAME_AS_HEADERS=y -BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/ts/ts5x00/linux-3.17.config" -BR2_LINUX_KERNEL_INSTALL_TARGET=y -BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_SYSLINUX=y -BR2_TARGET_SYSLINUX_MBR=y diff --git a/buildroot/configs/ts7680_defconfig b/buildroot/configs/ts7680_defconfig new file mode 100644 index 000000000..7eb57ab1c --- /dev/null +++ b/buildroot/configs/ts7680_defconfig @@ -0,0 +1,16 @@ +BR2_arm=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/technologic/ts7680/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,embeddedarm,linux-4.9.y,d03d426e6abd95a973bc669315206295713c17e8)/linux-d03d426e6abd95a973bc669315206295713c17e8.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="ts_imx28" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx28-ts7680" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_GENIMAGE=y diff --git a/buildroot/configs/wandboard_defconfig b/buildroot/configs/wandboard_defconfig index 0a6ba5072..4882042a1 100644 --- a/buildroot/configs/wandboard_defconfig +++ b/buildroot/configs/wandboard_defconfig @@ -1,24 +1,33 @@ BR2_arm=y BR2_cortex_a9=y -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.0.101" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y +# Linux headers same as kernel, a 5.6 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/wandboard/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/wandboard/genimage.cfg" BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="wandboard_dl" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.denx.de/u-boot-imx.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="326ea986ac150acdc7656d57fca647db80b50158" -BR2_TARGET_UBOOT_FORMAT_CUSTOM=y -BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.imx" -BR2_TARGET_UBOOT_ENVIMAGE=y -BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/wandboard/uboot-env.txt" -BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x2000" +BR2_TARGET_UBOOT_BOARDNAME="wandboard" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.04" +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="SPL" BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://repo.or.cz/wandboard.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="86429847b5152f040f190015faedcac49b243328" -BR2_LINUX_KERNEL_DEFCONFIG="wandboard" +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-wandboard imx6dl-wandboard imx6q-wandboard-revb1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1 imx6qp-wandboard-revd1" BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/buildroot/configs/warp7_defconfig b/buildroot/configs/warp7_defconfig new file mode 100644 index 000000000..76d2801b7 --- /dev/null +++ b/buildroot/configs/warp7_defconfig @@ -0,0 +1,51 @@ +# architecture +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y + +# Linux headers same as kernel, a 5.7 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y + +# system +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# rootfs overlay +BR2_ROOTFS_OVERLAY="board/warp7/rootfs_overlay" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.8" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7s-warp" +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + +# U-Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="warp7" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.07" +BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y + +# wifi firmware for brcm43430 +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# wireless packages +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/warpboard_defconfig b/buildroot/configs/warpboard_defconfig new file mode 100644 index 000000000..1655381aa --- /dev/null +++ b/buildroot/configs/warpboard_defconfig @@ -0,0 +1,58 @@ +# architecture +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 4.9 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y + +# system +BR2_TARGET_GENERIC_HOSTNAME="warpboard" +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# rootfs overlay +BR2_ROOTFS_OVERLAY="board/freescale/warpboard/rootfs_overlay" + +# kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/freescale/warpboard/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6sl-warp" + +# wifi firmware for brcm4330 +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y + +# For automatic firmware loading +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y + +# wireless packages +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y + +# uboot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="warp" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.11" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# host utility +BR2_PACKAGE_HOST_DFU_UTIL=y +BR2_PACKAGE_HOST_IMX_USB_LOADER=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/zedboard_defconfig b/buildroot/configs/zedboard_defconfig deleted file mode 100644 index e0e7760bd..000000000 --- a/buildroot/configs/zedboard_defconfig +++ /dev/null @@ -1,26 +0,0 @@ -BR2_arm=y -BR2_cortex_a9=y -BR2_ARM_ENABLE_NEON=y -BR2_KERNEL_HEADERS_VERSION=y -BR2_DEFAULT_KERNEL_VERSION="3.8" -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" -BR2_LINUX_KERNEL=y -BR2_LINUX_KERNEL_CUSTOM_GIT=y -BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Xilinx/linux-xlnx.git" -BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="xilinx-v2014.1" -BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq" -BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" -BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zed" -BR2_TARGET_ROOTFS_CPIO=y -BR2_TARGET_ROOTFS_CPIO_GZIP=y -BR2_TARGET_ROOTFS_CPIO_UIMAGE=y -BR2_TARGET_UBOOT=y -BR2_TARGET_UBOOT_BOARDNAME="zynq_zed" -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/Xilinx/u-boot-xlnx.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2014.1" -BR2_TARGET_UBOOT_FORMAT_IMG=y -BR2_TARGET_UBOOT_SPL=y -BR2_TARGET_UBOOT_SPL_NAME="boot.bin" diff --git a/buildroot/configs/zynq_microzed_defconfig b/buildroot/configs/zynq_microzed_defconfig new file mode 100644 index 000000000..1bb11fee7 --- /dev/null +++ b/buildroot/configs/zynq_microzed_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynq/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xilinx-v2017.3)/linux-xilinx-v2017.3.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zed" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/Xilinx/u-boot-xlnx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2018.2" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_microzed" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/zynq_qmtech_defconfig b/buildroot/configs/zynq_qmtech_defconfig new file mode 100644 index 000000000..4db3f68b1 --- /dev/null +++ b/buildroot/configs/zynq_qmtech_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_GLOBAL_PATCH_DIR="board/qmtech/zynq/patches" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynq/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xilinx-v2019.2.01)/linux-xilinx-v2019.2.01.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-qmtech" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,jolivain,u-boot-xlnx,xilinx-v2019.2.qmtech.1)/uboot-xilinx-v2019.2.qmtech.1.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_qmtech" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/zynq_zc706_defconfig b/buildroot/configs/zynq_zc706_defconfig new file mode 100644 index 000000000..e8019177d --- /dev/null +++ b/buildroot/configs/zynq_zc706_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynq/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xilinx-v2017.3)/linux-xilinx-v2017.3.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynq" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zc706" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/Xilinx/u-boot-xlnx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2018.2" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_zc706" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/zynq_zed_defconfig b/buildroot/configs/zynq_zed_defconfig new file mode 100644 index 000000000..a215695b5 --- /dev/null +++ b/buildroot/configs/zynq_zed_defconfig @@ -0,0 +1,32 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_16=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynq/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zed" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/Xilinx/u-boot-xlnx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="xilinx-v2018.2" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_zed" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/configs/zynqmp_zcu106_defconfig b/buildroot/configs/zynqmp_zcu106_defconfig new file mode 100644 index 000000000..bee7c1daf --- /dev/null +++ b/buildroot/configs/zynqmp_zcu106_defconfig @@ -0,0 +1,34 @@ +BR2_aarch64=y +BR2_GLOBAL_PATCH_DIR="board/zynqmp/patches/" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/Xilinx/linux-xlnx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="xilinx-v2017.4" +BR2_LINUX_KERNEL_DEFCONFIG="xilinx_zynqmp" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/zynqmp-zcu106-revA" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/ARM-software/arm-trusted-firmware.git" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="v1.5" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="zynqmp" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/xilinx/u-boot-xlnx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="228801a215909365ae1dcdd799034195ad7264f7" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="xilinx_zynqmp_zcu106_revA" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin" +BR2_TARGET_UBOOT_ZYNQMP=y +BR2_TARGET_UBOOT_ZYNQMP_PMUFW="https://github.com/lucaceresoli/zynqmp-pmufw-binaries/raw/53fdb7b6c92860ceb0ec5fd14deee302f4a84269/bin/pmufw-zcu106-default-v2017.4.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/buildroot/docs/images b/buildroot/docs/images new file mode 120000 index 000000000..7356350c8 --- /dev/null +++ b/buildroot/docs/images @@ -0,0 +1 @@ +website/images \ No newline at end of file diff --git a/buildroot/docs/images/boundary-devices-logo.png b/buildroot/docs/images/boundary-devices-logo.png deleted file mode 100644 index 35d7a9319..000000000 Binary files a/buildroot/docs/images/boundary-devices-logo.png and /dev/null differ diff --git a/buildroot/docs/images/calao-logo.png b/buildroot/docs/images/calao-logo.png deleted file mode 100644 index c01ecf675..000000000 Binary files a/buildroot/docs/images/calao-logo.png and /dev/null differ diff --git a/buildroot/docs/images/circuitco-logo.png b/buildroot/docs/images/circuitco-logo.png deleted file mode 100644 index 8b315da4d..000000000 Binary files a/buildroot/docs/images/circuitco-logo.png and /dev/null differ diff --git a/buildroot/docs/images/fluendo-logo.png b/buildroot/docs/images/fluendo-logo.png deleted file mode 100644 index b4d02cb66..000000000 Binary files a/buildroot/docs/images/fluendo-logo.png and /dev/null differ diff --git a/buildroot/docs/images/free-electrons-logo.png b/buildroot/docs/images/free-electrons-logo.png deleted file mode 100644 index a5c7d8a85..000000000 Binary files a/buildroot/docs/images/free-electrons-logo.png and /dev/null differ diff --git a/buildroot/docs/images/glyphicons-halflings-white.png b/buildroot/docs/images/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a2..000000000 Binary files a/buildroot/docs/images/glyphicons-halflings-white.png and /dev/null differ diff --git a/buildroot/docs/images/glyphicons-halflings.png b/buildroot/docs/images/glyphicons-halflings.png deleted file mode 100644 index a99699932..000000000 Binary files a/buildroot/docs/images/glyphicons-halflings.png and /dev/null differ diff --git a/buildroot/docs/images/google-logo.png b/buildroot/docs/images/google-logo.png deleted file mode 100644 index bceab1661..000000000 Binary files a/buildroot/docs/images/google-logo.png and /dev/null differ diff --git a/buildroot/docs/images/gplus.png b/buildroot/docs/images/gplus.png deleted file mode 100644 index 0ec57bbe2..000000000 Binary files a/buildroot/docs/images/gplus.png and /dev/null differ diff --git a/buildroot/docs/images/imgtec-logo.png b/buildroot/docs/images/imgtec-logo.png deleted file mode 100644 index f8a0ffa37..000000000 Binary files a/buildroot/docs/images/imgtec-logo.png and /dev/null differ diff --git a/buildroot/docs/images/logo.xcf b/buildroot/docs/images/logo.xcf deleted file mode 100644 index 97248904b..000000000 Binary files a/buildroot/docs/images/logo.xcf and /dev/null differ diff --git a/buildroot/docs/images/logo_small.png b/buildroot/docs/images/logo_small.png deleted file mode 100644 index eab954022..000000000 Binary files a/buildroot/docs/images/logo_small.png and /dev/null differ diff --git a/buildroot/docs/images/menuconfig.png b/buildroot/docs/images/menuconfig.png deleted file mode 100644 index dffddfa46..000000000 Binary files a/buildroot/docs/images/menuconfig.png and /dev/null differ diff --git a/buildroot/docs/images/menuconfig_small.png b/buildroot/docs/images/menuconfig_small.png deleted file mode 100644 index dffddfa46..000000000 Binary files a/buildroot/docs/images/menuconfig_small.png and /dev/null differ diff --git a/buildroot/docs/images/mind-logo.png b/buildroot/docs/images/mind-logo.png deleted file mode 100644 index ecc3fa09e..000000000 Binary files a/buildroot/docs/images/mind-logo.png and /dev/null differ diff --git a/buildroot/docs/images/synopsys-logo.png b/buildroot/docs/images/synopsys-logo.png deleted file mode 100644 index d4fbd89a1..000000000 Binary files a/buildroot/docs/images/synopsys-logo.png and /dev/null differ diff --git a/buildroot/docs/images/valid-html401.png b/buildroot/docs/images/valid-html401.png deleted file mode 100644 index ec9bc0ce0..000000000 Binary files a/buildroot/docs/images/valid-html401.png and /dev/null differ diff --git a/buildroot/docs/manual/adding-packages-asciidoc.txt b/buildroot/docs/manual/adding-packages-asciidoc.txt index 6e2178696..f9688b36c 100644 --- a/buildroot/docs/manual/adding-packages-asciidoc.txt +++ b/buildroot/docs/manual/adding-packages-asciidoc.txt @@ -19,9 +19,9 @@ Although Buildroot only contains one document written in AsciiDoc, there is, as for packages, an infrastructure for rendering documents using the AsciiDoc syntax. -Also as for packages, the AsciiDoc infrastructure is available from -xref:outside-br-custom[BR2_EXTERNAL]. This allows documentation for a -BR2_EXTERNAL tree to match the Buildroot documentation, as it will be +Also as for packages, the AsciiDoc infrastructure is available from a +xref:outside-br-custom[br2-external tree]. This allows documentation for +a br2-external tree to match the Buildroot documentation, as it will be rendered to the same formats and use the same layout and theme. ==== +asciidoc-document+ tutorial @@ -63,6 +63,9 @@ information is (assuming the document name is +foo+) : to one or more directories containing so-called resources (like CSS or images). By default, empty. +* +FOO_DEPENDENCIES+, optional, the list of packages (most probably, + host-packages) that must be built before building this document. + There are also additional hooks (see xref:hooks[] for general information on hooks), that a document may set to define extra actions to be done at various steps: diff --git a/buildroot/docs/manual/adding-packages-cargo.txt b/buildroot/docs/manual/adding-packages-cargo.txt new file mode 100644 index 000000000..8fcc80bcc --- /dev/null +++ b/buildroot/docs/manual/adding-packages-cargo.txt @@ -0,0 +1,109 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Integration of Cargo-based packages + +Cargo is the package manager for the Rust programming language. It allows the +user to build programs or libraries written in Rust, but it also downloads and +manages their dependencies, to ensure repeatable builds. Cargo packages are +called "crates". + +[[cargo-package-tutorial]] + +==== Cargo-based package's +Config.in+ file + +The +Config.in+ file of Cargo-based package 'foo' should contain: + +--------------------------- +01: config BR2_PACKAGE_FOO +02: bool "foo" +03: depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS +04: select BR2_PACKAGE_HOST_RUSTC +05: help +06: This is a comment that explains what foo is. +07: +08: http://foosoftware.org/foo/ +--------------------------- + +==== Cargo-based package's +.mk+ file + +Buildroot does not (yet) provide a dedicated package infrastructure for +Cargo-based packages. So, we will explain how to write a +.mk+ file for such a +package. Let's start with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-3.0+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-rustc +14: +15: FOO_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo +16: +17: FOO_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(FOO_CARGO_MODE) +18: +19: FOO_CARGO_OPTS = \ +20: $(if $(BR2_ENABLE_DEBUG),,--release) \ +21: --target=$(RUSTC_TARGET_NAME) \ +22: --manifest-path=$(@D)/Cargo.toml +23: +24: define FOO_BUILD_CMDS +25: $(TARGET_MAKE_ENV) $(FOO_CARGO_ENV) \ +26: cargo build $(FOO_CARGO_OPTS) +27: endef +28: +29: define FOO_INSTALL_TARGET_CMDS +30: $(INSTALL) -D -m 0755 $(@D)/$(FOO_BIN_DIR)/foo \ +31: $(TARGET_DIR)/usr/bin/foo +32: endef +33: +34: $(eval $(generic-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +As seen in line 34, it is based on the +xref:generic-package-tutorial[+generic-package+ infrastructure]. So, it defines +the variables required by this particular infrastructure, where Cargo is +invoked: + +* +FOO_BUILD_CMDS+: Cargo is invoked to perform the build. The options required + to configure the cross-compilation of the package are passed via + +FOO_CONF_OPTS+. + +* +FOO_INSTALL_TARGET_CMDS+: The binary executable generated is installed on + the target. + +In order to have Cargo available for the build, +FOO_DEPENDENCIES+ needs to +contain +host-cargo+. + +To sum it up, to add a new Cargo-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables. + +==== About Dependencies Management + +A crate can depend on other libraries from crates.io or git repositories, listed +in its Cargo.toml file. Before starting a build, Cargo usually downloads +automatically them. This step can also be performed independently, via the ++cargo fetch+ command. + +Cargo maintains a local cache of the registry index and of git checkouts of the +crates, whose location is given by +$CARGO_HOME+. As seen in the package +Makefile example at line 15, this environment variable is set to ++$(HOST_DIR)/share/cargo+. + +This dependency download mechanism is not convenient when performing an offline +build, as Cargo will fail to fetch the dependencies. In that case, it is advised +to generate a tarball of the dependencies using the +cargo vendor+ and add it to ++FOO_EXTRA_DOWNLOADS+. diff --git a/buildroot/docs/manual/adding-packages-cmake.txt b/buildroot/docs/manual/adding-packages-cmake.txt index d92b2090f..6ccf3902f 100644 --- a/buildroot/docs/manual/adding-packages-cmake.txt +++ b/buildroot/docs/manual/adding-packages-cmake.txt @@ -107,6 +107,10 @@ typical packages will therefore only use a few of them. ** +BUILD_EXAMPLE+, +BUILD_EXAMPLES+ are disabled; ** +BUILD_TEST+, +BUILD_TESTS+, +BUILD_TESTING+ are disabled. +* +LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO+ should be set when the package + cannot be built inside the source tree but needs a separate build + directory. + * +LIBFOO_MAKE+, to specify an alternate +make+ command. This is typically useful when parallel make is enabled in the configuration (using +BR2_JLEVEL+) but that this feature should be disabled for diff --git a/buildroot/docs/manual/adding-packages-directory.txt b/buildroot/docs/manual/adding-packages-directory.txt index 8a88282aa..4ceb3fd77 100644 --- a/buildroot/docs/manual/adding-packages-directory.txt +++ b/buildroot/docs/manual/adding-packages-directory.txt @@ -7,37 +7,56 @@ First of all, create a directory under the +package+ directory for your software, for example +libfoo+. Some packages have been grouped by topic in a sub-directory: -+x11r7+, +efl+ and +matchbox+. If your package fits in ++x11r7+, +qt5+ and +gstreamer+. If your package fits in one of these categories, then create your package directory in these. New subdirectories are discouraged, however. +=== Config files -=== +Config.in+ file +For the package to be displayed in the configuration tool, you need to +create a Config file in your package directory. There are two types: ++Config.in+ and +Config.in.host+. -Then, create a file named +Config.in+. This file will contain the -option descriptions related to our +libfoo+ software that will be used -and displayed in the configuration tool. It should basically contain: +==== +Config.in+ file + +For packages used on the target, create a file named +Config.in+. This +file will contain the option descriptions related to our +libfoo+ software +that will be used and displayed in the configuration tool. It should basically +contain: --------------------------- config BR2_PACKAGE_LIBFOO bool "libfoo" help - This is a comment that explains what libfoo is. + This is a comment that explains what libfoo is. The help text + should be wrapped. http://foosoftware.org/libfoo/ --------------------------- The +bool+ line, +help+ line and other metadata information about the configuration option must be indented with one tab. The help text -itself should be indented with one tab and two spaces, and it must -mention the upstream URL of the project. - -You can add other sub-options into a +if -BR2_PACKAGE_LIBFOO...endif+ statement to configure particular things -in your software. You can look at examples in other packages. The -syntax of the +Config.in+ file is the same as the one for the kernel -Kconfig file. The documentation for this syntax is available at -http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[] +itself should be indented with one tab and two spaces, lines should +be wrapped to fit 72 columns, where tab counts for 8, so 62 characters +in the text itself. The help text must mention the upstream URL of the +project after an empty line. + +As a convention specific to Buildroot, the ordering of the attributes +is as follows: + +1. The type of option: +bool+, +string+... with the prompt +2. If needed, the +default+ value(s) +3. Any dependencies on the target in +depends on+ form +4. Any dependencies on the toolchain in +depends on+ form +5. Any dependencies on other packages in +depends on+ form +6. Any dependency of the +select+ form +7. The help keyword and help text. + +You can add other sub-options into a +if BR2_PACKAGE_LIBFOO...endif+ +statement to configure particular things in your software. You can look at +examples in other packages. The syntax of the +Config.in+ file is the same +as the one for the kernel Kconfig file. The documentation for this syntax is +available at http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[] Finally you have to add your new +libfoo/Config.in+ to +package/Config.in+ (or in a category subdirectory if you decided to @@ -49,6 +68,42 @@ supposed to contain anything but the 'bare' name of the package. source "package/libfoo/Config.in" -------------------------- + +==== +Config.in.host+ file + +Some packages also need to be built for the host system. There are two +options here: + +* The host package is only required to satisfy build-time + dependencies of one or more target packages. In this case, add + +host-foo+ to the target package's +BAR_DEPENDENCIES+ variable. No + +Config.in.host+ file should be created. + +* The host package should be explicitly selectable by the user from + the configuration menu. In this case, create a +Config.in.host+ file + for that host package: ++ +--------------------------- +config BR2_PACKAGE_HOST_FOO + bool "host foo" + help + This is a comment that explains what foo for the host is. + + http://foosoftware.org/foo/ +--------------------------- ++ +The same coding style and options as for the +Config.in+ file are valid. ++ +Finally you have to add your new +libfoo/Config.in.host+ to ++package/Config.in.host+. The files included there are 'sorted alphabetically' +and are 'NOT' supposed to contain anything but the 'bare' name of the package. ++ +-------------------------- +source "package/foo/Config.in.host" +-------------------------- ++ +The host package will then be available from the +Host utilities+ menu. + [[depends-on-vs-select]] ==== Choosing +depends on+ or +select+ @@ -82,20 +137,21 @@ is not met. An example illustrates both the usage of +select+ and +depends on+. -------------------------- -config BR2_PACKAGE_ACL - bool "acl" - select BR2_PACKAGE_ATTR - depends on BR2_LARGEFILE +config BR2_PACKAGE_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBART + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_ZLIB help - POSIX Access Control Lists, which are used to define more - fine-grained discretionary access rights for files and - directories. - This package also provides libacl. + RRDtool is the OpenSource industry standard, high performance + data logging and graphing system for time series data. - http://savannah.nongnu.org/projects/acl + http://oss.oetiker.ch/rrdtool/ -comment "acl needs a toolchain w/ largefile" - depends on !BR2_LARGEFILE +comment "rrdtool needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR -------------------------- @@ -164,10 +220,9 @@ coding style]. ==== Dependencies on target and toolchain options Many packages depend on certain options of the toolchain: the choice of -C library, C++ support, largefile support, thread support, RPC support, -IPv6 support, wchar support, or dynamic library support. Some packages -can only be built on certain target architectures, or if an MMU is -available in the processor. +C library, C++ support, thread support, RPC support, wchar support, +or dynamic library support. Some packages can only be built on certain +target architectures, or if an MMU is available in the processor. These dependencies have to be expressed with the appropriate 'depends on' statements in the Config.in file. Additionally, for dependencies on @@ -199,7 +254,7 @@ foo needs a toolchain w/ featA, featB, featC for example: -------------------------- -aircrack-ng needs a toolchain w/ largefile, threads +mpd needs a toolchain w/ C++, threads, wchar -------------------------- or @@ -223,31 +278,57 @@ use in the comment. ** Dependency symbol: +BR2_USE_MMU+ ** Comment string: no comment to be added -* Atomic instructions (whereby the architecture has instructions to - perform some operations atomically, like LOCKCMPXCHG on x86) -** Dependency symbol: +BR2_ARCH_HAS_ATOMICS+ +* Gcc +__sync_*+ built-ins used for atomic operations. They are + available in variants operating on 1 byte, 2 bytes, 4 bytes and 8 + bytes. Since different architectures support atomic operations on + different sizes, one dependency symbol is available for each size: +** Dependency symbol: +BR2_TOOLCHAIN_HAS_SYNC_1+ for 1 byte, + +BR2_TOOLCHAIN_HAS_SYNC_2+ for 2 bytes, + +BR2_TOOLCHAIN_HAS_SYNC_4+ for 4 bytes, +BR2_TOOLCHAIN_HAS_SYNC_8+ + for 8 bytes. +** Comment string: no comment to be added + +* Gcc +__atomic_*+ built-ins used for atomic operations. +** Dependency symbol: +BR2_TOOLCHAIN_HAS_ATOMIC+. ** Comment string: no comment to be added * Kernel headers ** Dependency symbol: +BR2_TOOLCHAIN_HEADERS_AT_LEAST_X_Y+, (replace - +X_Y+ with the proper version, see +toolchain/toolchain-common.in+) + +X_Y+ with the proper version, see +toolchain/Config.in+) ** Comment string: +headers >= X.Y+ and/or `headers <= X.Y` (replace +X.Y+ with the proper version) +* GCC version +** Dependency symbol: +BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y+, (replace + +X_Y+ with the proper version, see +toolchain/Config.in+) +** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace + +X.Y+ with the proper version) + +* Host GCC version +** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace + +X_Y+ with the proper version, see +Config.in+) +** Comment string: no comment to be added +** Note that it is usually not the package itself that has a minimum + host GCC version, but rather a host-package on which it depends. + * C library ** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+, +BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+ ** Comment string: for the C library, a slightly different comment text - is used: +foo needs an (e)glibc toolchain+, or `foo needs an (e)glibc + is used: +foo needs a glibc toolchain+, or `foo needs a glibc toolchain w/ C++` * C++ support ** Dependency symbol: +BR2_INSTALL_LIBSTDCPP+ ** Comment string: `C++` -* largefile support -** Dependency symbol: +BR2_LARGEFILE+ -** Comment string: +largefile+ +* D support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_DLANG+ +** Comment string: `Dlang` + +* Fortran support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_FORTRAN+ +** Comment string: `fortran` * thread support ** Dependency symbol: +BR2_TOOLCHAIN_HAS_THREADS+ @@ -262,10 +343,6 @@ use in the comment. ** Dependency symbol: +BR2_TOOLCHAIN_HAS_NATIVE_RPC+ ** Comment string: +RPC+ -* IPv6 support -** Dependency symbol: +BR2_INET_IPV6+ -** Comment string: +IPv6+ (lowercase v) - * wchar support ** Dependency symbol: +BR2_USE_WCHAR+ ** Comment string: +wchar+ @@ -315,9 +392,6 @@ openGL libraries. See xref:virtual-package-tutorial[] for more on the virtual packages. -See xref:virtual-package-list[] for the symbols to depend on if your package -depends on a feature provided by a virtual package. - === The +.mk+ file [[adding-packages-mk]] @@ -371,24 +445,38 @@ rules]. [[adding-packages-hash]] === The +.hash+ file -Optionally, you can add a third file, named +libfoo.hash+, that contains -the hashes of the downloaded files for the +libfoo+ package. +When possible, you must add a third file, named +libfoo.hash+, that +contains the hashes of the downloaded files for the +libfoo+ +package. The only reason for not adding a +.hash+ file is when hash +checking is not possible due to how the package is downloaded. + +When a package has a version selection choice, then the hash file may be +stored in a subdirectory named after the version, e.g. ++package/libfoo/1.2.3/libfoo.hash+. This is especially important if the +different versions have different licensing terms, but they are stored +in the same file. Otherwise, the hash file should stay in the package's +directory. The hashes stored in that file are used to validate the integrity of the -downloaded files. +downloaded files and of the license files. The format of this file is one line for each file for which to check the -hash, each line being space-separated, with these three fields: +hash, each line with the following three fields separated by two spaces: * the type of hash, one of: -** +sha1+, +sha224+, +sha256+, +sha384+, +sha512+ +** +md5+, +sha1+, +sha224+, +sha256+, +sha384+, +sha512+, +none+ * the hash of the file: +** for +none+, one or more non-space chars, usually just the string +xxx+ +** for +md5+, 32 hexadecimal characters ** for +sha1+, 40 hexadecimal characters ** for +sha224+, 56 hexadecimal characters ** for +sha256+, 64 hexadecimal characters ** for +sha384+, 96 hexadecimal characters ** for +sha512+, 128 hexadecimal characters -* the name of the file, without any directory component +* the name of the file: +** for a source archive: the basename of the file, without any directory + component, +** for a license file: the path as it appears in +FOO_LICENSE_FILES+. Lines starting with a +#+ sign are considered comments, and ignored. Empty lines are ignored. @@ -396,28 +484,48 @@ lines are ignored. There can be more than one hash for a single file, each on its own line. In this case, all hashes must match. +.Note Ideally, the hashes stored in this file should match the hashes published by upstream, e.g. on their website, in the e-mail announcement... If upstream -provides more than one type of hash (say, +sha1+ and +sha512+), then it is +provides more than one type of hash (e.g. +sha1+ and +sha512+), then it is best to add all those hashes in the +.hash+ file. If upstream does not -provide any hash, then compute at least one yourself, and mention this in a -comment line above the hashes. +provide any hash, or only provides an +md5+ hash, then compute at least one +strong hash yourself (preferably +sha256+, but not +md5+), and mention +this in a comment line above the hashes. + +.Note +The hashes for license files are used to detect a license change when a +package version is bumped. The hashes are checked during the make legal-info +target run. For a package with multiple versions (like Qt5), +create the hash file in a subdirectory ++ of that package +(see also xref:patch-apply-order[]). -*Note:* the number of spaces does not matter, so one can use spaces to -properly align the different fields. +The +none+ hash type is reserved to those archives downloaded from a +repository, like a 'git clone', a 'subversion checkout'... The example below defines a +sha1+ and a +sha256+ published by upstream for -the main +libfoo-1.2.3.tar.bz2+ tarball, plus two locally-computed hashes, -a +sha256+ for a downloaded patch, and a +sha1+ for a downloaded binary blob: +the main +libfoo-1.2.3.tar.bz2+ tarball, an +md5+ from upstream and a +locally-computed +sha256+ hashes for a binary blob, a +sha256+ for a +downloaded patch, and an archive with no hash: ---- # Hashes from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.{sha1,sha256}: -sha1 486fb55c3efa71148fe07895fd713ea3a5ae343a libfoo-1.2.3.tar.bz2 -sha256 efc8103cc3bcb06bda6a781532d12701eb081ad83e8f90004b39ab81b65d4369 libfoo-1.2.3.tar.bz2 +sha1 486fb55c3efa71148fe07895fd713ea3a5ae343a libfoo-1.2.3.tar.bz2 +sha256 efc8103cc3bcb06bda6a781532d12701eb081ad83e8f90004b39ab81b65d4369 libfoo-1.2.3.tar.bz2 + +# md5 from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.md5, sha256 locally computed: +md5 2d608f3c318c6b7557d551a5a09314f03452f1a1 libfoo-data.bin +sha256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b libfoo-data.bin + +# Locally computed: +sha256 ff52101fb90bbfc3fe9475e425688c660f46216d7e751c4bbdb1dc85cdccacb9 libfoo-fix-blabla.patch + +# No hash for 1234: +none xxx libfoo-1234.tar.gz -# No upstream hashes for the following: -sha256 ff52101fb90bbfc3fe9475e425688c660f46216d7e751c4bbdb1dc85cdccacb9 libfoo-fix-blabla.patch -sha1 2d608f3c318c6b7557d551a5a09314f03452f1a1 libfoo-data.bin +# Hash for license files: +sha256 a45a845012742796534f7e91fe623262ccfb99460a2bd04015bd28d66fba95b8 COPYING +sha256 01b1f9f2c8ee648a7a596a1abe8aa4ed7899b1c9e5551bda06da6e422b04aa55 doc/COPYING.LGPL ---- If the +.hash+ file is present, and it contains one or more hashes for a @@ -427,9 +535,22 @@ not match, Buildroot considers this an error, deletes the downloaded file, and aborts. If the +.hash+ file is present, but it does not contain a hash for a -downloaded file, no check is done for that file. If you set the -environment variable +BR2_ENFORCE_CHECK_HASH+ to a non-empty value, and -there is no hash for a downloaded file, Buildroot considers this an -error, deletes the downloaded file, and aborts. +downloaded file, Buildroot considers this an error and aborts. However, +the downloaded file is left in the download directory since this +typically indicates that the +.hash+ file is wrong but the downloaded +file is probably OK. + +Hashes are currently checked for files fetched from http/ftp servers, +Git repositories, files copied using scp and local files. Hashes are +not checked for other version control systems (such as Subversion, +CVS, etc.) because Buildroot currently does not generate reproducible +tarballs when source code is fetched from such version control +systems. + +Hashes should only be added in +.hash+ files for files that are +guaranteed to be stable. For example, patches auto-generated by Github +are not guaranteed to be stable, and therefore their hashes can change +over time. Such patches should not be downloaded, and instead be added +locally to the package folder. If the +.hash+ file is missing, then no check is done at all. diff --git a/buildroot/docs/manual/adding-packages-generic.txt b/buildroot/docs/manual/adding-packages-generic.txt index e3029ed87..b8bfcb4af 100644 --- a/buildroot/docs/manual/adding-packages-generic.txt +++ b/buildroot/docs/manual/adding-packages-generic.txt @@ -22,14 +22,14 @@ system is based on hand-written Makefiles or shell scripts. 07: LIBFOO_VERSION = 1.0 08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz 09: LIBFOO_SITE = http://www.foosoftware.org/download -10: LIBFOO_LICENSE = GPLv3+ +10: LIBFOO_LICENSE = GPL-3.0+ 11: LIBFOO_LICENSE_FILES = COPYING 12: LIBFOO_INSTALL_STAGING = YES 13: LIBFOO_CONFIG_SCRIPTS = libfoo-config 14: LIBFOO_DEPENDENCIES = host-libaaa libbbb 15: 16: define LIBFOO_BUILD_CMDS -17: $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all +17: $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all 18: endef 19: 20: define LIBFOO_INSTALL_STAGING_CMDS @@ -43,16 +43,16 @@ system is based on hand-written Makefiles or shell scripts. 28: $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d 29: endef 30: -31: define LIBFOO_DEVICES -32: /dev/foo c 666 0 0 42 0 - - - +31: define LIBFOO_USERS +32: foo -1 libfoo -1 * - - - LibFoo daemon 33: endef 34: -35: define LIBFOO_PERMISSIONS -36: /bin/foo f 4755 0 0 - - - - - +35: define LIBFOO_DEVICES +36: /dev/foo c 666 0 0 42 0 - - - 37: endef 38: -39: define LIBFOO_USERS -40: foo -1 libfoo -1 * - - - LibFoo daemon +39: define LIBFOO_PERMISSIONS +40: /bin/foo f 4755 foo libfoo - - - - - 41: endef 42: 43: $(eval $(generic-package)) @@ -142,15 +142,15 @@ All these steps rely on the +$(@D)+ variable, which contains the directory where the source code of the package has been extracted. -On line 31..33, we define a device-node file used by this package +On lines 31..33, we define a user that is used by this package (e.g. +to run a daemon as non-root) (+LIBFOO_USERS+). + +On line 35..37, we define a device-node file used by this package (+LIBFOO_DEVICES+). -On line 35..37, we define the permissions to set to specific files +On line 39..41, we define the permissions to set to specific files installed by this package (+LIBFOO_PERMISSIONS+). -On lines 39..41, we define a user that is used by this package (e.g. -to run a daemon as non-root) (+LIBFOO_USERS+). - Finally, on line 43, we call the +generic-package+ function, which generates, according to the variables defined previously, all the Makefile code necessary to make your package working. @@ -179,8 +179,10 @@ some tools to be installed on the host. If the package name is variables of other packages, if they depend on +libfoo+ or +host-libfoo+. -The call to the +generic-package+ and/or +host-generic-package+ macro *must* be -at the end of the +.mk+ file, after all variable definitions. +The call to the +generic-package+ and/or +host-generic-package+ macro +*must* be at the end of the +.mk+ file, after all variable definitions. +The call to +host-generic-package+ *must* be after the call to ++generic-package+, if any. For the target package, the +generic-package+ uses the variables defined by the .mk file and prefixed by the uppercased package name: @@ -197,27 +199,42 @@ information is (assuming the package name is +libfoo+) : * +LIBFOO_VERSION+, mandatory, must contain the version of the package. Note that if +HOST_LIBFOO_VERSION+ doesn't exist, it is assumed to be the same as +LIBFOO_VERSION+. It can also be a - revision number, branch or tag for packages that are fetched - directly from their revision control system. + - Examples: + - +LIBFOO_VERSION = 0.1.2+ + - +LIBFOO_VERSION = cb9d6aa9429e838f0e54faa3d455bcbab5eef057+ + - +LIBFOO_VERSION = stable+ - -* +LIBFOO_SOURCE+ may contain the name of the tarball of - the package. If +HOST_LIBFOO_SOURCE+ is not specified, it - defaults to +LIBFOO_SOURCE+. If none are specified, then - the value is assumed to be - +libfoo-$(LIBFOO_VERSION).tar.gz+. + + revision number or a tag for packages that are fetched directly + from their version control system. Examples: + ** a version for a release tarball: +LIBFOO_VERSION = 0.1.2+ + ** a sha1 for a git tree: +LIBFOO_VERSION = cb9d6aa9429e838f0e54faa3d455bcbab5eef057+ + ** a tag for a git tree +LIBFOO_VERSION = v0.1.2+ ++ +.Note: +Using a branch name as +FOO_VERSION+ is not supported, because it does +not and can not work as people would expect it should: ++ + 1. due to local caching, Buildroot will not re-fetch the repository, + so people who expect to be able to follow the remote repository + would be quite surprised and disappointed; + 2. because two builds can never be perfectly simultaneous, and because + the remote repository may get new commits on the branch anytime, + two users, using the same Buildroot tree and building the same + configuration, may get different source, thus rendering the build + non reproducible, and people would be quite surprised and + disappointed. + +* +LIBFOO_SOURCE+ may contain the name of the tarball of the package, + which Buildroot will use to download the tarball from + +LIBFOO_SITE+. If +HOST_LIBFOO_SOURCE+ is not specified, it defaults + to +LIBFOO_SOURCE+. If none are specified, then the value is assumed + to be +libfoo-$(LIBFOO_VERSION).tar.gz+. + Example: +LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2+ * +LIBFOO_PATCH+ may contain a space-separated list of patch file - names, that will be downloaded from the same location as the tarball - indicated in +LIBFOO_SOURCE+, and then applied to the package source - code. If +HOST_LIBFOO_PATCH+ is not specified, it defaults to - +LIBFOO_PATCH+. Note that patches that are included in Buildroot + names, that Buildroot will download and apply to the package source + code. If an entry contains +://+, then Buildroot will assume it is a + full URL and download the patch from this location. Otherwise, + Buildroot will assume that the patch should be downloaded from + +LIBFOO_SITE+. If +HOST_LIBFOO_PATCH+ is not specified, it defaults + to +LIBFOO_PATCH+. Note that patches that are included in Buildroot itself use a different mechanism: all files of the form - +-*.patch+ present in the package directory inside + +*.patch+ present in the package directory inside Buildroot will be applied to the package after extraction (see xref:patch-policy[patching a package]). Finally, patches listed in the +LIBFOO_PATCH+ variable are applied _before_ the patches stored @@ -225,7 +242,9 @@ information is (assuming the package name is +libfoo+) : * +LIBFOO_SITE+ provides the location of the package, which can be a URL or a local filesystem path. HTTP, FTP and SCP are supported URL - types for retrieving package tarballs. Git, Subversion, Mercurial, + types for retrieving package tarballs. In these cases don't include a + trailing slash: it will be added by Buildroot between the directory + and the filename as appropriate. Git, Subversion, Mercurial, and Bazaar are supported URL types for retrieving packages directly from source code management systems. There is a helper function to make it easier to download source tarballs from GitHub (refer to @@ -242,15 +261,24 @@ information is (assuming the package name is +libfoo+) : +LIBFOO_SITE+. Examples: + +LIBFOO_SITE=http://www.libfoosoftware.org/libfoo+ + - +LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor/+ + + +LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor+ + +LIBFOO_SITE=/opt/software/libfoo.tar.gz+ + - +LIBFOO_SITE=$(TOPDIR)/../src/libfoo/+ - -* +LIBFOO_EXTRA_DOWNLOADS+ lists a number of additional files that - Buildroot should download from +LIBFOO_SITE+ in addition to the main - +LIBFOO_SOURCE+ (which usually is a tarball). Buildroot will not do - anything with those additional files, except download files: it will - be up to the package recipe to use them from +$(BR2_DL_DIR)+. + +LIBFOO_SITE=$(TOPDIR)/../src/libfoo+ + +* +LIBFOO_DL_OPTS+ is a space-separated list of additional options to + pass to the downloader. Useful for retrieving documents with + server-side checking for user logins and passwords, or to use a proxy. + All download methods valid for +LIBFOO_SITE_METHOD+ are supported; + valid options depend on the download method (consult the man page + for the respective download utilities). + +* +LIBFOO_EXTRA_DOWNLOADS+ is a space-separated list of additional + files that Buildroot should download. If an entry contains +://+ + then Buildroot will assume it is a complete URL and will download + the file using this URL. Otherwise, Buildroot will assume the file + to be downloaded is located at +LIBFOO_SITE+. Buildroot will not do + anything with those additional files, except download them: it will + be up to the package recipe to use them from +$(LIBFOO_DL_DIR)+. * +LIBFOO_SITE_METHOD+ determines the method used to fetch or copy the package source code. In many cases, Buildroot guesses the method @@ -273,10 +301,17 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+. Both + +LIBFOO_SITE=cvs://libfoo.net:/cvsroot/libfoo+ and + +LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo+ + are accepted, on the former anonymous pserver access mode is + assumed. +LIBFOO_SITE+ 'must' contain the source URL as well as the remote repository directory. The module is the package name. - +LIBFOO_VERSION+ is 'mandatory' and 'must' be a timestamp. + +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag, a branch, or + a date (e.g. "2014-10-20", "2014-10-20 13:45", "2014-10-20 + 13:45+01" see "man cvs" for further details). ** +git+ for retrieving source code from a Git repository. Used by default when +LIBFOO_SITE+ begins with +git://+. The downloaded source code is cached as with the +svn+ @@ -295,14 +330,55 @@ information is (assuming the package name is +libfoo+) : ** +local+ for a local source code directory. One should use this when +LIBFOO_SITE+ specifies a local directory path containing the package source code. Buildroot copies the contents of the - source directory into the package's build directory. + source directory into the package's build directory. Note that + for +local+ packages, no patches are applied. If you need to + still patch the source code, use +LIBFOO_POST_RSYNC_HOOKS+, see + xref:hooks-rsync[]. + +* +LIBFOO_GIT_SUBMODULES+ can be set to +YES+ to create an archive + with the git submodules in the repository. This is only available + for packages downloaded with git (i.e. when + +LIBFOO_SITE_METHOD=git+). Note that we try not to use such git + submodules when they contain bundled libraries, in which case we + prefer to use those libraries from their own package. + +* +LIBFOO_STRIP_COMPONENTS+ is the number of leading components + (directories) that tar must strip from file names on extraction. + The tarball for most packages has one leading component named + "-", thus Buildroot passes + --strip-components=1 to tar to remove it. + For non-standard packages that don't have this component, or + that have more than one leading component to strip, set this + variable with the value to be passed to tar. Default: 1. + +* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude + when extracting the archive. Each item from that list is passed as + a tar's +--exclude+ option. By default, empty. * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package name) that are required for the current target package to compile. These dependencies are guaranteed to be compiled and - installed before the configuration of the current package starts. In - a similar way, +HOST_LIBFOO_DEPENDENCIES+ lists the dependencies for - the current host package. + installed before the configuration of the current package starts. + However, modifications to configuration of these dependencies will + not force a rebuild of the current package. In a similar way, + +HOST_LIBFOO_DEPENDENCIES+ lists the dependencies for the current + host package. + +* +LIBFOO_EXTRACT_DEPENDENCIES+ lists the dependencies (in terms of + package name) that are required for the current target package to be + extracted. These dependencies are guaranteed to be compiled and + installed before the extract step of the current package + starts. This is only used internally by the package infrastructure, + and should typically not be used directly by packages. + +* +LIBFOO_PATCH_DEPENDENCIES+ lists the dependencies (in terms of + package name) that are required for the current package to be + patched. These dependencies are guaranteed to be extracted and + patched (but not necessarily built) before the current package is + patched. In a similar way, +HOST_LIBFOO_PATCH_DEPENDENCIES+ lists + the dependencies for the current host package. + This is seldom used; usually, +LIBFOO_DEPENDENCIES+ is what you + really want to use. * +LIBFOO_PROVIDES+ lists all the virtual packages +libfoo+ is an implementation of. See xref:virtual-package-tutorial[]. @@ -347,12 +423,25 @@ information is (assuming the package name is +libfoo+) : * +LIBFOO_LICENSE+ defines the license (or licenses) under which the package is released. This name will appear in the manifest file produced by +make legal-info+. - If the license appears in xref:legal-info-list-licenses[the following list], - use the same string to make the manifest file uniform. + If the license appears in https://spdx.org/licenses/[the SPDX License List], + use the SPDX short identifier to make the manifest file uniform. Otherwise, describe the license in a precise and concise way, avoiding ambiguous names such as +BSD+ which actually name a family of licenses. This variable is optional. If it is not defined, +unknown+ will appear in - the +license+ field of the manifest file for this package. + the +license+ field of the manifest file for this package. + + The expected format for this variable must comply with the following rules: + ** If different parts of the package are released under different + licenses, then +comma+ separate licenses (e.g. +`LIBFOO_LICENSE = + GPL-2.0+, LGPL-2.1+`+). If there is clear distinction between which + component is licensed under what license, then annotate the license + with that component, between parenthesis (e.g. +`LIBFOO_LICENSE = + GPL-2.0+ (programs), LGPL-2.1+ (libraries)`+). + ** If some licenses are conditioned on a sub-option being enabled, append + the conditional licenses with a comma (e.g.: `FOO_LICENSE += , GPL-2.0+ + (programs)`); the infrastructure will internally remove the space before + the comma. + ** If the package is dual licensed, then separate licenses with the + +or+ keyword (e.g. +`LIBFOO_LICENSE = AFL-2.1 or GPL-2.0+`+). * +LIBFOO_LICENSE_FILES+ is a space-separated list of files in the package tarball that contain the license(s) under which the package is released. @@ -362,6 +451,25 @@ information is (assuming the package name is +libfoo+) : to let you know, and +not saved+ will appear in the +license files+ field of the manifest file for this package. +* +LIBFOO_ACTUAL_SOURCE_TARBALL+ only applies to packages whose + +LIBFOO_SITE+ / +LIBFOO_SOURCE+ pair points to an archive that does + not actually contain source code, but binary code. This a very + uncommon case, only known to apply to external toolchains which come + already compiled, although theoretically it might apply to other + packages. In such cases a separate tarball is usually available with + the actual source code. Set +LIBFOO_ACTUAL_SOURCE_TARBALL+ to the + name of the actual source code archive and Buildroot will download + it and use it when you run +make legal-info+ to collect + legally-relevant material. Note this file will not be downloaded + during regular builds nor by +make source+. + +* +LIBFOO_ACTUAL_SOURCE_SITE+ provides the location of the actual + source tarball. The default value is +LIBFOO_SITE+, so you don't + need to set this variable if the binary and source archives are + hosted on the same directory. If +LIBFOO_ACTUAL_SOURCE_TARBALL+ is + not set, it doesn't make sense to define + +LIBFOO_ACTUAL_SOURCE_SITE+. + * +LIBFOO_REDISTRIBUTE+ can be set to +YES+ (default) or +NO+ to indicate if the package source code is allowed to be redistributed. Set it to +NO+ for non-opensource packages: Buildroot will not save the source code for this @@ -373,6 +481,27 @@ information is (assuming the package name is +libfoo+) : FLAT binary format is only 4k bytes. If the application consumes more stack, append the required number here. +* +LIBFOO_BIN_ARCH_EXCLUDE+ is a space-separated list of paths (relative + to the target directory) to ignore when checking that the package + installs correctly cross-compiled binaries. You seldom need to set this + variable, unless the package installs binary blobs outside the default + locations, `/lib/firmware`, `/usr/lib/firmware`, `/lib/modules`, + `/usr/lib/modules`, and `/usr/share`, which are automatically excluded. + +* +LIBFOO_IGNORE_CVES+ is a space-separated list of CVEs that tells + Buildroot CVE tracking tools which CVEs should be ignored for this + package. This is typically used when the CVE is fixed by a patch in + the package, or when the CVE for some reason does not affect the + Buildroot package. A Makefile comment must always precede the + addition of a CVE to this variable. Example: + +---------------------- +# 0001-fix-cve-2020-12345.patch +LIBFOO_IGNORE_CVES += CVE-2020-12345 +# only when built with libbaz, which Buildroot doesn't support +LIBFOO_IGNORE_CVES += CVE-2020-54321 +---------------------- + The recommended way to define these variables is to use the following syntax: @@ -427,12 +556,34 @@ different steps of the build process. should utilize this step if it has binaries which would be similar to the kernel image, bootloader or root filesystem images. -* +LIBFOO_INSTALL_INIT_SYSV+ and +LIBFOO_INSTALL_INIT_SYSTEMD+ list the - actions to install init scripts either for the systemV-like init systems - (busybox, sysvinit, etc.) or for the systemd units. These commands - will be run only when the relevant init system is installed (i.e. if - systemd is selected as the init system in the configuration, only - +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run). +* +LIBFOO_INSTALL_INIT_SYSV+, +LIBFOO_INSTALL_INIT_OPENRC+ and + +LIBFOO_INSTALL_INIT_SYSTEMD+ list the actions to install init + scripts either for the systemV-like init systems (busybox, + sysvinit, etc.), openrc or for the systemd units. These commands + will be run only when the relevant init system is installed (i.e. + if systemd is selected as the init system in the configuration, + only +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run). The only exception + is when openrc is chosen as init system and +LIBFOO_INSTALL_INIT_OPENRC+ + has not been set, in such situation +LIBFOO_INSTALL_INIT_SYSV+ will + be called, since openrc supports sysv init scripts. + When systemd is used as the init system, buildroot will automatically enable + all services using the +systemctl preset-all+ command in the final phase of + image building. You can add preset files to prevent a particular unit from + being automatically enabled by buildroot. + +* +LIBFOO_HELP_CMDS+ lists the actions to print the package help, which + is included to the main +make help+ output. These commands can print + anything in any format. + This is seldom used, as packages rarely have custom rules. *Do not use + this variable*, unless you really know that you need to print help. + +* +LIBFOO_LINUX_CONFIG_FIXUPS+ lists the Linux kernel configuration + options that are needed to build and use this package, and without + which the package is fundamentally broken. This shall be a set of + calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`, + `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`. + This is seldom used, as package usually have no strict requirements on + the kernel options. The preferred way to define these variables is: @@ -446,15 +597,30 @@ endef In the action definitions, you can use the following variables: +* +$(LIBFOO_PKGDIR)+ contains the path to the directory containing the + +libfoo.mk+ and +Config.in+ files. This variable is useful when it is + necessary to install a file bundled in Buildroot, like a runtime + configuration file, a splashscreen image... + * +$(@D)+, which contains the directory in which the package source code has been uncompressed. +* +$(LIBFOO_DL_DIR)+ contains the path to the directory where all the downloads + made by Buildroot for +libfoo+ are stored in. + * +$(TARGET_CC)+, +$(TARGET_LD)+, etc. to get the target cross-compilation utilities * +$(TARGET_CROSS)+ to get the cross-compilation toolchain prefix * Of course the +$(HOST_DIR)+, +$(STAGING_DIR)+ and +$(TARGET_DIR)+ - variables to install the packages properly. + variables to install the packages properly. Those variables point to + the global _host_, _staging_ and _target_ directories, unless + _per-package directory_ support is used, in which case they point to + the current package _host_, _staging_ and _target_ directories. In + both cases, it doesn't make any difference from the package point of + view: it should simply use +HOST_DIR+, +STAGING_DIR+ and + +TARGET_DIR+. See xref:top-level-parallel-build[] for more details + about _per-package directory_ support. Finally, you can also use hooks. See xref:hooks[] for more information. diff --git a/buildroot/docs/manual/adding-packages-gettext.txt b/buildroot/docs/manual/adding-packages-gettext.txt index c955b1fa0..e9c6968e7 100644 --- a/buildroot/docs/manual/adding-packages-gettext.txt +++ b/buildroot/docs/manual/adding-packages-gettext.txt @@ -7,53 +7,54 @@ Many packages that support internationalization use the gettext library. Dependencies for this library are fairly complicated and therefore, deserve some explanation. -The 'uClibc' C library doesn't implement gettext functionality; -therefore with this C library, a separate gettext must be compiled, -which is provided by the additional +libintl+ library, part of the +The 'glibc' C library integrates a full-blown implementation of +'gettext', supporting translation. Native Language Support is +therefore built-in in 'glibc'. + +On the other hand, the 'uClibc' and 'musl' C libraries only provide a +stub implementation of the gettext functionality, which allows to +compile libraries and programs using gettext functions, but without +providing the translation capabilities of a full-blown gettext +implementation. With such C libraries, if real Native Language Support +is necessary, it can be provided by the +libintl+ library of the +gettext+ package. -On the other hand, the 'glibc' C library does integrate its own -gettext library functions, so it is not necessary to build a separate -+libintl+ library. +Due to this, and in order to make sure that Native Language Support is +properly handled, packages in Buildroot that can use NLS support +should: -However, certain packages need some gettext utilities on the target, +1. Ensure NLS support is enabled when +BR2_SYSTEM_ENABLE_NLS=y+. This + is done automatically for 'autotools' packages and therefore should + only be done for packages using other package infrastructures. + +1. Add +$(TARGET_NLS_DEPENDENCIES)+ to the package + +_DEPENDENCIES+ variable. This addition should be done + unconditionally: the value of this variable is automatically + adjusted by the core infrastructure to contain the relevant list of + packages. If NLS support is disabled, this variable is empty. If + NLS support is enabled, this variable contains +host-gettext+ so + that tools needed to compile translation files are available on the + host. In addition, if 'uClibc' or 'musl' are used, this variable + also contains +gettext+ in order to get the full-blown 'gettext' + implementation. + +1. If needed, add +$(TARGET_NLS_LIBS)+ to the linker flags, so that + the package gets linked with +libintl+. This is generally not + needed with 'autotools' packages as they usually detect + automatically that they should link with +libintl+. However, + packages using other build systems, or problematic autotools-based + packages may need this. +$(TARGET_NLS_LIBS)+ should be added + unconditionally to the linker flags, as the core automatically + makes it empty or defined to +-lintl+ depending on the + configuration. + +No changes should be made to the +Config.in+ file to support NLS. + +Finally, certain packages need some gettext utilities on the target, such as the +gettext+ program itself, which allows to retrieve -translated strings, from the command line. - -Additionally, some packages (such as +libglib2+) do require gettext -functions unconditionally, while other packages (in general, those who -support +--disable-nls+) only require gettext functions when locale -support is enabled. - -Therefore, Buildroot defines two configuration options: - -* +BR2_NEEDS_GETTEXT+, which is true as soon as the toolchain doesn't - provide its own gettext implementation - -* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which is true if the toolchain - doesn't provide its own gettext implementation and if locale support - is enabled - -Packages that need gettext only when locale support is enabled should: - -* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the - +Config.in+ file; - -* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package - +DEPENDENCIES+ variable in the +.mk+ file. - -Packages that unconditionally need gettext (which should be very rare) +translated strings, from the command line. In such a case, the package should: -* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ in the +Config.in+ - file; - -* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package - +DEPENDENCIES+ variable in the +.mk+ file. - -Packages that need the +gettext+ utilities on the target (should be -rare) should: - * use +select BR2_PACKAGE_GETTEXT+ in their +Config.in+ file, indicating in a comment above that it's a runtime dependency only. diff --git a/buildroot/docs/manual/adding-packages-golang.txt b/buildroot/docs/manual/adding-packages-golang.txt new file mode 100644 index 000000000..8c467689b --- /dev/null +++ b/buildroot/docs/manual/adding-packages-golang.txt @@ -0,0 +1,124 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for Go packages + +This infrastructure applies to Go packages that use the standard +build system and use bundled dependencies. + +[[golang-package-tutorial]] + +==== +golang-package+ tutorial + +First, let's see how to write a +.mk+ file for a go package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SITE = $(call github,bar,foo,$(FOO_VERSION)) +09: FOO_LICENSE = BSD-3-Clause +10: FOO_LICENSE_FILES = LICENSE +11: +12: $(eval $(golang-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8, we declare the upstream location of the package, here +fetched from Github, since a large number of Go packages are hosted on +Github. + +On line 9 and 10, we give licensing details about the package. + +Finally, on line 12, we invoke the +golang-package+ macro that +generates all the Makefile rules that actually allow the package to be +built. + +[[golang-package-reference]] + +==== +golang-package+ reference + +In their +Config.in+ file, packages using the +golang-package+ +infrastructure should depend on +BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS+ +because Buildroot will automatically add a dependency on +host-go+ +to such packages. +If you need CGO support in your package, you must add a dependency on ++BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS+. + +The main macro of the Go package infrastructure is ++golang-package+. It is similar to the +generic-package+ macro. The +ability to build host packages is also available, with the ++host-golang-package+ macro. +Host packages built by +host-golang-package+ macro should depend on +BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS. + +Just like the generic infrastructure, the Go infrastructure works +by defining a number of variables before calling the +golang-package+. + +All the package metadata information variables that exist in the +xref:generic-package-reference[generic package infrastructure] also +exist in the Go infrastructure: +FOO_VERSION+, +FOO_SOURCE+, ++FOO_PATCH+, +FOO_SITE+, +FOO_SUBDIR+, +FOO_DEPENDENCIES+, ++FOO_LICENSE+, +FOO_LICENSE_FILES+, +FOO_INSTALL_STAGING+, etc. + +Note that it is not necessary to add +host-go+ in the ++FOO_DEPENDENCIES+ variable of a package, since this basic dependency +is automatically added as needed by the Go package infrastructure. + +A few additional variables, specific to the Go infrastructure, can +optionally be defined, depending on the package's needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none. + +* If your package need a custom +GOPATH+ to be compiled in, you can + use the +FOO_WORKSPACE+ variable. The +GOPATH+ being used will be + +/+. If +FOO_WORKSPACE+ is not + specified, it defaults to +_gopath+. + +* +FOO_SRC_SUBDIR+ is the sub-directory where your source will be + compiled relatively to the +GOPATH+. An example value is + +github.com/bar/foo+. If +FOO_SRC_SUBDIR+ is not specified, it + defaults to a value infered from the +FOO_SITE+ variable. + +* +FOO_LDFLAGS+ and +FOO_TAGS+ can be used to pass respectively the + +LDFLAGS+ or the +TAGS+ to the +go+ build command. + +* +FOO_BUILD_TARGETS+ can be used to pass the list of targets that + should be built. If +FOO_BUILD_TARGETS+ is not specified, it + defaults to +.+. We then have two cases: + +** +FOO_BUILD_TARGETS+ is +.+. In this case, we assume only one binary + will be produced, and that by default we name it after the package + name. If that is not appropriate, the name of the produced binary + can be overridden using +FOO_BIN_NAME+. + +** +FOO_BUILD_TARGETS+ is not +.+. In this case, we iterate over the + values to build each target, and for each produced a binary that is + the non-directory component of the target. For example if + +FOO_BUILD_TARGETS = cmd/docker cmd/dockerd+ the binaries produced + are +docker+ and +dockerd+. + +* +FOO_INSTALL_BINS+ can be used to pass the list of binaries that + should be installed in +/usr/bin+ on the target. If + +FOO_INSTALL_BINS+ is not specified, it defaults to the lower-case + name of package. + +With the Go infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most Go-based packages. However, when required, it is still +possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the Go + infrastructure is used, if the package +.mk+ file defines its own + +FOO_BUILD_CMDS+ variable, it will be used instead of the default Go + one. However, using this method should be restricted to very + specific cases. Do not use it in the general case. diff --git a/buildroot/docs/manual/adding-packages-hooks.txt b/buildroot/docs/manual/adding-packages-hooks.txt index 5b5bf6a80..0ce79f890 100644 --- a/buildroot/docs/manual/adding-packages-hooks.txt +++ b/buildroot/docs/manual/adding-packages-hooks.txt @@ -59,6 +59,7 @@ endef LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP ---------------------- +[[hooks-rsync]] ==== Using the +POST_RSYNC+ hook The +POST_RSYNC+ hook is run only for packages that use a local source, either through the +local+ site method or the +OVERRIDE_SRCDIR+ @@ -77,3 +78,10 @@ others, use the following variables: * +$(SRCDIR)+: the path to the overridden source directory * +$(@D)+: the path to the build directory + +==== Target-finalize hook + +Packages may also register hooks in +LIBFOO_TARGET_FINALIZE_HOOKS+. +These hooks are run after all packages are built, but before the +filesystem images are generated. They are seldom used, and your +package probably do not need them. diff --git a/buildroot/docs/manual/adding-packages-kconfig.txt b/buildroot/docs/manual/adding-packages-kconfig.txt index e87d39307..8f40ea609 100644 --- a/buildroot/docs/manual/adding-packages-kconfig.txt +++ b/buildroot/docs/manual/adding-packages-kconfig.txt @@ -34,18 +34,45 @@ This snippet creates the following make targets: * +foo-menuconfig+, which calls the package's +menuconfig+ target -* +foo-update-config+, which copies the configuration back to the source - configuration file. +* +foo-update-config+, which copies the configuration back to the + source configuration file. It is not possible to use this target + when fragment files are set. + +* +foo-update-defconfig+, which copies the configuration back to the + source configuration file. The configuration file will only list the + options that differ from the default values. It is not possible to + use this target when fragment files are set. + +* +foo-diff-config+, which outputs the differences between the current + configuration and the one defined in the Buildroot configuration for + this kconfig package. The output is useful to identify the + configuration changes that may have to be propagated to + configuration fragments for example. and ensures that the source configuration file is copied to the build directory at the right moment. +There are two options to specify a configuration file to use, either ++FOO_KCONFIG_FILE+ (as in the example, above) or +FOO_KCONFIG_DEFCONFIG+. +It is mandatory to provide either, but not both: + +* +FOO_KCONFIG_FILE+ specifies the path to a defconfig or full-config file + to be used to configure the package. + +* +FOO_KCONFIG_DEFCONFIG+ specifies the defconfig 'make' rule to call to + configure the package. + In addition to these minimally required lines, several optional variables can be set to suit the needs of the package under consideration: * +FOO_KCONFIG_EDITORS+: a space-separated list of kconfig editors to support, for example 'menuconfig xconfig'. By default, 'menuconfig'. +* +FOO_KCONFIG_FRAGMENT_FILES+: a space-separated list of configuration + fragment files that are merged to the main configuration file. + Fragment files are typically used when there is a desire to stay in sync + with an upstream (def)config file, with some minor modifications. + * +FOO_KCONFIG_OPTS+: extra options to pass when calling the kconfig editors. This may need to include '$(FOO_MAKE_OPTS)', for example. By default, empty. @@ -54,3 +81,13 @@ be set to suit the needs of the package under consideration: configuration file after copying it or running a kconfig editor. Such commands may be needed to ensure a configuration consistent with other configuration of Buildroot, for example. By default, empty. + +* +FOO_KCONFIG_DOTCONFIG+: path (with filename) of the +.config+ file, + relative to the package source tree. The default, +.config+, should + be well suited for all packages that use the standard kconfig + infrastructure as inherited from the Linux kernel; some packages use + a derivative of kconfig that use a different location. + +* +FOO_KCONFIG_DEPENDENCIES+: the list of packages (most probably, host + packages) that need to be built before this package's kconfig is + interpreted. Seldom used. By default, empty. diff --git a/buildroot/docs/manual/adding-packages-kernel-module.txt b/buildroot/docs/manual/adding-packages-kernel-module.txt new file mode 100644 index 000000000..b609ecc90 --- /dev/null +++ b/buildroot/docs/manual/adding-packages-kernel-module.txt @@ -0,0 +1,143 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for packages building kernel modules + +Buildroot offers a helper infrastructure to make it easy to write packages that +build and install Linux kernel modules. Some packages only contain a kernel +module, other packages contain programs and libraries in addition to kernel +modules. Buildroot's helper infrastructure supports either case. + +[[kernel-module-tutorial]] +==== +kernel-module+ tutorial + +Let's start with an example on how to prepare a simple package that only +builds a kernel module, and no other component: + +---- +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.2.3 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-2.0 +11: FOO_LICENSE_FILES = COPYING +12: +13: $(eval $(kernel-module)) +14: $(eval $(generic-package)) +---- + +Lines 7-11 define the usual meta-data to specify the version, archive name, +remote URI where to find the package source, licensing information. + +On line 13, we invoke the +kernel-module+ helper infrastructure, that +generates all the appropriate Makefile rules and variables to build +that kernel module. + +Finally, on line 14, we invoke the +xref:generic-package-tutorial[+generic-package+ infrastructure]. + +The dependency on +linux+ is automatically added, so it is not needed to +specify it in +FOO_DEPENDENCIES+. + +What you may have noticed is that, unlike other package infrastructures, +we explicitly invoke a second infrastructure. This allows a package to +build a kernel module, but also, if needed, use any one of other package +infrastructures to build normal userland components (libraries, +executables...). Using the +kernel-module+ infrastructure on its own is +not sufficient; another package infrastructure *must* be used. + +Let's look at a more complex example: + +---- +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.2.3 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-2.0 +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_MODULE_SUBDIRS = driver/base +14: FOO_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED) +15: +16: ifeq ($(BR2_PACKAGE_LIBBAR),y) +17: FOO_DEPENDENCIES = libbar +18: FOO_CONF_OPTS = --enable-bar +19: FOO_MODULE_SUBDIRS += driver/bar +20: else +21: FOO_CONF_OPTS = --disable-bar +22: endif +23: +24: $(eval $(kernel-module)) +26: $(eval $(autotools-package)) +---- + +Here, we see that we have an autotools-based package, that also builds +the kernel module located in sub-directory +driver/base+ and, if libbar +is enabled, the kernel module located in sub-directory +driver/bar+, and +defines the variable +KVERSION+ to be passed to the Linux buildsystem +when building the module(s). + + +[[kernel-module-reference]] +==== +kernel-module+ reference + +The main macro for the kernel module infrastructure is +kernel-module+. +Unlike other package infrastructures, it is not stand-alone, and requires +any of the other +*-package+ macros be called after it. + +The +kernel-module+ macro defines post-build and post-target-install +hooks to build the kernel modules. If the package's +.mk+ needs access +to the built kernel modules, it should do so in a post-build hook, +*registered after* the call to +kernel-module+. Similarly, if the +package's +.mk+ needs access to the kernel module after it has been +installed, it should do so in a post-install hook, *registered after* +the call to +kernel-module+. Here's an example: + +---- +$(eval $(kernel-module)) + +define FOO_DO_STUFF_WITH_KERNEL_MODULE + # Do something with it... +endef +FOO_POST_BUILD_HOOKS += FOO_DO_STUFF_WITH_KERNEL_MODULE + +$(eval $(generic-package)) +---- + +Finally, unlike the other package infrastructures, there is no ++host-kernel-module+ variant to build a host kernel module. + +The following additional variables can optionally be defined to further +configure the build of the kernel module: + +* +FOO_MODULE_SUBDIRS+ may be set to one or more sub-directories (relative + to the package source top-directory) where the kernel module sources are. + If empty or not set, the sources for the kernel module(s) are considered + to be located at the top of the package source tree. + +* +FOO_MODULE_MAKE_OPTS+ may be set to contain extra variable definitions + to pass to the Linux buildsystem. + +[[kernel-variables]] +You may also reference (but you may *not* set!) those variables: + + * +LINUX_DIR+ contains the path to where the Linux kernel has been + extracted and built. + + * +LINUX_VERSION+ contains the version string as configured by the user. + + * +LINUX_VERSION_PROBED+ contains the real version string of the kernel, + retrieved with running `make -C $(LINUX_DIR) kernelrelease` + + * +KERNEL_ARCH+ contains the name of the current architecture, like `arm`, + `mips`... diff --git a/buildroot/docs/manual/adding-packages-linux-kernel-spec-infra.txt b/buildroot/docs/manual/adding-packages-linux-kernel-spec-infra.txt new file mode 100644 index 000000000..b948e208d --- /dev/null +++ b/buildroot/docs/manual/adding-packages-linux-kernel-spec-infra.txt @@ -0,0 +1,152 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[linux-kernel-specific-infra]] +=== Infrastructure specific to the Linux kernel package + +The Linux kernel package can use some specific infrastructures based on package +hooks for building Linux kernel tools or/and building Linux kernel extensions. + +[[linux-kernel-tools]] +==== linux-kernel-tools + +Buildroot offers a helper infrastructure to build some userspace tools +for the target available within the Linux kernel sources. Since their +source code is part of the kernel source code, a special package, ++linux-tools+, exists and re-uses the sources of the Linux kernel that +runs on the target. + +Let's look at an example of a Linux tool. For a new Linux tool named ++foo+, create a new menu entry in the existing ++package/linux-tools/Config.in+. This file will contain the option +descriptions related to each kernel tool that will be used and +displayed in the configuration tool. It would basically look like: + +------------------------------ +01: config BR2_PACKAGE_LINUX_TOOLS_FOO +02: bool "foo" +03: select BR2_PACKAGE_LINUX_TOOLS +04: help +05: This is a comment that explains what foo kernel tool is. +06: +07: http://foosoftware.org/foo/ +------------------------------ + +The name of the option starts with the prefix +BR2_PACKAGE_LINUX_TOOLS_+, +followed by the uppercase name of the tool (like is done for packages). + +.Note +Unlike other packages, the +linux-tools+ package options appear in the ++linux+ kernel menu, under the `Linux Kernel Tools` sub-menu, not under +the `Target packages` main menu. + +Then for each linux tool, add a new +.mk.in+ file named ++package/linux-tools/linux-tool-foo.mk.in+. It would basically look like: + +------------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: LINUX_TOOLS += foo +08: +09: FOO_DEPENDENCIES = libbbb +10: +11: define FOO_BUILD_CMDS +12: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools foo +13: endef +14: +15: define FOO_INSTALL_STAGING_CMDS +16: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ +17: DESTDIR=$(STAGING_DIR) \ +18: foo_install +19: endef +20: +21: define FOO_INSTALL_TARGET_CMDS +22: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ +23: DESTDIR=$(TARGET_DIR) \ +24: foo_install +25: endef +-------------------------------- + +On line 7, we register the Linux tool +foo+ to the list of available +Linux tools. + +On line 9, we specify the list of dependencies this tool relies on. These +dependencies are added to the Linux package dependencies list only when the ++foo+ tool is selected. + +The rest of the Makefile, lines 11-25 defines what should be done at the +different steps of the Linux tool build process like for a +xref:generic-package-tutorial[+generic package+]. They will actually be +used only when the +foo+ tool is selected. The only supported commands are ++_BUILD_CMDS+, +_INSTALL_STAGING_CMDS+ and +_INSTALL_TARGET_CMDS+. + +.Note +One *must not* call +$(eval $(generic-package))+ or any other +package infrastructure! Linux tools are not packages by themselves, +they are part of the +linux-tools+ package. + +[[linux-kernel-ext]] +==== linux-kernel-extensions + +Some packages provide new features that require the Linux kernel tree +to be modified. This can be in the form of patches to be applied on +the kernel tree, or in the form of new files to be added to the +tree. The Buildroot's Linux kernel extensions infrastructure provides +a simple solution to automatically do this, just after the kernel +sources are extracted and before the kernel patches are +applied. Examples of extensions packaged using this mechanism are the +real-time extensions Xenomai and RTAI, as well as the set of +out-of-tree LCD screens drivers +fbtft+. + +Let's look at an example on how to add a new Linux extension +foo+. + +First, create the package +foo+ that provides the extension: this +package is a standard package; see the previous chapters on how to +create such a package. This package is in charge of downloading the +sources archive, checking the hash, defining the licence informations +and building user space tools if any. + +Then create the 'Linux extension' proper: create a new menu entry in +the existing +linux/Config.ext.in+. This file contains the option +descriptions related to each kernel extension that will be used and +displayed in the configuration tool. It would basically look like: + +------------------------------ +01: config BR2_LINUX_KERNEL_EXT_FOO +02: bool "foo" +03: help +04: This is a comment that explains what foo kernel extension is. +05: +06: http://foosoftware.org/foo/ +------------------------------ + +Then for each linux extension, add a new +.mk+ file named ++linux/linux-ext-foo.mk+. It should basically contain: + +------------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: LINUX_EXTENSIONS += foo +08: +09: define FOO_PREPARE_KERNEL +10: $(FOO_DIR)/prepare-kernel-tree.sh --linux-dir=$(@D) +11: endef +-------------------------------- + +On line 7, we add the Linux extension +foo+ to the list of available +Linux extensions. + +On line 9-11, we define what should be done by the extension to modify +the Linux kernel tree; this is specific to the linux extension and can +use the variables defined by the +foo+ package, like: +$(FOO_DIR)+ or ++$(FOO_VERSION)+... as well as all the Linux variables, like: ++$(LINUX_VERSION)+ or +$(LINUX_VERSION_PROBED)+, +$(KERNEL_ARCH)+... +See the xref:kernel-variables[definition of those kernel variables]. diff --git a/buildroot/docs/manual/adding-packages-luarocks.txt b/buildroot/docs/manual/adding-packages-luarocks.txt index c914238f0..70f48fc02 100644 --- a/buildroot/docs/manual/adding-packages-luarocks.txt +++ b/buildroot/docs/manual/adding-packages-luarocks.txt @@ -13,37 +13,53 @@ with an example : ------------------------ 01: ################################################################################ 02: # -03: # luafoo +03: # lua-foo 04: # 05: ################################################################################ 06: -07: LUAFOO_VERSION = 1.0.2-1 -08: LUAFOO_DEPENDENCIES = foo -09: -10: LUAFOO_BUILD_OPTS += FOO_INCDIR=$(STAGING_DIR)/usr/include -11: LUAFOO_BUILD_OPTS += FOO_LIBDIR=$(STAGING_DIR)/usr/lib -12: LUAFOO_LICENSE = luaFoo license -13: LUAFOO_LICENSE_FILES = COPYING -14: -15: $(eval $(luarocks-package)) +07: LUA_FOO_VERSION = 1.0.2-1 +08: LUA_FOO_NAME_UPSTREAM = foo +09: LUA_FOO_DEPENDENCIES = bar +10: +11: LUA_FOO_BUILD_OPTS += BAR_INCDIR=$(STAGING_DIR)/usr/include +12: LUA_FOO_BUILD_OPTS += BAR_LIBDIR=$(STAGING_DIR)/usr/lib +13: LUA_FOO_LICENSE = luaFoo license +14: LUA_FOO_LICENSE_FILES = $(LUA_FOO_SUBDIR)/COPYING +15: +16: $(eval $(luarocks-package)) ------------------------ On line 7, we declare the version of the package (the same as in the rockspec, which is the concatenation of the upstream version and the rockspec revision, separated by a hyphen '-'). -On line 8, we declare our dependencies against native libraries, so that they +On line 8, we declare that the package is called "foo" on LuaRocks. In +Buildroot, we give Lua-related packages a name that starts with "lua", so the +Buildroot name is different from the upstream name. +LUA_FOO_NAME_UPSTREAM+ +makes the link between the two names. + +On line 9, we declare our dependencies against native libraries, so that they are built before the build process of our package starts. -On lines 10-11, we tell Buildroot to pass custom options to LuaRocks when it is +On lines 11-12, we tell Buildroot to pass custom options to LuaRocks when it is building the package. -On lines 12-13, we specify the licensing terms for the package. +On lines 13-14, we specify the licensing terms for the package. -Finally, on line 15, we invoke the +luarocks-package+ +Finally, on line 16, we invoke the +luarocks-package+ macro that generates all the Makefile rules that actually allows the package to be built. +Most of these details can be retrieved from the +rock+ and +rockspec+. +So, this file and the Config.in file can be generated by running the +command +luarocks buildroot foo lua-foo+ in the Buildroot +directory. This command runs a specific Buildroot addon of +luarocks+ +that will automatically generate a Buildroot package. The result must +still be manually inspected and possibly modified. + +* The +package/Config.in+ file has to be updated manually to include the + generated Config.in files. + [[luarocks-package-reference]] ==== +luarocks-package+ reference @@ -57,9 +73,7 @@ infrastructures in Buildroot, respectively. The main macro of the LuaRocks package infrastructure is +luarocks-package+: like +generic-package+ it works by defining a number of variables providing -metadata information about the package, and then calling +luarocks-package+. It -is worth mentioning that building LuaRocks packages for the host is not -supported, so the macro +host-luarocks-package+ is not implemented. +metadata information about the package, and then calling +luarocks-package+. Just like the generic infrastructure, the LuaRocks infrastructure works by defining a number of variables before calling the +luarocks-package+ @@ -67,24 +81,29 @@ macro. First, all the package metadata information variables that exist in the generic infrastructure also exist in the LuaRocks infrastructure: -+LUAFOO_VERSION+, +LUAFOO_SOURCE+, +LUAFOO_SITE+, -+LUAFOO_DEPENDENCIES+, +LUAFOO_LICENSE+, +LUAFOO_LICENSE_FILES+. ++LUA_FOO_VERSION+, +LUA_FOO_SOURCE+, +LUA_FOO_SITE+, ++LUA_FOO_DEPENDENCIES+, +LUA_FOO_LICENSE+, +LUA_FOO_LICENSE_FILES+. Two of them are populated by the LuaRocks infrastructure (for the +download+ step). If your package is not hosted on the LuaRocks mirror +$(BR2_LUAROCKS_MIRROR)+, you can override them: -* +LUAFOO_SITE+, which defaults to +$(BR2_LUAROCKS_MIRROR)+ +* +LUA_FOO_SITE+, which defaults to +$(BR2_LUAROCKS_MIRROR)+ -* +LUAFOO_SOURCE+, which defaults to +luafoo-$(LUAFOO_VERSION).src.rock+ +* +LUA_FOO_SOURCE+, which defaults to + +$(lowercase LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).src.rock+ A few additional variables, specific to the LuaRocks infrastructure, are also defined. They can be overridden in specific cases. -* +LUAFOO_ROCKSPEC+, which defaults to +luafoo-$(LUAFOO_VERSION).rockspec+ +* +LUA_FOO_NAME_UPSTREAM+, which defaults to +lua-foo+, i.e. the Buildroot + package name + +* +LUA_FOO_ROCKSPEC+, which defaults to + +$(lowercase LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).rockspec+ -* +LUAFOO_SUBDIR+, which defaults to - +luafoo-$(LUAFOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+ +* +LUA_FOO_SUBDIR+, which defaults to + +$(LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION_WITHOUT_ROCKSPEC_REVISION)+ -* +LUAFOO_BUILD_OPTS+ contains additional build options for the +* +LUA_FOO_BUILD_OPTS+ contains additional build options for the +luarocks build+ call. diff --git a/buildroot/docs/manual/adding-packages-meson.txt b/buildroot/docs/manual/adding-packages-meson.txt new file mode 100644 index 000000000..029c8c248 --- /dev/null +++ b/buildroot/docs/manual/adding-packages-meson.txt @@ -0,0 +1,133 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for Meson-based packages + +[[meson-package-tutorial]] + +==== +meson-package+ tutorial + +http://mesonbuild.com[Meson] is an open source build system meant to be both +extremely fast, and, even more importantly, as user friendly as possible. It +uses https://ninja-build.org[Ninja] as a companion tool to perform the actual +build operations. + +Let's see how to write a +.mk+ file for a Meson-based package, with an example: + +------------------------------ +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-3.0+ +11: FOO_LICENSE_FILES = COPYING +12: FOO_INSTALL_STAGING = YES +13: +14: FOO_DEPENDENCIES = host-pkgconf bar +15: +16: ifeq ($(BR2_PACKAGE_BAZ),y) +17: FOO_CONF_OPTS += -Dbaz=true +18: FOO_DEPENDENCIES += baz +19: else +20: FOO_CONF_OPTS += -Dbaz=false +21: endif +22: +23: $(eval $(meson-package)) +-------------------------------- + +The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11). + +On line line 23, we invoke the +meson-package+ macro that generates all the +Makefile rules that actually allows the package to be built. + +In the example, +host-pkgconf+ and +bar+ are declared as dependencies in ++FOO_DEPENDENCIES+ at line 14 because the Meson build file of +foo+ uses +`pkg-config` to determine the compilation flags and libraries of package +bar+. + +Note that it is not necessary to add +host-meson+ in the +FOO_DEPENDENCIES+ +variable of a package, since this basic dependency is automatically added as +needed by the Meson package infrastructure. + +If the "baz" package is selected, then support for the "baz" feature in "foo" is +activated by adding +-Dbaz=true+ to +FOO_CONF_OPTS+ at line 17, as specified in +the +meson_options.txt+ file in "foo" source tree. The "baz" package is also +added to +FOO_DEPENDENCIES+. Note that the support for +baz+ is explicitly +disabled at line 20, if the package is not selected. + +To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of +FOO+ with the +uppercase name of the new package and update the values of the standard +variables. + +[[meson-package-reference]] + +==== +meson-package+ reference + +The main macro of the Meson package infrastructure is +meson-package+. It is +similar to the +generic-package+ macro. The ability to have target and host +packages is also available, with the +host-meson-package+ macro. + +Just like the generic infrastructure, the Meson infrastructure works by defining +a number of variables before calling the +meson-package+ macro. + +First, all the package metadata information variables that exist in the generic +infrastructure also exist in the Meson infrastructure: +FOO_VERSION+, ++FOO_SOURCE+, +FOO_PATCH+, +FOO_SITE+, +FOO_SUBDIR+, +FOO_DEPENDENCIES+, ++FOO_INSTALL_STAGING+, +FOO_INSTALL_TARGET+. + +A few additional variables, specific to the Meson infrastructure, can also be +defined. Many of them are only useful in very specific cases, typical packages +will therefore only use a few of them. + +* +FOO_SUBDIR+ may contain the name of a subdirectory inside the + package that contains the main meson.build file. This is useful, + if for example, the main meson.build file is not at the root of + the tree extracted by the tarball. If +HOST_FOO_SUBDIR+ is not + specified, it defaults to +FOO_SUBDIR+. + +* +FOO_CONF_ENV+, to specify additional environment variables to pass to + +meson+ for the configuration step. By default, empty. + +* +FOO_CONF_OPTS+, to specify additional options to pass to +meson+ for the + configuration step. By default, empty. + +* +FOO_CFLAGS+, to specify compiler arguments added to the package specific + +cross-compile.conf+ file +c_args+ property. By default, the value of + +TARGET_CFLAGS+. + +* +FOO_CXXFLAGS+, to specify compiler arguments added to the package specific + +cross-compile.conf+ file +cpp_args+ property. By default, the value of + +TARGET_CXXFLAGS+. + +* +FOO_LDFLAGS+, to specify compiler arguments added to the package specific + +cross-compile.conf+ file +c_link_args+ and +cpp_link_args+ properties. By + default, the value of +TARGET_LDFLAGS+. + +* +FOO_MESON_EXTRA_BINARIES+, to specify a space-separated list of programs + to add to the `[binaries]` section of the meson `cross-compilation.conf` + configuration file. The format is `program-name='/path/to/program'`, with + no space around the +=+ sign, and with the path of the program between + single quotes. By default, empty. Note that Buildroot already sets the + correct values for +c+, +cpp+, +ar+, +strip+, and +pkgconfig+. + +* +FOO_MESON_EXTRA_PROPERTIES+, to specify a space-separated list of + properties to add to the `[properties]` section of the meson + `cross-compilation.conf` configuration file. The format is + `property-name=` with no space around the +=+ sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for +needs_exe_wrapper+, +c_args+, + +c_link_args+, +cpp_args+, +cpp_link_args+, +sys_root+, and + +pkg_config_libdir+. + +* +FOO_NINJA_ENV+, to specify additional environment variables to pass to + +ninja+, meson companion tool in charge of the build operations. By default, + empty. + +* +FOO_NINJA_OPTS+, to specify a space-separated list of targets to build. By + default, empty, to build the default target(s). diff --git a/buildroot/docs/manual/adding-packages-perl.txt b/buildroot/docs/manual/adding-packages-perl.txt index 63fafe655..6ce693fd6 100644 --- a/buildroot/docs/manual/adding-packages-perl.txt +++ b/buildroot/docs/manual/adding-packages-perl.txt @@ -21,10 +21,11 @@ with an example : 08: PERL_FOO_BAR_SOURCE = Foo-Bar-$(PERL_FOO_BAR_VERSION).tar.gz 09: PERL_FOO_BAR_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER 10: PERL_FOO_BAR_DEPENDENCIES = perl-strictures -11: PERL_FOO_BAR_LICENSE = Artistic or GPLv1+ +11: PERL_FOO_BAR_LICENSE = Artistic or GPL-1.0+ 12: PERL_FOO_BAR_LICENSE_FILES = LICENSE -13: -14: $(eval $(perl-package)) +13: PERL_FOO_BAR_DISTNAME = Foo-Bar +14: +15: $(eval $(perl-package)) ------------------------ On line 7, we declare the version of the package. @@ -40,14 +41,17 @@ On line 11 and 12, we give licensing details about the package (its license on line 11, and the file containing the license text on line 12). -Finally, on line 14, we invoke the +perl-package+ macro that +On line 13, the name of the distribution as needed by the script ++utils/scancpan+ (in order to regenerate/upgrade these package files). + +Finally, on line 15, we invoke the +perl-package+ macro that generates all the Makefile rules that actually allow the package to be built. Most of these data can be retrieved from https://metacpan.org/. So, this file and the Config.in can be generated by running -the script +supports/scripts/scancpan Foo-Bar+ in the Buildroot directory -(or in the +BR2_EXTERNAL+ directory). +the script +utils/scancpan Foo-Bar+ in the Buildroot directory +(or in a br2-external tree). This script creates a Config.in file and foo-bar.mk file for the requested package, and also recursively for all dependencies specified by CPAN. You should still manually edit the result. In particular, the @@ -68,8 +72,8 @@ As a policy, packages that provide Perl/CPAN modules should all be named +perl-+ in Buildroot. This infrastructure handles various Perl build systems : -+ExtUtils-MakeMaker+, +Module-Build+ and +Module-Build-Tiny+. -+Build.PL+ is always preferred when a package provides a +Makefile.PL+ ++ExtUtils-MakeMaker+ (EUMM), +Module-Build+ (MB) and +Module-Build-Tiny+. ++Build.PL+ is preferred by default when a package provides a +Makefile.PL+ and a +Build.PL+. The main macro of the Perl/CPAN package infrastructure is @@ -97,6 +101,13 @@ A few additional variables, specific to the Perl/CPAN infrastructure, can also be defined. Many of them are only useful in very specific cases, typical packages will therefore only use a few of them. +* +PERL_FOO_PREFER_INSTALLER+/+HOST_PERL_FOO_PREFER_INSTALLER+, + specifies the preferred installation method. Possible values are + +EUMM+ (for +Makefile.PL+ based installation using + +ExtUtils-MakeMaker+) and +MB+ (for +Build.PL+ based installation + using +Module-Build+). This variable is only used when the package + provides both installation methods. + * +PERL_FOO_CONF_ENV+/+HOST_PERL_FOO_CONF_ENV+, to specify additional environment variables to pass to the +perl Makefile.PL+ or +perl Build.PL+. By default, empty. diff --git a/buildroot/docs/manual/adding-packages-python.txt b/buildroot/docs/manual/adding-packages-python.txt index f81d62545..0c100859b 100644 --- a/buildroot/docs/manual/adding-packages-python.txt +++ b/buildroot/docs/manual/adding-packages-python.txt @@ -24,7 +24,7 @@ with an example : 07: PYTHON_FOO_VERSION = 1.0 08: PYTHON_FOO_SOURCE = python-foo-$(PYTHON_FOO_VERSION).tar.xz 09: PYTHON_FOO_SITE = http://www.foosoftware.org/download -10: PYTHON_FOO_LICENSE = BSD-3c +10: PYTHON_FOO_LICENSE = BSD-3-Clause 11: PYTHON_FOO_LICENSE_FILES = LICENSE 12: PYTHON_FOO_ENV = SOME_VAR=1 13: PYTHON_FOO_DEPENDENCIES = libmad @@ -67,9 +67,13 @@ Python build system, but are not Python modules, can freely choose their name (existing examples in Buildroot are +scons+ and +supervisor+). -In their +Config.in+ file, they should depend on +BR2_PACKAGE_PYTHON+ -so that when Buildroot will enable Python 3 usage for modules, we will -be able to enable Python modules progressively on Python 3. +Packages that are only compatible with one version of Python (as in: +Python 2 or Python 3) should depend on that version explicitely in +their +Config.in+ file (+BR2_PACKAGE_PYTHON+ for Python 2, ++BR2_PACKAGE_PYTHON3+ for Python 3). Packages that are compatible +with both versions should not explicitely depend on them in their ++Config.in+ file, since that condition is already expressed for the +whole "External python modules" menu. The main macro of the Python package infrastructure is +python-package+. It is similar to the +generic-package+ macro. It is @@ -94,10 +98,9 @@ Note that: dependencies are automatically added as needed by the Python package infrastructure. - * Similarly, it is not needed to add +host-setuptools+ and/or - +host-distutilscross+ dependencies to +PYTHON_FOO_DEPENDENCIES+ for - setuptools-based packages, since these are automatically added by - the Python infrastructure as needed. + * Similarly, it is not needed to add +host-setuptools+ to + +PYTHON_FOO_DEPENDENCIES+ for setuptools-based packages, since it's + automatically added by the Python infrastructure as needed. One variable specific to the Python infrastructure is mandatory: @@ -113,6 +116,12 @@ optionally be defined, depending on the package's needs. Many of them are only useful in very specific cases, typical packages will therefore only use a few of them, or none. +* +PYTHON_FOO_SUBDIR+ may contain the name of a subdirectory inside the + package that contains the main +setup.py+ file. This is useful, + if for example, the main +setup.py+ file is not at the root of + the tree extracted by the tarball. If +HOST_PYTHON_FOO_SUBDIR+ is not + specified, it defaults to +PYTHON_FOO_SUBDIR+. + * +PYTHON_FOO_ENV+, to specify additional environment variables to pass to the Python +setup.py+ script (for both the build and install steps). Note that the infrastructure is automatically passing @@ -143,7 +152,7 @@ therefore only use a few of them, or none. * +HOST_PYTHON_FOO_NEEDS_HOST_PYTHON+, to define the host python interpreter. The usage of this variable is limited to host packages. The two supported value are +python2+ and +python3+. It - will ensures the right host python package is available and will + will ensure the right host python package is available and will invoke it for the build. If some build steps are overloaded, the right python interpreter must be explicitly called in the commands. @@ -160,3 +169,92 @@ possible to customize what is done in any particular step: +PYTHON_FOO_BUILD_CMDS+ variable, it will be used instead of the default Python one. However, using this method should be restricted to very specific cases. Do not use it in the general case. + +[[scanpypi]] + +==== Generating a +python-package+ from a PyPI repository + +If the Python package for which you would like to create a Buildroot +package is available on PyPI, you may want to use the +scanpypi+ tool +located in +utils/+ to automate the process. + +You can find the list of existing PyPI packages +https://pypi.python.org[here]. + ++scanpypi+ requires Python's +setuptools+ package to be installed on +your host. + +When at the root of your buildroot directory just do : + +----------------------- +utils/scanpypi foo bar -o package +----------------------- + +This will generate packages +python-foo+ and +python-bar+ in the package +folder if they exist on https://pypi.python.org. + +Find the +external python modules+ menu and insert your package inside. +Keep in mind that the items inside a menu should be in alphabetical order. + +Please keep in mind that you'll most likely have to manually check the +package for any mistakes as there are things that cannot be guessed by +the generator (e.g. dependencies on any of the python core modules +such as BR2_PACKAGE_PYTHON_ZLIB). Also, please take note that the +license and license files are guessed and must be checked. You also +need to manually add the package to the +package/Config.in+ file. + +If your Buildroot package is not in the official Buildroot tree but in +a br2-external tree, use the -o flag as follows: + +----------------------- +utils/scanpypi foo bar -o other_package_dir +----------------------- + +This will generate packages +python-foo+ and +python-bar+ in the ++other_package_directory+ instead of +package+. + +Option +-h+ will list the available options: + +----------------------- +utils/scanpypi -h +----------------------- + +[[python-package-cffi-backend]] + +==== +python-package+ CFFI backend + +C Foreign Function Interface for Python (CFFI) provides a convenient +and reliable way to call compiled C code from Python using interface +declarations written in C. Python packages relying on this backend can +be identified by the appearance of a +cffi+ dependency in the ++install_requires+ field of their +setup.py+ file. + +Such a package should: + + * add +python-cffi+ as a runtime dependency in order to install the +compiled C library wrapper on the target. This is achieved by adding ++select BR2_PACKAGE_PYTHON_CFFI+ to the package +Config.in+. + +------------------------ +config BR2_PACKAGE_PYTHON_FOO + bool "python-foo" + select BR2_PACKAGE_PYTHON_CFFI # runtime +------------------------ + + * add +host-python-cffi+ as a build-time dependency in order to +cross-compile the C wrapper. This is achieved by adding ++host-python-cffi+ to the +PYTHON_FOO_DEPENDENCIES+ variable. + +------------------------ +################################################################################ +# +# python-foo +# +################################################################################ + +... + +PYTHON_FOO_DEPENDENCIES = host-python-cffi + +$(eval $(python-package)) +------------------------ diff --git a/buildroot/docs/manual/adding-packages-qmake.txt b/buildroot/docs/manual/adding-packages-qmake.txt new file mode 100644 index 000000000..e1621e914 --- /dev/null +++ b/buildroot/docs/manual/adding-packages-qmake.txt @@ -0,0 +1,81 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for QMake-based packages + +[[qmake-package-tutorial]] + +==== +qmake-package+ tutorial + +First, let's see how to write a +.mk+ file for a QMake-based package, with +an example : + +------------------------ +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_CONF_OPTS = QT_CONFIG+=bar QT_CONFIG-=baz +11: LIBFOO_DEPENDENCIES = bar +12: +13: $(eval $(qmake-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot what options to enable for libfoo. + +On line 11, we tell Buildroot the dependencies of libfoo. + +Finally, on line line 13, we invoke the +qmake-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[qmake-package-reference]] + +==== +qmake-package+ reference + +The main macro of the QMake package infrastructure is +qmake-package+. +It is similar to the +generic-package+ macro. + +Just like the generic infrastructure, the QMake infrastructure works +by defining a number of variables before calling the +qmake-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the QMake infrastructure: ++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+, ++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+, ++LIBFOO_INSTALL_TARGET+. + +An additional variable, specific to the QMake infrastructure, can +also be defined. + +* +LIBFOO_CONF_ENV+, to specify additional environment variables to + pass to the +qmake+ script for the configuration step. By default, empty. + +* +LIBFOO_CONF_OPTS+, to specify additional options to pass to the + +qmake+ script for the configuration step. By default, empty. + +* +LIBFOO_MAKE_ENV+, to specify additional environment variables to the + +make+ command during the build and install steps. By default, empty. + +* +LIBFOO_MAKE_OPTS+, to specify additional targets to pass to the + +make+ command during the build step. By default, empty. + +* +LIBFOO_INSTALL_STAGING_OPTS+, to specify additional targets to pass + to the +make+ command during the staging installation step. By default, + +install+. + +* +LIBFOO_INSTALL_TARGET_OPTS+, to specify additional targets to pass + to the +make+ command during the target installation step. By default, + +install+. diff --git a/buildroot/docs/manual/adding-packages-rebar.txt b/buildroot/docs/manual/adding-packages-rebar.txt new file mode 100644 index 000000000..d78b3171d --- /dev/null +++ b/buildroot/docs/manual/adding-packages-rebar.txt @@ -0,0 +1,108 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for rebar-based packages + +[[rebar-package-tutorial]] + +==== +rebar-package+ tutorial + +First, let's see how to write a +.mk+ file for a rebar-based package, +with an example : + +------------------------------ +01: ################################################################################ +02: # +03: # erlang-foobar +04: # +05: ################################################################################ +06: +07: ERLANG_FOOBAR_VERSION = 1.0 +08: ERLANG_FOOBAR_SOURCE = erlang-foobar-$(ERLANG_FOOBAR_VERSION).tar.xz +09: ERLANG_FOOBAR_SITE = http://www.foosoftware.org/download +10: ERLANG_FOOBAR_DEPENDENCIES = host-libaaa libbbb +11: +12: $(eval $(rebar-package)) +-------------------------------- + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line 12, we invoke the +rebar-package+ macro that +generates all the Makefile rules that actually allows the package to +be built. + +[[rebar-package-reference]] + +==== +rebar-package+ reference + +The main macro of the +rebar+ package infrastructure is ++rebar-package+. It is similar to the +generic-package+ macro. The +ability to have host packages is also available, with the ++host-rebar-package+ macro. + +Just like the generic infrastructure, the +rebar+ infrastructure works +by defining a number of variables before calling the +rebar-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the +rebar+ infrastructure: ++ERLANG_FOOBAR_VERSION+, +ERLANG_FOOBAR_SOURCE+, ++ERLANG_FOOBAR_PATCH+, +ERLANG_FOOBAR_SITE+, ++ERLANG_FOOBAR_SUBDIR+, +ERLANG_FOOBAR_DEPENDENCIES+, ++ERLANG_FOOBAR_INSTALL_STAGING+, +ERLANG_FOOBAR_INSTALL_TARGET+, ++ERLANG_FOOBAR_LICENSE+ and +ERLANG_FOOBAR_LICENSE_FILES+. + +A few additional variables, specific to the +rebar+ infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them. + +* +ERLANG_FOOBAR_USE_AUTOCONF+, to specify that the package uses + _autoconf_ at the configuration step. When a package sets this + variable to +YES+, the +autotools+ infrastructure is used. ++ +.Note +You can also use some of the variables from the +autotools+ + infrastructure: +ERLANG_FOOBAR_CONF_ENV+, +ERLANG_FOOBAR_CONF_OPTS+, + +ERLANG_FOOBAR_AUTORECONF+, +ERLANG_FOOBAR_AUTORECONF_ENV+ and + +ERLANG_FOOBAR_AUTORECONF_OPTS+. + +* +ERLANG_FOOBAR_USE_BUNDLED_REBAR+, to specify that the package has + a bundled version of _rebar_ *and* that it shall be used. Valid + values are +YES+ or +NO+ (the default). ++ +.Note +If the package bundles a _rebar_ utility, but can use the generic + one that Buildroot provides, just say +NO+ (i.e., do not specify + this variable). Only set if it is mandatory to use the _rebar_ + utility bundled in this package. + +* +ERLANG_FOOBAR_REBAR_ENV+, to specify additional environment + variables to pass to the _rebar_ utility. + +* +ERLANG_FOOBAR_KEEP_DEPENDENCIES+, to keep the dependencies + described in the rebar.config file. Valid values are +YES+ or +NO+ + (the default). Unless this variable is set to +YES+, the _rebar_ + infrastructure removes such dependencies in a post-patch hook to + ensure rebar does not download nor compile them. + +With the rebar infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most rebar-based packages. However, when required, it is +still possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the rebar + infrastructure is used, if the package +.mk+ file defines its + own +ERLANG_FOOBAR_BUILD_CMDS+ variable, it will be used instead + of the default rebar one. However, using this method should be + restricted to very specific cases. Do not use it in the general + case. diff --git a/buildroot/docs/manual/adding-packages-tips.txt b/buildroot/docs/manual/adding-packages-tips.txt index 6f5e785bb..95a1d599e 100644 --- a/buildroot/docs/manual/adding-packages-tips.txt +++ b/buildroot/docs/manual/adding-packages-tips.txt @@ -32,6 +32,137 @@ using the following rules: with `.` and `-` characters substituted with `_` (e.g.: +FOO_BAR_BOO_VERSION+). +[[check-package]] +==== How to check the coding style + +Buildroot provides a script in +utils/check-package+ that checks new or +changed files for coding style. It is not a complete language validator, +but it catches many common mistakes. It is meant to run in the actual +files you created or modified, before creating the patch for submission. + +This script can be used for packages, filesystem makefiles, Config.in +files, etc. It does not check the files defining the package +infrastructures and some other files containing similar common code. + +To use it, run the +check-package+ script, by telling which files you +created or changed: + +---- +$ ./utils/check-package package/new-package/* +---- + +If you have the +utils+ directory in your path you can also run: + +---- +$ cd package/new-package/ +$ check-package * +---- + +The tool can also be used for packages in a br2-external: + +---- +$ check-package -b /path/to/br2-ext-tree/package/my-package/* +---- + +[[testing-package]] +==== How to test your package + +Once you have added your new package, it is important that you test it +under various conditions: does it build for all architectures? Does it +build with the different C libraries? Does it need threads, NPTL? And +so on... + +Buildroot runs http://autobuild.buildroot.org/[autobuilders] which +continuously test random configurations. However, these only build the +`master` branch of the git tree, and your new fancy package is not yet +there. + +Buildroot provides a script in +utils/test-pkg+ that uses the same base +configurations as used by the autobuilders so you can test your package +in the same conditions. + +First, create a config snippet that contains all the necessary options +needed to enable your package, but without any architecture or toolchain +option. For example, let's create a config snippet that just enables ++libcurl+, without any TLS backend: + +---- +$ cat libcurl.config +BR2_PACKAGE_LIBCURL=y +---- + +If your package needs more configuration options, you can add them to the +config snippet. For example, here's how you would test +libcurl+ with ++openssl+ as a TLS backend and the +curl+ program: + +---- +$ cat libcurl.config +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_LIBCURL_CURL=y +BR2_PACKAGE_OPENSSL=y +---- + +Then run the +test-pkg+ script, by telling it what config snippet to use +and what package to test: + +---- +$ ./utils/test-pkg -c libcurl.config -p libcurl +---- + +By default, +test-pkg+ will build your package against a subset of the +toolchains used by the autobuilders, which has been selected by the +Buildroot developers as being the most useful and representative +subset. If you want to test all toolchains, pass the +-a+ option. Note +that in any case, internal toolchains are excluded as they take too +long to build. + +The output lists all toolchains that are tested and the corresponding +result (excerpt, results are fake): + +---- +$ ./utils/test-pkg -c libcurl.config -p libcurl + armv5-ctng-linux-gnueabi [ 1/11]: OK + armv7-ctng-linux-gnueabihf [ 2/11]: OK + br-aarch64-glibc [ 3/11]: SKIPPED + br-arcle-hs38 [ 4/11]: SKIPPED + br-arm-basic [ 5/11]: FAILED + br-arm-cortex-a9-glibc [ 6/11]: OK + br-arm-cortex-a9-musl [ 7/11]: FAILED + br-arm-cortex-m4-full [ 8/11]: OK + br-arm-full [ 9/11]: OK + br-arm-full-nothread [10/11]: FAILED + br-arm-full-static [11/11]: OK +11 builds, 2 skipped, 2 build failed, 1 legal-info failed +---- + +The results mean: + +* `OK`: the build was successful. +* `SKIPPED`: one or more configuration options listed in the config + snippet were not present in the final configuration. This is due to + options having dependencies not satisfied by the toolchain, such as + for example a package that +depends on BR2_USE_MMU+ with a noMMU + toolchain. The missing options are reported in +missing.config+ in + the output build directory (+~/br-test-pkg/TOOLCHAIN_NAME/+ by + default). +* `FAILED`: the build failed. Inspect the +logfile+ file in the output + build directory to see what went wrong: +** the actual build failed, +** the legal-info failed, +** one of the preliminary steps (downloading the config file, applying + the configuration, running `dirclean` for the package) failed. + +When there are failures, you can just re-run the script with the same +options (after you fixed your package); the script will attempt to +re-build the package specified with +-p+ for all toolchains, without +the need to re-build all the dependencies of that package. + +The +test-pkg+ script accepts a few options, for which you can get some +help by running: + +---- +$ ./utils/test-pkg -h +---- [[github-download-url]] ==== How to add a package from GitHub @@ -42,7 +173,8 @@ on GitHub. As GitHub is known to have changed download mechanisms in the past, the 'github' helper function should be used as shown below. ------------------------ -FOO_VERSION = v1.0 # tag or full commit ID +# Use a tag or a full commit ID +FOO_VERSION = v1.0 FOO_SITE = $(call github,,,$(FOO_VERSION)) ------------------------ @@ -62,11 +194,13 @@ need to do AUTORECONF). You can see on the release page if it's an uploaded tarball or a git tag: -- If there is a green download button, like - https://github.com/zedshaw/mongrel2/releases/tag/v1.9.1[mongrel2], then it - was uploaded by the maintainer and you should use the link of that button to - specify +FOO_SITE+, and not use the 'github' helper. -- If there is grey download button, like - https://github.com/xbmc/xbmc/releases/tag/13.2-Gotham[xbmc], then it's an - automatically generated tarball and you should use the 'github' helper - function. +image::github_hash_mongrel2.png[] + +- If it looks like the image above then it was uploaded by the + maintainer and you should use that link (in that example: + 'mongrel2-v1.9.2.tar.bz2') to specify +FOO_SITE+, and not use the + 'github' helper. + +- On the other hand, if there's is *only* the "Source code" link, then + it's an automatically generated tarball and you should use the + 'github' helper function. diff --git a/buildroot/docs/manual/adding-packages-virtual.txt b/buildroot/docs/manual/adding-packages-virtual.txt index a5f17a262..6326bb545 100644 --- a/buildroot/docs/manual/adding-packages-virtual.txt +++ b/buildroot/docs/manual/adding-packages-virtual.txt @@ -83,9 +83,6 @@ On line 3, we select +BR2_PACKAGE_HAS_SOMETHING_VIRTUAL+, and on line 11, we set the value of +BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL+ to the name of the provider, but only if it is selected. -See xref:virtual-package-list[] for the symbols to select if you implement -a new provider for an existing virtual package. - ==== Provider's +.mk+ file The +.mk+ file should also declare an additional variable @@ -99,9 +96,6 @@ packages it is an implementation of: Of course, do not forget to add the proper build and runtime dependencies for this package! -See xref:virtual-package-list[] for the names of virtual packages to provide -if you implement a new provider for an existing virtual package. - ==== Notes on depending on a virtual package When adding a package that requires a certain +FEATURE+ provided by a virtual diff --git a/buildroot/docs/manual/adding-packages-waf.txt b/buildroot/docs/manual/adding-packages-waf.txt new file mode 100644 index 000000000..101cddf1f --- /dev/null +++ b/buildroot/docs/manual/adding-packages-waf.txt @@ -0,0 +1,91 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Infrastructure for Waf-based packages + +[[waf-package-tutorial]] + +==== +waf-package+ tutorial + +First, let's see how to write a +.mk+ file for a Waf-based package, with +an example : + +------------------------ +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_CONF_OPTS = --enable-bar --disable-baz +11: LIBFOO_DEPENDENCIES = bar +12: +13: $(eval $(waf-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot what options to enable for libfoo. + +On line 11, we tell Buildroot the dependencies of libfoo. + +Finally, on line line 13, we invoke the +waf-package+ +macro that generates all the Makefile rules that actually allows the +package to be built. + +[[waf-package-reference]] + +==== +waf-package+ reference + +The main macro of the Waf package infrastructure is +waf-package+. +It is similar to the +generic-package+ macro. + +Just like the generic infrastructure, the Waf infrastructure works +by defining a number of variables before calling the +waf-package+ +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the Waf infrastructure: ++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+, ++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+, ++LIBFOO_INSTALL_TARGET+. + +An additional variable, specific to the Waf infrastructure, can +also be defined. + +* +LIBFOO_SUBDIR+ may contain the name of a subdirectory inside the + package that contains the main wscript file. This is useful, + if for example, the main wscript file is not at the root of + the tree extracted by the tarball. If +HOST_LIBFOO_SUBDIR+ is not + specified, it defaults to +LIBFOO_SUBDIR+. + +* +LIBFOO_NEEDS_EXTERNAL_WAF+ can be set to +YES+ or +NO+ to tell + Buildroot to use the bundled +waf+ executable. If set to +NO+, the + default, then Buildroot will use the waf executable provided in the + package source tree; if set to +YES+, then Buildroot will download, + install waf as a host tool and use it to build the package. + +* +LIBFOO_WAF_OPTS+, to specify additional options to pass to the + +waf+ script at every step of the package build process: configure, + build and installation. By default, empty. + +* +LIBFOO_CONF_OPTS+, to specify additional options to pass to the + +waf+ script for the configuration step. By default, empty. + +* +LIBFOO_BUILD_OPTS+, to specify additional options to pass to the + +waf+ script during the build step. By default, empty. + +* +LIBFOO_INSTALL_STAGING_OPTS+, to specify additional options to pass + to the +waf+ script during the staging installation step. By default, + empty. + +* +LIBFOO_INSTALL_TARGET_OPTS+, to specify additional options to pass + to the +waf+ script during the target installation step. By default, + empty. diff --git a/buildroot/docs/manual/adding-packages.txt b/buildroot/docs/manual/adding-packages.txt index feb0d1318..814355cd7 100644 --- a/buildroot/docs/manual/adding-packages.txt +++ b/buildroot/docs/manual/adding-packages.txt @@ -9,6 +9,10 @@ applications) can be integrated into Buildroot. It also shows how existing packages are integrated, which is needed for fixing issues or tuning their configuration. +When you add a new package, be sure to test it in various conditions +(see xref:testing-package[]) and also check it for coding style (see +xref:check-package[]). + include::adding-packages-directory.txt[] include::adding-packages-generic.txt[] @@ -27,8 +31,24 @@ include::adding-packages-virtual.txt[] include::adding-packages-kconfig.txt[] +include::adding-packages-rebar.txt[] + +include::adding-packages-waf.txt[] + +include::adding-packages-meson.txt[] + +include::adding-packages-cargo.txt[] + +include::adding-packages-golang.txt[] + +include::adding-packages-qmake.txt[] + +include::adding-packages-kernel-module.txt[] + include::adding-packages-asciidoc.txt[] +include::adding-packages-linux-kernel-spec-infra.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[] diff --git a/buildroot/docs/manual/appendix.txt b/buildroot/docs/manual/appendix.txt index 87a20bd86..86afa4bda 100644 --- a/buildroot/docs/manual/appendix.txt +++ b/buildroot/docs/manual/appendix.txt @@ -3,40 +3,4 @@ include::makedev-syntax.txt[] include::makeusers-syntax.txt[] - - -// Automatically generated lists: - -[[package-list]] -== List of target packages available in Buildroot - -include::package-list.txt[] - -[[virtual-package-list]] -== List of virtual packages - -These are the virtual packages known to +Buildroot+, with the -corresponding symbols and providers. - -include::virtual-package-list.txt[] - -[[host-package-list]] -== List of host utilities available in Buildroot - -The following packages are all available in the menu +Host utilities+. - -include::host-package-list.txt[] - -[[deprecated-list]] -== Deprecated features - -The following features are marked as _deprecated_ in Buildroot due to -them being either too old or unmaintained. They will be removed at -some point, so stop using them. -Each deprecated symbol in kconfig depends on a symbol -+BR2_DEPRECATED_SINCE_xxxx_xx+, which provides an indication of when -the feature can be removed: features will not be removed within the -year following deprecation. For example, a symbol depending on -+BR2_DEPRECATED_SINCE_2013_05+ can be removed from 2014.05 onwards. - -include::deprecated-list.txt[] +include::migrating.txt[] diff --git a/buildroot/docs/manual/beyond-buildroot.txt b/buildroot/docs/manual/beyond-buildroot.txt index b8b1973c9..eefea1fec 100644 --- a/buildroot/docs/manual/beyond-buildroot.txt +++ b/buildroot/docs/manual/beyond-buildroot.txt @@ -21,6 +21,35 @@ Remember to add this path to +/etc/exports+. Then, you can execute a NFS-boot from your target. +==== Live CD + +To build a live CD image, enable the _iso image_ option in the +_Filesystem images_ menu. Note that this option is only available on +the x86 and x86-64 architectures, and if you are building your kernel +with Buildroot. + +You can build a live CD image with either IsoLinux, Grub or Grub 2 as +a bootloader, but only Isolinux supports making this image usable both +as a live CD and live USB (through the _Build hybrid image_ option). + +You can test your live CD image using QEMU: + +------------------- +qemu-system-i386 -cdrom output/images/rootfs.iso9660 +------------------- + +Or use it as a hard-drive image if it is a hybrid ISO: + +------------------- +qemu-system-i386 -hda output/images/rootfs.iso9660 +------------------- + +It can be easily flashed to a USB drive with +dd+: + +------------------- +dd if=output/images/rootfs.iso9660 of=/dev/sdb +------------------- + === Chroot If you want to chroot in a generated image, then there are few thing diff --git a/buildroot/docs/manual/ccache-support.txt b/buildroot/docs/manual/ccache-support.txt index 992471dbf..f6746ad7d 100644 --- a/buildroot/docs/manual/ccache-support.txt +++ b/buildroot/docs/manual/ccache-support.txt @@ -33,3 +33,23 @@ make CCACHE_OPTIONS="--max-size=5G" ccache-options # zero statistics counters make CCACHE_OPTIONS="--zero-stats" ccache-options ----------------- + ++ccache+ makes a hash of the source files and of the compiler options. +If a compiler option is different, the cached object file will not be +used. Many compiler options, however, contain an absolute path to the +staging directory. Because of this, building in a different output +directory would lead to many cache misses. + +To avoid this issue, buildroot has the +Use relative paths+ option +(+BR2_CCACHE_USE_BASEDIR+). This will rewrite all absolute paths that +point inside the output directory into relative paths. Thus, changing +the output directory no longer leads to cache misses. + +A disadvantage of the relative paths is that they also end up to be +relative paths in the object file. Therefore, for example, the debugger +will no longer find the file, unless you cd to the output directory +first. + +See https://ccache.samba.org/manual.html#_compiling_in_different_directories[the +ccache manual's section on "Compiling in different directories"] for +more details about this rewriting of absolute paths. diff --git a/buildroot/docs/manual/common-usage.txt b/buildroot/docs/manual/common-usage.txt index 89cd9fe6a..7cfda1036 100644 --- a/buildroot/docs/manual/common-usage.txt +++ b/buildroot/docs/manual/common-usage.txt @@ -84,12 +84,16 @@ to +make+ or set in the environment: configuration interface, so through the Buildroot +.config+ file; this is the recommended way of setting it. + +* +BR2_CCACHE_DIR+ to override the directory where + Buildroot stores the cached files when using ccache. + + * +BR2_DL_DIR+ to override the directory in which - Buildroot stores/retrieves downloaded files + Buildroot stores/retrieves downloaded files. + Note that the Buildroot download directory can also be set from the - configuration interface, so through the Buildroot +.config+ file; this - is the recommended way of setting it. + configuration interface, so through the Buildroot +.config+ file. See + xref:download-location[] for more details on how you can set the download + directory. * +BR2_GRAPH_ALT+, if set and non-empty, to use an alternate color-scheme in build-time graphs * +BR2_GRAPH_OUT+ to set the filetype of generated graphs, either +pdf+ (the @@ -98,6 +102,8 @@ to +make+ or set in the environment: xref:graph-depends[] for the accepted options * +BR2_GRAPH_DOT_OPTS+ is passed verbatim as options to the +dot+ utility to draw the dependency graph. +* +BR2_GRAPH_SIZE_OPTS+ to pass extra options to the size graph; see + xref:graph-size[] for the acepted options An example that uses config files located in the toplevel directory and in your $HOME: @@ -208,15 +214,24 @@ The +graph-depends+ behaviour can be controlled by setting options in the * +--depth N+, +-d N+, to limit the dependency depth to +N+ levels. The default, +0+, means no limit. +* +--stop-on PKG+, +-s PKG+, to stop the graph on the package +PKG+. + +PKG+ can be an actual package name, a glob, the keyword 'virtual' + (to stop on virtual packages), or the keyword 'host' (to stop on + host packages). The package is still present on the graph, but its + dependencies are not. + +* +--exclude PKG+, +-x PKG+, like +--stop-on+, but also omits +PKG+ from + the graph. + * +--transitive+, +--no-transitive+, to draw (or not) the transitive dependencies. The default is to not draw transitive dependencies. -* +--colours R,T,H+, the comma-separated list of colours to draw the +* +--colors R,T,H+, the comma-separated list of colors to draw the root package (+R+), the target packages (+T+) and the host packages (+H+). Defaults to: +lightblue,grey,gainsboro+ -------------------------------- -BR2_GRAPH_DEPS_OPTS='-d 3 --no-transitive --colours=red,green,blue' make graph-depends +BR2_GRAPH_DEPS_OPTS='-d 3 --no-transitive --colors=red,green,blue' make graph-depends -------------------------------- === Graphing the build duration @@ -265,6 +280,120 @@ only other format supported is PNG: BR2_GRAPH_OUT=png make graph-build ---------------- +[[graph-size]] +=== Graphing the filesystem size contribution of packages + +When your target system grows, it is sometimes useful to understand +how much each Buildroot package is contributing to the overall root +filesystem size. To help with such an analysis, Buildroot collects +data about files installed by each package and using this data, +generates a graph and CSV files detailing the size contribution of +the different packages. + +To generate these data after a build, run: + +---------------- +make graph-size +---------------- + +This will generate: + +* +output/graphs/graph-size.pdf+, a pie chart of the contribution of + each package to the overall root filesystem size + +* +output/graphs/package-size-stats.csv+, a CSV file giving the size + contribution of each package to the overall root filesystem size + +* +output/graphs/file-size-stats.csv+, a CSV file giving the size + contribution of each installed file to the package it belongs, and + to the overall filesystem size. + +This +graph-size+ target requires the Python Matplotlib library to be +installed (+python-matplotlib+ on most distributions), and also the ++argparse+ module if you're using a Python version older than 2.7 +(+python-argparse+ on most distributions). + +Just like for the duration graph, a +BR2_GRAPH_OUT+ environment variable +is supported to adjust the output file format. See xref:graph-depends[] +for details about this environment variable. + +Additionally, one may set the environment variable +BR2_GRAPH_SIZE_OPTS+ +to further control the generated graph. Accepted options are: + +* `--size-limit X`, `-l X`, will group all packages which individual + contribution is below `X` percent, to a single entry labelled _Others_ + in the graph. By default, `X=0.01`, which means packages each + contributing less than 1% are grouped under _Others_. Accepted values + are in the range `[0.0..1.0]`. + +* `--iec`, `--binary`, `--si`, `--decimal`, to use IEC (binary, powers + of 1024) or SI (decimal, powers of 1000; the default) prefixes. + +* `--biggest-first`, to sort packages in decreasing size order, rather + than in increasing size order. + +.Note +The collected filesystem size data is only meaningful after a complete +clean rebuild. Be sure to run +make clean all+ before using +make +graph-size+. + +To compare the root filesystem size of two different Buildroot compilations, +for example after adjusting the configuration or when switching to another +Buildroot release, use the +size-stats-compare+ script. It takes two ++file-size-stats.csv+ files (produced by +make graph-size+) as input. +Refer to the help text of this script for more details: + +---------------- +utils/size-stats-compare -h +---------------- + +[[top-level-parallel-build]] +=== Top-level parallel build + +.Note +This section deals with a very experimental feature, which is known to +break even in some non-unusual situations. Use at your own risk. + +Buildroot has always been capable of using parallel build on a per +package basis: each package is built by Buildroot using +make -jN+ (or +the equivalent invocation for non-make-based build systems). The level +of parallelism is by default number of CPUs + 1, but it can be +adjusted using the +BR2_JLEVEL+ configuration option. + +Until 2020.02, Buildroot was however building packages in a serial +fashion: each package was built one after the other, without +parallelization of the build between packages. As of 2020.02, +Buildroot has experimental support for *top-level parallel build*, +which allows some signicant build time savings by building packages +that have no dependency relationship in parallel. This feature is +however marked as experimental and is known not to work in some cases. + +In order to use top-level parallel build, one must: + +. Enable the option +BR2_PER_PACKAGE_DIRECTORIES+ in the Buildroot +configuration + +. Use +make -jN+ when starting the Buildroot build + +Internally, the +BR2_PER_PACKAGE_DIRECTORIES+ will enable a mechanism +called *per-package directories*, which will have the following +effects: + +* Instead of a global _target_ directory and a global _host_ directory + common to all packages, per-package _target_ and _host_ directories + will be used, in +$(O)/per-package//target/+ and + +$(O)/per-package//host/+ respectively. Those folders will be + populated from the corresponding folders of the package dependencies + at the beginning of ++ build. The compiler and all other tools + will therefore only be able to see and access files installed by + dependencies explicitly listed by ++. + +* At the end of the build, the global _target_ and _host_ directories + will be populated, located in +$(O)/target+ and +$(O)/host+ + respectively. This means that during the build, those folders will + be empty and it's only at the very end of the build that they will + be populated. + include::eclipse-integration.txt[] include::advanced.txt[] diff --git a/buildroot/docs/manual/configure-other-components.txt b/buildroot/docs/manual/configure-other-components.txt index deb1fa2a5..60a80f0a4 100644 --- a/buildroot/docs/manual/configure-other-components.txt +++ b/buildroot/docs/manual/configure-other-components.txt @@ -50,3 +50,11 @@ kernel. The corresponding configuration variables are +BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG+ and +BR2_TARGET_BAREBOX_USE_DEFCONFIG+. To open the configuration editor, use +make barebox-menuconfig+. + +U-Boot:: ++ +Configuration of U-Boot (version 2015.04 or newer) is done in the same +way as for the Linux kernel. The corresponding configuration variables +are +BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG+ and ++BR2_TARGET_UBOOT_USE_DEFCONFIG+. To open the configuration editor, +use +make uboot-menuconfig+. diff --git a/buildroot/docs/manual/configure.txt b/buildroot/docs/manual/configure.txt index bd235f030..c9eef567f 100644 --- a/buildroot/docs/manual/configure.txt +++ b/buildroot/docs/manual/configure.txt @@ -31,7 +31,7 @@ code for your system. It consists of a compiler (in our case, +gcc+), binary utils like assembler and linker (in our case, +binutils+) and a C standard library (for example http://www.gnu.org/software/libc/libc.html[GNU Libc], -http://www.uclibc.org/[uClibc]). +http://www.uclibc-ng.org/[uClibc-ng]). The system installed on your development station certainly already has a compilation toolchain that you can use to compile an application @@ -81,9 +81,9 @@ by itself a cross-compilation toolchain, before building the userspace applications and libraries for your target embedded system. This backend supports several C libraries: -http://www.uclibc.org[uClibc], the +http://www.uclibc-ng.org[uClibc-ng], http://www.gnu.org/software/libc/libc.html[glibc] and -http://www.eglibc.org[eglibc]. +http://www.musl-libc.org[musl]. Once you have selected this backend, a number of options appear. The most important ones allow to: @@ -109,20 +109,19 @@ most important ones allow to: * Change the version of the GCC compiler, binutils and the C library. * Select a number of toolchain options (uClibc only): whether the - toolchain should have largefile support (i.e. support for files - larger than 2 GB on 32 bits systems), IPv6 support, RPC support - (used mainly for NFS), wide-char support, locale support (for - internationalization), C++ support or thread support. Depending on - which options you choose, the number of userspace applications and - libraries visible in Buildroot menus will change: many applications - and libraries require certain toolchain options to be enabled. Most - packages show a comment when a certain toolchain option is required - to be able to enable those packages. If needed, you can further - refine the uClibc configuration by running +make - uclibc-menuconfig+. Note however that all packages in Buildroot are - tested against the default uClibc configuration bundled in - Buildroot: if you deviate from this configuration by removing - features from uClibc, some packages may no longer build. + toolchain should have RPC support (used mainly for NFS), + wide-char support, locale support (for internationalization), + C++ support or thread support. Depending on which options you choose, + the number of userspace applications and libraries visible in + Buildroot menus will change: many applications and libraries require + certain toolchain options to be enabled. Most packages show a comment + when a certain toolchain option is required to be able to enable + those packages. If needed, you can further refine the uClibc + configuration by running +make uclibc-menuconfig+. Note however that + all packages in Buildroot are tested against the default uClibc + configuration bundled in Buildroot: if you deviate from this + configuration by removing features from uClibc, some packages may no + longer build. It is worth noting that whenever one of those options is modified, then the entire toolchain and system must be rebuilt. See @@ -147,19 +146,17 @@ cross-compilation toolchains. Buildroot knows about a number of well-known cross-compilation toolchains (from http://www.linaro.org[Linaro] for ARM, http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/[Sourcery -CodeBench] for ARM, x86, x86-64, PowerPC, MIPS and SuperH, -https://blackfin.uclinux.org/gf/project/toolchain[Blackfin toolchains -from Analog Devices], etc.) and is capable of downloading them -automatically, or it can be pointed to a custom toolchain, either -available for download or installed locally. +CodeBench] for ARM, x86-64, PowerPC, and MIPS, and is capable of +downloading them automatically, or it can be pointed to a custom +toolchain, either available for download or installed locally. Then, you have three solutions to use an external toolchain: * Use a predefined external toolchain profile, and let Buildroot download, extract and install the toolchain. Buildroot already knows - about a few CodeSourcery, Linaro, Blackfin and Xilinx toolchains. - Just select the toolchain profile in +Toolchain+ from the - available ones. This is definitely the easiest solution. + about a few CodeSourcery and Linaro toolchains. Just select the + toolchain profile in +Toolchain+ from the available ones. This is + definitely the easiest solution. * Use a predefined external toolchain profile, but instead of having Buildroot download and extract the toolchain, you can tell Buildroot @@ -178,9 +175,9 @@ Then, you have three solutions to use an external toolchain: external toolchain uses the 'glibc' library, you only have to tell whether your toolchain supports C\++ or not and whether it has built-in RPC support. If your external toolchain uses the 'uClibc' - library, then you have to tell Buildroot if it supports largefile, - IPv6, RPC, wide-char, locale, program invocation, threads and - C++. At the beginning of the execution, Buildroot will tell you if + library, then you have to tell Buildroot if it supports RPC, + wide-char, locale, program invocation, threads and C++. + At the beginning of the execution, Buildroot will tell you if the selected options do not match the toolchain configuration. Our external toolchain support has been tested with toolchains from @@ -209,9 +206,9 @@ Buildroot or crosstool-NG. If you want to generate a custom toolchain for your project, that can be used as an external toolchain in Buildroot, our recommendation is -definitely to build it with http://crosstool-ng.org[crosstool-NG]. We -recommend to build the toolchain separately from Buildroot, and then -_import_ it in Buildroot using the external toolchain backend. +to build it either with Buildroot itself (see +xref:build-toolchain-with-buildroot[]) or with +http://crosstool-ng.org[crosstool-NG]. Advantages of this backend: @@ -222,13 +219,57 @@ Advantages of this backend: often very significant in the overall build time of an embedded Linux system. -* Not limited to uClibc: glibc and eglibc toolchains are supported. - Drawbacks of this backend: * If your pre-built external toolchain has a bug, may be hard to get a fix from the toolchain vendor, unless you build your external - toolchain by yourself using Crosstool-NG. + toolchain by yourself using Buildroot or Crosstool-NG. + +[[build-toolchain-with-buildroot]] +==== Build an external toolchain with Buildroot + +The Buildroot internal toolchain option can be used to create an +external toolchain. Here are a series of steps to build an internal +toolchain and package it up for reuse by Buildroot itself (or other +projects). + +Create a new Buildroot configuration, with the following details: + +* Select the appropriate *Target options* for your target CPU + architecture + +* In the *Toolchain* menu, keep the default of *Buildroot toolchain* + for *Toolchain type*, and configure your toolchain as desired + +* In the *System configuration* menu, select *None* as the *Init + system* and *none* as */bin/sh* + +* In the *Target packages* menu, disable *BusyBox* + +* In the *Filesystem images* menu, disable *tar the root filesystem* + +Then, we can trigger the build, and also ask Buildroot to generate a +SDK. This will conveniently generate for us a tarball which contains +our toolchain: + +----- +make sdk +----- + +This produces the SDK tarball in +$(O)/images+, with a name similar to ++arm-buildroot-linux-uclibcgnueabi_sdk-buildroot.tar.gz+. Save this +tarball, as it is now the toolchain that you can re-use as an external +toolchain in other Buildroot projects. + +In those other Buildroot projects, in the *Toolchain* menu: + +* Set *Toolchain type* to *External toolchain* + +* Set *Toolchain* to *Custom toolchain* + +* Set *Toolchain origin* to *Toolchain to be downloaded and installed* + +* Set *Toolchain URL* to +file:///path/to/your/sdk/tarball.tar.gz+ ===== External toolchain wrapper @@ -296,39 +337,42 @@ different solutions to handle the +/dev+ directory : responsibility to enable those two options (if you fail to do so, your Buildroot system will not boot). - * The third solution is *Dynamic using mdev*. This method also relies - on the _devtmpfs_ virtual filesystem detailed above (so the - requirement to have +CONFIG_DEVTMPFS+ and +CONFIG_DEVTMPFS_MOUNT+ - enabled in the kernel configuration still apply), but adds the - +mdev+ userspace utility on top of it. +mdev+ is a program part of - BusyBox that the kernel will call every time a device is added or - removed. Thanks to the +/etc/mdev.conf+ configuration file, +mdev+ - can be configured to for example, set specific permissions or - ownership on a device file, call a script or application whenever a - device appears or disappear, etc. Basically, it allows _userspace_ - to react on device addition and removal events. +mdev+ can for - example be used to automatically load kernel modules when devices - appear on the system. +mdev+ is also important if you have devices - that require a firmware, as it will be responsible for pushing the - firmware contents to the kernel. +mdev+ is a lightweight - implementation (with fewer features) of +udev+. For more details - about +mdev+ and the syntax of its configuration file, see + * The third solution is *Dynamic using devtmpfs + mdev*. This method + also relies on the _devtmpfs_ virtual filesystem detailed above (so + the requirement to have +CONFIG_DEVTMPFS+ and + +CONFIG_DEVTMPFS_MOUNT+ enabled in the kernel configuration still + apply), but adds the +mdev+ userspace utility on top of it. +mdev+ + is a program part of BusyBox that the kernel will call every time a + device is added or removed. Thanks to the +/etc/mdev.conf+ + configuration file, +mdev+ can be configured to for example, set + specific permissions or ownership on a device file, call a script + or application whenever a device appears or disappear, + etc. Basically, it allows _userspace_ to react on device addition + and removal events. +mdev+ can for example be used to automatically + load kernel modules when devices appear on the system. +mdev+ is + also important if you have devices that require a firmware, as it + will be responsible for pushing the firmware contents to the + kernel. +mdev+ is a lightweight implementation (with fewer + features) of +udev+. For more details about +mdev+ and the syntax + of its configuration file, see http://git.busybox.net/busybox/tree/docs/mdev.txt. - * The fourth solution is *Dynamic using eudev*. This method also - relies on the _devtmpfs_ virtual filesystem detailed above, but - adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon - that runs in the background, and gets called by the kernel when a - device gets added or removed from the system. It is a more - heavyweight solution than +mdev+, but provides higher flexibility. - +eudev+ is a standalone version of +udev+, the original userspace - daemon used in most desktop Linux distributions, which is now part - of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev. + * The fourth solution is *Dynamic using devtmpfs + eudev*. This + method also relies on the _devtmpfs_ virtual filesystem detailed + above, but adds the +eudev+ userspace daemon on top of it. +eudev+ + is a daemon that runs in the background, and gets called by the + kernel when a device gets added or removed from the system. It is a + more heavyweight solution than +mdev+, but provides higher + flexibility. +eudev+ is a standalone version of +udev+, the + original userspace daemon used in most desktop Linux distributions, + which is now part of Systemd. For more details, see + http://en.wikipedia.org/wiki/Udev. The Buildroot developers recommendation is to start with the *Dynamic using devtmpfs only* solution, until you have the need for userspace to be notified when devices are added/removed, or if firmwares are -needed, in which case *Dynamic using mdev* is usually a good solution. +needed, in which case *Dynamic using devtmpfs + mdev* is usually a +good solution. Note that if +systemd+ is chosen as init system, /dev management will be performed by the +udev+ program provided by +systemd+. diff --git a/buildroot/docs/manual/contribute.txt b/buildroot/docs/manual/contribute.txt index 5f0762f4a..11d8811b4 100644 --- a/buildroot/docs/manual/contribute.txt +++ b/buildroot/docs/manual/contribute.txt @@ -25,7 +25,7 @@ for more information on obtaining a Buildroot git tree. === Reproducing, analyzing and fixing bugs A first way of contributing is to have a look at the open bug reports in -the https://bugs.busybox.net/buglist.cgi?product=buildroot[Buildroot bug +the https://bugs.buildroot.org/buglist.cgi?product=buildroot[Buildroot bug tracker]. As we strive to keep the bug count as small as possible, all help in reproducing, analyzing and fixing reported bugs is more than welcome. Don't hesitate to add a comment to bug reports reporting your @@ -73,7 +73,7 @@ basically two things that can be done: In the commit message of a patch fixing an autobuild failure, add a reference to the build result directory, as follows: --------------------- -Fixes http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069 +Fixes: http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069 --------------------- === Reviewing and testing patches @@ -182,10 +182,112 @@ _Please, do not attach patches to bugs, send them to the mailing list instead_. If you made some changes to Buildroot and you would like to contribute -them to the Buildroot project, proceed as follows. Starting from the -changes committed in your local git view, _rebase_ your development -branch on top of the upstream tree before generating a patch set. To do -so, run: +them to the Buildroot project, proceed as follows. + +==== The formatting of a patch + +We expect patches to be formatted in a specific way. This is necessary +to make it easy to review patches, to be able to apply them easily to +the git repository, to make it easy to find back in the history how +and why things have changed, and to make it possible to use +git +bisect+ to locate the origin of a problem. + +First of all, it is essential that the patch has a good commit +message. The commit message should start with a separate line with a +brief summary of the change, prefixed by the area touched by the +patch. A few examples of good commit titles: + +* +package/linuxptp: bump version to 2.0+ + +* +configs/imx23evk: bump Linux version to 4.19+ + +* +package/pkg-generic: postpone evaluation of dependency conditions+ + +* +boot/uboot: needs host-{flex,bison}+ + +* +support/testing: add python-ubjson tests+ + +The description that follows the prefix should start with a lower case +letter (i.e "bump", "needs", "postpone", "add" in the above examples). + +Second, the body of the commit message should describe _why_ this +change is needed, and if necessary also give details about _how_ it +was done. When writing the commit message, think of how the reviewers +will read it, but also think about how you will read it when you look +at this change again a few years down the line. + +Third, the patch itself should do only one change, but do it +completely. Two unrelated or weakly related changes should usually be +done in two separate patches. This usually means that a patch affects +only a single package. If several changes are related, it is often +still possible to split them up in small patches and apply them in a +specific order. Small patches make it easier to review, and often +make it easier to understand afterwards why a change was done. +However, each patch must be complete. It is not allowed that the +build is broken when only the first but not the second patch is +applied. This is necessary to be able to use +git bisect+ afterwards. + +Of course, while you're doing your development, you're probably going +back and forth between packages, and certainly not committing things +immediately in a way that is clean enough for submission. So most +developers rewrite the history of commits to produce a clean set of +commits that is appropriate for submission. To do this, you need to +use _interactive rebasing_. You can learn about it +https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History[in the Pro +Git book]. Sometimes, it is even easier to discard you history with ++git reset --soft origin/master+ and select individual changes with ++git add -i+ or +git add -p+. + +Finally, the patch should be signed off. This is done by adding ++Signed-off-by: Your Real Name + at the end of the +commit message. +git commit -s+ does that for you, if configured +properly. The +Signed-off-by+ tag means that you publish the patch +under the Buildroot license (i.e. GPL-2.0+, except for package patches, +which have the upstream license), and that you are allowed to do so. +See http://developercertificate.org/[the Developer Certificate of +Origin] for details. + +When adding new packages, you should submit every package in a +separate patch. This patch should have the update to ++package/Config.in+, the package +Config.in+ file, the +.mk+ file, the ++.hash+ file, any init script, and all package patches. If the package +has many sub-options, these are sometimes better added as separate +follow-up patches. The summary line should be something like ++: new package+. The body of the commit message can be +empty for simple packages, or it can contain the description of the +package (like the Config.in help text). If anything special has to be +done to build the package, this should also be explained explicitly in +the commit message body. + +When you bump a package to a new version, you should also submit a +separate patch for each package. Don't forget to update the +.hash+ +file, or add it if it doesn't exist yet. Also don't forget to check if +the +_LICENSE+ and +_LICENSE_FILES+ are still valid. The summary line +should be something like +: bump to version +. If the new version only contains security updates compared +to the existing one, the summary should be +: security +bump to version + and the commit message body should show +the CVE numbers that are fixed. If some package patches can be removed +in the new version, it should be explained explicitly why they can be +removed, preferably with the upstream commit ID. Also any other +required changes should be explained explicitly, like configure +options that no longer exist or are no longer needed. + +If you are interested in getting notified of build failures and of +further changes in the packages you added or modified, please add +yourself to the DEVELOPERS file. This should be done in the same patch +creating or modifying the package. See xref:DEVELOPERS[the DEVELOPERS file] +for more information. + +Buildroot provides a handy tool to check for common coding style +mistakes on files you created or modified, called +check-package+ (see +xref:check-package[] for more information). + +==== Preparing a patch series + +Starting from the changes committed in your local git view, _rebase_ +your development branch on top of the upstream tree before generating +a patch set. To do so, run: --------------------- $ git fetch --all --tags @@ -206,10 +308,41 @@ automatically adding the +Signed-off-by+ line. Once patch files are generated, you can review/edit the commit message before submitting them, using your favorite text editor. -Lastly, send/submit your patch set to the Buildroot mailing list: +Buildroot provides a handy tool to know to whom your patches should be +sent, called +get-developers+ (see xref:DEVELOPERS[] for more +information). This tool reads your patches and outputs the appropriate ++git send-email+ command to use: --------------------- -$ git send-email --to buildroot@buildroot.org outgoing/* +$ ./utils/get-developers outgoing/* +--------------------- + +Use the output of +get-developers+ to send your patches: + +--------------------- +$ git send-email --to buildroot@buildroot.org --cc bob --cc alice outgoing/* +--------------------- + +Alternatively, +get-developers -e+ can be used directly with the ++--cc-cmd+ argument to +git send-email+ to automatically CC the +affected developers: + +--------------------- +$ git send-email --to buildroot@buildroot.org \ + --cc-cmd './utils/get-developers -e' origin/master +--------------------- + ++git+ can be configured to automatically do this out of the box with: + +--------------------- +$ git config sendemail.to buildroot@buildroot.org +$ git config sendemail.ccCmd "$(pwd)/utils/get-developers -e" +--------------------- + +And then just do: + +--------------------- +$ git send-email origin/master --------------------- Note that +git+ should be configured to use your mail account. @@ -269,7 +402,7 @@ the problem is complex, it is OK to add more paragraphs. All paragraphs should be wrapped at 72 characters. A paragraph that explains the root cause of the problem. Again, more -than on paragraph is OK. +than one paragraph is OK. Finally, one or more paragraphs that explain how the problem is solved. Don't hesitate to explain complex solutions in detail. @@ -298,6 +431,28 @@ $ git format-patch --subject-prefix "PATCH v4" \ -M -s -o outgoing origin/master --------------------- +Since git version 1.8.1, you can also use +-v + (where is the +version number): + +--------------------- +$ git format-patch -v4 -M -s -o outgoing origin/master +--------------------- + +When you provide a new version of a patch, please mark the old one as +superseded in http://patchwork.buildroot.org[patchwork]. You need to +create an account on http://patchwork.buildroot.org[patchwork] to be +able to modify the status of your patches. Note that you can only change +the status of patches you submitted yourself, which means the email +address you register in http://patchwork.buildroot.org[patchwork] should +match the one you use for sending patches to the mailing list. + +You can also add the +--in-reply-to + option when +submitting a patch to the mailing list. The id of the mail to reply to +can be found under the "Message Id" tag on +http://patchwork.buildroot.org[patchwork]. The advantage of +*in-reply-to* is that patchwork will automatically mark the previous +version of the patch as superseded. + [[reporting-bugs]] === Reporting issues/bugs or getting help @@ -332,3 +487,168 @@ preserve Unix-style line terminators when downloading raw pastes. Following pastebin services are known to work correctly: - https://gist.github.com/ - http://code.bulix.org/ + +=== Using the run-tests framework + +Buildroot includes a run-time testing framework called run-tests built +upon Python scripting and QEMU runtime execution. There are two types of +test cases within the framework, one for build time tests and another for +run-time tests that have a QEMU dependency. The goals of the framework are +the following: + +* build a well defined configuration +* optionally, verify some properties of the build output +* if it is a run-time test: +** boot it under QEMU +** run some test condition to verify that a given feature is working + +The run-tests tool has a series of options documented in the tool's help '-h' +description. Some common options include setting the download folder, the +output folder, keeping build output, and for multiple test cases, you can set +the JLEVEL for each. + +Here is an example walk through of running a test case. + +* For a first step, let us see what all the test case options are. The test +cases can be listed by executing +support/testing/run-tests -l+. These tests +can all be run individually during test development from the console. Both +one at a time and selectively as a group of a subset of tests. + +--------------------- +$ support/testing/run-tests -l +List of tests +test_run (tests.utils.test_check_package.TestCheckPackage) +Test the various ways the script can be called in a simple top to ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootMusl) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootuClibc) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainCCache) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainCtngMusl) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainLinaroArm) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv4) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv5) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv7) ... ok +[snip] +test_run (tests.init.test_systemd.TestInitSystemSystemdRoFull) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRoIfupdown) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRoNetworkd) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwFull) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwIfupdown) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwNetworkd) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRo) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRoNet) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRw) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRwNet) ... ok + +Ran 157 tests in 0.021s + +OK +--------------------- + +Those runtime tests are regularly executed by Buildroot Gitlab CI +infrastructure, see .gitlab.yml and https://gitlab.com/buildroot.org/buildroot/-/jobs. + +==== Creating a test case + +The best way to get familiar with how to create a test case is to look at a +few of the basic file system +support/testing/tests/fs/+ and init ++support/testing/tests/init/+ test scripts. Those tests give good examples +of a basic build and build with run type of tests. There are other more +advanced cases that use things like nested +br2-external+ folders to provide +skeletons and additional packages. + +The test cases by default use a br-arm-full-* uClibc-ng toolchain and the +prebuild kernel for a armv5/7 cpu. It is recommended to use the default +defconfig test configuration except when Glibc/musl or a newer kernel are +necessary. By using the default it saves build time and the test would +automatically inherit a kernel/std library upgrade when the default is +updated. + +The basic test case definition involves + +* Creation of a new test file +* Defining a unique test class +* Determining if the default defconfig plus test options can be used +* Implementing a +def test_run(self):+ function to optionally startup the +emulator and provide test case conditions. + +After creating the test script, add yourself to the +DEVELOPERS+ file to +be the maintainer of that test case. + +==== Debugging a test case + +Within the Buildroot repository, the testing framework is organized at the +top level in +support/testing/+ by folders of +conf+, +infra+ and +tests+. +All the test cases live under the +test+ folder and are organized in various +folders representing the catagory of test. + +Lets walk through an example. + +* Using the Busybox Init system test case with a read/write rootfs ++tests.init.test_busybox.TestInitSystemBusyboxRw+ +* A minimal set of command line arguments when debugging a test case would +include '-d' which points to your dl folder, '-o' to an output folder, and +'-k' to keep any output on both pass/fail. With those options, the test will +retain logging and build artifacts providing status of the build and +execution of the test case. + +--------------------- +$ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.TestInitSystemBusyboxRw +15:03:26 TestInitSystemBusyboxRw Starting +15:03:28 TestInitSystemBusyboxRw Building +15:08:18 TestInitSystemBusyboxRw Building done +15:08:27 TestInitSystemBusyboxRw Cleaning up +. +Ran 1 test in 301.140s + +OK +--------------------- + +* For the case of a successful build, the +output_folder+ would contain a + folder with the Buildroot build, build log and run-time log. If +the build failed, the console output would show the stage at which it failed +(setup / build / run). Depending on the failure stage, the build/run logs +and/or Buildroot build artifacts can be inspected and instrumented. If the +QEMU instance needs to be launched for additional testing, the first few +lines of the run-time log capture it and it would allow some incremental +testing without re-running +support/testing/run-tests+. + +* You can also make modifications to the current sources inside the ++output_folder+ (e.g. for debug purposes) and rerun the standard +Buildroot make targets (in order to regenerate the complete image with +the new modifications) and then rerun the test. Modifying the sources +directly can speed up debugging compared to adding patch files, wiping the +output directoy, and starting the test again. + +--------------------- +$ ls output_folder/ +TestInitSystemBusyboxRw/ +TestInitSystemBusyboxRw-build.log +TestInitSystemBusyboxRw-run.log +--------------------- + +* The source file used to implement this example test is found under ++support/testing/tests/init/test_busybox.py+. This file outlines the +minimal defconfig that creates the build, QEMU configuration to launch +the built images and the test case assertions. + +To test an existing or new test case within Gitlab CI, there is a method of +invoking a specific test by creating a Buildroot fork in Gitlab under your +account. This can be handy when adding/changing a run-time test or fixing a +bug on a use case tested by a run-time test case. + + +In the examples below, the component of the branch name is a unique +string you choose to identify this specific job being created. + +* to trigger all run-test test case jobs: + +--------------------- + $ git push gitlab HEAD:-runtime-tests +--------------------- + +* to trigger one test case job, a specific branch naming string is used that +includes the full test case name. + +--------------------- + $ git push gitlab HEAD:- +--------------------- diff --git a/buildroot/docs/manual/customize-configuration.txt b/buildroot/docs/manual/customize-configuration.txt index 6224d4080..ae6cebe6c 100644 --- a/buildroot/docs/manual/customize-configuration.txt +++ b/buildroot/docs/manual/customize-configuration.txt @@ -24,8 +24,8 @@ Alternatively, you can copy the file to any other place and rebuild with [[customize-store-package-config]] === Storing the configuration of other components -The configuration files for BusyBox, the Linux kernel, Barebox and -uClibc should be stored as well if changed. For each of these +The configuration files for BusyBox, the Linux kernel, Barebox, U-Boot +and uClibc should be stored as well if changed. For each of these components, a Buildroot configuration option exists to point to an input configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. To store their configuration, set these configuration options to a path where you @@ -56,6 +56,8 @@ configuration files easier. path specified by +BR2_UCLIBC_CONFIG+. * +make barebox-update-defconfig+ saves the barebox configuration to the path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+. +* +make uboot-update-defconfig+ saves the U-Boot configuration to the + path specified by +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE+. * For at91bootstrap3, no helper exists so you have to copy the config file manually to +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+. diff --git a/buildroot/docs/manual/customize-directory-structure.txt b/buildroot/docs/manual/customize-directory-structure.txt index 0be3f77e5..a3a7ad4cb 100644 --- a/buildroot/docs/manual/customize-directory-structure.txt +++ b/buildroot/docs/manual/customize-directory-structure.txt @@ -13,7 +13,8 @@ section. Orthogonal to this directory structure, you can choose _where_ you place this structure itself: either inside the Buildroot tree, or outside of -it using +BR2_EXTERNAL+. Both options are valid, the choice is up to you. +it using a br2-external tree. Both options are valid, the choice is up +to you. ----- +-- board/ @@ -38,8 +39,8 @@ it using +BR2_EXTERNAL+. Both options are valid, the choice is up to you. | +-- package/ | +-- / -| +-- Config.in (if not using BR2_EXTERNAL) -| +-- .mk (if not using BR2_EXTERNAL) +| +-- Config.in (if not using a br2-external tree) +| +-- .mk (if not using a br2-external tree) | +-- package1/ | | +-- Config.in | | +-- package1.mk @@ -47,14 +48,15 @@ it using +BR2_EXTERNAL+. Both options are valid, the choice is up to you. | +-- Config.in | +-- package2.mk | -+-- Config.in (if using BR2_EXTERNAL) -+-- external.mk (if using BR2_EXTERNAL) ++-- Config.in (if using a br2-external tree) ++-- external.mk (if using a br2-external tree) ++-- external.desc (if using a br2-external tree) ------ Details on the files shown above are given further in this chapter. Note: if you choose to place this structure outside of the Buildroot -tree using +BR2_EXTERNAL+, the and possibly +tree but in a br2-external tree, the and possibly components may be superfluous and can be left out. ==== Implementing layered customizations diff --git a/buildroot/docs/manual/customize-outside-br.txt b/buildroot/docs/manual/customize-outside-br.txt index 5d63e60bd..5f7d623ae 100644 --- a/buildroot/docs/manual/customize-outside-br.txt +++ b/buildroot/docs/manual/customize-outside-br.txt @@ -11,95 +11,405 @@ place project-specific customizations in two locations: branches in a version control system so that upgrading to a newer Buildroot release is easy. - * outside of the Buildroot tree, using the +BR2_EXTERNAL+ mechanism. + * outside of the Buildroot tree, using the _br2-external_ mechanism. This mechanism allows to keep package recipes, board support and configuration files outside of the Buildroot tree, while still - having them nicely integrated in the build logic. This section - explains how to use +BR2_EXTERNAL+. - -+BR2_EXTERNAL+ is an environment variable that can be used to point to -a directory that contains Buildroot customizations. It can be passed -to any Buildroot +make+ invocation. It is automatically saved in the -hidden +.br-external+ file in the output directory. Thanks to this, -there is no need to pass +BR2_EXTERNAL+ at every +make+ invocation. It -can however be changed at any time by passing a new value, and can be -removed by passing an empty value. - -*Note:* the +BR2_EXTERNAL+ path can be either an absolute or a relative path, -but if it's passed as a relative path, it is important to note that it -is interpreted relative to the main Buildroot source directory, *not* -to the Buildroot output directory. + having them nicely integrated in the build logic. We call this + location a _br2-external tree_. This section explains how to use + the br2-external mechanism and what to provide in a br2-external + tree. + +One can tell Buildroot to use one or more br2-external trees by setting +the +BR2_EXTERNAL+ make variable set to the path(s) of the br2-external +tree(s) to use. It can be passed to any Buildroot +make+ invocation. It +is automatically saved in the hidden +.br2-external.mk+ file in the output +directory. Thanks to this, there is no need to pass +BR2_EXTERNAL+ at +every +make+ invocation. It can however be changed at any time by +passing a new value, and can be removed by passing an empty value. + +.Note +The path to a br2-external tree can be either absolute or relative. +If it is passed as a relative path, it is important to note that it is +interpreted relative to the main Buildroot source directory, *not* to +the Buildroot output directory. + +.Note: +If using an br2-external tree from before Buildroot 2016.11, you need to +convert it before you can use it with Buildroot 2016.11 onward. See +xref:br2-external-converting[] for help on doing so. Some examples: ----- - buildroot/ $ make BR2_EXTERNAL=/path/to/foobar menuconfig +buildroot/ $ make BR2_EXTERNAL=/path/to/foo menuconfig ----- -From now on, external definitions from the +/path/to/foobar+ -directory will be used: +From now on, definitions from the +/path/to/foo+ br2-external tree +will be used: ----- - buildroot/ $ make - buildroot/ $ make legal-info +buildroot/ $ make +buildroot/ $ make legal-info ----- -We can switch to another external definitions directory at any time: +We can switch to another br2-external tree at any time: ----- - buildroot/ $ make BR2_EXTERNAL=/where/we/have/barfoo xconfig +buildroot/ $ make BR2_EXTERNAL=/where/we/have/bar xconfig ----- -Or disable the usage of external definitions: +We can also use multiple br2-external trees: + +---- +buildroot/ $ make BR2_EXTERNAL=/path/to/foo:/where/we/have/bar menuconfig +---- + +Or disable the usage of any br2-external tree: ----- - buildroot/ $ make BR2_EXTERNAL= xconfig +buildroot/ $ make BR2_EXTERNAL= xconfig ----- -+BR2_EXTERNAL+ allows three different things: - - * One can store all the board-specific configuration files there, - such as the kernel configuration, the root filesystem overlay, or - any other configuration file for which Buildroot allows to set its - location. The +BR2_EXTERNAL+ value is available within the - Buildroot configuration using +$(BR2_EXTERNAL)+. As an example, one - could set the +BR2_ROOTFS_OVERLAY+ Buildroot option to - +$(BR2_EXTERNAL)/board//overlay/+ (to specify a root - filesystem overlay), or the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ - Buildroot option to - +$(BR2_EXTERNAL)/board//kernel.config+ (to specify the - location of the kernel configuration file). - - * One can store package recipes (i.e. +Config.in+ and - +.mk+), or even custom configuration options and make - logic. Buildroot automatically includes +$(BR2_EXTERNAL)/Config.in+ to - make it appear in the top-level configuration menu, and includes - +$(BR2_EXTERNAL)/external.mk+ with the rest of the makefile logic. - Providing those two files is mandatory, but they can be empty. -+ -The main usage of this is to store package recipes. The recommended - way to do this is to write a +$(BR2_EXTERNAL)/Config.in+ file that - looks like: +==== Layout of a br2-external tree + +A br2-external tree must contain at least those three files, described +in the following chapters: + + * +external.desc+ + * +external.mk+ + * +Config.in+ + +Apart from those mandatory files, there may be additional and optional +content that may be present in a br2-external tree, like the +configs/+ +or +provides/+ directories. They are described in the following chapters +as well. + +A complete example br2-external tree layout is also described later. + +===== The +external.desc+ file + +That file describes the br2-external tree: the _name_ and _description_ +for that br2-external tree. + +The format for this file is line based, with each line starting by a +keyword, followed by a colon and one or more spaces, followed by the +value assigned to that keyword. There are two keywords currently +recognised: + + * +name+, mandatory, defines the name for that br2-external tree. That + name must only use ASCII characters in the set +[A-Za-z0-9_]+; any + other character is forbidden. Buildroot sets the variable + +BR2_EXTERNAL_$(NAME)_PATH+ to the absolute path of the br2-external + tree, so that you can use it to refer to your br2-external tree. This + variable is available both in Kconfig, so you can use it to source your + Kconfig files (see below) and in the Makefile, so that you can use it + to include other Makefiles (see below) or refer to other files (like + data files) from your br2-external tree. + +.Note: +Since it is possible to use multiple br2-external trees at once, this + name is used by Buildroot to generate variables for each of those trees. + That name is used to identify your br2-external tree, so try to come up + with a name that really describes your br2-external tree, in order for + it to be relatively unique, so that it does not clash with another name + from another br2-external tree, especially if you are planning on + somehow sharing your br2-external tree with third parties or using + br2-external trees from third parties. + + * +desc+, optional, provides a short description for that br2-external + tree. It shall fit on a single line, is mostly free-form (see below), + and is used when displaying information about a br2-external tree (e.g. + above the list of defconfig files, or as the prompt in the menuconfig); + as such, it should relatively brief (40 chars is probably a good upper + limit). The description is available in the +BR2_EXTERNAL_$(NAME)_DESC+ + variable. + +Examples of names and the corresponding +BR2_EXTERNAL_$(NAME)_PATH+ +variables: + + * +FOO+ -> +BR2_EXTERNAL_FOO_PATH+ + * +BAR_42+ -> +BR2_EXTERNAL_BAR_42_PATH+ + +In the following examples, it is assumed the name to be set to +BAR_42+. + +.Note: +Both +BR2_EXTERNAL_$(NAME)_PATH+ and `BR2_EXTERNAL_$(NAME)_DESC` are + available in the Kconfig files and the Makefiles. They are also + exported in the environment so are available in post-build, post-image + and in-fakeroot scripts. + +===== The +Config.in+ and +external.mk+ files + +Those files (which may each be empty) can be used to define package +recipes (i.e. +foo/Config.in+ and +foo/foo.mk+ like for packages bundled +in Buildroot itself) or other custom configuration options or make logic. + +Buildroot automatically includes the +Config.in+ from each br2-external +tree to make it appear in the top-level configuration menu, and includes +the +external.mk+ from each br2-external tree with the rest of the +makefile logic. + +The main usage of this is to store package recipes. The recommended way +to do this is to write a +Config.in+ file that looks like: + ------ -source "$BR2_EXTERNAL/package/package1/Config.in" -source "$BR2_EXTERNAL/package/package2/Config.in" +source "$BR2_EXTERNAL_BAR_42_PATH/package/package1/Config.in" +source "$BR2_EXTERNAL_BAR_42_PATH/package/package2/Config.in" ------ -+ -Then, have a +$(BR2_EXTERNAL)/external.mk+ file that looks like: -+ + +Then, have an +external.mk+ file that looks like: + ------ -include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk)) +include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk)) ------ -+ -And then in +$(BR2_EXTERNAL)/package/package1+ and - +$(BR2_EXTERNAL)/package/package2+ create normal Buildroot - package recipes, as explained in xref:adding-packages[]. - If you prefer, you can also group the packages in subdirectories - called and adapt the above paths accordingly. - - * One can store Buildroot defconfigs in the +configs+ subdirectory of - +$(BR2_EXTERNAL)+. Buildroot will automatically show them in the - output of +make help+ and allow them to be loaded with the normal - +make _defconfig+ command. They will be visible under the - +User-provided configs+' label in the 'make help' output. + +And then in +$(BR2_EXTERNAL_BAR_42_PATH)/package/package1+ and ++$(BR2_EXTERNAL_BAR_42_PATH)/package/package2+ create normal +Buildroot package recipes, as explained in xref:adding-packages[]. +If you prefer, you can also group the packages in subdirectories +called and adapt the above paths accordingly. + +You can also define custom configuration options in +Config.in+ and +custom make logic in +external.mk+. + +===== The +configs/+ directory + +One can store Buildroot defconfigs in the +configs+ subdirectory of +the br2-external tree. Buildroot will automatically show them in the +output of +make list-defconfigs+ and allow them to be loaded with the +normal +make _defconfig+ command. They will be visible in the +'make list-defconfigs' output, below an +External configs+ label that +contains the name of the br2-external tree they are defined in. + +.Note: +If a defconfig file is present in more than one br2-external tree, then +the one from the last br2-external tree is used. It is thus possible +to override a defconfig bundled in Buildroot or another br2-external +tree. + +===== The +provides/+ directory + +For some packages, Buildroot provides a choice between two (or more) +implementations of API-compatible such packages. For example, there is +a choice to choose either libjpeg ot jpeg-turbo, and another choice +between openssl or libressl. Finally, there is a choice to select one +of the known, pre-configured toolchains. + +It is possible for a br2-external to extend those choices, by providing +a set of files that define those alternatives: + +* +provides/toolchains.in+ defines the pre-configured toolchains, which + will then be listed in the toolchain selection; +* +provides/jpeg.in+ defines the alternative libjpeg implementations; +* +provides/openssl.in+ defines the alternative openssl implementations. + +===== Free-form content + +One can store all the board-specific configuration files there, such +as the kernel configuration, the root filesystem overlay, or any other +configuration file for which Buildroot allows to set the location (by +using the +BR2_EXTERNAL_$(NAME)_PATH+ variable). For example, you +could set the paths to a global patch directory, to a rootfs overlay +and to the kernel configuration file as follows (e.g. by running +`make menuconfig` and filling in these options): + +---- +BR2_GLOBAL_PATCH_DIR=$(BR2_EXTERNAL_BAR_42_PATH)/patches/ +BR2_ROOTFS_OVERLAY=$(BR2_EXTERNAL_BAR_42_PATH)/board//overlay/ +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=$(BR2_EXTERNAL_BAR_42_PATH)/board//kernel.config +---- + +===== Additional Linux kernel extensions + +Additional Linux kernel extensions (see xref:linux-kernel-ext[]) can +be added by storing them in the `linux/` directory at the root of a +br2-external tree. + +===== Example layout + +Here is an example layout using all features of br2-external (the sample +content is shown for the file above it, when it is relevant to explain +the br2-external tree; this is all entirely made up just for the sake of +illustration, of course): + +---- +/path/to/br2-ext-tree/ + |- external.desc + | |name: BAR_42 + | |desc: Example br2-external tree + | `---- + | + |- Config.in + | |source "$BR2_EXTERNAL_BAR_42_PATH/toolchain/toolchain-external-mine/Config.in.options" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-1/Config.in" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-2/Config.in" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/my-jpeg/Config.in" + | | + | |config BAR_42_FLASH_ADDR + | | hex "my-board flash address" + | | default 0x10AD + | `---- + | + |- external.mk + | |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk)) + | |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/toolchain/*/*.mk)) + | | + | |flash-my-board: + | | $(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/flash-image \ + | | --image $(BINARIES_DIR)/image.bin \ + | | --address $(BAR_42_FLASH_ADDR) + | `---- + | + |- package/pkg-1/Config.in + | |config BR2_PACKAGE_PKG_1 + | | bool "pkg-1" + | | help + | | Some help about pkg-1 + | `---- + |- package/pkg-1/pkg-1.hash + |- package/pkg-1/pkg-1.mk + | |PKG_1_VERSION = 1.2.3 + | |PKG_1_SITE = /some/where/to/get/pkg-1 + | |PKG_1_LICENSE = blabla + | | + | |define PKG_1_INSTALL_INIT_SYSV + | | $(INSTALL) -D -m 0755 $(PKG_1_PKGDIR)/S99my-daemon \ + | | $(TARGET_DIR)/etc/init.d/S99my-daemon + | |endef + | | + | |$(eval $(autotools-package)) + | `---- + |- package/pkg-1/S99my-daemon + | + |- package/pkg-2/Config.in + |- package/pkg-2/pkg-2.hash + |- package/pkg-2/pkg-2.mk + | + |- provides/jpeg.in + | |config BR2_PACKAGE_MY_JPEG + | | bool "my-jpeg" + | `---- + |- package/my-jpeg/Config.in + | |config BR2_PACKAGE_PROVIDES_JPEG + | | default "my-jpeg" if BR2_PACKAGE_MY_JPEG + | `---- + |- package/my-jpeg/my-jpeg.mk + | |# This is a normal package .mk file + | |MY_JPEG_VERSION = 1.2.3 + | |MY_JPEG_SITE = https://example.net/some/place + | |MY_JPEG_PROVIDES = jpeg + | |$(eval $(autotools-package)) + | `---- + | + |- provides/toolchains.in + | |config BR2_TOOLCHAIN_EXTERNAL_MINE + | | bool "my custom toolchain" + | | depends on BR2_some_arch + | | select BR2_INSTALL_LIBSTDCPP + | `---- + |- toolchain/toolchain-external-mine/Config.in.options + | |if BR2_TOOLCHAIN_EXTERNAL_MINE + | |config BR2_TOOLCHAIN_EXTERNAL_PREFIX + | | default "arch-mine-linux-gnu" + | |config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + | | default "toolchain-external-mine" + | |endif + | `---- + |- toolchain/toolchain-external-mine/toolchain-external-mine.mk + | |TOOLCHAIN_EXTERNAL_MINE_SITE = https://example.net/some/place + | |TOOLCHAIN_EXTERNAL_MINE_SOURCE = my-toolchain.tar.gz + | |$(eval $(toolchain-external-package)) + | `---- + | + |- linux/Config.ext.in + | |config BR2_LINUX_KERNEL_EXT_EXAMPLE_DRIVER + | | bool "example-external-driver" + | | help + | | Example external driver + | |--- + |- linux/linux-ext-example-driver.mk + | + |- configs/my-board_defconfig + | |BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BAR_42_PATH)/patches/" + | |BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/overlay/" + | |BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/post-image.sh" + | |BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/kernel.config" + | `---- + | + |- patches/linux/0001-some-change.patch + |- patches/linux/0002-some-other-change.patch + |- patches/busybox/0001-fix-something.patch + | + |- board/my-board/kernel.config + |- board/my-board/overlay/var/www/index.html + |- board/my-board/overlay/var/www/my.css + |- board/my-board/flash-image + `- board/my-board/post-image.sh + |#!/bin/sh + |generate-my-binary-image \ + | --root ${BINARIES_DIR}/rootfs.tar \ + | --kernel ${BINARIES_DIR}/zImage \ + | --dtb ${BINARIES_DIR}/my-board.dtb \ + | --output ${BINARIES_DIR}/image.bin + `---- +---- + +The br2-external tree will then be visible in the menuconfig (with +the layout expanded): + +---- +External options ---> + *** Example br2-external tree (in /path/to/br2-ext-tree/) + [ ] pkg-1 + [ ] pkg-2 + (0x10AD) my-board flash address +---- + +If you are using more than one br2-external tree, it would look like +(with the layout expanded and the second one with name +FOO_27+ but no ++desc:+ field in +external.desc+): + +---- +External options ---> + Example br2-external tree ---> + *** Example br2-external tree (in /path/to/br2-ext-tree) + [ ] pkg-1 + [ ] pkg-2 + (0x10AD) my-board flash address + FOO_27 ---> + *** FOO_27 (in /path/to/another-br2-ext) + [ ] foo + [ ] bar +---- + +Additionally, the jpeg provider will be visible in the jpeg choice: + +---- +Target packages ---> + Libraries ---> + Graphics ---> + [*] jpeg support + jpeg variant () ---> + ( ) jpeg + ( ) jpeg-turbo + *** jpeg from: Example br2-external tree *** + (X) my-jpeg + *** jpeg from: FOO_27 *** + ( ) another-jpeg +---- + +And similarly for the toolchains: + +---- +Toolchain ---> + Toolchain () ---> + ( ) Custom toolchain + *** Toolchains from: Example br2-external tree *** + (X) my custom toolchain +---- + +.Note +The toolchain options in +toolchain/toolchain-external-mine/Config.in.options+ +will not appear in the `Toolchain` menu. They must be explicitly included +from within the br2-external's top-level +Config.in+ and will thus appear +in the `External options` menu. diff --git a/buildroot/docs/manual/customize-packages.txt b/buildroot/docs/manual/customize-packages.txt index 9a5e8c5bc..b57280ea1 100644 --- a/buildroot/docs/manual/customize-packages.txt +++ b/buildroot/docs/manual/customize-packages.txt @@ -14,8 +14,9 @@ packages in a project-specific directory. As shown in xref:customize-dir-structure[], the recommended location for project-specific packages is +package//+. If you are using the -+BR2_EXTERNAL+ feature (see xref:outside-br-custom[]) the recommended -location is +$(BR2_EXTERNAL)/package/+. +br2-external tree feature (see xref:outside-br-custom[]) the recommended +location is to put them in a sub-directory named +package/+ in your +br2-external tree. However, Buildroot will not be aware of the packages in this location, unless we perform some additional steps. As explained in @@ -37,14 +38,6 @@ have only one extra directory level below +package//+): include $(sort $(wildcard package//*/*.mk)) ----- -If you are using +BR2_EXTERNAL+, create a file -+$(BR2_EXTERNAL)/external.mk+ with following contents (again assuming only -one extra level): - ------ -include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk)) ------ - For the +Config.in+ files, create a file +package//Config.in+ that includes the +Config.in+ files of all your packages. An exhaustive list has to be provided since wildcards are not supported in the source command of kconfig. @@ -59,13 +52,5 @@ Include this new file +package//Config.in+ from +package/Config.in+, preferably in a company-specific menu to make merges with future Buildroot versions easier. -If you are using +BR2_EXTERNAL+, create a file -+$(BR2_EXTERNAL)/Config.in+ with similar contents: - ------ -source "$BR2_EXTERNAL/package/package1/Config.in" -source "$BR2_EXTERNAL/package/package2/Config.in" ------ - -You do not have to add an include for this +$(BR2_EXTERNAL)/Config.in+ -file as it is included automatically. +If using a br2-external tree, refer to xref:outside-br-custom[] for how +to fill in those files. diff --git a/buildroot/docs/manual/customize-patches.txt b/buildroot/docs/manual/customize-patches.txt index e129a6485..eb98d1bea 100644 --- a/buildroot/docs/manual/customize-patches.txt +++ b/buildroot/docs/manual/customize-patches.txt @@ -33,12 +33,11 @@ follows: * If a +series+ file exists in the package directory, then patches are applied according to the +series+ file; + -* Otherwise, patch files matching +-*.patch+ - are applied in alphabetical order. - So, to ensure they are applied in the right order, it is highly - recommended to name the patch files like this: - +--.patch+, where ++ - refers to the 'apply order'. +* Otherwise, patch files matching +*.patch+ are applied in + alphabetical order. So, to ensure they are applied in the right + order, it is highly recommended to name the patch files like this: + +-.patch+, where ++ refers to the + 'apply order'. For information about how patches are applied for a package, see xref:patch-apply-order[] @@ -54,7 +53,7 @@ directory. The exception to +BR2_GLOBAL_PATCH_DIR+ being the preferred method for specifying custom patches is +BR2_LINUX_KERNEL_PATCH+. +BR2_LINUX_KERNEL_PATCH+ should be used to specify kernel patches that -are available at an URL. *Note:* +BR2_LINUX_KERNEL_PATCH+ specifies kernel +are available at a URL. *Note:* +BR2_LINUX_KERNEL_PATCH+ specifies kernel patches that are applied after patches available in +BR2_GLOBAL_PATCH_DIR+, as it is done from a post-patch hook of the Linux package. diff --git a/buildroot/docs/manual/customize-quick-guide.txt b/buildroot/docs/manual/customize-quick-guide.txt index 4ff185abf..627ecbacb 100644 --- a/buildroot/docs/manual/customize-quick-guide.txt +++ b/buildroot/docs/manual/customize-quick-guide.txt @@ -20,6 +20,7 @@ your project can be skipped. * +BR2_UCLIBC_CONFIG+ * +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+ * +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+ + * +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE+ 1. Write the configuration files: * +make linux-update-defconfig+ * +make busybox-update-config+ @@ -27,6 +28,7 @@ your project can be skipped. * +cp /build/at91bootstrap3-*/.config board///at91bootstrap3.config+ * +make barebox-update-defconfig+ + * +make uboot-update-defconfig+ 1. Create +board///rootfs-overlay/+ and fill it with additional files you need on your rootfs, e.g. +board///rootfs-overlay/etc/inittab+. diff --git a/buildroot/docs/manual/customize-rootfs.txt b/buildroot/docs/manual/customize-rootfs.txt index 558bd724d..e1dbadda5 100644 --- a/buildroot/docs/manual/customize-rootfs.txt +++ b/buildroot/docs/manual/customize-rootfs.txt @@ -22,6 +22,12 @@ A filesystem overlay is a tree of files that is copied directly etc., files called +.empty+ and files ending in +~+ are excluded from the copy. + +When +BR2_ROOTFS_MERGED_USR+ is enabled, then the overlay must not + contain the '/bin', '/lib' or '/sbin' directories, as Buildroot will + create them as symbolic links to the relevant folders in '/usr'. In + such a situation, should the overlay have any programs or libraries, + they should be placed in '/usr/bin', '/usr/sbin' and '/usr/lib'. ++ As shown in xref:customize-dir-structure[], the recommended path for this overlay is +board///rootfs-overlay+. @@ -61,7 +67,7 @@ In addition, you may also use these environment variables: stored - +BASE_DIR+: the base output directory -Below two more methods of customizing the target filesystem are +Below three more methods of customizing the target filesystem are described, but they are not recommended. Direct modification of the target filesystem:: @@ -100,8 +106,48 @@ To enable this feature, enable config option +System configuration+ menu. If you specify a relative path, it will be relative to the root of the Buildroot tree. + +Custom skeletons don't need to contain the '/bin', '/lib' or '/sbin' + directories, since they are created automatically during the build. + When +BR2_ROOTFS_MERGED_USR+ is enabled, then the custom skeleton must + not contain the '/bin', '/lib' or '/sbin' directories, as Buildroot + will create them as symbolic links to the relevant folders in '/usr'. + In such a situation, should the skeleton have any programs or + libraries, they should be placed in '/usr/bin', '/usr/sbin' and + '/usr/lib'. ++ This method is not recommended because it duplicates the entire skeleton, which prevents taking advantage of the fixes or improvements brought to the default skeleton in later Buildroot releases. +Post-fakeroot scripts (+BR2_ROOTFS_POST_FAKEROOT_SCRIPT+):: ++ +When aggregating the final images, some parts of the process requires + root rights: creating device nodes in `/dev`, setting permissions or + ownership to files and directories... To avoid requiring actual root + rights, Buildroot uses +fakeroot+ to simulate root rights. This is not + a complete substitute for actually being root, but is enough for what + Buildroot needs. ++ +Post-fakeroot scripts are shell scripts that are called at the 'end' of + the fakeroot phase, 'right before' the filesystem image generator is + called. As such, they are called in the fakeroot context. ++ +Post-fakeroot scripts can be useful in case you need to tweak the + filesystem to do modifications that are usually only available to the + root user. ++ +.Note: +It is recommended to use the existing mechanisms to set file permissions + or create entries in `/dev` (see xref:customize-device-permission[]) or + to create users (see xref:customize-users[]) ++ +.Note: +The difference between post-build scripts (above) and fakeroot scripts, + is that post-build scripts are not called in the fakeroot context. ++ +.Note: +Using `fakeroot` is not an absolute substitute for actually being root. + `fakeroot` only ever fakes the file access rights and types (regular, + block-or-char device...) and uid/gid; these are emulated in-memory. + include::customize-device-permission-tables.txt[] diff --git a/buildroot/docs/manual/debugging-buildroot.txt b/buildroot/docs/manual/debugging-buildroot.txt index b97f633be..f575fc48e 100644 --- a/buildroot/docs/manual/debugging-buildroot.txt +++ b/buildroot/docs/manual/debugging-buildroot.txt @@ -12,8 +12,8 @@ space-separated list, you want called before and after each step. The scripts are called in sequence, with three parameters: - +start+ or +end+ to denote the start (resp. the end) of a step; - - the name of the step about to be started, or which just ended. - - the name of the package + - the name of the step about to be started, or which just ended; + - the name of the package. For example : @@ -21,7 +21,18 @@ For example : make BR2_INSTRUMENTATION_SCRIPTS="/path/to/my/script1 /path/to/my/script2" ---- -That script has access to the following variables: +The list of steps is: + + - +extract+ + - +patch+ + - +configure+ + - +build+ + - +install-host+, when a host-package is installed in +$(HOST_DIR)+ + - +install-target+, when a target-package is installed in +$(TARGET_DIR)+ + - +install-staging+, when a target-package is installed in +$(STAGING_DIR)+ + - +install-image+, when a target-package installs files in +$(BINARIES_DIR)+ + +The script has access to the following variables: - +BR2_CONFIG+: the path to the Buildroot .config file - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see diff --git a/buildroot/docs/manual/developers.txt b/buildroot/docs/manual/developers.txt new file mode 100644 index 000000000..7058d57b2 --- /dev/null +++ b/buildroot/docs/manual/developers.txt @@ -0,0 +1,49 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[DEVELOPERS]] +== DEVELOPERS file and get-developers + +The main Buildroot directory contains a file named +DEVELOPERS+ that +lists the developers involved with various areas of Buildroot. Thanks +to this file, the +get-developers+ tool allows to: + +- Calculate the list of developers to whom patches should be sent, by + parsing the patches and matching the modified files with the + relevant developers. See xref:submitting-patches[] for details. + +- Find which developers are taking care of a given architecture or + package, so that they can be notified when a build failure occurs on + this architecture or package. This is done in interaction with + Buildroot's autobuild infrastructure. + +We ask developers adding new packages, new boards, or generally new +functionality in Buildroot, to register themselves in the +DEVELOPERS+ +file. As an example, we expect a developer contributing a new package +to include in his patch the appropriate modification to the ++DEVELOPERS+ file. + +The +DEVELOPERS+ file format is documented in detail inside the file +itself. + +The +get-developers+ tool, located in +utils/+ allows to use +the +DEVELOPERS+ file for various tasks: + +- When passing one or several patches as command line argument, + +get-developers+ will return the appropriate +git send-email+ + command. If the +-e+ option is passed, only the email addresses are + printed in a format suitable for +git send-email --cc-cmd+. + +- When using the +-a + command line option, +get-developers+ will + return the list of developers in charge of the given architecture. + +- When using the +-p + command line option, +get-developers+ + will return the list of developers in charge of the given package. + +- When using the +-c+ command line option, +get-developers+ will look + at all files under version control in the Buildroot repository, and + list the ones that are not handled by any developer. The purpose of + this option is to help completing the +DEVELOPERS+ file. + +- When using without any arguments, it validates the integrity of the + DEVELOPERS file and will note WARNINGS for items that don't match. diff --git a/buildroot/docs/manual/docbook-xsl.css b/buildroot/docs/manual/docbook-xsl.css new file mode 100644 index 000000000..ee9ca46d6 --- /dev/null +++ b/buildroot/docs/manual/docbook-xsl.css @@ -0,0 +1,329 @@ +/* + CSS stylesheet for XHTML produced by DocBook XSL stylesheets. +*/ + +body { + font-family: Georgia,serif; +} + +code, pre { + font-family: "Courier New", Courier, monospace; +} + +span.strong { + font-weight: bold; +} + +body blockquote { + margin-top: .75em; + line-height: 1.5; + margin-bottom: .75em; +} + +html body { + margin: 1em 5% 1em 5%; + line-height: 1.2; +} + +body div { + margin: 0; +} + +h1, h2, h3, h4, h5, h6 +{ + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} + +div.toc p:first-child, +div.list-of-figures p:first-child, +div.list-of-tables p:first-child, +div.list-of-examples p:first-child, +div.example p.title, +div.sidebar p.title +{ + font-weight: bold; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; + margin-bottom: 0.2em; +} + +body h1 { + margin: .0em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h2 { + margin: 0.5em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h3 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h4 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h5 { + margin: .8em 0 0 -2%; + line-height: 1.3; +} + +body h6 { + margin: .8em 0 0 -1%; + line-height: 1.3; +} + +body hr { + border: none; /* Broken on IE6 */ +} +div.footnotes hr { + border: 1px solid silver; +} + +div.navheader th, div.navheader td, div.navfooter td { + font-family: Arial,Helvetica,sans-serif; + font-size: 0.9em; + font-weight: bold; + color: #527bbd; +} +div.navheader img, div.navfooter img { + border-style: none; +} +div.navheader a, div.navfooter a { + font-weight: normal; +} +div.navfooter hr { + border: 1px solid silver; +} + +body td { + line-height: 1.2 +} + +body th { + line-height: 1.2; +} + +ol { + line-height: 1.2; +} + +ul, body dir, body menu { + line-height: 1.2; +} + +html { + margin: 0; + padding: 0; +} + +body h1, body h2, body h3, body h4, body h5, body h6 { + margin-left: 0 +} + +body pre { + margin: 0.5em 10% 0.5em 1em; + line-height: 1.0; + color: navy; +} + +tt.literal, code.literal { + color: navy; +} + +.programlisting, .screen { + border: 1px solid silver; + background: #f4f4f4; + margin: 0.5em 10% 0.5em 0; + padding: 0.5em 1em; +} + +div.sidebar { + background: #ffffee; + margin: 1.0em 10% 0.5em 0; + padding: 0.5em 1em; + border: 1px solid silver; +} +div.sidebar * { padding: 0; } +div.sidebar div { margin: 0; } +div.sidebar p.title { + margin-top: 0.5em; + margin-bottom: 0.2em; +} + +div.bibliomixed { + margin: 0.5em 5% 0.5em 1em; +} + +div.glossary dt { + font-weight: bold; +} +div.glossary dd p { + margin-top: 0.2em; +} + +dl { + margin: .8em 0; + line-height: 1.2; +} + +dt { + margin-top: 0.5em; +} + +dt span.term { + font-style: normal; + color: navy; +} + +div.variablelist dd p { + margin-top: 0; +} + +div.itemizedlist li, div.orderedlist li { + margin-left: -0.8em; + margin-top: 0.5em; +} + +ul, ol { + list-style-position: outside; +} + +div.sidebar ul, div.sidebar ol { + margin-left: 2.8em; +} + +div.itemizedlist p.title, +div.orderedlist p.title, +div.variablelist p.title +{ + margin-bottom: -0.8em; +} + +div.revhistory table { + border-collapse: collapse; + border: none; +} +div.revhistory th { + border: none; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} +div.revhistory td { + border: 1px solid silver; +} + +/* Keep TOC and index lines close together. */ +div.toc dl, div.toc dt, +div.list-of-figures dl, div.list-of-figures dt, +div.list-of-tables dl, div.list-of-tables dt, +div.indexdiv dl, div.indexdiv dt +{ + line-height: normal; + margin-top: 0; + margin-bottom: 0; +} + +/* + Table styling does not work because of overriding attributes in + generated HTML. +*/ +div.table table, +div.informaltable table +{ + margin-left: 0; + margin-right: 5%; + margin-bottom: 0.8em; +} +div.informaltable table +{ + margin-top: 0.4em +} +div.table thead, +div.table tfoot, +div.table tbody, +div.informaltable thead, +div.informaltable tfoot, +div.informaltable tbody +{ + /* No effect in IE6. */ + border-top: 3px solid #527bbd; + border-bottom: 3px solid #527bbd; +} +div.table thead, div.table tfoot, +div.informaltable thead, div.informaltable tfoot +{ + font-weight: bold; +} + +div.mediaobject img { + margin-bottom: 0.8em; +} +div.figure p.title, +div.table p.title +{ + margin-top: 1em; + margin-bottom: 0.4em; +} + +div.calloutlist p +{ + margin-top: 0em; + margin-bottom: 0.4em; +} + +a img { + border-style: none; +} + +@media print { + div.navheader, div.navfooter { display: none; } +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } diff --git a/buildroot/docs/manual/download-location.txt b/buildroot/docs/manual/download-location.txt index cca7e7e13..d485df94f 100644 --- a/buildroot/docs/manual/download-location.txt +++ b/buildroot/docs/manual/download-location.txt @@ -1,6 +1,8 @@ // -*- mode:doc; -*- // vim: set syntax=asciidoc: +[[download-location]] + ==== Location of downloaded packages The various tarballs that are downloaded by Buildroot are all stored @@ -17,7 +19,7 @@ set, then the value of +BR2_DL_DIR+ in the Buildroot configuration is overridden. The following line should be added to +<~/.bashrc>+. ----------------- - $ export BR2_DL_DIR + export BR2_DL_DIR= ----------------- The download location can also be set in the +.config+ file, with the diff --git a/buildroot/docs/manual/faq-troubleshooting.txt b/buildroot/docs/manual/faq-troubleshooting.txt index b30b4ac43..5adf3fa6c 100644 --- a/buildroot/docs/manual/faq-troubleshooting.txt +++ b/buildroot/docs/manual/faq-troubleshooting.txt @@ -127,7 +127,7 @@ installed what and remove it when the package is unselected. However, it is much more complicated than that: * It is not only about the +target/+ directory, but also the sysroot in - +host/usr//sysroot+ and the +host/+ directory itself. All files + +host//sysroot+ and the +host/+ directory itself. All files installed in those directories by various packages must be tracked. * When a package is unselected from the configuration, it is not @@ -205,3 +205,40 @@ On this matter, the Buildroot developers make this position statement: upgrades by upgrading the entire root filesystem image at once, the image deployed to the embedded system is guaranteed to really be the one that has been tested and validated. + +[[faq-speeding-up-build]] +=== How to speed-up the build process? + +Since Buildroot often involves doing full rebuilds of the entire +system that can be quite long, we provide below a number of tips to +help reduce the build time: + + * Use a pre-built external toolchain instead of the default Buildroot + internal toolchain. By using a pre-built Linaro toolchain (on ARM) + or a Sourcery CodeBench toolchain (for ARM, x86, x86-64, MIPS, + etc.), you will save the build time of the toolchain at each + complete rebuild, approximately 15 to 20 minutes. Note that + temporarily using an external toolchain does not prevent you to + switch back to an internal toolchain (that may provide a higher + level of customization) once the rest of your system is working; + + * Use the +ccache+ compiler cache (see: xref:ccache[]); + + * Learn about rebuilding only the few packages you actually care + about (see xref:rebuild-pkg[]), but beware that sometimes full + rebuilds are anyway necessary (see xref:full-rebuild[]); + + * Make sure you are not using a virtual machine for the Linux system + used to run Buildroot. Most of the virtual machine technologies are + known to cause a significant performance impact on I/O, which is + really important for building source code; + + * Make sure that you're using only local files: do not attempt to do + a build over NFS, which significantly slows down the build. Having + the Buildroot download folder available locally also helps a bit. + + * Buy new hardware. SSDs and lots of RAM are key to speeding up the + builds. + + * Experiment with top-level parallel build, see + xref:top-level-parallel-build[]. diff --git a/buildroot/docs/manual/getting.txt b/buildroot/docs/manual/getting.txt index 3437f93b4..549938a22 100644 --- a/buildroot/docs/manual/getting.txt +++ b/buildroot/docs/manual/getting.txt @@ -10,6 +10,26 @@ November. Release numbers are in the format YYYY.MM, so for example Release tarballs are available at http://buildroot.org/downloads/[]. +For your convenience, a https://www.vagrantup.com/[Vagrantfile] is +available in `support/misc/Vagrantfile` in the Buildroot source tree +to quickly set up a virtual machine with the needed dependencies to +get started. + +If you want to setup an isolated buildroot environment on Linux or Mac +Os X, paste this line onto your terminal: + +-------------------- +curl -O https://buildroot.org/downloads/Vagrantfile; vagrant up +-------------------- + +If you are on Windows, paste this into your powershell: + +-------------------- +(new-object System.Net.WebClient).DownloadFile( +"https://buildroot.org/downloads/Vagrantfile","Vagrantfile"); +vagrant up +-------------------- + If you want to follow development, you can use the daily snapshots or make a clone of the Git repository. Refer to the http://buildroot.org/download[Download page] of the Buildroot website diff --git a/buildroot/docs/manual/github_hash_mongrel2.png b/buildroot/docs/manual/github_hash_mongrel2.png new file mode 100644 index 000000000..c695c3181 Binary files /dev/null and b/buildroot/docs/manual/github_hash_mongrel2.png differ diff --git a/buildroot/docs/manual/known-issues.txt b/buildroot/docs/manual/known-issues.txt index 38ba941ac..ae29a48b3 100644 --- a/buildroot/docs/manual/known-issues.txt +++ b/buildroot/docs/manual/known-issues.txt @@ -7,26 +7,6 @@ if such options contain a +$+ sign. For example, the following is known to break: +BR2_TARGET_LDFLAGS="-Wl,-rpath=\'$ORIGIN/../lib'"+ -* The +ltp-testsuite+ package does not build with the default uClibc - configuration used by the Buildroot toolchain backend. The LTP - testsuite uses several functions that are considered obsolete, such - as sigset() and others. uClibc configuration options such as - DO_XSI_MATH, UCLIBC_HAS_OBSOLETE_BSD_SIGNAL and - UCLIBC_SV4_DEPRECATED are needed if one wants to build the - +ltp-testsuite+ package with uClibc. You need to either use a glibc - or eglibc based toolchain, or enable the appropriate options in the - uClibc configuration. - -* The +xfsprogs+ package does not build with the default uClibc - configuration used by the Buildroot toolchain backend. You need to - either use a glibc or eglibc based toolchain, or enable the - appropriate options in the uClibc configuration. - -* The +mrouted+ package does not build with the default uClibc - configuration used by the Buildroot toolchain backend. You need to - either use a glibc or eglibc based toolchain, or enable the - appropriate options in the uClibc configuration. - * The +libffi+ package is not supported on the SuperH 2 and ARC architectures. diff --git a/buildroot/docs/manual/legal-notice.txt b/buildroot/docs/manual/legal-notice.txt index 7b1743818..179aa6b17 100644 --- a/buildroot/docs/manual/legal-notice.txt +++ b/buildroot/docs/manual/legal-notice.txt @@ -41,9 +41,14 @@ There you will find: +host-sources/+ subdirectories for target and host packages respectively. The source code for packages that set +_REDISTRIBUTE = NO+ will not be saved. - Patches applied to some packages by Buildroot are distributed with the - Buildroot sources and are not duplicated in the +sources/+ and +host-sources/+ - subdirectories. + Patches that were applied are also saved, along with a file named +series+ + that lists the patches in the order they were applied. Patches are under the + same license as the files that they modify. + Note: Buildroot applies additional patches to Libtool scripts of + autotools-based packages. These patches can be found under + +support/libtool+ in the Buildroot source and, due to technical + limitations, are not saved with the package sources. You may need to + collect them manually. * A manifest file (one for host and one for target packages) listing the configured packages, their version, license and related information. Some of this information might not be defined in Buildroot; such items are @@ -62,72 +67,28 @@ for packages released under BSD-like licenses, that you are not required to redistribute in source form. Moreover, due to technical limitations, Buildroot does not produce some -material that you will or may need, such as the toolchain source code and the -Buildroot source code itself (including patches to packages for which source -distribution is required). +material that you will or may need, such as the toolchain source code for +some of the external toolchains and the Buildroot source code itself. When you run +make legal-info+, Buildroot produces warnings in the +README+ file to inform you of relevant material that could not be saved. -[[legal-info-list-licenses]] -=== License abbreviations - -Here is a list of the licenses that are most widely used by packages in -Buildroot, with the name used in the manifest files: - -* `GPLv2`: - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[ - GNU General Public License, version 2]; -* `GPLv2+`: - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[ - GNU General Public License, version 2] - or (at your option) any later version; -* `GPLv3`: - http://www.gnu.org/licenses/gpl.html[ - GNU General Public License, version 3]; -* `GPLv3+`: - http://www.gnu.org/licenses/gpl.html[ - GNU General Public License, version 3] - or (at your option) any later version; -* `GPL`: - http://www.gnu.org/licenses/gpl.html[ - GNU General Public License] (any version); -* `LGPLv2`: - http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html[ - GNU Library General Public License, version 2]; -* `LGPLv2+`: - http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html[ - GNU Library General Public License, version 2] - or (at your option) any later version; -* `LGPLv2.1`: - http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html[ - GNU Lesser General Public License, version 2.1]; -* `LGPLv2.1+`: - http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html[ - GNU Lesser General Public License, version 2.1] - or (at your option) any later version; -* `LGPLv3`: - http://www.gnu.org/licenses/lgpl.html[ - GNU Lesser General Public License, version 3]; -* `LGPLv3+`: - http://www.gnu.org/licenses/lgpl.html[ - GNU Lesser General Public License, version 3] - or (at your option) any later version; -* `LGPL`: - http://www.gnu.org/licenses/lgpl.html[ - GNU Lesser General Public License] (any version); -* `BSD-4c`: Original BSD 4-clause license; -* `BSD-3c`: BSD 3-clause license; -* `BSD-2c`: BSD 2-clause license; -* `MIT`: MIT-style license. -* `Apache-2.0`: - http://apache.org/licenses/LICENSE-2.0.html[ - Apache License, version 2.0]; - +Finally, keep in mind that the output of +make legal-info+ is based on +declarative statements in each of the packages recipes. The Buildroot +developers try to do their best to keep those declarative statements as +accurate as possible, to the best of their knowledge. However, it is very +well possible that those declarative statements are not all fully accurate +nor exhaustive. You (or your legal department) _have_ to check the output +of +make legal-info+ before using it as your own compliance delivery. See +the _NO WARRANTY_ clauses (clauses 11 and 12) in the +COPYING+ file at the +root of the Buildroot distribution. + +[[legal-info-buildroot]] === Complying with the Buildroot license Buildroot itself is an open source software, released under the -http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[GNU General Public -License, version 2] or (at your option) any later version. +http://www.gnu.org/licenses/old-licenses/gpl-2.0.html[GNU General +Public License, version 2] or (at your option) any later version, with +the exception of the package patches detailed below. However, being a build system, it is not normally part of the end product: if you develop the root filesystem, kernel, bootloader or toolchain for a device, the code of Buildroot is only present on the development machine, not @@ -148,3 +109,14 @@ material that must be redistributed. Keep in mind that this is only the Buildroot developers' opinion, and you should consult your legal department or lawyer in case of any doubt. + +==== Patches to packages + +Buildroot also bundles patch files, which are applied to the sources +of the various packages. Those patches are not covered by the license +of Buildroot. Instead, they are covered by the license of the software +to which the patches are applied. When said software is available +under multiple licenses, the Buildroot patches are only provided under +the publicly accessible licenses. + +See xref:patch-policy[] for the technical details. diff --git a/buildroot/docs/images/logo.png b/buildroot/docs/manual/logo.png similarity index 100% rename from buildroot/docs/images/logo.png rename to buildroot/docs/manual/logo.png diff --git a/buildroot/docs/manual/make-tips.txt b/buildroot/docs/manual/make-tips.txt index 027eddf83..869b6807d 100644 --- a/buildroot/docs/manual/make-tips.txt +++ b/buildroot/docs/manual/make-tips.txt @@ -12,6 +12,12 @@ This is a collection of tips that help you make the most of Buildroot. $ make V=1 -------------------- +.Display the list of boards with a defconfig: + +-------------------- + $ make list-defconfigs +-------------------- + .Display all available targets: -------------------- @@ -28,6 +34,8 @@ some settings in the +.config+ file may hide some targets: selected in the internal toolchain backend; * +barebox-menuconfig+ and +barebox-savedefconfig+ only work when the +barebox+ bootloader is enabled. +* +uboot-menuconfig+ and +uboot-savedefconfig+ only work when the + +U-Boot+ bootloader is enabled. .Cleaning: @@ -69,3 +77,57 @@ To delete all build products as well as the configuration: If +ccache+ is enabled, running +make clean+ or +distclean+ does not empty the compiler cache used by Buildroot. To delete it, refer to xref:ccache[]. + +.Dumping the internal make variables: + +One can dump the variables known to make, along with their values: + +---- + $ make -s printvars VARS='VARIABLE1 VARIABLE2' + VARIABLE1=value_of_variable + VARIABLE2=value_of_variable +---- + +It is possible to tweak the output using some variables: + +- +VARS+ will limit the listing to variables which names match the + specified make-patterns - this must be set else nothing is printed +- +QUOTED_VARS+, if set to +YES+, will single-quote the value +- +RAW_VARS+, if set to +YES+, will print the unexpanded value + +For example: + +---- + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES + BUSYBOX_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_ALL_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_PATCH_DEPENDENCIES= + BUSYBOX_RDEPENDENCIES=ncurses util-linux +---- + +---- + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES QUOTED_VARS=YES + BUSYBOX_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_ALL_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_PATCH_DEPENDENCIES='' + BUSYBOX_RDEPENDENCIES='ncurses util-linux' +---- + +---- + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES RAW_VARS=YES + BUSYBOX_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_ALL_DEPENDENCIES=$(sort $(BUSYBOX_FINAL_DEPENDENCIES) $(BUSYBOX_FINAL_PATCH_DEPENDENCIES)) + BUSYBOX_FINAL_DEPENDENCIES=$(sort $(BUSYBOX_DEPENDENCIES)) + BUSYBOX_FINAL_PATCH_DEPENDENCIES=$(sort $(BUSYBOX_PATCH_DEPENDENCIES)) + BUSYBOX_RDEPENDENCIES=ncurses util-linux +---- + +The output of quoted variables can be reused in shell scripts, for example: + +---- + $ eval $(make -s printvars VARS=BUSYBOX_DEPENDENCIES QUOTED_VARS=YES) + $ echo $BUSYBOX_DEPENDENCIES + skeleton toolchain +---- diff --git a/buildroot/docs/manual/makedev-syntax.txt b/buildroot/docs/manual/makedev-syntax.txt index e02b79d98..d6efb31d4 100644 --- a/buildroot/docs/manual/makedev-syntax.txt +++ b/buildroot/docs/manual/makedev-syntax.txt @@ -24,21 +24,36 @@ There are a few non-trivial blocks: - +type+ is the type of the file, being one of: * f: a regular file * d: a directory + * r: a directory recursively * c: a character device file * b: a block device file * p: a named pipe -- +mode+, +uid+ and +gid+ are the usual permissions settings -- +major+ and +minor+ are here for device files - set to - for other +- +mode+ are the usual permissions settings (only numerical values + are allowed) +- +uid+ and +gid+ are the UID and GID to set on this file; can be + either numerical values or actual names +- +major+ and +minor+ are here for device files, set to +-+ for other files - +start+, +inc+ and +count+ are for when you want to create a batch of files, and can be reduced to a loop, beginning at +start+, incrementing its counter by +inc+ until it reaches +count+ Let's say you want to change the permissions of a given file; using -this syntax, you will need to put: +this syntax, you will need to write: ---- -/usr/bin/foobar f 644 0 0 - - - - - +/usr/bin/foo f 755 0 0 - - - - - +/usr/bin/bar f 755 root root - - - - - +/data/buz f 644 buz-user buz-group - - - - - +---- + +Alternatively, if you want to change owner/permission of a directory +recursively, you can write (to set UID to foo, GID to bar and access +rights to rwxr-x--- for the directory /usr/share/myapp and all files +and directories below it): + +---- +/usr/share/myapp r 750 foo bar - - - - - ---- On the other hand, if you want to create the device file +/dev/hda+ @@ -46,13 +61,43 @@ and the corresponding 15 files for the partitions, you will need for +/dev/hda+: ---- -/dev/hda b 640 0 0 3 0 0 0 - +/dev/hda b 640 root root 3 0 0 0 - ---- and then for device files corresponding to the partitions of +/dev/hda+, +/dev/hdaX+, +X+ ranging from 1 to 15: ---- -/dev/hda b 640 0 0 3 1 1 1 15 +/dev/hda b 640 root root 3 1 1 1 15 +---- + +Extended attributes are supported if ++BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES+ is enabled. +This is done by adding a line starting with +|xattr+ after +the line describing the file. Right now, only capability +is supported as extended attribute. + +|===================== +| \|xattr | capability +|===================== + +- +|xattr+ is a "flag" that indicate an extended attribute +- +capability+ is a capability to add to the previous file + +If you want to add the capability cap_sys_admin to the binary foo, +you will write : + +---- +/usr/bin/foo f 755 root root - - - - - +|xattr cap_sys_admin+eip ---- +You can add several capabilities to a file by using several +|xattr+ lines. +If you want to add the capability cap_sys_admin and cap_net_admin to the +binary foo, you will write : + +---- +/usr/bin/foo f 755 root root - - - - - +|xattr cap_sys_admin+eip +|xattr cap_net_admin+eip +---- diff --git a/buildroot/docs/manual/makeusers-syntax.txt b/buildroot/docs/manual/makeusers-syntax.txt index ffdb96187..467e59623 100644 --- a/buildroot/docs/manual/makeusers-syntax.txt +++ b/buildroot/docs/manual/makeusers-syntax.txt @@ -31,7 +31,8 @@ Where: then login is disabled. If prefixed with +=+, then it is interpreted as clear-text, and will be crypt-encoded (using MD5). If prefixed with +!=+, then the password will be crypt-encoded (using MD5) and login - will be disabled. If set to +*+, then login is not allowed. + will be disabled. If set to +*+, then login is not allowed. If set to + +-+, then no password value will be set. - +home+ is the desired home directory for the user. If set to '-', no home directory will be created, and the user's home will be +/+. Explicitly setting +home+ to +/+ is not allowed. diff --git a/buildroot/docs/manual/manual.html b/buildroot/docs/manual/manual.html new file mode 100644 index 000000000..c436edd9c --- /dev/null +++ b/buildroot/docs/manual/manual.html @@ -0,0 +1,5683 @@ + +The Buildroot user manual

The Buildroot user manual


Table of Contents

I. Getting started
1. About Buildroot
2. System requirements
2.1. Mandatory packages
2.2. Optional packages
3. Getting Buildroot
4. Buildroot quick start
5. Community resources
II. User guide
6. Buildroot configuration
6.1. Cross-compilation toolchain
6.2. /dev management
6.3. init system
7. Configuration of other components
8. General Buildroot usage
8.1. make tips
8.2. Understanding when a full rebuild is necessary
8.3. Understanding how to rebuild packages
8.4. Offline builds
8.5. Building out-of-tree
8.6. Environment variables
8.7. Dealing efficiently with filesystem images
8.8. Graphing the dependencies between packages
8.9. Graphing the build duration
8.10. Graphing the filesystem size contribution of packages
8.11. Top-level parallel build
8.12. Integration with Eclipse
8.13. Advanced usage
9. Project-specific customization
9.1. Recommended directory structure
9.2. Keeping customizations outside of Buildroot
9.3. Storing the Buildroot configuration
9.4. Storing the configuration of other components
9.5. Customizing the generated target filesystem
9.6. Adding custom user accounts
9.7. Customization after the images have been created
9.8. Adding project-specific patches
9.9. Adding project-specific packages
9.10. Quick guide to storing your project-specific customizations
10. Frequently Asked Questions & Troubleshooting
10.1. The boot hangs after Starting network…
10.2. Why is there no compiler on the target?
10.3. Why are there no development files on the target?
10.4. Why is there no documentation on the target?
10.5. Why are some packages not visible in the Buildroot config menu?
10.6. Why not use the target directory as a chroot directory?
10.7. Why doesn’t Buildroot generate binary packages (.deb, .ipkg…)?
10.8. How to speed-up the build process?
11. Known issues
12. Legal notice and licensing
12.1. Complying with open source licenses
12.2. Complying with the Buildroot license
13. Beyond Buildroot
13.1. Boot the generated images
13.2. Chroot
III. Developer guide
14. How Buildroot works
15. Coding style
15.1. Config.in file
15.2. The .mk file
15.3. The documentation
15.4. Support scripts
16. Adding support for a particular board
17. Adding new packages to Buildroot
17.1. Package directory
17.2. Config files
17.3. The .mk file
17.4. The .hash file
17.5. Infrastructure for packages with specific build systems
17.6. Infrastructure for autotools-based packages
17.7. Infrastructure for CMake-based packages
17.8. Infrastructure for Python packages
17.9. Infrastructure for LuaRocks-based packages
17.10. Infrastructure for Perl/CPAN packages
17.11. Infrastructure for virtual packages
17.12. Infrastructure for packages using kconfig for configuration files
17.13. Infrastructure for rebar-based packages
17.14. Infrastructure for Waf-based packages
17.15. Infrastructure for Meson-based packages
17.16. Integration of Cargo-based packages
17.17. Infrastructure for Go packages
17.18. Infrastructure for QMake-based packages
17.19. Infrastructure for packages building kernel modules
17.20. Infrastructure for asciidoc documents
17.21. Infrastructure specific to the Linux kernel package
17.22. Hooks available in the various build steps
17.23. Gettext integration and interaction with packages
17.24. Tips and tricks
17.25. Conclusion
18. Patching a package
18.1. Providing patches
18.2. How patches are applied
18.3. Format and licensing of the package patches
18.4. Integrating patches found on the Web
19. Download infrastructure
20. Debugging Buildroot
21. Contributing to Buildroot
21.1. Reproducing, analyzing and fixing bugs
21.2. Analyzing and fixing autobuild failures
21.3. Reviewing and testing patches
21.4. Work on items from the TODO list
21.5. Submitting patches
21.6. Reporting issues/bugs or getting help
21.7. Using the run-tests framework
22. DEVELOPERS file and get-developers
23. Release Engineering
23.1. Releases
23.2. Development
IV. Appendix
24. Makedev syntax documentation
25. Makeusers syntax documentation
26. Migrating from older Buildroot versions
26.1. Migrating to 2016.11
26.2. Migrating to 2017.08

Buildroot 2020.08-rc2 manual generated on 2020-08-24 +14:41:02 UTC from git revision 30ccc0e3f0

The Buildroot manual is written by the Buildroot developers. +It is licensed under the GNU General Public License, version 2. Refer to the +COPYING +file in the Buildroot sources for the full text of this license.

Copyright © 2004-2020 The Buildroot developers

logo.png

Part I. Getting started

Chapter 1. About Buildroot

Buildroot is a tool that simplifies and automates the process of +building a complete Linux system for an embedded system, using +cross-compilation.

In order to achieve this, Buildroot is able to generate a +cross-compilation toolchain, a root filesystem, a Linux kernel image +and a bootloader for your target. Buildroot can be used for any +combination of these options, independently (you can for example use +an existing cross-compilation toolchain, and build only your root +filesystem with Buildroot).

Buildroot is useful mainly for people working with embedded systems. +Embedded systems often use processors that are not the regular x86 +processors everyone is used to having in his PC. They can be PowerPC +processors, MIPS processors, ARM processors, etc.

Buildroot supports numerous processors and their variants; it also +comes with default configurations for several boards available +off-the-shelf. Besides this, a number of third-party projects are based on, +or develop their BSP [1] or +SDK [2] on top of Buildroot.



[1] BSP: Board Support Package

[2] SDK: Software Development Kit

Chapter 2. System requirements

Buildroot is designed to run on Linux systems.

While Buildroot itself will build most host packages it needs for the +compilation, certain standard Linux utilities are expected to be +already installed on the host system. Below you will find an overview of +the mandatory and optional packages (note that package names may vary +between distributions).

2.1. Mandatory packages

  • +Build tools: +

    • +which +
    • +sed +
    • +make (version 3.81 or any later) +
    • +binutils +
    • +build-essential (only for Debian based systems) +
    • +gcc (version 4.8 or any later) +
    • +g++ (version 4.8 or any later) +
    • +bash +
    • +patch +
    • +gzip +
    • +bzip2 +
    • +perl (version 5.8.7 or any later) +
    • +tar +
    • +cpio +
    • +unzip +
    • +rsync +
    • +file (must be in /usr/bin/file) +
    • +bc +
  • +Source fetching tools: +

    • +wget +

2.2. Optional packages

  • +Recommended dependencies: +

    Some features or utilities in Buildroot, like the legal-info, or the +graph generation tools, have additional dependencies. Although they +are not mandatory for a simple build, they are still highly recommended:

    • +python (version 2.7 or any later) +
  • +Configuration interface dependencies: +

    For these libraries, you need to install both runtime and development +data, which in many distributions are packaged separately. The +development packages typically have a -dev or -devel suffix.

    • +ncurses5 to use the menuconfig interface +
    • +qt5 to use the xconfig interface +
    • +glib2, gtk2 and glade2 to use the gconfig interface +
  • +Source fetching tools: +

    In the official tree, most of the package sources are retrieved using +wget from ftp, http or https locations. A few packages are only +available through a version control system. Moreover, Buildroot is +capable of downloading sources via other tools, like rsync or scp +(refer to Chapter 19, Download infrastructure for more details). If you enable +packages using any of these methods, you will need to install the +corresponding tool on the host system:

    • +bazaar +
    • +cvs +
    • +git +
    • +mercurial +
    • +rsync +
    • +scp +
    • +subversion +
  • +Java-related packages, if the Java Classpath needs to be built for + the target system: +

    • +The javac compiler +
    • +The jar tool +
  • +Documentation generation tools: +

    • +asciidoc, version 8.6.3 or higher +
    • +w3m +
    • +python with the argparse module (automatically present in 2.7+ and 3.2+) +
    • +dblatex (required for the pdf manual only) +
  • +Graph generation tools: +

    • +graphviz to use graph-depends and <pkg>-graph-depends +
    • +python-matplotlib to use graph-build +

Chapter 3. Getting Buildroot

Buildroot releases are made every 3 months, in February, May, August and +November. Release numbers are in the format YYYY.MM, so for example +2013.02, 2014.08.

Release tarballs are available at http://buildroot.org/downloads/.

For your convenience, a Vagrantfile is +available in support/misc/Vagrantfile in the Buildroot source tree +to quickly set up a virtual machine with the needed dependencies to +get started.

If you want to setup an isolated buildroot environment on Linux or Mac +Os X, paste this line onto your terminal:

curl -O https://buildroot.org/downloads/Vagrantfile; vagrant up

If you are on Windows, paste this into your powershell:

(new-object System.Net.WebClient).DownloadFile(
+"https://buildroot.org/downloads/Vagrantfile","Vagrantfile");
+vagrant up

If you want to follow development, you can use the daily snapshots or +make a clone of the Git repository. Refer to the +Download page of the Buildroot website +for more details.

Chapter 4. Buildroot quick start

Important: you can and should build everything as a normal user. There +is no need to be root to configure and use Buildroot. By running all +commands as a regular user, you protect your system against packages +behaving badly during compilation and installation.

The first step when using Buildroot is to create a configuration. +Buildroot has a nice configuration tool similar to the one you can +find in the Linux kernel or in +BusyBox.

From the buildroot directory, run

 $ make menuconfig

for the original curses-based configurator, or

 $ make nconfig

for the new curses-based configurator, or

 $ make xconfig

for the Qt-based configurator, or

 $ make gconfig

for the GTK-based configurator.

All of these "make" commands will need to build a configuration +utility (including the interface), so you may need to install +"development" packages for relevant libraries used by the +configuration utilities. Refer to Chapter 2, System requirements for more details, +specifically the optional requirements +to get the dependencies of your favorite interface.

For each menu entry in the configuration tool, you can find associated +help that describes the purpose of the entry. Refer to Chapter 6, Buildroot configuration +for details on some specific configuration aspects.

Once everything is configured, the configuration tool generates a +.config file that contains the entire configuration. This file will be +read by the top-level Makefile.

To start the build process, simply run:

 $ make

By default, Buildroot does not support top-level parallel build, so +running make -jN is not necessary. There is however experimental +support for top-level parallel build, see +Section 8.11, “Top-level parallel build”.

The make command will generally perform the following steps:

  • +download source files (as required); +
  • +configure, build and install the cross-compilation toolchain, or + simply import an external toolchain; +
  • +configure, build and install selected target packages; +
  • +build a kernel image, if selected; +
  • +build a bootloader image, if selected; +
  • +create a root filesystem in selected formats. +

Buildroot output is stored in a single directory, output/. +This directory contains several subdirectories:

  • +images/ where all the images (kernel image, bootloader and root + filesystem images) are stored. These are the files you need to put + on your target system. +
  • +build/ where all the components are built (this includes tools + needed by Buildroot on the host and packages compiled for the + target). This directory contains one subdirectory for each of these + components. +
  • +host/ contains both the tools built for the host, and the sysroot + of the target toolchain. The former is an installation of tools + compiled for the host that are needed for the proper execution of + Buildroot, including the cross-compilation toolchain. The latter + is a hierarchy similar to a root filesystem hierarchy. It contains + the headers and libraries of all user-space packages that provide + and install libraries used by other packages. However, this + directory is not intended to be the root filesystem for the target: + it contains a lot of development files, unstripped binaries and + libraries that make it far too big for an embedded system. These + development files are used to compile libraries and applications for + the target that depend on other libraries. +
  • +staging/ is a symlink to the target toolchain sysroot inside + host/, which exists for backwards compatibility. +
  • +target/ which contains almost the complete root filesystem for + the target: everything needed is present except the device files in + /dev/ (Buildroot can’t create them because Buildroot doesn’t run + as root and doesn’t want to run as root). Also, it doesn’t have the correct + permissions (e.g. setuid for the busybox binary). Therefore, this directory + should not be used on your target. Instead, you should use one of + the images built in the images/ directory. If you need an + extracted image of the root filesystem for booting over NFS, then + use the tarball image generated in images/ and extract it as + root. Compared to staging/, target/ contains only the files and + libraries needed to run the selected target applications: the + development files (headers, etc.) are not present, the binaries are + stripped. +

These commands, make menuconfig|nconfig|gconfig|xconfig and make, are the +basic ones that allow to easily and quickly generate images fitting +your needs, with all the features and applications you enabled.

More details about the "make" command usage are given in +Section 8.1, “make tips”.

Chapter 5. Community resources

Like any open source project, Buildroot has different ways to share +information in its community and outside.

Each of those ways may interest you if you are looking for some help, +want to understand Buildroot or contribute to the project.

+Mailing List +

Buildroot has a mailing list for discussion and development. It is the +main method of interaction for Buildroot users and developers.

Only subscribers to the Buildroot mailing list are allowed to post to +this list. You can subscribe via the +mailing list info +page.

Mails that are sent to the mailing list are also available in the +mailing list archives and +via Gmane, at +gmane.comp.lib.uclibc.buildroot. +Please search the mailing list archives before asking questions, since +there is a good chance someone else has asked the same question before.

+IRC +

The Buildroot IRC channel #buildroot is +hosted on Freenode. It is a useful place to +ask quick questions or discuss on certain topics.

When asking for help on IRC, share relevant logs or pieces of code +using a code sharing website, such as http://code.bulix.org.

Note that for certain questions, posting to the mailing list may be +better as it will reach more people, both developers and users.

+Bug tracker +
Bugs in Buildroot can be reported via the mailing list or alternatively +via the Buildroot +bugtracker. Please refer to Section 21.6, “Reporting issues/bugs or getting help” before creating a bug +report.
+Wiki +
The Buildroot wiki page is hosted on +the eLinux wiki. It contains some useful links, an +overview of past and upcoming events, and a TODO list.
+Patchwork +

Patchwork is a web-based patch tracking system designed to facilitate +the contribution and management of contributions to an open-source +project. Patches that have been sent to a mailing list are 'caught' by +the system, and appear on a web page. Any comments posted that +reference the patch are appended to the patch page too. For more +information on Patchwork see +http://jk.ozlabs.org/projects/patchwork/.

Buildroot’s Patchwork website is mainly for use by Buildroot’s +maintainer to ensure patches aren’t missed. It is also used by Buildroot +patch reviewers (see also Section 21.3.1, “Applying Patches from Patchwork”). +However, since the website exposes patches and their corresponding +review comments in a clean and concise web interface, it can be useful +for all Buildroot developers.

The Buildroot patch management interface is available at +http://patchwork.buildroot.org.

Part II. User guide

Chapter 6. Buildroot configuration

All the configuration options in make *config have a help text +providing details about the option.

The make *config commands also offer a search tool. Read the help +message in the different frontend menus to know how to use it:

  • +in menuconfig, the search tool is called by pressing /; +
  • +in xconfig, the search tool is called by pressing Ctrl + f. +

The result of the search shows the help message of the matching items. +In menuconfig, numbers in the left column provide a shortcut to the +corresponding entry. Just type this number to directly jump to the +entry, or to the containing menu in case the entry is not selectable due +to a missing dependency.

Although the menu structure and the help text of the entries should be +sufficiently self-explanatory, a number of topics require additional +explanation that cannot easily be covered in the help text and are +therefore covered in the following sections.

6.1. Cross-compilation toolchain

A compilation toolchain is the set of tools that allows you to compile +code for your system. It consists of a compiler (in our case, gcc), +binary utils like assembler and linker (in our case, binutils) and a +C standard library (for example +GNU Libc, +uClibc-ng).

The system installed on your development station certainly already has +a compilation toolchain that you can use to compile an application +that runs on your system. If you’re using a PC, your compilation +toolchain runs on an x86 processor and generates code for an x86 +processor. Under most Linux systems, the compilation toolchain uses +the GNU libc (glibc) as the C standard library. This compilation +toolchain is called the "host compilation toolchain". The machine on +which it is running, and on which you’re working, is called the "host +system" [3].

The compilation toolchain is provided by your distribution, and +Buildroot has nothing to do with it (other than using it to build a +cross-compilation toolchain and other tools that are run on the +development host).

As said above, the compilation toolchain that comes with your system +runs on and generates code for the processor in your host system. As +your embedded system has a different processor, you need a +cross-compilation toolchain - a compilation toolchain that runs on +your host system but generates code for your target system (and +target processor). For example, if your host system uses x86 and your +target system uses ARM, the regular compilation toolchain on your host +runs on x86 and generates code for x86, while the cross-compilation +toolchain runs on x86 and generates code for ARM.

Buildroot provides two solutions for the cross-compilation toolchain:

  • +The internal toolchain backend, called Buildroot toolchain in + the configuration interface. +
  • +The external toolchain backend, called External toolchain in + the configuration interface. +

The choice between these two solutions is done using the Toolchain +Type option in the Toolchain menu. Once one solution has been +chosen, a number of configuration options appear, they are detailed in +the following sections.

6.1.1. Internal toolchain backend

The internal toolchain backend is the backend where Buildroot builds +by itself a cross-compilation toolchain, before building the userspace +applications and libraries for your target embedded system.

This backend supports several C libraries: +uClibc-ng, +glibc and +musl.

Once you have selected this backend, a number of options appear. The +most important ones allow to:

  • +Change the version of the Linux kernel headers used to build the + toolchain. This item deserves a few explanations. In the process of + building a cross-compilation toolchain, the C library is being + built. This library provides the interface between userspace + applications and the Linux kernel. In order to know how to "talk" + to the Linux kernel, the C library needs to have access to the + Linux kernel headers (i.e. the .h files from the kernel), which + define the interface between userspace and the kernel (system + calls, data structures, etc.). Since this interface is backward + compatible, the version of the Linux kernel headers used to build + your toolchain do not need to match exactly the version of the + Linux kernel you intend to run on your embedded system. They only + need to have a version equal or older to the version of the Linux + kernel you intend to run. If you use kernel headers that are more + recent than the Linux kernel you run on your embedded system, then + the C library might be using interfaces that are not provided by + your Linux kernel. +
  • +Change the version of the GCC compiler, binutils and the C library. +
  • +Select a number of toolchain options (uClibc only): whether the + toolchain should have RPC support (used mainly for NFS), + wide-char support, locale support (for internationalization), + C++ support or thread support. Depending on which options you choose, + the number of userspace applications and libraries visible in + Buildroot menus will change: many applications and libraries require + certain toolchain options to be enabled. Most packages show a comment + when a certain toolchain option is required to be able to enable + those packages. If needed, you can further refine the uClibc + configuration by running make uclibc-menuconfig. Note however that + all packages in Buildroot are tested against the default uClibc + configuration bundled in Buildroot: if you deviate from this + configuration by removing features from uClibc, some packages may no + longer build. +

It is worth noting that whenever one of those options is modified, +then the entire toolchain and system must be rebuilt. See +Section 8.2, “Understanding when a full rebuild is necessary”.

Advantages of this backend:

  • +Well integrated with Buildroot +
  • +Fast, only builds what’s necessary +

Drawbacks of this backend:

  • +Rebuilding the toolchain is needed when doing make clean, which + takes time. If you’re trying to reduce your build time, consider + using the External toolchain backend. +

6.1.2. External toolchain backend

The external toolchain backend allows to use existing pre-built +cross-compilation toolchains. Buildroot knows about a number of +well-known cross-compilation toolchains (from +Linaro for ARM, +Sourcery +CodeBench for ARM, x86-64, PowerPC, and MIPS, and is capable of +downloading them automatically, or it can be pointed to a custom +toolchain, either available for download or installed locally.

Then, you have three solutions to use an external toolchain:

  • +Use a predefined external toolchain profile, and let Buildroot + download, extract and install the toolchain. Buildroot already knows + about a few CodeSourcery and Linaro toolchains. Just select the + toolchain profile in Toolchain from the available ones. This is + definitely the easiest solution. +
  • +Use a predefined external toolchain profile, but instead of having + Buildroot download and extract the toolchain, you can tell Buildroot + where your toolchain is already installed on your system. Just + select the toolchain profile in Toolchain through the available + ones, unselect Download toolchain automatically, and fill the + Toolchain path text entry with the path to your cross-compiling + toolchain. +
  • +Use a completely custom external toolchain. This is particularly + useful for toolchains generated using crosstool-NG or with Buildroot + itself. To do this, select the Custom toolchain solution in the + Toolchain list. You need to fill the Toolchain path, Toolchain + prefix and External toolchain C library options. Then, you have + to tell Buildroot what your external toolchain supports. If your + external toolchain uses the glibc library, you only have to tell + whether your toolchain supports C++ or not and whether it has + built-in RPC support. If your external toolchain uses the uClibc + library, then you have to tell Buildroot if it supports RPC, + wide-char, locale, program invocation, threads and C++. + At the beginning of the execution, Buildroot will tell you if + the selected options do not match the toolchain configuration. +

Our external toolchain support has been tested with toolchains from +CodeSourcery and Linaro, toolchains generated by +crosstool-NG, and toolchains generated by +Buildroot itself. In general, all toolchains that support the +sysroot feature should work. If not, do not hesitate to contact the +developers.

We do not support toolchains or SDK generated by OpenEmbedded or +Yocto, because these toolchains are not pure toolchains (i.e. just the +compiler, binutils, the C and C++ libraries). Instead these toolchains +come with a very large set of pre-compiled libraries and +programs. Therefore, Buildroot cannot import the sysroot of the +toolchain, as it would contain hundreds of megabytes of pre-compiled +libraries that are normally built by Buildroot.

We also do not support using the distribution toolchain (i.e. the +gcc/binutils/C library installed by your distribution) as the +toolchain to build software for the target. This is because your +distribution toolchain is not a "pure" toolchain (i.e. only with the +C/C++ library), so we cannot import it properly into the Buildroot +build environment. So even if you are building a system for a x86 or +x86_64 target, you have to generate a cross-compilation toolchain with +Buildroot or crosstool-NG.

If you want to generate a custom toolchain for your project, that can +be used as an external toolchain in Buildroot, our recommendation is +to build it either with Buildroot itself (see +Section 6.1.3, “Build an external toolchain with Buildroot”) or with +crosstool-NG.

Advantages of this backend:

  • +Allows to use well-known and well-tested cross-compilation + toolchains. +
  • +Avoids the build time of the cross-compilation toolchain, which is + often very significant in the overall build time of an embedded + Linux system. +

Drawbacks of this backend:

  • +If your pre-built external toolchain has a bug, may be hard to get a + fix from the toolchain vendor, unless you build your external + toolchain by yourself using Buildroot or Crosstool-NG. +

6.1.3. Build an external toolchain with Buildroot

The Buildroot internal toolchain option can be used to create an +external toolchain. Here are a series of steps to build an internal +toolchain and package it up for reuse by Buildroot itself (or other +projects).

Create a new Buildroot configuration, with the following details:

  • +Select the appropriate Target options for your target CPU + architecture +
  • +In the Toolchain menu, keep the default of Buildroot toolchain + for Toolchain type, and configure your toolchain as desired +
  • +In the System configuration menu, select None as the Init + system and none as /bin/sh +
  • +In the Target packages menu, disable BusyBox +
  • +In the Filesystem images menu, disable tar the root filesystem +

Then, we can trigger the build, and also ask Buildroot to generate a +SDK. This will conveniently generate for us a tarball which contains +our toolchain:

make sdk

This produces the SDK tarball in $(O)/images, with a name similar to +arm-buildroot-linux-uclibcgnueabi_sdk-buildroot.tar.gz. Save this +tarball, as it is now the toolchain that you can re-use as an external +toolchain in other Buildroot projects.

In those other Buildroot projects, in the Toolchain menu:

  • +Set Toolchain type to External toolchain +
  • +Set Toolchain to Custom toolchain +
  • +Set Toolchain origin to Toolchain to be downloaded and installed +
  • +Set Toolchain URL to file:///path/to/your/sdk/tarball.tar.gz +

External toolchain wrapper

When using an external toolchain, Buildroot generates a wrapper program, +that transparently passes the appropriate options (according to the +configuration) to the external toolchain programs. In case you need to +debug this wrapper to check exactly what arguments are passed, you can +set the environment variable BR2_DEBUG_WRAPPER to either one of:

  • +0, empty or not set: no debug +
  • +1: trace all arguments on a single line +
  • +2: trace one argument per line +

6.2. /dev management

On a Linux system, the /dev directory contains special files, called +device files, that allow userspace applications to access the +hardware devices managed by the Linux kernel. Without these device +files, your userspace applications would not be able to use the +hardware devices, even if they are properly recognized by the Linux +kernel.

Under System configuration, /dev management, Buildroot offers four +different solutions to handle the /dev directory :

  • +The first solution is Static using device table. This is the old + classical way of handling device files in Linux. With this method, + the device files are persistently stored in the root filesystem + (i.e. they persist across reboots), and there is nothing that will + automatically create and remove those device files when hardware + devices are added or removed from the system. Buildroot therefore + creates a standard set of device files using a device table, the + default one being stored in system/device_table_dev.txt in the + Buildroot source code. This file is processed when Buildroot + generates the final root filesystem image, and the device files + are therefore not visible in the output/target directory. The + BR2_ROOTFS_STATIC_DEVICE_TABLE option allows to change the + default device table used by Buildroot, or to add an additional + device table, so that additional device files are created by + Buildroot during the build. So, if you use this method, and a + device file is missing in your system, you can for example create + a board/<yourcompany>/<yourproject>/device_table_dev.txt file + that contains the description of your additional device files, + and then you can set BR2_ROOTFS_STATIC_DEVICE_TABLE to + system/device_table_dev.txt + board/<yourcompany>/<yourproject>/device_table_dev.txt. For more + details about the format of the device table file, see + Chapter 24, Makedev syntax documentation. +
  • +The second solution is Dynamic using devtmpfs only. devtmpfs is + a virtual filesystem inside the Linux kernel that has been + introduced in kernel 2.6.32 (if you use an older kernel, it is not + possible to use this option). When mounted in /dev, this virtual + filesystem will automatically make device files appear and + disappear as hardware devices are added and removed from the + system. This filesystem is not persistent across reboots: it is + filled dynamically by the kernel. Using devtmpfs requires the + following kernel configuration options to be enabled: + CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT. When Buildroot is in + charge of building the Linux kernel for your embedded device, it + makes sure that those two options are enabled. However, if you + build your Linux kernel outside of Buildroot, then it is your + responsibility to enable those two options (if you fail to do so, + your Buildroot system will not boot). +
  • +The third solution is Dynamic using devtmpfs + mdev. This method + also relies on the devtmpfs virtual filesystem detailed above (so + the requirement to have CONFIG_DEVTMPFS and + CONFIG_DEVTMPFS_MOUNT enabled in the kernel configuration still + apply), but adds the mdev userspace utility on top of it. mdev + is a program part of BusyBox that the kernel will call every time a + device is added or removed. Thanks to the /etc/mdev.conf + configuration file, mdev can be configured to for example, set + specific permissions or ownership on a device file, call a script + or application whenever a device appears or disappear, + etc. Basically, it allows userspace to react on device addition + and removal events. mdev can for example be used to automatically + load kernel modules when devices appear on the system. mdev is + also important if you have devices that require a firmware, as it + will be responsible for pushing the firmware contents to the + kernel. mdev is a lightweight implementation (with fewer + features) of udev. For more details about mdev and the syntax + of its configuration file, see + http://git.busybox.net/busybox/tree/docs/mdev.txt. +
  • +The fourth solution is Dynamic using devtmpfs + eudev. This + method also relies on the devtmpfs virtual filesystem detailed + above, but adds the eudev userspace daemon on top of it. eudev + is a daemon that runs in the background, and gets called by the + kernel when a device gets added or removed from the system. It is a + more heavyweight solution than mdev, but provides higher + flexibility. eudev is a standalone version of udev, the + original userspace daemon used in most desktop Linux distributions, + which is now part of Systemd. For more details, see + http://en.wikipedia.org/wiki/Udev. +

The Buildroot developers recommendation is to start with the Dynamic +using devtmpfs only solution, until you have the need for userspace +to be notified when devices are added/removed, or if firmwares are +needed, in which case Dynamic using devtmpfs + mdev is usually a +good solution.

Note that if systemd is chosen as init system, /dev management will +be performed by the udev program provided by systemd.

6.3. init system

The init program is the first userspace program started by the +kernel (it carries the PID number 1), and is responsible for starting +the userspace services and programs (for example: web server, +graphical applications, other network servers, etc.).

Buildroot allows to use three different types of init systems, which +can be chosen from System configuration, Init system:

  • +The first solution is BusyBox. Amongst many programs, BusyBox has + an implementation of a basic init program, which is sufficient + for most embedded systems. Enabling the BR2_INIT_BUSYBOX will + ensure BusyBox will build and install its init program. This is + the default solution in Buildroot. The BusyBox init program will + read the /etc/inittab file at boot to know what to do. The syntax + of this file can be found in + http://git.busybox.net/busybox/tree/examples/inittab (note that + BusyBox inittab syntax is special: do not use a random inittab + documentation from the Internet to learn about BusyBox + inittab). The default inittab in Buildroot is stored in + system/skeleton/etc/inittab. Apart from mounting a few important + filesystems, the main job the default inittab does is to start the + /etc/init.d/rcS shell script, and start a getty program (which + provides a login prompt). +
  • +The second solution is systemV. This solution uses the old + traditional sysvinit program, packed in Buildroot in + package/sysvinit. This was the solution used in most desktop + Linux distributions, until they switched to more recent + alternatives such as Upstart or Systemd. sysvinit also works with + an inittab file (which has a slightly different syntax than the + one from BusyBox). The default inittab installed with this init + solution is located in package/sysvinit/inittab. +
  • +The third solution is systemd. systemd is the new generation + init system for Linux. It does far more than traditional init + programs: aggressive parallelization capabilities, uses socket and + D-Bus activation for starting services, offers on-demand starting + of daemons, keeps track of processes using Linux control groups, + supports snapshotting and restoring of the system state, + etc. systemd will be useful on relatively complex embedded + systems, for example the ones requiring D-Bus and services + communicating between each other. It is worth noting that systemd + brings a fairly big number of large dependencies: dbus, udev + and more. For more details about systemd, see + http://www.freedesktop.org/wiki/Software/systemd. +

The solution recommended by Buildroot developers is to use the +BusyBox init as it is sufficient for most embedded +systems. systemd can be used for more complex situations.



[3] This terminology differs from what is used by GNU +configure, where the host is the machine on which the application will +run (which is usually the same as target)

Chapter 7. Configuration of other components

Before attempting to modify any of the components below, make sure you +have already configured Buildroot itself, and have enabled the +corresponding package.

+BusyBox +

If you already have a BusyBox configuration file, you can directly +specify this file in the Buildroot configuration, using +BR2_PACKAGE_BUSYBOX_CONFIG. Otherwise, Buildroot will start from a +default BusyBox configuration file.

To make subsequent changes to the configuration, use make +busybox-menuconfig to open the BusyBox configuration editor.

It is also possible to specify a BusyBox configuration file through an +environment variable, although this is not recommended. Refer to +Section 8.6, “Environment variables” for more details.

+uClibc +
Configuration of uClibc is done in the same way as for BusyBox. The +configuration variable to specify an existing configuration file is +BR2_UCLIBC_CONFIG. The command to make subsequent changes is make +uclibc-menuconfig.
+Linux kernel +

If you already have a kernel configuration file, you can directly +specify this file in the Buildroot configuration, using +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG.

If you do not yet have a kernel configuration file, you can either start +by specifying a defconfig in the Buildroot configuration, using +BR2_LINUX_KERNEL_USE_DEFCONFIG, or start by creating an empty file and +specifying it as custom configuration file, using +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG.

To make subsequent changes to the configuration, use make +linux-menuconfig to open the Linux configuration editor.

+Barebox +
Configuration of Barebox is done in the same way as for the Linux +kernel. The corresponding configuration variables are +BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG and +BR2_TARGET_BAREBOX_USE_DEFCONFIG. To open the configuration editor, +use make barebox-menuconfig.
+U-Boot +
Configuration of U-Boot (version 2015.04 or newer) is done in the same +way as for the Linux kernel. The corresponding configuration variables +are BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG and +BR2_TARGET_UBOOT_USE_DEFCONFIG. To open the configuration editor, +use make uboot-menuconfig.

Chapter 8. General Buildroot usage

8.1. make tips

This is a collection of tips that help you make the most of Buildroot.

Display all commands executed by make:  +

 $ make V=1 <target>

+

Display the list of boards with a defconfig:  +

 $ make list-defconfigs

+

Display all available targets:  +

 $ make help

+

Not all targets are always available, +some settings in the .config file may hide some targets:

  • +busybox-menuconfig only works when busybox is enabled; +
  • +linux-menuconfig and linux-savedefconfig only work when + linux is enabled; +
  • +uclibc-menuconfig is only available when the uClibc C library is + selected in the internal toolchain backend; +
  • +barebox-menuconfig and barebox-savedefconfig only work when the + barebox bootloader is enabled. +
  • +uboot-menuconfig and uboot-savedefconfig only work when the + U-Boot bootloader is enabled. +

Cleaning: Explicit cleaning is required when any of the architecture or toolchain +configuration options are changed.

To delete all build products (including build directories, host, staging +and target trees, the images and the toolchain):

 $ make clean

Generating the manual: The present manual sources are located in the docs/manual directory. +To generate the manual:

 $ make manual-clean
+ $ make manual

The manual outputs will be generated in output/docs/manual.

Notes

Resetting Buildroot for a new target: To delete all build products as well as the configuration:

 $ make distclean

Notes. If ccache is enabled, running make clean or distclean does +not empty the compiler cache used by Buildroot. To delete it, refer +to Section 8.13.3, “Using ccache in Buildroot”.

Dumping the internal make variables: One can dump the variables known to make, along with their values:

 $ make -s printvars VARS='VARIABLE1 VARIABLE2'
+ VARIABLE1=value_of_variable
+ VARIABLE2=value_of_variable

It is possible to tweak the output using some variables:

  • +VARS will limit the listing to variables which names match the + specified make-patterns - this must be set else nothing is printed +
  • +QUOTED_VARS, if set to YES, will single-quote the value +
  • +RAW_VARS, if set to YES, will print the unexpanded value +

For example:

 $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES
+ BUSYBOX_DEPENDENCIES=skeleton toolchain
+ BUSYBOX_FINAL_ALL_DEPENDENCIES=skeleton toolchain
+ BUSYBOX_FINAL_DEPENDENCIES=skeleton toolchain
+ BUSYBOX_FINAL_PATCH_DEPENDENCIES=
+ BUSYBOX_RDEPENDENCIES=ncurses util-linux
 $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES QUOTED_VARS=YES
+ BUSYBOX_DEPENDENCIES='skeleton toolchain'
+ BUSYBOX_FINAL_ALL_DEPENDENCIES='skeleton toolchain'
+ BUSYBOX_FINAL_DEPENDENCIES='skeleton toolchain'
+ BUSYBOX_FINAL_PATCH_DEPENDENCIES=''
+ BUSYBOX_RDEPENDENCIES='ncurses util-linux'
 $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES RAW_VARS=YES
+ BUSYBOX_DEPENDENCIES=skeleton toolchain
+ BUSYBOX_FINAL_ALL_DEPENDENCIES=$(sort $(BUSYBOX_FINAL_DEPENDENCIES) $(BUSYBOX_FINAL_PATCH_DEPENDENCIES))
+ BUSYBOX_FINAL_DEPENDENCIES=$(sort $(BUSYBOX_DEPENDENCIES))
+ BUSYBOX_FINAL_PATCH_DEPENDENCIES=$(sort $(BUSYBOX_PATCH_DEPENDENCIES))
+ BUSYBOX_RDEPENDENCIES=ncurses util-linux

The output of quoted variables can be reused in shell scripts, for example:

 $ eval $(make -s printvars VARS=BUSYBOX_DEPENDENCIES QUOTED_VARS=YES)
+ $ echo $BUSYBOX_DEPENDENCIES
+ skeleton toolchain

8.2. Understanding when a full rebuild is necessary

Buildroot does not attempt to detect what parts of the system should +be rebuilt when the system configuration is changed through make +menuconfig, make xconfig or one of the other configuration +tools. In some cases, Buildroot should rebuild the entire system, in +some cases, only a specific subset of packages. But detecting this in +a completely reliable manner is very difficult, and therefore the +Buildroot developers have decided to simply not attempt to do this.

Instead, it is the responsibility of the user to know when a full +rebuild is necessary. As a hint, here are a few rules of thumb that +can help you understand how to work with Buildroot:

  • +When the target architecture configuration is changed, a complete + rebuild is needed. Changing the architecture variant, the binary + format or the floating point strategy for example has an impact on + the entire system. +
  • +When the toolchain configuration is changed, a complete rebuild + generally is needed. Changing the toolchain configuration often + involves changing the compiler version, the type of C library or + its configuration, or some other fundamental configuration item, + and these changes have an impact on the entire system. +
  • +When an additional package is added to the configuration, a full + rebuild is not necessarily needed. Buildroot will detect that this + package has never been built, and will build it. However, if this + package is a library that can optionally be used by packages that + have already been built, Buildroot will not automatically rebuild + those. Either you know which packages should be rebuilt, and you + can rebuild them manually, or you should do a full rebuild. For + example, let’s suppose you have built a system with the ctorrent + package, but without openssl. Your system works, but you realize + you would like to have SSL support in ctorrent, so you enable the + openssl package in Buildroot configuration and restart the + build. Buildroot will detect that openssl should be built and + will be build it, but it will not detect that ctorrent should be + rebuilt to benefit from openssl to add OpenSSL support. You will + either have to do a full rebuild, or rebuild ctorrent itself. +
  • +When a package is removed from the configuration, Buildroot does + not do anything special. It does not remove the files installed by + this package from the target root filesystem or from the toolchain + sysroot. A full rebuild is needed to get rid of this + package. However, generally you don’t necessarily need this package + to be removed right now: you can wait for the next lunch break to + restart the build from scratch. +
  • +When the sub-options of a package are changed, the package is not + automatically rebuilt. After making such changes, rebuilding only + this package is often sufficient, unless enabling the package + sub-option adds some features to the package that are useful for + another package which has already been built. Again, Buildroot does + not track when a package should be rebuilt: once a package has been + built, it is never rebuilt unless explicitly told to do so. +
  • +When a change to the root filesystem skeleton is made, a full + rebuild is needed. However, when changes to the root filesystem + overlay, a post-build script or a post-image script are made, + there is no need for a full rebuild: a simple make invocation + will take the changes into account. +
  • +When a package listed in FOO_DEPENDENCIES is rebuilt or removed, + the package foo is not automatically rebuilt. For example, if a + package bar is listed in FOO_DEPENDENCIES with FOO_DEPENDENCIES + = bar and the configuration of the bar package is changed, the + configuration change would not result in a rebuild of package foo + automatically. In this scenario, you may need to either rebuild any + packages in your build which reference bar in their DEPENDENCIES, + or perform a full rebuild to ensure any bar dependent packages are + up to date. +

Generally speaking, when you’re facing a build error and you’re unsure +of the potential consequences of the configuration changes you’ve +made, do a full rebuild. If you get the same build error, then you are +sure that the error is not related to partial rebuilds of packages, +and if this error occurs with packages from the official Buildroot, do +not hesitate to report the problem! As your experience with Buildroot +progresses, you will progressively learn when a full rebuild is really +necessary, and you will save more and more time.

For reference, a full rebuild is achieved by running:

$ make clean all

8.3. Understanding how to rebuild packages

One of the most common questions asked by Buildroot users is how to +rebuild a given package or how to remove a package without rebuilding +everything from scratch.

Removing a package is unsupported by Buildroot without +rebuilding from scratch. This is because Buildroot doesn’t keep track +of which package installs what files in the output/staging and +output/target directories, or which package would be compiled differently +depending on the availability of another package.

The easiest way to rebuild a single package from scratch is to remove +its build directory in output/build. Buildroot will then re-extract, +re-configure, re-compile and re-install this package from scratch. You +can ask buildroot to do this with the make <package>-dirclean command.

On the other hand, if you only want to restart the build process of a +package from its compilation step, you can run make <package>-rebuild. It +will restart the compilation and installation of the package, but not from +scratch: it basically re-executes make and make install inside the package, +so it will only rebuild files that changed.

If you want to restart the build process of a package from its configuration +step, you can run make <package>-reconfigure. It will restart the +configuration, compilation and installation of the package.

While <package>-rebuild implies <package>-reinstall and +<package>-reconfigure implies <package>-rebuild, these targets as well +as <package> only act on the said package, and do not trigger re-creating +the root filesystem image. If re-creating the root filesystem in necessary, +one should in addition run make or make all.

Internally, Buildroot creates so-called stamp files to keep track of +which build steps have been completed for each package. They are +stored in the package build directory, +output/build/<package>-<version>/ and are named +.stamp_<step-name>. The commands detailed above simply manipulate +these stamp files to force Buildroot to restart a specific set of +steps of a package build process.

Further details about package special make targets are explained in +Section 8.13.5, “Package-specific make targets”.

8.4. Offline builds

If you intend to do an offline build and just want to download +all sources that you previously selected in the configurator +(menuconfig, nconfig, xconfig or gconfig), then issue:

 $ make source

You can now disconnect or copy the content of your dl +directory to the build-host.

8.5. Building out-of-tree

As default, everything built by Buildroot is stored in the directory +output in the Buildroot tree.

Buildroot also supports building out of tree with a syntax similar to +the Linux kernel. To use it, add O=<directory> to the make command +line:

 $ make O=/tmp/build

Or:

 $ cd /tmp/build; make O=$PWD -C path/to/buildroot

All the output files will be located under /tmp/build. If the O +path does not exist, Buildroot will create it.

Note: the O path can be either an absolute or a relative path, but if it’s +passed as a relative path, it is important to note that it is interpreted +relative to the main Buildroot source directory, not the current working +directory.

When using out-of-tree builds, the Buildroot .config and temporary +files are also stored in the output directory. This means that you can +safely run multiple builds in parallel using the same source tree as +long as they use unique output directories.

For ease of use, Buildroot generates a Makefile wrapper in the output +directory - so after the first run, you no longer need to pass O=<…> +and -C <…>, simply run (in the output directory):

 $ make <target>

8.6. Environment variables

Buildroot also honors some environment variables, when they are passed +to make or set in the environment:

  • +HOSTCXX, the host C++ compiler to use +
  • +HOSTCC, the host C compiler to use +
  • +UCLIBC_CONFIG_FILE=<path/to/.config>, path to + the uClibc configuration file, used to compile uClibc, if an + internal toolchain is being built. + + Note that the uClibc configuration file can also be set from the + configuration interface, so through the Buildroot .config file; this + is the recommended way of setting it. + +
  • +BUSYBOX_CONFIG_FILE=<path/to/.config>, path to + the BusyBox configuration file. + + Note that the BusyBox configuration file can also be set from the + configuration interface, so through the Buildroot .config file; this + is the recommended way of setting it. + +
  • +BR2_CCACHE_DIR to override the directory where + Buildroot stores the cached files when using ccache. + +
  • +BR2_DL_DIR to override the directory in which + Buildroot stores/retrieves downloaded files. + + Note that the Buildroot download directory can also be set from the + configuration interface, so through the Buildroot .config file. See + Section 8.13.4, “Location of downloaded packages” for more details on how you can set the download + directory. +
  • +BR2_GRAPH_ALT, if set and non-empty, to use an alternate color-scheme in + build-time graphs +
  • +BR2_GRAPH_OUT to set the filetype of generated graphs, either pdf (the + default), or png. +
  • +BR2_GRAPH_DEPS_OPTS to pass extra options to the dependency graph; see + Section 8.8, “Graphing the dependencies between packages” for the accepted options +
  • +BR2_GRAPH_DOT_OPTS is passed verbatim as options to the dot utility to + draw the dependency graph. +
  • +BR2_GRAPH_SIZE_OPTS to pass extra options to the size graph; see + Section 8.10, “Graphing the filesystem size contribution of packages” for the acepted options +

An example that uses config files located in the toplevel directory and +in your $HOME:

 $ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config

If you want to use a compiler other than the default gcc +or g++ for building helper-binaries on your host, then do

 $ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD

8.7. Dealing efficiently with filesystem images

Filesystem images can get pretty big, depending on the filesystem you choose, +the number of packages, whether you provisioned free space… Yet, some +locations in the filesystems images may just be empty (e.g. a long run of +zeroes); such a file is called a sparse file.

Most tools can handle sparse files efficiently, and will only store or write +those parts of a sparse file that are not empty.

For example:

  • +tar accepts the -S option to tell it to only store non-zero blocks + of sparse files: +

    • +tar cf archive.tar -S [files…] will efficiently store sparse files + in a tarball +
    • +tar xf archive.tar -S will efficiently store sparse files extracted + from a tarball +
  • +cp accepts the --sparse=WHEN option (WHEN is one of auto, + never or always): +

    • +cp --sparse=always source.file dest.file will make dest.file a + sparse file if source.file has long runs of zeroes +

Other tools may have similar options. Please consult their respective man +pages.

You can use sparse files if you need to store the filesystem images (e.g. +to transfer from one machine to another), or if you need to send them (e.g. +to the Q&A team).

Note however that flashing a filesystem image to a device while using the +sparse mode of dd may result in a broken filesystem (e.g. the block bitmap +of an ext2 filesystem may be corrupted; or, if you have sparse files in +your filesystem, those parts may not be all-zeroes when read back). You +should only use sparse files when handling files on the build machine, not +when transferring them to an actual device that will be used on the target.

8.8. Graphing the dependencies between packages

One of Buildroot’s jobs is to know the dependencies between packages, +and make sure they are built in the right order. These dependencies +can sometimes be quite complicated, and for a given system, it is +often not easy to understand why such or such package was brought into +the build by Buildroot.

In order to help understanding the dependencies, and therefore better +understand what is the role of the different components in your +embedded Linux system, Buildroot is capable of generating dependency +graphs.

To generate a dependency graph of the full system you have compiled, +simply run:

make graph-depends

You will find the generated graph in +output/graphs/graph-depends.pdf.

If your system is quite large, the dependency graph may be too complex +and difficult to read. It is therefore possible to generate the +dependency graph just for a given package:

make <pkg>-graph-depends

You will find the generated graph in +output/graph/<pkg>-graph-depends.pdf.

Note that the dependency graphs are generated using the dot tool +from the Graphviz project, which you must have installed on your +system to use this feature. In most distributions, it is available as +the graphviz package.

By default, the dependency graphs are generated in the PDF +format. However, by passing the BR2_GRAPH_OUT environment variable, you +can switch to other output formats, such as PNG, PostScript or +SVG. All formats supported by the -T option of the dot tool are +supported.

BR2_GRAPH_OUT=svg make graph-depends

The graph-depends behaviour can be controlled by setting options in the +BR2_GRAPH_DEPS_OPTS environment variable. The accepted options are:

  • +--depth N, -d N, to limit the dependency depth to N levels. The + default, 0, means no limit. +
  • +--stop-on PKG, -s PKG, to stop the graph on the package PKG. + PKG can be an actual package name, a glob, the keyword virtual + (to stop on virtual packages), or the keyword host (to stop on + host packages). The package is still present on the graph, but its + dependencies are not. +
  • +--exclude PKG, -x PKG, like --stop-on, but also omits PKG from + the graph. +
  • +--transitive, --no-transitive, to draw (or not) the transitive + dependencies. The default is to not draw transitive dependencies. +
  • +--colors R,T,H, the comma-separated list of colors to draw the + root package (R), the target packages (T) and the host packages + (H). Defaults to: lightblue,grey,gainsboro +
BR2_GRAPH_DEPS_OPTS='-d 3 --no-transitive --colors=red,green,blue' make graph-depends

8.9. Graphing the build duration

When the build of a system takes a long time, it is sometimes useful +to be able to understand which packages are the longest to build, to +see if anything can be done to speed up the build. In order to help +such build time analysis, Buildroot collects the build time of each +step of each package, and allows to generate graphs from this data.

To generate the build time graph after a build, run:

make graph-build

This will generate a set of files in output/graphs :

  • +build.hist-build.pdf, a histogram of the build time for each + package, ordered in the build order. +
  • +build.hist-duration.pdf, a histogram of the build time for each + package, ordered by duration (longest first) +
  • +build.hist-name.pdf, a histogram of the build time for each + package, order by package name. +
  • +build.pie-packages.pdf, a pie chart of the build time per package +
  • +build.pie-steps.pdf, a pie chart of the global time spent in each + step of the packages build process. +

This graph-build target requires the Python Matplotlib and Numpy +libraries to be installed (python-matplotlib and python-numpy on +most distributions), and also the argparse module if you’re using a +Python version older than 2.7 (python-argparse on most +distributions).

By default, the output format for the graph is PDF, but a different +format can be selected using the BR2_GRAPH_OUT environment variable. The +only other format supported is PNG:

BR2_GRAPH_OUT=png make graph-build

8.10. Graphing the filesystem size contribution of packages

When your target system grows, it is sometimes useful to understand +how much each Buildroot package is contributing to the overall root +filesystem size. To help with such an analysis, Buildroot collects +data about files installed by each package and using this data, +generates a graph and CSV files detailing the size contribution of +the different packages.

To generate these data after a build, run:

make graph-size

This will generate:

  • +output/graphs/graph-size.pdf, a pie chart of the contribution of + each package to the overall root filesystem size +
  • +output/graphs/package-size-stats.csv, a CSV file giving the size + contribution of each package to the overall root filesystem size +
  • +output/graphs/file-size-stats.csv, a CSV file giving the size + contribution of each installed file to the package it belongs, and + to the overall filesystem size. +

This graph-size target requires the Python Matplotlib library to be +installed (python-matplotlib on most distributions), and also the +argparse module if you’re using a Python version older than 2.7 +(python-argparse on most distributions).

Just like for the duration graph, a BR2_GRAPH_OUT environment variable +is supported to adjust the output file format. See Section 8.8, “Graphing the dependencies between packages” +for details about this environment variable.

Additionally, one may set the environment variable BR2_GRAPH_SIZE_OPTS +to further control the generated graph. Accepted options are:

  • +--size-limit X, -l X, will group all packages which individual + contribution is below X percent, to a single entry labelled Others + in the graph. By default, X=0.01, which means packages each + contributing less than 1% are grouped under Others. Accepted values + are in the range [0.0..1.0]. +
  • +--iec, --binary, --si, --decimal, to use IEC (binary, powers + of 1024) or SI (decimal, powers of 1000; the default) prefixes. +
  • +--biggest-first, to sort packages in decreasing size order, rather + than in increasing size order. +

Note. The collected filesystem size data is only meaningful after a complete +clean rebuild. Be sure to run make clean all before using make +graph-size.

To compare the root filesystem size of two different Buildroot compilations, +for example after adjusting the configuration or when switching to another +Buildroot release, use the size-stats-compare script. It takes two +file-size-stats.csv files (produced by make graph-size) as input. +Refer to the help text of this script for more details:

utils/size-stats-compare -h

8.11. Top-level parallel build

Note. This section deals with a very experimental feature, which is known to +break even in some non-unusual situations. Use at your own risk.

Buildroot has always been capable of using parallel build on a per +package basis: each package is built by Buildroot using make -jN (or +the equivalent invocation for non-make-based build systems). The level +of parallelism is by default number of CPUs + 1, but it can be +adjusted using the BR2_JLEVEL configuration option.

Until 2020.02, Buildroot was however building packages in a serial +fashion: each package was built one after the other, without +parallelization of the build between packages. As of 2020.02, +Buildroot has experimental support for top-level parallel build, +which allows some signicant build time savings by building packages +that have no dependency relationship in parallel. This feature is +however marked as experimental and is known not to work in some cases.

In order to use top-level parallel build, one must:

  1. +Enable the option BR2_PER_PACKAGE_DIRECTORIES in the Buildroot +configuration +
  2. +Use make -jN when starting the Buildroot build +

Internally, the BR2_PER_PACKAGE_DIRECTORIES will enable a mechanism +called per-package directories, which will have the following +effects:

  • +Instead of a global target directory and a global host directory + common to all packages, per-package target and host directories + will be used, in $(O)/per-package/<pkg>/target/ and + $(O)/per-package/<pkg>/host/ respectively. Those folders will be + populated from the corresponding folders of the package dependencies + at the beginning of <pkg> build. The compiler and all other tools + will therefore only be able to see and access files installed by + dependencies explicitly listed by <pkg>. +
  • +At the end of the build, the global target and host directories + will be populated, located in $(O)/target and $(O)/host + respectively. This means that during the build, those folders will + be empty and it’s only at the very end of the build that they will + be populated. +

8.12. Integration with Eclipse

While a part of the embedded Linux developers like classical text +editors like Vim or Emacs, and command-line based interfaces, a number +of other embedded Linux developers like richer graphical interfaces to +do their development work. Eclipse being one of the most popular +Integrated Development Environment, Buildroot integrates with Eclipse +in order to ease the development work of Eclipse users.

Our integration with Eclipse simplifies the compilation, remote +execution and remote debugging of applications and libraries that are +built on top of a Buildroot system. It does not integrate the +Buildroot configuration and build processes themselves with +Eclipse. Therefore, the typical usage model of our Eclipse integration +would be:

  • +Configure your Buildroot system with make menuconfig, make + xconfig or any other configuration interface provided with + Buildroot. +
  • +Build your Buildroot system by running make. +
  • +Start Eclipse to develop, execute and debug your own custom + applications and libraries, that will rely on the libraries built + and installed by Buildroot. +

The Buildroot Eclipse integration installation process and usage is +described in detail at +https://github.com/mbats/eclipse-buildroot-bundle/wiki.

8.13. Advanced usage

8.13.1. Using the generated toolchain outside Buildroot

You may want to compile, for your target, your own programs or other +software that are not packaged in Buildroot. In order to do this you +can use the toolchain that was generated by Buildroot.

The toolchain generated by Buildroot is located by default in +output/host/. The simplest way to use it is to add +output/host/bin/ to your PATH environment variable and then to +use ARCH-linux-gcc, ARCH-linux-objdump, ARCH-linux-ld, etc.

Alternatively, Buildroot can also export the toolchain and the development +files of all selected packages, as an SDK, by running the command +make sdk. This generates a tarball of the content of the host directory +output/host/, named <TARGET-TUPLE>_sdk-buildroot.tar.gz (which can be +overriden by setting the environment variable BR2_SDK_PREFIX) and +located in the output directory output/images/.

This tarball can then be distributed to application developers, when +they want to develop their applications that are not (yet) packaged as +a Buildroot package.

Upon extracting the SDK tarball, the user must run the script +relocate-sdk.sh (located at the top directory of the SDK), to make +sure all paths are updated with the new location.

Alternatively, if you just want to prepare the SDK without generating +the tarball (e.g. because you will just be moving the host directory, +or will be generating the tarball on your own), Buildroot also allows +you to just prepare the SDK with make prepare-sdk without actually +generating a tarball.

8.13.2. Using gdb in Buildroot

Buildroot allows to do cross-debugging, where the debugger runs on the +build machine and communicates with gdbserver on the target to +control the execution of the program.

To achieve this:

  • +If you are using an internal toolchain (built by Buildroot), you + must enable BR2_PACKAGE_HOST_GDB, BR2_PACKAGE_GDB and + BR2_PACKAGE_GDB_SERVER. This ensures that both the cross gdb and + gdbserver get built, and that gdbserver gets installed to your target. +
  • +If you are using an external toolchain, you should enable + BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY, which will copy the + gdbserver included with the external toolchain to the target. If your + external toolchain does not have a cross gdb or gdbserver, it is also + possible to let Buildroot build them, by enabling the same options as + for the internal toolchain backend. +

Now, to start debugging a program called foo, you should run on the +target:

gdbserver :2345 foo

This will cause gdbserver to listen on TCP port 2345 for a connection +from the cross gdb.

Then, on the host, you should start the cross gdb using the following +command line:

<buildroot>/output/host/bin/<tuple>-gdb -x <buildroot>/output/staging/usr/share/buildroot/gdbinit foo

Of course, foo must be available in the current directory, built +with debugging symbols. Typically you start this command from the +directory where foo is built (and not from output/target/ as the +binaries in that directory are stripped).

The <buildroot>/output/staging/usr/share/buildroot/gdbinit file will tell the +cross gdb where to find the libraries of the target.

Finally, to connect to the target from the cross gdb:

(gdb) target remote <target ip address>:2345

8.13.3. Using ccache in Buildroot

ccache is a compiler cache. It stores the +object files resulting from each compilation process, and is able to +skip future compilation of the same source file (with same compiler +and same arguments) by using the pre-existing object files. When doing +almost identical builds from scratch a number of times, it can nicely +speed up the build process.

ccache support is integrated in Buildroot. You just have to enable +Enable compiler cache in Build options. This will automatically +build ccache and use it for every host and target compilation.

The cache is located in $HOME/.buildroot-ccache. It is stored +outside of Buildroot output directory so that it can be shared by +separate Buildroot builds. If you want to get rid of the cache, simply +remove this directory.

You can get statistics on the cache (its size, number of hits, +misses, etc.) by running make ccache-stats.

The make target ccache-options and the CCACHE_OPTIONS variable +provide more generic access to the ccache. For example

# set cache limit size
+make CCACHE_OPTIONS="--max-size=5G" ccache-options
+
+# zero statistics counters
+make CCACHE_OPTIONS="--zero-stats" ccache-options

ccache makes a hash of the source files and of the compiler options. +If a compiler option is different, the cached object file will not be +used. Many compiler options, however, contain an absolute path to the +staging directory. Because of this, building in a different output +directory would lead to many cache misses.

To avoid this issue, buildroot has the Use relative paths option +(BR2_CCACHE_USE_BASEDIR). This will rewrite all absolute paths that +point inside the output directory into relative paths. Thus, changing +the output directory no longer leads to cache misses.

A disadvantage of the relative paths is that they also end up to be +relative paths in the object file. Therefore, for example, the debugger +will no longer find the file, unless you cd to the output directory +first.

See the +ccache manual’s section on "Compiling in different directories" for +more details about this rewriting of absolute paths.

8.13.4. Location of downloaded packages

The various tarballs that are downloaded by Buildroot are all stored +in BR2_DL_DIR, which by default is the dl directory. If you want +to keep a complete version of Buildroot which is known to be working +with the associated tarballs, you can make a copy of this directory. +This will allow you to regenerate the toolchain and the target +filesystem with exactly the same versions.

If you maintain several Buildroot trees, it might be better to have a +shared download location. This can be achieved by pointing the +BR2_DL_DIR environment variable to a directory. If this is +set, then the value of BR2_DL_DIR in the Buildroot configuration is +overridden. The following line should be added to <~/.bashrc>.

 export BR2_DL_DIR=<shared download location>

The download location can also be set in the .config file, with the +BR2_DL_DIR option. Unlike most options in the .config file, this value +is overridden by the BR2_DL_DIR environment variable.

8.13.5. Package-specific make targets

Running make <package> builds and installs that particular package +and its dependencies.

For packages relying on the Buildroot infrastructure, there are +numerous special make targets that can be called independently like +this:

make <package>-<target>

The package build targets are (in the order they are executed):

command/target Description

source

Fetch the source (download the tarball, clone +the source repository, etc)

depends

Build and install all dependencies required to +build the package

extract

Put the source in the package build directory +(extract the tarball, copy the source, etc)

patch

Apply the patches, if any

configure

Run the configure commands, if any

build

Run the compilation commands

install-staging

target package: Run the installation of the package in the +staging directory, if necessary

install-target

target package: Run the installation of the package in the +target directory, if necessary

install

target package: Run the 2 previous installation commands

+

host package: Run the installation of the package in the host +directory

Additionally, there are some other useful make targets:

command/target Description

show-depends

Displays the first-order dependencies required to build the +package

show-recursive-depends

Recursively displays the dependencies + required to build the package

show-rdepends

Displays the first-order reverse dependencies of + the package (i.e packages that directly depend on it)

show-recursive-rdepends

Recursively displays the reverse + dependencies of the package (i.e the packages that depend on it, + directly or indirectly)

graph-depends

Generate a dependency graph of the package, in the +context of the current Buildroot configuration. See +this section for more details about dependency +graphs.

graph-rdepends

Generate a graph of this package reverse + dependencies (i.e the packages that depend on it, directly or + indirectly)

dirclean

Remove the whole package build directory

reinstall

Re-run the install commands

rebuild

Re-run the compilation commands - this only makes +sense when using the OVERRIDE_SRCDIR feature or when you modified a file +directly in the build directory

reconfigure

Re-run the configure commands, then rebuild - this only +makes sense when using the OVERRIDE_SRCDIR feature or when you modified a +file directly in the build directory

8.13.6. Using Buildroot during development

The normal operation of Buildroot is to download a tarball, extract +it, configure, compile and install the software component found inside +this tarball. The source code is extracted in +output/build/<package>-<version>, which is a temporary directory: +whenever make clean is used, this directory is entirely removed, and +re-created at the next make invocation. Even when a Git or +Subversion repository is used as the input for the package source +code, Buildroot creates a tarball out of it, and then behaves as it +normally does with tarballs.

This behavior is well-suited when Buildroot is used mainly as an +integration tool, to build and integrate all the components of an +embedded Linux system. However, if one uses Buildroot during the +development of certain components of the system, this behavior is not +very convenient: one would instead like to make a small change to the +source code of one package, and be able to quickly rebuild the system +with Buildroot.

Making changes directly in output/build/<package>-<version> is not +an appropriate solution, because this directory is removed on make +clean.

Therefore, Buildroot provides a specific mechanism for this use case: +the <pkg>_OVERRIDE_SRCDIR mechanism. Buildroot reads an override +file, which allows the user to tell Buildroot the location of the +source for certain packages.

The default location of the override file is $(CONFIG_DIR)/local.mk, +as defined by the BR2_PACKAGE_OVERRIDE_FILE configuration option. +$(CONFIG_DIR) is the location of the Buildroot .config file, so +local.mk by default lives side-by-side with the .config file, +which means:

  • +In the top-level Buildroot source directory for in-tree builds + (i.e., when O= is not used) +
  • +In the out-of-tree directory for out-of-tree builds (i.e., when + O= is used) +

If a different location than these defaults is required, it can be +specified through the BR2_PACKAGE_OVERRIDE_FILE configuration +option.

In this override file, Buildroot expects to find lines of the form:

<pkg1>_OVERRIDE_SRCDIR = /path/to/pkg1/sources
+<pkg2>_OVERRIDE_SRCDIR = /path/to/pkg2/sources

For example:

LINUX_OVERRIDE_SRCDIR = /home/bob/linux/
+BUSYBOX_OVERRIDE_SRCDIR = /home/bob/busybox/

When Buildroot finds that for a given package, an +<pkg>_OVERRIDE_SRCDIR has been defined, it will no longer attempt to +download, extract and patch the package. Instead, it will directly use +the source code available in the specified directory and make clean +will not touch this directory. This allows to point Buildroot to your +own directories, that can be managed by Git, Subversion, or any other +version control system. To achieve this, Buildroot will use rsync to +copy the source code of the component from the specified +<pkg>_OVERRIDE_SRCDIR to output/build/<package>-custom/.

This mechanism is best used in conjunction with the make +<pkg>-rebuild and make <pkg>-reconfigure targets. A make +<pkg>-rebuild all sequence will rsync the source code from +<pkg>_OVERRIDE_SRCDIR to output/build/<package>-custom (thanks to +rsync, only the modified files are copied), and restart the build +process of just this package.

In the example of the linux package above, the developer can then +make a source code change in /home/bob/linux and then run:

make linux-rebuild all

and in a matter of seconds gets the updated Linux kernel image in +output/images. Similarly, a change can be made to the BusyBox source +code in /home/bob/busybox, and after:

make busybox-rebuild all

the root filesystem image in output/images contains the updated +BusyBox.

Source trees for big projects often contain hundreds or thousands of +files which are not needed for building, but will slow down the process +of copying the sources with rsync. Optionally, it is possible define +<pkg>_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS to skip syncing certain files +from the source tree. For example, when working on the webkitgtk +package, the following will exclude the tests and in-tree builds from +a local WebKit source tree:

WEBKITGTK_OVERRIDE_SRCDIR = /home/bob/WebKit
+WEBKITGTK_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = \
+        --exclude JSTests --exclude ManualTests --exclude PerformanceTests \
+        --exclude WebDriverTests --exclude WebKitBuild --exclude WebKitLibraries \
+        --exclude WebKit.xcworkspace --exclude Websites --exclude Examples

By default, Buildroot skips syncing of VCS artifacts (e.g., the .git and +.svn directories). Some packages prefer to have these VCS directories +available during build, for example for automatically determining a precise +commit reference for version information. To undo this built-in filtering at a +cost of a slower speed, add these directories back:

LINUX_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = --include .git

Chapter 9. Project-specific customization

Typical actions you may need to perform for a given project are:

  • +configuring Buildroot (including build options and toolchain, + bootloader, kernel, package and filesystem image type selection) +
  • +configuring other components, like the Linux kernel and BusyBox +
  • +customizing the generated target filesystem +

    • +adding or overwriting files on the target filesystem (using + BR2_ROOTFS_OVERLAY) +
    • +modifying or deleting files on the target filesystem (using + BR2_ROOTFS_POST_BUILD_SCRIPT) +
    • +running arbitrary commands prior to generating the filesystem image + (using BR2_ROOTFS_POST_BUILD_SCRIPT) +
    • +setting file permissions and ownership (using + BR2_ROOTFS_DEVICE_TABLE) +
    • +adding custom devices nodes (using + BR2_ROOTFS_STATIC_DEVICE_TABLE) +
  • +adding custom user accounts (using BR2_ROOTFS_USERS_TABLES) +
  • +running arbitrary commands after generating the filesystem image + (using BR2_ROOTFS_POST_IMAGE_SCRIPT) +
  • +adding project-specific patches to some packages (using + BR2_GLOBAL_PATCH_DIR) +
  • +adding project-specific packages +

An important note regarding such project-specific customizations: +please carefully consider which changes are indeed project-specific and +which changes are also useful to developers outside your project. The +Buildroot community highly recommends and encourages the upstreaming of +improvements, packages and board support to the official Buildroot +project. Of course, it is sometimes not possible or desirable to +upstream because the changes are highly specific or proprietary.

This chapter describes how to make such project-specific customizations +in Buildroot and how to store them in a way that you can build the same +image in a reproducible way, even after running make clean. By +following the recommended strategy, you can even use the same Buildroot +tree to build multiple distinct projects!

9.1. Recommended directory structure

When customizing Buildroot for your project, you will be creating one or +more project-specific files that need to be stored somewhere. While most +of these files could be placed in any location as their path is to be +specified in the Buildroot configuration, the Buildroot developers +recommend a specific directory structure which is described in this +section.

Orthogonal to this directory structure, you can choose where you place +this structure itself: either inside the Buildroot tree, or outside of +it using a br2-external tree. Both options are valid, the choice is up +to you.

+-- board/
+|   +-- <company>/
+|       +-- <boardname>/
+|           +-- linux.config
+|           +-- busybox.config
+|           +-- <other configuration files>
+|           +-- post_build.sh
+|           +-- post_image.sh
+|           +-- rootfs_overlay/
+|           |   +-- etc/
+|           |   +-- <some file>
+|           +-- patches/
+|               +-- foo/
+|               |   +-- <some patch>
+|               +-- libbar/
+|                   +-- <some other patches>
+|
++-- configs/
+|   +-- <boardname>_defconfig
+|
++-- package/
+|   +-- <company>/
+|       +-- Config.in (if not using a br2-external tree)
+|       +-- <company>.mk (if not using a br2-external tree)
+|       +-- package1/
+|       |    +-- Config.in
+|       |    +-- package1.mk
+|       +-- package2/
+|           +-- Config.in
+|           +-- package2.mk
+|
++-- Config.in (if using a br2-external tree)
++-- external.mk (if using a br2-external tree)
++-- external.desc (if using a br2-external tree)

Details on the files shown above are given further in this chapter.

Note: if you choose to place this structure outside of the Buildroot +tree but in a br2-external tree, the <company> and possibly <boardname> +components may be superfluous and can be left out.

9.1.1. Implementing layered customizations

It is quite common for a user to have several related projects that partly +need the same customizations. Instead of duplicating these +customizations for each project, it is recommended to use a layered +customization approach, as explained in this section.

Almost all of the customization methods available in Buildroot, like +post-build scripts and root filesystem overlays, accept a +space-separated list of items. The specified items are always treated in +order, from left to right. By creating more than one such item, one for +the common customizations and another one for the really +project-specific customizations, you can avoid unnecessary duplication. +Each layer is typically embodied by a separate directory inside +board/<company>/. Depending on your projects, you could even introduce +more than two layers.

An example directory structure for where a user has two customization +layers common and fooboard is:

+-- board/
+    +-- <company>/
+        +-- common/
+        |   +-- post_build.sh
+        |   +-- rootfs_overlay/
+        |   |   +-- ...
+        |   +-- patches/
+        |       +-- ...
+        |
+        +-- fooboard/
+            +-- linux.config
+            +-- busybox.config
+            +-- <other configuration files>
+            +-- post_build.sh
+            +-- rootfs_overlay/
+            |   +-- ...
+            +-- patches/
+                +-- ...

For example, if the user has the BR2_GLOBAL_PATCH_DIR configuration +option set as:

BR2_GLOBAL_PATCH_DIR="board/<company>/common/patches board/<company>/fooboard/patches"

then first the patches from the common layer would be applied, +followed by the patches from the fooboard layer.

9.2. Keeping customizations outside of Buildroot

As already briefly mentioned in Section 9.1, “Recommended directory structure”, you can +place project-specific customizations in two locations:

  • +directly within the Buildroot tree, typically maintaining them using + branches in a version control system so that upgrading to a newer + Buildroot release is easy. +
  • +outside of the Buildroot tree, using the br2-external mechanism. + This mechanism allows to keep package recipes, board support and + configuration files outside of the Buildroot tree, while still + having them nicely integrated in the build logic. We call this + location a br2-external tree. This section explains how to use + the br2-external mechanism and what to provide in a br2-external + tree. +

One can tell Buildroot to use one or more br2-external trees by setting +the BR2_EXTERNAL make variable set to the path(s) of the br2-external +tree(s) to use. It can be passed to any Buildroot make invocation. It +is automatically saved in the hidden .br2-external.mk file in the output +directory. Thanks to this, there is no need to pass BR2_EXTERNAL at +every make invocation. It can however be changed at any time by +passing a new value, and can be removed by passing an empty value.

Note. The path to a br2-external tree can be either absolute or relative. +If it is passed as a relative path, it is important to note that it is +interpreted relative to the main Buildroot source directory, not to +the Buildroot output directory.

Note: If using an br2-external tree from before Buildroot 2016.11, you need to +convert it before you can use it with Buildroot 2016.11 onward. See +Section 26.1, “Migrating to 2016.11” for help on doing so.

Some examples:

buildroot/ $ make BR2_EXTERNAL=/path/to/foo menuconfig

From now on, definitions from the /path/to/foo br2-external tree +will be used:

buildroot/ $ make
+buildroot/ $ make legal-info

We can switch to another br2-external tree at any time:

buildroot/ $ make BR2_EXTERNAL=/where/we/have/bar xconfig

We can also use multiple br2-external trees:

buildroot/ $ make BR2_EXTERNAL=/path/to/foo:/where/we/have/bar menuconfig

Or disable the usage of any br2-external tree:

buildroot/ $ make BR2_EXTERNAL= xconfig

9.2.1. Layout of a br2-external tree

A br2-external tree must contain at least those three files, described +in the following chapters:

  • +external.desc +
  • +external.mk +
  • +Config.in +

Apart from those mandatory files, there may be additional and optional +content that may be present in a br2-external tree, like the configs/ +or provides/ directories. They are described in the following chapters +as well.

A complete example br2-external tree layout is also described later.

The external.desc file

That file describes the br2-external tree: the name and description +for that br2-external tree.

The format for this file is line based, with each line starting by a +keyword, followed by a colon and one or more spaces, followed by the +value assigned to that keyword. There are two keywords currently +recognised:

  • +name, mandatory, defines the name for that br2-external tree. That + name must only use ASCII characters in the set [A-Za-z0-9_]; any + other character is forbidden. Buildroot sets the variable + BR2_EXTERNAL_$(NAME)_PATH to the absolute path of the br2-external + tree, so that you can use it to refer to your br2-external tree. This + variable is available both in Kconfig, so you can use it to source your + Kconfig files (see below) and in the Makefile, so that you can use it + to include other Makefiles (see below) or refer to other files (like + data files) from your br2-external tree. +

    Note: Since it is possible to use multiple br2-external trees at once, this + name is used by Buildroot to generate variables for each of those trees. + That name is used to identify your br2-external tree, so try to come up + with a name that really describes your br2-external tree, in order for + it to be relatively unique, so that it does not clash with another name + from another br2-external tree, especially if you are planning on + somehow sharing your br2-external tree with third parties or using + br2-external trees from third parties.

  • +desc, optional, provides a short description for that br2-external + tree. It shall fit on a single line, is mostly free-form (see below), + and is used when displaying information about a br2-external tree (e.g. + above the list of defconfig files, or as the prompt in the menuconfig); + as such, it should relatively brief (40 chars is probably a good upper + limit). The description is available in the BR2_EXTERNAL_$(NAME)_DESC + variable. +

Examples of names and the corresponding BR2_EXTERNAL_$(NAME)_PATH +variables:

  • +FOOBR2_EXTERNAL_FOO_PATH +
  • +BAR_42BR2_EXTERNAL_BAR_42_PATH +

In the following examples, it is assumed the name to be set to BAR_42.

Note: Both BR2_EXTERNAL_$(NAME)_PATH and BR2_EXTERNAL_$(NAME)_DESC are + available in the Kconfig files and the Makefiles. They are also + exported in the environment so are available in post-build, post-image + and in-fakeroot scripts.

The Config.in and external.mk files

Those files (which may each be empty) can be used to define package +recipes (i.e. foo/Config.in and foo/foo.mk like for packages bundled +in Buildroot itself) or other custom configuration options or make logic.

Buildroot automatically includes the Config.in from each br2-external +tree to make it appear in the top-level configuration menu, and includes +the external.mk from each br2-external tree with the rest of the +makefile logic.

The main usage of this is to store package recipes. The recommended way +to do this is to write a Config.in file that looks like:

source "$BR2_EXTERNAL_BAR_42_PATH/package/package1/Config.in"
+source "$BR2_EXTERNAL_BAR_42_PATH/package/package2/Config.in"

Then, have an external.mk file that looks like:

include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk))

And then in $(BR2_EXTERNAL_BAR_42_PATH)/package/package1 and +$(BR2_EXTERNAL_BAR_42_PATH)/package/package2 create normal +Buildroot package recipes, as explained in Chapter 17, Adding new packages to Buildroot. +If you prefer, you can also group the packages in subdirectories +called <boardname> and adapt the above paths accordingly.

You can also define custom configuration options in Config.in and +custom make logic in external.mk.

The configs/ directory

One can store Buildroot defconfigs in the configs subdirectory of +the br2-external tree. Buildroot will automatically show them in the +output of make list-defconfigs and allow them to be loaded with the +normal make <name>_defconfig command. They will be visible in the +make list-defconfigs output, below an External configs label that +contains the name of the br2-external tree they are defined in.

Note: If a defconfig file is present in more than one br2-external tree, then +the one from the last br2-external tree is used. It is thus possible +to override a defconfig bundled in Buildroot or another br2-external +tree.

The provides/ directory

For some packages, Buildroot provides a choice between two (or more) +implementations of API-compatible such packages. For example, there is +a choice to choose either libjpeg ot jpeg-turbo, and another choice +between openssl or libressl. Finally, there is a choice to select one +of the known, pre-configured toolchains.

It is possible for a br2-external to extend those choices, by providing +a set of files that define those alternatives:

  • +provides/toolchains.in defines the pre-configured toolchains, which + will then be listed in the toolchain selection; +
  • +provides/jpeg.in defines the alternative libjpeg implementations; +
  • +provides/openssl.in defines the alternative openssl implementations. +

Free-form content

One can store all the board-specific configuration files there, such +as the kernel configuration, the root filesystem overlay, or any other +configuration file for which Buildroot allows to set the location (by +using the BR2_EXTERNAL_$(NAME)_PATH variable). For example, you +could set the paths to a global patch directory, to a rootfs overlay +and to the kernel configuration file as follows (e.g. by running +make menuconfig and filling in these options):

BR2_GLOBAL_PATCH_DIR=$(BR2_EXTERNAL_BAR_42_PATH)/patches/
+BR2_ROOTFS_OVERLAY=$(BR2_EXTERNAL_BAR_42_PATH)/board/<boardname>/overlay/
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=$(BR2_EXTERNAL_BAR_42_PATH)/board/<boardname>/kernel.config

Additional Linux kernel extensions

Additional Linux kernel extensions (see Section 17.21.2, “linux-kernel-extensions”) can +be added by storing them in the linux/ directory at the root of a +br2-external tree.

Example layout

Here is an example layout using all features of br2-external (the sample +content is shown for the file above it, when it is relevant to explain +the br2-external tree; this is all entirely made up just for the sake of +illustration, of course):

/path/to/br2-ext-tree/
+  |- external.desc
+  |     |name: BAR_42
+  |     |desc: Example br2-external tree
+  |     `----
+  |
+  |- Config.in
+  |     |source "$BR2_EXTERNAL_BAR_42_PATH/toolchain/toolchain-external-mine/Config.in.options"
+  |     |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-1/Config.in"
+  |     |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-2/Config.in"
+  |     |source "$BR2_EXTERNAL_BAR_42_PATH/package/my-jpeg/Config.in"
+  |     |
+  |     |config BAR_42_FLASH_ADDR
+  |     |    hex "my-board flash address"
+  |     |    default 0x10AD
+  |     `----
+  |
+  |- external.mk
+  |     |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk))
+  |     |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/toolchain/*/*.mk))
+  |     |
+  |     |flash-my-board:
+  |     |    $(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/flash-image \
+  |     |        --image $(BINARIES_DIR)/image.bin \
+  |     |        --address $(BAR_42_FLASH_ADDR)
+  |     `----
+  |
+  |- package/pkg-1/Config.in
+  |     |config BR2_PACKAGE_PKG_1
+  |     |    bool "pkg-1"
+  |     |    help
+  |     |      Some help about pkg-1
+  |     `----
+  |- package/pkg-1/pkg-1.hash
+  |- package/pkg-1/pkg-1.mk
+  |     |PKG_1_VERSION = 1.2.3
+  |     |PKG_1_SITE = /some/where/to/get/pkg-1
+  |     |PKG_1_LICENSE = blabla
+  |     |
+  |     |define PKG_1_INSTALL_INIT_SYSV
+  |     |    $(INSTALL) -D -m 0755 $(PKG_1_PKGDIR)/S99my-daemon \
+  |     |                          $(TARGET_DIR)/etc/init.d/S99my-daemon
+  |     |endef
+  |     |
+  |     |$(eval $(autotools-package))
+  |     `----
+  |- package/pkg-1/S99my-daemon
+  |
+  |- package/pkg-2/Config.in
+  |- package/pkg-2/pkg-2.hash
+  |- package/pkg-2/pkg-2.mk
+  |
+  |- provides/jpeg.in
+  |     |config BR2_PACKAGE_MY_JPEG
+  |     |    bool "my-jpeg"
+  |     `----
+  |- package/my-jpeg/Config.in
+  |     |config BR2_PACKAGE_PROVIDES_JPEG
+  |     |    default "my-jpeg" if BR2_PACKAGE_MY_JPEG
+  |     `----
+  |- package/my-jpeg/my-jpeg.mk
+  |     |# This is a normal package .mk file
+  |     |MY_JPEG_VERSION = 1.2.3
+  |     |MY_JPEG_SITE = https://example.net/some/place
+  |     |MY_JPEG_PROVIDES = jpeg
+  |     |$(eval $(autotools-package))
+  |     `----
+  |
+  |- provides/toolchains.in
+  |     |config BR2_TOOLCHAIN_EXTERNAL_MINE
+  |     |    bool "my custom toolchain"
+  |     |    depends on BR2_some_arch
+  |     |    select BR2_INSTALL_LIBSTDCPP
+  |     `----
+  |- toolchain/toolchain-external-mine/Config.in.options
+  |     |if BR2_TOOLCHAIN_EXTERNAL_MINE
+  |     |config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+  |     |    default "arch-mine-linux-gnu"
+  |     |config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+  |     |    default "toolchain-external-mine"
+  |     |endif
+  |     `----
+  |- toolchain/toolchain-external-mine/toolchain-external-mine.mk
+  |     |TOOLCHAIN_EXTERNAL_MINE_SITE = https://example.net/some/place
+  |     |TOOLCHAIN_EXTERNAL_MINE_SOURCE = my-toolchain.tar.gz
+  |     |$(eval $(toolchain-external-package))
+  |     `----
+  |
+  |- linux/Config.ext.in
+  |     |config BR2_LINUX_KERNEL_EXT_EXAMPLE_DRIVER
+  |     |    bool "example-external-driver"
+  |     |    help
+  |     |      Example external driver
+  |     |---
+  |- linux/linux-ext-example-driver.mk
+  |
+  |- configs/my-board_defconfig
+  |     |BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BAR_42_PATH)/patches/"
+  |     |BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/overlay/"
+  |     |BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/post-image.sh"
+  |     |BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/kernel.config"
+  |     `----
+  |
+  |- patches/linux/0001-some-change.patch
+  |- patches/linux/0002-some-other-change.patch
+  |- patches/busybox/0001-fix-something.patch
+  |
+  |- board/my-board/kernel.config
+  |- board/my-board/overlay/var/www/index.html
+  |- board/my-board/overlay/var/www/my.css
+  |- board/my-board/flash-image
+  `- board/my-board/post-image.sh
+        |#!/bin/sh
+        |generate-my-binary-image \
+        |    --root ${BINARIES_DIR}/rootfs.tar \
+        |    --kernel ${BINARIES_DIR}/zImage \
+        |    --dtb ${BINARIES_DIR}/my-board.dtb \
+        |    --output ${BINARIES_DIR}/image.bin
+        `----

The br2-external tree will then be visible in the menuconfig (with +the layout expanded):

External options  --->
+    *** Example br2-external tree (in /path/to/br2-ext-tree/)
+    [ ] pkg-1
+    [ ] pkg-2
+    (0x10AD) my-board flash address

If you are using more than one br2-external tree, it would look like +(with the layout expanded and the second one with name FOO_27 but no +desc: field in external.desc):

External options  --->
+    Example br2-external tree  --->
+        *** Example br2-external tree (in /path/to/br2-ext-tree)
+        [ ] pkg-1
+        [ ] pkg-2
+        (0x10AD) my-board flash address
+    FOO_27  --->
+        *** FOO_27 (in /path/to/another-br2-ext)
+        [ ] foo
+        [ ] bar

Additionally, the jpeg provider will be visible in the jpeg choice:

Target packages  --->
+    Libraries  --->
+        Graphics  --->
+            [*] jpeg support
+                jpeg variant ()  --->
+                    ( ) jpeg
+                    ( ) jpeg-turbo
+                        *** jpeg from: Example br2-external tree ***
+                    (X) my-jpeg
+                        *** jpeg from: FOO_27 ***
+                    ( ) another-jpeg

And similarly for the toolchains:

Toolchain  --->
+    Toolchain ()  --->
+        ( ) Custom toolchain
+            *** Toolchains from: Example br2-external tree ***
+        (X) my custom toolchain

Note. The toolchain options in toolchain/toolchain-external-mine/Config.in.options +will not appear in the Toolchain menu. They must be explicitly included +from within the br2-external’s top-level Config.in and will thus appear +in the External options menu.

9.3. Storing the Buildroot configuration

The Buildroot configuration can be stored using the command + make savedefconfig.

This strips the Buildroot configuration down by removing configuration +options that are at their default value. The result is stored in a file +called defconfig. If you want to save it in another place, change the +BR2_DEFCONFIG option in the Buildroot configuration itself, or call +make with make savedefconfig BR2_DEFCONFIG=<path-to-defconfig>.

The recommended place to store this defconfig is +configs/<boardname>_defconfig. If you follow this recommendation, the +configuration will be listed in make help and can be set again by +running make <boardname>_defconfig.

Alternatively, you can copy the file to any other place and rebuild with +make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>.

9.4. Storing the configuration of other components

The configuration files for BusyBox, the Linux kernel, Barebox, U-Boot +and uClibc should be stored as well if changed. For each of these +components, a Buildroot configuration option exists to point to an input +configuration file, e.g. BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE. To store +their configuration, set these configuration options to a path where you +want to save the configuration files, and then use the helper targets +described below to actually store the configuration.

As explained in Section 9.1, “Recommended directory structure”, the recommended path to +store these configuration files is +board/<company>/<boardname>/foo.config.

Make sure that you create a configuration file before changing +the BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE etc. options. Otherwise, +Buildroot will try to access this config file, which doesn’t exist +yet, and will fail. You can create the configuration file by running +make linux-menuconfig etc.

Buildroot provides a few helper targets to make the saving of +configuration files easier.

  • +make linux-update-defconfig saves the linux configuration to the + path specified by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE. It + simplifies the config file by removing default values. However, + this only works with kernels starting from 2.6.33. For earlier + kernels, use make linux-update-config. +
  • +make busybox-update-config saves the busybox configuration to the + path specified by BR2_PACKAGE_BUSYBOX_CONFIG. +
  • +make uclibc-update-config saves the uClibc configuration to the + path specified by BR2_UCLIBC_CONFIG. +
  • +make barebox-update-defconfig saves the barebox configuration to the + path specified by BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE. +
  • +make uboot-update-defconfig saves the U-Boot configuration to the + path specified by BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE. +
  • +For at91bootstrap3, no helper exists so you have to copy the config + file manually to BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE. +

9.5. Customizing the generated target filesystem

Besides changing the configuration through make *config, +there are a few other ways to customize the resulting target filesystem.

The two recommended methods, which can co-exist, are root filesystem +overlay(s) and post build script(s).

+Root filesystem overlays (BR2_ROOTFS_OVERLAY) +

A filesystem overlay is a tree of files that is copied directly + over the target filesystem after it has been built. To enable this + feature, set config option BR2_ROOTFS_OVERLAY (in the System + configuration menu) to the root of the overlay. You can even specify + multiple overlays, space-separated. If you specify a relative path, + it will be relative to the root of the Buildroot tree. Hidden + directories of version control systems, like .git, .svn, .hg, + etc., files called .empty and files ending in ~ are excluded from + the copy.

When BR2_ROOTFS_MERGED_USR is enabled, then the overlay must not + contain the /bin, /lib or /sbin directories, as Buildroot will + create them as symbolic links to the relevant folders in /usr. In + such a situation, should the overlay have any programs or libraries, + they should be placed in /usr/bin, /usr/sbin and /usr/lib.

As shown in Section 9.1, “Recommended directory structure”, the recommended path for + this overlay is board/<company>/<boardname>/rootfs-overlay.

+Post-build scripts (BR2_ROOTFS_POST_BUILD_SCRIPT) +

Post-build scripts are shell scripts called after Buildroot builds + all the selected software, but before the rootfs images are + assembled. To enable this feature, specify a space-separated list of + post-build scripts in config option BR2_ROOTFS_POST_BUILD_SCRIPT (in + the System configuration menu). If you specify a relative path, it + will be relative to the root of the Buildroot tree.

Using post-build scripts, you can remove or modify any file in your + target filesystem. You should, however, use this feature with care. + Whenever you find that a certain package generates wrong or unneeded + files, you should fix that package rather than work around it with some + post-build cleanup scripts.

As shown in Section 9.1, “Recommended directory structure”, the recommended path for + this script is board/<company>/<boardname>/post_build.sh.

The post-build scripts are run with the main Buildroot tree as current + working directory. The path to the target filesystem is passed as the + first argument to each script. If the config option + BR2_ROOTFS_POST_SCRIPT_ARGS is not empty, these arguments will be + passed to the script too. All the scripts will be passed the exact + same set of arguments, it is not possible to pass different sets of + arguments to each script.

In addition, you may also use these environment variables:

  • +BR2_CONFIG: the path to the Buildroot .config file +
  • +HOST_DIR, STAGING_DIR, TARGET_DIR: see + Section 17.5.2, “generic-package reference” +
  • +BUILD_DIR: the directory where packages are extracted and built +
  • +BINARIES_DIR: the place where all binary files (aka images) are + stored +
  • +BASE_DIR: the base output directory +

Below three more methods of customizing the target filesystem are +described, but they are not recommended.

+Direct modification of the target filesystem +

For temporary modifications, you can modify the target filesystem + directly and rebuild the image. The target filesystem is available + under output/target/. After making your changes, run make to + rebuild the target filesystem image.

This method allows you to do anything to the target filesystem, but if + you need to clean your Buildroot tree using make clean, these + changes will be lost. Such cleaning is necessary in several cases, + refer to Section 8.2, “Understanding when a full rebuild is necessary” for details. This solution is therefore + only useful for quick tests: changes do not survive the make clean + command. Once you have validated your changes, you should make sure + that they will persist after a make clean, using a root filesystem + overlay or a post-build script.

+Custom target skeleton (BR2_ROOTFS_SKELETON_CUSTOM) +

The root filesystem image is created from a target skeleton, on top of + which all packages install their files. The skeleton is copied to the + target directory output/target before any package is built and + installed. The default target skeleton provides the standard Unix + filesystem layout and some basic init scripts and configuration files.

If the default skeleton (available under system/skeleton) does not + match your needs, you would typically use a root filesystem overlay or + post-build script to adapt it. However, if the default skeleton is + entirely different than what you need, using a custom skeleton may be + more suitable.

To enable this feature, enable config option + BR2_ROOTFS_SKELETON_CUSTOM and set BR2_ROOTFS_SKELETON_CUSTOM_PATH + to the path of your custom skeleton. Both options are available in the + System configuration menu. If you specify a relative path, it will + be relative to the root of the Buildroot tree.

Custom skeletons don’t need to contain the /bin, /lib or /sbin + directories, since they are created automatically during the build. + When BR2_ROOTFS_MERGED_USR is enabled, then the custom skeleton must + not contain the /bin, /lib or /sbin directories, as Buildroot + will create them as symbolic links to the relevant folders in /usr. + In such a situation, should the skeleton have any programs or + libraries, they should be placed in /usr/bin, /usr/sbin and + /usr/lib.

This method is not recommended because it duplicates the entire + skeleton, which prevents taking advantage of the fixes or improvements + brought to the default skeleton in later Buildroot releases.

+Post-fakeroot scripts (BR2_ROOTFS_POST_FAKEROOT_SCRIPT) +

When aggregating the final images, some parts of the process requires + root rights: creating device nodes in /dev, setting permissions or + ownership to files and directories… To avoid requiring actual root + rights, Buildroot uses fakeroot to simulate root rights. This is not + a complete substitute for actually being root, but is enough for what + Buildroot needs.

Post-fakeroot scripts are shell scripts that are called at the end of + the fakeroot phase, right before the filesystem image generator is + called. As such, they are called in the fakeroot context.

Post-fakeroot scripts can be useful in case you need to tweak the + filesystem to do modifications that are usually only available to the + root user.

Note: It is recommended to use the existing mechanisms to set file permissions + or create entries in /dev (see Section 9.5.1, “Setting file permissions and ownership and adding custom devices nodes”) or + to create users (see Section 9.6, “Adding custom user accounts”)

Note: The difference between post-build scripts (above) and fakeroot scripts, + is that post-build scripts are not called in the fakeroot context.

Note: Using fakeroot is not an absolute substitute for actually being root. + fakeroot only ever fakes the file access rights and types (regular, + block-or-char device…) and uid/gid; these are emulated in-memory.

9.5.1. Setting file permissions and ownership and adding custom devices nodes

Sometimes it is needed to set specific permissions or ownership on files +or device nodes. For example, certain files may need to be owned by +root. Since the post-build scripts are not run as root, you cannot do +such changes from there unless you use an explicit fakeroot from the +post-build script.

Instead, Buildroot provides support for so-called permission tables. +To use this feature, set config option BR2_ROOTFS_DEVICE_TABLE to a +space-separated list of permission tables, regular text files following +the makedev syntax.

If you are using a static device table (i.e. not using devtmpfs, +mdev, or (e)udev) then you can add device nodes using the same +syntax, in so-called device tables. To use this feature, set config +option BR2_ROOTFS_STATIC_DEVICE_TABLE to a space-separated list of +device tables.

As shown in Section 9.1, “Recommended directory structure”, the recommended location for +such files is board/<company>/<boardname>/.

It should be noted that if the specific permissions or device nodes are +related to a specific application, you should set variables +FOO_PERMISSIONS and FOO_DEVICES in the package’s .mk file instead +(see Section 17.5.2, “generic-package reference”).

9.6. Adding custom user accounts

Sometimes it is needed to add specific users in the target system. +To cover this requirement, Buildroot provides support for so-called +users tables. To use this feature, set config option +BR2_ROOTFS_USERS_TABLES to a space-separated list of users tables, +regular text files following the makeusers syntax.

As shown in Section 9.1, “Recommended directory structure”, the recommended location for +such files is board/<company>/<boardname>/.

It should be noted that if the custom users are related to a specific +application, you should set variable FOO_USERS in the package’s .mk +file instead (see Section 17.5.2, “generic-package reference”).

9.7. Customization after the images have been created

While post-build scripts (Section 9.5, “Customizing the generated target filesystem”) are run before +building the filesystem image, kernel and bootloader, post-image +scripts can be used to perform some specific actions after all images +have been created.

Post-image scripts can for example be used to automatically extract your +root filesystem tarball in a location exported by your NFS server, or +to create a special firmware image that bundles your root filesystem and +kernel image, or any other custom action required for your project.

To enable this feature, specify a space-separated list of post-image +scripts in config option BR2_ROOTFS_POST_IMAGE_SCRIPT (in the System +configuration menu). If you specify a relative path, it will be +relative to the root of the Buildroot tree.

Just like post-build scripts, post-image scripts are run with the main +Buildroot tree as current working directory. The path to the images +output directory is passed as the first argument to each script. If the +config option BR2_ROOTFS_POST_SCRIPT_ARGS is not empty, these +arguments will be passed to the script too. All the scripts will be +passed the exact same set of arguments, it is not possible to pass +different sets of arguments to each script.

Again just like for the post-build scripts, the scripts have access to +the environment variables BR2_CONFIG, HOST_DIR, STAGING_DIR, +TARGET_DIR, BUILD_DIR, BINARIES_DIR and BASE_DIR.

The post-image scripts will be executed as the user that executes +Buildroot, which should normally not be the root user. Therefore, any +action requiring root permissions in one of these scripts will require +special handling (usage of fakeroot or sudo), which is left to the +script developer.

9.8. Adding project-specific patches

It is sometimes useful to apply extra patches to packages - on top of +those provided in Buildroot. This might be used to support custom +features in a project, for example, or when working on a new +architecture.

The BR2_GLOBAL_PATCH_DIR configuration option can be used to specify +a space separated list of one or more directories containing package +patches.

For a specific version <packageversion> of a specific package +<packagename>, patches are applied from BR2_GLOBAL_PATCH_DIR as +follows:

  1. +For every directory - <global-patch-dir> - that exists in + BR2_GLOBAL_PATCH_DIR, a <package-patch-dir> will be determined as + follows: +

    • +<global-patch-dir>/<packagename>/<packageversion>/ if the + directory exists. +
    • +Otherwise, <global-patch-dir>/<packagename> if the directory + exists. +
  2. +Patches will then be applied from a <package-patch-dir> as + follows: +

    • +If a series file exists in the package directory, then patches are + applied according to the series file; +
    • +Otherwise, patch files matching *.patch are applied in + alphabetical order. So, to ensure they are applied in the right + order, it is highly recommended to name the patch files like this: + <number>-<description>.patch, where <number> refers to the + apply order. +

For information about how patches are applied for a package, see +Section 18.2, “How patches are applied”

The BR2_GLOBAL_PATCH_DIR option is the preferred method for +specifying a custom patch directory for packages. It can be used to +specify a patch directory for any package in buildroot. It should also +be used in place of the custom patch directory options that are +available for packages such as U-Boot and Barebox. By doing this, it +will allow a user to manage their patches from one top-level +directory.

The exception to BR2_GLOBAL_PATCH_DIR being the preferred method for +specifying custom patches is BR2_LINUX_KERNEL_PATCH. +BR2_LINUX_KERNEL_PATCH should be used to specify kernel patches that +are available at a URL. Note: BR2_LINUX_KERNEL_PATCH specifies kernel +patches that are applied after patches available in BR2_GLOBAL_PATCH_DIR, +as it is done from a post-patch hook of the Linux package.

9.9. Adding project-specific packages

In general, any new package should be added directly in the package +directory and submitted to the Buildroot upstream project. How to add +packages to Buildroot in general is explained in full detail in +Chapter 17, Adding new packages to Buildroot and will not be repeated here. However, your +project may need some proprietary packages that cannot be upstreamed. +This section will explain how you can keep such project-specific +packages in a project-specific directory.

As shown in Section 9.1, “Recommended directory structure”, the recommended location for +project-specific packages is package/<company>/. If you are using the +br2-external tree feature (see Section 9.2, “Keeping customizations outside of Buildroot”) the recommended +location is to put them in a sub-directory named package/ in your +br2-external tree.

However, Buildroot will not be aware of the packages in this location, +unless we perform some additional steps. As explained in +Chapter 17, Adding new packages to Buildroot, a package in Buildroot basically consists of two +files: a .mk file (describing how to build the package) and a +Config.in file (describing the configuration options for this +package).

Buildroot will automatically include the .mk files in first-level +subdirectories of the package directory (using the pattern +package/*/*.mk). If we want Buildroot to include .mk files from +deeper subdirectories (like package/<company>/package1/) then we +simply have to add a .mk file in a first-level subdirectory that +includes these additional .mk files. Therefore, create a file +package/<company>/<company>.mk with following contents (assuming you +have only one extra directory level below package/<company>/):

include $(sort $(wildcard package/<company>/*/*.mk))

For the Config.in files, create a file package/<company>/Config.in +that includes the Config.in files of all your packages. An exhaustive +list has to be provided since wildcards are not supported in the source command of kconfig. +For example:

source "package/<company>/package1/Config.in"
+source "package/<company>/package2/Config.in"

Include this new file package/<company>/Config.in from +package/Config.in, preferably in a company-specific menu to make +merges with future Buildroot versions easier.

If using a br2-external tree, refer to Section 9.2, “Keeping customizations outside of Buildroot” for how +to fill in those files.

9.10. Quick guide to storing your project-specific customizations

Earlier in this chapter, the different methods for making +project-specific customizations have been described. This section will +now summarize all this by providing step-by-step instructions to storing your +project-specific customizations. Clearly, the steps that are not relevant to +your project can be skipped.

  1. +make menuconfig to configure toolchain, packages and kernel. +
  2. +make linux-menuconfig to update the kernel config, similar for + other configuration like busybox, uclibc, … +
  3. +mkdir -p board/<manufacturer>/<boardname> +
  4. +Set the following options to board/<manufacturer>/<boardname>/<package>.config + (as far as they are relevant): +

    • +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE +
    • +BR2_PACKAGE_BUSYBOX_CONFIG +
    • +BR2_UCLIBC_CONFIG +
    • +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE +
    • +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE +
    • +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE +
  5. +Write the configuration files: +

    • +make linux-update-defconfig +
    • +make busybox-update-config +
    • +make uclibc-update-config +
    • +cp <output>/build/at91bootstrap3-*/.config + board/<manufacturer>/<boardname>/at91bootstrap3.config +
    • +make barebox-update-defconfig +
    • +make uboot-update-defconfig +
  6. +Create board/<manufacturer>/<boardname>/rootfs-overlay/ and fill it + with additional files you need on your rootfs, e.g. + board/<manufacturer>/<boardname>/rootfs-overlay/etc/inittab. + Set BR2_ROOTFS_OVERLAY + to board/<manufacturer>/<boardname>/rootfs-overlay. +
  7. +Create a post-build script + board/<manufacturer>/<boardname>/post_build.sh. Set + BR2_ROOTFS_POST_BUILD_SCRIPT to + board/<manufacturer>/<boardname>/post_build.sh +
  8. +If additional setuid permissions have to be set or device nodes have + to be created, create board/<manufacturer>/<boardname>/device_table.txt + and add that path to BR2_ROOTFS_DEVICE_TABLE. +
  9. +If additional user accounts have to be created, create + board/<manufacturer>/<boardname>/users_table.txt and add that path + to BR2_ROOTFS_USERS_TABLES. +
  10. +To add custom patches to certain packages, set BR2_GLOBAL_PATCH_DIR + to board/<manufacturer>/<boardname>/patches/ and add your patches + for each package in a subdirectory named after the package. Each + patch should be called <packagename>-<num>-<description>.patch. +
  11. +Specifically for the Linux kernel, there also exists the option + BR2_LINUX_KERNEL_PATCH with as main advantage that it can also + download patches from a URL. If you do not need this, + BR2_GLOBAL_PATCH_DIR is preferred. U-Boot, Barebox, at91bootstrap + and at91bootstrap3 also have separate options, but these do not + provide any advantage over BR2_GLOBAL_PATCH_DIR and will likely be + removed in the future. +
  12. +If you need to add project-specific packages, create + package/<manufacturer>/ and place your packages in that + directory. Create an overall <manufacturer>.mk file that + includes the .mk files of all your packages. Create an overall + Config.in file that sources the Config.in files of all your + packages. Include this Config.in file from Buildroot’s + package/Config.in file. +
  13. +make savedefconfig to save the buildroot configuration. +
  14. +cp defconfig configs/<boardname>_defconfig +

Chapter 10. Frequently Asked Questions & Troubleshooting

10.1. The boot hangs after Starting network…

If the boot process seems to hang after the following messages +(messages not necessarily exactly similar, depending on the list of +packages selected):

Freeing init memory: 3972K
+Initializing random number generator... done.
+Starting network...
+Starting dropbear sshd: generating rsa key... generating dsa key... OK

then it means that your system is running, but didn’t start a shell on +the serial console. In order to have the system start a shell on your +serial console, you have to go into the Buildroot configuration, in +System configuration, modify Run a getty (login prompt) after boot +and set the appropriate port and baud rate in the getty options +submenu. This will automatically tune the /etc/inittab file of the +generated system so that a shell starts on the correct serial port.

10.2. Why is there no compiler on the target?

It has been decided that support for the native compiler on the +target would be stopped from the Buildroot-2012.11 release because:

  • +this feature was neither maintained nor tested, and often broken; +
  • +this feature was only available for Buildroot toolchains; +
  • +Buildroot mostly targets small or very small target hardware + with limited resource onboard (CPU, ram, mass-storage), for which + compiling on the target does not make much sense; +
  • +Buildroot aims at easing the cross-compilation, making native + compilation on the target unnecessary. +

If you need a compiler on your target anyway, then Buildroot is not +suitable for your purpose. In such case, you need a real +distribution and you should opt for something like:

10.3. Why are there no development files on the target?

Since there is no compiler available on the target (see +Section 10.2, “Why is there no compiler on the target?”), it does not make sense to waste +space with headers or static libraries.

Therefore, those files are always removed from the target since the +Buildroot-2012.11 release.

10.4. Why is there no documentation on the target?

Because Buildroot mostly targets small or very small target +hardware with limited resource onboard (CPU, ram, mass-storage), it +does not make sense to waste space with the documentation data.

If you need documentation data on your target anyway, then Buildroot +is not suitable for your purpose, and you should look for a real +distribution (see: Section 10.2, “Why is there no compiler on the target?”).

10.5. Why are some packages not visible in the Buildroot config menu?

If a package exists in the Buildroot tree and does not appear in the +config menu, this most likely means that some of the package’s +dependencies are not met.

To know more about the dependencies of a package, search for the +package symbol in the config menu (see Section 8.1, “make tips”).

Then, you may have to recursively enable several options (which +correspond to the unmet dependencies) to finally be able to select +the package.

If the package is not visible due to some unmet toolchain options, +then you should certainly run a full rebuild (see Section 8.1, “make tips” for +more explanations).

10.6. Why not use the target directory as a chroot directory?

There are plenty of reasons to not use the target directory a chroot +one, among these:

  • +file ownerships, modes and permissions are not correctly set in the + target directory; +
  • +device nodes are not created in the target directory. +

For these reasons, commands run through chroot, using the target +directory as the new root, will most likely fail.

If you want to run the target filesystem inside a chroot, or as an NFS +root, then use the tarball image generated in images/ and extract it +as root.

10.7. Why doesn’t Buildroot generate binary packages (.deb, .ipkg…)?

One feature that is often discussed on the Buildroot list is the +general topic of "package management". To summarize, the idea +would be to add some tracking of which Buildroot package installs +what files, with the goals of:

  • +being able to remove files installed by a package when this package + gets unselected from the menuconfig; +
  • +being able to generate binary packages (ipk or other format) that + can be installed on the target without re-generating a new root + filesystem image. +

In general, most people think it is easy to do: just track which package +installed what and remove it when the package is unselected. However, it +is much more complicated than that:

  • +It is not only about the target/ directory, but also the sysroot in + host/<tuple>/sysroot and the host/ directory itself. All files + installed in those directories by various packages must be tracked. +
  • +When a package is unselected from the configuration, it is not + sufficient to remove just the files it installed. One must also + remove all its reverse dependencies (i.e. packages relying on it) + and rebuild all those packages. For example, package A depends + optionally on the OpenSSL library. Both are selected, and Buildroot + is built. Package A is built with crypto support using OpenSSL. + Later on, OpenSSL gets unselected from the configuration, but + package A remains (since OpenSSL is an optional dependency, this + is possible.) If only OpenSSL files are removed, then the files + installed by package A are broken: they use a library that is no + longer present on the target. Although this is technically doable, + it adds a lot of complexity to Buildroot, which goes against the + simplicity we try to stick to. +
  • +In addition to the previous problem, there is the case where the + optional dependency is not even known to Buildroot. For example, + package A in version 1.0 never used OpenSSL, but in version 2.0 it + automatically uses OpenSSL if available. If the Buildroot .mk file + hasn’t been updated to take this into account, then package A will + not be part of the reverse dependencies of OpenSSL and will not be + removed and rebuilt when OpenSSL is removed. For sure, the .mk file + of package A should be fixed to mention this optional dependency, + but in the mean time, you can have non-reproducible behaviors. +
  • +The request is to also allow changes in the menuconfig to be + applied on the output directory without having to rebuild + everything from scratch. However, this is very difficult to achieve + in a reliable way: what happens when the suboptions of a package + are changed (we would have to detect this, and rebuild the package + from scratch and potentially all its reverse dependencies), what + happens if toolchain options are changed, etc. At the moment, what + Buildroot does is clear and simple so its behaviour is very + reliable and it is easy to support users. If configuration changes + done in menuconfig are applied after the next make, then it has to + work correctly and properly in all situations, and not have some + bizarre corner cases. The risk is to get bug reports like "I have + enabled package A, B and C, then ran make, then disabled package + C and enabled package D and ran make, then re-enabled package C + and enabled package E and then there is a build failure". Or worse + "I did some configuration, then built, then did some changes, + built, some more changes, built, some more changes, built, and now + it fails, but I don’t remember all the changes I did and in which + order". This will be impossible to support. +

For all these reasons, the conclusion is that adding tracking of +installed files to remove them when the package is unselected, or to +generate a repository of binary packages, is something that is very +hard to achieve reliably and will add a lot of complexity.

On this matter, the Buildroot developers make this position statement:

  • +Buildroot strives to make it easy to generate a root filesystem (hence + the name, by the way.) That is what we want to make Buildroot good at: + building root filesystems. +
  • +Buildroot is not meant to be a distribution (or rather, a distribution + generator.) It is the opinion of most Buildroot developers that this + is not a goal we should pursue. We believe that there are other tools + better suited to generate a distro than Buildroot is. For example, + Open Embedded, or openWRT, + are such tools. +
  • +We prefer to push Buildroot in a direction that makes it easy (or even + easier) to generate complete root filesystems. This is what makes + Buildroot stands out in the crowd (among other things, of course!) +
  • +We believe that for most embedded Linux systems, binary packages are + not necessary, and potentially harmful. When binary packages are + used, it means that the system can be partially upgraded, which + creates an enormous number of possible combinations of package + versions that should be tested before doing the upgrade on the + embedded device. On the other hand, by doing complete system + upgrades by upgrading the entire root filesystem image at once, + the image deployed to the embedded system is guaranteed to really + be the one that has been tested and validated. +

10.8. How to speed-up the build process?

Since Buildroot often involves doing full rebuilds of the entire +system that can be quite long, we provide below a number of tips to +help reduce the build time:

  • +Use a pre-built external toolchain instead of the default Buildroot + internal toolchain. By using a pre-built Linaro toolchain (on ARM) + or a Sourcery CodeBench toolchain (for ARM, x86, x86-64, MIPS, + etc.), you will save the build time of the toolchain at each + complete rebuild, approximately 15 to 20 minutes. Note that + temporarily using an external toolchain does not prevent you to + switch back to an internal toolchain (that may provide a higher + level of customization) once the rest of your system is working; +
  • +Use the ccache compiler cache (see: Section 8.13.3, “Using ccache in Buildroot”); +
  • +Learn about rebuilding only the few packages you actually care + about (see Section 8.3, “Understanding how to rebuild packages”), but beware that sometimes full + rebuilds are anyway necessary (see Section 8.2, “Understanding when a full rebuild is necessary”); +
  • +Make sure you are not using a virtual machine for the Linux system + used to run Buildroot. Most of the virtual machine technologies are + known to cause a significant performance impact on I/O, which is + really important for building source code; +
  • +Make sure that you’re using only local files: do not attempt to do + a build over NFS, which significantly slows down the build. Having + the Buildroot download folder available locally also helps a bit. +
  • +Buy new hardware. SSDs and lots of RAM are key to speeding up the + builds. +
  • +Experiment with top-level parallel build, see + Section 8.11, “Top-level parallel build”. +

Chapter 11. Known issues

  • +It is not possible to pass extra linker options via BR2_TARGET_LDFLAGS + if such options contain a $ sign. For example, the following is known + to break: BR2_TARGET_LDFLAGS="-Wl,-rpath='$ORIGIN/../lib'" +
  • +The libffi package is not supported on the SuperH 2 and ARC + architectures. +
  • +The prboom package triggers a compiler failure with the SuperH 4 + compiler from Sourcery CodeBench, version 2012.09. +

Chapter 12. Legal notice and licensing

12.1. Complying with open source licenses

All of the end products of Buildroot (toolchain, root filesystem, kernel, +bootloaders) contain open source software, released under various licenses.

Using open source software gives you the freedom to build rich embedded +systems, choosing from a wide range of packages, but also imposes some +obligations that you must know and honour. +Some licenses require you to publish the license text in the documentation of +your product. Others require you to redistribute the source code of the +software to those that receive your product.

The exact requirements of each license are documented in each package, and +it is your responsibility (or that of your legal office) to comply with those +requirements. +To make this easier for you, Buildroot can collect for you some material you +will probably need. To produce this material, after you have configured +Buildroot with make menuconfig, make xconfig or make gconfig, run:

make legal-info

Buildroot will collect legally-relevant material in your output directory, +under the legal-info/ subdirectory. +There you will find:

  • +A README file, that summarizes the produced material and contains warnings + about material that Buildroot could not produce. +
  • +buildroot.config: this is the Buildroot configuration file that is usually + produced with make menuconfig, and which is necessary to reproduce the + build. +
  • +The source code for all packages; this is saved in the sources/ and + host-sources/ subdirectories for target and host packages respectively. + The source code for packages that set <PKG>_REDISTRIBUTE = NO will not be + saved. + Patches that were applied are also saved, along with a file named series + that lists the patches in the order they were applied. Patches are under the + same license as the files that they modify. + Note: Buildroot applies additional patches to Libtool scripts of + autotools-based packages. These patches can be found under + support/libtool in the Buildroot source and, due to technical + limitations, are not saved with the package sources. You may need to + collect them manually. +
  • +A manifest file (one for host and one for target packages) listing the + configured packages, their version, license and related information. + Some of this information might not be defined in Buildroot; such items are + marked as "unknown". +
  • +The license texts of all packages, in the licenses/ and host-licenses/ + subdirectories for target and host packages respectively. + If the license file(s) are not defined in Buildroot, the file is not produced + and a warning in the README indicates this. +

Please note that the aim of the legal-info feature of Buildroot is to +produce all the material that is somehow relevant for legal compliance with the +package licenses. Buildroot does not try to produce the exact material that +you must somehow make public. Certainly, more material is produced than is +needed for a strict legal compliance. For example, it produces the source code +for packages released under BSD-like licenses, that you are not required to +redistribute in source form.

Moreover, due to technical limitations, Buildroot does not produce some +material that you will or may need, such as the toolchain source code for +some of the external toolchains and the Buildroot source code itself. +When you run make legal-info, Buildroot produces warnings in the README +file to inform you of relevant material that could not be saved.

Finally, keep in mind that the output of make legal-info is based on +declarative statements in each of the packages recipes. The Buildroot +developers try to do their best to keep those declarative statements as +accurate as possible, to the best of their knowledge. However, it is very +well possible that those declarative statements are not all fully accurate +nor exhaustive. You (or your legal department) have to check the output +of make legal-info before using it as your own compliance delivery. See +the NO WARRANTY clauses (clauses 11 and 12) in the COPYING file at the +root of the Buildroot distribution.

12.2. Complying with the Buildroot license

Buildroot itself is an open source software, released under the +GNU General +Public License, version 2 or (at your option) any later version, with +the exception of the package patches detailed below. +However, being a build system, it is not normally part of the end product: +if you develop the root filesystem, kernel, bootloader or toolchain for a +device, the code of Buildroot is only present on the development machine, not +in the device storage.

Nevertheless, the general view of the Buildroot developers is that you should +release the Buildroot source code along with the source code of other packages +when releasing a product that contains GPL-licensed software. +This is because the +GNU GPL +defines the "complete source code" for an executable work as "all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable". +Buildroot is part of the scripts used to control compilation and +installation of the executable, and as such it is considered part of the +material that must be redistributed.

Keep in mind that this is only the Buildroot developers' opinion, and you +should consult your legal department or lawyer in case of any doubt.

12.2.1. Patches to packages

Buildroot also bundles patch files, which are applied to the sources +of the various packages. Those patches are not covered by the license +of Buildroot. Instead, they are covered by the license of the software +to which the patches are applied. When said software is available +under multiple licenses, the Buildroot patches are only provided under +the publicly accessible licenses.

See Chapter 18, Patching a package for the technical details.

Chapter 13. Beyond Buildroot

13.1. Boot the generated images

13.1.1. NFS boot

To achieve NFS-boot, enable tar root filesystem in the Filesystem +images menu.

After a complete build, just run the following commands to setup the +NFS-root directory:

sudo tar -xavf /path/to/output_dir/rootfs.tar -C /path/to/nfs_root_dir

Remember to add this path to /etc/exports.

Then, you can execute a NFS-boot from your target.

13.1.2. Live CD

To build a live CD image, enable the iso image option in the +Filesystem images menu. Note that this option is only available on +the x86 and x86-64 architectures, and if you are building your kernel +with Buildroot.

You can build a live CD image with either IsoLinux, Grub or Grub 2 as +a bootloader, but only Isolinux supports making this image usable both +as a live CD and live USB (through the Build hybrid image option).

You can test your live CD image using QEMU:

qemu-system-i386 -cdrom output/images/rootfs.iso9660

Or use it as a hard-drive image if it is a hybrid ISO:

qemu-system-i386 -hda output/images/rootfs.iso9660

It can be easily flashed to a USB drive with dd:

dd if=output/images/rootfs.iso9660 of=/dev/sdb

13.2. Chroot

If you want to chroot in a generated image, then there are few thing +you should be aware of:

  • +you should setup the new root from the tar root filesystem image; +
  • +either the selected target architecture is compatible with your host + machine, or you should use some qemu-* binary and correctly set it + within the binfmt properties to be able to run the binaries built + for the target on your host machine; +
  • +Buildroot does not currently provide host-qemu and binfmt + correctly built and set for that kind of use. +

Part III. Developer guide

Chapter 14. How Buildroot works

As mentioned above, Buildroot is basically a set of Makefiles that +download, configure, and compile software with the correct options. It +also includes patches for various software packages - mainly the ones +involved in the cross-compilation toolchain (gcc, binutils and +uClibc).

There is basically one Makefile per software package, and they are +named with the .mk extension. Makefiles are split into many different +parts.

  • +The toolchain/ directory contains the Makefiles + and associated files for all software related to the + cross-compilation toolchain: binutils, gcc, gdb, + kernel-headers and uClibc. +
  • +The arch/ directory contains the definitions for all the processor + architectures that are supported by Buildroot. +
  • +The package/ directory contains the Makefiles and + associated files for all user-space tools and libraries that Buildroot + can compile and add to the target root filesystem. There is one + sub-directory per package. +
  • +The linux/ directory contains the Makefiles and associated files for + the Linux kernel. +
  • +The boot/ directory contains the Makefiles and associated files for + the bootloaders supported by Buildroot. +
  • +The system/ directory contains support for system integration, e.g. + the target filesystem skeleton and the selection of an init system. +
  • +The fs/ directory contains the Makefiles and + associated files for software related to the generation of the + target root filesystem image. +

Each directory contains at least 2 files:

  • +something.mk is the Makefile that downloads, configures, + compiles and installs the package something. +
  • +Config.in is a part of the configuration tool + description file. It describes the options related to the + package. +

The main Makefile performs the following steps (once the +configuration is done):

  • +Create all the output directories: staging, target, build, + etc. in the output directory (output/ by default, + another value can be specified using O=) +
  • +Generate the toolchain target. When an internal toolchain is used, this + means generating the cross-compilation toolchain. When an external + toolchain is used, this means checking the features of the external + toolchain and importing it into the Buildroot environment. +
  • +Generate all the targets listed in the TARGETS variable. This + variable is filled by all the individual components' + Makefiles. Generating these targets will trigger the compilation of + the userspace packages (libraries, programs), the kernel, the + bootloader and the generation of the root filesystem images, + depending on the configuration. +

Chapter 15. Coding style

Overall, these coding style rules are here to help you to add new files in +Buildroot or refactor existing ones.

If you slightly modify some existing file, the important thing is +to keep the consistency of the whole file, so you can:

  • +either follow the potentially deprecated coding style used in this +file, +
  • +or entirely rework it in order to make it comply with these rules. +

15.1. Config.in file

Config.in files contain entries for almost anything configurable in +Buildroot.

An entry has the following pattern:

config BR2_PACKAGE_LIBFOO
+        bool "libfoo"
+        depends on BR2_PACKAGE_LIBBAZ
+        select BR2_PACKAGE_LIBBAR
+        help
+          This is a comment that explains what libfoo is. The help text
+          should be wrapped.
+
+          http://foosoftware.org/libfoo/
  • +The bool, depends on, select and help lines are indented + with one tab. +
  • +The help text itself should be indented with one tab and two + spaces. +
  • +The help text should be wrapped to fit 72 columns, where tab counts + for 8, so 62 characters in the text itself. +

The Config.in files are the input for the configuration tool +used in Buildroot, which is the regular Kconfig. For further +details about the Kconfig language, refer to +http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt.

15.2. The .mk file

  • +Header: The file starts with a header. It contains the module name, +preferably in lowercase, enclosed between separators made of 80 hashes. A +blank line is mandatory after the header: +

    ################################################################################
    +#
    +# libfoo
    +#
    +################################################################################
  • +Assignment: use = preceded and followed by one space: +

    LIBFOO_VERSION = 1.0
    +LIBFOO_CONF_OPTS += --without-python-support

    Do not align the = signs.

  • +Indentation: use tab only: +

    define LIBFOO_REMOVE_DOC
    +        $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \
    +                $(TARGET_DIR)/usr/share/man/man3/libfoo*
    +endef

    Note that commands inside a define block should always start with a tab, +so make recognizes them as commands.

  • +Optional dependency: +

    • +Prefer multi-line syntax. +

      YES:

      ifeq ($(BR2_PACKAGE_PYTHON),y)
      +LIBFOO_CONF_OPTS += --with-python-support
      +LIBFOO_DEPENDENCIES += python
      +else
      +LIBFOO_CONF_OPTS += --without-python-support
      +endif

      NO:

      LIBFOO_CONF_OPTS += --with$(if $(BR2_PACKAGE_PYTHON),,out)-python-support
      +LIBFOO_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,)
    • +Keep configure options and dependencies close together. +
  • +Optional hooks: keep hook definition and assignment together in one + if block. +

    YES:

    ifneq ($(BR2_LIBFOO_INSTALL_DATA),y)
    +define LIBFOO_REMOVE_DATA
    +        $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data
    +endef
    +LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA
    +endif

    NO:

    define LIBFOO_REMOVE_DATA
    +        $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data
    +endef
    +
    +ifneq ($(BR2_LIBFOO_INSTALL_DATA),y)
    +LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA
    +endif

15.3. The documentation

The documentation uses the +asciidoc format.

For further details about the asciidoc syntax, refer to +http://www.methods.co.nz/asciidoc/userguide.html.

15.4. Support scripts

Some scripts in the support/ and utils/ directories are written in +Python and should follow the +PEP8 Style Guide for Python Code.

Chapter 16. Adding support for a particular board

Buildroot contains basic configurations for several publicly available +hardware boards, so that users of such a board can easily build a system +that is known to work. You are welcome to add support for other boards +to Buildroot too.

To do so, you need to create a normal Buildroot configuration that +builds a basic system for the hardware: toolchain, kernel, bootloader, +filesystem and a simple BusyBox-only userspace. No specific package +should be selected: the configuration should be as minimal as +possible, and should only build a working basic BusyBox system for the +target platform. You can of course use more complicated configurations +for your internal projects, but the Buildroot project will only +integrate basic board configurations. This is because package +selections are highly application-specific.

Once you have a known working configuration, run make +savedefconfig. This will generate a minimal defconfig file at the +root of the Buildroot source tree. Move this file into the configs/ +directory, and rename it <boardname>_defconfig.

It is recommended to use as much as possible upstream versions of the +Linux kernel and bootloaders, and to use as much as possible default +kernel and bootloader configurations. If they are incorrect for your +board, or no default exists, we encourage you to send fixes to the +corresponding upstream projects.

However, in the mean time, you may want to store kernel or bootloader +configuration or patches specific to your target platform. To do so, +create a directory board/<manufacturer> and a subdirectory +board/<manufacturer>/<boardname>. You can then store your patches +and configurations in these directories, and reference them from the main +Buildroot configuration. Refer to Chapter 9, Project-specific customization for more details.

Chapter 17. Adding new packages to Buildroot

This section covers how new packages (userspace libraries or +applications) can be integrated into Buildroot. It also shows how +existing packages are integrated, which is needed for fixing issues or +tuning their configuration.

When you add a new package, be sure to test it in various conditions +(see Section 17.24.3, “How to test your package”) and also check it for coding style (see +Section 17.24.2, “How to check the coding style”).

17.1. Package directory

First of all, create a directory under the package directory for +your software, for example libfoo.

Some packages have been grouped by topic in a sub-directory: +x11r7, qt5 and gstreamer. If your package fits in +one of these categories, then create your package directory in these. +New subdirectories are discouraged, however.

17.2. Config files

For the package to be displayed in the configuration tool, you need to +create a Config file in your package directory. There are two types: +Config.in and Config.in.host.

17.2.1. Config.in file

For packages used on the target, create a file named Config.in. This +file will contain the option descriptions related to our libfoo software +that will be used and displayed in the configuration tool. It should basically +contain:

config BR2_PACKAGE_LIBFOO
+        bool "libfoo"
+        help
+          This is a comment that explains what libfoo is. The help text
+          should be wrapped.
+
+          http://foosoftware.org/libfoo/

The bool line, help line and other metadata information about the +configuration option must be indented with one tab. The help text +itself should be indented with one tab and two spaces, lines should +be wrapped to fit 72 columns, where tab counts for 8, so 62 characters +in the text itself. The help text must mention the upstream URL of the +project after an empty line.

As a convention specific to Buildroot, the ordering of the attributes +is as follows:

  1. +The type of option: bool, string… with the prompt +
  2. +If needed, the default value(s) +
  3. +Any dependencies on the target in depends on form +
  4. +Any dependencies on the toolchain in depends on form +
  5. +Any dependencies on other packages in depends on form +
  6. +Any dependency of the select form +
  7. +The help keyword and help text. +

You can add other sub-options into a if BR2_PACKAGE_LIBFOO…endif +statement to configure particular things in your software. You can look at +examples in other packages. The syntax of the Config.in file is the same +as the one for the kernel Kconfig file. The documentation for this syntax is +available at http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt

Finally you have to add your new libfoo/Config.in to +package/Config.in (or in a category subdirectory if you decided to +put your package in one of the existing categories). The files +included there are sorted alphabetically per category and are NOT +supposed to contain anything but the bare name of the package.

source "package/libfoo/Config.in"

17.2.2. Config.in.host file

Some packages also need to be built for the host system. There are two +options here:

  • +The host package is only required to satisfy build-time + dependencies of one or more target packages. In this case, add + host-foo to the target package’s BAR_DEPENDENCIES variable. No + Config.in.host file should be created. +
  • +The host package should be explicitly selectable by the user from + the configuration menu. In this case, create a Config.in.host file + for that host package: +

    config BR2_PACKAGE_HOST_FOO
    +        bool "host foo"
    +        help
    +          This is a comment that explains what foo for the host is.
    +
    +          http://foosoftware.org/foo/

    The same coding style and options as for the Config.in file are valid.

    Finally you have to add your new libfoo/Config.in.host to +package/Config.in.host. The files included there are sorted alphabetically +and are NOT supposed to contain anything but the bare name of the package.

    source "package/foo/Config.in.host"

    The host package will then be available from the Host utilities menu.

17.2.3. Choosing depends on or select

The Config.in file of your package must also ensure that +dependencies are enabled. Typically, Buildroot uses the following +rules:

  • +Use a select type of dependency for dependencies on + libraries. These dependencies are generally not obvious and it + therefore make sense to have the kconfig system ensure that the + dependencies are selected. For example, the libgtk2 package uses + select BR2_PACKAGE_LIBGLIB2 to make sure this library is also + enabled. + The select keyword expresses the dependency with a backward + semantic. +
  • +Use a depends on type of dependency when the user really needs to + be aware of the dependency. Typically, Buildroot uses this type of + dependency for dependencies on target architecture, MMU support and + toolchain options (see Section 17.2.4, “Dependencies on target and toolchain options”), + or for dependencies on "big" things, such as the X.org system. + The depends on keyword expresses the dependency with a forward + semantic. +

Note. The current problem with the kconfig language is that these two +dependency semantics are not internally linked. Therefore, it may be +possible to select a package, whom one of its dependencies/requirement +is not met.

An example illustrates both the usage of select and depends on.

config BR2_PACKAGE_RRDTOOL
+        bool "rrdtool"
+        depends on BR2_USE_WCHAR
+        select BR2_PACKAGE_FREETYPE
+        select BR2_PACKAGE_LIBART
+        select BR2_PACKAGE_LIBPNG
+        select BR2_PACKAGE_ZLIB
+        help
+          RRDtool is the OpenSource industry standard, high performance
+          data logging and graphing system for time series data.
+
+          http://oss.oetiker.ch/rrdtool/
+
+comment "rrdtool needs a toolchain w/ wchar"
+        depends on !BR2_USE_WCHAR

Note that these two dependency types are only transitive with the +dependencies of the same kind.

This means, in the following example:

config BR2_PACKAGE_A
+        bool "Package A"
+
+config BR2_PACKAGE_B
+        bool "Package B"
+        depends on BR2_PACKAGE_A
+
+config BR2_PACKAGE_C
+        bool "Package C"
+        depends on BR2_PACKAGE_B
+
+config BR2_PACKAGE_D
+        bool "Package D"
+        select BR2_PACKAGE_B
+
+config BR2_PACKAGE_E
+        bool "Package E"
+        select BR2_PACKAGE_D
  • +Selecting Package C will be visible if Package B has been + selected, which in turn is only visible if Package A has been + selected. +
  • +Selecting Package E will select Package D, which will select + Package B, it will not check for the dependencies of Package B, + so it will not select Package A. +
  • +Since Package B is selected but Package A is not, this violates + the dependency of Package B on Package A. Therefore, in such a + situation, the transitive dependency has to be added explicitly: +
config BR2_PACKAGE_D
+        bool "Package D"
+        select BR2_PACKAGE_B
+        depends on BR2_PACKAGE_A
+
+config BR2_PACKAGE_E
+        bool "Package E"
+        select BR2_PACKAGE_D
+        depends on BR2_PACKAGE_A

Overall, for package library dependencies, select should be +preferred.

Note that such dependencies will ensure that the dependency option +is also enabled, but not necessarily built before your package. To do +so, the dependency also needs to be expressed in the .mk file of the +package.

Further formatting details: see the +coding style.

17.2.4. Dependencies on target and toolchain options

Many packages depend on certain options of the toolchain: the choice of +C library, C++ support, thread support, RPC support, wchar support, +or dynamic library support. Some packages can only be built on certain +target architectures, or if an MMU is available in the processor.

These dependencies have to be expressed with the appropriate depends +on statements in the Config.in file. Additionally, for dependencies on +toolchain options, a comment should be displayed when the option is +not enabled, so that the user knows why the package is not available. +Dependencies on target architecture or MMU support should not be +made visible in a comment: since it is unlikely that the user can +freely choose another target, it makes little sense to show these +dependencies explicitly.

The comment should only be visible if the config option itself would +be visible when the toolchain option dependencies are met. This means +that all other dependencies of the package (including dependencies on +target architecture and MMU support) have to be repeated on the +comment definition. To keep it clear, the depends on statement for +these non-toolchain option should be kept separate from the depends on +statement for the toolchain options. +If there is a dependency on a config option in that same file (typically +the main package) it is preferable to have a global if … endif +construct rather than repeating the depends on statement on the +comment and other config options.

The general format of a dependency comment for package foo is:

foo needs a toolchain w/ featA, featB, featC

for example:

mpd needs a toolchain w/ C++, threads, wchar

or

crda needs a toolchain w/ threads

Note that this text is kept brief on purpose, so that it will fit on a +80-character terminal.

The rest of this section enumerates the different target and toolchain +options, the corresponding config symbols to depend on, and the text to +use in the comment.

  • +Target architecture +

    • +Dependency symbol: BR2_powerpc, BR2_mips, … (see arch/Config.in) +
    • +Comment string: no comment to be added +
  • +MMU support +

    • +Dependency symbol: BR2_USE_MMU +
    • +Comment string: no comment to be added +
  • +Gcc _sync* built-ins used for atomic operations. They are + available in variants operating on 1 byte, 2 bytes, 4 bytes and 8 + bytes. Since different architectures support atomic operations on + different sizes, one dependency symbol is available for each size: +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_SYNC_1 for 1 byte, + BR2_TOOLCHAIN_HAS_SYNC_2 for 2 bytes, + BR2_TOOLCHAIN_HAS_SYNC_4 for 4 bytes, BR2_TOOLCHAIN_HAS_SYNC_8 + for 8 bytes. +
    • +Comment string: no comment to be added +
  • +Gcc _atomic* built-ins used for atomic operations. +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_ATOMIC. +
    • +Comment string: no comment to be added +
  • +Kernel headers +

    • +Dependency symbol: BR2_TOOLCHAIN_HEADERS_AT_LEAST_X_Y, (replace + X_Y with the proper version, see toolchain/Config.in) +
    • +Comment string: headers >= X.Y and/or headers <= X.Y (replace + X.Y with the proper version) +
  • +GCC version +

    • +Dependency symbol: BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y, (replace + X_Y with the proper version, see toolchain/Config.in) +
    • +Comment string: gcc >= X.Y and/or gcc <= X.Y (replace + X.Y with the proper version) +
  • +Host GCC version +

    • +Dependency symbol: BR2_HOST_GCC_AT_LEAST_X_Y, (replace + X_Y with the proper version, see Config.in) +
    • +Comment string: no comment to be added +
    • +Note that it is usually not the package itself that has a minimum + host GCC version, but rather a host-package on which it depends. +
  • +C library +

    • +Dependency symbol: BR2_TOOLCHAIN_USES_GLIBC, + BR2_TOOLCHAIN_USES_MUSL, BR2_TOOLCHAIN_USES_UCLIBC +
    • +Comment string: for the C library, a slightly different comment text + is used: foo needs a glibc toolchain, or foo needs a glibc + toolchain w/ C++ +
  • +C++ support +

    • +Dependency symbol: BR2_INSTALL_LIBSTDCPP +
    • +Comment string: C++ +
  • +D support +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_DLANG +
    • +Comment string: Dlang +
  • +Fortran support +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_FORTRAN +
    • +Comment string: fortran +
  • +thread support +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_THREADS +
    • +Comment string: threads (unless BR2_TOOLCHAIN_HAS_THREADS_NPTL + is also needed, in which case, specifying only NPTL is sufficient) +
  • +NPTL thread support +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_THREADS_NPTL +
    • +Comment string: NPTL +
  • +RPC support +

    • +Dependency symbol: BR2_TOOLCHAIN_HAS_NATIVE_RPC +
    • +Comment string: RPC +
  • +wchar support +

    • +Dependency symbol: BR2_USE_WCHAR +
    • +Comment string: wchar +
  • +dynamic library +

    • +Dependency symbol: !BR2_STATIC_LIBS +
    • +Comment string: dynamic library +

17.2.5. Dependencies on a Linux kernel built by buildroot

Some packages need a Linux kernel to be built by buildroot. These are +typically kernel modules or firmware. A comment should be added in the +Config.in file to express this dependency, similar to dependencies on +toolchain options. The general format is:

foo needs a Linux kernel to be built

If there is a dependency on both toolchain options and the Linux +kernel, use this format:

foo needs a toolchain w/ featA, featB, featC and a Linux kernel to be built

17.2.6. Dependencies on udev /dev management

If a package needs udev /dev management, it should depend on symbol +BR2_PACKAGE_HAS_UDEV, and the following comment should be added:

foo needs udev /dev management

If there is a dependency on both toolchain options and udev /dev +management, use this format:

foo needs udev /dev management and a toolchain w/ featA, featB, featC

17.2.7. Dependencies on features provided by virtual packages

Some features can be provided by more than one package, such as the +openGL libraries.

See Section 17.11, “Infrastructure for virtual packages” for more on the virtual packages.

17.3. The .mk file

Finally, here’s the hardest part. Create a file named libfoo.mk. It +describes how the package should be downloaded, configured, built, +installed, etc.

Depending on the package type, the .mk file must be written in a +different way, using different infrastructures:

  • +Makefiles for generic packages (not using autotools or CMake): + These are based on an infrastructure similar to the one used for + autotools-based packages, but require a little more work from the + developer. They specify what should be done for the configuration, + compilation and installation of the package. This + infrastructure must be used for all packages that do not use the + autotools as their build system. In the future, other specialized + infrastructures might be written for other build systems. We cover + them through in a tutorial and a + reference. +
  • +Makefiles for autotools-based software (autoconf, automake, etc.): + We provide a dedicated infrastructure for such packages, since + autotools is a very common build system. This infrastructure must + be used for new packages that rely on the autotools as their build + system. We cover them through a tutorial + and reference. +
  • +Makefiles for cmake-based software: We provide a dedicated + infrastructure for such packages, as CMake is a more and more + commonly used build system and has a standardized behaviour. This + infrastructure must be used for new packages that rely on + CMake. We cover them through a tutorial + and reference. +
  • +Makefiles for Python modules: We have a dedicated infrastructure + for Python modules that use either the distutils or the + setuptools mechanism. We cover them through a + tutorial and a + reference. +
  • +Makefiles for Lua modules: We have a dedicated infrastructure for + Lua modules available through the LuaRocks web site. We cover them + through a tutorial and a + reference. +

Further formatting details: see the writing +rules.

17.4. The .hash file

When possible, you must add a third file, named libfoo.hash, that +contains the hashes of the downloaded files for the libfoo +package. The only reason for not adding a .hash file is when hash +checking is not possible due to how the package is downloaded.

When a package has a version selection choice, then the hash file may be +stored in a subdirectory named after the version, e.g. +package/libfoo/1.2.3/libfoo.hash. This is especially important if the +different versions have different licensing terms, but they are stored +in the same file. Otherwise, the hash file should stay in the package’s +directory.

The hashes stored in that file are used to validate the integrity of the +downloaded files and of the license files.

The format of this file is one line for each file for which to check the +hash, each line with the following three fields separated by two spaces:

  • +the type of hash, one of: +

    • +md5, sha1, sha224, sha256, sha384, sha512, none +
  • +the hash of the file: +

    • +for none, one or more non-space chars, usually just the string xxx +
    • +for md5, 32 hexadecimal characters +
    • +for sha1, 40 hexadecimal characters +
    • +for sha224, 56 hexadecimal characters +
    • +for sha256, 64 hexadecimal characters +
    • +for sha384, 96 hexadecimal characters +
    • +for sha512, 128 hexadecimal characters +
  • +the name of the file: +

    • +for a source archive: the basename of the file, without any directory + component, +
    • +for a license file: the path as it appears in FOO_LICENSE_FILES. +

Lines starting with a # sign are considered comments, and ignored. Empty +lines are ignored.

There can be more than one hash for a single file, each on its own line. In +this case, all hashes must match.

Note. Ideally, the hashes stored in this file should match the hashes published by +upstream, e.g. on their website, in the e-mail announcement… If upstream +provides more than one type of hash (e.g. sha1 and sha512), then it is +best to add all those hashes in the .hash file. If upstream does not +provide any hash, or only provides an md5 hash, then compute at least one +strong hash yourself (preferably sha256, but not md5), and mention +this in a comment line above the hashes.

Note. The hashes for license files are used to detect a license change when a +package version is bumped. The hashes are checked during the make legal-info +target run. For a package with multiple versions (like Qt5), +create the hash file in a subdirectory <packageversion> of that package +(see also Section 18.2, “How patches are applied”).

The none hash type is reserved to those archives downloaded from a +repository, like a git clone, a subversion checkout

The example below defines a sha1 and a sha256 published by upstream for +the main libfoo-1.2.3.tar.bz2 tarball, an md5 from upstream and a +locally-computed sha256 hashes for a binary blob, a sha256 for a +downloaded patch, and an archive with no hash:

# Hashes from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.{sha1,sha256}:
+sha1  486fb55c3efa71148fe07895fd713ea3a5ae343a  libfoo-1.2.3.tar.bz2
+sha256  efc8103cc3bcb06bda6a781532d12701eb081ad83e8f90004b39ab81b65d4369  libfoo-1.2.3.tar.bz2
+
+# md5 from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.md5, sha256 locally computed:
+md5  2d608f3c318c6b7557d551a5a09314f03452f1a1  libfoo-data.bin
+sha256  01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b  libfoo-data.bin
+
+# Locally computed:
+sha256  ff52101fb90bbfc3fe9475e425688c660f46216d7e751c4bbdb1dc85cdccacb9  libfoo-fix-blabla.patch
+
+# No hash for 1234:
+none  xxx  libfoo-1234.tar.gz
+
+# Hash for license files:
+sha256  a45a845012742796534f7e91fe623262ccfb99460a2bd04015bd28d66fba95b8  COPYING
+sha256  01b1f9f2c8ee648a7a596a1abe8aa4ed7899b1c9e5551bda06da6e422b04aa55  doc/COPYING.LGPL

If the .hash file is present, and it contains one or more hashes for a +downloaded file, the hash(es) computed by Buildroot (after download) must +match the hash(es) stored in the .hash file. If one or more hashes do +not match, Buildroot considers this an error, deletes the downloaded file, +and aborts.

If the .hash file is present, but it does not contain a hash for a +downloaded file, Buildroot considers this an error and aborts. However, +the downloaded file is left in the download directory since this +typically indicates that the .hash file is wrong but the downloaded +file is probably OK.

Hashes are currently checked for files fetched from http/ftp servers, +Git repositories, files copied using scp and local files. Hashes are +not checked for other version control systems (such as Subversion, +CVS, etc.) because Buildroot currently does not generate reproducible +tarballs when source code is fetched from such version control +systems.

Hashes should only be added in .hash files for files that are +guaranteed to be stable. For example, patches auto-generated by Github +are not guaranteed to be stable, and therefore their hashes can change +over time. Such patches should not be downloaded, and instead be added +locally to the package folder.

If the .hash file is missing, then no check is done at all.

17.5. Infrastructure for packages with specific build systems

By packages with specific build systems we mean all the packages +whose build system is not one of the standard ones, such as +autotools or CMake. This typically includes packages whose build +system is based on hand-written Makefiles or shell scripts.

17.5.1. generic-package tutorial

01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_LICENSE = GPL-3.0+
+11: LIBFOO_LICENSE_FILES = COPYING
+12: LIBFOO_INSTALL_STAGING = YES
+13: LIBFOO_CONFIG_SCRIPTS = libfoo-config
+14: LIBFOO_DEPENDENCIES = host-libaaa libbbb
+15:
+16: define LIBFOO_BUILD_CMDS
+17:     $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+18: endef
+19:
+20: define LIBFOO_INSTALL_STAGING_CMDS
+21:     $(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a
+22:     $(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
+23:     $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib
+24: endef
+25:
+26: define LIBFOO_INSTALL_TARGET_CMDS
+27:     $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib
+28:     $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
+29: endef
+30:
+31: define LIBFOO_USERS
+32:     foo -1 libfoo -1 * - - - LibFoo daemon
+33: endef
+34:
+35: define LIBFOO_DEVICES
+36:     /dev/foo  c  666  0  0  42  0  -  -  -
+37: endef
+38:
+39: define LIBFOO_PERMISSIONS
+40:     /bin/foo  f  4755  foo  libfoo   -  -  -  -  -
+41: endef
+42:
+43: $(eval $(generic-package))

The Makefile begins on line 7 to 11 with metadata information: the +version of the package (LIBFOO_VERSION), the name of the +tarball containing the package (LIBFOO_SOURCE) (xz-ed tarball recommended) +the Internet location at which the tarball can be downloaded from +(LIBFOO_SITE), the license (LIBFOO_LICENSE) and file with the +license text (LIBFOO_LICENSE_FILES). All variables must start with +the same prefix, LIBFOO_ in this case. This prefix is always the +uppercased version of the package name (see below to understand where +the package name is defined).

On line 12, we specify that this package wants to install something to +the staging space. This is often needed for libraries, since they must +install header files and other development files in the staging space. +This will ensure that the commands listed in the +LIBFOO_INSTALL_STAGING_CMDS variable will be executed.

On line 13, we specify that there is some fixing to be done to some +of the libfoo-config files that were installed during +LIBFOO_INSTALL_STAGING_CMDS phase. +These *-config files are executable shell script files that are +located in $(STAGING_DIR)/usr/bin directory and are executed +by other 3rd party packages to find out the location and the linking +flags of this particular package.

The problem is that all these *-config files by default give wrong, +host system linking flags that are unsuitable for cross-compiling.

For example: -I/usr/include instead of -I$(STAGING_DIR)/usr/include +or: -L/usr/lib instead of -L$(STAGING_DIR)/usr/lib

So some sed magic is done to these scripts to make them give correct +flags. +The argument to be given to LIBFOO_CONFIG_SCRIPTS is the file name(s) +of the shell script(s) needing fixing. All these names are relative to +$(STAGING_DIR)/usr/bin and if needed multiple names can be given.

In addition, the scripts listed in LIBFOO_CONFIG_SCRIPTS are removed +from $(TARGET_DIR)/usr/bin, since they are not needed on the target.

Example 17.1. Config script: divine package

Package divine installs shell script $(STAGING_DIR)/usr/bin/divine-config.

So its fixup would be:

DIVINE_CONFIG_SCRIPTS = divine-config

Example 17.2. Config script: imagemagick package:

Package imagemagick installs the following scripts: +$(STAGING_DIR)/usr/bin/{Magick,Magick++,MagickCore,MagickWand,Wand}-config

So it’s fixup would be:

IMAGEMAGICK_CONFIG_SCRIPTS = \
+   Magick-config Magick++-config \
+   MagickCore-config MagickWand-config Wand-config

On line 14, we specify the list of dependencies this package relies +on. These dependencies are listed in terms of lower-case package names, +which can be packages for the target (without the host- +prefix) or packages for the host (with the host-) prefix). +Buildroot will ensure that all these packages are built and installed +before the current package starts its configuration.

The rest of the Makefile, lines 16..29, defines what should be done +at the different steps of the package configuration, compilation and +installation. +LIBFOO_BUILD_CMDS tells what steps should be performed to +build the package. LIBFOO_INSTALL_STAGING_CMDS tells what +steps should be performed to install the package in the staging space. +LIBFOO_INSTALL_TARGET_CMDS tells what steps should be +performed to install the package in the target space.

All these steps rely on the $(@D) variable, which +contains the directory where the source code of the package has been +extracted.

On lines 31..33, we define a user that is used by this package (e.g. +to run a daemon as non-root) (LIBFOO_USERS).

On line 35..37, we define a device-node file used by this package +(LIBFOO_DEVICES).

On line 39..41, we define the permissions to set to specific files +installed by this package (LIBFOO_PERMISSIONS).

Finally, on line 43, we call the generic-package function, which +generates, according to the variables defined previously, all the +Makefile code necessary to make your package working.

17.5.2. generic-package reference

There are two variants of the generic target. The generic-package macro is +used for packages to be cross-compiled for the target. The +host-generic-package macro is used for host packages, natively compiled +for the host. It is possible to call both of them in a single .mk +file: once to create the rules to generate a target +package and once to create the rules to generate a host package:

$(eval $(generic-package))
+$(eval $(host-generic-package))

This might be useful if the compilation of the target package requires +some tools to be installed on the host. If the package name is +libfoo, then the name of the package for the target is also +libfoo, while the name of the package for the host is +host-libfoo. These names should be used in the DEPENDENCIES +variables of other packages, if they depend on libfoo or +host-libfoo.

The call to the generic-package and/or host-generic-package macro +must be at the end of the .mk file, after all variable definitions. +The call to host-generic-package must be after the call to +generic-package, if any.

For the target package, the generic-package uses the variables defined by +the .mk file and prefixed by the uppercased package name: +LIBFOO_*. host-generic-package uses the HOST_LIBFOO_* variables. For +some variables, if the HOST_LIBFOO_ prefixed variable doesn’t +exist, the package infrastructure uses the corresponding variable +prefixed by LIBFOO_. This is done for variables that are likely to +have the same value for both the target and host packages. See below +for details.

The list of variables that can be set in a .mk file to give metadata +information is (assuming the package name is libfoo) :

  • +LIBFOO_VERSION, mandatory, must contain the version of the + package. Note that if HOST_LIBFOO_VERSION doesn’t exist, it is + assumed to be the same as LIBFOO_VERSION. It can also be a + revision number or a tag for packages that are fetched directly + from their version control system. Examples: +

    • +a version for a release tarball: LIBFOO_VERSION = 0.1.2 +
    • +a sha1 for a git tree: LIBFOO_VERSION = cb9d6aa9429e838f0e54faa3d455bcbab5eef057 +
    • +a tag for a git tree LIBFOO_VERSION = v0.1.2 +

      Note: Using a branch name as FOO_VERSION is not supported, because it does +not and can not work as people would expect it should:

      1. +due to local caching, Buildroot will not re-fetch the repository, + so people who expect to be able to follow the remote repository + would be quite surprised and disappointed; +
      2. +because two builds can never be perfectly simultaneous, and because + the remote repository may get new commits on the branch anytime, + two users, using the same Buildroot tree and building the same + configuration, may get different source, thus rendering the build + non reproducible, and people would be quite surprised and + disappointed. +
  • +LIBFOO_SOURCE may contain the name of the tarball of the package, + which Buildroot will use to download the tarball from + LIBFOO_SITE. If HOST_LIBFOO_SOURCE is not specified, it defaults + to LIBFOO_SOURCE. If none are specified, then the value is assumed + to be libfoo-$(LIBFOO_VERSION).tar.gz. + Example: LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2 +
  • +LIBFOO_PATCH may contain a space-separated list of patch file + names, that Buildroot will download and apply to the package source + code. If an entry contains ://, then Buildroot will assume it is a + full URL and download the patch from this location. Otherwise, + Buildroot will assume that the patch should be downloaded from + LIBFOO_SITE. If HOST_LIBFOO_PATCH is not specified, it defaults + to LIBFOO_PATCH. Note that patches that are included in Buildroot + itself use a different mechanism: all files of the form + *.patch present in the package directory inside + Buildroot will be applied to the package after extraction (see + patching a package). Finally, patches listed in + the LIBFOO_PATCH variable are applied before the patches stored + in the Buildroot package directory. +
  • +LIBFOO_SITE provides the location of the package, which can be a + URL or a local filesystem path. HTTP, FTP and SCP are supported URL + types for retrieving package tarballs. In these cases don’t include a + trailing slash: it will be added by Buildroot between the directory + and the filename as appropriate. Git, Subversion, Mercurial, + and Bazaar are supported URL types for retrieving packages directly + from source code management systems. There is a helper function to make + it easier to download source tarballs from GitHub (refer to + Section 17.24.4, “How to add a package from GitHub” for details). A filesystem path may be used + to specify either a tarball or a directory containing the package + source code. See LIBFOO_SITE_METHOD below for more details on how + retrieval works. + Note that SCP URLs should be of the form + scp://[user@]host:filepath, and that filepath is relative to the + user’s home directory, so you may want to prepend the path with a + slash for absolute paths: + scp://[user@]host:/absolutepath. + If HOST_LIBFOO_SITE is not specified, it defaults to + LIBFOO_SITE. + Examples: + LIBFOO_SITE=http://www.libfoosoftware.org/libfoo + LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor + LIBFOO_SITE=/opt/software/libfoo.tar.gz + LIBFOO_SITE=$(TOPDIR)/../src/libfoo +
  • +LIBFOO_DL_OPTS is a space-separated list of additional options to + pass to the downloader. Useful for retrieving documents with + server-side checking for user logins and passwords, or to use a proxy. + All download methods valid for LIBFOO_SITE_METHOD are supported; + valid options depend on the download method (consult the man page + for the respective download utilities). +
  • +LIBFOO_EXTRA_DOWNLOADS is a space-separated list of additional + files that Buildroot should download. If an entry contains :// + then Buildroot will assume it is a complete URL and will download + the file using this URL. Otherwise, Buildroot will assume the file + to be downloaded is located at LIBFOO_SITE. Buildroot will not do + anything with those additional files, except download them: it will + be up to the package recipe to use them from $(LIBFOO_DL_DIR). +
  • +LIBFOO_SITE_METHOD determines the method used to fetch or copy the + package source code. In many cases, Buildroot guesses the method + from the contents of LIBFOO_SITE and setting LIBFOO_SITE_METHOD + is unnecessary. When HOST_LIBFOO_SITE_METHOD is not specified, it + defaults to the value of LIBFOO_SITE_METHOD. + The possible values of LIBFOO_SITE_METHOD are: +

    • +wget for normal FTP/HTTP downloads of tarballs. Used by + default when LIBFOO_SITE begins with http://, https:// or + ftp://. +
    • +scp for downloads of tarballs over SSH with scp. Used by + default when LIBFOO_SITE begins with scp://. +
    • +svn for retrieving source code from a Subversion repository. + Used by default when LIBFOO_SITE begins with svn://. When a + http:// Subversion repository URL is specified in + LIBFOO_SITE, one must specify LIBFOO_SITE_METHOD=svn. + Buildroot performs a checkout which is preserved as a tarball in + the download cache; subsequent builds use the tarball instead of + performing another checkout. +
    • +cvs for retrieving source code from a CVS repository. + Used by default when LIBFOO_SITE begins with cvs://. + The downloaded source code is cached as with the svn method. + Anonymous pserver mode is assumed otherwise explicitly defined + on LIBFOO_SITE. Both + LIBFOO_SITE=cvs://libfoo.net:/cvsroot/libfoo and + LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo + are accepted, on the former anonymous pserver access mode is + assumed. + LIBFOO_SITE must contain the source URL as well as the remote + repository directory. The module is the package name. + LIBFOO_VERSION is mandatory and must be a tag, a branch, or + a date (e.g. "2014-10-20", "2014-10-20 13:45", "2014-10-20 + 13:45+01" see "man cvs" for further details). +
    • +git for retrieving source code from a Git repository. Used by + default when LIBFOO_SITE begins with git://. The downloaded + source code is cached as with the svn + method. +
    • +hg for retrieving source code from a Mercurial repository. One + must specify LIBFOO_SITE_METHOD=hg when LIBFOO_SITE + contains a Mercurial repository URL. The downloaded source code + is cached as with the svn method. +
    • +bzr for retrieving source code from a Bazaar repository. Used + by default when LIBFOO_SITE begins with bzr://. The + downloaded source code is cached as with the svn method. +
    • +file for a local tarball. One should use this when + LIBFOO_SITE specifies a package tarball as a local filename. + Useful for software that isn’t available publicly or in version + control. +
    • +local for a local source code directory. One should use this + when LIBFOO_SITE specifies a local directory path containing + the package source code. Buildroot copies the contents of the + source directory into the package’s build directory. Note that + for local packages, no patches are applied. If you need to + still patch the source code, use LIBFOO_POST_RSYNC_HOOKS, see + Section 17.22.1, “Using the POST_RSYNC hook”. +
  • +LIBFOO_GIT_SUBMODULES can be set to YES to create an archive + with the git submodules in the repository. This is only available + for packages downloaded with git (i.e. when + LIBFOO_SITE_METHOD=git). Note that we try not to use such git + submodules when they contain bundled libraries, in which case we + prefer to use those libraries from their own package. +
  • +LIBFOO_STRIP_COMPONENTS is the number of leading components + (directories) that tar must strip from file names on extraction. + The tarball for most packages has one leading component named + "<pkg-name>-<pkg-version>", thus Buildroot passes + --strip-components=1 to tar to remove it. + For non-standard packages that don’t have this component, or + that have more than one leading component to strip, set this + variable with the value to be passed to tar. Default: 1. +
  • +LIBFOO_EXCLUDES is a space-separated list of patterns to exclude + when extracting the archive. Each item from that list is passed as + a tar’s --exclude option. By default, empty. +
  • +LIBFOO_DEPENDENCIES lists the dependencies (in terms of package + name) that are required for the current target package to + compile. These dependencies are guaranteed to be compiled and + installed before the configuration of the current package starts. + However, modifications to configuration of these dependencies will + not force a rebuild of the current package. In a similar way, + HOST_LIBFOO_DEPENDENCIES lists the dependencies for the current + host package. +
  • +LIBFOO_EXTRACT_DEPENDENCIES lists the dependencies (in terms of + package name) that are required for the current target package to be + extracted. These dependencies are guaranteed to be compiled and + installed before the extract step of the current package + starts. This is only used internally by the package infrastructure, + and should typically not be used directly by packages. +
  • +LIBFOO_PATCH_DEPENDENCIES lists the dependencies (in terms of + package name) that are required for the current package to be + patched. These dependencies are guaranteed to be extracted and + patched (but not necessarily built) before the current package is + patched. In a similar way, HOST_LIBFOO_PATCH_DEPENDENCIES lists + the dependencies for the current host package. + This is seldom used; usually, LIBFOO_DEPENDENCIES is what you + really want to use. +
  • +LIBFOO_PROVIDES lists all the virtual packages libfoo is an + implementation of. See Section 17.11, “Infrastructure for virtual packages”. +
  • +LIBFOO_INSTALL_STAGING can be set to YES or NO (default). If + set to YES, then the commands in the LIBFOO_INSTALL_STAGING_CMDS + variables are executed to install the package into the staging + directory. +
  • +LIBFOO_INSTALL_TARGET can be set to YES (default) or NO. If + set to YES, then the commands in the LIBFOO_INSTALL_TARGET_CMDS + variables are executed to install the package into the target + directory. +
  • +LIBFOO_INSTALL_IMAGES can be set to YES or NO (default). If + set to YES, then the commands in the LIBFOO_INSTALL_IMAGES_CMDS + variable are executed to install the package into the images + directory. +
  • +LIBFOO_CONFIG_SCRIPTS lists the names of the files in + $(STAGING_DIR)/usr/bin that need some special fixing to make them + cross-compiling friendly. Multiple file names separated by space can + be given and all are relative to $(STAGING_DIR)/usr/bin. The files + listed in LIBFOO_CONFIG_SCRIPTS are also removed from + $(TARGET_DIR)/usr/bin since they are not needed on the target. +
  • +LIBFOO_DEVICES lists the device files to be created by Buildroot + when using the static device table. The syntax to use is the + makedevs one. You can find some documentation for this syntax in the + Chapter 24, Makedev syntax documentation. This variable is optional. +
  • +LIBFOO_PERMISSIONS lists the changes of permissions to be done at + the end of the build process. The syntax is once again the makedevs one. + You can find some documentation for this syntax in the Chapter 24, Makedev syntax documentation. + This variable is optional. +
  • +LIBFOO_USERS lists the users to create for this package, if it installs + a program you want to run as a specific user (e.g. as a daemon, or as a + cron-job). The syntax is similar in spirit to the makedevs one, and is + described in the Chapter 25, Makeusers syntax documentation. This variable is optional. +
  • +LIBFOO_LICENSE defines the license (or licenses) under which the package + is released. + This name will appear in the manifest file produced by make legal-info. + If the license appears in the SPDX License List, + use the SPDX short identifier to make the manifest file uniform. + Otherwise, describe the license in a precise and concise way, avoiding + ambiguous names such as BSD which actually name a family of licenses. + This variable is optional. If it is not defined, unknown will appear in + the license field of the manifest file for this package. + The expected format for this variable must comply with the following rules: +

    • +If different parts of the package are released under different + licenses, then comma separate licenses (e.g. LIBFOO_LICENSE = + GPL-2.0+, LGPL-2.1+). If there is clear distinction between which + component is licensed under what license, then annotate the license + with that component, between parenthesis (e.g. LIBFOO_LICENSE = + GPL-2.0+ (programs), LGPL-2.1+ (libraries)). +
    • +If some licenses are conditioned on a sub-option being enabled, append + the conditional licenses with a comma (e.g.: FOO_LICENSE += , GPL-2.0+ + (programs)); the infrastructure will internally remove the space before + the comma. +
    • +If the package is dual licensed, then separate licenses with the + or keyword (e.g. LIBFOO_LICENSE = AFL-2.1 or GPL-2.0+). +
  • +LIBFOO_LICENSE_FILES is a space-separated list of files in the package + tarball that contain the license(s) under which the package is released. + make legal-info copies all of these files in the legal-info directory. + See Chapter 12, Legal notice and licensing for more information. + This variable is optional. If it is not defined, a warning will be produced + to let you know, and not saved will appear in the license files field + of the manifest file for this package. +
  • +LIBFOO_ACTUAL_SOURCE_TARBALL only applies to packages whose + LIBFOO_SITE / LIBFOO_SOURCE pair points to an archive that does + not actually contain source code, but binary code. This a very + uncommon case, only known to apply to external toolchains which come + already compiled, although theoretically it might apply to other + packages. In such cases a separate tarball is usually available with + the actual source code. Set LIBFOO_ACTUAL_SOURCE_TARBALL to the + name of the actual source code archive and Buildroot will download + it and use it when you run make legal-info to collect + legally-relevant material. Note this file will not be downloaded + during regular builds nor by make source. +
  • +LIBFOO_ACTUAL_SOURCE_SITE provides the location of the actual + source tarball. The default value is LIBFOO_SITE, so you don’t + need to set this variable if the binary and source archives are + hosted on the same directory. If LIBFOO_ACTUAL_SOURCE_TARBALL is + not set, it doesn’t make sense to define + LIBFOO_ACTUAL_SOURCE_SITE. +
  • +LIBFOO_REDISTRIBUTE can be set to YES (default) or NO to indicate if + the package source code is allowed to be redistributed. Set it to NO for + non-opensource packages: Buildroot will not save the source code for this + package when collecting the legal-info. +
  • +LIBFOO_FLAT_STACKSIZE defines the stack size of an application built into + the FLAT binary format. The application stack size on the NOMMU architecture + processors can’t be enlarged at run time. The default stack size for the + FLAT binary format is only 4k bytes. If the application consumes more stack, + append the required number here. +
  • +LIBFOO_BIN_ARCH_EXCLUDE is a space-separated list of paths (relative + to the target directory) to ignore when checking that the package + installs correctly cross-compiled binaries. You seldom need to set this + variable, unless the package installs binary blobs outside the default + locations, /lib/firmware, /usr/lib/firmware, /lib/modules, + /usr/lib/modules, and /usr/share, which are automatically excluded. +
  • +LIBFOO_IGNORE_CVES is a space-separated list of CVEs that tells + Buildroot CVE tracking tools which CVEs should be ignored for this + package. This is typically used when the CVE is fixed by a patch in + the package, or when the CVE for some reason does not affect the + Buildroot package. A Makefile comment must always precede the + addition of a CVE to this variable. Example: +
# 0001-fix-cve-2020-12345.patch
+LIBFOO_IGNORE_CVES += CVE-2020-12345
+# only when built with libbaz, which Buildroot doesn't support
+LIBFOO_IGNORE_CVES += CVE-2020-54321

The recommended way to define these variables is to use the following +syntax:

LIBFOO_VERSION = 2.32

Now, the variables that define what should be performed at the +different steps of the build process.

  • +LIBFOO_EXTRACT_CMDS lists the actions to be performed to extract + the package. This is generally not needed as tarballs are + automatically handled by Buildroot. However, if the package uses a + non-standard archive format, such as a ZIP or RAR file, or has a + tarball with a non-standard organization, this variable allows to + override the package infrastructure default behavior. +
  • +LIBFOO_CONFIGURE_CMDS lists the actions to be performed to + configure the package before its compilation. +
  • +LIBFOO_BUILD_CMDS lists the actions to be performed to + compile the package. +
  • +HOST_LIBFOO_INSTALL_CMDS lists the actions to be performed + to install the package, when the package is a host package. The + package must install its files to the directory given by + $(HOST_DIR). All files, including development files such as + headers should be installed, since other packages might be compiled + on top of this package. +
  • +LIBFOO_INSTALL_TARGET_CMDS lists the actions to be + performed to install the package to the target directory, when the + package is a target package. The package must install its files to + the directory given by $(TARGET_DIR). Only the files required for + execution of the package have to be + installed. Header files, static libraries and documentation will be + removed again when the target filesystem is finalized. +
  • +LIBFOO_INSTALL_STAGING_CMDS lists the actions to be + performed to install the package to the staging directory, when the + package is a target package. The package must install its files to + the directory given by $(STAGING_DIR). All development files + should be installed, since they might be needed to compile other + packages. +
  • +LIBFOO_INSTALL_IMAGES_CMDS lists the actions to be performed to + install the package to the images directory, when the package is a + target package. The package must install its files to the directory + given by $(BINARIES_DIR). Only files that are binary images (aka + images) that do not belong in the TARGET_DIR but are necessary + for booting the board should be placed here. For example, a package + should utilize this step if it has binaries which would be similar + to the kernel image, bootloader or root filesystem images. +
  • +LIBFOO_INSTALL_INIT_SYSV, LIBFOO_INSTALL_INIT_OPENRC and + LIBFOO_INSTALL_INIT_SYSTEMD list the actions to install init + scripts either for the systemV-like init systems (busybox, + sysvinit, etc.), openrc or for the systemd units. These commands + will be run only when the relevant init system is installed (i.e. + if systemd is selected as the init system in the configuration, + only LIBFOO_INSTALL_INIT_SYSTEMD will be run). The only exception + is when openrc is chosen as init system and LIBFOO_INSTALL_INIT_OPENRC + has not been set, in such situation LIBFOO_INSTALL_INIT_SYSV will + be called, since openrc supports sysv init scripts. + When systemd is used as the init system, buildroot will automatically enable + all services using the systemctl preset-all command in the final phase of + image building. You can add preset files to prevent a particular unit from + being automatically enabled by buildroot. +
  • +LIBFOO_HELP_CMDS lists the actions to print the package help, which + is included to the main make help output. These commands can print + anything in any format. + This is seldom used, as packages rarely have custom rules. Do not use + this variable, unless you really know that you need to print help. +
  • +LIBFOO_LINUX_CONFIG_FIXUPS lists the Linux kernel configuration + options that are needed to build and use this package, and without + which the package is fundamentally broken. This shall be a set of + calls to one of the kconfig tweaking option: KCONFIG_ENABLE_OPT, + KCONFIG_DISABLE_OPT, or KCONFIG_SET_OPT. + This is seldom used, as package usually have no strict requirements on + the kernel options. +

The preferred way to define these variables is:

define LIBFOO_CONFIGURE_CMDS
+        action 1
+        action 2
+        action 3
+endef

In the action definitions, you can use the following variables:

  • +$(LIBFOO_PKGDIR) contains the path to the directory containing the + libfoo.mk and Config.in files. This variable is useful when it is + necessary to install a file bundled in Buildroot, like a runtime + configuration file, a splashscreen image… +
  • +$(@D), which contains the directory in which the package source + code has been uncompressed. +
  • +$(LIBFOO_DL_DIR) contains the path to the directory where all the downloads + made by Buildroot for libfoo are stored in. +
  • +$(TARGET_CC), $(TARGET_LD), etc. to get the target + cross-compilation utilities +
  • +$(TARGET_CROSS) to get the cross-compilation toolchain prefix +
  • +Of course the $(HOST_DIR), $(STAGING_DIR) and $(TARGET_DIR) + variables to install the packages properly. Those variables point to + the global host, staging and target directories, unless + per-package directory support is used, in which case they point to + the current package host, staging and target directories. In + both cases, it doesn’t make any difference from the package point of + view: it should simply use HOST_DIR, STAGING_DIR and + TARGET_DIR. See Section 8.11, “Top-level parallel build” for more details + about per-package directory support. +

Finally, you can also use hooks. See Section 17.22, “Hooks available in the various build steps” for more information.

17.6. Infrastructure for autotools-based packages

17.6.1. autotools-package tutorial

First, let’s see how to write a .mk file for an autotools-based +package, with an example :

01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_INSTALL_STAGING = YES
+11: LIBFOO_INSTALL_TARGET = NO
+12: LIBFOO_CONF_OPTS = --disable-shared
+13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
+14:
+15: $(eval $(autotools-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball recommended) +and the location of the tarball on the Web. Buildroot will automatically +download the tarball from this location.

On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in output/staging/ +is the directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed in +the staging directory: their development files are needed to compile +other libraries or applications depending on them. Also by default, when +staging installation is enabled, packages are installed in this location +using the make install command.

On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they will +not be used at runtime. By default, target installation is enabled; setting +this variable to NO is almost never needed. Also by default, packages are +installed in this location using the make install command.

On line 12, we tell Buildroot to pass a custom configure option, that +will be passed to the ./configure script before configuring +and building the package.

On line 13, we declare our dependencies, so that they are built +before the build process of our package starts.

Finally, on line line 15, we invoke the autotools-package +macro that generates all the Makefile rules that actually allows the +package to be built.

17.6.2. autotools-package reference

The main macro of the autotools package infrastructure is +autotools-package. It is similar to the generic-package macro. The ability to +have target and host packages is also available, with the +host-autotools-package macro.

Just like the generic infrastructure, the autotools infrastructure +works by defining a number of variables before calling the +autotools-package macro.

First, all the package metadata information variables that exist in the +generic infrastructure also exist in the autotools infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, +LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, +LIBFOO_INSTALL_STAGING, LIBFOO_INSTALL_TARGET.

A few additional variables, specific to the autotools infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them.

  • +LIBFOO_SUBDIR may contain the name of a subdirectory + inside the package that contains the configure script. This is useful, + if for example, the main configure script is not at the root of the + tree extracted by the tarball. If HOST_LIBFOO_SUBDIR is + not specified, it defaults to LIBFOO_SUBDIR. +
  • +LIBFOO_CONF_ENV, to specify additional environment + variables to pass to the configure script. By default, empty. +
  • +LIBFOO_CONF_OPTS, to specify additional configure + options to pass to the configure script. By default, empty. +
  • +LIBFOO_MAKE, to specify an alternate make + command. This is typically useful when parallel make is enabled in + the configuration (using BR2_JLEVEL) but that this + feature should be disabled for the given package, for one reason or + another. By default, set to $(MAKE). If parallel building + is not supported by the package, then it should be set to + LIBFOO_MAKE=$(MAKE1). +
  • +LIBFOO_MAKE_ENV, to specify additional environment + variables to pass to make in the build step. These are passed before + the make command. By default, empty. +
  • +LIBFOO_MAKE_OPTS, to specify additional variables to + pass to make in the build step. These are passed after the + make command. By default, empty. +
  • +LIBFOO_AUTORECONF, tells whether the package should + be autoreconfigured or not (i.e. if the configure script and + Makefile.in files should be re-generated by re-running autoconf, + automake, libtool, etc.). Valid values are YES and + NO. By default, the value is NO +
  • +LIBFOO_AUTORECONF_ENV, to specify additional environment + variables to pass to the autoreconf program if + LIBFOO_AUTORECONF=YES. These are passed in the environment of + the autoreconf command. By default, empty. +
  • +LIBFOO_AUTORECONF_OPTS to specify additional options + passed to the autoreconf program if + LIBFOO_AUTORECONF=YES. By default, empty. +
  • +LIBFOO_GETTEXTIZE, tells whether the package should be + gettextized or not (i.e. if the package uses a different gettext + version than Buildroot provides, and it is needed to run + gettextize.) Only valid when LIBFOO_AUTORECONF=YES. Valid + values are YES and NO. The default is NO. +
  • +LIBFOO_GETTEXTIZE_OPTS, to specify additional options passed to + the gettextize program, if LIBFOO_GETTEXTIZE=YES. You may + use that if, for example, the .po files are not located in the + standard place (i.e. in po/ at the root of the package.) By + default, -f. +
  • +LIBFOO_LIBTOOL_PATCH tells whether the Buildroot + patch to fix libtool cross-compilation issues should be applied or + not. Valid values are YES and NO. By + default, the value is YES +
  • +LIBFOO_INSTALL_STAGING_OPTS contains the make options + used to install the package to the staging directory. By default, the + value is DESTDIR=$(STAGING_DIR) install, which is + correct for most autotools packages. It is still possible to override + it. +
  • +LIBFOO_INSTALL_TARGET_OPTS contains the make options + used to install the package to the target directory. By default, the + value is DESTDIR=$(TARGET_DIR) install. The default + value is correct for most autotools packages, but it is still possible + to override it if needed. +

With the autotools infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most autotools-based packages. However, when required, it is +still possible to customize what is done in any particular step:

  • +By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the various build steps” for details. +
  • +By overriding one of the steps. For example, even if the autotools + infrastructure is used, if the package .mk file defines its + own LIBFOO_CONFIGURE_CMDS variable, it will be used + instead of the default autotools one. However, using this method + should be restricted to very specific cases. Do not use it in the + general case. +

17.7. Infrastructure for CMake-based packages

17.7.1. cmake-package tutorial

First, let’s see how to write a .mk file for a CMake-based package, +with an example :

01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_INSTALL_STAGING = YES
+11: LIBFOO_INSTALL_TARGET = NO
+12: LIBFOO_CONF_OPTS = -DBUILD_DEMOS=ON
+13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
+14:
+15: $(eval $(cmake-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball recommended) +and the location of the tarball on the Web. Buildroot will automatically +download the tarball from this location.

On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in output/staging/ +is the directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed in +the staging directory: their development files are needed to compile +other libraries or applications depending on them. Also by default, when +staging installation is enabled, packages are installed in this location +using the make install command.

On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they will +not be used at runtime. By default, target installation is enabled; setting +this variable to NO is almost never needed. Also by default, packages are +installed in this location using the make install command.

On line 12, we tell Buildroot to pass custom options to CMake when it is +configuring the package.

On line 13, we declare our dependencies, so that they are built +before the build process of our package starts.

Finally, on line line 15, we invoke the cmake-package +macro that generates all the Makefile rules that actually allows the +package to be built.

17.7.2. cmake-package reference

The main macro of the CMake package infrastructure is +cmake-package. It is similar to the generic-package macro. The ability to +have target and host packages is also available, with the +host-cmake-package macro.

Just like the generic infrastructure, the CMake infrastructure works +by defining a number of variables before calling the cmake-package +macro.

First, all the package metadata information variables that exist in +the generic infrastructure also exist in the CMake infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET.

A few additional variables, specific to the CMake infrastructure, can +also be defined. Many of them are only useful in very specific cases, +typical packages will therefore only use a few of them.

  • +LIBFOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main CMakeLists.txt file. This is useful, + if for example, the main CMakeLists.txt file is not at the root of + the tree extracted by the tarball. If HOST_LIBFOO_SUBDIR is not + specified, it defaults to LIBFOO_SUBDIR. +
  • +LIBFOO_CONF_ENV, to specify additional environment variables to + pass to CMake. By default, empty. +
  • +LIBFOO_CONF_OPTS, to specify additional configure options to pass + to CMake. By default, empty. A number of common CMake options are + set by the cmake-package infrastructure; so it is normally not + necessary to set them in the package’s *.mk file unless you want + to override them: +

    • +CMAKE_BUILD_TYPE is driven by BR2_ENABLE_DEBUG; +
    • +CMAKE_INSTALL_PREFIX; +
    • +BUILD_SHARED_LIBS is driven by BR2_STATIC_LIBS; +
    • +BUILD_DOC, BUILD_DOCS are disabled; +
    • +BUILD_EXAMPLE, BUILD_EXAMPLES are disabled; +
    • +BUILD_TEST, BUILD_TESTS, BUILD_TESTING are disabled. +
  • +LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO should be set when the package + cannot be built inside the source tree but needs a separate build + directory. +
  • +LIBFOO_MAKE, to specify an alternate make command. This is + typically useful when parallel make is enabled in the configuration + (using BR2_JLEVEL) but that this feature should be disabled for + the given package, for one reason or another. By default, set to + $(MAKE). If parallel building is not supported by the package, + then it should be set to LIBFOO_MAKE=$(MAKE1). +
  • +LIBFOO_MAKE_ENV, to specify additional environment variables to + pass to make in the build step. These are passed before the make + command. By default, empty. +
  • +LIBFOO_MAKE_OPTS, to specify additional variables to pass to make + in the build step. These are passed after the make command. By + default, empty. +
  • +LIBFOO_INSTALL_STAGING_OPTS contains the make options used to + install the package to the staging directory. By default, the value + is DESTDIR=$(STAGING_DIR) install, which is correct for most + CMake packages. It is still possible to override it. +
  • +LIBFOO_INSTALL_TARGET_OPTS contains the make options used to + install the package to the target directory. By default, the value + is DESTDIR=$(TARGET_DIR) install. The default value is correct + for most CMake packages, but it is still possible to override it if + needed. +

With the CMake infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most CMake-based packages. However, when required, it is still +possible to customize what is done in any particular step:

  • +By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the various build steps” for details. +
  • +By overriding one of the steps. For example, even if the CMake + infrastructure is used, if the package .mk file defines its own + LIBFOO_CONFIGURE_CMDS variable, it will be used instead of the + default CMake one. However, using this method should be restricted + to very specific cases. Do not use it in the general case. +

17.8. Infrastructure for Python packages

This infrastructure applies to Python packages that use the standard +Python setuptools mechanism as their build system, generally +recognizable by the usage of a setup.py script.

17.8.1. python-package tutorial

First, let’s see how to write a .mk file for a Python package, +with an example :

01: ################################################################################
+02: #
+03: # python-foo
+04: #
+05: ################################################################################
+06:
+07: PYTHON_FOO_VERSION = 1.0
+08: PYTHON_FOO_SOURCE = python-foo-$(PYTHON_FOO_VERSION).tar.xz
+09: PYTHON_FOO_SITE = http://www.foosoftware.org/download
+10: PYTHON_FOO_LICENSE = BSD-3-Clause
+11: PYTHON_FOO_LICENSE_FILES = LICENSE
+12: PYTHON_FOO_ENV = SOME_VAR=1
+13: PYTHON_FOO_DEPENDENCIES = libmad
+14: PYTHON_FOO_SETUP_TYPE = distutils
+15:
+16: $(eval $(python-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location.

On line 10 and 11, we give licensing details about the package (its +license on line 10, and the file containing the license text on line +11).

On line 12, we tell Buildroot to pass custom options to the Python +setup.py script when it is configuring the package.

On line 13, we declare our dependencies, so that they are built +before the build process of our package starts.

On line 14, we declare the specific Python build system being used. In +this case the distutils Python build system is used. The two +supported ones are distutils and setuptools.

Finally, on line 16, we invoke the python-package macro that +generates all the Makefile rules that actually allow the package to be +built.

17.8.2. python-package reference

As a policy, packages that merely provide Python modules should all be +named python-<something> in Buildroot. Other packages that use the +Python build system, but are not Python modules, can freely choose +their name (existing examples in Buildroot are scons and +supervisor).

Packages that are only compatible with one version of Python (as in: +Python 2 or Python 3) should depend on that version explicitely in +their Config.in file (BR2_PACKAGE_PYTHON for Python 2, +BR2_PACKAGE_PYTHON3 for Python 3). Packages that are compatible +with both versions should not explicitely depend on them in their +Config.in file, since that condition is already expressed for the +whole "External python modules" menu.

The main macro of the Python package infrastructure is +python-package. It is similar to the generic-package macro. It is +also possible to create Python host packages with the +host-python-package macro.

Just like the generic infrastructure, the Python infrastructure works +by defining a number of variables before calling the python-package +or host-python-package macros.

All the package metadata information variables that exist in the +generic package infrastructure also +exist in the Python infrastructure: PYTHON_FOO_VERSION, +PYTHON_FOO_SOURCE, PYTHON_FOO_PATCH, PYTHON_FOO_SITE, +PYTHON_FOO_SUBDIR, PYTHON_FOO_DEPENDENCIES, PYTHON_FOO_LICENSE, +PYTHON_FOO_LICENSE_FILES, PYTHON_FOO_INSTALL_STAGING, etc.

Note that:

  • +It is not necessary to add python or host-python in the + PYTHON_FOO_DEPENDENCIES variable of a package, since these basic + dependencies are automatically added as needed by the Python + package infrastructure. +
  • +Similarly, it is not needed to add host-setuptools to + PYTHON_FOO_DEPENDENCIES for setuptools-based packages, since it’s + automatically added by the Python infrastructure as needed. +

One variable specific to the Python infrastructure is mandatory:

  • +PYTHON_FOO_SETUP_TYPE, to define which Python build system is used + by the package. The two supported values are distutils and + setuptools. If you don’t know which one is used in your package, + look at the setup.py file in your package source code, and see + whether it imports things from the distutils module or the + setuptools module. +

A few additional variables, specific to the Python infrastructure, can +optionally be defined, depending on the package’s needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none.

  • +PYTHON_FOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main setup.py file. This is useful, + if for example, the main setup.py file is not at the root of + the tree extracted by the tarball. If HOST_PYTHON_FOO_SUBDIR is not + specified, it defaults to PYTHON_FOO_SUBDIR. +
  • +PYTHON_FOO_ENV, to specify additional environment variables to + pass to the Python setup.py script (for both the build and install + steps). Note that the infrastructure is automatically passing + several standard variables, defined in PKG_PYTHON_DISTUTILS_ENV + (for distutils target packages), HOST_PKG_PYTHON_DISTUTILS_ENV + (for distutils host packages), PKG_PYTHON_SETUPTOOLS_ENV (for + setuptools target packages) and HOST_PKG_PYTHON_SETUPTOOLS_ENV + (for setuptools host packages). +
  • +PYTHON_FOO_BUILD_OPTS, to specify additional options to pass to the + Python setup.py script during the build step. For target distutils + packages, the PKG_PYTHON_DISTUTILS_BUILD_OPTS options are already + passed automatically by the infrastructure. +
  • +PYTHON_FOO_INSTALL_TARGET_OPTS, PYTHON_FOO_INSTALL_STAGING_OPTS, + HOST_PYTHON_FOO_INSTALL_OPTS to specify additional options to pass + to the Python setup.py script during the target installation step, + the staging installation step or the host installation, + respectively. Note that the infrastructure is automatically passing + some options, defined in PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS + or PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS (for target distutils + packages), HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS (for host + distutils packages), PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS or + PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS (for target setuptools + packages) and HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS (for host + setuptools packages). +
  • +HOST_PYTHON_FOO_NEEDS_HOST_PYTHON, to define the host python + interpreter. The usage of this variable is limited to host + packages. The two supported value are python2 and python3. It + will ensure the right host python package is available and will + invoke it for the build. If some build steps are overloaded, the + right python interpreter must be explicitly called in the commands. +

With the Python infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most Python-based packages. However, when required, it is still +possible to customize what is done in any particular step:

  • +By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the various build steps” for details. +
  • +By overriding one of the steps. For example, even if the Python + infrastructure is used, if the package .mk file defines its own + PYTHON_FOO_BUILD_CMDS variable, it will be used instead of the + default Python one. However, using this method should be restricted + to very specific cases. Do not use it in the general case. +

17.8.3. Generating a python-package from a PyPI repository

If the Python package for which you would like to create a Buildroot +package is available on PyPI, you may want to use the scanpypi tool +located in utils/ to automate the process.

You can find the list of existing PyPI packages +here.

scanpypi requires Python’s setuptools package to be installed on +your host.

When at the root of your buildroot directory just do :

utils/scanpypi foo bar -o package

This will generate packages python-foo and python-bar in the package +folder if they exist on https://pypi.python.org.

Find the external python modules menu and insert your package inside. +Keep in mind that the items inside a menu should be in alphabetical order.

Please keep in mind that you’ll most likely have to manually check the +package for any mistakes as there are things that cannot be guessed by +the generator (e.g. dependencies on any of the python core modules +such as BR2_PACKAGE_PYTHON_ZLIB). Also, please take note that the +license and license files are guessed and must be checked. You also +need to manually add the package to the package/Config.in file.

If your Buildroot package is not in the official Buildroot tree but in +a br2-external tree, use the -o flag as follows:

utils/scanpypi foo bar -o other_package_dir

This will generate packages python-foo and python-bar in the +other_package_directory instead of package.

Option -h will list the available options:

utils/scanpypi -h

17.8.4. python-package CFFI backend

C Foreign Function Interface for Python (CFFI) provides a convenient +and reliable way to call compiled C code from Python using interface +declarations written in C. Python packages relying on this backend can +be identified by the appearance of a cffi dependency in the +install_requires field of their setup.py file.

Such a package should:

  • +add python-cffi as a runtime dependency in order to install the +compiled C library wrapper on the target. This is achieved by adding +select BR2_PACKAGE_PYTHON_CFFI to the package Config.in. +
config BR2_PACKAGE_PYTHON_FOO
+        bool "python-foo"
+        select BR2_PACKAGE_PYTHON_CFFI # runtime
  • +add host-python-cffi as a build-time dependency in order to +cross-compile the C wrapper. This is achieved by adding +host-python-cffi to the PYTHON_FOO_DEPENDENCIES variable. +
################################################################################
+#
+# python-foo
+#
+################################################################################
+
+...
+
+PYTHON_FOO_DEPENDENCIES = host-python-cffi
+
+$(eval $(python-package))

17.9. Infrastructure for LuaRocks-based packages

17.9.1. luarocks-package tutorial

First, let’s see how to write a .mk file for a LuaRocks-based package, +with an example :

01: ################################################################################
+02: #
+03: # lua-foo
+04: #
+05: ################################################################################
+06:
+07: LUA_FOO_VERSION = 1.0.2-1
+08: LUA_FOO_NAME_UPSTREAM = foo
+09: LUA_FOO_DEPENDENCIES = bar
+10:
+11: LUA_FOO_BUILD_OPTS += BAR_INCDIR=$(STAGING_DIR)/usr/include
+12: LUA_FOO_BUILD_OPTS += BAR_LIBDIR=$(STAGING_DIR)/usr/lib
+13: LUA_FOO_LICENSE = luaFoo license
+14: LUA_FOO_LICENSE_FILES = $(LUA_FOO_SUBDIR)/COPYING
+15:
+16: $(eval $(luarocks-package))

On line 7, we declare the version of the package (the same as in the rockspec, +which is the concatenation of the upstream version and the rockspec revision, +separated by a hyphen -).

On line 8, we declare that the package is called "foo" on LuaRocks. In +Buildroot, we give Lua-related packages a name that starts with "lua", so the +Buildroot name is different from the upstream name. LUA_FOO_NAME_UPSTREAM +makes the link between the two names.

On line 9, we declare our dependencies against native libraries, so that they +are built before the build process of our package starts.

On lines 11-12, we tell Buildroot to pass custom options to LuaRocks when it is +building the package.

On lines 13-14, we specify the licensing terms for the package.

Finally, on line 16, we invoke the luarocks-package +macro that generates all the Makefile rules that actually allows the +package to be built.

Most of these details can be retrieved from the rock and rockspec. +So, this file and the Config.in file can be generated by running the +command luarocks buildroot foo lua-foo in the Buildroot +directory. This command runs a specific Buildroot addon of luarocks +that will automatically generate a Buildroot package. The result must +still be manually inspected and possibly modified.

  • +The package/Config.in file has to be updated manually to include the + generated Config.in files. +

17.9.2. luarocks-package reference

LuaRocks is a deployment and management system for Lua modules, and supports +various build.type: builtin, make and cmake. In the context of +Buildroot, the luarocks-package infrastructure only supports the builtin +mode. LuaRocks packages that use the make or cmake build mechanisms +should instead be packaged using the generic-package and cmake-package +infrastructures in Buildroot, respectively.

The main macro of the LuaRocks package infrastructure is luarocks-package: +like generic-package it works by defining a number of variables providing +metadata information about the package, and then calling luarocks-package.

Just like the generic infrastructure, the LuaRocks infrastructure works +by defining a number of variables before calling the luarocks-package +macro.

First, all the package metadata information variables that exist in +the generic infrastructure also exist in the LuaRocks infrastructure: +LUA_FOO_VERSION, LUA_FOO_SOURCE, LUA_FOO_SITE, +LUA_FOO_DEPENDENCIES, LUA_FOO_LICENSE, LUA_FOO_LICENSE_FILES.

Two of them are populated by the LuaRocks infrastructure (for the +download step). If your package is not hosted on the LuaRocks mirror +$(BR2_LUAROCKS_MIRROR), you can override them:

  • +LUA_FOO_SITE, which defaults to $(BR2_LUAROCKS_MIRROR) +
  • +LUA_FOO_SOURCE, which defaults to + $(lowercase LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).src.rock +

A few additional variables, specific to the LuaRocks infrastructure, are +also defined. They can be overridden in specific cases.

  • +LUA_FOO_NAME_UPSTREAM, which defaults to lua-foo, i.e. the Buildroot + package name +
  • +LUA_FOO_ROCKSPEC, which defaults to + $(lowercase LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).rockspec +
  • +LUA_FOO_SUBDIR, which defaults to + $(LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION_WITHOUT_ROCKSPEC_REVISION) +
  • +LUA_FOO_BUILD_OPTS contains additional build options for the + luarocks build call. +

17.10. Infrastructure for Perl/CPAN packages

17.10.1. perl-package tutorial

First, let’s see how to write a .mk file for a Perl/CPAN package, +with an example :

01: ################################################################################
+02: #
+03: # perl-foo-bar
+04: #
+05: ################################################################################
+06:
+07: PERL_FOO_BAR_VERSION = 0.02
+08: PERL_FOO_BAR_SOURCE = Foo-Bar-$(PERL_FOO_BAR_VERSION).tar.gz
+09: PERL_FOO_BAR_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER
+10: PERL_FOO_BAR_DEPENDENCIES = perl-strictures
+11: PERL_FOO_BAR_LICENSE = Artistic or GPL-1.0+
+12: PERL_FOO_BAR_LICENSE_FILES = LICENSE
+13: PERL_FOO_BAR_DISTNAME = Foo-Bar
+14:
+15: $(eval $(perl-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball and the location +of the tarball on a CPAN server. Buildroot will automatically download +the tarball from this location.

On line 10, we declare our dependencies, so that they are built +before the build process of our package starts.

On line 11 and 12, we give licensing details about the package (its +license on line 11, and the file containing the license text on line +12).

On line 13, the name of the distribution as needed by the script +utils/scancpan (in order to regenerate/upgrade these package files).

Finally, on line 15, we invoke the perl-package macro that +generates all the Makefile rules that actually allow the package to be +built.

Most of these data can be retrieved from https://metacpan.org/. +So, this file and the Config.in can be generated by running +the script utils/scancpan Foo-Bar in the Buildroot directory +(or in a br2-external tree). +This script creates a Config.in file and foo-bar.mk file for the +requested package, and also recursively for all dependencies specified by +CPAN. You should still manually edit the result. In particular, the +following things should be checked.

  • +If the perl module links with a shared library that is provided by + another (non-perl) package, this dependency is not added automatically. + It has to be added manually to PERL_FOO_BAR_DEPENDENCIES. +
  • +The package/Config.in file has to be updated manually to include the + generated Config.in files. As a hint, the scancpan script prints out + the required source "…" statements, sorted alphabetically. +

17.10.2. perl-package reference

As a policy, packages that provide Perl/CPAN modules should all be +named perl-<something> in Buildroot.

This infrastructure handles various Perl build systems : +ExtUtils-MakeMaker (EUMM), Module-Build (MB) and Module-Build-Tiny. +Build.PL is preferred by default when a package provides a Makefile.PL +and a Build.PL.

The main macro of the Perl/CPAN package infrastructure is +perl-package. It is similar to the generic-package macro. The ability to +have target and host packages is also available, with the +host-perl-package macro.

Just like the generic infrastructure, the Perl/CPAN infrastructure +works by defining a number of variables before calling the +perl-package macro.

First, all the package metadata information variables that exist in the +generic infrastructure also exist in the Perl/CPAN infrastructure: +PERL_FOO_VERSION, PERL_FOO_SOURCE, +PERL_FOO_PATCH, PERL_FOO_SITE, +PERL_FOO_SUBDIR, PERL_FOO_DEPENDENCIES, +PERL_FOO_INSTALL_TARGET.

Note that setting PERL_FOO_INSTALL_STAGING to YES has no effect +unless a PERL_FOO_INSTALL_STAGING_CMDS variable is defined. The perl +infrastructure doesn’t define these commands since Perl modules generally +don’t need to be installed to the staging directory.

A few additional variables, specific to the Perl/CPAN infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them.

  • +PERL_FOO_PREFER_INSTALLER/HOST_PERL_FOO_PREFER_INSTALLER, + specifies the preferred installation method. Possible values are + EUMM (for Makefile.PL based installation using + ExtUtils-MakeMaker) and MB (for Build.PL based installation + using Module-Build). This variable is only used when the package + provides both installation methods. +
  • +PERL_FOO_CONF_ENV/HOST_PERL_FOO_CONF_ENV, to specify additional + environment variables to pass to the perl Makefile.PL or perl Build.PL. + By default, empty. +
  • +PERL_FOO_CONF_OPTS/HOST_PERL_FOO_CONF_OPTS, to specify additional + configure options to pass to the perl Makefile.PL or perl Build.PL. + By default, empty. +
  • +PERL_FOO_BUILD_OPTS/HOST_PERL_FOO_BUILD_OPTS, to specify additional + options to pass to make pure_all or perl Build build in the build step. + By default, empty. +
  • +PERL_FOO_INSTALL_TARGET_OPTS, to specify additional options to + pass to make pure_install or perl Build install in the install step. + By default, empty. +
  • +HOST_PERL_FOO_INSTALL_OPTS, to specify additional options to + pass to make pure_install or perl Build install in the install step. + By default, empty. +

17.11. Infrastructure for virtual packages

In Buildroot, a virtual package is a package whose functionalities are +provided by one or more packages, referred to as providers. The virtual +package management is an extensible mechanism allowing the user to choose +the provider used in the rootfs.

For example, OpenGL ES is an API for 2D and 3D graphics on embedded systems. +The implementation of this API is different for the Allwinner Tech Sunxi and +the Texas Instruments OMAP35xx platforms. So libgles will be a virtual +package and sunxi-mali and ti-gfx will be the providers.

17.11.1. virtual-package tutorial

In the following example, we will explain how to add a new virtual package +(something-virtual) and a provider for it (some-provider).

First, let’s create the virtual package.

17.11.2. Virtual package’s Config.in file

The Config.in file of virtual package something-virtual should contain:

01: config BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+02:     bool
+03:
+04: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL
+05:     depends on BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+06:     string

In this file, we declare two options, BR2_PACKAGE_HAS_SOMETHING_VIRTUAL and +BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL, whose values will be used by the +providers.

17.11.3. Virtual package’s .mk file

The .mk for the virtual package should just evaluate the virtual-package macro:

01: ################################################################################
+02: #
+03: # something-virtual
+04: #
+05: ################################################################################
+06:
+07: $(eval $(virtual-package))

The ability to have target and host packages is also available, with the +host-virtual-package macro.

17.11.4. Provider’s Config.in file

When adding a package as a provider, only the Config.in file requires some +modifications.

The Config.in file of the package some-provider, which provides the +functionalities of something-virtual, should contain:

01: config BR2_PACKAGE_SOME_PROVIDER
+02:     bool "some-provider"
+03:     select BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+04:     help
+05:       This is a comment that explains what some-provider is.
+06:
+07:       http://foosoftware.org/some-provider/
+08:
+09: if BR2_PACKAGE_SOME_PROVIDER
+10: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL
+11:     default "some-provider"
+12: endif

On line 3, we select BR2_PACKAGE_HAS_SOMETHING_VIRTUAL, and on line 11, we +set the value of BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL to the name of the +provider, but only if it is selected.

17.11.5. Provider’s .mk file

The .mk file should also declare an additional variable +SOME_PROVIDER_PROVIDES to contain the names of all the virtual +packages it is an implementation of:

01: SOME_PROVIDER_PROVIDES = something-virtual

Of course, do not forget to add the proper build and runtime dependencies for +this package!

17.11.6. Notes on depending on a virtual package

When adding a package that requires a certain FEATURE provided by a virtual +package, you have to use depends on BR2_PACKAGE_HAS_FEATURE, like so:

config BR2_PACKAGE_HAS_FEATURE
+    bool
+
+config BR2_PACKAGE_FOO
+    bool "foo"
+    depends on BR2_PACKAGE_HAS_FEATURE

17.11.7. Notes on depending on a specific provider

If your package really requires a specific provider, then you’ll have to +make your package depends on this provider; you can not select a +provider.

Let’s take an example with two providers for a FEATURE:

config BR2_PACKAGE_HAS_FEATURE
+    bool
+
+config BR2_PACKAGE_FOO
+    bool "foo"
+    select BR2_PACKAGE_HAS_FEATURE
+
+config BR2_PACKAGE_BAR
+    bool "bar"
+    select BR2_PACKAGE_HAS_FEATURE

And you are adding a package that needs FEATURE as provided by foo, +but not as provided by bar.

If you were to use select BR2_PACKAGE_FOO, then the user would still +be able to select BR2_PACKAGE_BAR in the menuconfig. This would create +a configuration inconsistency, whereby two providers of the same FEATURE +would be enabled at once, one explicitly set by the user, the other +implicitly by your select.

Instead, you have to use depends on BR2_PACKAGE_FOO, which avoids any +implicit configuration inconsistency.

17.12. Infrastructure for packages using kconfig for configuration files

A popular way for a software package to handle user-specified +configuration is kconfig. Among others, it is used by the Linux +kernel, Busybox, and Buildroot itself. The presence of a .config file +and a menuconfig target are two well-known symptoms of kconfig being +used.

Buildroot features an infrastructure for packages that use kconfig for +their configuration. This infrastructure provides the necessary logic to +expose the package’s menuconfig target as foo-menuconfig in +Buildroot, and to handle the copying back and forth of the configuration +file in a correct way.

The kconfig-package infrastructure is based on the generic-package +infrastructure. All variables supported by generic-package are +available in kconfig-package as well. See +Section 17.5.2, “generic-package reference” for more details.

In order to use the kconfig-package infrastructure for a Buildroot +package, the minimally required lines in the .mk file, in addition to +the variables required by the generic-package infrastructure, are:

FOO_KCONFIG_FILE = reference-to-source-configuration-file
+
+$(eval $(kconfig-package))

This snippet creates the following make targets:

  • +foo-menuconfig, which calls the package’s menuconfig target +
  • +foo-update-config, which copies the configuration back to the + source configuration file. It is not possible to use this target + when fragment files are set. +
  • +foo-update-defconfig, which copies the configuration back to the + source configuration file. The configuration file will only list the + options that differ from the default values. It is not possible to + use this target when fragment files are set. +
  • +foo-diff-config, which outputs the differences between the current + configuration and the one defined in the Buildroot configuration for + this kconfig package. The output is useful to identify the + configuration changes that may have to be propagated to + configuration fragments for example. +

and ensures that the source configuration file is copied to the build +directory at the right moment.

There are two options to specify a configuration file to use, either +FOO_KCONFIG_FILE (as in the example, above) or FOO_KCONFIG_DEFCONFIG. +It is mandatory to provide either, but not both:

  • +FOO_KCONFIG_FILE specifies the path to a defconfig or full-config file + to be used to configure the package. +
  • +FOO_KCONFIG_DEFCONFIG specifies the defconfig make rule to call to + configure the package. +

In addition to these minimally required lines, several optional variables can +be set to suit the needs of the package under consideration:

  • +FOO_KCONFIG_EDITORS: a space-separated list of kconfig editors to + support, for example menuconfig xconfig. By default, menuconfig. +
  • +FOO_KCONFIG_FRAGMENT_FILES: a space-separated list of configuration + fragment files that are merged to the main configuration file. + Fragment files are typically used when there is a desire to stay in sync + with an upstream (def)config file, with some minor modifications. +
  • +FOO_KCONFIG_OPTS: extra options to pass when calling the kconfig + editors. This may need to include $(FOO_MAKE_OPTS), for example. By + default, empty. +
  • +FOO_KCONFIG_FIXUP_CMDS: a list of shell commands needed to fixup the + configuration file after copying it or running a kconfig editor. Such + commands may be needed to ensure a configuration consistent with other + configuration of Buildroot, for example. By default, empty. +
  • +FOO_KCONFIG_DOTCONFIG: path (with filename) of the .config file, + relative to the package source tree. The default, .config, should + be well suited for all packages that use the standard kconfig + infrastructure as inherited from the Linux kernel; some packages use + a derivative of kconfig that use a different location. +
  • +FOO_KCONFIG_DEPENDENCIES: the list of packages (most probably, host + packages) that need to be built before this package’s kconfig is + interpreted. Seldom used. By default, empty. +

17.13. Infrastructure for rebar-based packages

17.13.1. rebar-package tutorial

First, let’s see how to write a .mk file for a rebar-based package, +with an example :

01: ################################################################################
+02: #
+03: # erlang-foobar
+04: #
+05: ################################################################################
+06:
+07: ERLANG_FOOBAR_VERSION = 1.0
+08: ERLANG_FOOBAR_SOURCE = erlang-foobar-$(ERLANG_FOOBAR_VERSION).tar.xz
+09: ERLANG_FOOBAR_SITE = http://www.foosoftware.org/download
+10: ERLANG_FOOBAR_DEPENDENCIES = host-libaaa libbbb
+11:
+12: $(eval $(rebar-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location.

On line 10, we declare our dependencies, so that they are built +before the build process of our package starts.

Finally, on line 12, we invoke the rebar-package macro that +generates all the Makefile rules that actually allows the package to +be built.

17.13.2. rebar-package reference

The main macro of the rebar package infrastructure is +rebar-package. It is similar to the generic-package macro. The +ability to have host packages is also available, with the +host-rebar-package macro.

Just like the generic infrastructure, the rebar infrastructure works +by defining a number of variables before calling the rebar-package +macro.

First, all the package metadata information variables that exist in +the generic infrastructure also exist in the rebar infrastructure: +ERLANG_FOOBAR_VERSION, ERLANG_FOOBAR_SOURCE, +ERLANG_FOOBAR_PATCH, ERLANG_FOOBAR_SITE, +ERLANG_FOOBAR_SUBDIR, ERLANG_FOOBAR_DEPENDENCIES, +ERLANG_FOOBAR_INSTALL_STAGING, ERLANG_FOOBAR_INSTALL_TARGET, +ERLANG_FOOBAR_LICENSE and ERLANG_FOOBAR_LICENSE_FILES.

A few additional variables, specific to the rebar infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them.

  • +ERLANG_FOOBAR_USE_AUTOCONF, to specify that the package uses + autoconf at the configuration step. When a package sets this + variable to YES, the autotools infrastructure is used. +

    Note. You can also use some of the variables from the autotools + infrastructure: ERLANG_FOOBAR_CONF_ENV, ERLANG_FOOBAR_CONF_OPTS, + ERLANG_FOOBAR_AUTORECONF, ERLANG_FOOBAR_AUTORECONF_ENV and + ERLANG_FOOBAR_AUTORECONF_OPTS.

  • +ERLANG_FOOBAR_USE_BUNDLED_REBAR, to specify that the package has + a bundled version of rebar and that it shall be used. Valid + values are YES or NO (the default). +

    Note. If the package bundles a rebar utility, but can use the generic + one that Buildroot provides, just say NO (i.e., do not specify + this variable). Only set if it is mandatory to use the rebar + utility bundled in this package.

  • +ERLANG_FOOBAR_REBAR_ENV, to specify additional environment + variables to pass to the rebar utility. +
  • +ERLANG_FOOBAR_KEEP_DEPENDENCIES, to keep the dependencies + described in the rebar.config file. Valid values are YES or NO + (the default). Unless this variable is set to YES, the rebar + infrastructure removes such dependencies in a post-patch hook to + ensure rebar does not download nor compile them. +

With the rebar infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most rebar-based packages. However, when required, it is +still possible to customize what is done in any particular step:

  • +By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the various build steps” for details. +
  • +By overriding one of the steps. For example, even if the rebar + infrastructure is used, if the package .mk file defines its + own ERLANG_FOOBAR_BUILD_CMDS variable, it will be used instead + of the default rebar one. However, using this method should be + restricted to very specific cases. Do not use it in the general + case. +

17.14. Infrastructure for Waf-based packages

17.14.1. waf-package tutorial

First, let’s see how to write a .mk file for a Waf-based package, with +an example :

01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_CONF_OPTS = --enable-bar --disable-baz
+11: LIBFOO_DEPENDENCIES = bar
+12:
+13: $(eval $(waf-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location.

On line 10, we tell Buildroot what options to enable for libfoo.

On line 11, we tell Buildroot the dependencies of libfoo.

Finally, on line line 13, we invoke the waf-package +macro that generates all the Makefile rules that actually allows the +package to be built.

17.14.2. waf-package reference

The main macro of the Waf package infrastructure is waf-package. +It is similar to the generic-package macro.

Just like the generic infrastructure, the Waf infrastructure works +by defining a number of variables before calling the waf-package +macro.

First, all the package metadata information variables that exist in +the generic infrastructure also exist in the Waf infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET.

An additional variable, specific to the Waf infrastructure, can +also be defined.

  • +LIBFOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main wscript file. This is useful, + if for example, the main wscript file is not at the root of + the tree extracted by the tarball. If HOST_LIBFOO_SUBDIR is not + specified, it defaults to LIBFOO_SUBDIR. +
  • +LIBFOO_NEEDS_EXTERNAL_WAF can be set to YES or NO to tell + Buildroot to use the bundled waf executable. If set to NO, the + default, then Buildroot will use the waf executable provided in the + package source tree; if set to YES, then Buildroot will download, + install waf as a host tool and use it to build the package. +
  • +LIBFOO_WAF_OPTS, to specify additional options to pass to the + waf script at every step of the package build process: configure, + build and installation. By default, empty. +
  • +LIBFOO_CONF_OPTS, to specify additional options to pass to the + waf script for the configuration step. By default, empty. +
  • +LIBFOO_BUILD_OPTS, to specify additional options to pass to the + waf script during the build step. By default, empty. +
  • +LIBFOO_INSTALL_STAGING_OPTS, to specify additional options to pass + to the waf script during the staging installation step. By default, + empty. +
  • +LIBFOO_INSTALL_TARGET_OPTS, to specify additional options to pass + to the waf script during the target installation step. By default, + empty. +

17.15. Infrastructure for Meson-based packages

17.15.1. meson-package tutorial

Meson is an open source build system meant to be both +extremely fast, and, even more importantly, as user friendly as possible. It +uses Ninja as a companion tool to perform the actual +build operations.

Let’s see how to write a .mk file for a Meson-based package, with an example:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: FOO_VERSION = 1.0
+08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
+09: FOO_SITE = http://www.foosoftware.org/download
+10: FOO_LICENSE = GPL-3.0+
+11: FOO_LICENSE_FILES = COPYING
+12: FOO_INSTALL_STAGING = YES
+13:
+14: FOO_DEPENDENCIES = host-pkgconf bar
+15:
+16: ifeq ($(BR2_PACKAGE_BAZ),y)
+17: FOO_CONF_OPTS += -Dbaz=true
+18: FOO_DEPENDENCIES += baz
+19: else
+20: FOO_CONF_OPTS += -Dbaz=false
+21: endif
+22:
+23: $(eval $(meson-package))

The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11).

On line line 23, we invoke the meson-package macro that generates all the +Makefile rules that actually allows the package to be built.

In the example, host-pkgconf and bar are declared as dependencies in +FOO_DEPENDENCIES at line 14 because the Meson build file of foo uses +pkg-config to determine the compilation flags and libraries of package bar.

Note that it is not necessary to add host-meson in the FOO_DEPENDENCIES +variable of a package, since this basic dependency is automatically added as +needed by the Meson package infrastructure.

If the "baz" package is selected, then support for the "baz" feature in "foo" is +activated by adding -Dbaz=true to FOO_CONF_OPTS at line 17, as specified in +the meson_options.txt file in "foo" source tree. The "baz" package is also +added to FOO_DEPENDENCIES. Note that the support for baz is explicitly +disabled at line 20, if the package is not selected.

To sum it up, to add a new meson-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of FOO with the +uppercase name of the new package and update the values of the standard +variables.

17.15.2. meson-package reference

The main macro of the Meson package infrastructure is meson-package. It is +similar to the generic-package macro. The ability to have target and host +packages is also available, with the host-meson-package macro.

Just like the generic infrastructure, the Meson infrastructure works by defining +a number of variables before calling the meson-package macro.

First, all the package metadata information variables that exist in the generic +infrastructure also exist in the Meson infrastructure: FOO_VERSION, +FOO_SOURCE, FOO_PATCH, FOO_SITE, FOO_SUBDIR, FOO_DEPENDENCIES, +FOO_INSTALL_STAGING, FOO_INSTALL_TARGET.

A few additional variables, specific to the Meson infrastructure, can also be +defined. Many of them are only useful in very specific cases, typical packages +will therefore only use a few of them.

  • +FOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main meson.build file. This is useful, + if for example, the main meson.build file is not at the root of + the tree extracted by the tarball. If HOST_FOO_SUBDIR is not + specified, it defaults to FOO_SUBDIR. +
  • +FOO_CONF_ENV, to specify additional environment variables to pass to + meson for the configuration step. By default, empty. +
  • +FOO_CONF_OPTS, to specify additional options to pass to meson for the + configuration step. By default, empty. +
  • +FOO_CFLAGS, to specify compiler arguments added to the package specific + cross-compile.conf file c_args property. By default, the value of + TARGET_CFLAGS. +
  • +FOO_CXXFLAGS, to specify compiler arguments added to the package specific + cross-compile.conf file cpp_args property. By default, the value of + TARGET_CXXFLAGS. +
  • +FOO_LDFLAGS, to specify compiler arguments added to the package specific + cross-compile.conf file c_link_args and cpp_link_args properties. By + default, the value of TARGET_LDFLAGS. +
  • +FOO_MESON_EXTRA_BINARIES, to specify a space-separated list of programs + to add to the [binaries] section of the meson cross-compilation.conf + configuration file. The format is program-name='/path/to/program', with + no space around the = sign, and with the path of the program between + single quotes. By default, empty. Note that Buildroot already sets the + correct values for c, cpp, ar, strip, and pkgconfig. +
  • +FOO_MESON_EXTRA_PROPERTIES, to specify a space-separated list of + properties to add to the [properties] section of the meson + cross-compilation.conf configuration file. The format is + property-name=<value> with no space around the = sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for needs_exe_wrapper, c_args, + c_link_args, cpp_args, cpp_link_args, sys_root, and + pkg_config_libdir. +
  • +FOO_NINJA_ENV, to specify additional environment variables to pass to + ninja, meson companion tool in charge of the build operations. By default, + empty. +
  • +FOO_NINJA_OPTS, to specify a space-separated list of targets to build. By + default, empty, to build the default target(s). +

17.16. Integration of Cargo-based packages

Cargo is the package manager for the Rust programming language. It allows the +user to build programs or libraries written in Rust, but it also downloads and +manages their dependencies, to ensure repeatable builds. Cargo packages are +called "crates".

17.16.1. Cargo-based package’s Config.in file

The Config.in file of Cargo-based package foo should contain:

01: config BR2_PACKAGE_FOO
+02:     bool "foo"
+03:     depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+04:     select BR2_PACKAGE_HOST_RUSTC
+05:     help
+06:       This is a comment that explains what foo is.
+07:
+08:       http://foosoftware.org/foo/

17.16.2. Cargo-based package’s .mk file

Buildroot does not (yet) provide a dedicated package infrastructure for +Cargo-based packages. So, we will explain how to write a .mk file for such a +package. Let’s start with an example:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: FOO_VERSION = 1.0
+08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
+09: FOO_SITE = http://www.foosoftware.org/download
+10: FOO_LICENSE = GPL-3.0+
+11: FOO_LICENSE_FILES = COPYING
+12:
+13: FOO_DEPENDENCIES = host-rustc
+14:
+15: FOO_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo
+16:
+17: FOO_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(FOO_CARGO_MODE)
+18:
+19: FOO_CARGO_OPTS = \
+20:     $(if $(BR2_ENABLE_DEBUG),,--release) \
+21:     --target=$(RUSTC_TARGET_NAME) \
+22:     --manifest-path=$(@D)/Cargo.toml
+23:
+24: define FOO_BUILD_CMDS
+25:     $(TARGET_MAKE_ENV) $(FOO_CARGO_ENV) \
+26:             cargo build $(FOO_CARGO_OPTS)
+27: endef
+28:
+29: define FOO_INSTALL_TARGET_CMDS
+30:     $(INSTALL) -D -m 0755 $(@D)/$(FOO_BIN_DIR)/foo \
+31:             $(TARGET_DIR)/usr/bin/foo
+32: endef
+33:
+34: $(eval $(generic-package))

The Makefile starts with the definition of the standard variables for package +declaration (lines 7 to 11).

As seen in line 34, it is based on the +generic-package infrastructure. So, it defines +the variables required by this particular infrastructure, where Cargo is +invoked:

  • +FOO_BUILD_CMDS: Cargo is invoked to perform the build. The options required + to configure the cross-compilation of the package are passed via + FOO_CONF_OPTS. +
  • +FOO_INSTALL_TARGET_CMDS: The binary executable generated is installed on + the target. +

In order to have Cargo available for the build, FOO_DEPENDENCIES needs to +contain host-cargo.

To sum it up, to add a new Cargo-based package, the Makefile example can be +copied verbatim then edited to replace all occurences of FOO with the +uppercase name of the new package and update the values of the standard +variables.

17.16.3. About Dependencies Management

A crate can depend on other libraries from crates.io or git repositories, listed +in its Cargo.toml file. Before starting a build, Cargo usually downloads +automatically them. This step can also be performed independently, via the +cargo fetch command.

Cargo maintains a local cache of the registry index and of git checkouts of the +crates, whose location is given by $CARGO_HOME. As seen in the package +Makefile example at line 15, this environment variable is set to +$(HOST_DIR)/share/cargo.

This dependency download mechanism is not convenient when performing an offline +build, as Cargo will fail to fetch the dependencies. In that case, it is advised +to generate a tarball of the dependencies using the cargo vendor and add it to +FOO_EXTRA_DOWNLOADS.

17.17. Infrastructure for Go packages

This infrastructure applies to Go packages that use the standard +build system and use bundled dependencies.

17.17.1. golang-package tutorial

First, let’s see how to write a .mk file for a go package, +with an example :

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: FOO_VERSION = 1.0
+08: FOO_SITE = $(call github,bar,foo,$(FOO_VERSION))
+09: FOO_LICENSE = BSD-3-Clause
+10: FOO_LICENSE_FILES = LICENSE
+11:
+12: $(eval $(golang-package))

On line 7, we declare the version of the package.

On line 8, we declare the upstream location of the package, here +fetched from Github, since a large number of Go packages are hosted on +Github.

On line 9 and 10, we give licensing details about the package.

Finally, on line 12, we invoke the golang-package macro that +generates all the Makefile rules that actually allow the package to be +built.

17.17.2. golang-package reference

In their Config.in file, packages using the golang-package +infrastructure should depend on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS +because Buildroot will automatically add a dependency on host-go +to such packages. +If you need CGO support in your package, you must add a dependency on +BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS.

The main macro of the Go package infrastructure is +golang-package. It is similar to the generic-package macro. The +ability to build host packages is also available, with the +host-golang-package macro. +Host packages built by host-golang-package macro should depend on +BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS.

Just like the generic infrastructure, the Go infrastructure works +by defining a number of variables before calling the golang-package.

All the package metadata information variables that exist in the +generic package infrastructure also +exist in the Go infrastructure: FOO_VERSION, FOO_SOURCE, +FOO_PATCH, FOO_SITE, FOO_SUBDIR, FOO_DEPENDENCIES, +FOO_LICENSE, FOO_LICENSE_FILES, FOO_INSTALL_STAGING, etc.

Note that it is not necessary to add host-go in the +FOO_DEPENDENCIES variable of a package, since this basic dependency +is automatically added as needed by the Go package infrastructure.

A few additional variables, specific to the Go infrastructure, can +optionally be defined, depending on the package’s needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none.

  • +If your package need a custom GOPATH to be compiled in, you can + use the FOO_WORKSPACE variable. The GOPATH being used will be + <package-srcdir>/<FOO_WORKSPACE>. If FOO_WORKSPACE is not + specified, it defaults to _gopath. +
  • +FOO_SRC_SUBDIR is the sub-directory where your source will be + compiled relatively to the GOPATH. An example value is + github.com/bar/foo. If FOO_SRC_SUBDIR is not specified, it + defaults to a value infered from the FOO_SITE variable. +
  • +FOO_LDFLAGS and FOO_TAGS can be used to pass respectively the + LDFLAGS or the TAGS to the go build command. +
  • +FOO_BUILD_TARGETS can be used to pass the list of targets that + should be built. If FOO_BUILD_TARGETS is not specified, it + defaults to .. We then have two cases: +

    • +FOO_BUILD_TARGETS is .. In this case, we assume only one binary + will be produced, and that by default we name it after the package + name. If that is not appropriate, the name of the produced binary + can be overridden using FOO_BIN_NAME. +
    • +FOO_BUILD_TARGETS is not .. In this case, we iterate over the + values to build each target, and for each produced a binary that is + the non-directory component of the target. For example if + FOO_BUILD_TARGETS = cmd/docker cmd/dockerd the binaries produced + are docker and dockerd. +
  • +FOO_INSTALL_BINS can be used to pass the list of binaries that + should be installed in /usr/bin on the target. If + FOO_INSTALL_BINS is not specified, it defaults to the lower-case + name of package. +

With the Go infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most Go-based packages. However, when required, it is still +possible to customize what is done in any particular step:

  • +By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the various build steps” for details. +
  • +By overriding one of the steps. For example, even if the Go + infrastructure is used, if the package .mk file defines its own + FOO_BUILD_CMDS variable, it will be used instead of the default Go + one. However, using this method should be restricted to very + specific cases. Do not use it in the general case. +

17.18. Infrastructure for QMake-based packages

17.18.1. qmake-package tutorial

First, let’s see how to write a .mk file for a QMake-based package, with +an example :

01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_CONF_OPTS = QT_CONFIG+=bar QT_CONFIG-=baz
+11: LIBFOO_DEPENDENCIES = bar
+12:
+13: $(eval $(qmake-package))

On line 7, we declare the version of the package.

On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location.

On line 10, we tell Buildroot what options to enable for libfoo.

On line 11, we tell Buildroot the dependencies of libfoo.

Finally, on line line 13, we invoke the qmake-package +macro that generates all the Makefile rules that actually allows the +package to be built.

17.18.2. qmake-package reference

The main macro of the QMake package infrastructure is qmake-package. +It is similar to the generic-package macro.

Just like the generic infrastructure, the QMake infrastructure works +by defining a number of variables before calling the qmake-package +macro.

First, all the package metadata information variables that exist in +the generic infrastructure also exist in the QMake infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET.

An additional variable, specific to the QMake infrastructure, can +also be defined.

  • +LIBFOO_CONF_ENV, to specify additional environment variables to + pass to the qmake script for the configuration step. By default, empty. +
  • +LIBFOO_CONF_OPTS, to specify additional options to pass to the + qmake script for the configuration step. By default, empty. +
  • +LIBFOO_MAKE_ENV, to specify additional environment variables to the + make command during the build and install steps. By default, empty. +
  • +LIBFOO_MAKE_OPTS, to specify additional targets to pass to the + make command during the build step. By default, empty. +
  • +LIBFOO_INSTALL_STAGING_OPTS, to specify additional targets to pass + to the make command during the staging installation step. By default, + install. +
  • +LIBFOO_INSTALL_TARGET_OPTS, to specify additional targets to pass + to the make command during the target installation step. By default, + install. +

17.19. Infrastructure for packages building kernel modules

Buildroot offers a helper infrastructure to make it easy to write packages that +build and install Linux kernel modules. Some packages only contain a kernel +module, other packages contain programs and libraries in addition to kernel +modules. Buildroot’s helper infrastructure supports either case.

17.19.1. kernel-module tutorial

Let’s start with an example on how to prepare a simple package that only +builds a kernel module, and no other component:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: FOO_VERSION = 1.2.3
+08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz
+09: FOO_SITE = http://www.foosoftware.org/download
+10: FOO_LICENSE = GPL-2.0
+11: FOO_LICENSE_FILES = COPYING
+12:
+13: $(eval $(kernel-module))
+14: $(eval $(generic-package))

Lines 7-11 define the usual meta-data to specify the version, archive name, +remote URI where to find the package source, licensing information.

On line 13, we invoke the kernel-module helper infrastructure, that +generates all the appropriate Makefile rules and variables to build +that kernel module.

Finally, on line 14, we invoke the +generic-package infrastructure.

The dependency on linux is automatically added, so it is not needed to +specify it in FOO_DEPENDENCIES.

What you may have noticed is that, unlike other package infrastructures, +we explicitly invoke a second infrastructure. This allows a package to +build a kernel module, but also, if needed, use any one of other package +infrastructures to build normal userland components (libraries, +executables…). Using the kernel-module infrastructure on its own is +not sufficient; another package infrastructure must be used.

Let’s look at a more complex example:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: FOO_VERSION = 1.2.3
+08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz
+09: FOO_SITE = http://www.foosoftware.org/download
+10: FOO_LICENSE = GPL-2.0
+11: FOO_LICENSE_FILES = COPYING
+12:
+13: FOO_MODULE_SUBDIRS = driver/base
+14: FOO_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED)
+15:
+16: ifeq ($(BR2_PACKAGE_LIBBAR),y)
+17: FOO_DEPENDENCIES = libbar
+18: FOO_CONF_OPTS = --enable-bar
+19: FOO_MODULE_SUBDIRS += driver/bar
+20: else
+21: FOO_CONF_OPTS = --disable-bar
+22: endif
+23:
+24: $(eval $(kernel-module))
+26: $(eval $(autotools-package))

Here, we see that we have an autotools-based package, that also builds +the kernel module located in sub-directory driver/base and, if libbar +is enabled, the kernel module located in sub-directory driver/bar, and +defines the variable KVERSION to be passed to the Linux buildsystem +when building the module(s).

17.19.2. kernel-module reference

The main macro for the kernel module infrastructure is kernel-module. +Unlike other package infrastructures, it is not stand-alone, and requires +any of the other *-package macros be called after it.

The kernel-module macro defines post-build and post-target-install +hooks to build the kernel modules. If the package’s .mk needs access +to the built kernel modules, it should do so in a post-build hook, +registered after the call to kernel-module. Similarly, if the +package’s .mk needs access to the kernel module after it has been +installed, it should do so in a post-install hook, registered after +the call to kernel-module. Here’s an example:

$(eval $(kernel-module))
+
+define FOO_DO_STUFF_WITH_KERNEL_MODULE
+    # Do something with it...
+endef
+FOO_POST_BUILD_HOOKS += FOO_DO_STUFF_WITH_KERNEL_MODULE
+
+$(eval $(generic-package))

Finally, unlike the other package infrastructures, there is no +host-kernel-module variant to build a host kernel module.

The following additional variables can optionally be defined to further +configure the build of the kernel module:

  • +FOO_MODULE_SUBDIRS may be set to one or more sub-directories (relative + to the package source top-directory) where the kernel module sources are. + If empty or not set, the sources for the kernel module(s) are considered + to be located at the top of the package source tree. +
  • +FOO_MODULE_MAKE_OPTS may be set to contain extra variable definitions + to pass to the Linux buildsystem. +

You may also reference (but you may not set!) those variables:

  • +LINUX_DIR contains the path to where the Linux kernel has been + extracted and built. +
  • +LINUX_VERSION contains the version string as configured by the user. +
  • +LINUX_VERSION_PROBED contains the real version string of the kernel, + retrieved with running make -C $(LINUX_DIR) kernelrelease +
  • +KERNEL_ARCH contains the name of the current architecture, like arm, + mips… +

17.20. Infrastructure for asciidoc documents

The Buildroot manual, which you are currently reading, is entirely written +using the AsciiDoc mark-up syntax. The manual is then +rendered to many formats:

  • +html +
  • +split-html +
  • +pdf +
  • +epub +
  • +text +

Although Buildroot only contains one document written in AsciiDoc, there +is, as for packages, an infrastructure for rendering documents using the +AsciiDoc syntax.

Also as for packages, the AsciiDoc infrastructure is available from a +br2-external tree. This allows documentation for +a br2-external tree to match the Buildroot documentation, as it will be +rendered to the same formats and use the same layout and theme.

17.20.1. asciidoc-document tutorial

Whereas package infrastructures are suffixed with -package, the document +infrastructures are suffixed with -document. So, the AsciiDoc infrastructure +is named asciidoc-document.

Here is an example to render a simple AsciiDoc document.

01: ################################################################################
+02: #
+03: # foo-document
+04: #
+05: ################################################################################
+06:
+07: FOO_SOURCES = $(sort $(wildcard $(pkgdir)/*))
+08: $(eval $(call asciidoc-document))

On line 7, the Makefile declares what the sources of the document are. +Currently, it is expected that the document’s sources are only local; +Buildroot will not attempt to download anything to render a document. +Thus, you must indicate where the sources are. Usually, the string +above is sufficient for a document with no sub-directory structure.

On line 8, we call the asciidoc-document function, which generates all +the Makefile code necessary to render the document.

17.20.2. asciidoc-document reference

The list of variables that can be set in a .mk file to give metadata +information is (assuming the document name is foo) :

  • +FOO_SOURCES, mandatory, defines the source files for the document. +
  • +FOO_RESOURCES, optional, may contain a space-separated list of paths + to one or more directories containing so-called resources (like CSS or + images). By default, empty. +
  • +FOO_DEPENDENCIES, optional, the list of packages (most probably, + host-packages) that must be built before building this document. +

There are also additional hooks (see Section 17.22, “Hooks available in the various build steps” for general information +on hooks), that a document may set to define extra actions to be done at +various steps:

  • +FOO_POST_RSYNC_HOOKS to run additional commands after the sources + have been copied by Buildroot. This can for example be used to + generate part of the manual with information extracted from the + tree. As an example, Buildroot uses this hook to generate the tables + in the appendices. +
  • +FOO_CHECK_DEPENDENCIES_HOOKS to run additional tests on required + components to generate the document. In AsciiDoc, it is possible to + call filters, that is, programs that will parse an AsciiDoc block and + render it appropriately (e.g. ditaa or + aafigure). +
  • +FOO_CHECK_DEPENDENCIES_<FMT>_HOOKS, to run additional tests for + the specified format <FMT> (see the list of rendered formats, above). +

Here is a complete example that uses all variables and all hooks:

01: ################################################################################
+02: #
+03: # foo-document
+04: #
+05: ################################################################################
+06:
+07: FOO_SOURCES = $(sort $(wildcard $(pkgdir)/*))
+08: FOO_RESOURCES = $(sort $(wildcard $(pkgdir)/ressources))
+09:
+10: define FOO_GEN_EXTRA_DOC
+11:     /path/to/generate-script --outdir=$(@D)
+12: endef
+13: FOO_POST_RSYNC_HOOKS += FOO_GEN_EXTRA_DOC
+14:
+15: define FOO_CHECK_MY_PROG
+16:     if ! which my-prog >/dev/null 2>&1; then \
+17:         echo "You need my-prog to generate the foo document"; \
+18:         exit 1; \
+19:     fi
+20: endef
+21: FOO_CHECK_DEPENDENCIES_HOOKS += FOO_CHECK_MY_PROG
+22:
+23: define FOO_CHECK_MY_OTHER_PROG
+24:     if ! which my-other-prog >/dev/null 2>&1; then \
+25:         echo "You need my-other-prog to generate the foo document as PDF"; \
+26:         exit 1; \
+27:     fi
+28: endef
+29: FOO_CHECK_DEPENDENCIES_PDF_HOOKS += FOO_CHECK_MY_OTHER_PROG
+30:
+31: $(eval $(call asciidoc-document))

17.21. Infrastructure specific to the Linux kernel package

The Linux kernel package can use some specific infrastructures based on package +hooks for building Linux kernel tools or/and building Linux kernel extensions.

17.21.1. linux-kernel-tools

Buildroot offers a helper infrastructure to build some userspace tools +for the target available within the Linux kernel sources. Since their +source code is part of the kernel source code, a special package, +linux-tools, exists and re-uses the sources of the Linux kernel that +runs on the target.

Let’s look at an example of a Linux tool. For a new Linux tool named +foo, create a new menu entry in the existing +package/linux-tools/Config.in. This file will contain the option +descriptions related to each kernel tool that will be used and +displayed in the configuration tool. It would basically look like:

01: config BR2_PACKAGE_LINUX_TOOLS_FOO
+02:     bool "foo"
+03:     select BR2_PACKAGE_LINUX_TOOLS
+04:     help
+05:       This is a comment that explains what foo kernel tool is.
+06:
+07:       http://foosoftware.org/foo/

The name of the option starts with the prefix BR2_PACKAGE_LINUX_TOOLS_, +followed by the uppercase name of the tool (like is done for packages).

Note. Unlike other packages, the linux-tools package options appear in the +linux kernel menu, under the Linux Kernel Tools sub-menu, not under +the Target packages main menu.

Then for each linux tool, add a new .mk.in file named +package/linux-tools/linux-tool-foo.mk.in. It would basically look like:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: LINUX_TOOLS += foo
+08:
+09: FOO_DEPENDENCIES = libbbb
+10:
+11: define FOO_BUILD_CMDS
+12:     $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools foo
+13: endef
+14:
+15: define FOO_INSTALL_STAGING_CMDS
+16:     $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
+17:             DESTDIR=$(STAGING_DIR) \
+18:             foo_install
+19: endef
+20:
+21: define FOO_INSTALL_TARGET_CMDS
+22:     $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
+23:             DESTDIR=$(TARGET_DIR) \
+24:             foo_install
+25: endef

On line 7, we register the Linux tool foo to the list of available +Linux tools.

On line 9, we specify the list of dependencies this tool relies on. These +dependencies are added to the Linux package dependencies list only when the +foo tool is selected.

The rest of the Makefile, lines 11-25 defines what should be done at the +different steps of the Linux tool build process like for a +generic package. They will actually be +used only when the foo tool is selected. The only supported commands are +_BUILD_CMDS, _INSTALL_STAGING_CMDS and _INSTALL_TARGET_CMDS.

Note. One must not call $(eval $(generic-package)) or any other +package infrastructure! Linux tools are not packages by themselves, +they are part of the linux-tools package.

17.21.2. linux-kernel-extensions

Some packages provide new features that require the Linux kernel tree +to be modified. This can be in the form of patches to be applied on +the kernel tree, or in the form of new files to be added to the +tree. The Buildroot’s Linux kernel extensions infrastructure provides +a simple solution to automatically do this, just after the kernel +sources are extracted and before the kernel patches are +applied. Examples of extensions packaged using this mechanism are the +real-time extensions Xenomai and RTAI, as well as the set of +out-of-tree LCD screens drivers fbtft.

Let’s look at an example on how to add a new Linux extension foo.

First, create the package foo that provides the extension: this +package is a standard package; see the previous chapters on how to +create such a package. This package is in charge of downloading the +sources archive, checking the hash, defining the licence informations +and building user space tools if any.

Then create the Linux extension proper: create a new menu entry in +the existing linux/Config.ext.in. This file contains the option +descriptions related to each kernel extension that will be used and +displayed in the configuration tool. It would basically look like:

01: config BR2_LINUX_KERNEL_EXT_FOO
+02:     bool "foo"
+03:     help
+04:       This is a comment that explains what foo kernel extension is.
+05:
+06:       http://foosoftware.org/foo/

Then for each linux extension, add a new .mk file named +linux/linux-ext-foo.mk. It should basically contain:

01: ################################################################################
+02: #
+03: # foo
+04: #
+05: ################################################################################
+06:
+07: LINUX_EXTENSIONS += foo
+08:
+09: define FOO_PREPARE_KERNEL
+10:     $(FOO_DIR)/prepare-kernel-tree.sh --linux-dir=$(@D)
+11: endef

On line 7, we add the Linux extension foo to the list of available +Linux extensions.

On line 9-11, we define what should be done by the extension to modify +the Linux kernel tree; this is specific to the linux extension and can +use the variables defined by the foo package, like: $(FOO_DIR) or +$(FOO_VERSION)… as well as all the Linux variables, like: +$(LINUX_VERSION) or $(LINUX_VERSION_PROBED), $(KERNEL_ARCH)… +See the definition of those kernel variables.

17.22. Hooks available in the various build steps

The generic infrastructure (and as a result also the derived autotools +and cmake infrastructures) allow packages to specify hooks. +These define further actions to perform after existing steps. +Most hooks aren’t really useful for generic packages, since the .mk +file already has full control over the actions performed in each step +of the package construction.

The following hook points are available:

  • +LIBFOO_PRE_DOWNLOAD_HOOKS +
  • +LIBFOO_POST_DOWNLOAD_HOOKS +
  • +LIBFOO_PRE_EXTRACT_HOOKS +
  • +LIBFOO_POST_EXTRACT_HOOKS +
  • +LIBFOO_PRE_RSYNC_HOOKS +
  • +LIBFOO_POST_RSYNC_HOOKS +
  • +LIBFOO_PRE_PATCH_HOOKS +
  • +LIBFOO_POST_PATCH_HOOKS +
  • +LIBFOO_PRE_CONFIGURE_HOOKS +
  • +LIBFOO_POST_CONFIGURE_HOOKS +
  • +LIBFOO_PRE_BUILD_HOOKS +
  • +LIBFOO_POST_BUILD_HOOKS +
  • +LIBFOO_PRE_INSTALL_HOOKS (for host packages only) +
  • +LIBFOO_POST_INSTALL_HOOKS (for host packages only) +
  • +LIBFOO_PRE_INSTALL_STAGING_HOOKS (for target packages only) +
  • +LIBFOO_POST_INSTALL_STAGING_HOOKS (for target packages only) +
  • +LIBFOO_PRE_INSTALL_TARGET_HOOKS (for target packages only) +
  • +LIBFOO_POST_INSTALL_TARGET_HOOKS (for target packages only) +
  • +LIBFOO_PRE_INSTALL_IMAGES_HOOKS +
  • +LIBFOO_POST_INSTALL_IMAGES_HOOKS +
  • +LIBFOO_PRE_LEGAL_INFO_HOOKS +
  • +LIBFOO_POST_LEGAL_INFO_HOOKS +

These variables are lists of variable names containing actions to be +performed at this hook point. This allows several hooks to be +registered at a given hook point. Here is an example:

define LIBFOO_POST_PATCH_FIXUP
+        action1
+        action2
+endef
+
+LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP

17.22.1. Using the POST_RSYNC hook

The POST_RSYNC hook is run only for packages that use a local source, +either through the local site method or the OVERRIDE_SRCDIR +mechanism. In this case, package sources are copied using rsync from +the local location into the buildroot build directory. The rsync +command does not copy all files from the source directory, though. +Files belonging to a version control system, like the directories +.git, .hg, etc. are not copied. For most packages this is +sufficient, but a given package can perform additional actions using +the POST_RSYNC hook.

In principle, the hook can contain any command you want. One specific +use case, though, is the intentional copying of the version control +directory using rsync. The rsync command you use in the hook can, among +others, use the following variables:

  • +$(SRCDIR): the path to the overridden source directory +
  • +$(@D): the path to the build directory +

17.22.2. Target-finalize hook

Packages may also register hooks in LIBFOO_TARGET_FINALIZE_HOOKS. +These hooks are run after all packages are built, but before the +filesystem images are generated. They are seldom used, and your +package probably do not need them.

17.23. Gettext integration and interaction with packages

Many packages that support internationalization use the gettext +library. Dependencies for this library are fairly complicated and +therefore, deserve some explanation.

The glibc C library integrates a full-blown implementation of +gettext, supporting translation. Native Language Support is +therefore built-in in glibc.

On the other hand, the uClibc and musl C libraries only provide a +stub implementation of the gettext functionality, which allows to +compile libraries and programs using gettext functions, but without +providing the translation capabilities of a full-blown gettext +implementation. With such C libraries, if real Native Language Support +is necessary, it can be provided by the libintl library of the +gettext package.

Due to this, and in order to make sure that Native Language Support is +properly handled, packages in Buildroot that can use NLS support +should:

  1. +Ensure NLS support is enabled when BR2_SYSTEM_ENABLE_NLS=y. This + is done automatically for autotools packages and therefore should + only be done for packages using other package infrastructures. +
  2. +Add $(TARGET_NLS_DEPENDENCIES) to the package + <pkg>_DEPENDENCIES variable. This addition should be done + unconditionally: the value of this variable is automatically + adjusted by the core infrastructure to contain the relevant list of + packages. If NLS support is disabled, this variable is empty. If + NLS support is enabled, this variable contains host-gettext so + that tools needed to compile translation files are available on the + host. In addition, if uClibc or musl are used, this variable + also contains gettext in order to get the full-blown gettext + implementation. +
  3. +If needed, add $(TARGET_NLS_LIBS) to the linker flags, so that + the package gets linked with libintl. This is generally not + needed with autotools packages as they usually detect + automatically that they should link with libintl. However, + packages using other build systems, or problematic autotools-based + packages may need this. $(TARGET_NLS_LIBS) should be added + unconditionally to the linker flags, as the core automatically + makes it empty or defined to -lintl depending on the + configuration. +

No changes should be made to the Config.in file to support NLS.

Finally, certain packages need some gettext utilities on the target, +such as the gettext program itself, which allows to retrieve +translated strings, from the command line. In such a case, the package +should:

  • +use select BR2_PACKAGE_GETTEXT in their Config.in file, + indicating in a comment above that it’s a runtime dependency only. +
  • +not add any gettext dependency in the DEPENDENCIES variable of + their .mk file. +

17.24. Tips and tricks

17.24.1. Package name, config entry name and makefile variable relationship

In Buildroot, there is some relationship between:

  • +the package name, which is the package directory name (and the + name of the *.mk file); +
  • +the config entry name that is declared in the Config.in file; +
  • +the makefile variable prefix. +

It is mandatory to maintain consistency between these elements, +using the following rules:

  • +the package directory and the *.mk name are the package name + itself (e.g.: package/foo-bar_boo/foo-bar_boo.mk); +
  • +the make target name is the package name itself (e.g.: + foo-bar_boo); +
  • +the config entry is the upper case package name with . and - + characters substituted with _, prefixed with BR2_PACKAGE_ (e.g.: + BR2_PACKAGE_FOO_BAR_BOO); +
  • +the *.mk file variable prefix is the upper case package name + with . and - characters substituted with _ (e.g.: + FOO_BAR_BOO_VERSION). +

17.24.2. How to check the coding style

Buildroot provides a script in utils/check-package that checks new or +changed files for coding style. It is not a complete language validator, +but it catches many common mistakes. It is meant to run in the actual +files you created or modified, before creating the patch for submission.

This script can be used for packages, filesystem makefiles, Config.in +files, etc. It does not check the files defining the package +infrastructures and some other files containing similar common code.

To use it, run the check-package script, by telling which files you +created or changed:

$ ./utils/check-package package/new-package/*

If you have the utils directory in your path you can also run:

$ cd package/new-package/
+$ check-package *

The tool can also be used for packages in a br2-external:

$ check-package -b /path/to/br2-ext-tree/package/my-package/*

17.24.3. How to test your package

Once you have added your new package, it is important that you test it +under various conditions: does it build for all architectures? Does it +build with the different C libraries? Does it need threads, NPTL? And +so on…

Buildroot runs autobuilders which +continuously test random configurations. However, these only build the +master branch of the git tree, and your new fancy package is not yet +there.

Buildroot provides a script in utils/test-pkg that uses the same base +configurations as used by the autobuilders so you can test your package +in the same conditions.

First, create a config snippet that contains all the necessary options +needed to enable your package, but without any architecture or toolchain +option. For example, let’s create a config snippet that just enables +libcurl, without any TLS backend:

$ cat libcurl.config
+BR2_PACKAGE_LIBCURL=y

If your package needs more configuration options, you can add them to the +config snippet. For example, here’s how you would test libcurl with +openssl as a TLS backend and the curl program:

$ cat libcurl.config
+BR2_PACKAGE_LIBCURL=y
+BR2_PACKAGE_LIBCURL_CURL=y
+BR2_PACKAGE_OPENSSL=y

Then run the test-pkg script, by telling it what config snippet to use +and what package to test:

$ ./utils/test-pkg -c libcurl.config -p libcurl

By default, test-pkg will build your package against a subset of the +toolchains used by the autobuilders, which has been selected by the +Buildroot developers as being the most useful and representative +subset. If you want to test all toolchains, pass the -a option. Note +that in any case, internal toolchains are excluded as they take too +long to build.

The output lists all toolchains that are tested and the corresponding +result (excerpt, results are fake):

$ ./utils/test-pkg -c libcurl.config -p libcurl
+                armv5-ctng-linux-gnueabi [ 1/11]: OK
+              armv7-ctng-linux-gnueabihf [ 2/11]: OK
+                        br-aarch64-glibc [ 3/11]: SKIPPED
+                           br-arcle-hs38 [ 4/11]: SKIPPED
+                            br-arm-basic [ 5/11]: FAILED
+                  br-arm-cortex-a9-glibc [ 6/11]: OK
+                   br-arm-cortex-a9-musl [ 7/11]: FAILED
+                   br-arm-cortex-m4-full [ 8/11]: OK
+                             br-arm-full [ 9/11]: OK
+                    br-arm-full-nothread [10/11]: FAILED
+                      br-arm-full-static [11/11]: OK
+11 builds, 2 skipped, 2 build failed, 1 legal-info failed

The results mean:

  • +OK: the build was successful. +
  • +SKIPPED: one or more configuration options listed in the config + snippet were not present in the final configuration. This is due to + options having dependencies not satisfied by the toolchain, such as + for example a package that depends on BR2_USE_MMU with a noMMU + toolchain. The missing options are reported in missing.config in + the output build directory (~/br-test-pkg/TOOLCHAIN_NAME/ by + default). +
  • +FAILED: the build failed. Inspect the logfile file in the output + build directory to see what went wrong: +

    • +the actual build failed, +
    • +the legal-info failed, +
    • +one of the preliminary steps (downloading the config file, applying + the configuration, running dirclean for the package) failed. +

When there are failures, you can just re-run the script with the same +options (after you fixed your package); the script will attempt to +re-build the package specified with -p for all toolchains, without +the need to re-build all the dependencies of that package.

The test-pkg script accepts a few options, for which you can get some +help by running:

$ ./utils/test-pkg -h

17.24.4. How to add a package from GitHub

Packages on GitHub often don’t have a download area with release tarballs. +However, it is possible to download tarballs directly from the repository +on GitHub. As GitHub is known to have changed download mechanisms in the +past, the github helper function should be used as shown below.

# Use a tag or a full commit ID
+FOO_VERSION = v1.0
+FOO_SITE = $(call github,<user>,<package>,$(FOO_VERSION))

Notes

  • +The FOO_VERSION can either be a tag or a commit ID. +
  • +The tarball name generated by github matches the default one from + Buildroot (e.g.: foo-f6fb6654af62045239caed5950bc6c7971965e60.tar.gz), + so it is not necessary to specify it in the .mk file. +
  • +When using a commit ID as version, you should use the full 40 hex characters. +

If the package you wish to add does have a release section on GitHub, the +maintainer may have uploaded a release tarball, or the release may just point +to the automatically generated tarball from the git tag. If there is a +release tarball uploaded by the maintainer, we prefer to use that since it +may be slightly different (e.g. it contains a configure script so we don’t +need to do AUTORECONF).

You can see on the release page if it’s an uploaded tarball or a git tag:

github_hash_mongrel2.png
  • +If it looks like the image above then it was uploaded by the + maintainer and you should use that link (in that example: + mongrel2-v1.9.2.tar.bz2) to specify FOO_SITE, and not use the + github helper. +
  • +On the other hand, if there’s is only the "Source code" link, then + it’s an automatically generated tarball and you should use the + github helper function. +

17.25. Conclusion

As you can see, adding a software package to Buildroot is simply a +matter of writing a Makefile using an existing example and modifying it +according to the compilation process required by the package.

If you package software that might be useful for other people, don’t +forget to send a patch to the Buildroot mailing list (see +Section 21.5, “Submitting patches”)!

Chapter 18. Patching a package

While integrating a new package or updating an existing one, it may be +necessary to patch the source of the software to get it cross-built within +Buildroot.

Buildroot offers an infrastructure to automatically handle this during +the builds. It supports three ways of applying patch sets: downloaded patches, +patches supplied within buildroot and patches located in a user-defined +global patch directory.

18.1. Providing patches

18.1.1. Downloaded

If it is necessary to apply a patch that is available for download, then add it +to the <packagename>_PATCH variable. If an entry contains ://, +then Buildroot will assume it is a full URL and download the patch +from this location. Otherwise, Buildroot will assume that the patch should be +downloaded from <packagename>_SITE. It can be a single patch, +or a tarball containing a patch series.

Like for all downloads, a hash should be added to the <packagename>.hash +file.

This method is typically used for packages from Debian.

18.1.2. Within Buildroot

Most patches are provided within Buildroot, in the package +directory; these typically aim to fix cross-compilation, libc support, +or other such issues.

These patch files should be named <number>-<description>.patch.

Notes

  • +The patch files coming with Buildroot should not contain any package version + reference in their filename. +
  • +The field <number> in the patch file name refers to the apply order, + and shall start at 1; It is preferred to pad the number with zeros up to 4 + digits, like git-format-patch does. E.g.: 0001-foobar-the-buz.patch +
  • +Previously, it was mandatory for patches to be prefixed with the name of + the package, like <package>-<number>-<description>.patch, but that is + no longer the case. Existing packages will be fixed as time passes. Do + not prefix patches with the package name. +
  • +Previously, a series file, as used by quilt, could also be added in + the package directory. In that case, the series file defines the patch + application order. This is deprecated, and will be removed in the future. + Do not use a series file. +

18.1.3. Global patch directory

The BR2_GLOBAL_PATCH_DIR configuration file option can be +used to specify a space separated list of one or more directories +containing global package patches. See Section 9.8, “Adding project-specific patches” for +details.

18.2. How patches are applied

  1. +Run the <packagename>_PRE_PATCH_HOOKS commands if defined; +
  2. +Cleanup the build directory, removing any existing *.rej files; +
  3. +If <packagename>_PATCH is defined, then patches from these + tarballs are applied; +
  4. +If there are some *.patch files in the package’s Buildroot + directory or in a package subdirectory named <packageversion>, + then: +

    • +If a series file exists in the package directory, then patches are + applied according to the series file; +
    • +Otherwise, patch files matching *.patch are applied in alphabetical + order. + So, to ensure they are applied in the right order, it is highly + recommended to name the patch files like this: + <number>-<description>.patch, where <number> refers to the + apply order. +
  5. +If BR2_GLOBAL_PATCH_DIR is defined, the directories will be + enumerated in the order they are specified. The patches are applied + as described in the previous step. +
  6. +Run the <packagename>_POST_PATCH_HOOKS commands if defined. +

If something goes wrong in the steps 3 or 4, then the build fails.

18.3. Format and licensing of the package patches

Patches are released under the same license as the software they apply +to (see Section 12.2, “Complying with the Buildroot license”).

A message explaining what the patch does, and why it is needed, should +be added in the header commentary of the patch.

You should add a Signed-off-by statement in the header of the each +patch to help with keeping track of the changes and to certify that the +patch is released under the same license as the software that is modified.

If the software is under version control, it is recommended to use the +upstream SCM software to generate the patch set.

Otherwise, concatenate the header with the output of the +diff -purN package-version.orig/ package-version/ command.

If you update an existing patch (e.g. when bumping the package version), +make sure the existing From header and Signed-off-by tags are not +removed, but do update the rest of the patch comment when appropriate.

At the end, the patch should look like:

configure.ac: add C++ support test
+
+Signed-off-by: John Doe <john.doe@noname.org>
+
+--- configure.ac.orig
++++ configure.ac
+@@ -40,2 +40,12 @@
+
+AC_PROG_MAKE_SET
++
++AC_CACHE_CHECK([whether the C++ compiler works],
++               [rw_cv_prog_cxx_works],
++               [AC_LANG_PUSH([C++])
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
++                               [rw_cv_prog_cxx_works=yes],
++                               [rw_cv_prog_cxx_works=no])
++                AC_LANG_POP([C++])])
++
++AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])

18.4. Integrating patches found on the Web

When integrating a patch of which you are not the author, you have to +add a few things in the header of the patch itself.

Depending on whether the patch has been obtained from the project +repository itself, or from somewhere on the web, add one of the +following tags:

Backported from: <some commit id>

or

Fetch from: <some url>

It is also sensible to add a few words about any changes to the patch +that may have been necessary.

Chapter 19. Download infrastructure

TODO

Chapter 20. Debugging Buildroot

It is possible to instrument the steps Buildroot does when building +packages. Define the variable BR2_INSTRUMENTATION_SCRIPTS to contain +the path of one or more scripts (or other executables), in a +space-separated list, you want called before and after each step. The +scripts are called in sequence, with three parameters:

  • +start or end to denote the start (resp. the end) of a step; +
  • +the name of the step about to be started, or which just ended; +
  • +the name of the package. +

For example :

make BR2_INSTRUMENTATION_SCRIPTS="/path/to/my/script1 /path/to/my/script2"

The list of steps is:

  • +extract +
  • +patch +
  • +configure +
  • +build +
  • +install-host, when a host-package is installed in $(HOST_DIR) +
  • +install-target, when a target-package is installed in $(TARGET_DIR) +
  • +install-staging, when a target-package is installed in $(STAGING_DIR) +
  • +install-image, when a target-package installs files in $(BINARIES_DIR) +

The script has access to the following variables:

  • +BR2_CONFIG: the path to the Buildroot .config file +
  • +HOST_DIR, STAGING_DIR, TARGET_DIR: see + Section 17.5.2, “generic-package reference” +
  • +BUILD_DIR: the directory where packages are extracted and built +
  • +BINARIES_DIR: the place where all binary files (aka images) are + stored +
  • +BASE_DIR: the base output directory +

Chapter 21. Contributing to Buildroot

There are many ways in which you can contribute to Buildroot: analyzing +and fixing bugs, analyzing and fixing package build failures detected by +the autobuilders, testing and reviewing patches sent by other +developers, working on the items in our TODO list and sending your own +improvements to Buildroot or its manual. The following sections give a +little more detail on each of these items.

If you are interested in contributing to Buildroot, the first thing you +should do is to subscribe to the Buildroot mailing list. This list is +the main way of interacting with other Buildroot developers and to send +contributions to. If you aren’t subscribed yet, then refer to +Chapter 5, Community resources for the subscription link.

If you are going to touch the code, it is highly recommended to use a +git repository of Buildroot, rather than starting from an extracted +source code tarball. Git is the easiest way to develop from and directly +send your patches to the mailing list. Refer to Chapter 3, Getting Buildroot +for more information on obtaining a Buildroot git tree.

21.1. Reproducing, analyzing and fixing bugs

A first way of contributing is to have a look at the open bug reports in +the Buildroot bug +tracker. As we strive to keep the bug count as small as possible, all +help in reproducing, analyzing and fixing reported bugs is more than +welcome. Don’t hesitate to add a comment to bug reports reporting your +findings, even if you don’t yet see the full picture.

21.2. Analyzing and fixing autobuild failures

The Buildroot autobuilders are a set of build machines that continuously +run Buildroot builds based on random configurations. This is done for +all architectures supported by Buildroot, with various toolchains, and +with a random selection of packages. With the large commit activity on +Buildroot, these autobuilders are a great help in detecting problems +very early after commit.

All build results are available at http://autobuild.buildroot.org, +statistics are at http://autobuild.buildroot.org/stats.php. Every day, +an overview of all failed packages is sent to the mailing list.

Detecting problems is great, but obviously these problems have to be +fixed as well. Your contribution is very welcome here! There are +basically two things that can be done:

  • +Analyzing the problems. The daily summary mails do not contain details + about the actual failures: in order to see what’s going on you have to + open the build log and check the last output. Having someone doing + this for all packages in the mail is very useful for other developers, + as they can make a quick initial analysis based on this output alone. +
  • +Fixing a problem. When fixing autobuild failures, you should follow + these steps: +

    1. +Check if you can reproduce the problem by building with the same + configuration. You can do this manually, or use the + br-reproduce-build + script that will automatically clone a Buildroot git repository, + checkout the correct revision, download and set the right + configuration, and start the build. +
    2. +Analyze the problem and create a fix. +
    3. +Verify that the problem is really fixed by starting from a clean + Buildroot tree and only applying your fix. +
    4. +Send the fix to the Buildroot mailing list (see + Section 21.5, “Submitting patches”). In case you created a patch against the + package sources, you should also send the patch upstream so that the + problem will be fixed in a later release, and the patch in Buildroot + can be removed. + In the commit message of a patch fixing an autobuild failure, add a + reference to the build result directory, as follows: +
Fixes: http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069

21.3. Reviewing and testing patches

With the amount of patches sent to the mailing list each day, the +maintainer has a very hard job to judge which patches are ready to apply +and which ones aren’t. Contributors can greatly help here by reviewing +and testing these patches.

In the review process, do not hesitate to respond to patch submissions +for remarks, suggestions or anything that will help everyone to +understand the patches and make them better. Please use internet +style replies in plain text emails when responding to patch +submissions.

To indicate approval of a patch, there are three formal tags that keep +track of this approval. To add your tag to a patch, reply to it with the +approval tag below the original author’s Signed-off-by line. These tags +will be picked up automatically by patchwork (see +Section 21.3.1, “Applying Patches from Patchwork”) and will be part of the commit log when +the patch is accepted.

+Tested-by +
+Indicates that the patch has been tested successfully. + You are encouraged to specify what kind of testing you performed + (compile-test on architecture X and Y, runtime test on target A, + …). This additional information helps other testers and the + maintainer. +
+Reviewed-by +
+Indicates that you code-reviewed the patch and did your + best in spotting problems, but you are not sufficiently familiar with + the area touched to provide an Acked-by tag. This means that there + may be remaining problems in the patch that would be spotted by + someone with more experience in that area. Should such problems be + detected, your Reviewed-by tag remains appropriate and you cannot + be blamed. +
+Acked-by +
+Indicates that you code-reviewed the patch and you are + familiar enough with the area touched to feel that the patch can be + committed as-is (no additional changes required). In case it later + turns out that something is wrong with the patch, your Acked-by could + be considered inappropriate. The difference between Acked-by and + Reviewed-by is thus mainly that you are prepared to take the blame on + Acked patches, but not on Reviewed ones. +

If you reviewed a patch and have comments on it, you should simply reply +to the patch stating these comments, without providing a Reviewed-by or +Acked-by tag. These tags should only be provided if you judge the patch +to be good as it is.

It is important to note that neither Reviewed-by nor Acked-by imply +that testing has been performed. To indicate that you both reviewed and +tested the patch, provide two separate tags (Reviewed/Acked-by and +Tested-by).

Note also that any developer can provide Tested/Reviewed/Acked-by +tags, without exception, and we encourage everyone to do this. Buildroot +does not have a defined group of core developers, it just so happens +that some developers are more active than others. The maintainer will +value tags according to the track record of their submitter. Tags +provided by a regular contributor will naturally be trusted more than +tags provided by a newcomer. As you provide tags more regularly, your +trustworthiness (in the eyes of the maintainer) will go up, but any +tag provided is valuable.

Buildroot’s Patchwork website can be used to pull in patches for testing +purposes. Please see Section 21.3.1, “Applying Patches from Patchwork” for more +information on using Buildroot’s Patchwork website to apply patches.

21.3.1. Applying Patches from Patchwork

The main use of Buildroot’s Patchwork website for a developer is for +pulling in patches into their local git repository for testing +purposes.

When browsing patches in the patchwork management interface, an mbox +link is provided at the top of the page. Copy this link address and +run the following commands:

$ git checkout -b <test-branch-name>
+$ wget -O - <mbox-url> | git am

Another option for applying patches is to create a bundle. A bundle is +a set of patches that you can group together using the patchwork +interface. Once the bundle is created and the bundle is made public, +you can copy the mbox link for the bundle and apply the bundle +using the above commands.

21.4. Work on items from the TODO list

If you want to contribute to Buildroot but don’t know where to start, +and you don’t like any of the above topics, you can always work on items +from the Buildroot TODO list. +Don’t hesitate to discuss an item first on the mailing list or on IRC. +Do edit the wiki to indicate when you start working on an item, so we +avoid duplicate efforts.

21.5. Submitting patches

Note

Please, do not attach patches to bugs, send them to the mailing list +instead.

If you made some changes to Buildroot and you would like to contribute +them to the Buildroot project, proceed as follows.

21.5.1. The formatting of a patch

We expect patches to be formatted in a specific way. This is necessary +to make it easy to review patches, to be able to apply them easily to +the git repository, to make it easy to find back in the history how +and why things have changed, and to make it possible to use git +bisect to locate the origin of a problem.

First of all, it is essential that the patch has a good commit +message. The commit message should start with a separate line with a +brief summary of the change, prefixed by the area touched by the +patch. A few examples of good commit titles:

  • +package/linuxptp: bump version to 2.0 +
  • +configs/imx23evk: bump Linux version to 4.19 +
  • +package/pkg-generic: postpone evaluation of dependency conditions +
  • +boot/uboot: needs host-{flex,bison} +
  • +support/testing: add python-ubjson tests +

The description that follows the prefix should start with a lower case +letter (i.e "bump", "needs", "postpone", "add" in the above examples).

Second, the body of the commit message should describe why this +change is needed, and if necessary also give details about how it +was done. When writing the commit message, think of how the reviewers +will read it, but also think about how you will read it when you look +at this change again a few years down the line.

Third, the patch itself should do only one change, but do it +completely. Two unrelated or weakly related changes should usually be +done in two separate patches. This usually means that a patch affects +only a single package. If several changes are related, it is often +still possible to split them up in small patches and apply them in a +specific order. Small patches make it easier to review, and often +make it easier to understand afterwards why a change was done. +However, each patch must be complete. It is not allowed that the +build is broken when only the first but not the second patch is +applied. This is necessary to be able to use git bisect afterwards.

Of course, while you’re doing your development, you’re probably going +back and forth between packages, and certainly not committing things +immediately in a way that is clean enough for submission. So most +developers rewrite the history of commits to produce a clean set of +commits that is appropriate for submission. To do this, you need to +use interactive rebasing. You can learn about it +in the Pro +Git book. Sometimes, it is even easier to discard you history with +git reset --soft origin/master and select individual changes with +git add -i or git add -p.

Finally, the patch should be signed off. This is done by adding +Signed-off-by: Your Real Name <your@email.address> at the end of the +commit message. git commit -s does that for you, if configured +properly. The Signed-off-by tag means that you publish the patch +under the Buildroot license (i.e. GPL-2.0+, except for package patches, +which have the upstream license), and that you are allowed to do so. +See the Developer Certificate of +Origin for details.

When adding new packages, you should submit every package in a +separate patch. This patch should have the update to +package/Config.in, the package Config.in file, the .mk file, the +.hash file, any init script, and all package patches. If the package +has many sub-options, these are sometimes better added as separate +follow-up patches. The summary line should be something like +<packagename>: new package. The body of the commit message can be +empty for simple packages, or it can contain the description of the +package (like the Config.in help text). If anything special has to be +done to build the package, this should also be explained explicitly in +the commit message body.

When you bump a package to a new version, you should also submit a +separate patch for each package. Don’t forget to update the .hash +file, or add it if it doesn’t exist yet. Also don’t forget to check if +the _LICENSE and _LICENSE_FILES are still valid. The summary line +should be something like <packagename>: bump to version <new +version>. If the new version only contains security updates compared +to the existing one, the summary should be <packagename>: security +bump to version <new version> and the commit message body should show +the CVE numbers that are fixed. If some package patches can be removed +in the new version, it should be explained explicitly why they can be +removed, preferably with the upstream commit ID. Also any other +required changes should be explained explicitly, like configure +options that no longer exist or are no longer needed.

If you are interested in getting notified of build failures and of +further changes in the packages you added or modified, please add +yourself to the DEVELOPERS file. This should be done in the same patch +creating or modifying the package. See the DEVELOPERS file +for more information.

Buildroot provides a handy tool to check for common coding style +mistakes on files you created or modified, called check-package (see +Section 17.24.2, “How to check the coding style” for more information).

21.5.2. Preparing a patch series

Starting from the changes committed in your local git view, rebase +your development branch on top of the upstream tree before generating +a patch set. To do so, run:

$ git fetch --all --tags
+$ git rebase origin/master

Now, you are ready to generate then submit your patch set.

To generate it, run:

$ git format-patch -M -n -s -o outgoing origin/master

This will generate patch files in the outgoing subdirectory, +automatically adding the Signed-off-by line.

Once patch files are generated, you can review/edit the commit message +before submitting them, using your favorite text editor.

Buildroot provides a handy tool to know to whom your patches should be +sent, called get-developers (see Chapter 22, DEVELOPERS file and get-developers for more +information). This tool reads your patches and outputs the appropriate +git send-email command to use:

$ ./utils/get-developers outgoing/*

Use the output of get-developers to send your patches:

$ git send-email --to buildroot@buildroot.org --cc bob --cc alice outgoing/*

Alternatively, get-developers -e can be used directly with the +--cc-cmd argument to git send-email to automatically CC the +affected developers:

$ git send-email --to buildroot@buildroot.org \
+      --cc-cmd './utils/get-developers -e' origin/master

git can be configured to automatically do this out of the box with:

$ git config sendemail.to buildroot@buildroot.org
+$ git config sendemail.ccCmd "$(pwd)/utils/get-developers -e"

And then just do:

$ git send-email origin/master

Note that git should be configured to use your mail account. +To configure git, see man git-send-email or google it.

If you do not use git send-email, make sure posted patches are not +line-wrapped, otherwise they cannot easily be applied. In such a case, +fix your e-mail client, or better yet, learn to use git send-email.

21.5.3. Cover letter

If you want to present the whole patch set in a separate mail, add +--cover-letter to the git format-patch command (see man +git-format-patch for further information). This will generate a +template for an introduction e-mail to your patch series.

A cover letter may be useful to introduce the changes you propose +in the following cases:

  • +large number of commits in the series; +
  • +deep impact of the changes in the rest of the project; +
  • +RFC [4]; +
  • +whenever you feel it will help presenting your work, your choices, + the review process, etc. +

21.5.4. Patch revision changelog

When improvements are requested, the new revision of each commit +should include a changelog of the modifications between each +submission. Note that when your patch series is introduced by a cover +letter, an overall changelog may be added to the cover letter in +addition to the changelog in the individual commits. +The best thing to rework a patch series is by interactive rebasing: +git rebase -i origin/master. Consult the git manual for more +information.

When added to the individual commits, this changelog is added when +editing the commit message. Below the Signed-off-by section, add +--- and your changelog.

Although the changelog will be visible for the reviewers in the mail +thread, as well as in patchwork, git +will automatically ignores lines below --- when the patch will be +merged. This is the intended behavior: the changelog is not meant to +be preserved forever in the git history of the project.

Hereafter the recommended layout:

Patch title: short explanation, max 72 chars
+
+A paragraph that explains the problem, and how it manifests itself. If
+the problem is complex, it is OK to add more paragraphs. All paragraphs
+should be wrapped at 72 characters.
+
+A paragraph that explains the root cause of the problem. Again, more
+than one paragraph is OK.
+
+Finally, one or more paragraphs that explain how the problem is solved.
+Don't hesitate to explain complex solutions in detail.
+
+Signed-off-by: John DOE <john.doe@example.net>
+
+---
+Changes v2 -> v3:
+  - foo bar  (suggested by Jane)
+  - bar buz
+
+Changes v1 -> v2:
+  - alpha bravo  (suggested by John)
+  - charly delta

Any patch revision should include the version number. The version number +is simply composed of the letter v followed by an integer greater or +equal to two (i.e. "PATCH v2", "PATCH v3" …).

This can be easily handled with git format-patch by using the option +--subject-prefix:

$ git format-patch --subject-prefix "PATCH v4" \
+    -M -s -o outgoing origin/master

Since git version 1.8.1, you can also use -v <n> (where <n> is the +version number):

$ git format-patch -v4 -M -s -o outgoing origin/master

When you provide a new version of a patch, please mark the old one as +superseded in patchwork. You need to +create an account on patchwork to be +able to modify the status of your patches. Note that you can only change +the status of patches you submitted yourself, which means the email +address you register in patchwork should +match the one you use for sending patches to the mailing list.

You can also add the --in-reply-to <message-id> option when +submitting a patch to the mailing list. The id of the mail to reply to +can be found under the "Message Id" tag on +patchwork. The advantage of +in-reply-to is that patchwork will automatically mark the previous +version of the patch as superseded.

21.6. Reporting issues/bugs or getting help

Before reporting any issue, please check in +the mailing list archive whether someone has +already reported and/or fixed a similar problem.

However you choose to report bugs or get help, either by +opening a bug in the bug tracker or by +sending a mail to the mailing list, there are +a number of details to provide in order to help people reproduce and +find a solution to the issue.

Try to think as if you were trying to help someone else; in +that case, what would you need?

Here is a short list of details to provide in such case:

  • +host machine (OS/release) +
  • +version of Buildroot +
  • +target for which the build fails +
  • +package(s) for which the build fails +
  • +the command that fails and its output +
  • +any information you think that may be relevant +

Additionally, you should add the .config file (or if you know how, a +defconfig; see Section 9.3, “Storing the Buildroot configuration”).

If some of these details are too large, do not hesitate to use a +pastebin service. Note that not all available pastebin services will +preserve Unix-style line terminators when downloading raw pastes. +Following pastebin services are known to work correctly: +- https://gist.github.com/ +- http://code.bulix.org/

21.7. Using the run-tests framework

Buildroot includes a run-time testing framework called run-tests built +upon Python scripting and QEMU runtime execution. There are two types of +test cases within the framework, one for build time tests and another for +run-time tests that have a QEMU dependency. The goals of the framework are +the following:

  • +build a well defined configuration +
  • +optionally, verify some properties of the build output +
  • +if it is a run-time test: +

    • +boot it under QEMU +
    • +run some test condition to verify that a given feature is working +

The run-tests tool has a series of options documented in the tool’s help -h +description. Some common options include setting the download folder, the +output folder, keeping build output, and for multiple test cases, you can set +the JLEVEL for each.

Here is an example walk through of running a test case.

  • +For a first step, let us see what all the test case options are. The test +cases can be listed by executing support/testing/run-tests -l. These tests +can all be run individually during test development from the console. Both +one at a time and selectively as a group of a subset of tests. +
$ support/testing/run-tests -l
+List of tests
+test_run (tests.utils.test_check_package.TestCheckPackage)
+Test the various ways the script can be called in a simple top to ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootMusl) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootuClibc) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainCCache) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainCtngMusl) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainLinaroArm) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv4) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv5) ... ok
+test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv7) ... ok
+[snip]
+test_run (tests.init.test_systemd.TestInitSystemSystemdRoFull) ... ok
+test_run (tests.init.test_systemd.TestInitSystemSystemdRoIfupdown) ... ok
+test_run (tests.init.test_systemd.TestInitSystemSystemdRoNetworkd) ... ok
+test_run (tests.init.test_systemd.TestInitSystemSystemdRwFull) ... ok
+test_run (tests.init.test_systemd.TestInitSystemSystemdRwIfupdown) ... ok
+test_run (tests.init.test_systemd.TestInitSystemSystemdRwNetworkd) ... ok
+test_run (tests.init.test_busybox.TestInitSystemBusyboxRo) ... ok
+test_run (tests.init.test_busybox.TestInitSystemBusyboxRoNet) ... ok
+test_run (tests.init.test_busybox.TestInitSystemBusyboxRw) ... ok
+test_run (tests.init.test_busybox.TestInitSystemBusyboxRwNet) ... ok
+
+Ran 157 tests in 0.021s
+
+OK

Those runtime tests are regularly executed by Buildroot Gitlab CI +infrastructure, see .gitlab.yml and https://gitlab.com/buildroot.org/buildroot/-/jobs.

21.7.1. Creating a test case

The best way to get familiar with how to create a test case is to look at a +few of the basic file system support/testing/tests/fs/ and init +support/testing/tests/init/ test scripts. Those tests give good examples +of a basic build and build with run type of tests. There are other more +advanced cases that use things like nested br2-external folders to provide +skeletons and additional packages.

The test cases by default use a br-arm-full-* uClibc-ng toolchain and the +prebuild kernel for a armv5/7 cpu. It is recommended to use the default +defconfig test configuration except when Glibc/musl or a newer kernel are +necessary. By using the default it saves build time and the test would +automatically inherit a kernel/std library upgrade when the default is +updated.

The basic test case definition involves

  • +Creation of a new test file +
  • +Defining a unique test class +
  • +Determining if the default defconfig plus test options can be used +
  • +Implementing a def test_run(self): function to optionally startup the +emulator and provide test case conditions. +

After creating the test script, add yourself to the DEVELOPERS file to +be the maintainer of that test case.

21.7.2. Debugging a test case

Within the Buildroot repository, the testing framework is organized at the +top level in support/testing/ by folders of conf, infra and tests. +All the test cases live under the test folder and are organized in various +folders representing the catagory of test.

Lets walk through an example.

  • +Using the Busybox Init system test case with a read/write rootfs +tests.init.test_busybox.TestInitSystemBusyboxRw +
  • +A minimal set of command line arguments when debugging a test case would +include -d which points to your dl folder, -o to an output folder, and +-k to keep any output on both pass/fail. With those options, the test will +retain logging and build artifacts providing status of the build and +execution of the test case. +
$ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.TestInitSystemBusyboxRw
+15:03:26 TestInitSystemBusyboxRw                  Starting
+15:03:28 TestInitSystemBusyboxRw                  Building
+15:08:18 TestInitSystemBusyboxRw                  Building done
+15:08:27 TestInitSystemBusyboxRw                  Cleaning up
+.
+Ran 1 test in 301.140s
+
+OK
  • +For the case of a successful build, the output_folder would contain a +<test name> folder with the Buildroot build, build log and run-time log. If +the build failed, the console output would show the stage at which it failed +(setup / build / run). Depending on the failure stage, the build/run logs +and/or Buildroot build artifacts can be inspected and instrumented. If the +QEMU instance needs to be launched for additional testing, the first few +lines of the run-time log capture it and it would allow some incremental +testing without re-running support/testing/run-tests. +
  • +You can also make modifications to the current sources inside the +output_folder (e.g. for debug purposes) and rerun the standard +Buildroot make targets (in order to regenerate the complete image with +the new modifications) and then rerun the test. Modifying the sources +directly can speed up debugging compared to adding patch files, wiping the +output directoy, and starting the test again. +
$ ls output_folder/
+TestInitSystemBusyboxRw/
+TestInitSystemBusyboxRw-build.log
+TestInitSystemBusyboxRw-run.log
  • +The source file used to implement this example test is found under +support/testing/tests/init/test_busybox.py. This file outlines the +minimal defconfig that creates the build, QEMU configuration to launch +the built images and the test case assertions. +

To test an existing or new test case within Gitlab CI, there is a method of +invoking a specific test by creating a Buildroot fork in Gitlab under your +account. This can be handy when adding/changing a run-time test or fixing a +bug on a use case tested by a run-time test case.

In the examples below, the <name> component of the branch name is a unique +string you choose to identify this specific job being created.

  • +to trigger all run-test test case jobs: +
 $ git push gitlab HEAD:<name>-runtime-tests
  • +to trigger one test case job, a specific branch naming string is used that +includes the full test case name. +
 $ git push gitlab HEAD:<name>-<test case name>


[4] RFC: (Request for comments) change proposal

Chapter 22. DEVELOPERS file and get-developers

The main Buildroot directory contains a file named DEVELOPERS that +lists the developers involved with various areas of Buildroot. Thanks +to this file, the get-developers tool allows to:

  • +Calculate the list of developers to whom patches should be sent, by + parsing the patches and matching the modified files with the + relevant developers. See Section 21.5, “Submitting patches” for details. +
  • +Find which developers are taking care of a given architecture or + package, so that they can be notified when a build failure occurs on + this architecture or package. This is done in interaction with + Buildroot’s autobuild infrastructure. +

We ask developers adding new packages, new boards, or generally new +functionality in Buildroot, to register themselves in the DEVELOPERS +file. As an example, we expect a developer contributing a new package +to include in his patch the appropriate modification to the +DEVELOPERS file.

The DEVELOPERS file format is documented in detail inside the file +itself.

The get-developers tool, located in utils/ allows to use +the DEVELOPERS file for various tasks:

  • +When passing one or several patches as command line argument, + get-developers will return the appropriate git send-email + command. If the -e option is passed, only the email addresses are + printed in a format suitable for git send-email --cc-cmd. +
  • +When using the -a <arch> command line option, get-developers will + return the list of developers in charge of the given architecture. +
  • +When using the -p <package> command line option, get-developers + will return the list of developers in charge of the given package. +
  • +When using the -c command line option, get-developers will look + at all files under version control in the Buildroot repository, and + list the ones that are not handled by any developer. The purpose of + this option is to help completing the DEVELOPERS file. +
  • +When using without any arguments, it validates the integrity of the + DEVELOPERS file and will note WARNINGS for items that don’t match. +

Chapter 23. Release Engineering

23.1. Releases

The Buildroot project makes quarterly releases with monthly bugfix +releases. The first release of each year is a long term support +release, LTS.

  • +Quarterly releases: 2020.02, 2020.05, 2020.08, and 2020.11 +
  • +Bugfix releases: 2020.02.1, 2020.02.2, … +
  • +LTS releases: 2020.02, 2021.02, … +

Releases are supported until the first bugfix release of the next +release, e.g., 2020.05.x is EOL when 2020.08.1 is released.

LTS releases are supported until the first bugfix release of the next +LTS, e.g., 2020.02.x is supported until 2021.02.1 is released.

23.2. Development

Each release cycle consist of two months of development on the master +branch and one month stabilization before the release is made. During +this phase no new features are added to master, only bugfixes.

The stabilization phase starts with tagging -rc1, and every week until +the release, another release candidate is tagged.

To handle new features and version bumps during the stabilization phase, +a next branch may be created for these features. Once the current +release has been made, the next branch is merged into master and +the development cycle for the next release continues there.

Part IV. Appendix

Chapter 24. Makedev syntax documentation

The makedev syntax is used in several places in Buildroot to +define changes to be made for permissions, or which device files to +create and how to create them, in order to avoid calls to mknod.

This syntax is derived from the makedev utility, and more complete +documentation can be found in the package/makedevs/README file.

It takes the form of a space separated list of fields, one file per +line; the fields are:

name

type

mode

uid

gid

major

minor

start

inc

count

There are a few non-trivial blocks:

  • +name is the path to the file you want to create/modify +
  • +type is the type of the file, being one of: +

    • +f: a regular file +
    • +d: a directory +
    • +r: a directory recursively +
    • +c: a character device file +
    • +b: a block device file +
    • +p: a named pipe +
  • +mode are the usual permissions settings (only numerical values + are allowed) +
  • +uid and gid are the UID and GID to set on this file; can be + either numerical values or actual names +
  • +major and minor are here for device files, set to - for other + files +
  • +start, inc and count are for when you want to create a batch + of files, and can be reduced to a loop, beginning at start, + incrementing its counter by inc until it reaches count +

Let’s say you want to change the permissions of a given file; using +this syntax, you will need to write:

/usr/bin/foo f 755 0 0 - - - - -
+/usr/bin/bar f 755 root root - - - - -
+/data/buz f 644 buz-user buz-group - - - - -

Alternatively, if you want to change owner/permission of a directory +recursively, you can write (to set UID to foo, GID to bar and access +rights to rwxr-x--- for the directory /usr/share/myapp and all files +and directories below it):

/usr/share/myapp r 750 foo bar - - - - -

On the other hand, if you want to create the device file /dev/hda +and the corresponding 15 files for the partitions, you will need for +/dev/hda:

/dev/hda b 640 root root 3 0 0 0 -

and then for device files corresponding to the partitions of +/dev/hda, /dev/hdaX, X ranging from 1 to 15:

/dev/hda b 640 root root 3 1 1 1 15

Extended attributes are supported if +BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is enabled. +This is done by adding a line starting with |xattr after +the line describing the file. Right now, only capability +is supported as extended attribute.

|xattr

capability

  • +|xattr is a "flag" that indicate an extended attribute +
  • +capability is a capability to add to the previous file +

If you want to add the capability cap_sys_admin to the binary foo, +you will write :

/usr/bin/foo f 755 root root - - - - -
+|xattr cap_sys_admin+eip

You can add several capabilities to a file by using several |xattr lines. +If you want to add the capability cap_sys_admin and cap_net_admin to the +binary foo, you will write :

/usr/bin/foo f 755 root root - - - - -
+|xattr cap_sys_admin+eip
+|xattr cap_net_admin+eip

Chapter 25. Makeusers syntax documentation

The syntax to create users is inspired by the makedev syntax, above, but +is specific to Buildroot.

The syntax for adding a user is a space-separated list of fields, one +user per line; the fields are:

username

uid

group

gid

password

home

shell

groups

comment

Where:

  • +username is the desired user name (aka login name) for the user. + It can not be root, and must be unique. If set to -, then just a + group will be created. +
  • +uid is the desired UID for the user. It must be unique, and not + 0. If set to -1, then a unique UID will be computed by Buildroot + in the range [1000…1999] +
  • +group is the desired name for the user’s main group. It can not + be root. If the group does not exist, it will be created. +
  • +gid is the desired GID for the user’s main group. It must be unique, + and not 0. If set to -1, and the group does not already exist, then + a unique GID will be computed by Buildroot in the range [1000..1999] +
  • +password is the crypt(3)-encoded password. If prefixed with !, + then login is disabled. If prefixed with =, then it is interpreted + as clear-text, and will be crypt-encoded (using MD5). If prefixed with + !=, then the password will be crypt-encoded (using MD5) and login + will be disabled. If set to *, then login is not allowed. If set to + -, then no password value will be set. +
  • +home is the desired home directory for the user. If set to -, no + home directory will be created, and the user’s home will be /. + Explicitly setting home to / is not allowed. +
  • +shell is the desired shell for the user. If set to -, then + /bin/false is set as the user’s shell. +
  • +groups is the comma-separated list of additional groups the user + should be part of. If set to -, then the user will be a member of + no additional group. Missing groups will be created with an arbitrary + gid. +
  • +comment (aka GECOS + field) is an almost-free-form text. +

There are a few restrictions on the content of each field:

  • +except for comment, all fields are mandatory. +
  • +except for comment, fields may not contain spaces. +
  • +no field may contain a colon (:). +

If home is not -, then the home directory, and all files below, +will belong to the user and its main group.

Examples:

foo -1 bar -1 !=blabla /home/foo /bin/sh alpha,bravo Foo user

This will create this user:

  • +username (aka login name) is: foo +
  • +uid is computed by Buildroot +
  • +main group is: bar +
  • +main group gid is computed by Buildroot +
  • +clear-text password is: blabla, will be crypt(3)-encoded, and login is disabled. +
  • +home is: /home/foo +
  • +shell is: /bin/sh +
  • +foo is also a member of groups: alpha and bravo +
  • +comment is: Foo user +
test 8000 wheel -1 = - /bin/sh - Test user

This will create this user:

  • +username (aka login name) is: test +
  • +uid is : 8000 +
  • +main group is: wheel +
  • +main group gid is computed by Buildroot, and will use the value defined in the rootfs skeleton +
  • +password is empty (aka no password). +
  • +home is / but will not belong to test +
  • +shell is: /bin/sh +
  • +test is not a member of any additional groups +
  • +comment is: Test user + +

Chapter 26. Migrating from older Buildroot versions

Some versions have introduced backward incompatibilities. This section +explains those incompatibilities, and for each explains what to do to +complete the migration.

26.1. Migrating to 2016.11

Before Buildroot 2016.11, it was possible to use only one br2-external +tree at once. With Buildroot 2016.11 came the possibility to use more +than one simultaneously (for details, see Section 9.2, “Keeping customizations outside of Buildroot”).

This however means that older br2-external trees are not usable as-is. +A minor change has to be made: adding a name to your br2-external tree.

This can be done very easily in just a few steps:

  • +First, create a new file named external.desc, at the root of your + br2-external tree, with a single line defining the name of your + br2-external tree: +

    $ echo 'name: NAME_OF_YOUR_TREE' >external.desc

    Note. Be careful when choosing a name: It has to be unique and be made +with only ASCII characters from the set [A-Za-z0-9_].

  • +Then, change every occurence of BR2_EXTERNAL in your br2-external + tree with the new variable: +

    $ find . -type f | xargs sed -i 's/BR2_EXTERNAL/BR2_EXTERNAL_NAME_OF_YOUR_TREE_PATH/g'

Now, your br2-external tree can be used with Buildroot 2016.11 onward.

Note: This change makes your br2-external tree incompatible with Buildroot +before 2016.11.

26.2. Migrating to 2017.08

Before Buildroot 2017.08, host packages were installed in $(HOST_DIR)/usr +(with e.g. the autotools' --prefix=$(HOST_DIR)/usr). With Buildroot +2017.08, they are now installed directly in $(HOST_DIR).

Whenever a package installs an executable that is linked with a library +in $(HOST_DIR)/lib, it must have an RPATH pointing to that directory.

An RPATH pointing to $(HOST_DIR)/usr/lib is no longer accepted.

\ No newline at end of file diff --git a/buildroot/docs/manual/manual.mk b/buildroot/docs/manual/manual.mk index d5db2c26c..1d03b213d 100644 --- a/buildroot/docs/manual/manual.mk +++ b/buildroot/docs/manual/manual.mk @@ -7,25 +7,4 @@ MANUAL_SOURCES = $(sort $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)) MANUAL_RESOURCES = $(TOPDIR)/docs/images -# Our manual needs to generate lists -# Packages included in BR2_EXTERNAL are not part of buildroot, so they -# should not be included in the manual. -define MANUAL_GEN_LISTS - $(Q)$(call MESSAGE,"Updating the manual lists...") - $(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(@D) \ - BR2_EXTERNAL=$(TOPDIR)/support/dummy-external \ - python -B $(TOPDIR)/support/scripts/gen-manual-lists.py -endef -MANUAL_POST_RSYNC_HOOKS += MANUAL_GEN_LISTS - -# Our list-generating script requires argparse -define MANUAL_CHECK_LISTS_DEPS - $(Q)if ! python -c "import argparse" >/dev/null 2>&1 ; then \ - echo "You need python with argparse on your host to generate" \ - "the list of packages in the manual"; \ - exit 1; \ - fi -endef -MANUAL_CHECK_DEPENDENCIES_HOOKS += MANUAL_CHECK_LISTS_DEPS - $(eval $(call asciidoc-document)) diff --git a/buildroot/docs/manual/manual.pdf b/buildroot/docs/manual/manual.pdf new file mode 100644 index 000000000..61a199d97 Binary files /dev/null and b/buildroot/docs/manual/manual.pdf differ diff --git a/buildroot/docs/manual/manual.text b/buildroot/docs/manual/manual.text new file mode 100644 index 000000000..90cfa6acc --- /dev/null +++ b/buildroot/docs/manual/manual.text @@ -0,0 +1,8173 @@ + +--------------------------------------------------------------------- + +The Buildroot user manual + +--------------------------------------------------------------------- +--------------------------------------------------------------------- + +Table of Contents + + +I. Getting started + + 1. About Buildroot + 2. System requirements + + 2.1. Mandatory packages + 2.2. Optional packages + + 3. Getting Buildroot + 4. Buildroot quick start + 5. Community resources + +II. User guide + + 6. Buildroot configuration + + 6.1. Cross-compilation toolchain + 6.2. /dev management + 6.3. init system + + 7. Configuration of other components + 8. General Buildroot usage + + 8.1. make tips + 8.2. Understanding when a full rebuild is necessary + 8.3. Understanding how to rebuild packages + 8.4. Offline builds + 8.5. Building out-of-tree + 8.6. Environment variables + 8.7. Dealing efficiently with filesystem images + 8.8. Graphing the dependencies between packages + 8.9. Graphing the build duration + 8.10. Graphing the filesystem size contribution of packages + 8.11. Top-level parallel build + 8.12. Integration with Eclipse + 8.13. Advanced usage + + 9. Project-specific customization + + 9.1. Recommended directory structure + 9.2. Keeping customizations outside of Buildroot + 9.3. Storing the Buildroot configuration + 9.4. Storing the configuration of other components + 9.5. Customizing the generated target filesystem + 9.6. Adding custom user accounts + 9.7. Customization after the images have been created + 9.8. Adding project-specific patches + 9.9. Adding project-specific packages + 9.10. Quick guide to storing your project-specific + customizations + + 10. Frequently Asked Questions & Troubleshooting + + 10.1. The boot hangs after Starting network… + 10.2. Why is there no compiler on the target? + 10.3. Why are there no development files on the target? + 10.4. Why is there no documentation on the target? + 10.5. Why are some packages not visible in the Buildroot + config menu? + 10.6. Why not use the target directory as a chroot directory? + 10.7. Why doesn’t Buildroot generate binary packages (.deb, + .ipkg…)? + 10.8. How to speed-up the build process? + + 11. Known issues + 12. Legal notice and licensing + + 12.1. Complying with open source licenses + 12.2. Complying with the Buildroot license + + 13. Beyond Buildroot + + 13.1. Boot the generated images + 13.2. Chroot + +III. Developer guide + + 14. How Buildroot works + 15. Coding style + + 15.1. Config.in file + 15.2. The .mk file + 15.3. The documentation + 15.4. Support scripts + + 16. Adding support for a particular board + 17. Adding new packages to Buildroot + + 17.1. Package directory + 17.2. Config files + 17.3. The .mk file + 17.4. The .hash file + 17.5. Infrastructure for packages with specific build systems + 17.6. Infrastructure for autotools-based packages + 17.7. Infrastructure for CMake-based packages + 17.8. Infrastructure for Python packages + 17.9. Infrastructure for LuaRocks-based packages + 17.10. Infrastructure for Perl/CPAN packages + 17.11. Infrastructure for virtual packages + 17.12. Infrastructure for packages using kconfig for + configuration files + 17.13. Infrastructure for rebar-based packages + 17.14. Infrastructure for Waf-based packages + 17.15. Infrastructure for Meson-based packages + 17.16. Integration of Cargo-based packages + 17.17. Infrastructure for Go packages + 17.18. Infrastructure for QMake-based packages + 17.19. Infrastructure for packages building kernel modules + 17.20. Infrastructure for asciidoc documents + 17.21. Infrastructure specific to the Linux kernel package + 17.22. Hooks available in the various build steps + 17.23. Gettext integration and interaction with packages + 17.24. Tips and tricks + 17.25. Conclusion + + 18. Patching a package + + 18.1. Providing patches + 18.2. How patches are applied + 18.3. Format and licensing of the package patches + 18.4. Integrating patches found on the Web + + 19. Download infrastructure + 20. Debugging Buildroot + 21. Contributing to Buildroot + + 21.1. Reproducing, analyzing and fixing bugs + 21.2. Analyzing and fixing autobuild failures + 21.3. Reviewing and testing patches + 21.4. Work on items from the TODO list + 21.5. Submitting patches + 21.6. Reporting issues/bugs or getting help + 21.7. Using the run-tests framework + + 22. DEVELOPERS file and get-developers + 23. Release Engineering + + 23.1. Releases + 23.2. Development + +IV. Appendix + + 24. Makedev syntax documentation + 25. Makeusers syntax documentation + 26. Migrating from older Buildroot versions + + 26.1. Migrating to 2016.11 + 26.2. Migrating to 2017.08 + +List of Examples + +17.1. Config script: divine package +17.2. Config script: imagemagick package: + + +--------------------------------------------------------------------- + +--------------------------------------------------------------------- + +Buildroot 2020.08-rc2 manual generated on 2020-08-24 14:41:07 UTC +from git revision 30ccc0e3f0 + +The Buildroot manual is written by the Buildroot developers. It is +licensed under the GNU General Public License, version 2. Refer to +the COPYING [http://git.buildroot.org/buildroot/tree/COPYING?id= +30ccc0e3f0f66b6345e602148d10f11e6a1831bd] file in the Buildroot +sources for the full text of this license. + +Copyright © 2004-2020 The Buildroot developers + +Part I. Getting started + +Table of Contents + +1. About Buildroot +2. System requirements + + 2.1. Mandatory packages + 2.2. Optional packages + +3. Getting Buildroot +4. Buildroot quick start +5. Community resources + +Chapter 1. About Buildroot + +Buildroot is a tool that simplifies and automates the process of +building a complete Linux system for an embedded system, using +cross-compilation. + +In order to achieve this, Buildroot is able to generate a +cross-compilation toolchain, a root filesystem, a Linux kernel image +and a bootloader for your target. Buildroot can be used for any +combination of these options, independently (you can for example use +an existing cross-compilation toolchain, and build only your root +filesystem with Buildroot). + +Buildroot is useful mainly for people working with embedded systems. +Embedded systems often use processors that are not the regular x86 +processors everyone is used to having in his PC. They can be PowerPC +processors, MIPS processors, ARM processors, etc. + +Buildroot supports numerous processors and their variants; it also +comes with default configurations for several boards available +off-the-shelf. Besides this, a number of third-party projects are +based on, or develop their BSP ^[1] or SDK ^[2] on top of Buildroot. + + +--------------------------------------------------------------------- + +^[1] BSP: Board Support Package + +^[2] SDK: Software Development Kit + +Chapter 2. System requirements + +Buildroot is designed to run on Linux systems. + +While Buildroot itself will build most host packages it needs for the +compilation, certain standard Linux utilities are expected to be +already installed on the host system. Below you will find an overview +of the mandatory and optional packages (note that package names may +vary between distributions). + +2.1. Mandatory packages + + * Build tools: + + + which + + sed + + make (version 3.81 or any later) + + binutils + + build-essential (only for Debian based systems) + + gcc (version 4.8 or any later) + + g++ (version 4.8 or any later) + + bash + + patch + + gzip + + bzip2 + + perl (version 5.8.7 or any later) + + tar + + cpio + + unzip + + rsync + + file (must be in /usr/bin/file) + + bc + * Source fetching tools: + + + wget + +2.2. Optional packages + + * Recommended dependencies: + + Some features or utilities in Buildroot, like the legal-info, or + the graph generation tools, have additional dependencies. + Although they are not mandatory for a simple build, they are + still highly recommended: + + + python (version 2.7 or any later) + * Configuration interface dependencies: + + For these libraries, you need to install both runtime and + development data, which in many distributions are packaged + separately. The development packages typically have a -dev or + -devel suffix. + + + ncurses5 to use the menuconfig interface + + qt5 to use the xconfig interface + + glib2, gtk2 and glade2 to use the gconfig interface + * Source fetching tools: + + In the official tree, most of the package sources are retrieved + using wget from ftp, http or https locations. A few packages are + only available through a version control system. Moreover, + Buildroot is capable of downloading sources via other tools, like + rsync or scp (refer to Chapter 19, Download infrastructure for + more details). If you enable packages using any of these methods, + you will need to install the corresponding tool on the host + system: + + + bazaar + + cvs + + git + + mercurial + + rsync + + scp + + subversion + * Java-related packages, if the Java Classpath needs to be built + for the target system: + + + The javac compiler + + The jar tool + * Documentation generation tools: + + + asciidoc, version 8.6.3 or higher + + w3m + + python with the argparse module (automatically present in + 2.7+ and 3.2+) + + dblatex (required for the pdf manual only) + * Graph generation tools: + + + graphviz to use graph-depends and -graph-depends + + python-matplotlib to use graph-build + +Chapter 3. Getting Buildroot + +Buildroot releases are made every 3 months, in February, May, August +and November. Release numbers are in the format YYYY.MM, so for +example 2013.02, 2014.08. + +Release tarballs are available at http://buildroot.org/downloads/. + +For your convenience, a Vagrantfile [https://www.vagrantup.com/] is +available in support/misc/Vagrantfile in the Buildroot source tree to +quickly set up a virtual machine with the needed dependencies to get +started. + +If you want to setup an isolated buildroot environment on Linux or +Mac Os X, paste this line onto your terminal: + +curl -O https://buildroot.org/downloads/Vagrantfile; vagrant up + +If you are on Windows, paste this into your powershell: + +(new-object System.Net.WebClient).DownloadFile( +"https://buildroot.org/downloads/Vagrantfile","Vagrantfile"); +vagrant up + +If you want to follow development, you can use the daily snapshots or +make a clone of the Git repository. Refer to the Download page [http: +//buildroot.org/download] of the Buildroot website for more details. + +Chapter 4. Buildroot quick start + +Important: you can and should build everything as a normal user. +There is no need to be root to configure and use Buildroot. By +running all commands as a regular user, you protect your system +against packages behaving badly during compilation and installation. + +The first step when using Buildroot is to create a configuration. +Buildroot has a nice configuration tool similar to the one you can +find in the Linux kernel [http://www.kernel.org/] or in BusyBox +[http://www.busybox.net/]. + +From the buildroot directory, run + + $ make menuconfig + +for the original curses-based configurator, or + + $ make nconfig + +for the new curses-based configurator, or + + $ make xconfig + +for the Qt-based configurator, or + + $ make gconfig + +for the GTK-based configurator. + +All of these "make" commands will need to build a configuration +utility (including the interface), so you may need to install +"development" packages for relevant libraries used by the +configuration utilities. Refer to Chapter 2, System requirements for +more details, specifically the optional requirements to get the +dependencies of your favorite interface. + +For each menu entry in the configuration tool, you can find +associated help that describes the purpose of the entry. Refer to +Chapter 6, Buildroot configuration for details on some specific +configuration aspects. + +Once everything is configured, the configuration tool generates a +.config file that contains the entire configuration. This file will +be read by the top-level Makefile. + +To start the build process, simply run: + + $ make + +By default, Buildroot does not support top-level parallel build, so +running make -jN is not necessary. There is however experimental +support for top-level parallel build, see Section 8.11, “Top-level +parallel build”. + +The make command will generally perform the following steps: + + * download source files (as required); + * configure, build and install the cross-compilation toolchain, or + simply import an external toolchain; + * configure, build and install selected target packages; + * build a kernel image, if selected; + * build a bootloader image, if selected; + * create a root filesystem in selected formats. + +Buildroot output is stored in a single directory, output/. This +directory contains several subdirectories: + + * images/ where all the images (kernel image, bootloader and root + filesystem images) are stored. These are the files you need to + put on your target system. + * build/ where all the components are built (this includes tools + needed by Buildroot on the host and packages compiled for the + target). This directory contains one subdirectory for each of + these components. + * host/ contains both the tools built for the host, and the sysroot + of the target toolchain. The former is an installation of tools + compiled for the host that are needed for the proper execution of + Buildroot, including the cross-compilation toolchain. The latter + is a hierarchy similar to a root filesystem hierarchy. It + contains the headers and libraries of all user-space packages + that provide and install libraries used by other packages. + However, this directory is not intended to be the root filesystem + for the target: it contains a lot of development files, + unstripped binaries and libraries that make it far too big for an + embedded system. These development files are used to compile + libraries and applications for the target that depend on other + libraries. + * staging/ is a symlink to the target toolchain sysroot inside host + /, which exists for backwards compatibility. + * target/ which contains almost the complete root filesystem for + the target: everything needed is present except the device files + in /dev/ (Buildroot can’t create them because Buildroot doesn’t + run as root and doesn’t want to run as root). Also, it doesn’t + have the correct permissions (e.g. setuid for the busybox + binary). Therefore, this directory should not be used on your + target. Instead, you should use one of the images built in the + images/ directory. If you need an extracted image of the root + filesystem for booting over NFS, then use the tarball image + generated in images/ and extract it as root. Compared to staging + /, target/ contains only the files and libraries needed to run + the selected target applications: the development files (headers, + etc.) are not present, the binaries are stripped. + +These commands, make menuconfig|nconfig|gconfig|xconfig and make, are +the basic ones that allow to easily and quickly generate images +fitting your needs, with all the features and applications you +enabled. + +More details about the "make" command usage are given in Section 8.1, +“make tips”. + +Chapter 5. Community resources + +Like any open source project, Buildroot has different ways to share +information in its community and outside. + +Each of those ways may interest you if you are looking for some help, +want to understand Buildroot or contribute to the project. + +Mailing List + + Buildroot has a mailing list for discussion and development. It + is the main method of interaction for Buildroot users and + developers. + + Only subscribers to the Buildroot mailing list are allowed to + post to this list. You can subscribe via the mailing list info + page [http://lists.buildroot.org/mailman/listinfo/buildroot]. + + Mails that are sent to the mailing list are also available in the + mailing list archives [http://lists.buildroot.org/pipermail/ + buildroot] and via Gmane [http://gmane.org], at + gmane.comp.lib.uclibc.buildroot [http://dir.gmane.org/ + gmane.comp.lib.uclibc.buildroot]. Please search the mailing list + archives before asking questions, since there is a good chance + someone else has asked the same question before. + +IRC + + The Buildroot IRC channel #buildroot [irc://freenode.net/# + buildroot] is hosted on Freenode [http://webchat.freenode.net]. + It is a useful place to ask quick questions or discuss on certain + topics. + + When asking for help on IRC, share relevant logs or pieces of + code using a code sharing website, such as http://code.bulix.org. + + Note that for certain questions, posting to the mailing list may + be better as it will reach more people, both developers and + users. + +Bug tracker + Bugs in Buildroot can be reported via the mailing list or + alternatively via the Buildroot bugtracker [https:// + bugs.buildroot.org/buglist.cgi?product=buildroot]. Please refer + to Section 21.6, “Reporting issues/bugs or getting help” before + creating a bug report. +Wiki + The Buildroot wiki page [http://elinux.org/Buildroot] is hosted + on the eLinux [http://elinux.org] wiki. It contains some useful + links, an overview of past and upcoming events, and a TODO list. +Patchwork + + Patchwork is a web-based patch tracking system designed to + facilitate the contribution and management of contributions to an + open-source project. Patches that have been sent to a mailing + list are 'caught' by the system, and appear on a web page. Any + comments posted that reference the patch are appended to the + patch page too. For more information on Patchwork see http:// + jk.ozlabs.org/projects/patchwork/. + + Buildroot’s Patchwork website is mainly for use by Buildroot’s + maintainer to ensure patches aren’t missed. It is also used by + Buildroot patch reviewers (see also Section 21.3.1, “Applying + Patches from Patchwork”). However, since the website exposes + patches and their corresponding review comments in a clean and + concise web interface, it can be useful for all Buildroot + developers. + + The Buildroot patch management interface is available at http:// + patchwork.buildroot.org. + +Part II. User guide + +Table of Contents + +6. Buildroot configuration + + 6.1. Cross-compilation toolchain + 6.2. /dev management + 6.3. init system + +7. Configuration of other components +8. General Buildroot usage + + 8.1. make tips + 8.2. Understanding when a full rebuild is necessary + 8.3. Understanding how to rebuild packages + 8.4. Offline builds + 8.5. Building out-of-tree + 8.6. Environment variables + 8.7. Dealing efficiently with filesystem images + 8.8. Graphing the dependencies between packages + 8.9. Graphing the build duration + 8.10. Graphing the filesystem size contribution of packages + 8.11. Top-level parallel build + 8.12. Integration with Eclipse + 8.13. Advanced usage + +9. Project-specific customization + + 9.1. Recommended directory structure + 9.2. Keeping customizations outside of Buildroot + 9.3. Storing the Buildroot configuration + 9.4. Storing the configuration of other components + 9.5. Customizing the generated target filesystem + 9.6. Adding custom user accounts + 9.7. Customization after the images have been created + 9.8. Adding project-specific patches + 9.9. Adding project-specific packages + 9.10. Quick guide to storing your project-specific customizations + +10. Frequently Asked Questions & Troubleshooting + + 10.1. The boot hangs after Starting network… + 10.2. Why is there no compiler on the target? + 10.3. Why are there no development files on the target? + 10.4. Why is there no documentation on the target? + 10.5. Why are some packages not visible in the Buildroot config + menu? + 10.6. Why not use the target directory as a chroot directory? + 10.7. Why doesn’t Buildroot generate binary packages (.deb, + .ipkg…)? + 10.8. How to speed-up the build process? + +11. Known issues +12. Legal notice and licensing + + 12.1. Complying with open source licenses + 12.2. Complying with the Buildroot license + +13. Beyond Buildroot + + 13.1. Boot the generated images + 13.2. Chroot + +Chapter 6. Buildroot configuration + +All the configuration options in make *config have a help text +providing details about the option. + +The make *config commands also offer a search tool. Read the help +message in the different frontend menus to know how to use it: + + * in menuconfig, the search tool is called by pressing /; + * in xconfig, the search tool is called by pressing Ctrl + f. + +The result of the search shows the help message of the matching +items. In menuconfig, numbers in the left column provide a shortcut +to the corresponding entry. Just type this number to directly jump to +the entry, or to the containing menu in case the entry is not +selectable due to a missing dependency. + +Although the menu structure and the help text of the entries should +be sufficiently self-explanatory, a number of topics require +additional explanation that cannot easily be covered in the help text +and are therefore covered in the following sections. + +6.1. Cross-compilation toolchain + +A compilation toolchain is the set of tools that allows you to +compile code for your system. It consists of a compiler (in our case, +gcc), binary utils like assembler and linker (in our case, binutils) +and a C standard library (for example GNU Libc [http://www.gnu.org/ +software/libc/libc.html], uClibc-ng [http://www.uclibc-ng.org/]). + +The system installed on your development station certainly already +has a compilation toolchain that you can use to compile an +application that runs on your system. If you’re using a PC, your +compilation toolchain runs on an x86 processor and generates code for +an x86 processor. Under most Linux systems, the compilation toolchain +uses the GNU libc (glibc) as the C standard library. This compilation +toolchain is called the "host compilation toolchain". The machine on +which it is running, and on which you’re working, is called the "host +system" ^[3]. + +The compilation toolchain is provided by your distribution, and +Buildroot has nothing to do with it (other than using it to build a +cross-compilation toolchain and other tools that are run on the +development host). + +As said above, the compilation toolchain that comes with your system +runs on and generates code for the processor in your host system. As +your embedded system has a different processor, you need a +cross-compilation toolchain - a compilation toolchain that runs on +your host system but generates code for your target system (and +target processor). For example, if your host system uses x86 and your +target system uses ARM, the regular compilation toolchain on your +host runs on x86 and generates code for x86, while the +cross-compilation toolchain runs on x86 and generates code for ARM. + +Buildroot provides two solutions for the cross-compilation toolchain: + + * The internal toolchain backend, called Buildroot toolchain in the + configuration interface. + * The external toolchain backend, called External toolchain in the + configuration interface. + +The choice between these two solutions is done using the Toolchain +Type option in the Toolchain menu. Once one solution has been chosen, +a number of configuration options appear, they are detailed in the +following sections. + +6.1.1. Internal toolchain backend + +The internal toolchain backend is the backend where Buildroot builds +by itself a cross-compilation toolchain, before building the +userspace applications and libraries for your target embedded system. + +This backend supports several C libraries: uClibc-ng [http:// +www.uclibc-ng.org], glibc [http://www.gnu.org/software/libc/ +libc.html] and musl [http://www.musl-libc.org]. + +Once you have selected this backend, a number of options appear. The +most important ones allow to: + + * Change the version of the Linux kernel headers used to build the + toolchain. This item deserves a few explanations. In the process + of building a cross-compilation toolchain, the C library is being + built. This library provides the interface between userspace + applications and the Linux kernel. In order to know how to "talk" + to the Linux kernel, the C library needs to have access to the + Linux kernel headers (i.e. the .h files from the kernel), which + define the interface between userspace and the kernel (system + calls, data structures, etc.). Since this interface is backward + compatible, the version of the Linux kernel headers used to build + your toolchain do not need to match exactly the version of the + Linux kernel you intend to run on your embedded system. They only + need to have a version equal or older to the version of the Linux + kernel you intend to run. If you use kernel headers that are more + recent than the Linux kernel you run on your embedded system, + then the C library might be using interfaces that are not + provided by your Linux kernel. + * Change the version of the GCC compiler, binutils and the C + library. + * Select a number of toolchain options (uClibc only): whether the + toolchain should have RPC support (used mainly for NFS), + wide-char support, locale support (for internationalization), C++ + support or thread support. Depending on which options you choose, + the number of userspace applications and libraries visible in + Buildroot menus will change: many applications and libraries + require certain toolchain options to be enabled. Most packages + show a comment when a certain toolchain option is required to be + able to enable those packages. If needed, you can further refine + the uClibc configuration by running make uclibc-menuconfig. Note + however that all packages in Buildroot are tested against the + default uClibc configuration bundled in Buildroot: if you deviate + from this configuration by removing features from uClibc, some + packages may no longer build. + +It is worth noting that whenever one of those options is modified, +then the entire toolchain and system must be rebuilt. See +Section 8.2, “Understanding when a full rebuild is necessary”. + +Advantages of this backend: + + * Well integrated with Buildroot + * Fast, only builds what’s necessary + +Drawbacks of this backend: + + * Rebuilding the toolchain is needed when doing make clean, which + takes time. If you’re trying to reduce your build time, consider + using the External toolchain backend. + +6.1.2. External toolchain backend + +The external toolchain backend allows to use existing pre-built +cross-compilation toolchains. Buildroot knows about a number of +well-known cross-compilation toolchains (from Linaro [http:// +www.linaro.org] for ARM, Sourcery CodeBench [http://www.mentor.com/ +embedded-software/sourcery-tools/sourcery-codebench/editions/ +lite-edition/] for ARM, x86-64, PowerPC, and MIPS, and is capable of +downloading them automatically, or it can be pointed to a custom +toolchain, either available for download or installed locally. + +Then, you have three solutions to use an external toolchain: + + * Use a predefined external toolchain profile, and let Buildroot + download, extract and install the toolchain. Buildroot already + knows about a few CodeSourcery and Linaro toolchains. Just select + the toolchain profile in Toolchain from the available ones. This + is definitely the easiest solution. + * Use a predefined external toolchain profile, but instead of + having Buildroot download and extract the toolchain, you can tell + Buildroot where your toolchain is already installed on your + system. Just select the toolchain profile in Toolchain through + the available ones, unselect Download toolchain automatically, + and fill the Toolchain path text entry with the path to your + cross-compiling toolchain. + * Use a completely custom external toolchain. This is particularly + useful for toolchains generated using crosstool-NG or with + Buildroot itself. To do this, select the Custom toolchain + solution in the Toolchain list. You need to fill the Toolchain + path, Toolchain prefix and External toolchain C library options. + Then, you have to tell Buildroot what your external toolchain + supports. If your external toolchain uses the glibc library, you + only have to tell whether your toolchain supports C++ or not and + whether it has built-in RPC support. If your external toolchain + uses the uClibc library, then you have to tell Buildroot if it + supports RPC, wide-char, locale, program invocation, threads and + C++. At the beginning of the execution, Buildroot will tell you + if the selected options do not match the toolchain configuration. + +Our external toolchain support has been tested with toolchains from +CodeSourcery and Linaro, toolchains generated by crosstool-NG [http:/ +/crosstool-ng.org], and toolchains generated by Buildroot itself. In +general, all toolchains that support the sysroot feature should work. +If not, do not hesitate to contact the developers. + +We do not support toolchains or SDK generated by OpenEmbedded or +Yocto, because these toolchains are not pure toolchains (i.e. just +the compiler, binutils, the C and C++ libraries). Instead these +toolchains come with a very large set of pre-compiled libraries and +programs. Therefore, Buildroot cannot import the sysroot of the +toolchain, as it would contain hundreds of megabytes of pre-compiled +libraries that are normally built by Buildroot. + +We also do not support using the distribution toolchain (i.e. the gcc +/binutils/C library installed by your distribution) as the toolchain +to build software for the target. This is because your distribution +toolchain is not a "pure" toolchain (i.e. only with the C/C++ +library), so we cannot import it properly into the Buildroot build +environment. So even if you are building a system for a x86 or x86_64 +target, you have to generate a cross-compilation toolchain with +Buildroot or crosstool-NG. + +If you want to generate a custom toolchain for your project, that can +be used as an external toolchain in Buildroot, our recommendation is +to build it either with Buildroot itself (see Section 6.1.3, “Build +an external toolchain with Buildroot”) or with crosstool-NG [http:// +crosstool-ng.org]. + +Advantages of this backend: + + * Allows to use well-known and well-tested cross-compilation + toolchains. + * Avoids the build time of the cross-compilation toolchain, which + is often very significant in the overall build time of an + embedded Linux system. + +Drawbacks of this backend: + + * If your pre-built external toolchain has a bug, may be hard to + get a fix from the toolchain vendor, unless you build your + external toolchain by yourself using Buildroot or Crosstool-NG. + +6.1.3. Build an external toolchain with Buildroot + +The Buildroot internal toolchain option can be used to create an +external toolchain. Here are a series of steps to build an internal +toolchain and package it up for reuse by Buildroot itself (or other +projects). + +Create a new Buildroot configuration, with the following details: + + * Select the appropriate Target options for your target CPU + architecture + * In the Toolchain menu, keep the default of Buildroot toolchain + for Toolchain type, and configure your toolchain as desired + * In the System configuration menu, select None as the Init system + and none as /bin/sh + * In the Target packages menu, disable BusyBox + * In the Filesystem images menu, disable tar the root filesystem + +Then, we can trigger the build, and also ask Buildroot to generate a +SDK. This will conveniently generate for us a tarball which contains +our toolchain: + +make sdk + +This produces the SDK tarball in $(O)/images, with a name similar to +arm-buildroot-linux-uclibcgnueabi_sdk-buildroot.tar.gz. Save this +tarball, as it is now the toolchain that you can re-use as an +external toolchain in other Buildroot projects. + +In those other Buildroot projects, in the Toolchain menu: + + * Set Toolchain type to External toolchain + * Set Toolchain to Custom toolchain + * Set Toolchain origin to Toolchain to be downloaded and installed + * Set Toolchain URL to file:///path/to/your/sdk/tarball.tar.gz + +6.1.3.1. External toolchain wrapper + +When using an external toolchain, Buildroot generates a wrapper +program, that transparently passes the appropriate options (according +to the configuration) to the external toolchain programs. In case you +need to debug this wrapper to check exactly what arguments are +passed, you can set the environment variable BR2_DEBUG_WRAPPER to +either one of: + + * 0, empty or not set: no debug + * 1: trace all arguments on a single line + * 2: trace one argument per line + +6.2. /dev management + +On a Linux system, the /dev directory contains special files, called +device files, that allow userspace applications to access the +hardware devices managed by the Linux kernel. Without these device +files, your userspace applications would not be able to use the +hardware devices, even if they are properly recognized by the Linux +kernel. + +Under System configuration, /dev management, Buildroot offers four +different solutions to handle the /dev directory : + + * The first solution is Static using device table. This is the old + classical way of handling device files in Linux. With this + method, the device files are persistently stored in the root + filesystem (i.e. they persist across reboots), and there is + nothing that will automatically create and remove those device + files when hardware devices are added or removed from the system. + Buildroot therefore creates a standard set of device files using + a device table, the default one being stored in system/ + device_table_dev.txt in the Buildroot source code. This file is + processed when Buildroot generates the final root filesystem + image, and the device files are therefore not visible in the + output/target directory. The BR2_ROOTFS_STATIC_DEVICE_TABLE + option allows to change the default device table used by + Buildroot, or to add an additional device table, so that + additional device files are created by Buildroot during the + build. So, if you use this method, and a device file is missing + in your system, you can for example create a board// + /device_table_dev.txt file that contains the + description of your additional device files, and then you can set + BR2_ROOTFS_STATIC_DEVICE_TABLE to system/device_table_dev.txt + board///device_table_dev.txt. For more + details about the format of the device table file, see + Chapter 24, Makedev syntax documentation. + * The second solution is Dynamic using devtmpfs only. devtmpfs is a + virtual filesystem inside the Linux kernel that has been + introduced in kernel 2.6.32 (if you use an older kernel, it is + not possible to use this option). When mounted in /dev, this + virtual filesystem will automatically make device files appear + and disappear as hardware devices are added and removed from the + system. This filesystem is not persistent across reboots: it is + filled dynamically by the kernel. Using devtmpfs requires the + following kernel configuration options to be enabled: + CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT. When Buildroot is in + charge of building the Linux kernel for your embedded device, it + makes sure that those two options are enabled. However, if you + build your Linux kernel outside of Buildroot, then it is your + responsibility to enable those two options (if you fail to do so, + your Buildroot system will not boot). + * The third solution is Dynamic using devtmpfs + mdev. This method + also relies on the devtmpfs virtual filesystem detailed above (so + the requirement to have CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT + enabled in the kernel configuration still apply), but adds the + mdev userspace utility on top of it. mdev is a program part of + BusyBox that the kernel will call every time a device is added or + removed. Thanks to the /etc/mdev.conf configuration file, mdev + can be configured to for example, set specific permissions or + ownership on a device file, call a script or application whenever + a device appears or disappear, etc. Basically, it allows + userspace to react on device addition and removal events. mdev + can for example be used to automatically load kernel modules when + devices appear on the system. mdev is also important if you have + devices that require a firmware, as it will be responsible for + pushing the firmware contents to the kernel. mdev is a + lightweight implementation (with fewer features) of udev. For + more details about mdev and the syntax of its configuration file, + see http://git.busybox.net/busybox/tree/docs/mdev.txt. + * The fourth solution is Dynamic using devtmpfs + eudev. This + method also relies on the devtmpfs virtual filesystem detailed + above, but adds the eudev userspace daemon on top of it. eudev is + a daemon that runs in the background, and gets called by the + kernel when a device gets added or removed from the system. It is + a more heavyweight solution than mdev, but provides higher + flexibility. eudev is a standalone version of udev, the original + userspace daemon used in most desktop Linux distributions, which + is now part of Systemd. For more details, see http:// + en.wikipedia.org/wiki/Udev. + +The Buildroot developers recommendation is to start with the Dynamic +using devtmpfs only solution, until you have the need for userspace +to be notified when devices are added/removed, or if firmwares are +needed, in which case Dynamic using devtmpfs + mdev is usually a good +solution. + +Note that if systemd is chosen as init system, /dev management will +be performed by the udev program provided by systemd. + +6.3. init system + +The init program is the first userspace program started by the kernel +(it carries the PID number 1), and is responsible for starting the +userspace services and programs (for example: web server, graphical +applications, other network servers, etc.). + +Buildroot allows to use three different types of init systems, which +can be chosen from System configuration, Init system: + + * The first solution is BusyBox. Amongst many programs, BusyBox has + an implementation of a basic init program, which is sufficient + for most embedded systems. Enabling the BR2_INIT_BUSYBOX will + ensure BusyBox will build and install its init program. This is + the default solution in Buildroot. The BusyBox init program will + read the /etc/inittab file at boot to know what to do. The syntax + of this file can be found in http://git.busybox.net/busybox/tree/ + examples/inittab (note that BusyBox inittab syntax is special: do + not use a random inittab documentation from the Internet to learn + about BusyBox inittab). The default inittab in Buildroot is + stored in system/skeleton/etc/inittab. Apart from mounting a few + important filesystems, the main job the default inittab does is + to start the /etc/init.d/rcS shell script, and start a getty + program (which provides a login prompt). + * The second solution is systemV. This solution uses the old + traditional sysvinit program, packed in Buildroot in package/ + sysvinit. This was the solution used in most desktop Linux + distributions, until they switched to more recent alternatives + such as Upstart or Systemd. sysvinit also works with an inittab + file (which has a slightly different syntax than the one from + BusyBox). The default inittab installed with this init solution + is located in package/sysvinit/inittab. + * The third solution is systemd. systemd is the new generation init + system for Linux. It does far more than traditional init + programs: aggressive parallelization capabilities, uses socket + and D-Bus activation for starting services, offers on-demand + starting of daemons, keeps track of processes using Linux control + groups, supports snapshotting and restoring of the system state, + etc. systemd will be useful on relatively complex embedded + systems, for example the ones requiring D-Bus and services + communicating between each other. It is worth noting that systemd + brings a fairly big number of large dependencies: dbus, udev and + more. For more details about systemd, see http:// + www.freedesktop.org/wiki/Software/systemd. + +The solution recommended by Buildroot developers is to use the +BusyBox init as it is sufficient for most embedded systems. systemd +can be used for more complex situations. + + +--------------------------------------------------------------------- + +^[3] This terminology differs from what is used by GNU configure, +where the host is the machine on which the application will run +(which is usually the same as target) + +Chapter 7. Configuration of other components + +Before attempting to modify any of the components below, make sure +you have already configured Buildroot itself, and have enabled the +corresponding package. + +BusyBox + + If you already have a BusyBox configuration file, you can + directly specify this file in the Buildroot configuration, using + BR2_PACKAGE_BUSYBOX_CONFIG. Otherwise, Buildroot will start from + a default BusyBox configuration file. + + To make subsequent changes to the configuration, use make + busybox-menuconfig to open the BusyBox configuration editor. + + It is also possible to specify a BusyBox configuration file + through an environment variable, although this is not + recommended. Refer to Section 8.6, “Environment variables” for + more details. + +uClibc + Configuration of uClibc is done in the same way as for BusyBox. + The configuration variable to specify an existing configuration + file is BR2_UCLIBC_CONFIG. The command to make subsequent changes + is make uclibc-menuconfig. +Linux kernel + + If you already have a kernel configuration file, you can directly + specify this file in the Buildroot configuration, using + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG. + + If you do not yet have a kernel configuration file, you can + either start by specifying a defconfig in the Buildroot + configuration, using BR2_LINUX_KERNEL_USE_DEFCONFIG, or start by + creating an empty file and specifying it as custom configuration + file, using BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG. + + To make subsequent changes to the configuration, use make + linux-menuconfig to open the Linux configuration editor. + +Barebox + Configuration of Barebox is done in the same way as for the Linux + kernel. The corresponding configuration variables are + BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG and + BR2_TARGET_BAREBOX_USE_DEFCONFIG. To open the configuration + editor, use make barebox-menuconfig. +U-Boot + Configuration of U-Boot (version 2015.04 or newer) is done in the + same way as for the Linux kernel. The corresponding configuration + variables are BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG and + BR2_TARGET_UBOOT_USE_DEFCONFIG. To open the configuration editor, + use make uboot-menuconfig. + +Chapter 8. General Buildroot usage + +8.1. make tips + +This is a collection of tips that help you make the most of +Buildroot. + +Display all commands executed by make:  + + $ make V=1 + +Display the list of boards with a defconfig:  + + $ make list-defconfigs + +Display all available targets:  + + $ make help + +Not all targets are always available, some settings in the .config +file may hide some targets: + + * busybox-menuconfig only works when busybox is enabled; + * linux-menuconfig and linux-savedefconfig only work when linux is + enabled; + * uclibc-menuconfig is only available when the uClibc C library is + selected in the internal toolchain backend; + * barebox-menuconfig and barebox-savedefconfig only work when the + barebox bootloader is enabled. + * uboot-menuconfig and uboot-savedefconfig only work when the + U-Boot bootloader is enabled. + +Cleaning: Explicit cleaning is required when any of the architecture +or toolchain configuration options are changed. + +To delete all build products (including build directories, host, +staging and target trees, the images and the toolchain): + + $ make clean + +Generating the manual: The present manual sources are located in the +docs/manual directory. To generate the manual: + + $ make manual-clean + $ make manual + +The manual outputs will be generated in output/docs/manual. + +Notes + + * A few tools are required to build the documentation (see: + Section 2.2, “Optional packages”). + +Resetting Buildroot for a new target: To delete all build products as +well as the configuration: + + $ make distclean + +Notes. If ccache is enabled, running make clean or distclean does not +empty the compiler cache used by Buildroot. To delete it, refer to +Section 8.13.3, “Using ccache in Buildroot”. + +Dumping the internal make variables: One can dump the variables known +to make, along with their values: + + $ make -s printvars VARS='VARIABLE1 VARIABLE2' + VARIABLE1=value_of_variable + VARIABLE2=value_of_variable + +It is possible to tweak the output using some variables: + + * VARS will limit the listing to variables which names match the + specified make-patterns - this must be set else nothing is + printed + * QUOTED_VARS, if set to YES, will single-quote the value + * RAW_VARS, if set to YES, will print the unexpanded value + +For example: + + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES + BUSYBOX_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_ALL_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_PATCH_DEPENDENCIES= + BUSYBOX_RDEPENDENCIES=ncurses util-linux + + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES QUOTED_VARS=YES + BUSYBOX_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_ALL_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_DEPENDENCIES='skeleton toolchain' + BUSYBOX_FINAL_PATCH_DEPENDENCIES='' + BUSYBOX_RDEPENDENCIES='ncurses util-linux' + + $ make -s printvars VARS=BUSYBOX_%DEPENDENCIES RAW_VARS=YES + BUSYBOX_DEPENDENCIES=skeleton toolchain + BUSYBOX_FINAL_ALL_DEPENDENCIES=$(sort $(BUSYBOX_FINAL_DEPENDENCIES) $(BUSYBOX_FINAL_PATCH_DEPENDENCIES)) + BUSYBOX_FINAL_DEPENDENCIES=$(sort $(BUSYBOX_DEPENDENCIES)) + BUSYBOX_FINAL_PATCH_DEPENDENCIES=$(sort $(BUSYBOX_PATCH_DEPENDENCIES)) + BUSYBOX_RDEPENDENCIES=ncurses util-linux + +The output of quoted variables can be reused in shell scripts, for +example: + + $ eval $(make -s printvars VARS=BUSYBOX_DEPENDENCIES QUOTED_VARS=YES) + $ echo $BUSYBOX_DEPENDENCIES + skeleton toolchain + +8.2. Understanding when a full rebuild is necessary + +Buildroot does not attempt to detect what parts of the system should +be rebuilt when the system configuration is changed through make +menuconfig, make xconfig or one of the other configuration tools. In +some cases, Buildroot should rebuild the entire system, in some +cases, only a specific subset of packages. But detecting this in a +completely reliable manner is very difficult, and therefore the +Buildroot developers have decided to simply not attempt to do this. + +Instead, it is the responsibility of the user to know when a full +rebuild is necessary. As a hint, here are a few rules of thumb that +can help you understand how to work with Buildroot: + + * When the target architecture configuration is changed, a complete + rebuild is needed. Changing the architecture variant, the binary + format or the floating point strategy for example has an impact + on the entire system. + * When the toolchain configuration is changed, a complete rebuild + generally is needed. Changing the toolchain configuration often + involves changing the compiler version, the type of C library or + its configuration, or some other fundamental configuration item, + and these changes have an impact on the entire system. + * When an additional package is added to the configuration, a full + rebuild is not necessarily needed. Buildroot will detect that + this package has never been built, and will build it. However, if + this package is a library that can optionally be used by packages + that have already been built, Buildroot will not automatically + rebuild those. Either you know which packages should be rebuilt, + and you can rebuild them manually, or you should do a full + rebuild. For example, let’s suppose you have built a system with + the ctorrent package, but without openssl. Your system works, but + you realize you would like to have SSL support in ctorrent, so + you enable the openssl package in Buildroot configuration and + restart the build. Buildroot will detect that openssl should be + built and will be build it, but it will not detect that ctorrent + should be rebuilt to benefit from openssl to add OpenSSL support. + You will either have to do a full rebuild, or rebuild ctorrent + itself. + * When a package is removed from the configuration, Buildroot does + not do anything special. It does not remove the files installed + by this package from the target root filesystem or from the + toolchain sysroot. A full rebuild is needed to get rid of this + package. However, generally you don’t necessarily need this + package to be removed right now: you can wait for the next lunch + break to restart the build from scratch. + * When the sub-options of a package are changed, the package is not + automatically rebuilt. After making such changes, rebuilding only + this package is often sufficient, unless enabling the package + sub-option adds some features to the package that are useful for + another package which has already been built. Again, Buildroot + does not track when a package should be rebuilt: once a package + has been built, it is never rebuilt unless explicitly told to do + so. + * When a change to the root filesystem skeleton is made, a full + rebuild is needed. However, when changes to the root filesystem + overlay, a post-build script or a post-image script are made, + there is no need for a full rebuild: a simple make invocation + will take the changes into account. + * When a package listed in FOO_DEPENDENCIES is rebuilt or removed, + the package foo is not automatically rebuilt. For example, if a + package bar is listed in FOO_DEPENDENCIES with FOO_DEPENDENCIES = + bar and the configuration of the bar package is changed, the + configuration change would not result in a rebuild of package foo + automatically. In this scenario, you may need to either rebuild + any packages in your build which reference bar in their + DEPENDENCIES, or perform a full rebuild to ensure any bar + dependent packages are up to date. + +Generally speaking, when you’re facing a build error and you’re +unsure of the potential consequences of the configuration changes +you’ve made, do a full rebuild. If you get the same build error, then +you are sure that the error is not related to partial rebuilds of +packages, and if this error occurs with packages from the official +Buildroot, do not hesitate to report the problem! As your experience +with Buildroot progresses, you will progressively learn when a full +rebuild is really necessary, and you will save more and more time. + +For reference, a full rebuild is achieved by running: + +$ make clean all + +8.3. Understanding how to rebuild packages + +One of the most common questions asked by Buildroot users is how to +rebuild a given package or how to remove a package without rebuilding +everything from scratch. + +Removing a package is unsupported by Buildroot without rebuilding +from scratch. This is because Buildroot doesn’t keep track of which +package installs what files in the output/staging and output/target +directories, or which package would be compiled differently depending +on the availability of another package. + +The easiest way to rebuild a single package from scratch is to remove +its build directory in output/build. Buildroot will then re-extract, +re-configure, re-compile and re-install this package from scratch. +You can ask buildroot to do this with the make -dirclean +command. + +On the other hand, if you only want to restart the build process of a +package from its compilation step, you can run make +-rebuild. It will restart the compilation and installation of the +package, but not from scratch: it basically re-executes make and make +install inside the package, so it will only rebuild files that +changed. + +If you want to restart the build process of a package from its +configuration step, you can run make -reconfigure. It will +restart the configuration, compilation and installation of the +package. + +While -rebuild implies -reinstall and +-reconfigure implies -rebuild, these targets as well as + only act on the said package, and do not trigger +re-creating the root filesystem image. If re-creating the root +filesystem in necessary, one should in addition run make or make all. + +Internally, Buildroot creates so-called stamp files to keep track of +which build steps have been completed for each package. They are +stored in the package build directory, output/build/- +/ and are named .stamp_. The commands detailed +above simply manipulate these stamp files to force Buildroot to +restart a specific set of steps of a package build process. + +Further details about package special make targets are explained in +Section 8.13.5, “Package-specific make targets”. + +8.4. Offline builds + +If you intend to do an offline build and just want to download all +sources that you previously selected in the configurator (menuconfig, +nconfig, xconfig or gconfig), then issue: + + $ make source + +You can now disconnect or copy the content of your dl directory to +the build-host. + +8.5. Building out-of-tree + +As default, everything built by Buildroot is stored in the directory +output in the Buildroot tree. + +Buildroot also supports building out of tree with a syntax similar to +the Linux kernel. To use it, add O= to the make command +line: + + $ make O=/tmp/build + +Or: + + $ cd /tmp/build; make O=$PWD -C path/to/buildroot + +All the output files will be located under /tmp/build. If the O path +does not exist, Buildroot will create it. + +Note: the O path can be either an absolute or a relative path, but if +it’s passed as a relative path, it is important to note that it is +interpreted relative to the main Buildroot source directory, not the +current working directory. + +When using out-of-tree builds, the Buildroot .config and temporary +files are also stored in the output directory. This means that you +can safely run multiple builds in parallel using the same source tree +as long as they use unique output directories. + +For ease of use, Buildroot generates a Makefile wrapper in the output +directory - so after the first run, you no longer need to pass O=<…> +and -C <…>, simply run (in the output directory): + + $ make + +8.6. Environment variables + +Buildroot also honors some environment variables, when they are +passed to make or set in the environment: + + * HOSTCXX, the host C++ compiler to use + * HOSTCC, the host C compiler to use + * UCLIBC_CONFIG_FILE=, path to the uClibc + configuration file, used to compile uClibc, if an internal + toolchain is being built. Note that the uClibc configuration file + can also be set from the configuration interface, so through the + Buildroot .config file; this is the recommended way of setting + it. + * BUSYBOX_CONFIG_FILE=, path to the BusyBox + configuration file. Note that the BusyBox configuration file can + also be set from the configuration interface, so through the + Buildroot .config file; this is the recommended way of setting + it. + * BR2_CCACHE_DIR to override the directory where Buildroot stores + the cached files when using ccache. + * BR2_DL_DIR to override the directory in which Buildroot stores/ + retrieves downloaded files. Note that the Buildroot download + directory can also be set from the configuration interface, so + through the Buildroot .config file. See Section 8.13.4, “Location + of downloaded packages” for more details on how you can set the + download directory. + * BR2_GRAPH_ALT, if set and non-empty, to use an alternate + color-scheme in build-time graphs + * BR2_GRAPH_OUT to set the filetype of generated graphs, either pdf + (the default), or png. + * BR2_GRAPH_DEPS_OPTS to pass extra options to the dependency + graph; see Section 8.8, “Graphing the dependencies between + packages” for the accepted options + * BR2_GRAPH_DOT_OPTS is passed verbatim as options to the dot + utility to draw the dependency graph. + * BR2_GRAPH_SIZE_OPTS to pass extra options to the size graph; see + Section 8.10, “Graphing the filesystem size contribution of + packages” for the acepted options + +An example that uses config files located in the toplevel directory +and in your $HOME: + + $ make UCLIBC_CONFIG_FILE=uClibc.config BUSYBOX_CONFIG_FILE=$HOME/bb.config + +If you want to use a compiler other than the default gcc or g++ for +building helper-binaries on your host, then do + + $ make HOSTCXX=g++-4.3-HEAD HOSTCC=gcc-4.3-HEAD + +8.7. Dealing efficiently with filesystem images + +Filesystem images can get pretty big, depending on the filesystem you +choose, the number of packages, whether you provisioned free space… +Yet, some locations in the filesystems images may just be empty (e.g. +a long run of zeroes); such a file is called a sparse file. + +Most tools can handle sparse files efficiently, and will only store +or write those parts of a sparse file that are not empty. + +For example: + + * tar accepts the -S option to tell it to only store non-zero + blocks of sparse files: + + + tar cf archive.tar -S [files…] will efficiently store sparse + files in a tarball + + tar xf archive.tar -S will efficiently store sparse files + extracted from a tarball + * cp accepts the --sparse=WHEN option (WHEN is one of auto, never + or always): + + + cp --sparse=always source.file dest.file will make dest.file + a sparse file if source.file has long runs of zeroes + +Other tools may have similar options. Please consult their respective +man pages. + +You can use sparse files if you need to store the filesystem images +(e.g. to transfer from one machine to another), or if you need to +send them (e.g. to the Q&A team). + +Note however that flashing a filesystem image to a device while using +the sparse mode of dd may result in a broken filesystem (e.g. the +block bitmap of an ext2 filesystem may be corrupted; or, if you have +sparse files in your filesystem, those parts may not be all-zeroes +when read back). You should only use sparse files when handling files +on the build machine, not when transferring them to an actual device +that will be used on the target. + +8.8. Graphing the dependencies between packages + +One of Buildroot’s jobs is to know the dependencies between packages, +and make sure they are built in the right order. These dependencies +can sometimes be quite complicated, and for a given system, it is +often not easy to understand why such or such package was brought +into the build by Buildroot. + +In order to help understanding the dependencies, and therefore better +understand what is the role of the different components in your +embedded Linux system, Buildroot is capable of generating dependency +graphs. + +To generate a dependency graph of the full system you have compiled, +simply run: + +make graph-depends + +You will find the generated graph in output/graphs/graph-depends.pdf. + +If your system is quite large, the dependency graph may be too +complex and difficult to read. It is therefore possible to generate +the dependency graph just for a given package: + +make -graph-depends + +You will find the generated graph in output/graph/ +-graph-depends.pdf. + +Note that the dependency graphs are generated using the dot tool from +the Graphviz project, which you must have installed on your system to +use this feature. In most distributions, it is available as the +graphviz package. + +By default, the dependency graphs are generated in the PDF format. +However, by passing the BR2_GRAPH_OUT environment variable, you can +switch to other output formats, such as PNG, PostScript or SVG. All +formats supported by the -T option of the dot tool are supported. + +BR2_GRAPH_OUT=svg make graph-depends + +The graph-depends behaviour can be controlled by setting options in +the BR2_GRAPH_DEPS_OPTS environment variable. The accepted options +are: + + * --depth N, -d N, to limit the dependency depth to N levels. The + default, 0, means no limit. + * --stop-on PKG, -s PKG, to stop the graph on the package PKG. PKG + can be an actual package name, a glob, the keyword virtual (to + stop on virtual packages), or the keyword host (to stop on host + packages). The package is still present on the graph, but its + dependencies are not. + * --exclude PKG, -x PKG, like --stop-on, but also omits PKG from + the graph. + * --transitive, --no-transitive, to draw (or not) the transitive + dependencies. The default is to not draw transitive dependencies. + * --colors R,T,H, the comma-separated list of colors to draw the + root package (R), the target packages (T) and the host packages + (H). Defaults to: lightblue,grey,gainsboro + +BR2_GRAPH_DEPS_OPTS='-d 3 --no-transitive --colors=red,green,blue' make graph-depends + +8.9. Graphing the build duration + +When the build of a system takes a long time, it is sometimes useful +to be able to understand which packages are the longest to build, to +see if anything can be done to speed up the build. In order to help +such build time analysis, Buildroot collects the build time of each +step of each package, and allows to generate graphs from this data. + +To generate the build time graph after a build, run: + +make graph-build + +This will generate a set of files in output/graphs : + + * build.hist-build.pdf, a histogram of the build time for each + package, ordered in the build order. + * build.hist-duration.pdf, a histogram of the build time for each + package, ordered by duration (longest first) + * build.hist-name.pdf, a histogram of the build time for each + package, order by package name. + * build.pie-packages.pdf, a pie chart of the build time per package + * build.pie-steps.pdf, a pie chart of the global time spent in each + step of the packages build process. + +This graph-build target requires the Python Matplotlib and Numpy +libraries to be installed (python-matplotlib and python-numpy on most +distributions), and also the argparse module if you’re using a Python +version older than 2.7 (python-argparse on most distributions). + +By default, the output format for the graph is PDF, but a different +format can be selected using the BR2_GRAPH_OUT environment variable. +The only other format supported is PNG: + +BR2_GRAPH_OUT=png make graph-build + +8.10. Graphing the filesystem size contribution of packages + +When your target system grows, it is sometimes useful to understand +how much each Buildroot package is contributing to the overall root +filesystem size. To help with such an analysis, Buildroot collects +data about files installed by each package and using this data, +generates a graph and CSV files detailing the size contribution of +the different packages. + +To generate these data after a build, run: + +make graph-size + +This will generate: + + * output/graphs/graph-size.pdf, a pie chart of the contribution of + each package to the overall root filesystem size + * output/graphs/package-size-stats.csv, a CSV file giving the size + contribution of each package to the overall root filesystem size + * output/graphs/file-size-stats.csv, a CSV file giving the size + contribution of each installed file to the package it belongs, + and to the overall filesystem size. + +This graph-size target requires the Python Matplotlib library to be +installed (python-matplotlib on most distributions), and also the +argparse module if you’re using a Python version older than 2.7 +(python-argparse on most distributions). + +Just like for the duration graph, a BR2_GRAPH_OUT environment +variable is supported to adjust the output file format. See +Section 8.8, “Graphing the dependencies between packages” for details +about this environment variable. + +Additionally, one may set the environment variable +BR2_GRAPH_SIZE_OPTS to further control the generated graph. Accepted +options are: + + * --size-limit X, -l X, will group all packages which individual + contribution is below X percent, to a single entry labelled + Others in the graph. By default, X=0.01, which means packages + each contributing less than 1% are grouped under Others. Accepted + values are in the range [0.0..1.0]. + * --iec, --binary, --si, --decimal, to use IEC (binary, powers of + 1024) or SI (decimal, powers of 1000; the default) prefixes. + * --biggest-first, to sort packages in decreasing size order, + rather than in increasing size order. + +Note. The collected filesystem size data is only meaningful after a +complete clean rebuild. Be sure to run make clean all before using +make graph-size. + +To compare the root filesystem size of two different Buildroot +compilations, for example after adjusting the configuration or when +switching to another Buildroot release, use the size-stats-compare +script. It takes two file-size-stats.csv files (produced by make +graph-size) as input. Refer to the help text of this script for more +details: + +utils/size-stats-compare -h + +8.11. Top-level parallel build + +Note. This section deals with a very experimental feature, which is +known to break even in some non-unusual situations. Use at your own +risk. + +Buildroot has always been capable of using parallel build on a per +package basis: each package is built by Buildroot using make -jN (or +the equivalent invocation for non-make-based build systems). The +level of parallelism is by default number of CPUs + 1, but it can be +adjusted using the BR2_JLEVEL configuration option. + +Until 2020.02, Buildroot was however building packages in a serial +fashion: each package was built one after the other, without +parallelization of the build between packages. As of 2020.02, +Buildroot has experimental support for top-level parallel build, +which allows some signicant build time savings by building packages +that have no dependency relationship in parallel. This feature is +however marked as experimental and is known not to work in some +cases. + +In order to use top-level parallel build, one must: + + 1. Enable the option BR2_PER_PACKAGE_DIRECTORIES in the Buildroot + configuration + 2. Use make -jN when starting the Buildroot build + +Internally, the BR2_PER_PACKAGE_DIRECTORIES will enable a mechanism +called per-package directories, which will have the following +effects: + + * Instead of a global target directory and a global host directory + common to all packages, per-package target and host directories + will be used, in $(O)/per-package//target/ and $(O)/ + per-package//host/ respectively. Those folders will be + populated from the corresponding folders of the package + dependencies at the beginning of build. The compiler and + all other tools will therefore only be able to see and access + files installed by dependencies explicitly listed by . + * At the end of the build, the global target and host directories + will be populated, located in $(O)/target and $(O)/host + respectively. This means that during the build, those folders + will be empty and it’s only at the very end of the build that + they will be populated. + +8.12. Integration with Eclipse + +While a part of the embedded Linux developers like classical text +editors like Vim or Emacs, and command-line based interfaces, a +number of other embedded Linux developers like richer graphical +interfaces to do their development work. Eclipse being one of the +most popular Integrated Development Environment, Buildroot integrates +with Eclipse in order to ease the development work of Eclipse users. + +Our integration with Eclipse simplifies the compilation, remote +execution and remote debugging of applications and libraries that are +built on top of a Buildroot system. It does not integrate the +Buildroot configuration and build processes themselves with Eclipse. +Therefore, the typical usage model of our Eclipse integration would +be: + + * Configure your Buildroot system with make menuconfig, make + xconfig or any other configuration interface provided with + Buildroot. + * Build your Buildroot system by running make. + * Start Eclipse to develop, execute and debug your own custom + applications and libraries, that will rely on the libraries built + and installed by Buildroot. + +The Buildroot Eclipse integration installation process and usage is +described in detail at https://github.com/mbats/ +eclipse-buildroot-bundle/wiki. + +8.13. Advanced usage + +8.13.1. Using the generated toolchain outside Buildroot + +You may want to compile, for your target, your own programs or other +software that are not packaged in Buildroot. In order to do this you +can use the toolchain that was generated by Buildroot. + +The toolchain generated by Buildroot is located by default in output/ +host/. The simplest way to use it is to add output/host/bin/ to your +PATH environment variable and then to use ARCH-linux-gcc, +ARCH-linux-objdump, ARCH-linux-ld, etc. + +Alternatively, Buildroot can also export the toolchain and the +development files of all selected packages, as an SDK, by running the +command make sdk. This generates a tarball of the content of the host +directory output/host/, named _sdk-buildroot.tar.gz +(which can be overriden by setting the environment variable +BR2_SDK_PREFIX) and located in the output directory output/images/. + +This tarball can then be distributed to application developers, when +they want to develop their applications that are not (yet) packaged +as a Buildroot package. + +Upon extracting the SDK tarball, the user must run the script +relocate-sdk.sh (located at the top directory of the SDK), to make +sure all paths are updated with the new location. + +Alternatively, if you just want to prepare the SDK without generating +the tarball (e.g. because you will just be moving the host directory, +or will be generating the tarball on your own), Buildroot also allows +you to just prepare the SDK with make prepare-sdk without actually +generating a tarball. + +8.13.2. Using gdb in Buildroot + +Buildroot allows to do cross-debugging, where the debugger runs on +the build machine and communicates with gdbserver on the target to +control the execution of the program. + +To achieve this: + + * If you are using an internal toolchain (built by Buildroot), you + must enable BR2_PACKAGE_HOST_GDB, BR2_PACKAGE_GDB and + BR2_PACKAGE_GDB_SERVER. This ensures that both the cross gdb and + gdbserver get built, and that gdbserver gets installed to your + target. + * If you are using an external toolchain, you should enable + BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY, which will copy the + gdbserver included with the external toolchain to the target. If + your external toolchain does not have a cross gdb or gdbserver, + it is also possible to let Buildroot build them, by enabling the + same options as for the internal toolchain backend. + +Now, to start debugging a program called foo, you should run on the +target: + +gdbserver :2345 foo + +This will cause gdbserver to listen on TCP port 2345 for a connection +from the cross gdb. + +Then, on the host, you should start the cross gdb using the following +command line: + +/output/host/bin/-gdb -x /output/staging/usr/share/buildroot/gdbinit foo + +Of course, foo must be available in the current directory, built with +debugging symbols. Typically you start this command from the +directory where foo is built (and not from output/target/ as the +binaries in that directory are stripped). + +The /output/staging/usr/share/buildroot/gdbinit file will +tell the cross gdb where to find the libraries of the target. + +Finally, to connect to the target from the cross gdb: + +(gdb) target remote :2345 + +8.13.3. Using ccache in Buildroot + +ccache [http://ccache.samba.org] is a compiler cache. It stores the +object files resulting from each compilation process, and is able to +skip future compilation of the same source file (with same compiler +and same arguments) by using the pre-existing object files. When +doing almost identical builds from scratch a number of times, it can +nicely speed up the build process. + +ccache support is integrated in Buildroot. You just have to enable +Enable compiler cache in Build options. This will automatically build +ccache and use it for every host and target compilation. + +The cache is located in $HOME/.buildroot-ccache. It is stored outside +of Buildroot output directory so that it can be shared by separate +Buildroot builds. If you want to get rid of the cache, simply remove +this directory. + +You can get statistics on the cache (its size, number of hits, +misses, etc.) by running make ccache-stats. + +The make target ccache-options and the CCACHE_OPTIONS variable +provide more generic access to the ccache. For example + +# set cache limit size +make CCACHE_OPTIONS="--max-size=5G" ccache-options + +# zero statistics counters +make CCACHE_OPTIONS="--zero-stats" ccache-options + +ccache makes a hash of the source files and of the compiler options. +If a compiler option is different, the cached object file will not be +used. Many compiler options, however, contain an absolute path to the +staging directory. Because of this, building in a different output +directory would lead to many cache misses. + +To avoid this issue, buildroot has the Use relative paths option +(BR2_CCACHE_USE_BASEDIR). This will rewrite all absolute paths that +point inside the output directory into relative paths. Thus, changing +the output directory no longer leads to cache misses. + +A disadvantage of the relative paths is that they also end up to be +relative paths in the object file. Therefore, for example, the +debugger will no longer find the file, unless you cd to the output +directory first. + +See the ccache manual’s section on "Compiling in different +directories" [https://ccache.samba.org/manual.html# +_compiling_in_different_directories] for more details about this +rewriting of absolute paths. + +8.13.4. Location of downloaded packages + +The various tarballs that are downloaded by Buildroot are all stored +in BR2_DL_DIR, which by default is the dl directory. If you want to +keep a complete version of Buildroot which is known to be working +with the associated tarballs, you can make a copy of this directory. +This will allow you to regenerate the toolchain and the target +filesystem with exactly the same versions. + +If you maintain several Buildroot trees, it might be better to have a +shared download location. This can be achieved by pointing the +BR2_DL_DIR environment variable to a directory. If this is set, then +the value of BR2_DL_DIR in the Buildroot configuration is overridden. +The following line should be added to <~/.bashrc>. + + export BR2_DL_DIR= + +The download location can also be set in the .config file, with the +BR2_DL_DIR option. Unlike most options in the .config file, this +value is overridden by the BR2_DL_DIR environment variable. + +8.13.5. Package-specific make targets + +Running make builds and installs that particular package +and its dependencies. + +For packages relying on the Buildroot infrastructure, there are +numerous special make targets that can be called independently like +this: + +make - + +The package build targets are (in the order they are executed): + ++------------------------------------------------------------+ +|command/target |Description | +|---------------+--------------------------------------------| +| source |Fetch the source (download the tarball, | +| |clone the source repository, etc) | +|---------------+--------------------------------------------| +| depends |Build and install all dependencies required | +| |to build the package | +|---------------+--------------------------------------------| +| extract |Put the source in the package build | +| |directory (extract the tarball, copy the | +| |source, etc) | +|---------------+--------------------------------------------| +| patch |Apply the patches, if any | +|---------------+--------------------------------------------| +| configure |Run the configure commands, if any | +|---------------+--------------------------------------------| +| build |Run the compilation commands | +|---------------+--------------------------------------------| +|install-staging|target package: Run the installation of the | +| |package in the staging directory, if | +| |necessary | +|---------------+--------------------------------------------| +|install-target |target package: Run the installation of the | +| |package in the target directory, if | +| |necessary | +|---------------+--------------------------------------------| +| install |target package: Run the 2 previous | +| |installation commands | +| | | +| |host package: Run the installation of the | +| |package in the host directory | ++------------------------------------------------------------+ + +Additionally, there are some other useful make targets: + ++------------------------------------------------------------+ +| command/target |Description | +|-----------------------+------------------------------------| +| show-depends |Displays the first-order | +| |dependencies required to build the | +| |package | +|-----------------------+------------------------------------| +|show-recursive-depends |Recursively displays the | +| |dependencies required to build the | +| |package | +|-----------------------+------------------------------------| +| show-rdepends |Displays the first-order reverse | +| |dependencies of the package (i.e | +| |packages that directly depend on it)| +|-----------------------+------------------------------------| +|show-recursive-rdepends|Recursively displays the reverse | +| |dependencies of the package (i.e the| +| |packages that depend on it, directly| +| |or indirectly) | +|-----------------------+------------------------------------| +| graph-depends |Generate a dependency graph of the | +| |package, in the context of the | +| |current Buildroot configuration. See| +| |this section for more details about | +| |dependency graphs. | +|-----------------------+------------------------------------| +| graph-rdepends |Generate a graph of this package | +| |reverse dependencies (i.e the | +| |packages that depend on it, directly| +| |or indirectly) | +|-----------------------+------------------------------------| +| dirclean |Remove the whole package build | +| |directory | +|-----------------------+------------------------------------| +| reinstall |Re-run the install commands | +|-----------------------+------------------------------------| +| rebuild |Re-run the compilation commands - | +| |this only makes sense when using the| +| |OVERRIDE_SRCDIR feature or when you | +| |modified a file directly in the | +| |build directory | +|-----------------------+------------------------------------| +| reconfigure |Re-run the configure commands, then | +| |rebuild - this only makes sense when| +| |using the OVERRIDE_SRCDIR feature or| +| |when you modified a file directly in| +| |the build directory | ++------------------------------------------------------------+ + +8.13.6. Using Buildroot during development + +The normal operation of Buildroot is to download a tarball, extract +it, configure, compile and install the software component found +inside this tarball. The source code is extracted in output/build/ +-, which is a temporary directory: whenever make +clean is used, this directory is entirely removed, and re-created at +the next make invocation. Even when a Git or Subversion repository is +used as the input for the package source code, Buildroot creates a +tarball out of it, and then behaves as it normally does with +tarballs. + +This behavior is well-suited when Buildroot is used mainly as an +integration tool, to build and integrate all the components of an +embedded Linux system. However, if one uses Buildroot during the +development of certain components of the system, this behavior is not +very convenient: one would instead like to make a small change to the +source code of one package, and be able to quickly rebuild the system +with Buildroot. + +Making changes directly in output/build/- is not an +appropriate solution, because this directory is removed on make +clean. + +Therefore, Buildroot provides a specific mechanism for this use case: +the _OVERRIDE_SRCDIR mechanism. Buildroot reads an override +file, which allows the user to tell Buildroot the location of the +source for certain packages. + +The default location of the override file is $(CONFIG_DIR)/local.mk, +as defined by the BR2_PACKAGE_OVERRIDE_FILE configuration option. $ +(CONFIG_DIR) is the location of the Buildroot .config file, so +local.mk by default lives side-by-side with the .config file, which +means: + + * In the top-level Buildroot source directory for in-tree builds + (i.e., when O= is not used) + * In the out-of-tree directory for out-of-tree builds (i.e., when O + = is used) + +If a different location than these defaults is required, it can be +specified through the BR2_PACKAGE_OVERRIDE_FILE configuration option. + +In this override file, Buildroot expects to find lines of the form: + +_OVERRIDE_SRCDIR = /path/to/pkg1/sources +_OVERRIDE_SRCDIR = /path/to/pkg2/sources + +For example: + +LINUX_OVERRIDE_SRCDIR = /home/bob/linux/ +BUSYBOX_OVERRIDE_SRCDIR = /home/bob/busybox/ + +When Buildroot finds that for a given package, an +_OVERRIDE_SRCDIR has been defined, it will no longer attempt to +download, extract and patch the package. Instead, it will directly +use the source code available in the specified directory and make +clean will not touch this directory. This allows to point Buildroot +to your own directories, that can be managed by Git, Subversion, or +any other version control system. To achieve this, Buildroot will use +rsync to copy the source code of the component from the specified +_OVERRIDE_SRCDIR to output/build/-custom/. + +This mechanism is best used in conjunction with the make +-rebuild and make -reconfigure targets. A make -rebuild all +sequence will rsync the source code from _OVERRIDE_SRCDIR to +output/build/-custom (thanks to rsync, only the modified +files are copied), and restart the build process of just this +package. + +In the example of the linux package above, the developer can then +make a source code change in /home/bob/linux and then run: + +make linux-rebuild all + +and in a matter of seconds gets the updated Linux kernel image in +output/images. Similarly, a change can be made to the BusyBox source +code in /home/bob/busybox, and after: + +make busybox-rebuild all + +the root filesystem image in output/images contains the updated +BusyBox. + +Source trees for big projects often contain hundreds or thousands of +files which are not needed for building, but will slow down the +process of copying the sources with rsync. Optionally, it is possible +define _OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS to skip syncing certain +files from the source tree. For example, when working on the +webkitgtk package, the following will exclude the tests and in-tree +builds from a local WebKit source tree: + +WEBKITGTK_OVERRIDE_SRCDIR = /home/bob/WebKit +WEBKITGTK_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = \ + --exclude JSTests --exclude ManualTests --exclude PerformanceTests \ + --exclude WebDriverTests --exclude WebKitBuild --exclude WebKitLibraries \ + --exclude WebKit.xcworkspace --exclude Websites --exclude Examples + +By default, Buildroot skips syncing of VCS artifacts (e.g., the .git +and .svn directories). Some packages prefer to have these VCS +directories available during build, for example for automatically +determining a precise commit reference for version information. To +undo this built-in filtering at a cost of a slower speed, add these +directories back: + +LINUX_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = --include .git + +Chapter 9. Project-specific customization + +Typical actions you may need to perform for a given project are: + + * configuring Buildroot (including build options and toolchain, + bootloader, kernel, package and filesystem image type selection) + * configuring other components, like the Linux kernel and BusyBox + * customizing the generated target filesystem + + + adding or overwriting files on the target filesystem (using + BR2_ROOTFS_OVERLAY) + + modifying or deleting files on the target filesystem (using + BR2_ROOTFS_POST_BUILD_SCRIPT) + + running arbitrary commands prior to generating the filesystem + image (using BR2_ROOTFS_POST_BUILD_SCRIPT) + + setting file permissions and ownership (using + BR2_ROOTFS_DEVICE_TABLE) + + adding custom devices nodes (using + BR2_ROOTFS_STATIC_DEVICE_TABLE) + * adding custom user accounts (using BR2_ROOTFS_USERS_TABLES) + * running arbitrary commands after generating the filesystem image + (using BR2_ROOTFS_POST_IMAGE_SCRIPT) + * adding project-specific patches to some packages (using + BR2_GLOBAL_PATCH_DIR) + * adding project-specific packages + +An important note regarding such project-specific customizations: +please carefully consider which changes are indeed project-specific +and which changes are also useful to developers outside your project. +The Buildroot community highly recommends and encourages the +upstreaming of improvements, packages and board support to the +official Buildroot project. Of course, it is sometimes not possible +or desirable to upstream because the changes are highly specific or +proprietary. + +This chapter describes how to make such project-specific +customizations in Buildroot and how to store them in a way that you +can build the same image in a reproducible way, even after running +make clean. By following the recommended strategy, you can even use +the same Buildroot tree to build multiple distinct projects! + +9.1. Recommended directory structure + +When customizing Buildroot for your project, you will be creating one +or more project-specific files that need to be stored somewhere. +While most of these files could be placed in any location as their +path is to be specified in the Buildroot configuration, the Buildroot +developers recommend a specific directory structure which is +described in this section. + +Orthogonal to this directory structure, you can choose where you +place this structure itself: either inside the Buildroot tree, or +outside of it using a br2-external tree. Both options are valid, the +choice is up to you. + ++-- board/ +| +-- / +| +-- / +| +-- linux.config +| +-- busybox.config +| +-- +| +-- post_build.sh +| +-- post_image.sh +| +-- rootfs_overlay/ +| | +-- etc/ +| | +-- +| +-- patches/ +| +-- foo/ +| | +-- +| +-- libbar/ +| +-- +| ++-- configs/ +| +-- _defconfig +| ++-- package/ +| +-- / +| +-- Config.in (if not using a br2-external tree) +| +-- .mk (if not using a br2-external tree) +| +-- package1/ +| | +-- Config.in +| | +-- package1.mk +| +-- package2/ +| +-- Config.in +| +-- package2.mk +| ++-- Config.in (if using a br2-external tree) ++-- external.mk (if using a br2-external tree) ++-- external.desc (if using a br2-external tree) + +Details on the files shown above are given further in this chapter. + +Note: if you choose to place this structure outside of the Buildroot +tree but in a br2-external tree, the and possibly + components may be superfluous and can be left out. + +9.1.1. Implementing layered customizations + +It is quite common for a user to have several related projects that +partly need the same customizations. Instead of duplicating these +customizations for each project, it is recommended to use a layered +customization approach, as explained in this section. + +Almost all of the customization methods available in Buildroot, like +post-build scripts and root filesystem overlays, accept a +space-separated list of items. The specified items are always treated +in order, from left to right. By creating more than one such item, +one for the common customizations and another one for the really +project-specific customizations, you can avoid unnecessary +duplication. Each layer is typically embodied by a separate directory +inside board//. Depending on your projects, you could even +introduce more than two layers. + +An example directory structure for where a user has two customization +layers common and fooboard is: + ++-- board/ + +-- / + +-- common/ + | +-- post_build.sh + | +-- rootfs_overlay/ + | | +-- ... + | +-- patches/ + | +-- ... + | + +-- fooboard/ + +-- linux.config + +-- busybox.config + +-- + +-- post_build.sh + +-- rootfs_overlay/ + | +-- ... + +-- patches/ + +-- ... + +For example, if the user has the BR2_GLOBAL_PATCH_DIR configuration +option set as: + +BR2_GLOBAL_PATCH_DIR="board//common/patches board//fooboard/patches" + +then first the patches from the common layer would be applied, +followed by the patches from the fooboard layer. + +9.2. Keeping customizations outside of Buildroot + +As already briefly mentioned in Section 9.1, “Recommended directory +structure”, you can place project-specific customizations in two +locations: + + * directly within the Buildroot tree, typically maintaining them + using branches in a version control system so that upgrading to a + newer Buildroot release is easy. + * outside of the Buildroot tree, using the br2-external mechanism. + This mechanism allows to keep package recipes, board support and + configuration files outside of the Buildroot tree, while still + having them nicely integrated in the build logic. We call this + location a br2-external tree. This section explains how to use + the br2-external mechanism and what to provide in a br2-external + tree. + +One can tell Buildroot to use one or more br2-external trees by +setting the BR2_EXTERNAL make variable set to the path(s) of the +br2-external tree(s) to use. It can be passed to any Buildroot make +invocation. It is automatically saved in the hidden .br2-external.mk +file in the output directory. Thanks to this, there is no need to +pass BR2_EXTERNAL at every make invocation. It can however be changed +at any time by passing a new value, and can be removed by passing an +empty value. + +Note. The path to a br2-external tree can be either absolute or +relative. If it is passed as a relative path, it is important to note +that it is interpreted relative to the main Buildroot source +directory, not to the Buildroot output directory. + +Note: If using an br2-external tree from before Buildroot 2016.11, +you need to convert it before you can use it with Buildroot 2016.11 +onward. See Section 26.1, “Migrating to 2016.11” for help on doing +so. + +Some examples: + +buildroot/ $ make BR2_EXTERNAL=/path/to/foo menuconfig + +From now on, definitions from the /path/to/foo br2-external tree will +be used: + +buildroot/ $ make +buildroot/ $ make legal-info + +We can switch to another br2-external tree at any time: + +buildroot/ $ make BR2_EXTERNAL=/where/we/have/bar xconfig + +We can also use multiple br2-external trees: + +buildroot/ $ make BR2_EXTERNAL=/path/to/foo:/where/we/have/bar menuconfig + +Or disable the usage of any br2-external tree: + +buildroot/ $ make BR2_EXTERNAL= xconfig + +9.2.1. Layout of a br2-external tree + +A br2-external tree must contain at least those three files, +described in the following chapters: + + * external.desc + * external.mk + * Config.in + +Apart from those mandatory files, there may be additional and +optional content that may be present in a br2-external tree, like the +configs/ or provides/ directories. They are described in the +following chapters as well. + +A complete example br2-external tree layout is also described later. + +9.2.1.1. The external.desc file + +That file describes the br2-external tree: the name and description +for that br2-external tree. + +The format for this file is line based, with each line starting by a +keyword, followed by a colon and one or more spaces, followed by the +value assigned to that keyword. There are two keywords currently +recognised: + + * name, mandatory, defines the name for that br2-external tree. + That name must only use ASCII characters in the set [A-Za-z0-9_]; + any other character is forbidden. Buildroot sets the variable + BR2_EXTERNAL_$(NAME)_PATH to the absolute path of the + br2-external tree, so that you can use it to refer to your + br2-external tree. This variable is available both in Kconfig, so + you can use it to source your Kconfig files (see below) and in + the Makefile, so that you can use it to include other Makefiles + (see below) or refer to other files (like data files) from your + br2-external tree. + + Note: Since it is possible to use multiple br2-external trees at + once, this name is used by Buildroot to generate variables for + each of those trees. That name is used to identify your + br2-external tree, so try to come up with a name that really + describes your br2-external tree, in order for it to be + relatively unique, so that it does not clash with another name + from another br2-external tree, especially if you are planning on + somehow sharing your br2-external tree with third parties or + using br2-external trees from third parties. + + * desc, optional, provides a short description for that + br2-external tree. It shall fit on a single line, is mostly + free-form (see below), and is used when displaying information + about a br2-external tree (e.g. above the list of defconfig + files, or as the prompt in the menuconfig); as such, it should + relatively brief (40 chars is probably a good upper limit). The + description is available in the BR2_EXTERNAL_$(NAME)_DESC + variable. + +Examples of names and the corresponding BR2_EXTERNAL_$(NAME)_PATH +variables: + + * FOO → BR2_EXTERNAL_FOO_PATH + * BAR_42 → BR2_EXTERNAL_BAR_42_PATH + +In the following examples, it is assumed the name to be set to +BAR_42. + +Note: Both BR2_EXTERNAL_$(NAME)_PATH and BR2_EXTERNAL_$(NAME)_DESC +are available in the Kconfig files and the Makefiles. They are also +exported in the environment so are available in post-build, +post-image and in-fakeroot scripts. + +9.2.1.2. The Config.in and external.mk files + +Those files (which may each be empty) can be used to define package +recipes (i.e. foo/Config.in and foo/foo.mk like for packages bundled +in Buildroot itself) or other custom configuration options or make +logic. + +Buildroot automatically includes the Config.in from each br2-external +tree to make it appear in the top-level configuration menu, and +includes the external.mk from each br2-external tree with the rest of +the makefile logic. + +The main usage of this is to store package recipes. The recommended +way to do this is to write a Config.in file that looks like: + +source "$BR2_EXTERNAL_BAR_42_PATH/package/package1/Config.in" +source "$BR2_EXTERNAL_BAR_42_PATH/package/package2/Config.in" + +Then, have an external.mk file that looks like: + +include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk)) + +And then in $(BR2_EXTERNAL_BAR_42_PATH)/package/package1 and $ +(BR2_EXTERNAL_BAR_42_PATH)/package/package2 create normal Buildroot +package recipes, as explained in Chapter 17, Adding new packages to +Buildroot. If you prefer, you can also group the packages in +subdirectories called and adapt the above paths +accordingly. + +You can also define custom configuration options in Config.in and +custom make logic in external.mk. + +9.2.1.3. The configs/ directory + +One can store Buildroot defconfigs in the configs subdirectory of the +br2-external tree. Buildroot will automatically show them in the +output of make list-defconfigs and allow them to be loaded with the +normal make _defconfig command. They will be visible in the +make list-defconfigs output, below an External configs label that +contains the name of the br2-external tree they are defined in. + +Note: If a defconfig file is present in more than one br2-external +tree, then the one from the last br2-external tree is used. It is +thus possible to override a defconfig bundled in Buildroot or another +br2-external tree. + +9.2.1.4. The provides/ directory + +For some packages, Buildroot provides a choice between two (or more) +implementations of API-compatible such packages. For example, there +is a choice to choose either libjpeg ot jpeg-turbo, and another +choice between openssl or libressl. Finally, there is a choice to +select one of the known, pre-configured toolchains. + +It is possible for a br2-external to extend those choices, by +providing a set of files that define those alternatives: + + * provides/toolchains.in defines the pre-configured toolchains, + which will then be listed in the toolchain selection; + * provides/jpeg.in defines the alternative libjpeg implementations; + * provides/openssl.in defines the alternative openssl + implementations. + +9.2.1.5. Free-form content + +One can store all the board-specific configuration files there, such +as the kernel configuration, the root filesystem overlay, or any +other configuration file for which Buildroot allows to set the +location (by using the BR2_EXTERNAL_$(NAME)_PATH variable). For +example, you could set the paths to a global patch directory, to a +rootfs overlay and to the kernel configuration file as follows (e.g. +by running make menuconfig and filling in these options): + +BR2_GLOBAL_PATCH_DIR=$(BR2_EXTERNAL_BAR_42_PATH)/patches/ +BR2_ROOTFS_OVERLAY=$(BR2_EXTERNAL_BAR_42_PATH)/board//overlay/ +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=$(BR2_EXTERNAL_BAR_42_PATH)/board//kernel.config + +9.2.1.6. Additional Linux kernel extensions + +Additional Linux kernel extensions (see Section 17.21.2, +“linux-kernel-extensions”) can be added by storing them in the linux/ +directory at the root of a br2-external tree. + +9.2.1.7. Example layout + +Here is an example layout using all features of br2-external (the +sample content is shown for the file above it, when it is relevant to +explain the br2-external tree; this is all entirely made up just for +the sake of illustration, of course): + +/path/to/br2-ext-tree/ + |- external.desc + | |name: BAR_42 + | |desc: Example br2-external tree + | `---- + | + |- Config.in + | |source "$BR2_EXTERNAL_BAR_42_PATH/toolchain/toolchain-external-mine/Config.in.options" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-1/Config.in" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-2/Config.in" + | |source "$BR2_EXTERNAL_BAR_42_PATH/package/my-jpeg/Config.in" + | | + | |config BAR_42_FLASH_ADDR + | | hex "my-board flash address" + | | default 0x10AD + | `---- + | + |- external.mk + | |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/package/*/*.mk)) + | |include $(sort $(wildcard $(BR2_EXTERNAL_BAR_42_PATH)/toolchain/*/*.mk)) + | | + | |flash-my-board: + | | $(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/flash-image \ + | | --image $(BINARIES_DIR)/image.bin \ + | | --address $(BAR_42_FLASH_ADDR) + | `---- + | + |- package/pkg-1/Config.in + | |config BR2_PACKAGE_PKG_1 + | | bool "pkg-1" + | | help + | | Some help about pkg-1 + | `---- + |- package/pkg-1/pkg-1.hash + |- package/pkg-1/pkg-1.mk + | |PKG_1_VERSION = 1.2.3 + | |PKG_1_SITE = /some/where/to/get/pkg-1 + | |PKG_1_LICENSE = blabla + | | + | |define PKG_1_INSTALL_INIT_SYSV + | | $(INSTALL) -D -m 0755 $(PKG_1_PKGDIR)/S99my-daemon \ + | | $(TARGET_DIR)/etc/init.d/S99my-daemon + | |endef + | | + | |$(eval $(autotools-package)) + | `---- + |- package/pkg-1/S99my-daemon + | + |- package/pkg-2/Config.in + |- package/pkg-2/pkg-2.hash + |- package/pkg-2/pkg-2.mk + | + |- provides/jpeg.in + | |config BR2_PACKAGE_MY_JPEG + | | bool "my-jpeg" + | `---- + |- package/my-jpeg/Config.in + | |config BR2_PACKAGE_PROVIDES_JPEG + | | default "my-jpeg" if BR2_PACKAGE_MY_JPEG + | `---- + |- package/my-jpeg/my-jpeg.mk + | |# This is a normal package .mk file + | |MY_JPEG_VERSION = 1.2.3 + | |MY_JPEG_SITE = https://example.net/some/place + | |MY_JPEG_PROVIDES = jpeg + | |$(eval $(autotools-package)) + | `---- + | + |- provides/toolchains.in + | |config BR2_TOOLCHAIN_EXTERNAL_MINE + | | bool "my custom toolchain" + | | depends on BR2_some_arch + | | select BR2_INSTALL_LIBSTDCPP + | `---- + |- toolchain/toolchain-external-mine/Config.in.options + | |if BR2_TOOLCHAIN_EXTERNAL_MINE + | |config BR2_TOOLCHAIN_EXTERNAL_PREFIX + | | default "arch-mine-linux-gnu" + | |config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL + | | default "toolchain-external-mine" + | |endif + | `---- + |- toolchain/toolchain-external-mine/toolchain-external-mine.mk + | |TOOLCHAIN_EXTERNAL_MINE_SITE = https://example.net/some/place + | |TOOLCHAIN_EXTERNAL_MINE_SOURCE = my-toolchain.tar.gz + | |$(eval $(toolchain-external-package)) + | `---- + | + |- linux/Config.ext.in + | |config BR2_LINUX_KERNEL_EXT_EXAMPLE_DRIVER + | | bool "example-external-driver" + | | help + | | Example external driver + | |--- + |- linux/linux-ext-example-driver.mk + | + |- configs/my-board_defconfig + | |BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BAR_42_PATH)/patches/" + | |BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/overlay/" + | |BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/post-image.sh" + | |BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_BAR_42_PATH)/board/my-board/kernel.config" + | `---- + | + |- patches/linux/0001-some-change.patch + |- patches/linux/0002-some-other-change.patch + |- patches/busybox/0001-fix-something.patch + | + |- board/my-board/kernel.config + |- board/my-board/overlay/var/www/index.html + |- board/my-board/overlay/var/www/my.css + |- board/my-board/flash-image + `- board/my-board/post-image.sh + |#!/bin/sh + |generate-my-binary-image \ + | --root ${BINARIES_DIR}/rootfs.tar \ + | --kernel ${BINARIES_DIR}/zImage \ + | --dtb ${BINARIES_DIR}/my-board.dtb \ + | --output ${BINARIES_DIR}/image.bin + `---- + +The br2-external tree will then be visible in the menuconfig (with +the layout expanded): + +External options ---> + *** Example br2-external tree (in /path/to/br2-ext-tree/) + [ ] pkg-1 + [ ] pkg-2 + (0x10AD) my-board flash address + +If you are using more than one br2-external tree, it would look like +(with the layout expanded and the second one with name FOO_27 but no +desc: field in external.desc): + +External options ---> + Example br2-external tree ---> + *** Example br2-external tree (in /path/to/br2-ext-tree) + [ ] pkg-1 + [ ] pkg-2 + (0x10AD) my-board flash address + FOO_27 ---> + *** FOO_27 (in /path/to/another-br2-ext) + [ ] foo + [ ] bar + +Additionally, the jpeg provider will be visible in the jpeg choice: + +Target packages ---> + Libraries ---> + Graphics ---> + [*] jpeg support + jpeg variant () ---> + ( ) jpeg + ( ) jpeg-turbo + *** jpeg from: Example br2-external tree *** + (X) my-jpeg + *** jpeg from: FOO_27 *** + ( ) another-jpeg + +And similarly for the toolchains: + +Toolchain ---> + Toolchain () ---> + ( ) Custom toolchain + *** Toolchains from: Example br2-external tree *** + (X) my custom toolchain + +Note. The toolchain options in toolchain/toolchain-external-mine/ +Config.in.options will not appear in the Toolchain menu. They must be +explicitly included from within the br2-external’s top-level +Config.in and will thus appear in the External options menu. + +9.3. Storing the Buildroot configuration + +The Buildroot configuration can be stored using the command make +savedefconfig. + +This strips the Buildroot configuration down by removing +configuration options that are at their default value. The result is +stored in a file called defconfig. If you want to save it in another +place, change the BR2_DEFCONFIG option in the Buildroot configuration +itself, or call make with make savedefconfig BR2_DEFCONFIG= +. + +The recommended place to store this defconfig is configs/ +_defconfig. If you follow this recommendation, the configuration will +be listed in make help and can be set again by running make +_defconfig. + +Alternatively, you can copy the file to any other place and rebuild +with make defconfig BR2_DEFCONFIG=. + +9.4. Storing the configuration of other components + +The configuration files for BusyBox, the Linux kernel, Barebox, +U-Boot and uClibc should be stored as well if changed. For each of +these components, a Buildroot configuration option exists to point to +an input configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE. To store their configuration, +set these configuration options to a path where you want to save the +configuration files, and then use the helper targets described below +to actually store the configuration. + +As explained in Section 9.1, “Recommended directory structure”, the +recommended path to store these configuration files is board/ +//foo.config. + +Make sure that you create a configuration file before changing the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE etc. options. Otherwise, +Buildroot will try to access this config file, which doesn’t exist +yet, and will fail. You can create the configuration file by running +make linux-menuconfig etc. + +Buildroot provides a few helper targets to make the saving of +configuration files easier. + + * make linux-update-defconfig saves the linux configuration to the + path specified by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE. It + simplifies the config file by removing default values. However, + this only works with kernels starting from 2.6.33. For earlier + kernels, use make linux-update-config. + * make busybox-update-config saves the busybox configuration to the + path specified by BR2_PACKAGE_BUSYBOX_CONFIG. + * make uclibc-update-config saves the uClibc configuration to the + path specified by BR2_UCLIBC_CONFIG. + * make barebox-update-defconfig saves the barebox configuration to + the path specified by BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE. + * make uboot-update-defconfig saves the U-Boot configuration to the + path specified by BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE. + * For at91bootstrap3, no helper exists so you have to copy the + config file manually to + BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE. + +9.5. Customizing the generated target filesystem + +Besides changing the configuration through make *config, there are a +few other ways to customize the resulting target filesystem. + +The two recommended methods, which can co-exist, are root filesystem +overlay(s) and post build script(s). + +Root filesystem overlays (BR2_ROOTFS_OVERLAY) + + A filesystem overlay is a tree of files that is copied directly + over the target filesystem after it has been built. To enable + this feature, set config option BR2_ROOTFS_OVERLAY (in the System + configuration menu) to the root of the overlay. You can even + specify multiple overlays, space-separated. If you specify a + relative path, it will be relative to the root of the Buildroot + tree. Hidden directories of version control systems, like .git, + .svn, .hg, etc., files called .empty and files ending in ~ are + excluded from the copy. + + When BR2_ROOTFS_MERGED_USR is enabled, then the overlay must not + contain the /bin, /lib or /sbin directories, as Buildroot will + create them as symbolic links to the relevant folders in /usr. In + such a situation, should the overlay have any programs or + libraries, they should be placed in /usr/bin, /usr/sbin and /usr/ + lib. + + As shown in Section 9.1, “Recommended directory structure”, the + recommended path for this overlay is board/// + rootfs-overlay. + +Post-build scripts (BR2_ROOTFS_POST_BUILD_SCRIPT) + + Post-build scripts are shell scripts called after Buildroot + builds all the selected software, but before the rootfs images + are assembled. To enable this feature, specify a space-separated + list of post-build scripts in config option + BR2_ROOTFS_POST_BUILD_SCRIPT (in the System configuration menu). + If you specify a relative path, it will be relative to the root + of the Buildroot tree. + + Using post-build scripts, you can remove or modify any file in + your target filesystem. You should, however, use this feature + with care. Whenever you find that a certain package generates + wrong or unneeded files, you should fix that package rather than + work around it with some post-build cleanup scripts. + + As shown in Section 9.1, “Recommended directory structure”, the + recommended path for this script is board/// + post_build.sh. + + The post-build scripts are run with the main Buildroot tree as + current working directory. The path to the target filesystem is + passed as the first argument to each script. If the config option + BR2_ROOTFS_POST_SCRIPT_ARGS is not empty, these arguments will be + passed to the script too. All the scripts will be passed the + exact same set of arguments, it is not possible to pass different + sets of arguments to each script. + + In addition, you may also use these environment variables: + + + BR2_CONFIG: the path to the Buildroot .config file + + HOST_DIR, STAGING_DIR, TARGET_DIR: see Section 17.5.2, + “generic-package reference” + + BUILD_DIR: the directory where packages are extracted and + built + + BINARIES_DIR: the place where all binary files (aka images) + are stored + + BASE_DIR: the base output directory + +Below three more methods of customizing the target filesystem are +described, but they are not recommended. + +Direct modification of the target filesystem + + For temporary modifications, you can modify the target filesystem + directly and rebuild the image. The target filesystem is + available under output/target/. After making your changes, run + make to rebuild the target filesystem image. + + This method allows you to do anything to the target filesystem, + but if you need to clean your Buildroot tree using make clean, + these changes will be lost. Such cleaning is necessary in several + cases, refer to Section 8.2, “Understanding when a full rebuild + is necessary” for details. This solution is therefore only useful + for quick tests: changes do not survive the make clean command. + Once you have validated your changes, you should make sure that + they will persist after a make clean, using a root filesystem + overlay or a post-build script. + +Custom target skeleton (BR2_ROOTFS_SKELETON_CUSTOM) + + The root filesystem image is created from a target skeleton, on + top of which all packages install their files. The skeleton is + copied to the target directory output/target before any package + is built and installed. The default target skeleton provides the + standard Unix filesystem layout and some basic init scripts and + configuration files. + + If the default skeleton (available under system/skeleton) does + not match your needs, you would typically use a root filesystem + overlay or post-build script to adapt it. However, if the default + skeleton is entirely different than what you need, using a custom + skeleton may be more suitable. + + To enable this feature, enable config option + BR2_ROOTFS_SKELETON_CUSTOM and set + BR2_ROOTFS_SKELETON_CUSTOM_PATH to the path of your custom + skeleton. Both options are available in the System configuration + menu. If you specify a relative path, it will be relative to the + root of the Buildroot tree. + + Custom skeletons don’t need to contain the /bin, /lib or /sbin + directories, since they are created automatically during the + build. When BR2_ROOTFS_MERGED_USR is enabled, then the custom + skeleton must not contain the /bin, /lib or /sbin directories, as + Buildroot will create them as symbolic links to the relevant + folders in /usr. In such a situation, should the skeleton have + any programs or libraries, they should be placed in /usr/bin, / + usr/sbin and /usr/lib. + + This method is not recommended because it duplicates the entire + skeleton, which prevents taking advantage of the fixes or + improvements brought to the default skeleton in later Buildroot + releases. + +Post-fakeroot scripts (BR2_ROOTFS_POST_FAKEROOT_SCRIPT) + + When aggregating the final images, some parts of the process + requires root rights: creating device nodes in /dev, setting + permissions or ownership to files and directories… To avoid + requiring actual root rights, Buildroot uses fakeroot to simulate + root rights. This is not a complete substitute for actually being + root, but is enough for what Buildroot needs. + + Post-fakeroot scripts are shell scripts that are called at the + end of the fakeroot phase, right before the filesystem image + generator is called. As such, they are called in the fakeroot + context. + + Post-fakeroot scripts can be useful in case you need to tweak the + filesystem to do modifications that are usually only available to + the root user. + + Note: It is recommended to use the existing mechanisms to set + file permissions or create entries in /dev (see Section 9.5.1, + “Setting file permissions and ownership and adding custom devices + nodes”) or to create users (see Section 9.6, “Adding custom user + accounts”) + + Note: The difference between post-build scripts (above) and + fakeroot scripts, is that post-build scripts are not called in + the fakeroot context. + + Note: Using fakeroot is not an absolute substitute for actually + being root. fakeroot only ever fakes the file access rights and + types (regular, block-or-char device…) and uid/gid; these are + emulated in-memory. + +9.5.1. Setting file permissions and ownership and adding custom +devices nodes + +Sometimes it is needed to set specific permissions or ownership on +files or device nodes. For example, certain files may need to be +owned by root. Since the post-build scripts are not run as root, you +cannot do such changes from there unless you use an explicit fakeroot +from the post-build script. + +Instead, Buildroot provides support for so-called permission tables. +To use this feature, set config option BR2_ROOTFS_DEVICE_TABLE to a +space-separated list of permission tables, regular text files +following the makedev syntax. + +If you are using a static device table (i.e. not using devtmpfs, +mdev, or (e)udev) then you can add device nodes using the same +syntax, in so-called device tables. To use this feature, set config +option BR2_ROOTFS_STATIC_DEVICE_TABLE to a space-separated list of +device tables. + +As shown in Section 9.1, “Recommended directory structure”, the +recommended location for such files is board///. + +It should be noted that if the specific permissions or device nodes +are related to a specific application, you should set variables +FOO_PERMISSIONS and FOO_DEVICES in the package’s .mk file instead +(see Section 17.5.2, “generic-package reference”). + +9.6. Adding custom user accounts + +Sometimes it is needed to add specific users in the target system. To +cover this requirement, Buildroot provides support for so-called +users tables. To use this feature, set config option +BR2_ROOTFS_USERS_TABLES to a space-separated list of users tables, +regular text files following the makeusers syntax. + +As shown in Section 9.1, “Recommended directory structure”, the +recommended location for such files is board///. + +It should be noted that if the custom users are related to a specific +application, you should set variable FOO_USERS in the package’s .mk +file instead (see Section 17.5.2, “generic-package reference”). + +9.7. Customization after the images have been created + +While post-build scripts (Section 9.5, “Customizing the generated +target filesystem”) are run before building the filesystem image, +kernel and bootloader, post-image scripts can be used to perform some +specific actions after all images have been created. + +Post-image scripts can for example be used to automatically extract +your root filesystem tarball in a location exported by your NFS +server, or to create a special firmware image that bundles your root +filesystem and kernel image, or any other custom action required for +your project. + +To enable this feature, specify a space-separated list of post-image +scripts in config option BR2_ROOTFS_POST_IMAGE_SCRIPT (in the System +configuration menu). If you specify a relative path, it will be +relative to the root of the Buildroot tree. + +Just like post-build scripts, post-image scripts are run with the +main Buildroot tree as current working directory. The path to the +images output directory is passed as the first argument to each +script. If the config option BR2_ROOTFS_POST_SCRIPT_ARGS is not +empty, these arguments will be passed to the script too. All the +scripts will be passed the exact same set of arguments, it is not +possible to pass different sets of arguments to each script. + +Again just like for the post-build scripts, the scripts have access +to the environment variables BR2_CONFIG, HOST_DIR, STAGING_DIR, +TARGET_DIR, BUILD_DIR, BINARIES_DIR and BASE_DIR. + +The post-image scripts will be executed as the user that executes +Buildroot, which should normally not be the root user. Therefore, any +action requiring root permissions in one of these scripts will +require special handling (usage of fakeroot or sudo), which is left +to the script developer. + +9.8. Adding project-specific patches + +It is sometimes useful to apply extra patches to packages - on top of +those provided in Buildroot. This might be used to support custom +features in a project, for example, or when working on a new +architecture. + +The BR2_GLOBAL_PATCH_DIR configuration option can be used to specify +a space separated list of one or more directories containing package +patches. + +For a specific version of a specific package +, patches are applied from BR2_GLOBAL_PATCH_DIR as +follows: + + 1. For every directory - - that exists in + BR2_GLOBAL_PATCH_DIR, a will be determined as + follows: + + + /// if the + directory exists. + + Otherwise, / if the directory + exists. + 2. Patches will then be applied from a as + follows: + + + If a series file exists in the package directory, then + patches are applied according to the series file; + + Otherwise, patch files matching *.patch are applied in + alphabetical order. So, to ensure they are applied in the + right order, it is highly recommended to name the patch files + like this: -.patch, where + refers to the apply order. + +For information about how patches are applied for a package, see +Section 18.2, “How patches are applied” + +The BR2_GLOBAL_PATCH_DIR option is the preferred method for +specifying a custom patch directory for packages. It can be used to +specify a patch directory for any package in buildroot. It should +also be used in place of the custom patch directory options that are +available for packages such as U-Boot and Barebox. By doing this, it +will allow a user to manage their patches from one top-level +directory. + +The exception to BR2_GLOBAL_PATCH_DIR being the preferred method for +specifying custom patches is BR2_LINUX_KERNEL_PATCH. +BR2_LINUX_KERNEL_PATCH should be used to specify kernel patches that +are available at a URL. Note: BR2_LINUX_KERNEL_PATCH specifies kernel +patches that are applied after patches available in +BR2_GLOBAL_PATCH_DIR, as it is done from a post-patch hook of the +Linux package. + +9.9. Adding project-specific packages + +In general, any new package should be added directly in the package +directory and submitted to the Buildroot upstream project. How to add +packages to Buildroot in general is explained in full detail in +Chapter 17, Adding new packages to Buildroot and will not be repeated +here. However, your project may need some proprietary packages that +cannot be upstreamed. This section will explain how you can keep such +project-specific packages in a project-specific directory. + +As shown in Section 9.1, “Recommended directory structure”, the +recommended location for project-specific packages is package/ +/. If you are using the br2-external tree feature (see +Section 9.2, “Keeping customizations outside of Buildroot”) the +recommended location is to put them in a sub-directory named package/ +in your br2-external tree. + +However, Buildroot will not be aware of the packages in this +location, unless we perform some additional steps. As explained in +Chapter 17, Adding new packages to Buildroot, a package in Buildroot +basically consists of two files: a .mk file (describing how to build +the package) and a Config.in file (describing the configuration +options for this package). + +Buildroot will automatically include the .mk files in first-level +subdirectories of the package directory (using the pattern package/*/ +*.mk). If we want Buildroot to include .mk files from deeper +subdirectories (like package//package1/) then we simply have +to add a .mk file in a first-level subdirectory that includes these +additional .mk files. Therefore, create a file package// +.mk with following contents (assuming you have only one +extra directory level below package//): + +include $(sort $(wildcard package//*/*.mk)) + +For the Config.in files, create a file package//Config.in +that includes the Config.in files of all your packages. An exhaustive +list has to be provided since wildcards are not supported in the +source command of kconfig. For example: + +source "package//package1/Config.in" +source "package//package2/Config.in" + +Include this new file package//Config.in from package/ +Config.in, preferably in a company-specific menu to make merges with +future Buildroot versions easier. + +If using a br2-external tree, refer to Section 9.2, “Keeping +customizations outside of Buildroot” for how to fill in those files. + +9.10. Quick guide to storing your project-specific customizations + +Earlier in this chapter, the different methods for making +project-specific customizations have been described. This section +will now summarize all this by providing step-by-step instructions to +storing your project-specific customizations. Clearly, the steps that +are not relevant to your project can be skipped. + + 1. make menuconfig to configure toolchain, packages and kernel. + 2. make linux-menuconfig to update the kernel config, similar for + other configuration like busybox, uclibc, … + 3. mkdir -p board// + 4. Set the following options to board/// + .config (as far as they are relevant): + + + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE + + BR2_PACKAGE_BUSYBOX_CONFIG + + BR2_UCLIBC_CONFIG + + BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE + + BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE + + BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE + 5. Write the configuration files: + + + make linux-update-defconfig + + make busybox-update-config + + make uclibc-update-config + + cp /build/at91bootstrap3-*/.config board/ + //at91bootstrap3.config + + make barebox-update-defconfig + + make uboot-update-defconfig + 6. Create board///rootfs-overlay/ and fill + it with additional files you need on your rootfs, e.g. board/ + //rootfs-overlay/etc/inittab. Set + BR2_ROOTFS_OVERLAY to board/// + rootfs-overlay. + 7. Create a post-build script board/// + post_build.sh. Set BR2_ROOTFS_POST_BUILD_SCRIPT to board/ + //post_build.sh + 8. If additional setuid permissions have to be set or device nodes + have to be created, create board/// + device_table.txt and add that path to BR2_ROOTFS_DEVICE_TABLE. + 9. If additional user accounts have to be created, create board/ + //users_table.txt and add that path to + BR2_ROOTFS_USERS_TABLES. +10. To add custom patches to certain packages, set + BR2_GLOBAL_PATCH_DIR to board///patches/ + and add your patches for each package in a subdirectory named + after the package. Each patch should be called - + -.patch. +11. Specifically for the Linux kernel, there also exists the option + BR2_LINUX_KERNEL_PATCH with as main advantage that it can also + download patches from a URL. If you do not need this, + BR2_GLOBAL_PATCH_DIR is preferred. U-Boot, Barebox, at91bootstrap + and at91bootstrap3 also have separate options, but these do not + provide any advantage over BR2_GLOBAL_PATCH_DIR and will likely + be removed in the future. +12. If you need to add project-specific packages, create package/ + / and place your packages in that directory. Create + an overall .mk file that includes the .mk files of + all your packages. Create an overall Config.in file that sources + the Config.in files of all your packages. Include this Config.in + file from Buildroot’s package/Config.in file. +13. make savedefconfig to save the buildroot configuration. +14. cp defconfig configs/_defconfig + +Chapter 10. Frequently Asked Questions & Troubleshooting + +10.1. The boot hangs after Starting network… + +If the boot process seems to hang after the following messages +(messages not necessarily exactly similar, depending on the list of +packages selected): + +Freeing init memory: 3972K +Initializing random number generator... done. +Starting network... +Starting dropbear sshd: generating rsa key... generating dsa key... OK + +then it means that your system is running, but didn’t start a shell +on the serial console. In order to have the system start a shell on +your serial console, you have to go into the Buildroot configuration, +in System configuration, modify Run a getty (login prompt) after boot +and set the appropriate port and baud rate in the getty options +submenu. This will automatically tune the /etc/inittab file of the +generated system so that a shell starts on the correct serial port. + +10.2. Why is there no compiler on the target? + +It has been decided that support for the native compiler on the +target would be stopped from the Buildroot-2012.11 release because: + + * this feature was neither maintained nor tested, and often broken; + * this feature was only available for Buildroot toolchains; + * Buildroot mostly targets small or very small target hardware with + limited resource onboard (CPU, ram, mass-storage), for which + compiling on the target does not make much sense; + * Buildroot aims at easing the cross-compilation, making native + compilation on the target unnecessary. + +If you need a compiler on your target anyway, then Buildroot is not +suitable for your purpose. In such case, you need a real distribution +and you should opt for something like: + + * openembedded [http://www.openembedded.org] + * yocto [https://www.yoctoproject.org] + * emdebian [http://www.emdebian.org] + * Fedora [https://fedoraproject.org/wiki/Architectures] + * openSUSE ARM [http://en.opensuse.org/Portal:ARM] + * Arch Linux ARM [http://archlinuxarm.org] + * … + +10.3. Why are there no development files on the target? + +Since there is no compiler available on the target (see Section 10.2, +“Why is there no compiler on the target?”), it does not make sense to +waste space with headers or static libraries. + +Therefore, those files are always removed from the target since the +Buildroot-2012.11 release. + +10.4. Why is there no documentation on the target? + +Because Buildroot mostly targets small or very small target hardware +with limited resource onboard (CPU, ram, mass-storage), it does not +make sense to waste space with the documentation data. + +If you need documentation data on your target anyway, then Buildroot +is not suitable for your purpose, and you should look for a real +distribution (see: Section 10.2, “Why is there no compiler on the +target?”). + +10.5. Why are some packages not visible in the Buildroot config menu? + +If a package exists in the Buildroot tree and does not appear in the +config menu, this most likely means that some of the package’s +dependencies are not met. + +To know more about the dependencies of a package, search for the +package symbol in the config menu (see Section 8.1, “make tips”). + +Then, you may have to recursively enable several options (which +correspond to the unmet dependencies) to finally be able to select +the package. + +If the package is not visible due to some unmet toolchain options, +then you should certainly run a full rebuild (see Section 8.1, “make +tips” for more explanations). + +10.6. Why not use the target directory as a chroot directory? + +There are plenty of reasons to not use the target directory a chroot +one, among these: + + * file ownerships, modes and permissions are not correctly set in + the target directory; + * device nodes are not created in the target directory. + +For these reasons, commands run through chroot, using the target +directory as the new root, will most likely fail. + +If you want to run the target filesystem inside a chroot, or as an +NFS root, then use the tarball image generated in images/ and extract +it as root. + +10.7. Why doesn’t Buildroot generate binary packages (.deb, .ipkg…)? + +One feature that is often discussed on the Buildroot list is the +general topic of "package management". To summarize, the idea would +be to add some tracking of which Buildroot package installs what +files, with the goals of: + + * being able to remove files installed by a package when this + package gets unselected from the menuconfig; + * being able to generate binary packages (ipk or other format) that + can be installed on the target without re-generating a new root + filesystem image. + +In general, most people think it is easy to do: just track which +package installed what and remove it when the package is unselected. +However, it is much more complicated than that: + + * It is not only about the target/ directory, but also the sysroot + in host//sysroot and the host/ directory itself. All files + installed in those directories by various packages must be + tracked. + * When a package is unselected from the configuration, it is not + sufficient to remove just the files it installed. One must also + remove all its reverse dependencies (i.e. packages relying on it) + and rebuild all those packages. For example, package A depends + optionally on the OpenSSL library. Both are selected, and + Buildroot is built. Package A is built with crypto support using + OpenSSL. Later on, OpenSSL gets unselected from the + configuration, but package A remains (since OpenSSL is an + optional dependency, this is possible.) If only OpenSSL files are + removed, then the files installed by package A are broken: they + use a library that is no longer present on the target. Although + this is technically doable, it adds a lot of complexity to + Buildroot, which goes against the simplicity we try to stick to. + * In addition to the previous problem, there is the case where the + optional dependency is not even known to Buildroot. For example, + package A in version 1.0 never used OpenSSL, but in version 2.0 + it automatically uses OpenSSL if available. If the Buildroot .mk + file hasn’t been updated to take this into account, then package + A will not be part of the reverse dependencies of OpenSSL and + will not be removed and rebuilt when OpenSSL is removed. For + sure, the .mk file of package A should be fixed to mention this + optional dependency, but in the mean time, you can have + non-reproducible behaviors. + * The request is to also allow changes in the menuconfig to be + applied on the output directory without having to rebuild + everything from scratch. However, this is very difficult to + achieve in a reliable way: what happens when the suboptions of a + package are changed (we would have to detect this, and rebuild + the package from scratch and potentially all its reverse + dependencies), what happens if toolchain options are changed, + etc. At the moment, what Buildroot does is clear and simple so + its behaviour is very reliable and it is easy to support users. + If configuration changes done in menuconfig are applied after the + next make, then it has to work correctly and properly in all + situations, and not have some bizarre corner cases. The risk is + to get bug reports like "I have enabled package A, B and C, then + ran make, then disabled package C and enabled package D and ran + make, then re-enabled package C and enabled package E and then + there is a build failure". Or worse "I did some configuration, + then built, then did some changes, built, some more changes, + built, some more changes, built, and now it fails, but I don’t + remember all the changes I did and in which order". This will be + impossible to support. + +For all these reasons, the conclusion is that adding tracking of +installed files to remove them when the package is unselected, or to +generate a repository of binary packages, is something that is very +hard to achieve reliably and will add a lot of complexity. + +On this matter, the Buildroot developers make this position +statement: + + * Buildroot strives to make it easy to generate a root filesystem + (hence the name, by the way.) That is what we want to make + Buildroot good at: building root filesystems. + * Buildroot is not meant to be a distribution (or rather, a + distribution generator.) It is the opinion of most Buildroot + developers that this is not a goal we should pursue. We believe + that there are other tools better suited to generate a distro + than Buildroot is. For example, Open Embedded [http:// + openembedded.org/], or openWRT [https://openwrt.org/], are such + tools. + * We prefer to push Buildroot in a direction that makes it easy (or + even easier) to generate complete root filesystems. This is what + makes Buildroot stands out in the crowd (among other things, of + course!) + * We believe that for most embedded Linux systems, binary packages + are not necessary, and potentially harmful. When binary packages + are used, it means that the system can be partially upgraded, + which creates an enormous number of possible combinations of + package versions that should be tested before doing the upgrade + on the embedded device. On the other hand, by doing complete + system upgrades by upgrading the entire root filesystem image at + once, the image deployed to the embedded system is guaranteed to + really be the one that has been tested and validated. + +10.8. How to speed-up the build process? + +Since Buildroot often involves doing full rebuilds of the entire +system that can be quite long, we provide below a number of tips to +help reduce the build time: + + * Use a pre-built external toolchain instead of the default + Buildroot internal toolchain. By using a pre-built Linaro + toolchain (on ARM) or a Sourcery CodeBench toolchain (for ARM, + x86, x86-64, MIPS, etc.), you will save the build time of the + toolchain at each complete rebuild, approximately 15 to 20 + minutes. Note that temporarily using an external toolchain does + not prevent you to switch back to an internal toolchain (that may + provide a higher level of customization) once the rest of your + system is working; + * Use the ccache compiler cache (see: Section 8.13.3, “Using ccache + in Buildroot”); + * Learn about rebuilding only the few packages you actually care + about (see Section 8.3, “Understanding how to rebuild packages”), + but beware that sometimes full rebuilds are anyway necessary (see + Section 8.2, “Understanding when a full rebuild is necessary”); + * Make sure you are not using a virtual machine for the Linux + system used to run Buildroot. Most of the virtual machine + technologies are known to cause a significant performance impact + on I/O, which is really important for building source code; + * Make sure that you’re using only local files: do not attempt to + do a build over NFS, which significantly slows down the build. + Having the Buildroot download folder available locally also helps + a bit. + * Buy new hardware. SSDs and lots of RAM are key to speeding up the + builds. + * Experiment with top-level parallel build, see Section 8.11, + “Top-level parallel build”. + +Chapter 11. Known issues + + * It is not possible to pass extra linker options via + BR2_TARGET_LDFLAGS if such options contain a $ sign. For example, + the following is known to break: BR2_TARGET_LDFLAGS="-Wl,-rpath= + '$ORIGIN/../lib'" + * The libffi package is not supported on the SuperH 2 and ARC + architectures. + * The prboom package triggers a compiler failure with the SuperH 4 + compiler from Sourcery CodeBench, version 2012.09. + +Chapter 12. Legal notice and licensing + +12.1. Complying with open source licenses + +All of the end products of Buildroot (toolchain, root filesystem, +kernel, bootloaders) contain open source software, released under +various licenses. + +Using open source software gives you the freedom to build rich +embedded systems, choosing from a wide range of packages, but also +imposes some obligations that you must know and honour. Some licenses +require you to publish the license text in the documentation of your +product. Others require you to redistribute the source code of the +software to those that receive your product. + +The exact requirements of each license are documented in each +package, and it is your responsibility (or that of your legal office) +to comply with those requirements. To make this easier for you, +Buildroot can collect for you some material you will probably need. +To produce this material, after you have configured Buildroot with +make menuconfig, make xconfig or make gconfig, run: + +make legal-info + +Buildroot will collect legally-relevant material in your output +directory, under the legal-info/ subdirectory. There you will find: + + * A README file, that summarizes the produced material and contains + warnings about material that Buildroot could not produce. + * buildroot.config: this is the Buildroot configuration file that + is usually produced with make menuconfig, and which is necessary + to reproduce the build. + * The source code for all packages; this is saved in the sources/ + and host-sources/ subdirectories for target and host packages + respectively. The source code for packages that set + _REDISTRIBUTE = NO will not be saved. Patches that were applied + are also saved, along with a file named series that lists the + patches in the order they were applied. Patches are under the + same license as the files that they modify. Note: Buildroot + applies additional patches to Libtool scripts of autotools-based + packages. These patches can be found under support/libtool in the + Buildroot source and, due to technical limitations, are not saved + with the package sources. You may need to collect them manually. + * A manifest file (one for host and one for target packages) + listing the configured packages, their version, license and + related information. Some of this information might not be + defined in Buildroot; such items are marked as "unknown". + * The license texts of all packages, in the licenses/ and + host-licenses/ subdirectories for target and host packages + respectively. If the license file(s) are not defined in + Buildroot, the file is not produced and a warning in the README + indicates this. + +Please note that the aim of the legal-info feature of Buildroot is to +produce all the material that is somehow relevant for legal +compliance with the package licenses. Buildroot does not try to +produce the exact material that you must somehow make public. +Certainly, more material is produced than is needed for a strict +legal compliance. For example, it produces the source code for +packages released under BSD-like licenses, that you are not required +to redistribute in source form. + +Moreover, due to technical limitations, Buildroot does not produce +some material that you will or may need, such as the toolchain source +code for some of the external toolchains and the Buildroot source +code itself. When you run make legal-info, Buildroot produces +warnings in the README file to inform you of relevant material that +could not be saved. + +Finally, keep in mind that the output of make legal-info is based on +declarative statements in each of the packages recipes. The Buildroot +developers try to do their best to keep those declarative statements +as accurate as possible, to the best of their knowledge. However, it +is very well possible that those declarative statements are not all +fully accurate nor exhaustive. You (or your legal department) have to +check the output of make legal-info before using it as your own +compliance delivery. See the NO WARRANTY clauses (clauses 11 and 12) +in the COPYING file at the root of the Buildroot distribution. + +12.2. Complying with the Buildroot license + +Buildroot itself is an open source software, released under the GNU +General Public License, version 2 [http://www.gnu.org/licenses/ +old-licenses/gpl-2.0.html] or (at your option) any later version, +with the exception of the package patches detailed below. However, +being a build system, it is not normally part of the end product: if +you develop the root filesystem, kernel, bootloader or toolchain for +a device, the code of Buildroot is only present on the development +machine, not in the device storage. + +Nevertheless, the general view of the Buildroot developers is that +you should release the Buildroot source code along with the source +code of other packages when releasing a product that contains +GPL-licensed software. This is because the GNU GPL [http:// +www.gnu.org/licenses/old-licenses/gpl-2.0.html] defines the "complete +source code" for an executable work as "all the source code for all +modules it contains, plus any associated interface definition files, +plus the scripts used to control compilation and installation of the +executable". Buildroot is part of the scripts used to control +compilation and installation of the executable, and as such it is +considered part of the material that must be redistributed. + +Keep in mind that this is only the Buildroot developers' opinion, and +you should consult your legal department or lawyer in case of any +doubt. + +12.2.1. Patches to packages + +Buildroot also bundles patch files, which are applied to the sources +of the various packages. Those patches are not covered by the license +of Buildroot. Instead, they are covered by the license of the +software to which the patches are applied. When said software is +available under multiple licenses, the Buildroot patches are only +provided under the publicly accessible licenses. + +See Chapter 18, Patching a package for the technical details. + +Chapter 13. Beyond Buildroot + +13.1. Boot the generated images + +13.1.1. NFS boot + +To achieve NFS-boot, enable tar root filesystem in the Filesystem +images menu. + +After a complete build, just run the following commands to setup the +NFS-root directory: + +sudo tar -xavf /path/to/output_dir/rootfs.tar -C /path/to/nfs_root_dir + +Remember to add this path to /etc/exports. + +Then, you can execute a NFS-boot from your target. + +13.1.2. Live CD + +To build a live CD image, enable the iso image option in the +Filesystem images menu. Note that this option is only available on +the x86 and x86-64 architectures, and if you are building your kernel +with Buildroot. + +You can build a live CD image with either IsoLinux, Grub or Grub 2 as +a bootloader, but only Isolinux supports making this image usable +both as a live CD and live USB (through the Build hybrid image +option). + +You can test your live CD image using QEMU: + +qemu-system-i386 -cdrom output/images/rootfs.iso9660 + +Or use it as a hard-drive image if it is a hybrid ISO: + +qemu-system-i386 -hda output/images/rootfs.iso9660 + +It can be easily flashed to a USB drive with dd: + +dd if=output/images/rootfs.iso9660 of=/dev/sdb + +13.2. Chroot + +If you want to chroot in a generated image, then there are few thing +you should be aware of: + + * you should setup the new root from the tar root filesystem image; + * either the selected target architecture is compatible with your + host machine, or you should use some qemu-* binary and correctly + set it within the binfmt properties to be able to run the + binaries built for the target on your host machine; + * Buildroot does not currently provide host-qemu and binfmt + correctly built and set for that kind of use. + +Part III. Developer guide + +Table of Contents + +14. How Buildroot works +15. Coding style + + 15.1. Config.in file + 15.2. The .mk file + 15.3. The documentation + 15.4. Support scripts + +16. Adding support for a particular board +17. Adding new packages to Buildroot + + 17.1. Package directory + 17.2. Config files + 17.3. The .mk file + 17.4. The .hash file + 17.5. Infrastructure for packages with specific build systems + 17.6. Infrastructure for autotools-based packages + 17.7. Infrastructure for CMake-based packages + 17.8. Infrastructure for Python packages + 17.9. Infrastructure for LuaRocks-based packages + 17.10. Infrastructure for Perl/CPAN packages + 17.11. Infrastructure for virtual packages + 17.12. Infrastructure for packages using kconfig for + configuration files + 17.13. Infrastructure for rebar-based packages + 17.14. Infrastructure for Waf-based packages + 17.15. Infrastructure for Meson-based packages + 17.16. Integration of Cargo-based packages + 17.17. Infrastructure for Go packages + 17.18. Infrastructure for QMake-based packages + 17.19. Infrastructure for packages building kernel modules + 17.20. Infrastructure for asciidoc documents + 17.21. Infrastructure specific to the Linux kernel package + 17.22. Hooks available in the various build steps + 17.23. Gettext integration and interaction with packages + 17.24. Tips and tricks + 17.25. Conclusion + +18. Patching a package + + 18.1. Providing patches + 18.2. How patches are applied + 18.3. Format and licensing of the package patches + 18.4. Integrating patches found on the Web + +19. Download infrastructure +20. Debugging Buildroot +21. Contributing to Buildroot + + 21.1. Reproducing, analyzing and fixing bugs + 21.2. Analyzing and fixing autobuild failures + 21.3. Reviewing and testing patches + 21.4. Work on items from the TODO list + 21.5. Submitting patches + 21.6. Reporting issues/bugs or getting help + 21.7. Using the run-tests framework + +22. DEVELOPERS file and get-developers +23. Release Engineering + + 23.1. Releases + 23.2. Development + +Chapter 14. How Buildroot works + +As mentioned above, Buildroot is basically a set of Makefiles that +download, configure, and compile software with the correct options. +It also includes patches for various software packages - mainly the +ones involved in the cross-compilation toolchain (gcc, binutils and +uClibc). + +There is basically one Makefile per software package, and they are +named with the .mk extension. Makefiles are split into many different +parts. + + * The toolchain/ directory contains the Makefiles and associated + files for all software related to the cross-compilation + toolchain: binutils, gcc, gdb, kernel-headers and uClibc. + * The arch/ directory contains the definitions for all the + processor architectures that are supported by Buildroot. + * The package/ directory contains the Makefiles and associated + files for all user-space tools and libraries that Buildroot can + compile and add to the target root filesystem. There is one + sub-directory per package. + * The linux/ directory contains the Makefiles and associated files + for the Linux kernel. + * The boot/ directory contains the Makefiles and associated files + for the bootloaders supported by Buildroot. + * The system/ directory contains support for system integration, + e.g. the target filesystem skeleton and the selection of an init + system. + * The fs/ directory contains the Makefiles and associated files for + software related to the generation of the target root filesystem + image. + +Each directory contains at least 2 files: + + * something.mk is the Makefile that downloads, configures, compiles + and installs the package something. + * Config.in is a part of the configuration tool description file. + It describes the options related to the package. + +The main Makefile performs the following steps (once the +configuration is done): + + * Create all the output directories: staging, target, build, etc. + in the output directory (output/ by default, another value can be + specified using O=) + * Generate the toolchain target. When an internal toolchain is + used, this means generating the cross-compilation toolchain. When + an external toolchain is used, this means checking the features + of the external toolchain and importing it into the Buildroot + environment. + * Generate all the targets listed in the TARGETS variable. This + variable is filled by all the individual components' Makefiles. + Generating these targets will trigger the compilation of the + userspace packages (libraries, programs), the kernel, the + bootloader and the generation of the root filesystem images, + depending on the configuration. + +Chapter 15. Coding style + +Overall, these coding style rules are here to help you to add new +files in Buildroot or refactor existing ones. + +If you slightly modify some existing file, the important thing is to +keep the consistency of the whole file, so you can: + + * either follow the potentially deprecated coding style used in + this file, + * or entirely rework it in order to make it comply with these + rules. + +15.1. Config.in file + +Config.in files contain entries for almost anything configurable in +Buildroot. + +An entry has the following pattern: + +config BR2_PACKAGE_LIBFOO + bool "libfoo" + depends on BR2_PACKAGE_LIBBAZ + select BR2_PACKAGE_LIBBAR + help + This is a comment that explains what libfoo is. The help text + should be wrapped. + + http://foosoftware.org/libfoo/ + + * The bool, depends on, select and help lines are indented with one + tab. + * The help text itself should be indented with one tab and two + spaces. + * The help text should be wrapped to fit 72 columns, where tab + counts for 8, so 62 characters in the text itself. + +The Config.in files are the input for the configuration tool used in +Buildroot, which is the regular Kconfig. For further details about +the Kconfig language, refer to http://kernel.org/doc/Documentation/ +kbuild/kconfig-language.txt. + +15.2. The .mk file + + * Header: The file starts with a header. It contains the module + name, preferably in lowercase, enclosed between separators made + of 80 hashes. A blank line is mandatory after the header: + + ################################################################################ + # + # libfoo + # + ################################################################################ + + * Assignment: use = preceded and followed by one space: + + LIBFOO_VERSION = 1.0 + LIBFOO_CONF_OPTS += --without-python-support + + Do not align the = signs. + + * Indentation: use tab only: + + define LIBFOO_REMOVE_DOC + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/doc \ + $(TARGET_DIR)/usr/share/man/man3/libfoo* + endef + + Note that commands inside a define block should always start with + a tab, so make recognizes them as commands. + + * Optional dependency: + + + Prefer multi-line syntax. + + YES: + + ifeq ($(BR2_PACKAGE_PYTHON),y) + LIBFOO_CONF_OPTS += --with-python-support + LIBFOO_DEPENDENCIES += python + else + LIBFOO_CONF_OPTS += --without-python-support + endif + + NO: + + LIBFOO_CONF_OPTS += --with$(if $(BR2_PACKAGE_PYTHON),,out)-python-support + LIBFOO_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,) + + + Keep configure options and dependencies close together. + * Optional hooks: keep hook definition and assignment together in + one if block. + + YES: + + ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) + define LIBFOO_REMOVE_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + endef + LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA + endif + + NO: + + define LIBFOO_REMOVE_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/libfoo/data + endef + + ifneq ($(BR2_LIBFOO_INSTALL_DATA),y) + LIBFOO_POST_INSTALL_TARGET_HOOKS += LIBFOO_REMOVE_DATA + endif + +15.3. The documentation + +The documentation uses the asciidoc [http://www.methods.co.nz/ +asciidoc/] format. + +For further details about the asciidoc syntax, refer to http:// +www.methods.co.nz/asciidoc/userguide.html. + +15.4. Support scripts + +Some scripts in the support/ and utils/ directories are written in +Python and should follow the PEP8 Style Guide for Python Code [https: +//www.python.org/dev/peps/pep-0008/]. + +Chapter 16. Adding support for a particular board + +Buildroot contains basic configurations for several publicly +available hardware boards, so that users of such a board can easily +build a system that is known to work. You are welcome to add support +for other boards to Buildroot too. + +To do so, you need to create a normal Buildroot configuration that +builds a basic system for the hardware: toolchain, kernel, +bootloader, filesystem and a simple BusyBox-only userspace. No +specific package should be selected: the configuration should be as +minimal as possible, and should only build a working basic BusyBox +system for the target platform. You can of course use more +complicated configurations for your internal projects, but the +Buildroot project will only integrate basic board configurations. +This is because package selections are highly application-specific. + +Once you have a known working configuration, run make savedefconfig. +This will generate a minimal defconfig file at the root of the +Buildroot source tree. Move this file into the configs/ directory, +and rename it _defconfig. + +It is recommended to use as much as possible upstream versions of the +Linux kernel and bootloaders, and to use as much as possible default +kernel and bootloader configurations. If they are incorrect for your +board, or no default exists, we encourage you to send fixes to the +corresponding upstream projects. + +However, in the mean time, you may want to store kernel or bootloader +configuration or patches specific to your target platform. To do so, +create a directory board/ and a subdirectory board/ +/. You can then store your patches and +configurations in these directories, and reference them from the main +Buildroot configuration. Refer to Chapter 9, Project-specific +customization for more details. + +Chapter 17. Adding new packages to Buildroot + +This section covers how new packages (userspace libraries or +applications) can be integrated into Buildroot. It also shows how +existing packages are integrated, which is needed for fixing issues +or tuning their configuration. + +When you add a new package, be sure to test it in various conditions +(see Section 17.24.3, “How to test your package”) and also check it +for coding style (see Section 17.24.2, “How to check the coding +style”). + +17.1. Package directory + +First of all, create a directory under the package directory for your +software, for example libfoo. + +Some packages have been grouped by topic in a sub-directory: x11r7, +qt5 and gstreamer. If your package fits in one of these categories, +then create your package directory in these. New subdirectories are +discouraged, however. + +17.2. Config files + +For the package to be displayed in the configuration tool, you need +to create a Config file in your package directory. There are two +types: Config.in and Config.in.host. + +17.2.1. Config.in file + +For packages used on the target, create a file named Config.in. This +file will contain the option descriptions related to our libfoo +software that will be used and displayed in the configuration tool. +It should basically contain: + +config BR2_PACKAGE_LIBFOO + bool "libfoo" + help + This is a comment that explains what libfoo is. The help text + should be wrapped. + + http://foosoftware.org/libfoo/ + +The bool line, help line and other metadata information about the +configuration option must be indented with one tab. The help text +itself should be indented with one tab and two spaces, lines should +be wrapped to fit 72 columns, where tab counts for 8, so 62 +characters in the text itself. The help text must mention the +upstream URL of the project after an empty line. + +As a convention specific to Buildroot, the ordering of the attributes +is as follows: + + 1. The type of option: bool, string… with the prompt + 2. If needed, the default value(s) + 3. Any dependencies on the target in depends on form + 4. Any dependencies on the toolchain in depends on form + 5. Any dependencies on other packages in depends on form + 6. Any dependency of the select form + 7. The help keyword and help text. + +You can add other sub-options into a if BR2_PACKAGE_LIBFOO…endif +statement to configure particular things in your software. You can +look at examples in other packages. The syntax of the Config.in file +is the same as the one for the kernel Kconfig file. The documentation +for this syntax is available at http://kernel.org/doc/Documentation/ +kbuild/kconfig-language.txt + +Finally you have to add your new libfoo/Config.in to package/ +Config.in (or in a category subdirectory if you decided to put your +package in one of the existing categories). The files included there +are sorted alphabetically per category and are NOT supposed to +contain anything but the bare name of the package. + +source "package/libfoo/Config.in" + +17.2.2. Config.in.host file + +Some packages also need to be built for the host system. There are +two options here: + + * The host package is only required to satisfy build-time + dependencies of one or more target packages. In this case, add + host-foo to the target package’s BAR_DEPENDENCIES variable. No + Config.in.host file should be created. + * The host package should be explicitly selectable by the user from + the configuration menu. In this case, create a Config.in.host + file for that host package: + + config BR2_PACKAGE_HOST_FOO + bool "host foo" + help + This is a comment that explains what foo for the host is. + + http://foosoftware.org/foo/ + + The same coding style and options as for the Config.in file are + valid. + + Finally you have to add your new libfoo/Config.in.host to package + /Config.in.host. The files included there are sorted + alphabetically and are NOT supposed to contain anything but the + bare name of the package. + + source "package/foo/Config.in.host" + + The host package will then be available from the Host utilities + menu. + +17.2.3. Choosing depends on or select + +The Config.in file of your package must also ensure that dependencies +are enabled. Typically, Buildroot uses the following rules: + + * Use a select type of dependency for dependencies on libraries. + These dependencies are generally not obvious and it therefore + make sense to have the kconfig system ensure that the + dependencies are selected. For example, the libgtk2 package uses + select BR2_PACKAGE_LIBGLIB2 to make sure this library is also + enabled. The select keyword expresses the dependency with a + backward semantic. + * Use a depends on type of dependency when the user really needs to + be aware of the dependency. Typically, Buildroot uses this type + of dependency for dependencies on target architecture, MMU + support and toolchain options (see Section 17.2.4, “Dependencies + on target and toolchain options”), or for dependencies on "big" + things, such as the X.org system. The depends on keyword + expresses the dependency with a forward semantic. + +Note. The current problem with the kconfig language is that these two +dependency semantics are not internally linked. Therefore, it may be +possible to select a package, whom one of its dependencies/ +requirement is not met. + +An example illustrates both the usage of select and depends on. + +config BR2_PACKAGE_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBART + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_ZLIB + help + RRDtool is the OpenSource industry standard, high performance + data logging and graphing system for time series data. + + http://oss.oetiker.ch/rrdtool/ + +comment "rrdtool needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +Note that these two dependency types are only transitive with the +dependencies of the same kind. + +This means, in the following example: + +config BR2_PACKAGE_A + bool "Package A" + +config BR2_PACKAGE_B + bool "Package B" + depends on BR2_PACKAGE_A + +config BR2_PACKAGE_C + bool "Package C" + depends on BR2_PACKAGE_B + +config BR2_PACKAGE_D + bool "Package D" + select BR2_PACKAGE_B + +config BR2_PACKAGE_E + bool "Package E" + select BR2_PACKAGE_D + + * Selecting Package C will be visible if Package B has been + selected, which in turn is only visible if Package A has been + selected. + * Selecting Package E will select Package D, which will select + Package B, it will not check for the dependencies of Package B, + so it will not select Package A. + * Since Package B is selected but Package A is not, this violates + the dependency of Package B on Package A. Therefore, in such a + situation, the transitive dependency has to be added explicitly: + +config BR2_PACKAGE_D + bool "Package D" + select BR2_PACKAGE_B + depends on BR2_PACKAGE_A + +config BR2_PACKAGE_E + bool "Package E" + select BR2_PACKAGE_D + depends on BR2_PACKAGE_A + +Overall, for package library dependencies, select should be +preferred. + +Note that such dependencies will ensure that the dependency option is +also enabled, but not necessarily built before your package. To do +so, the dependency also needs to be expressed in the .mk file of the +package. + +Further formatting details: see the coding style. + +17.2.4. Dependencies on target and toolchain options + +Many packages depend on certain options of the toolchain: the choice +of C library, C++ support, thread support, RPC support, wchar +support, or dynamic library support. Some packages can only be built +on certain target architectures, or if an MMU is available in the +processor. + +These dependencies have to be expressed with the appropriate depends +on statements in the Config.in file. Additionally, for dependencies +on toolchain options, a comment should be displayed when the option +is not enabled, so that the user knows why the package is not +available. Dependencies on target architecture or MMU support should +not be made visible in a comment: since it is unlikely that the user +can freely choose another target, it makes little sense to show these +dependencies explicitly. + +The comment should only be visible if the config option itself would +be visible when the toolchain option dependencies are met. This means +that all other dependencies of the package (including dependencies on +target architecture and MMU support) have to be repeated on the +comment definition. To keep it clear, the depends on statement for +these non-toolchain option should be kept separate from the depends +on statement for the toolchain options. If there is a dependency on a +config option in that same file (typically the main package) it is +preferable to have a global if … endif construct rather than +repeating the depends on statement on the comment and other config +options. + +The general format of a dependency comment for package foo is: + +foo needs a toolchain w/ featA, featB, featC + +for example: + +mpd needs a toolchain w/ C++, threads, wchar + +or + +crda needs a toolchain w/ threads + +Note that this text is kept brief on purpose, so that it will fit on +a 80-character terminal. + +The rest of this section enumerates the different target and +toolchain options, the corresponding config symbols to depend on, and +the text to use in the comment. + + * Target architecture + + + Dependency symbol: BR2_powerpc, BR2_mips, … (see arch/ + Config.in) + + Comment string: no comment to be added + * MMU support + + + Dependency symbol: BR2_USE_MMU + + Comment string: no comment to be added + * Gcc _sync* built-ins used for atomic operations. They are + available in variants operating on 1 byte, 2 bytes, 4 bytes and 8 + bytes. Since different architectures support atomic operations on + different sizes, one dependency symbol is available for each + size: + + + Dependency symbol: BR2_TOOLCHAIN_HAS_SYNC_1 for 1 byte, + BR2_TOOLCHAIN_HAS_SYNC_2 for 2 bytes, + BR2_TOOLCHAIN_HAS_SYNC_4 for 4 bytes, + BR2_TOOLCHAIN_HAS_SYNC_8 for 8 bytes. + + Comment string: no comment to be added + * Gcc _atomic* built-ins used for atomic operations. + + + Dependency symbol: BR2_TOOLCHAIN_HAS_ATOMIC. + + Comment string: no comment to be added + * Kernel headers + + + Dependency symbol: BR2_TOOLCHAIN_HEADERS_AT_LEAST_X_Y, + (replace X_Y with the proper version, see toolchain/ + Config.in) + + Comment string: headers >= X.Y and/or headers <= X.Y (replace + X.Y with the proper version) + * GCC version + + + Dependency symbol: BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y, (replace + X_Y with the proper version, see toolchain/Config.in) + + Comment string: gcc >= X.Y and/or gcc <= X.Y (replace X.Y + with the proper version) + * Host GCC version + + + Dependency symbol: BR2_HOST_GCC_AT_LEAST_X_Y, (replace X_Y + with the proper version, see Config.in) + + Comment string: no comment to be added + + Note that it is usually not the package itself that has a + minimum host GCC version, but rather a host-package on which + it depends. + * C library + + + Dependency symbol: BR2_TOOLCHAIN_USES_GLIBC, + BR2_TOOLCHAIN_USES_MUSL, BR2_TOOLCHAIN_USES_UCLIBC + + Comment string: for the C library, a slightly different + comment text is used: foo needs a glibc toolchain, or foo + needs a glibc toolchain w/ C++ + * C++ support + + + Dependency symbol: BR2_INSTALL_LIBSTDCPP + + Comment string: C++ + * D support + + + Dependency symbol: BR2_TOOLCHAIN_HAS_DLANG + + Comment string: Dlang + * Fortran support + + + Dependency symbol: BR2_TOOLCHAIN_HAS_FORTRAN + + Comment string: fortran + * thread support + + + Dependency symbol: BR2_TOOLCHAIN_HAS_THREADS + + Comment string: threads (unless + BR2_TOOLCHAIN_HAS_THREADS_NPTL is also needed, in which case, + specifying only NPTL is sufficient) + * NPTL thread support + + + Dependency symbol: BR2_TOOLCHAIN_HAS_THREADS_NPTL + + Comment string: NPTL + * RPC support + + + Dependency symbol: BR2_TOOLCHAIN_HAS_NATIVE_RPC + + Comment string: RPC + * wchar support + + + Dependency symbol: BR2_USE_WCHAR + + Comment string: wchar + * dynamic library + + + Dependency symbol: !BR2_STATIC_LIBS + + Comment string: dynamic library + +17.2.5. Dependencies on a Linux kernel built by buildroot + +Some packages need a Linux kernel to be built by buildroot. These are +typically kernel modules or firmware. A comment should be added in +the Config.in file to express this dependency, similar to +dependencies on toolchain options. The general format is: + +foo needs a Linux kernel to be built + +If there is a dependency on both toolchain options and the Linux +kernel, use this format: + +foo needs a toolchain w/ featA, featB, featC and a Linux kernel to be built + +17.2.6. Dependencies on udev /dev management + +If a package needs udev /dev management, it should depend on symbol +BR2_PACKAGE_HAS_UDEV, and the following comment should be added: + +foo needs udev /dev management + +If there is a dependency on both toolchain options and udev /dev +management, use this format: + +foo needs udev /dev management and a toolchain w/ featA, featB, featC + +17.2.7. Dependencies on features provided by virtual packages + +Some features can be provided by more than one package, such as the +openGL libraries. + +See Section 17.11, “Infrastructure for virtual packages” for more on +the virtual packages. + +17.3. The .mk file + +Finally, here’s the hardest part. Create a file named libfoo.mk. It +describes how the package should be downloaded, configured, built, +installed, etc. + +Depending on the package type, the .mk file must be written in a +different way, using different infrastructures: + + * Makefiles for generic packages (not using autotools or CMake): + These are based on an infrastructure similar to the one used for + autotools-based packages, but require a little more work from the + developer. They specify what should be done for the + configuration, compilation and installation of the package. This + infrastructure must be used for all packages that do not use the + autotools as their build system. In the future, other specialized + infrastructures might be written for other build systems. We + cover them through in a tutorial and a reference. + * Makefiles for autotools-based software (autoconf, automake, + etc.): We provide a dedicated infrastructure for such packages, + since autotools is a very common build system. This + infrastructure must be used for new packages that rely on the + autotools as their build system. We cover them through a tutorial + and reference. + * Makefiles for cmake-based software: We provide a dedicated + infrastructure for such packages, as CMake is a more and more + commonly used build system and has a standardized behaviour. This + infrastructure must be used for new packages that rely on CMake. + We cover them through a tutorial and reference. + * Makefiles for Python modules: We have a dedicated infrastructure + for Python modules that use either the distutils or the + setuptools mechanism. We cover them through a tutorial and a + reference. + * Makefiles for Lua modules: We have a dedicated infrastructure for + Lua modules available through the LuaRocks web site. We cover + them through a tutorial and a reference. + +Further formatting details: see the writing rules. + +17.4. The .hash file + +When possible, you must add a third file, named libfoo.hash, that +contains the hashes of the downloaded files for the libfoo package. +The only reason for not adding a .hash file is when hash checking is +not possible due to how the package is downloaded. + +When a package has a version selection choice, then the hash file may +be stored in a subdirectory named after the version, e.g. package/ +libfoo/1.2.3/libfoo.hash. This is especially important if the +different versions have different licensing terms, but they are +stored in the same file. Otherwise, the hash file should stay in the +package’s directory. + +The hashes stored in that file are used to validate the integrity of +the downloaded files and of the license files. + +The format of this file is one line for each file for which to check +the hash, each line with the following three fields separated by two +spaces: + + * the type of hash, one of: + + + md5, sha1, sha224, sha256, sha384, sha512, none + * the hash of the file: + + + for none, one or more non-space chars, usually just the + string xxx + + for md5, 32 hexadecimal characters + + for sha1, 40 hexadecimal characters + + for sha224, 56 hexadecimal characters + + for sha256, 64 hexadecimal characters + + for sha384, 96 hexadecimal characters + + for sha512, 128 hexadecimal characters + * the name of the file: + + + for a source archive: the basename of the file, without any + directory component, + + for a license file: the path as it appears in + FOO_LICENSE_FILES. + +Lines starting with a # sign are considered comments, and ignored. +Empty lines are ignored. + +There can be more than one hash for a single file, each on its own +line. In this case, all hashes must match. + +Note. Ideally, the hashes stored in this file should match the hashes +published by upstream, e.g. on their website, in the e-mail +announcement… If upstream provides more than one type of hash (e.g. +sha1 and sha512), then it is best to add all those hashes in the +.hash file. If upstream does not provide any hash, or only provides +an md5 hash, then compute at least one strong hash yourself +(preferably sha256, but not md5), and mention this in a comment line +above the hashes. + +Note. The hashes for license files are used to detect a license +change when a package version is bumped. The hashes are checked +during the make legal-info target run. For a package with multiple +versions (like Qt5), create the hash file in a subdirectory + of that package (see also Section 18.2, “How patches +are applied”). + +The none hash type is reserved to those archives downloaded from a +repository, like a git clone, a subversion checkout… + +The example below defines a sha1 and a sha256 published by upstream +for the main libfoo-1.2.3.tar.bz2 tarball, an md5 from upstream and a +locally-computed sha256 hashes for a binary blob, a sha256 for a +downloaded patch, and an archive with no hash: + +# Hashes from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.{sha1,sha256}: +sha1 486fb55c3efa71148fe07895fd713ea3a5ae343a libfoo-1.2.3.tar.bz2 +sha256 efc8103cc3bcb06bda6a781532d12701eb081ad83e8f90004b39ab81b65d4369 libfoo-1.2.3.tar.bz2 + +# md5 from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.md5, sha256 locally computed: +md5 2d608f3c318c6b7557d551a5a09314f03452f1a1 libfoo-data.bin +sha256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b libfoo-data.bin + +# Locally computed: +sha256 ff52101fb90bbfc3fe9475e425688c660f46216d7e751c4bbdb1dc85cdccacb9 libfoo-fix-blabla.patch + +# No hash for 1234: +none xxx libfoo-1234.tar.gz + +# Hash for license files: +sha256 a45a845012742796534f7e91fe623262ccfb99460a2bd04015bd28d66fba95b8 COPYING +sha256 01b1f9f2c8ee648a7a596a1abe8aa4ed7899b1c9e5551bda06da6e422b04aa55 doc/COPYING.LGPL + +If the .hash file is present, and it contains one or more hashes for +a downloaded file, the hash(es) computed by Buildroot (after +download) must match the hash(es) stored in the .hash file. If one or +more hashes do not match, Buildroot considers this an error, deletes +the downloaded file, and aborts. + +If the .hash file is present, but it does not contain a hash for a +downloaded file, Buildroot considers this an error and aborts. +However, the downloaded file is left in the download directory since +this typically indicates that the .hash file is wrong but the +downloaded file is probably OK. + +Hashes are currently checked for files fetched from http/ftp servers, +Git repositories, files copied using scp and local files. Hashes are +not checked for other version control systems (such as Subversion, +CVS, etc.) because Buildroot currently does not generate reproducible +tarballs when source code is fetched from such version control +systems. + +Hashes should only be added in .hash files for files that are +guaranteed to be stable. For example, patches auto-generated by +Github are not guaranteed to be stable, and therefore their hashes +can change over time. Such patches should not be downloaded, and +instead be added locally to the package folder. + +If the .hash file is missing, then no check is done at all. + +17.5. Infrastructure for packages with specific build systems + +By packages with specific build systems we mean all the packages +whose build system is not one of the standard ones, such as autotools +or CMake. This typically includes packages whose build system is +based on hand-written Makefiles or shell scripts. + +17.5.1. generic-package tutorial + +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_LICENSE = GPL-3.0+ +11: LIBFOO_LICENSE_FILES = COPYING +12: LIBFOO_INSTALL_STAGING = YES +13: LIBFOO_CONFIG_SCRIPTS = libfoo-config +14: LIBFOO_DEPENDENCIES = host-libaaa libbbb +15: +16: define LIBFOO_BUILD_CMDS +17: $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +18: endef +19: +20: define LIBFOO_INSTALL_STAGING_CMDS +21: $(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a +22: $(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h +23: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib +24: endef +25: +26: define LIBFOO_INSTALL_TARGET_CMDS +27: $(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib +28: $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d +29: endef +30: +31: define LIBFOO_USERS +32: foo -1 libfoo -1 * - - - LibFoo daemon +33: endef +34: +35: define LIBFOO_DEVICES +36: /dev/foo c 666 0 0 42 0 - - - +37: endef +38: +39: define LIBFOO_PERMISSIONS +40: /bin/foo f 4755 foo libfoo - - - - - +41: endef +42: +43: $(eval $(generic-package)) + +The Makefile begins on line 7 to 11 with metadata information: the +version of the package (LIBFOO_VERSION), the name of the tarball +containing the package (LIBFOO_SOURCE) (xz-ed tarball recommended) +the Internet location at which the tarball can be downloaded from +(LIBFOO_SITE), the license (LIBFOO_LICENSE) and file with the license +text (LIBFOO_LICENSE_FILES). All variables must start with the same +prefix, LIBFOO_ in this case. This prefix is always the uppercased +version of the package name (see below to understand where the +package name is defined). + +On line 12, we specify that this package wants to install something +to the staging space. This is often needed for libraries, since they +must install header files and other development files in the staging +space. This will ensure that the commands listed in the +LIBFOO_INSTALL_STAGING_CMDS variable will be executed. + +On line 13, we specify that there is some fixing to be done to some +of the libfoo-config files that were installed during +LIBFOO_INSTALL_STAGING_CMDS phase. These *-config files are +executable shell script files that are located in $(STAGING_DIR)/usr/ +bin directory and are executed by other 3rd party packages to find +out the location and the linking flags of this particular package. + +The problem is that all these *-config files by default give wrong, +host system linking flags that are unsuitable for cross-compiling. + +For example: -I/usr/include instead of -I$(STAGING_DIR)/usr/include +or: -L/usr/lib instead of -L$(STAGING_DIR)/usr/lib + +So some sed magic is done to these scripts to make them give correct +flags. The argument to be given to LIBFOO_CONFIG_SCRIPTS is the file +name(s) of the shell script(s) needing fixing. All these names are +relative to $(STAGING_DIR)/usr/bin and if needed multiple names can +be given. + +In addition, the scripts listed in LIBFOO_CONFIG_SCRIPTS are removed +from $(TARGET_DIR)/usr/bin, since they are not needed on the target. + +Example 17.1. Config script: divine package + +Package divine installs shell script $(STAGING_DIR)/usr/bin/ +divine-config. + +So its fixup would be: + +DIVINE_CONFIG_SCRIPTS = divine-config + + +Example 17.2. Config script: imagemagick package: + +Package imagemagick installs the following scripts: $(STAGING_DIR)/ +usr/bin/{Magick,Magick++,MagickCore,MagickWand,Wand}-config + +So it’s fixup would be: + +IMAGEMAGICK_CONFIG_SCRIPTS = \ + Magick-config Magick++-config \ + MagickCore-config MagickWand-config Wand-config + + +On line 14, we specify the list of dependencies this package relies +on. These dependencies are listed in terms of lower-case package +names, which can be packages for the target (without the host- +prefix) or packages for the host (with the host-) prefix). Buildroot +will ensure that all these packages are built and installed before +the current package starts its configuration. + +The rest of the Makefile, lines 16..29, defines what should be done +at the different steps of the package configuration, compilation and +installation. LIBFOO_BUILD_CMDS tells what steps should be performed +to build the package. LIBFOO_INSTALL_STAGING_CMDS tells what steps +should be performed to install the package in the staging space. +LIBFOO_INSTALL_TARGET_CMDS tells what steps should be performed to +install the package in the target space. + +All these steps rely on the $(@D) variable, which contains the +directory where the source code of the package has been extracted. + +On lines 31..33, we define a user that is used by this package (e.g. +to run a daemon as non-root) (LIBFOO_USERS). + +On line 35..37, we define a device-node file used by this package +(LIBFOO_DEVICES). + +On line 39..41, we define the permissions to set to specific files +installed by this package (LIBFOO_PERMISSIONS). + +Finally, on line 43, we call the generic-package function, which +generates, according to the variables defined previously, all the +Makefile code necessary to make your package working. + +17.5.2. generic-package reference + +There are two variants of the generic target. The generic-package +macro is used for packages to be cross-compiled for the target. The +host-generic-package macro is used for host packages, natively +compiled for the host. It is possible to call both of them in a +single .mk file: once to create the rules to generate a target +package and once to create the rules to generate a host package: + +$(eval $(generic-package)) +$(eval $(host-generic-package)) + +This might be useful if the compilation of the target package +requires some tools to be installed on the host. If the package name +is libfoo, then the name of the package for the target is also +libfoo, while the name of the package for the host is host-libfoo. +These names should be used in the DEPENDENCIES variables of other +packages, if they depend on libfoo or host-libfoo. + +The call to the generic-package and/or host-generic-package macro +must be at the end of the .mk file, after all variable definitions. +The call to host-generic-package must be after the call to +generic-package, if any. + +For the target package, the generic-package uses the variables +defined by the .mk file and prefixed by the uppercased package name: +LIBFOO_*. host-generic-package uses the HOST_LIBFOO_* variables. For +some variables, if the HOST_LIBFOO_ prefixed variable doesn’t exist, +the package infrastructure uses the corresponding variable prefixed +by LIBFOO_. This is done for variables that are likely to have the +same value for both the target and host packages. See below for +details. + +The list of variables that can be set in a .mk file to give metadata +information is (assuming the package name is libfoo) : + + * LIBFOO_VERSION, mandatory, must contain the version of the + package. Note that if HOST_LIBFOO_VERSION doesn’t exist, it is + assumed to be the same as LIBFOO_VERSION. It can also be a + revision number or a tag for packages that are fetched directly + from their version control system. Examples: + + + a version for a release tarball: LIBFOO_VERSION = 0.1.2 + + a sha1 for a git tree: LIBFOO_VERSION = + cb9d6aa9429e838f0e54faa3d455bcbab5eef057 + + a tag for a git tree LIBFOO_VERSION = v0.1.2 + + Note: Using a branch name as FOO_VERSION is not supported, + because it does not and can not work as people would expect + it should: + + 1. due to local caching, Buildroot will not re-fetch the + repository, so people who expect to be able to follow the + remote repository would be quite surprised and + disappointed; + 2. because two builds can never be perfectly simultaneous, + and because the remote repository may get new commits on + the branch anytime, two users, using the same Buildroot + tree and building the same configuration, may get + different source, thus rendering the build non + reproducible, and people would be quite surprised and + disappointed. + * LIBFOO_SOURCE may contain the name of the tarball of the package, + which Buildroot will use to download the tarball from + LIBFOO_SITE. If HOST_LIBFOO_SOURCE is not specified, it defaults + to LIBFOO_SOURCE. If none are specified, then the value is + assumed to be libfoo-$(LIBFOO_VERSION).tar.gz. Example: + LIBFOO_SOURCE = foobar-$(LIBFOO_VERSION).tar.bz2 + * LIBFOO_PATCH may contain a space-separated list of patch file + names, that Buildroot will download and apply to the package + source code. If an entry contains ://, then Buildroot will assume + it is a full URL and download the patch from this location. + Otherwise, Buildroot will assume that the patch should be + downloaded from LIBFOO_SITE. If HOST_LIBFOO_PATCH is not + specified, it defaults to LIBFOO_PATCH. Note that patches that + are included in Buildroot itself use a different mechanism: all + files of the form *.patch present in the package directory inside + Buildroot will be applied to the package after extraction (see + patching a package). Finally, patches listed in the LIBFOO_PATCH + variable are applied before the patches stored in the Buildroot + package directory. + * LIBFOO_SITE provides the location of the package, which can be a + URL or a local filesystem path. HTTP, FTP and SCP are supported + URL types for retrieving package tarballs. In these cases don’t + include a trailing slash: it will be added by Buildroot between + the directory and the filename as appropriate. Git, Subversion, + Mercurial, and Bazaar are supported URL types for retrieving + packages directly from source code management systems. There is a + helper function to make it easier to download source tarballs + from GitHub (refer to Section 17.24.4, “How to add a package from + GitHub” for details). A filesystem path may be used to specify + either a tarball or a directory containing the package source + code. See LIBFOO_SITE_METHOD below for more details on how + retrieval works. Note that SCP URLs should be of the form scp:// + [user@]host:filepath, and that filepath is relative to the user’s + home directory, so you may want to prepend the path with a slash + for absolute paths: scp://[user@]host:/absolutepath. If + HOST_LIBFOO_SITE is not specified, it defaults to LIBFOO_SITE. + Examples: LIBFOO_SITE=http://www.libfoosoftware.org/libfoo + LIBFOO_SITE=http://svn.xiph.org/trunk/Tremor LIBFOO_SITE=/opt/ + software/libfoo.tar.gz LIBFOO_SITE=$(TOPDIR)/../src/libfoo + * LIBFOO_DL_OPTS is a space-separated list of additional options to + pass to the downloader. Useful for retrieving documents with + server-side checking for user logins and passwords, or to use a + proxy. All download methods valid for LIBFOO_SITE_METHOD are + supported; valid options depend on the download method (consult + the man page for the respective download utilities). + * LIBFOO_EXTRA_DOWNLOADS is a space-separated list of additional + files that Buildroot should download. If an entry contains :// + then Buildroot will assume it is a complete URL and will download + the file using this URL. Otherwise, Buildroot will assume the + file to be downloaded is located at LIBFOO_SITE. Buildroot will + not do anything with those additional files, except download + them: it will be up to the package recipe to use them from $ + (LIBFOO_DL_DIR). + * LIBFOO_SITE_METHOD determines the method used to fetch or copy + the package source code. In many cases, Buildroot guesses the + method from the contents of LIBFOO_SITE and setting + LIBFOO_SITE_METHOD is unnecessary. When HOST_LIBFOO_SITE_METHOD + is not specified, it defaults to the value of LIBFOO_SITE_METHOD. + The possible values of LIBFOO_SITE_METHOD are: + + + wget for normal FTP/HTTP downloads of tarballs. Used by + default when LIBFOO_SITE begins with http://, https:// or + ftp://. + + scp for downloads of tarballs over SSH with scp. Used by + default when LIBFOO_SITE begins with scp://. + + svn for retrieving source code from a Subversion repository. + Used by default when LIBFOO_SITE begins with svn://. When a + http:// Subversion repository URL is specified in + LIBFOO_SITE, one must specify LIBFOO_SITE_METHOD=svn. + Buildroot performs a checkout which is preserved as a tarball + in the download cache; subsequent builds use the tarball + instead of performing another checkout. + + cvs for retrieving source code from a CVS repository. Used by + default when LIBFOO_SITE begins with cvs://. The downloaded + source code is cached as with the svn method. Anonymous + pserver mode is assumed otherwise explicitly defined on + LIBFOO_SITE. Both LIBFOO_SITE=cvs://libfoo.net:/cvsroot/ + libfoo and LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo + are accepted, on the former anonymous pserver access mode is + assumed. LIBFOO_SITE must contain the source URL as well as + the remote repository directory. The module is the package + name. LIBFOO_VERSION is mandatory and must be a tag, a + branch, or a date (e.g. "2014-10-20", "2014-10-20 13:45", + "2014-10-20 13:45+01" see "man cvs" for further details). + + git for retrieving source code from a Git repository. Used by + default when LIBFOO_SITE begins with git://. The downloaded + source code is cached as with the svn method. + + hg for retrieving source code from a Mercurial repository. + One must specify LIBFOO_SITE_METHOD=hg when LIBFOO_SITE + contains a Mercurial repository URL. The downloaded source + code is cached as with the svn method. + + bzr for retrieving source code from a Bazaar repository. Used + by default when LIBFOO_SITE begins with bzr://. The + downloaded source code is cached as with the svn method. + + file for a local tarball. One should use this when + LIBFOO_SITE specifies a package tarball as a local filename. + Useful for software that isn’t available publicly or in + version control. + + local for a local source code directory. One should use this + when LIBFOO_SITE specifies a local directory path containing + the package source code. Buildroot copies the contents of the + source directory into the package’s build directory. Note + that for local packages, no patches are applied. If you need + to still patch the source code, use LIBFOO_POST_RSYNC_HOOKS, + see Section 17.22.1, “Using the POST_RSYNC hook”. + * LIBFOO_GIT_SUBMODULES can be set to YES to create an archive with + the git submodules in the repository. This is only available for + packages downloaded with git (i.e. when LIBFOO_SITE_METHOD=git). + Note that we try not to use such git submodules when they contain + bundled libraries, in which case we prefer to use those libraries + from their own package. + * LIBFOO_STRIP_COMPONENTS is the number of leading components + (directories) that tar must strip from file names on extraction. + The tarball for most packages has one leading component named " + -", thus Buildroot passes + --strip-components=1 to tar to remove it. For non-standard + packages that don’t have this component, or that have more than + one leading component to strip, set this variable with the value + to be passed to tar. Default: 1. + * LIBFOO_EXCLUDES is a space-separated list of patterns to exclude + when extracting the archive. Each item from that list is passed + as a tar’s --exclude option. By default, empty. + * LIBFOO_DEPENDENCIES lists the dependencies (in terms of package + name) that are required for the current target package to + compile. These dependencies are guaranteed to be compiled and + installed before the configuration of the current package starts. + However, modifications to configuration of these dependencies + will not force a rebuild of the current package. In a similar + way, HOST_LIBFOO_DEPENDENCIES lists the dependencies for the + current host package. + * LIBFOO_EXTRACT_DEPENDENCIES lists the dependencies (in terms of + package name) that are required for the current target package to + be extracted. These dependencies are guaranteed to be compiled + and installed before the extract step of the current package + starts. This is only used internally by the package + infrastructure, and should typically not be used directly by + packages. + * LIBFOO_PATCH_DEPENDENCIES lists the dependencies (in terms of + package name) that are required for the current package to be + patched. These dependencies are guaranteed to be extracted and + patched (but not necessarily built) before the current package is + patched. In a similar way, HOST_LIBFOO_PATCH_DEPENDENCIES lists + the dependencies for the current host package. This is seldom + used; usually, LIBFOO_DEPENDENCIES is what you really want to + use. + * LIBFOO_PROVIDES lists all the virtual packages libfoo is an + implementation of. See Section 17.11, “Infrastructure for virtual + packages”. + * LIBFOO_INSTALL_STAGING can be set to YES or NO (default). If set + to YES, then the commands in the LIBFOO_INSTALL_STAGING_CMDS + variables are executed to install the package into the staging + directory. + * LIBFOO_INSTALL_TARGET can be set to YES (default) or NO. If set + to YES, then the commands in the LIBFOO_INSTALL_TARGET_CMDS + variables are executed to install the package into the target + directory. + * LIBFOO_INSTALL_IMAGES can be set to YES or NO (default). If set + to YES, then the commands in the LIBFOO_INSTALL_IMAGES_CMDS + variable are executed to install the package into the images + directory. + * LIBFOO_CONFIG_SCRIPTS lists the names of the files in $ + (STAGING_DIR)/usr/bin that need some special fixing to make them + cross-compiling friendly. Multiple file names separated by space + can be given and all are relative to $(STAGING_DIR)/usr/bin. The + files listed in LIBFOO_CONFIG_SCRIPTS are also removed from $ + (TARGET_DIR)/usr/bin since they are not needed on the target. + * LIBFOO_DEVICES lists the device files to be created by Buildroot + when using the static device table. The syntax to use is the + makedevs one. You can find some documentation for this syntax in + the Chapter 24, Makedev syntax documentation. This variable is + optional. + * LIBFOO_PERMISSIONS lists the changes of permissions to be done at + the end of the build process. The syntax is once again the + makedevs one. You can find some documentation for this syntax in + the Chapter 24, Makedev syntax documentation. This variable is + optional. + * LIBFOO_USERS lists the users to create for this package, if it + installs a program you want to run as a specific user (e.g. as a + daemon, or as a cron-job). The syntax is similar in spirit to the + makedevs one, and is described in the Chapter 25, Makeusers + syntax documentation. This variable is optional. + * LIBFOO_LICENSE defines the license (or licenses) under which the + package is released. This name will appear in the manifest file + produced by make legal-info. If the license appears in the SPDX + License List [https://spdx.org/licenses/], use the SPDX short + identifier to make the manifest file uniform. Otherwise, describe + the license in a precise and concise way, avoiding ambiguous + names such as BSD which actually name a family of licenses. This + variable is optional. If it is not defined, unknown will appear + in the license field of the manifest file for this package. The + expected format for this variable must comply with the following + rules: + + + If different parts of the package are released under + different licenses, then comma separate licenses (e.g. + LIBFOO_LICENSE = GPL-2.0+, LGPL-2.1+). If there is clear + distinction between which component is licensed under what + license, then annotate the license with that component, + between parenthesis (e.g. LIBFOO_LICENSE = GPL-2.0+ + (programs), LGPL-2.1+ (libraries)). + + If some licenses are conditioned on a sub-option being + enabled, append the conditional licenses with a comma (e.g.: + FOO_LICENSE += , GPL-2.0+ (programs)); the infrastructure + will internally remove the space before the comma. + + If the package is dual licensed, then separate licenses with + the or keyword (e.g. LIBFOO_LICENSE = AFL-2.1 or GPL-2.0+). + * LIBFOO_LICENSE_FILES is a space-separated list of files in the + package tarball that contain the license(s) under which the + package is released. make legal-info copies all of these files in + the legal-info directory. See Chapter 12, Legal notice and + licensing for more information. This variable is optional. If it + is not defined, a warning will be produced to let you know, and + not saved will appear in the license files field of the manifest + file for this package. + * LIBFOO_ACTUAL_SOURCE_TARBALL only applies to packages whose + LIBFOO_SITE / LIBFOO_SOURCE pair points to an archive that does + not actually contain source code, but binary code. This a very + uncommon case, only known to apply to external toolchains which + come already compiled, although theoretically it might apply to + other packages. In such cases a separate tarball is usually + available with the actual source code. Set + LIBFOO_ACTUAL_SOURCE_TARBALL to the name of the actual source + code archive and Buildroot will download it and use it when you + run make legal-info to collect legally-relevant material. Note + this file will not be downloaded during regular builds nor by + make source. + * LIBFOO_ACTUAL_SOURCE_SITE provides the location of the actual + source tarball. The default value is LIBFOO_SITE, so you don’t + need to set this variable if the binary and source archives are + hosted on the same directory. If LIBFOO_ACTUAL_SOURCE_TARBALL is + not set, it doesn’t make sense to define + LIBFOO_ACTUAL_SOURCE_SITE. + * LIBFOO_REDISTRIBUTE can be set to YES (default) or NO to indicate + if the package source code is allowed to be redistributed. Set it + to NO for non-opensource packages: Buildroot will not save the + source code for this package when collecting the legal-info. + * LIBFOO_FLAT_STACKSIZE defines the stack size of an application + built into the FLAT binary format. The application stack size on + the NOMMU architecture processors can’t be enlarged at run time. + The default stack size for the FLAT binary format is only 4k + bytes. If the application consumes more stack, append the + required number here. + * LIBFOO_BIN_ARCH_EXCLUDE is a space-separated list of paths + (relative to the target directory) to ignore when checking that + the package installs correctly cross-compiled binaries. You + seldom need to set this variable, unless the package installs + binary blobs outside the default locations, /lib/firmware, /usr/ + lib/firmware, /lib/modules, /usr/lib/modules, and /usr/share, + which are automatically excluded. + * LIBFOO_IGNORE_CVES is a space-separated list of CVEs that tells + Buildroot CVE tracking tools which CVEs should be ignored for + this package. This is typically used when the CVE is fixed by a + patch in the package, or when the CVE for some reason does not + affect the Buildroot package. A Makefile comment must always + precede the addition of a CVE to this variable. Example: + +# 0001-fix-cve-2020-12345.patch +LIBFOO_IGNORE_CVES += CVE-2020-12345 +# only when built with libbaz, which Buildroot doesn't support +LIBFOO_IGNORE_CVES += CVE-2020-54321 + +The recommended way to define these variables is to use the following +syntax: + +LIBFOO_VERSION = 2.32 + +Now, the variables that define what should be performed at the +different steps of the build process. + + * LIBFOO_EXTRACT_CMDS lists the actions to be performed to extract + the package. This is generally not needed as tarballs are + automatically handled by Buildroot. However, if the package uses + a non-standard archive format, such as a ZIP or RAR file, or has + a tarball with a non-standard organization, this variable allows + to override the package infrastructure default behavior. + * LIBFOO_CONFIGURE_CMDS lists the actions to be performed to + configure the package before its compilation. + * LIBFOO_BUILD_CMDS lists the actions to be performed to compile + the package. + * HOST_LIBFOO_INSTALL_CMDS lists the actions to be performed to + install the package, when the package is a host package. The + package must install its files to the directory given by $ + (HOST_DIR). All files, including development files such as + headers should be installed, since other packages might be + compiled on top of this package. + * LIBFOO_INSTALL_TARGET_CMDS lists the actions to be performed to + install the package to the target directory, when the package is + a target package. The package must install its files to the + directory given by $(TARGET_DIR). Only the files required for + execution of the package have to be installed. Header files, + static libraries and documentation will be removed again when the + target filesystem is finalized. + * LIBFOO_INSTALL_STAGING_CMDS lists the actions to be performed to + install the package to the staging directory, when the package is + a target package. The package must install its files to the + directory given by $(STAGING_DIR). All development files should + be installed, since they might be needed to compile other + packages. + * LIBFOO_INSTALL_IMAGES_CMDS lists the actions to be performed to + install the package to the images directory, when the package is + a target package. The package must install its files to the + directory given by $(BINARIES_DIR). Only files that are binary + images (aka images) that do not belong in the TARGET_DIR but are + necessary for booting the board should be placed here. For + example, a package should utilize this step if it has binaries + which would be similar to the kernel image, bootloader or root + filesystem images. + * LIBFOO_INSTALL_INIT_SYSV, LIBFOO_INSTALL_INIT_OPENRC and + LIBFOO_INSTALL_INIT_SYSTEMD list the actions to install init + scripts either for the systemV-like init systems (busybox, + sysvinit, etc.), openrc or for the systemd units. These commands + will be run only when the relevant init system is installed (i.e. + if systemd is selected as the init system in the configuration, + only LIBFOO_INSTALL_INIT_SYSTEMD will be run). The only exception + is when openrc is chosen as init system and + LIBFOO_INSTALL_INIT_OPENRC has not been set, in such situation + LIBFOO_INSTALL_INIT_SYSV will be called, since openrc supports + sysv init scripts. When systemd is used as the init system, + buildroot will automatically enable all services using the + systemctl preset-all command in the final phase of image + building. You can add preset files to prevent a particular unit + from being automatically enabled by buildroot. + * LIBFOO_HELP_CMDS lists the actions to print the package help, + which is included to the main make help output. These commands + can print anything in any format. This is seldom used, as + packages rarely have custom rules. Do not use this variable, + unless you really know that you need to print help. + * LIBFOO_LINUX_CONFIG_FIXUPS lists the Linux kernel configuration + options that are needed to build and use this package, and + without which the package is fundamentally broken. This shall be + a set of calls to one of the kconfig tweaking option: + KCONFIG_ENABLE_OPT, KCONFIG_DISABLE_OPT, or KCONFIG_SET_OPT. This + is seldom used, as package usually have no strict requirements on + the kernel options. + +The preferred way to define these variables is: + +define LIBFOO_CONFIGURE_CMDS + action 1 + action 2 + action 3 +endef + +In the action definitions, you can use the following variables: + + * $(LIBFOO_PKGDIR) contains the path to the directory containing + the libfoo.mk and Config.in files. This variable is useful when + it is necessary to install a file bundled in Buildroot, like a + runtime configuration file, a splashscreen image… + * $(@D), which contains the directory in which the package source + code has been uncompressed. + * $(LIBFOO_DL_DIR) contains the path to the directory where all the + downloads made by Buildroot for libfoo are stored in. + * $(TARGET_CC), $(TARGET_LD), etc. to get the target + cross-compilation utilities + * $(TARGET_CROSS) to get the cross-compilation toolchain prefix + * Of course the $(HOST_DIR), $(STAGING_DIR) and $(TARGET_DIR) + variables to install the packages properly. Those variables point + to the global host, staging and target directories, unless + per-package directory support is used, in which case they point + to the current package host, staging and target directories. In + both cases, it doesn’t make any difference from the package point + of view: it should simply use HOST_DIR, STAGING_DIR and + TARGET_DIR. See Section 8.11, “Top-level parallel build” for more + details about per-package directory support. + +Finally, you can also use hooks. See Section 17.22, “Hooks available +in the various build steps” for more information. + +17.6. Infrastructure for autotools-based packages + +17.6.1. autotools-package tutorial + +First, let’s see how to write a .mk file for an autotools-based +package, with an example : + +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_INSTALL_STAGING = YES +11: LIBFOO_INSTALL_TARGET = NO +12: LIBFOO_CONF_OPTS = --disable-shared +13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf +14: +15: $(eval $(autotools-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in output/staging/ is the +directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed +in the staging directory: their development files are needed to +compile other libraries or applications depending on them. Also by +default, when staging installation is enabled, packages are installed +in this location using the make install command. + +On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they +will not be used at runtime. By default, target installation is +enabled; setting this variable to NO is almost never needed. Also by +default, packages are installed in this location using the make +install command. + +On line 12, we tell Buildroot to pass a custom configure option, that +will be passed to the ./configure script before configuring and +building the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line line 15, we invoke the autotools-package macro that +generates all the Makefile rules that actually allows the package to +be built. + +17.6.2. autotools-package reference + +The main macro of the autotools package infrastructure is +autotools-package. It is similar to the generic-package macro. The +ability to have target and host packages is also available, with the +host-autotools-package macro. + +Just like the generic infrastructure, the autotools infrastructure +works by defining a number of variables before calling the +autotools-package macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the autotools +infrastructure: LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, +LIBFOO_SITE, LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, +LIBFOO_INSTALL_STAGING, LIBFOO_INSTALL_TARGET. + +A few additional variables, specific to the autotools infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them. + + * LIBFOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the configure script. This is useful, if + for example, the main configure script is not at the root of the + tree extracted by the tarball. If HOST_LIBFOO_SUBDIR is not + specified, it defaults to LIBFOO_SUBDIR. + * LIBFOO_CONF_ENV, to specify additional environment variables to + pass to the configure script. By default, empty. + * LIBFOO_CONF_OPTS, to specify additional configure options to pass + to the configure script. By default, empty. + * LIBFOO_MAKE, to specify an alternate make command. This is + typically useful when parallel make is enabled in the + configuration (using BR2_JLEVEL) but that this feature should be + disabled for the given package, for one reason or another. By + default, set to $(MAKE). If parallel building is not supported by + the package, then it should be set to LIBFOO_MAKE=$(MAKE1). + * LIBFOO_MAKE_ENV, to specify additional environment variables to + pass to make in the build step. These are passed before the make + command. By default, empty. + * LIBFOO_MAKE_OPTS, to specify additional variables to pass to make + in the build step. These are passed after the make command. By + default, empty. + * LIBFOO_AUTORECONF, tells whether the package should be + autoreconfigured or not (i.e. if the configure script and + Makefile.in files should be re-generated by re-running autoconf, + automake, libtool, etc.). Valid values are YES and NO. By + default, the value is NO + * LIBFOO_AUTORECONF_ENV, to specify additional environment + variables to pass to the autoreconf program if LIBFOO_AUTORECONF= + YES. These are passed in the environment of the autoreconf + command. By default, empty. + * LIBFOO_AUTORECONF_OPTS to specify additional options passed to + the autoreconf program if LIBFOO_AUTORECONF=YES. By default, + empty. + * LIBFOO_GETTEXTIZE, tells whether the package should be + gettextized or not (i.e. if the package uses a different gettext + version than Buildroot provides, and it is needed to run + gettextize.) Only valid when LIBFOO_AUTORECONF=YES. Valid values + are YES and NO. The default is NO. + * LIBFOO_GETTEXTIZE_OPTS, to specify additional options passed to + the gettextize program, if LIBFOO_GETTEXTIZE=YES. You may use + that if, for example, the .po files are not located in the + standard place (i.e. in po/ at the root of the package.) By + default, -f. + * LIBFOO_LIBTOOL_PATCH tells whether the Buildroot patch to fix + libtool cross-compilation issues should be applied or not. Valid + values are YES and NO. By default, the value is YES + * LIBFOO_INSTALL_STAGING_OPTS contains the make options used to + install the package to the staging directory. By default, the + value is DESTDIR=$(STAGING_DIR) install, which is correct for + most autotools packages. It is still possible to override it. + * LIBFOO_INSTALL_TARGET_OPTS contains the make options used to + install the package to the target directory. By default, the + value is DESTDIR=$(TARGET_DIR) install. The default value is + correct for most autotools packages, but it is still possible to + override it if needed. + +With the autotools infrastructure, all the steps required to build +and install the packages are already defined, and they generally work +well for most autotools-based packages. However, when required, it is +still possible to customize what is done in any particular step: + + * By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the + various build steps” for details. + * By overriding one of the steps. For example, even if the + autotools infrastructure is used, if the package .mk file defines + its own LIBFOO_CONFIGURE_CMDS variable, it will be used instead + of the default autotools one. However, using this method should + be restricted to very specific cases. Do not use it in the + general case. + +17.7. Infrastructure for CMake-based packages + +17.7.1. cmake-package tutorial + +First, let’s see how to write a .mk file for a CMake-based package, +with an example : + +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_INSTALL_STAGING = YES +11: LIBFOO_INSTALL_TARGET = NO +12: LIBFOO_CONF_OPTS = -DBUILD_DEMOS=ON +13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf +14: +15: $(eval $(cmake-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot to install the package to the staging +directory. The staging directory, located in output/staging/ is the +directory where all the packages are installed, including their +development files, etc. By default, packages are not installed to the +staging directory, since usually, only libraries need to be installed +in the staging directory: their development files are needed to +compile other libraries or applications depending on them. Also by +default, when staging installation is enabled, packages are installed +in this location using the make install command. + +On line 11, we tell Buildroot to not install the package to the +target directory. This directory contains what will become the root +filesystem running on the target. For purely static libraries, it is +not necessary to install them in the target directory because they +will not be used at runtime. By default, target installation is +enabled; setting this variable to NO is almost never needed. Also by +default, packages are installed in this location using the make +install command. + +On line 12, we tell Buildroot to pass custom options to CMake when it +is configuring the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line line 15, we invoke the cmake-package macro that +generates all the Makefile rules that actually allows the package to +be built. + +17.7.2. cmake-package reference + +The main macro of the CMake package infrastructure is cmake-package. +It is similar to the generic-package macro. The ability to have +target and host packages is also available, with the +host-cmake-package macro. + +Just like the generic infrastructure, the CMake infrastructure works +by defining a number of variables before calling the cmake-package +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the CMake infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET. + +A few additional variables, specific to the CMake infrastructure, can +also be defined. Many of them are only useful in very specific cases, +typical packages will therefore only use a few of them. + + * LIBFOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main CMakeLists.txt file. This is + useful, if for example, the main CMakeLists.txt file is not at + the root of the tree extracted by the tarball. If + HOST_LIBFOO_SUBDIR is not specified, it defaults to + LIBFOO_SUBDIR. + * LIBFOO_CONF_ENV, to specify additional environment variables to + pass to CMake. By default, empty. + * LIBFOO_CONF_OPTS, to specify additional configure options to pass + to CMake. By default, empty. A number of common CMake options are + set by the cmake-package infrastructure; so it is normally not + necessary to set them in the package’s *.mk file unless you want + to override them: + + + CMAKE_BUILD_TYPE is driven by BR2_ENABLE_DEBUG; + + CMAKE_INSTALL_PREFIX; + + BUILD_SHARED_LIBS is driven by BR2_STATIC_LIBS; + + BUILD_DOC, BUILD_DOCS are disabled; + + BUILD_EXAMPLE, BUILD_EXAMPLES are disabled; + + BUILD_TEST, BUILD_TESTS, BUILD_TESTING are disabled. + * LIBFOO_SUPPORTS_IN_SOURCE_BUILD = NO should be set when the + package cannot be built inside the source tree but needs a + separate build directory. + * LIBFOO_MAKE, to specify an alternate make command. This is + typically useful when parallel make is enabled in the + configuration (using BR2_JLEVEL) but that this feature should be + disabled for the given package, for one reason or another. By + default, set to $(MAKE). If parallel building is not supported by + the package, then it should be set to LIBFOO_MAKE=$(MAKE1). + * LIBFOO_MAKE_ENV, to specify additional environment variables to + pass to make in the build step. These are passed before the make + command. By default, empty. + * LIBFOO_MAKE_OPTS, to specify additional variables to pass to make + in the build step. These are passed after the make command. By + default, empty. + * LIBFOO_INSTALL_STAGING_OPTS contains the make options used to + install the package to the staging directory. By default, the + value is DESTDIR=$(STAGING_DIR) install, which is correct for + most CMake packages. It is still possible to override it. + * LIBFOO_INSTALL_TARGET_OPTS contains the make options used to + install the package to the target directory. By default, the + value is DESTDIR=$(TARGET_DIR) install. The default value is + correct for most CMake packages, but it is still possible to + override it if needed. + +With the CMake infrastructure, all the steps required to build and +install the packages are already defined, and they generally work +well for most CMake-based packages. However, when required, it is +still possible to customize what is done in any particular step: + + * By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the + various build steps” for details. + * By overriding one of the steps. For example, even if the CMake + infrastructure is used, if the package .mk file defines its own + LIBFOO_CONFIGURE_CMDS variable, it will be used instead of the + default CMake one. However, using this method should be + restricted to very specific cases. Do not use it in the general + case. + +17.8. Infrastructure for Python packages + +This infrastructure applies to Python packages that use the standard +Python setuptools mechanism as their build system, generally +recognizable by the usage of a setup.py script. + +17.8.1. python-package tutorial + +First, let’s see how to write a .mk file for a Python package, with +an example : + +01: ################################################################################ +02: # +03: # python-foo +04: # +05: ################################################################################ +06: +07: PYTHON_FOO_VERSION = 1.0 +08: PYTHON_FOO_SOURCE = python-foo-$(PYTHON_FOO_VERSION).tar.xz +09: PYTHON_FOO_SITE = http://www.foosoftware.org/download +10: PYTHON_FOO_LICENSE = BSD-3-Clause +11: PYTHON_FOO_LICENSE_FILES = LICENSE +12: PYTHON_FOO_ENV = SOME_VAR=1 +13: PYTHON_FOO_DEPENDENCIES = libmad +14: PYTHON_FOO_SETUP_TYPE = distutils +15: +16: $(eval $(python-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10 and 11, we give licensing details about the package (its +license on line 10, and the file containing the license text on line +11). + +On line 12, we tell Buildroot to pass custom options to the Python +setup.py script when it is configuring the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 14, we declare the specific Python build system being used. +In this case the distutils Python build system is used. The two +supported ones are distutils and setuptools. + +Finally, on line 16, we invoke the python-package macro that +generates all the Makefile rules that actually allow the package to +be built. + +17.8.2. python-package reference + +As a policy, packages that merely provide Python modules should all +be named python- in Buildroot. Other packages that use the +Python build system, but are not Python modules, can freely choose +their name (existing examples in Buildroot are scons and supervisor). + +Packages that are only compatible with one version of Python (as in: +Python 2 or Python 3) should depend on that version explicitely in +their Config.in file (BR2_PACKAGE_PYTHON for Python 2, +BR2_PACKAGE_PYTHON3 for Python 3). Packages that are compatible with +both versions should not explicitely depend on them in their +Config.in file, since that condition is already expressed for the +whole "External python modules" menu. + +The main macro of the Python package infrastructure is +python-package. It is similar to the generic-package macro. It is +also possible to create Python host packages with the +host-python-package macro. + +Just like the generic infrastructure, the Python infrastructure works +by defining a number of variables before calling the python-package +or host-python-package macros. + +All the package metadata information variables that exist in the +generic package infrastructure also exist in the Python +infrastructure: PYTHON_FOO_VERSION, PYTHON_FOO_SOURCE, +PYTHON_FOO_PATCH, PYTHON_FOO_SITE, PYTHON_FOO_SUBDIR, +PYTHON_FOO_DEPENDENCIES, PYTHON_FOO_LICENSE, +PYTHON_FOO_LICENSE_FILES, PYTHON_FOO_INSTALL_STAGING, etc. + +Note that: + + * It is not necessary to add python or host-python in the + PYTHON_FOO_DEPENDENCIES variable of a package, since these basic + dependencies are automatically added as needed by the Python + package infrastructure. + * Similarly, it is not needed to add host-setuptools to + PYTHON_FOO_DEPENDENCIES for setuptools-based packages, since it’s + automatically added by the Python infrastructure as needed. + +One variable specific to the Python infrastructure is mandatory: + + * PYTHON_FOO_SETUP_TYPE, to define which Python build system is + used by the package. The two supported values are distutils and + setuptools. If you don’t know which one is used in your package, + look at the setup.py file in your package source code, and see + whether it imports things from the distutils module or the + setuptools module. + +A few additional variables, specific to the Python infrastructure, +can optionally be defined, depending on the package’s needs. Many of +them are only useful in very specific cases, typical packages will +therefore only use a few of them, or none. + + * PYTHON_FOO_SUBDIR may contain the name of a subdirectory inside + the package that contains the main setup.py file. This is useful, + if for example, the main setup.py file is not at the root of the + tree extracted by the tarball. If HOST_PYTHON_FOO_SUBDIR is not + specified, it defaults to PYTHON_FOO_SUBDIR. + * PYTHON_FOO_ENV, to specify additional environment variables to + pass to the Python setup.py script (for both the build and + install steps). Note that the infrastructure is automatically + passing several standard variables, defined in + PKG_PYTHON_DISTUTILS_ENV (for distutils target packages), + HOST_PKG_PYTHON_DISTUTILS_ENV (for distutils host packages), + PKG_PYTHON_SETUPTOOLS_ENV (for setuptools target packages) and + HOST_PKG_PYTHON_SETUPTOOLS_ENV (for setuptools host packages). + * PYTHON_FOO_BUILD_OPTS, to specify additional options to pass to + the Python setup.py script during the build step. For target + distutils packages, the PKG_PYTHON_DISTUTILS_BUILD_OPTS options + are already passed automatically by the infrastructure. + * PYTHON_FOO_INSTALL_TARGET_OPTS, PYTHON_FOO_INSTALL_STAGING_OPTS, + HOST_PYTHON_FOO_INSTALL_OPTS to specify additional options to + pass to the Python setup.py script during the target installation + step, the staging installation step or the host installation, + respectively. Note that the infrastructure is automatically + passing some options, defined in + PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS or + PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS (for target distutils + packages), HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS (for host + distutils packages), PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS or + PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS (for target setuptools + packages) and HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS (for host + setuptools packages). + * HOST_PYTHON_FOO_NEEDS_HOST_PYTHON, to define the host python + interpreter. The usage of this variable is limited to host + packages. The two supported value are python2 and python3. It + will ensure the right host python package is available and will + invoke it for the build. If some build steps are overloaded, the + right python interpreter must be explicitly called in the + commands. + +With the Python infrastructure, all the steps required to build and +install the packages are already defined, and they generally work +well for most Python-based packages. However, when required, it is +still possible to customize what is done in any particular step: + + * By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the + various build steps” for details. + * By overriding one of the steps. For example, even if the Python + infrastructure is used, if the package .mk file defines its own + PYTHON_FOO_BUILD_CMDS variable, it will be used instead of the + default Python one. However, using this method should be + restricted to very specific cases. Do not use it in the general + case. + +17.8.3. Generating a python-package from a PyPI repository + +If the Python package for which you would like to create a Buildroot +package is available on PyPI, you may want to use the scanpypi tool +located in utils/ to automate the process. + +You can find the list of existing PyPI packages here [https:// +pypi.python.org]. + +scanpypi requires Python’s setuptools package to be installed on your +host. + +When at the root of your buildroot directory just do : + +utils/scanpypi foo bar -o package + +This will generate packages python-foo and python-bar in the package +folder if they exist on https://pypi.python.org. + +Find the external python modules menu and insert your package inside. +Keep in mind that the items inside a menu should be in alphabetical +order. + +Please keep in mind that you’ll most likely have to manually check +the package for any mistakes as there are things that cannot be +guessed by the generator (e.g. dependencies on any of the python core +modules such as BR2_PACKAGE_PYTHON_ZLIB). Also, please take note that +the license and license files are guessed and must be checked. You +also need to manually add the package to the package/Config.in file. + +If your Buildroot package is not in the official Buildroot tree but +in a br2-external tree, use the -o flag as follows: + +utils/scanpypi foo bar -o other_package_dir + +This will generate packages python-foo and python-bar in the +other_package_directory instead of package. + +Option -h will list the available options: + +utils/scanpypi -h + +17.8.4. python-package CFFI backend + +C Foreign Function Interface for Python (CFFI) provides a convenient +and reliable way to call compiled C code from Python using interface +declarations written in C. Python packages relying on this backend +can be identified by the appearance of a cffi dependency in the +install_requires field of their setup.py file. + +Such a package should: + + * add python-cffi as a runtime dependency in order to install the + compiled C library wrapper on the target. This is achieved by + adding select BR2_PACKAGE_PYTHON_CFFI to the package Config.in. + +config BR2_PACKAGE_PYTHON_FOO + bool "python-foo" + select BR2_PACKAGE_PYTHON_CFFI # runtime + + * add host-python-cffi as a build-time dependency in order to + cross-compile the C wrapper. This is achieved by adding + host-python-cffi to the PYTHON_FOO_DEPENDENCIES variable. + +################################################################################ +# +# python-foo +# +################################################################################ + +... + +PYTHON_FOO_DEPENDENCIES = host-python-cffi + +$(eval $(python-package)) + +17.9. Infrastructure for LuaRocks-based packages + +17.9.1. luarocks-package tutorial + +First, let’s see how to write a .mk file for a LuaRocks-based +package, with an example : + +01: ################################################################################ +02: # +03: # lua-foo +04: # +05: ################################################################################ +06: +07: LUA_FOO_VERSION = 1.0.2-1 +08: LUA_FOO_NAME_UPSTREAM = foo +09: LUA_FOO_DEPENDENCIES = bar +10: +11: LUA_FOO_BUILD_OPTS += BAR_INCDIR=$(STAGING_DIR)/usr/include +12: LUA_FOO_BUILD_OPTS += BAR_LIBDIR=$(STAGING_DIR)/usr/lib +13: LUA_FOO_LICENSE = luaFoo license +14: LUA_FOO_LICENSE_FILES = $(LUA_FOO_SUBDIR)/COPYING +15: +16: $(eval $(luarocks-package)) + +On line 7, we declare the version of the package (the same as in the +rockspec, which is the concatenation of the upstream version and the +rockspec revision, separated by a hyphen -). + +On line 8, we declare that the package is called "foo" on LuaRocks. +In Buildroot, we give Lua-related packages a name that starts with +"lua", so the Buildroot name is different from the upstream name. +LUA_FOO_NAME_UPSTREAM makes the link between the two names. + +On line 9, we declare our dependencies against native libraries, so +that they are built before the build process of our package starts. + +On lines 11-12, we tell Buildroot to pass custom options to LuaRocks +when it is building the package. + +On lines 13-14, we specify the licensing terms for the package. + +Finally, on line 16, we invoke the luarocks-package macro that +generates all the Makefile rules that actually allows the package to +be built. + +Most of these details can be retrieved from the rock and rockspec. +So, this file and the Config.in file can be generated by running the +command luarocks buildroot foo lua-foo in the Buildroot directory. +This command runs a specific Buildroot addon of luarocks that will +automatically generate a Buildroot package. The result must still be +manually inspected and possibly modified. + + * The package/Config.in file has to be updated manually to include + the generated Config.in files. + +17.9.2. luarocks-package reference + +LuaRocks is a deployment and management system for Lua modules, and +supports various build.type: builtin, make and cmake. In the context +of Buildroot, the luarocks-package infrastructure only supports the +builtin mode. LuaRocks packages that use the make or cmake build +mechanisms should instead be packaged using the generic-package and +cmake-package infrastructures in Buildroot, respectively. + +The main macro of the LuaRocks package infrastructure is +luarocks-package: like generic-package it works by defining a number +of variables providing metadata information about the package, and +then calling luarocks-package. + +Just like the generic infrastructure, the LuaRocks infrastructure +works by defining a number of variables before calling the +luarocks-package macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the LuaRocks infrastructure: +LUA_FOO_VERSION, LUA_FOO_SOURCE, LUA_FOO_SITE, LUA_FOO_DEPENDENCIES, +LUA_FOO_LICENSE, LUA_FOO_LICENSE_FILES. + +Two of them are populated by the LuaRocks infrastructure (for the +download step). If your package is not hosted on the LuaRocks mirror +$(BR2_LUAROCKS_MIRROR), you can override them: + + * LUA_FOO_SITE, which defaults to $(BR2_LUAROCKS_MIRROR) + * LUA_FOO_SOURCE, which defaults to $(lowercase + LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).src.rock + +A few additional variables, specific to the LuaRocks infrastructure, +are also defined. They can be overridden in specific cases. + + * LUA_FOO_NAME_UPSTREAM, which defaults to lua-foo, i.e. the + Buildroot package name + * LUA_FOO_ROCKSPEC, which defaults to $(lowercase + LUA_FOO_NAME_UPSTREAM)-$(LUA_FOO_VERSION).rockspec + * LUA_FOO_SUBDIR, which defaults to $(LUA_FOO_NAME_UPSTREAM)-$ + (LUA_FOO_VERSION_WITHOUT_ROCKSPEC_REVISION) + * LUA_FOO_BUILD_OPTS contains additional build options for the + luarocks build call. + +17.10. Infrastructure for Perl/CPAN packages + +17.10.1. perl-package tutorial + +First, let’s see how to write a .mk file for a Perl/CPAN package, +with an example : + +01: ################################################################################ +02: # +03: # perl-foo-bar +04: # +05: ################################################################################ +06: +07: PERL_FOO_BAR_VERSION = 0.02 +08: PERL_FOO_BAR_SOURCE = Foo-Bar-$(PERL_FOO_BAR_VERSION).tar.gz +09: PERL_FOO_BAR_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MO/MONGER +10: PERL_FOO_BAR_DEPENDENCIES = perl-strictures +11: PERL_FOO_BAR_LICENSE = Artistic or GPL-1.0+ +12: PERL_FOO_BAR_LICENSE_FILES = LICENSE +13: PERL_FOO_BAR_DISTNAME = Foo-Bar +14: +15: $(eval $(perl-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball and the location +of the tarball on a CPAN server. Buildroot will automatically +download the tarball from this location. + +On line 10, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 11 and 12, we give licensing details about the package (its +license on line 11, and the file containing the license text on line +12). + +On line 13, the name of the distribution as needed by the script +utils/scancpan (in order to regenerate/upgrade these package files). + +Finally, on line 15, we invoke the perl-package macro that generates +all the Makefile rules that actually allow the package to be built. + +Most of these data can be retrieved from https://metacpan.org/. So, +this file and the Config.in can be generated by running the script +utils/scancpan Foo-Bar in the Buildroot directory (or in a +br2-external tree). This script creates a Config.in file and +foo-bar.mk file for the requested package, and also recursively for +all dependencies specified by CPAN. You should still manually edit +the result. In particular, the following things should be checked. + + * If the perl module links with a shared library that is provided + by another (non-perl) package, this dependency is not added + automatically. It has to be added manually to + PERL_FOO_BAR_DEPENDENCIES. + * The package/Config.in file has to be updated manually to include + the generated Config.in files. As a hint, the scancpan script + prints out the required source "…" statements, sorted + alphabetically. + +17.10.2. perl-package reference + +As a policy, packages that provide Perl/CPAN modules should all be +named perl- in Buildroot. + +This infrastructure handles various Perl build systems : +ExtUtils-MakeMaker (EUMM), Module-Build (MB) and Module-Build-Tiny. +Build.PL is preferred by default when a package provides a +Makefile.PL and a Build.PL. + +The main macro of the Perl/CPAN package infrastructure is +perl-package. It is similar to the generic-package macro. The ability +to have target and host packages is also available, with the +host-perl-package macro. + +Just like the generic infrastructure, the Perl/CPAN infrastructure +works by defining a number of variables before calling the +perl-package macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the Perl/CPAN +infrastructure: PERL_FOO_VERSION, PERL_FOO_SOURCE, PERL_FOO_PATCH, +PERL_FOO_SITE, PERL_FOO_SUBDIR, PERL_FOO_DEPENDENCIES, +PERL_FOO_INSTALL_TARGET. + +Note that setting PERL_FOO_INSTALL_STAGING to YES has no effect +unless a PERL_FOO_INSTALL_STAGING_CMDS variable is defined. The perl +infrastructure doesn’t define these commands since Perl modules +generally don’t need to be installed to the staging directory. + +A few additional variables, specific to the Perl/CPAN infrastructure, +can also be defined. Many of them are only useful in very specific +cases, typical packages will therefore only use a few of them. + + * PERL_FOO_PREFER_INSTALLER/HOST_PERL_FOO_PREFER_INSTALLER, + specifies the preferred installation method. Possible values are + EUMM (for Makefile.PL based installation using + ExtUtils-MakeMaker) and MB (for Build.PL based installation using + Module-Build). This variable is only used when the package + provides both installation methods. + * PERL_FOO_CONF_ENV/HOST_PERL_FOO_CONF_ENV, to specify additional + environment variables to pass to the perl Makefile.PL or perl + Build.PL. By default, empty. + * PERL_FOO_CONF_OPTS/HOST_PERL_FOO_CONF_OPTS, to specify additional + configure options to pass to the perl Makefile.PL or perl + Build.PL. By default, empty. + * PERL_FOO_BUILD_OPTS/HOST_PERL_FOO_BUILD_OPTS, to specify + additional options to pass to make pure_all or perl Build build + in the build step. By default, empty. + * PERL_FOO_INSTALL_TARGET_OPTS, to specify additional options to + pass to make pure_install or perl Build install in the install + step. By default, empty. + * HOST_PERL_FOO_INSTALL_OPTS, to specify additional options to pass + to make pure_install or perl Build install in the install step. + By default, empty. + +17.11. Infrastructure for virtual packages + +In Buildroot, a virtual package is a package whose functionalities +are provided by one or more packages, referred to as providers. The +virtual package management is an extensible mechanism allowing the +user to choose the provider used in the rootfs. + +For example, OpenGL ES is an API for 2D and 3D graphics on embedded +systems. The implementation of this API is different for the +Allwinner Tech Sunxi and the Texas Instruments OMAP35xx platforms. So +libgles will be a virtual package and sunxi-mali and ti-gfx will be +the providers. + +17.11.1. virtual-package tutorial + +In the following example, we will explain how to add a new virtual +package (something-virtual) and a provider for it (some-provider). + +First, let’s create the virtual package. + +17.11.2. Virtual package’s Config.in file + +The Config.in file of virtual package something-virtual should +contain: + +01: config BR2_PACKAGE_HAS_SOMETHING_VIRTUAL +02: bool +03: +04: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL +05: depends on BR2_PACKAGE_HAS_SOMETHING_VIRTUAL +06: string + +In this file, we declare two options, +BR2_PACKAGE_HAS_SOMETHING_VIRTUAL and +BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL, whose values will be used by +the providers. + +17.11.3. Virtual package’s .mk file + +The .mk for the virtual package should just evaluate the +virtual-package macro: + +01: ################################################################################ +02: # +03: # something-virtual +04: # +05: ################################################################################ +06: +07: $(eval $(virtual-package)) + +The ability to have target and host packages is also available, with +the host-virtual-package macro. + +17.11.4. Provider’s Config.in file + +When adding a package as a provider, only the Config.in file requires +some modifications. + +The Config.in file of the package some-provider, which provides the +functionalities of something-virtual, should contain: + +01: config BR2_PACKAGE_SOME_PROVIDER +02: bool "some-provider" +03: select BR2_PACKAGE_HAS_SOMETHING_VIRTUAL +04: help +05: This is a comment that explains what some-provider is. +06: +07: http://foosoftware.org/some-provider/ +08: +09: if BR2_PACKAGE_SOME_PROVIDER +10: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL +11: default "some-provider" +12: endif + +On line 3, we select BR2_PACKAGE_HAS_SOMETHING_VIRTUAL, and on line +11, we set the value of BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL to the +name of the provider, but only if it is selected. + +17.11.5. Provider’s .mk file + +The .mk file should also declare an additional variable +SOME_PROVIDER_PROVIDES to contain the names of all the virtual +packages it is an implementation of: + +01: SOME_PROVIDER_PROVIDES = something-virtual + +Of course, do not forget to add the proper build and runtime +dependencies for this package! + +17.11.6. Notes on depending on a virtual package + +When adding a package that requires a certain FEATURE provided by a +virtual package, you have to use depends on BR2_PACKAGE_HAS_FEATURE, +like so: + +config BR2_PACKAGE_HAS_FEATURE + bool + +config BR2_PACKAGE_FOO + bool "foo" + depends on BR2_PACKAGE_HAS_FEATURE + +17.11.7. Notes on depending on a specific provider + +If your package really requires a specific provider, then you’ll have +to make your package depends on this provider; you can not select a +provider. + +Let’s take an example with two providers for a FEATURE: + +config BR2_PACKAGE_HAS_FEATURE + bool + +config BR2_PACKAGE_FOO + bool "foo" + select BR2_PACKAGE_HAS_FEATURE + +config BR2_PACKAGE_BAR + bool "bar" + select BR2_PACKAGE_HAS_FEATURE + +And you are adding a package that needs FEATURE as provided by foo, +but not as provided by bar. + +If you were to use select BR2_PACKAGE_FOO, then the user would still +be able to select BR2_PACKAGE_BAR in the menuconfig. This would +create a configuration inconsistency, whereby two providers of the +same FEATURE would be enabled at once, one explicitly set by the +user, the other implicitly by your select. + +Instead, you have to use depends on BR2_PACKAGE_FOO, which avoids any +implicit configuration inconsistency. + +17.12. Infrastructure for packages using kconfig for configuration +files + +A popular way for a software package to handle user-specified +configuration is kconfig. Among others, it is used by the Linux +kernel, Busybox, and Buildroot itself. The presence of a .config file +and a menuconfig target are two well-known symptoms of kconfig being +used. + +Buildroot features an infrastructure for packages that use kconfig +for their configuration. This infrastructure provides the necessary +logic to expose the package’s menuconfig target as foo-menuconfig in +Buildroot, and to handle the copying back and forth of the +configuration file in a correct way. + +The kconfig-package infrastructure is based on the generic-package +infrastructure. All variables supported by generic-package are +available in kconfig-package as well. See Section 17.5.2, +“generic-package reference” for more details. + +In order to use the kconfig-package infrastructure for a Buildroot +package, the minimally required lines in the .mk file, in addition to +the variables required by the generic-package infrastructure, are: + +FOO_KCONFIG_FILE = reference-to-source-configuration-file + +$(eval $(kconfig-package)) + +This snippet creates the following make targets: + + * foo-menuconfig, which calls the package’s menuconfig target + * foo-update-config, which copies the configuration back to the + source configuration file. It is not possible to use this target + when fragment files are set. + * foo-update-defconfig, which copies the configuration back to the + source configuration file. The configuration file will only list + the options that differ from the default values. It is not + possible to use this target when fragment files are set. + * foo-diff-config, which outputs the differences between the + current configuration and the one defined in the Buildroot + configuration for this kconfig package. The output is useful to + identify the configuration changes that may have to be propagated + to configuration fragments for example. + +and ensures that the source configuration file is copied to the build +directory at the right moment. + +There are two options to specify a configuration file to use, either +FOO_KCONFIG_FILE (as in the example, above) or FOO_KCONFIG_DEFCONFIG. +It is mandatory to provide either, but not both: + + * FOO_KCONFIG_FILE specifies the path to a defconfig or full-config + file to be used to configure the package. + * FOO_KCONFIG_DEFCONFIG specifies the defconfig make rule to call + to configure the package. + +In addition to these minimally required lines, several optional +variables can be set to suit the needs of the package under +consideration: + + * FOO_KCONFIG_EDITORS: a space-separated list of kconfig editors to + support, for example menuconfig xconfig. By default, menuconfig. + * FOO_KCONFIG_FRAGMENT_FILES: a space-separated list of + configuration fragment files that are merged to the main + configuration file. Fragment files are typically used when there + is a desire to stay in sync with an upstream (def)config file, + with some minor modifications. + * FOO_KCONFIG_OPTS: extra options to pass when calling the kconfig + editors. This may need to include $(FOO_MAKE_OPTS), for example. + By default, empty. + * FOO_KCONFIG_FIXUP_CMDS: a list of shell commands needed to fixup + the configuration file after copying it or running a kconfig + editor. Such commands may be needed to ensure a configuration + consistent with other configuration of Buildroot, for example. By + default, empty. + * FOO_KCONFIG_DOTCONFIG: path (with filename) of the .config file, + relative to the package source tree. The default, .config, should + be well suited for all packages that use the standard kconfig + infrastructure as inherited from the Linux kernel; some packages + use a derivative of kconfig that use a different location. + * FOO_KCONFIG_DEPENDENCIES: the list of packages (most probably, + host packages) that need to be built before this package’s + kconfig is interpreted. Seldom used. By default, empty. + +17.13. Infrastructure for rebar-based packages + +17.13.1. rebar-package tutorial + +First, let’s see how to write a .mk file for a rebar-based package, +with an example : + +01: ################################################################################ +02: # +03: # erlang-foobar +04: # +05: ################################################################################ +06: +07: ERLANG_FOOBAR_VERSION = 1.0 +08: ERLANG_FOOBAR_SOURCE = erlang-foobar-$(ERLANG_FOOBAR_VERSION).tar.xz +09: ERLANG_FOOBAR_SITE = http://www.foosoftware.org/download +10: ERLANG_FOOBAR_DEPENDENCIES = host-libaaa libbbb +11: +12: $(eval $(rebar-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we declare our dependencies, so that they are built +before the build process of our package starts. + +Finally, on line 12, we invoke the rebar-package macro that generates +all the Makefile rules that actually allows the package to be built. + +17.13.2. rebar-package reference + +The main macro of the rebar package infrastructure is rebar-package. +It is similar to the generic-package macro. The ability to have host +packages is also available, with the host-rebar-package macro. + +Just like the generic infrastructure, the rebar infrastructure works +by defining a number of variables before calling the rebar-package +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the rebar infrastructure: +ERLANG_FOOBAR_VERSION, ERLANG_FOOBAR_SOURCE, ERLANG_FOOBAR_PATCH, +ERLANG_FOOBAR_SITE, ERLANG_FOOBAR_SUBDIR, ERLANG_FOOBAR_DEPENDENCIES, +ERLANG_FOOBAR_INSTALL_STAGING, ERLANG_FOOBAR_INSTALL_TARGET, +ERLANG_FOOBAR_LICENSE and ERLANG_FOOBAR_LICENSE_FILES. + +A few additional variables, specific to the rebar infrastructure, can +also be defined. Many of them are only useful in very specific cases, +typical packages will therefore only use a few of them. + + * ERLANG_FOOBAR_USE_AUTOCONF, to specify that the package uses + autoconf at the configuration step. When a package sets this + variable to YES, the autotools infrastructure is used. + + Note. You can also use some of the variables from the autotools + infrastructure: ERLANG_FOOBAR_CONF_ENV, ERLANG_FOOBAR_CONF_OPTS, + ERLANG_FOOBAR_AUTORECONF, ERLANG_FOOBAR_AUTORECONF_ENV and + ERLANG_FOOBAR_AUTORECONF_OPTS. + + * ERLANG_FOOBAR_USE_BUNDLED_REBAR, to specify that the package has + a bundled version of rebar and that it shall be used. Valid + values are YES or NO (the default). + + Note. If the package bundles a rebar utility, but can use the + generic one that Buildroot provides, just say NO (i.e., do not + specify this variable). Only set if it is mandatory to use the + rebar utility bundled in this package. + + * ERLANG_FOOBAR_REBAR_ENV, to specify additional environment + variables to pass to the rebar utility. + * ERLANG_FOOBAR_KEEP_DEPENDENCIES, to keep the dependencies + described in the rebar.config file. Valid values are YES or NO + (the default). Unless this variable is set to YES, the rebar + infrastructure removes such dependencies in a post-patch hook to + ensure rebar does not download nor compile them. + +With the rebar infrastructure, all the steps required to build and +install the packages are already defined, and they generally work +well for most rebar-based packages. However, when required, it is +still possible to customize what is done in any particular step: + + * By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the + various build steps” for details. + * By overriding one of the steps. For example, even if the rebar + infrastructure is used, if the package .mk file defines its own + ERLANG_FOOBAR_BUILD_CMDS variable, it will be used instead of the + default rebar one. However, using this method should be + restricted to very specific cases. Do not use it in the general + case. + +17.14. Infrastructure for Waf-based packages + +17.14.1. waf-package tutorial + +First, let’s see how to write a .mk file for a Waf-based package, +with an example : + +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_CONF_OPTS = --enable-bar --disable-baz +11: LIBFOO_DEPENDENCIES = bar +12: +13: $(eval $(waf-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot what options to enable for libfoo. + +On line 11, we tell Buildroot the dependencies of libfoo. + +Finally, on line line 13, we invoke the waf-package macro that +generates all the Makefile rules that actually allows the package to +be built. + +17.14.2. waf-package reference + +The main macro of the Waf package infrastructure is waf-package. It +is similar to the generic-package macro. + +Just like the generic infrastructure, the Waf infrastructure works by +defining a number of variables before calling the waf-package macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the Waf infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET. + +An additional variable, specific to the Waf infrastructure, can also +be defined. + + * LIBFOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main wscript file. This is useful, if + for example, the main wscript file is not at the root of the tree + extracted by the tarball. If HOST_LIBFOO_SUBDIR is not specified, + it defaults to LIBFOO_SUBDIR. + * LIBFOO_NEEDS_EXTERNAL_WAF can be set to YES or NO to tell + Buildroot to use the bundled waf executable. If set to NO, the + default, then Buildroot will use the waf executable provided in + the package source tree; if set to YES, then Buildroot will + download, install waf as a host tool and use it to build the + package. + * LIBFOO_WAF_OPTS, to specify additional options to pass to the waf + script at every step of the package build process: configure, + build and installation. By default, empty. + * LIBFOO_CONF_OPTS, to specify additional options to pass to the + waf script for the configuration step. By default, empty. + * LIBFOO_BUILD_OPTS, to specify additional options to pass to the + waf script during the build step. By default, empty. + * LIBFOO_INSTALL_STAGING_OPTS, to specify additional options to + pass to the waf script during the staging installation step. By + default, empty. + * LIBFOO_INSTALL_TARGET_OPTS, to specify additional options to pass + to the waf script during the target installation step. By + default, empty. + +17.15. Infrastructure for Meson-based packages + +17.15.1. meson-package tutorial + +Meson [http://mesonbuild.com] is an open source build system meant to +be both extremely fast, and, even more importantly, as user friendly +as possible. It uses Ninja [https://ninja-build.org] as a companion +tool to perform the actual build operations. + +Let’s see how to write a .mk file for a Meson-based package, with an +example: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-3.0+ +11: FOO_LICENSE_FILES = COPYING +12: FOO_INSTALL_STAGING = YES +13: +14: FOO_DEPENDENCIES = host-pkgconf bar +15: +16: ifeq ($(BR2_PACKAGE_BAZ),y) +17: FOO_CONF_OPTS += -Dbaz=true +18: FOO_DEPENDENCIES += baz +19: else +20: FOO_CONF_OPTS += -Dbaz=false +21: endif +22: +23: $(eval $(meson-package)) + +The Makefile starts with the definition of the standard variables for +package declaration (lines 7 to 11). + +On line line 23, we invoke the meson-package macro that generates all +the Makefile rules that actually allows the package to be built. + +In the example, host-pkgconf and bar are declared as dependencies in +FOO_DEPENDENCIES at line 14 because the Meson build file of foo uses +pkg-config to determine the compilation flags and libraries of +package bar. + +Note that it is not necessary to add host-meson in the +FOO_DEPENDENCIES variable of a package, since this basic dependency +is automatically added as needed by the Meson package infrastructure. + +If the "baz" package is selected, then support for the "baz" feature +in "foo" is activated by adding -Dbaz=true to FOO_CONF_OPTS at line +17, as specified in the meson_options.txt file in "foo" source tree. +The "baz" package is also added to FOO_DEPENDENCIES. Note that the +support for baz is explicitly disabled at line 20, if the package is +not selected. + +To sum it up, to add a new meson-based package, the Makefile example +can be copied verbatim then edited to replace all occurences of FOO +with the uppercase name of the new package and update the values of +the standard variables. + +17.15.2. meson-package reference + +The main macro of the Meson package infrastructure is meson-package. +It is similar to the generic-package macro. The ability to have +target and host packages is also available, with the +host-meson-package macro. + +Just like the generic infrastructure, the Meson infrastructure works +by defining a number of variables before calling the meson-package +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the Meson infrastructure: +FOO_VERSION, FOO_SOURCE, FOO_PATCH, FOO_SITE, FOO_SUBDIR, +FOO_DEPENDENCIES, FOO_INSTALL_STAGING, FOO_INSTALL_TARGET. + +A few additional variables, specific to the Meson infrastructure, can +also be defined. Many of them are only useful in very specific cases, +typical packages will therefore only use a few of them. + + * FOO_SUBDIR may contain the name of a subdirectory inside the + package that contains the main meson.build file. This is useful, + if for example, the main meson.build file is not at the root of + the tree extracted by the tarball. If HOST_FOO_SUBDIR is not + specified, it defaults to FOO_SUBDIR. + * FOO_CONF_ENV, to specify additional environment variables to pass + to meson for the configuration step. By default, empty. + * FOO_CONF_OPTS, to specify additional options to pass to meson for + the configuration step. By default, empty. + * FOO_CFLAGS, to specify compiler arguments added to the package + specific cross-compile.conf file c_args property. By default, the + value of TARGET_CFLAGS. + * FOO_CXXFLAGS, to specify compiler arguments added to the package + specific cross-compile.conf file cpp_args property. By default, + the value of TARGET_CXXFLAGS. + * FOO_LDFLAGS, to specify compiler arguments added to the package + specific cross-compile.conf file c_link_args and cpp_link_args + properties. By default, the value of TARGET_LDFLAGS. + * FOO_MESON_EXTRA_BINARIES, to specify a space-separated list of + programs to add to the [binaries] section of the meson + cross-compilation.conf configuration file. The format is + program-name='/path/to/program', with no space around the = sign, + and with the path of the program between single quotes. By + default, empty. Note that Buildroot already sets the correct + values for c, cpp, ar, strip, and pkgconfig. + * FOO_MESON_EXTRA_PROPERTIES, to specify a space-separated list of + properties to add to the [properties] section of the meson + cross-compilation.conf configuration file. The format is + property-name= with no space around the = sign, and with + single quotes around string values. By default, empty. Note that + Buildroot already sets values for needs_exe_wrapper, c_args, + c_link_args, cpp_args, cpp_link_args, sys_root, and + pkg_config_libdir. + * FOO_NINJA_ENV, to specify additional environment variables to + pass to ninja, meson companion tool in charge of the build + operations. By default, empty. + * FOO_NINJA_OPTS, to specify a space-separated list of targets to + build. By default, empty, to build the default target(s). + +17.16. Integration of Cargo-based packages + +Cargo is the package manager for the Rust programming language. It +allows the user to build programs or libraries written in Rust, but +it also downloads and manages their dependencies, to ensure +repeatable builds. Cargo packages are called "crates". + +17.16.1. Cargo-based package’s Config.in file + +The Config.in file of Cargo-based package foo should contain: + +01: config BR2_PACKAGE_FOO +02: bool "foo" +03: depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS +04: select BR2_PACKAGE_HOST_RUSTC +05: help +06: This is a comment that explains what foo is. +07: +08: http://foosoftware.org/foo/ + +17.16.2. Cargo-based package’s .mk file + +Buildroot does not (yet) provide a dedicated package infrastructure +for Cargo-based packages. So, we will explain how to write a .mk file +for such a package. Let’s start with an example: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-3.0+ +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_DEPENDENCIES = host-rustc +14: +15: FOO_CARGO_ENV = CARGO_HOME=$(HOST_DIR)/share/cargo +16: +17: FOO_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(FOO_CARGO_MODE) +18: +19: FOO_CARGO_OPTS = \ +20: $(if $(BR2_ENABLE_DEBUG),,--release) \ +21: --target=$(RUSTC_TARGET_NAME) \ +22: --manifest-path=$(@D)/Cargo.toml +23: +24: define FOO_BUILD_CMDS +25: $(TARGET_MAKE_ENV) $(FOO_CARGO_ENV) \ +26: cargo build $(FOO_CARGO_OPTS) +27: endef +28: +29: define FOO_INSTALL_TARGET_CMDS +30: $(INSTALL) -D -m 0755 $(@D)/$(FOO_BIN_DIR)/foo \ +31: $(TARGET_DIR)/usr/bin/foo +32: endef +33: +34: $(eval $(generic-package)) + +The Makefile starts with the definition of the standard variables for +package declaration (lines 7 to 11). + +As seen in line 34, it is based on the generic-package infrastructure +. So, it defines the variables required by this particular +infrastructure, where Cargo is invoked: + + * FOO_BUILD_CMDS: Cargo is invoked to perform the build. The + options required to configure the cross-compilation of the + package are passed via FOO_CONF_OPTS. + * FOO_INSTALL_TARGET_CMDS: The binary executable generated is + installed on the target. + +In order to have Cargo available for the build, FOO_DEPENDENCIES +needs to contain host-cargo. + +To sum it up, to add a new Cargo-based package, the Makefile example +can be copied verbatim then edited to replace all occurences of FOO +with the uppercase name of the new package and update the values of +the standard variables. + +17.16.3. About Dependencies Management + +A crate can depend on other libraries from crates.io or git +repositories, listed in its Cargo.toml file. Before starting a build, +Cargo usually downloads automatically them. This step can also be +performed independently, via the cargo fetch command. + +Cargo maintains a local cache of the registry index and of git +checkouts of the crates, whose location is given by $CARGO_HOME. As +seen in the package Makefile example at line 15, this environment +variable is set to $(HOST_DIR)/share/cargo. + +This dependency download mechanism is not convenient when performing +an offline build, as Cargo will fail to fetch the dependencies. In +that case, it is advised to generate a tarball of the dependencies +using the cargo vendor and add it to FOO_EXTRA_DOWNLOADS. + +17.17. Infrastructure for Go packages + +This infrastructure applies to Go packages that use the standard +build system and use bundled dependencies. + +17.17.1. golang-package tutorial + +First, let’s see how to write a .mk file for a go package, with an +example : + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.0 +08: FOO_SITE = $(call github,bar,foo,$(FOO_VERSION)) +09: FOO_LICENSE = BSD-3-Clause +10: FOO_LICENSE_FILES = LICENSE +11: +12: $(eval $(golang-package)) + +On line 7, we declare the version of the package. + +On line 8, we declare the upstream location of the package, here +fetched from Github, since a large number of Go packages are hosted +on Github. + +On line 9 and 10, we give licensing details about the package. + +Finally, on line 12, we invoke the golang-package macro that +generates all the Makefile rules that actually allow the package to +be built. + +17.17.2. golang-package reference + +In their Config.in file, packages using the golang-package +infrastructure should depend on +BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS because Buildroot will +automatically add a dependency on host-go to such packages. If you +need CGO support in your package, you must add a dependency on +BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS. + +The main macro of the Go package infrastructure is golang-package. It +is similar to the generic-package macro. The ability to build host +packages is also available, with the host-golang-package macro. Host +packages built by host-golang-package macro should depend on +BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS. + +Just like the generic infrastructure, the Go infrastructure works by +defining a number of variables before calling the golang-package. + +All the package metadata information variables that exist in the +generic package infrastructure also exist in the Go infrastructure: +FOO_VERSION, FOO_SOURCE, FOO_PATCH, FOO_SITE, FOO_SUBDIR, +FOO_DEPENDENCIES, FOO_LICENSE, FOO_LICENSE_FILES, +FOO_INSTALL_STAGING, etc. + +Note that it is not necessary to add host-go in the FOO_DEPENDENCIES +variable of a package, since this basic dependency is automatically +added as needed by the Go package infrastructure. + +A few additional variables, specific to the Go infrastructure, can +optionally be defined, depending on the package’s needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none. + + * If your package need a custom GOPATH to be compiled in, you can + use the FOO_WORKSPACE variable. The GOPATH being used will be + /. If FOO_WORKSPACE is not + specified, it defaults to _gopath. + * FOO_SRC_SUBDIR is the sub-directory where your source will be + compiled relatively to the GOPATH. An example value is github.com + /bar/foo. If FOO_SRC_SUBDIR is not specified, it defaults to a + value infered from the FOO_SITE variable. + * FOO_LDFLAGS and FOO_TAGS can be used to pass respectively the + LDFLAGS or the TAGS to the go build command. + * FOO_BUILD_TARGETS can be used to pass the list of targets that + should be built. If FOO_BUILD_TARGETS is not specified, it + defaults to .. We then have two cases: + + + FOO_BUILD_TARGETS is .. In this case, we assume only one + binary will be produced, and that by default we name it after + the package name. If that is not appropriate, the name of the + produced binary can be overridden using FOO_BIN_NAME. + + FOO_BUILD_TARGETS is not .. In this case, we iterate over the + values to build each target, and for each produced a binary + that is the non-directory component of the target. For + example if FOO_BUILD_TARGETS = cmd/docker cmd/dockerd the + binaries produced are docker and dockerd. + * FOO_INSTALL_BINS can be used to pass the list of binaries that + should be installed in /usr/bin on the target. If + FOO_INSTALL_BINS is not specified, it defaults to the lower-case + name of package. + +With the Go infrastructure, all the steps required to build and +install the packages are already defined, and they generally work +well for most Go-based packages. However, when required, it is still +possible to customize what is done in any particular step: + + * By adding a post-operation hook (after extract, patch, configure, + build or install). See Section 17.22, “Hooks available in the + various build steps” for details. + * By overriding one of the steps. For example, even if the Go + infrastructure is used, if the package .mk file defines its own + FOO_BUILD_CMDS variable, it will be used instead of the default + Go one. However, using this method should be restricted to very + specific cases. Do not use it in the general case. + +17.18. Infrastructure for QMake-based packages + +17.18.1. qmake-package tutorial + +First, let’s see how to write a .mk file for a QMake-based package, +with an example : + +01: ################################################################################ +02: # +03: # libfoo +04: # +05: ################################################################################ +06: +07: LIBFOO_VERSION = 1.0 +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz +09: LIBFOO_SITE = http://www.foosoftware.org/download +10: LIBFOO_CONF_OPTS = QT_CONFIG+=bar QT_CONFIG-=baz +11: LIBFOO_DEPENDENCIES = bar +12: +13: $(eval $(qmake-package)) + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10, we tell Buildroot what options to enable for libfoo. + +On line 11, we tell Buildroot the dependencies of libfoo. + +Finally, on line line 13, we invoke the qmake-package macro that +generates all the Makefile rules that actually allows the package to +be built. + +17.18.2. qmake-package reference + +The main macro of the QMake package infrastructure is qmake-package. +It is similar to the generic-package macro. + +Just like the generic infrastructure, the QMake infrastructure works +by defining a number of variables before calling the qmake-package +macro. + +First, all the package metadata information variables that exist in +the generic infrastructure also exist in the QMake infrastructure: +LIBFOO_VERSION, LIBFOO_SOURCE, LIBFOO_PATCH, LIBFOO_SITE, +LIBFOO_SUBDIR, LIBFOO_DEPENDENCIES, LIBFOO_INSTALL_STAGING, +LIBFOO_INSTALL_TARGET. + +An additional variable, specific to the QMake infrastructure, can +also be defined. + + * LIBFOO_CONF_ENV, to specify additional environment variables to + pass to the qmake script for the configuration step. By default, + empty. + * LIBFOO_CONF_OPTS, to specify additional options to pass to the + qmake script for the configuration step. By default, empty. + * LIBFOO_MAKE_ENV, to specify additional environment variables to + the make command during the build and install steps. By default, + empty. + * LIBFOO_MAKE_OPTS, to specify additional targets to pass to the + make command during the build step. By default, empty. + * LIBFOO_INSTALL_STAGING_OPTS, to specify additional targets to + pass to the make command during the staging installation step. By + default, install. + * LIBFOO_INSTALL_TARGET_OPTS, to specify additional targets to pass + to the make command during the target installation step. By + default, install. + +17.19. Infrastructure for packages building kernel modules + +Buildroot offers a helper infrastructure to make it easy to write +packages that build and install Linux kernel modules. Some packages +only contain a kernel module, other packages contain programs and +libraries in addition to kernel modules. Buildroot’s helper +infrastructure supports either case. + +17.19.1. kernel-module tutorial + +Let’s start with an example on how to prepare a simple package that +only builds a kernel module, and no other component: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.2.3 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-2.0 +11: FOO_LICENSE_FILES = COPYING +12: +13: $(eval $(kernel-module)) +14: $(eval $(generic-package)) + +Lines 7-11 define the usual meta-data to specify the version, archive +name, remote URI where to find the package source, licensing +information. + +On line 13, we invoke the kernel-module helper infrastructure, that +generates all the appropriate Makefile rules and variables to build +that kernel module. + +Finally, on line 14, we invoke the generic-package infrastructure. + +The dependency on linux is automatically added, so it is not needed +to specify it in FOO_DEPENDENCIES. + +What you may have noticed is that, unlike other package +infrastructures, we explicitly invoke a second infrastructure. This +allows a package to build a kernel module, but also, if needed, use +any one of other package infrastructures to build normal userland +components (libraries, executables…). Using the kernel-module +infrastructure on its own is not sufficient; another package +infrastructure must be used. + +Let’s look at a more complex example: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: FOO_VERSION = 1.2.3 +08: FOO_SOURCE = foo-$(FOO_VERSION).tar.xz +09: FOO_SITE = http://www.foosoftware.org/download +10: FOO_LICENSE = GPL-2.0 +11: FOO_LICENSE_FILES = COPYING +12: +13: FOO_MODULE_SUBDIRS = driver/base +14: FOO_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED) +15: +16: ifeq ($(BR2_PACKAGE_LIBBAR),y) +17: FOO_DEPENDENCIES = libbar +18: FOO_CONF_OPTS = --enable-bar +19: FOO_MODULE_SUBDIRS += driver/bar +20: else +21: FOO_CONF_OPTS = --disable-bar +22: endif +23: +24: $(eval $(kernel-module)) +26: $(eval $(autotools-package)) + +Here, we see that we have an autotools-based package, that also +builds the kernel module located in sub-directory driver/base and, if +libbar is enabled, the kernel module located in sub-directory driver/ +bar, and defines the variable KVERSION to be passed to the Linux +buildsystem when building the module(s). + +17.19.2. kernel-module reference + +The main macro for the kernel module infrastructure is kernel-module. +Unlike other package infrastructures, it is not stand-alone, and +requires any of the other *-package macros be called after it. + +The kernel-module macro defines post-build and post-target-install +hooks to build the kernel modules. If the package’s .mk needs access +to the built kernel modules, it should do so in a post-build hook, +registered after the call to kernel-module. Similarly, if the +package’s .mk needs access to the kernel module after it has been +installed, it should do so in a post-install hook, registered after +the call to kernel-module. Here’s an example: + +$(eval $(kernel-module)) + +define FOO_DO_STUFF_WITH_KERNEL_MODULE + # Do something with it... +endef +FOO_POST_BUILD_HOOKS += FOO_DO_STUFF_WITH_KERNEL_MODULE + +$(eval $(generic-package)) + +Finally, unlike the other package infrastructures, there is no +host-kernel-module variant to build a host kernel module. + +The following additional variables can optionally be defined to +further configure the build of the kernel module: + + * FOO_MODULE_SUBDIRS may be set to one or more sub-directories + (relative to the package source top-directory) where the kernel + module sources are. If empty or not set, the sources for the + kernel module(s) are considered to be located at the top of the + package source tree. + * FOO_MODULE_MAKE_OPTS may be set to contain extra variable + definitions to pass to the Linux buildsystem. + +You may also reference (but you may not set!) those variables: + + * LINUX_DIR contains the path to where the Linux kernel has been + extracted and built. + * LINUX_VERSION contains the version string as configured by the + user. + * LINUX_VERSION_PROBED contains the real version string of the + kernel, retrieved with running make -C $(LINUX_DIR) kernelrelease + * KERNEL_ARCH contains the name of the current architecture, like + arm, mips… + +17.20. Infrastructure for asciidoc documents + +The Buildroot manual, which you are currently reading, is entirely +written using the AsciiDoc [http://asciidoc.org/] mark-up syntax. The +manual is then rendered to many formats: + + * html + * split-html + * pdf + * epub + * text + +Although Buildroot only contains one document written in AsciiDoc, +there is, as for packages, an infrastructure for rendering documents +using the AsciiDoc syntax. + +Also as for packages, the AsciiDoc infrastructure is available from a +br2-external tree. This allows documentation for a br2-external tree +to match the Buildroot documentation, as it will be rendered to the +same formats and use the same layout and theme. + +17.20.1. asciidoc-document tutorial + +Whereas package infrastructures are suffixed with -package, the +document infrastructures are suffixed with -document. So, the +AsciiDoc infrastructure is named asciidoc-document. + +Here is an example to render a simple AsciiDoc document. + +01: ################################################################################ +02: # +03: # foo-document +04: # +05: ################################################################################ +06: +07: FOO_SOURCES = $(sort $(wildcard $(pkgdir)/*)) +08: $(eval $(call asciidoc-document)) + +On line 7, the Makefile declares what the sources of the document +are. Currently, it is expected that the document’s sources are only +local; Buildroot will not attempt to download anything to render a +document. Thus, you must indicate where the sources are. Usually, the +string above is sufficient for a document with no sub-directory +structure. + +On line 8, we call the asciidoc-document function, which generates +all the Makefile code necessary to render the document. + +17.20.2. asciidoc-document reference + +The list of variables that can be set in a .mk file to give metadata +information is (assuming the document name is foo) : + + * FOO_SOURCES, mandatory, defines the source files for the + document. + * FOO_RESOURCES, optional, may contain a space-separated list of + paths to one or more directories containing so-called resources + (like CSS or images). By default, empty. + * FOO_DEPENDENCIES, optional, the list of packages (most probably, + host-packages) that must be built before building this document. + +There are also additional hooks (see Section 17.22, “Hooks available +in the various build steps” for general information on hooks), that a +document may set to define extra actions to be done at various steps: + + * FOO_POST_RSYNC_HOOKS to run additional commands after the sources + have been copied by Buildroot. This can for example be used to + generate part of the manual with information extracted from the + tree. As an example, Buildroot uses this hook to generate the + tables in the appendices. + * FOO_CHECK_DEPENDENCIES_HOOKS to run additional tests on required + components to generate the document. In AsciiDoc, it is possible + to call filters, that is, programs that will parse an AsciiDoc + block and render it appropriately (e.g. ditaa [http:// + ditaa.sourceforge.net/] or aafigure [https://pythonhosted.org/ + aafigure/]). + * FOO_CHECK_DEPENDENCIES__HOOKS, to run additional tests for + the specified format (see the list of rendered formats, + above). + +Here is a complete example that uses all variables and all hooks: + +01: ################################################################################ +02: # +03: # foo-document +04: # +05: ################################################################################ +06: +07: FOO_SOURCES = $(sort $(wildcard $(pkgdir)/*)) +08: FOO_RESOURCES = $(sort $(wildcard $(pkgdir)/ressources)) +09: +10: define FOO_GEN_EXTRA_DOC +11: /path/to/generate-script --outdir=$(@D) +12: endef +13: FOO_POST_RSYNC_HOOKS += FOO_GEN_EXTRA_DOC +14: +15: define FOO_CHECK_MY_PROG +16: if ! which my-prog >/dev/null 2>&1; then \ +17: echo "You need my-prog to generate the foo document"; \ +18: exit 1; \ +19: fi +20: endef +21: FOO_CHECK_DEPENDENCIES_HOOKS += FOO_CHECK_MY_PROG +22: +23: define FOO_CHECK_MY_OTHER_PROG +24: if ! which my-other-prog >/dev/null 2>&1; then \ +25: echo "You need my-other-prog to generate the foo document as PDF"; \ +26: exit 1; \ +27: fi +28: endef +29: FOO_CHECK_DEPENDENCIES_PDF_HOOKS += FOO_CHECK_MY_OTHER_PROG +30: +31: $(eval $(call asciidoc-document)) + +17.21. Infrastructure specific to the Linux kernel package + +The Linux kernel package can use some specific infrastructures based +on package hooks for building Linux kernel tools or/and building +Linux kernel extensions. + +17.21.1. linux-kernel-tools + +Buildroot offers a helper infrastructure to build some userspace +tools for the target available within the Linux kernel sources. Since +their source code is part of the kernel source code, a special +package, linux-tools, exists and re-uses the sources of the Linux +kernel that runs on the target. + +Let’s look at an example of a Linux tool. For a new Linux tool named +foo, create a new menu entry in the existing package/linux-tools/ +Config.in. This file will contain the option descriptions related to +each kernel tool that will be used and displayed in the configuration +tool. It would basically look like: + +01: config BR2_PACKAGE_LINUX_TOOLS_FOO +02: bool "foo" +03: select BR2_PACKAGE_LINUX_TOOLS +04: help +05: This is a comment that explains what foo kernel tool is. +06: +07: http://foosoftware.org/foo/ + +The name of the option starts with the prefix +BR2_PACKAGE_LINUX_TOOLS_, followed by the uppercase name of the tool +(like is done for packages). + +Note. Unlike other packages, the linux-tools package options appear +in the linux kernel menu, under the Linux Kernel Tools sub-menu, not +under the Target packages main menu. + +Then for each linux tool, add a new .mk.in file named package/ +linux-tools/linux-tool-foo.mk.in. It would basically look like: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: LINUX_TOOLS += foo +08: +09: FOO_DEPENDENCIES = libbbb +10: +11: define FOO_BUILD_CMDS +12: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools foo +13: endef +14: +15: define FOO_INSTALL_STAGING_CMDS +16: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ +17: DESTDIR=$(STAGING_DIR) \ +18: foo_install +19: endef +20: +21: define FOO_INSTALL_TARGET_CMDS +22: $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \ +23: DESTDIR=$(TARGET_DIR) \ +24: foo_install +25: endef + +On line 7, we register the Linux tool foo to the list of available +Linux tools. + +On line 9, we specify the list of dependencies this tool relies on. +These dependencies are added to the Linux package dependencies list +only when the foo tool is selected. + +The rest of the Makefile, lines 11-25 defines what should be done at +the different steps of the Linux tool build process like for a +generic package. They will actually be used only when the foo tool is +selected. The only supported commands are _BUILD_CMDS, +_INSTALL_STAGING_CMDS and _INSTALL_TARGET_CMDS. + +Note. One must not call $(eval $(generic-package)) or any other +package infrastructure! Linux tools are not packages by themselves, +they are part of the linux-tools package. + +17.21.2. linux-kernel-extensions + +Some packages provide new features that require the Linux kernel tree +to be modified. This can be in the form of patches to be applied on +the kernel tree, or in the form of new files to be added to the tree. +The Buildroot’s Linux kernel extensions infrastructure provides a +simple solution to automatically do this, just after the kernel +sources are extracted and before the kernel patches are applied. +Examples of extensions packaged using this mechanism are the +real-time extensions Xenomai and RTAI, as well as the set of +out-of-tree LCD screens drivers fbtft. + +Let’s look at an example on how to add a new Linux extension foo. + +First, create the package foo that provides the extension: this +package is a standard package; see the previous chapters on how to +create such a package. This package is in charge of downloading the +sources archive, checking the hash, defining the licence informations +and building user space tools if any. + +Then create the Linux extension proper: create a new menu entry in +the existing linux/Config.ext.in. This file contains the option +descriptions related to each kernel extension that will be used and +displayed in the configuration tool. It would basically look like: + +01: config BR2_LINUX_KERNEL_EXT_FOO +02: bool "foo" +03: help +04: This is a comment that explains what foo kernel extension is. +05: +06: http://foosoftware.org/foo/ + +Then for each linux extension, add a new .mk file named linux/ +linux-ext-foo.mk. It should basically contain: + +01: ################################################################################ +02: # +03: # foo +04: # +05: ################################################################################ +06: +07: LINUX_EXTENSIONS += foo +08: +09: define FOO_PREPARE_KERNEL +10: $(FOO_DIR)/prepare-kernel-tree.sh --linux-dir=$(@D) +11: endef + +On line 7, we add the Linux extension foo to the list of available +Linux extensions. + +On line 9-11, we define what should be done by the extension to +modify the Linux kernel tree; this is specific to the linux extension +and can use the variables defined by the foo package, like: $ +(FOO_DIR) or $(FOO_VERSION)… as well as all the Linux variables, +like: $(LINUX_VERSION) or $(LINUX_VERSION_PROBED), $(KERNEL_ARCH)… +See the definition of those kernel variables. + +17.22. Hooks available in the various build steps + +The generic infrastructure (and as a result also the derived +autotools and cmake infrastructures) allow packages to specify hooks. +These define further actions to perform after existing steps. Most +hooks aren’t really useful for generic packages, since the .mk file +already has full control over the actions performed in each step of +the package construction. + +The following hook points are available: + + * LIBFOO_PRE_DOWNLOAD_HOOKS + * LIBFOO_POST_DOWNLOAD_HOOKS + * LIBFOO_PRE_EXTRACT_HOOKS + * LIBFOO_POST_EXTRACT_HOOKS + * LIBFOO_PRE_RSYNC_HOOKS + * LIBFOO_POST_RSYNC_HOOKS + * LIBFOO_PRE_PATCH_HOOKS + * LIBFOO_POST_PATCH_HOOKS + * LIBFOO_PRE_CONFIGURE_HOOKS + * LIBFOO_POST_CONFIGURE_HOOKS + * LIBFOO_PRE_BUILD_HOOKS + * LIBFOO_POST_BUILD_HOOKS + * LIBFOO_PRE_INSTALL_HOOKS (for host packages only) + * LIBFOO_POST_INSTALL_HOOKS (for host packages only) + * LIBFOO_PRE_INSTALL_STAGING_HOOKS (for target packages only) + * LIBFOO_POST_INSTALL_STAGING_HOOKS (for target packages only) + * LIBFOO_PRE_INSTALL_TARGET_HOOKS (for target packages only) + * LIBFOO_POST_INSTALL_TARGET_HOOKS (for target packages only) + * LIBFOO_PRE_INSTALL_IMAGES_HOOKS + * LIBFOO_POST_INSTALL_IMAGES_HOOKS + * LIBFOO_PRE_LEGAL_INFO_HOOKS + * LIBFOO_POST_LEGAL_INFO_HOOKS + +These variables are lists of variable names containing actions to be +performed at this hook point. This allows several hooks to be +registered at a given hook point. Here is an example: + +define LIBFOO_POST_PATCH_FIXUP + action1 + action2 +endef + +LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP + +17.22.1. Using the POST_RSYNC hook + +The POST_RSYNC hook is run only for packages that use a local source, +either through the local site method or the OVERRIDE_SRCDIR +mechanism. In this case, package sources are copied using rsync from +the local location into the buildroot build directory. The rsync +command does not copy all files from the source directory, though. +Files belonging to a version control system, like the directories +.git, .hg, etc. are not copied. For most packages this is sufficient, +but a given package can perform additional actions using the +POST_RSYNC hook. + +In principle, the hook can contain any command you want. One specific +use case, though, is the intentional copying of the version control +directory using rsync. The rsync command you use in the hook can, +among others, use the following variables: + + * $(SRCDIR): the path to the overridden source directory + * $(@D): the path to the build directory + +17.22.2. Target-finalize hook + +Packages may also register hooks in LIBFOO_TARGET_FINALIZE_HOOKS. +These hooks are run after all packages are built, but before the +filesystem images are generated. They are seldom used, and your +package probably do not need them. + +17.23. Gettext integration and interaction with packages + +Many packages that support internationalization use the gettext +library. Dependencies for this library are fairly complicated and +therefore, deserve some explanation. + +The glibc C library integrates a full-blown implementation of gettext +, supporting translation. Native Language Support is therefore +built-in in glibc. + +On the other hand, the uClibc and musl C libraries only provide a +stub implementation of the gettext functionality, which allows to +compile libraries and programs using gettext functions, but without +providing the translation capabilities of a full-blown gettext +implementation. With such C libraries, if real Native Language +Support is necessary, it can be provided by the libintl library of +the gettext package. + +Due to this, and in order to make sure that Native Language Support +is properly handled, packages in Buildroot that can use NLS support +should: + + 1. Ensure NLS support is enabled when BR2_SYSTEM_ENABLE_NLS=y. This + is done automatically for autotools packages and therefore should + only be done for packages using other package infrastructures. + 2. Add $(TARGET_NLS_DEPENDENCIES) to the package _DEPENDENCIES + variable. This addition should be done unconditionally: the value + of this variable is automatically adjusted by the core + infrastructure to contain the relevant list of packages. If NLS + support is disabled, this variable is empty. If NLS support is + enabled, this variable contains host-gettext so that tools needed + to compile translation files are available on the host. In + addition, if uClibc or musl are used, this variable also contains + gettext in order to get the full-blown gettext implementation. + 3. If needed, add $(TARGET_NLS_LIBS) to the linker flags, so that + the package gets linked with libintl. This is generally not + needed with autotools packages as they usually detect + automatically that they should link with libintl. However, + packages using other build systems, or problematic + autotools-based packages may need this. $(TARGET_NLS_LIBS) should + be added unconditionally to the linker flags, as the core + automatically makes it empty or defined to -lintl depending on + the configuration. + +No changes should be made to the Config.in file to support NLS. + +Finally, certain packages need some gettext utilities on the target, +such as the gettext program itself, which allows to retrieve +translated strings, from the command line. In such a case, the +package should: + + * use select BR2_PACKAGE_GETTEXT in their Config.in file, + indicating in a comment above that it’s a runtime dependency + only. + * not add any gettext dependency in the DEPENDENCIES variable of + their .mk file. + +17.24. Tips and tricks + +17.24.1. Package name, config entry name and makefile variable +relationship + +In Buildroot, there is some relationship between: + + * the package name, which is the package directory name (and the + name of the *.mk file); + * the config entry name that is declared in the Config.in file; + * the makefile variable prefix. + +It is mandatory to maintain consistency between these elements, using +the following rules: + + * the package directory and the *.mk name are the package name + itself (e.g.: package/foo-bar_boo/foo-bar_boo.mk); + * the make target name is the package name itself (e.g.: + foo-bar_boo); + * the config entry is the upper case package name with . and - + characters substituted with _, prefixed with BR2_PACKAGE_ (e.g.: + BR2_PACKAGE_FOO_BAR_BOO); + * the *.mk file variable prefix is the upper case package name with + . and - characters substituted with _ (e.g.: + FOO_BAR_BOO_VERSION). + +17.24.2. How to check the coding style + +Buildroot provides a script in utils/check-package that checks new or +changed files for coding style. It is not a complete language +validator, but it catches many common mistakes. It is meant to run in +the actual files you created or modified, before creating the patch +for submission. + +This script can be used for packages, filesystem makefiles, Config.in +files, etc. It does not check the files defining the package +infrastructures and some other files containing similar common code. + +To use it, run the check-package script, by telling which files you +created or changed: + +$ ./utils/check-package package/new-package/* + +If you have the utils directory in your path you can also run: + +$ cd package/new-package/ +$ check-package * + +The tool can also be used for packages in a br2-external: + +$ check-package -b /path/to/br2-ext-tree/package/my-package/* + +17.24.3. How to test your package + +Once you have added your new package, it is important that you test +it under various conditions: does it build for all architectures? +Does it build with the different C libraries? Does it need threads, +NPTL? And so on… + +Buildroot runs autobuilders [http://autobuild.buildroot.org/] which +continuously test random configurations. However, these only build +the master branch of the git tree, and your new fancy package is not +yet there. + +Buildroot provides a script in utils/test-pkg that uses the same base +configurations as used by the autobuilders so you can test your +package in the same conditions. + +First, create a config snippet that contains all the necessary +options needed to enable your package, but without any architecture +or toolchain option. For example, let’s create a config snippet that +just enables libcurl, without any TLS backend: + +$ cat libcurl.config +BR2_PACKAGE_LIBCURL=y + +If your package needs more configuration options, you can add them to +the config snippet. For example, here’s how you would test libcurl +with openssl as a TLS backend and the curl program: + +$ cat libcurl.config +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_LIBCURL_CURL=y +BR2_PACKAGE_OPENSSL=y + +Then run the test-pkg script, by telling it what config snippet to +use and what package to test: + +$ ./utils/test-pkg -c libcurl.config -p libcurl + +By default, test-pkg will build your package against a subset of the +toolchains used by the autobuilders, which has been selected by the +Buildroot developers as being the most useful and representative +subset. If you want to test all toolchains, pass the -a option. Note +that in any case, internal toolchains are excluded as they take too +long to build. + +The output lists all toolchains that are tested and the corresponding +result (excerpt, results are fake): + +$ ./utils/test-pkg -c libcurl.config -p libcurl + armv5-ctng-linux-gnueabi [ 1/11]: OK + armv7-ctng-linux-gnueabihf [ 2/11]: OK + br-aarch64-glibc [ 3/11]: SKIPPED + br-arcle-hs38 [ 4/11]: SKIPPED + br-arm-basic [ 5/11]: FAILED + br-arm-cortex-a9-glibc [ 6/11]: OK + br-arm-cortex-a9-musl [ 7/11]: FAILED + br-arm-cortex-m4-full [ 8/11]: OK + br-arm-full [ 9/11]: OK + br-arm-full-nothread [10/11]: FAILED + br-arm-full-static [11/11]: OK +11 builds, 2 skipped, 2 build failed, 1 legal-info failed + +The results mean: + + * OK: the build was successful. + * SKIPPED: one or more configuration options listed in the config + snippet were not present in the final configuration. This is due + to options having dependencies not satisfied by the toolchain, + such as for example a package that depends on BR2_USE_MMU with a + noMMU toolchain. The missing options are reported in + missing.config in the output build directory (~/br-test-pkg/ + TOOLCHAIN_NAME/ by default). + * FAILED: the build failed. Inspect the logfile file in the output + build directory to see what went wrong: + + + the actual build failed, + + the legal-info failed, + + one of the preliminary steps (downloading the config file, + applying the configuration, running dirclean for the package) + failed. + +When there are failures, you can just re-run the script with the same +options (after you fixed your package); the script will attempt to +re-build the package specified with -p for all toolchains, without +the need to re-build all the dependencies of that package. + +The test-pkg script accepts a few options, for which you can get some +help by running: + +$ ./utils/test-pkg -h + +17.24.4. How to add a package from GitHub + +Packages on GitHub often don’t have a download area with release +tarballs. However, it is possible to download tarballs directly from +the repository on GitHub. As GitHub is known to have changed download +mechanisms in the past, the github helper function should be used as +shown below. + +# Use a tag or a full commit ID +FOO_VERSION = v1.0 +FOO_SITE = $(call github,,,$(FOO_VERSION)) + +Notes + + * The FOO_VERSION can either be a tag or a commit ID. + * The tarball name generated by github matches the default one from + Buildroot (e.g.: + foo-f6fb6654af62045239caed5950bc6c7971965e60.tar.gz), so it is + not necessary to specify it in the .mk file. + * When using a commit ID as version, you should use the full 40 hex + characters. + +If the package you wish to add does have a release section on GitHub, +the maintainer may have uploaded a release tarball, or the release +may just point to the automatically generated tarball from the git +tag. If there is a release tarball uploaded by the maintainer, we +prefer to use that since it may be slightly different (e.g. it +contains a configure script so we don’t need to do AUTORECONF). + +You can see on the release page if it’s an uploaded tarball or a git +tag: + + * If it looks like the image above then it was uploaded by the + maintainer and you should use that link (in that example: + mongrel2-v1.9.2.tar.bz2) to specify FOO_SITE, and not use the + github helper. + * On the other hand, if there’s is only the "Source code" link, + then it’s an automatically generated tarball and you should use + the github helper function. + +17.25. Conclusion + +As you can see, adding a software package to Buildroot is simply a +matter of writing a Makefile using an existing example and modifying +it according to the compilation process required by the package. + +If you package software that might be useful for other people, don’t +forget to send a patch to the Buildroot mailing list (see +Section 21.5, “Submitting patches”)! + +Chapter 18. Patching a package + +While integrating a new package or updating an existing one, it may +be necessary to patch the source of the software to get it +cross-built within Buildroot. + +Buildroot offers an infrastructure to automatically handle this +during the builds. It supports three ways of applying patch sets: +downloaded patches, patches supplied within buildroot and patches +located in a user-defined global patch directory. + +18.1. Providing patches + +18.1.1. Downloaded + +If it is necessary to apply a patch that is available for download, +then add it to the _PATCH variable. If an entry contains +://, then Buildroot will assume it is a full URL and download the +patch from this location. Otherwise, Buildroot will assume that the +patch should be downloaded from _SITE. It can be a +single patch, or a tarball containing a patch series. + +Like for all downloads, a hash should be added to the +.hash file. + +This method is typically used for packages from Debian. + +18.1.2. Within Buildroot + +Most patches are provided within Buildroot, in the package directory; +these typically aim to fix cross-compilation, libc support, or other +such issues. + +These patch files should be named -.patch. + +Notes + + * The patch files coming with Buildroot should not contain any + package version reference in their filename. + * The field in the patch file name refers to the apply + order, and shall start at 1; It is preferred to pad the number + with zeros up to 4 digits, like git-format-patch does. E.g.: + 0001-foobar-the-buz.patch + * Previously, it was mandatory for patches to be prefixed with the + name of the package, like --.patch, + but that is no longer the case. Existing packages will be fixed + as time passes. Do not prefix patches with the package name. + * Previously, a series file, as used by quilt, could also be added + in the package directory. In that case, the series file defines + the patch application order. This is deprecated, and will be + removed in the future. Do not use a series file. + +18.1.3. Global patch directory + +The BR2_GLOBAL_PATCH_DIR configuration file option can be used to +specify a space separated list of one or more directories containing +global package patches. See Section 9.8, “Adding project-specific +patches” for details. + +18.2. How patches are applied + + 1. Run the _PRE_PATCH_HOOKS commands if defined; + 2. Cleanup the build directory, removing any existing *.rej files; + 3. If _PATCH is defined, then patches from these + tarballs are applied; + 4. If there are some *.patch files in the package’s Buildroot + directory or in a package subdirectory named , + then: + + + If a series file exists in the package directory, then + patches are applied according to the series file; + + Otherwise, patch files matching *.patch are applied in + alphabetical order. So, to ensure they are applied in the + right order, it is highly recommended to name the patch files + like this: -.patch, where + refers to the apply order. + 5. If BR2_GLOBAL_PATCH_DIR is defined, the directories will be + enumerated in the order they are specified. The patches are + applied as described in the previous step. + 6. Run the _POST_PATCH_HOOKS commands if defined. + +If something goes wrong in the steps 3 or 4, then the build fails. + +18.3. Format and licensing of the package patches + +Patches are released under the same license as the software they +apply to (see Section 12.2, “Complying with the Buildroot license”). + +A message explaining what the patch does, and why it is needed, +should be added in the header commentary of the patch. + +You should add a Signed-off-by statement in the header of the each +patch to help with keeping track of the changes and to certify that +the patch is released under the same license as the software that is +modified. + +If the software is under version control, it is recommended to use +the upstream SCM software to generate the patch set. + +Otherwise, concatenate the header with the output of the diff -purN +package-version.orig/ package-version/ command. + +If you update an existing patch (e.g. when bumping the package +version), make sure the existing From header and Signed-off-by tags +are not removed, but do update the rest of the patch comment when +appropriate. + +At the end, the patch should look like: + +configure.ac: add C++ support test + +Signed-off-by: John Doe + +--- configure.ac.orig ++++ configure.ac +@@ -40,2 +40,12 @@ + +AC_PROG_MAKE_SET ++ ++AC_CACHE_CHECK([whether the C++ compiler works], ++ [rw_cv_prog_cxx_works], ++ [AC_LANG_PUSH([C++]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], ++ [rw_cv_prog_cxx_works=yes], ++ [rw_cv_prog_cxx_works=no]) ++ AC_LANG_POP([C++])]) ++ ++AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) + +18.4. Integrating patches found on the Web + +When integrating a patch of which you are not the author, you have to +add a few things in the header of the patch itself. + +Depending on whether the patch has been obtained from the project +repository itself, or from somewhere on the web, add one of the +following tags: + +Backported from: + +or + +Fetch from: + +It is also sensible to add a few words about any changes to the patch +that may have been necessary. + +Chapter 19. Download infrastructure + +TODO + +Chapter 20. Debugging Buildroot + +It is possible to instrument the steps Buildroot does when building +packages. Define the variable BR2_INSTRUMENTATION_SCRIPTS to contain +the path of one or more scripts (or other executables), in a +space-separated list, you want called before and after each step. The +scripts are called in sequence, with three parameters: + + * start or end to denote the start (resp. the end) of a step; + * the name of the step about to be started, or which just ended; + * the name of the package. + +For example : + +make BR2_INSTRUMENTATION_SCRIPTS="/path/to/my/script1 /path/to/my/script2" + +The list of steps is: + + * extract + * patch + * configure + * build + * install-host, when a host-package is installed in $(HOST_DIR) + * install-target, when a target-package is installed in $ + (TARGET_DIR) + * install-staging, when a target-package is installed in $ + (STAGING_DIR) + * install-image, when a target-package installs files in $ + (BINARIES_DIR) + +The script has access to the following variables: + + * BR2_CONFIG: the path to the Buildroot .config file + * HOST_DIR, STAGING_DIR, TARGET_DIR: see Section 17.5.2, + “generic-package reference” + * BUILD_DIR: the directory where packages are extracted and built + * BINARIES_DIR: the place where all binary files (aka images) are + stored + * BASE_DIR: the base output directory + +Chapter 21. Contributing to Buildroot + +There are many ways in which you can contribute to Buildroot: +analyzing and fixing bugs, analyzing and fixing package build +failures detected by the autobuilders, testing and reviewing patches +sent by other developers, working on the items in our TODO list and +sending your own improvements to Buildroot or its manual. The +following sections give a little more detail on each of these items. + +If you are interested in contributing to Buildroot, the first thing +you should do is to subscribe to the Buildroot mailing list. This +list is the main way of interacting with other Buildroot developers +and to send contributions to. If you aren’t subscribed yet, then +refer to Chapter 5, Community resources for the subscription link. + +If you are going to touch the code, it is highly recommended to use a +git repository of Buildroot, rather than starting from an extracted +source code tarball. Git is the easiest way to develop from and +directly send your patches to the mailing list. Refer to Chapter 3, +Getting Buildroot for more information on obtaining a Buildroot git +tree. + +21.1. Reproducing, analyzing and fixing bugs + +A first way of contributing is to have a look at the open bug reports +in the Buildroot bug tracker [https://bugs.buildroot.org/buglist.cgi? +product=buildroot]. As we strive to keep the bug count as small as +possible, all help in reproducing, analyzing and fixing reported bugs +is more than welcome. Don’t hesitate to add a comment to bug reports +reporting your findings, even if you don’t yet see the full picture. + +21.2. Analyzing and fixing autobuild failures + +The Buildroot autobuilders are a set of build machines that +continuously run Buildroot builds based on random configurations. +This is done for all architectures supported by Buildroot, with +various toolchains, and with a random selection of packages. With the +large commit activity on Buildroot, these autobuilders are a great +help in detecting problems very early after commit. + +All build results are available at http://autobuild.buildroot.org, +statistics are at http://autobuild.buildroot.org/stats.php. Every +day, an overview of all failed packages is sent to the mailing list. + +Detecting problems is great, but obviously these problems have to be +fixed as well. Your contribution is very welcome here! There are +basically two things that can be done: + + * Analyzing the problems. The daily summary mails do not contain + details about the actual failures: in order to see what’s going + on you have to open the build log and check the last output. + Having someone doing this for all packages in the mail is very + useful for other developers, as they can make a quick initial + analysis based on this output alone. + * Fixing a problem. When fixing autobuild failures, you should + follow these steps: + + 1. Check if you can reproduce the problem by building with the + same configuration. You can do this manually, or use the + br-reproduce-build [http://git.buildroot.org/buildroot-test/ + tree/utils/br-reproduce-build] script that will automatically + clone a Buildroot git repository, checkout the correct + revision, download and set the right configuration, and start + the build. + 2. Analyze the problem and create a fix. + 3. Verify that the problem is really fixed by starting from a + clean Buildroot tree and only applying your fix. + 4. Send the fix to the Buildroot mailing list (see Section 21.5, + “Submitting patches”). In case you created a patch against + the package sources, you should also send the patch upstream + so that the problem will be fixed in a later release, and the + patch in Buildroot can be removed. In the commit message of a + patch fixing an autobuild failure, add a reference to the + build result directory, as follows: + +Fixes: http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069 + +21.3. Reviewing and testing patches + +With the amount of patches sent to the mailing list each day, the +maintainer has a very hard job to judge which patches are ready to +apply and which ones aren’t. Contributors can greatly help here by +reviewing and testing these patches. + +In the review process, do not hesitate to respond to patch +submissions for remarks, suggestions or anything that will help +everyone to understand the patches and make them better. Please use +internet style replies in plain text emails when responding to patch +submissions. + +To indicate approval of a patch, there are three formal tags that +keep track of this approval. To add your tag to a patch, reply to it +with the approval tag below the original author’s Signed-off-by line. +These tags will be picked up automatically by patchwork (see +Section 21.3.1, “Applying Patches from Patchwork”) and will be part +of the commit log when the patch is accepted. + +Tested-by + Indicates that the patch has been tested successfully. You are + encouraged to specify what kind of testing you performed + (compile-test on architecture X and Y, runtime test on target A, + …). This additional information helps other testers and the + maintainer. +Reviewed-by + Indicates that you code-reviewed the patch and did your best in + spotting problems, but you are not sufficiently familiar with the + area touched to provide an Acked-by tag. This means that there + may be remaining problems in the patch that would be spotted by + someone with more experience in that area. Should such problems + be detected, your Reviewed-by tag remains appropriate and you + cannot be blamed. +Acked-by + Indicates that you code-reviewed the patch and you are familiar + enough with the area touched to feel that the patch can be + committed as-is (no additional changes required). In case it + later turns out that something is wrong with the patch, your + Acked-by could be considered inappropriate. The difference + between Acked-by and Reviewed-by is thus mainly that you are + prepared to take the blame on Acked patches, but not on Reviewed + ones. + +If you reviewed a patch and have comments on it, you should simply +reply to the patch stating these comments, without providing a +Reviewed-by or Acked-by tag. These tags should only be provided if +you judge the patch to be good as it is. + +It is important to note that neither Reviewed-by nor Acked-by imply +that testing has been performed. To indicate that you both reviewed +and tested the patch, provide two separate tags (Reviewed/Acked-by +and Tested-by). + +Note also that any developer can provide Tested/Reviewed/Acked-by +tags, without exception, and we encourage everyone to do this. +Buildroot does not have a defined group of core developers, it just +so happens that some developers are more active than others. The +maintainer will value tags according to the track record of their +submitter. Tags provided by a regular contributor will naturally be +trusted more than tags provided by a newcomer. As you provide tags +more regularly, your trustworthiness (in the eyes of the maintainer) +will go up, but any tag provided is valuable. + +Buildroot’s Patchwork website can be used to pull in patches for +testing purposes. Please see Section 21.3.1, “Applying Patches from +Patchwork” for more information on using Buildroot’s Patchwork +website to apply patches. + +21.3.1. Applying Patches from Patchwork + +The main use of Buildroot’s Patchwork website for a developer is for +pulling in patches into their local git repository for testing +purposes. + +When browsing patches in the patchwork management interface, an mbox +link is provided at the top of the page. Copy this link address and +run the following commands: + +$ git checkout -b +$ wget -O - | git am + +Another option for applying patches is to create a bundle. A bundle +is a set of patches that you can group together using the patchwork +interface. Once the bundle is created and the bundle is made public, +you can copy the mbox link for the bundle and apply the bundle using +the above commands. + +21.4. Work on items from the TODO list + +If you want to contribute to Buildroot but don’t know where to start, +and you don’t like any of the above topics, you can always work on +items from the Buildroot TODO list [http://elinux.org/Buildroot# +Todo_list]. Don’t hesitate to discuss an item first on the mailing +list or on IRC. Do edit the wiki to indicate when you start working +on an item, so we avoid duplicate efforts. + +21.5. Submitting patches + +Note + +Please, do not attach patches to bugs, send them to the mailing list +instead. + +If you made some changes to Buildroot and you would like to +contribute them to the Buildroot project, proceed as follows. + +21.5.1. The formatting of a patch + +We expect patches to be formatted in a specific way. This is +necessary to make it easy to review patches, to be able to apply them +easily to the git repository, to make it easy to find back in the +history how and why things have changed, and to make it possible to +use git bisect to locate the origin of a problem. + +First of all, it is essential that the patch has a good commit +message. The commit message should start with a separate line with a +brief summary of the change, prefixed by the area touched by the +patch. A few examples of good commit titles: + + * package/linuxptp: bump version to 2.0 + * configs/imx23evk: bump Linux version to 4.19 + * package/pkg-generic: postpone evaluation of dependency conditions + * boot/uboot: needs host-{flex,bison} + * support/testing: add python-ubjson tests + +The description that follows the prefix should start with a lower +case letter (i.e "bump", "needs", "postpone", "add" in the above +examples). + +Second, the body of the commit message should describe why this +change is needed, and if necessary also give details about how it was +done. When writing the commit message, think of how the reviewers +will read it, but also think about how you will read it when you look +at this change again a few years down the line. + +Third, the patch itself should do only one change, but do it +completely. Two unrelated or weakly related changes should usually be +done in two separate patches. This usually means that a patch affects +only a single package. If several changes are related, it is often +still possible to split them up in small patches and apply them in a +specific order. Small patches make it easier to review, and often +make it easier to understand afterwards why a change was done. +However, each patch must be complete. It is not allowed that the +build is broken when only the first but not the second patch is +applied. This is necessary to be able to use git bisect afterwards. + +Of course, while you’re doing your development, you’re probably going +back and forth between packages, and certainly not committing things +immediately in a way that is clean enough for submission. So most +developers rewrite the history of commits to produce a clean set of +commits that is appropriate for submission. To do this, you need to +use interactive rebasing. You can learn about it in the Pro Git book +[https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History]. +Sometimes, it is even easier to discard you history with git reset +--soft origin/master and select individual changes with git add -i or +git add -p. + +Finally, the patch should be signed off. This is done by adding +Signed-off-by: Your Real Name <> at the end of the commit message. +git commit -s does that for you, if configured properly. The +Signed-off-by tag means that you publish the patch under the +Buildroot license (i.e. GPL-2.0+, except for package patches, which +have the upstream license), and that you are allowed to do so. See +the Developer Certificate of Origin [http://developercertificate.org +/] for details. + +When adding new packages, you should submit every package in a +separate patch. This patch should have the update to package/ +Config.in, the package Config.in file, the .mk file, the .hash file, +any init script, and all package patches. If the package has many +sub-options, these are sometimes better added as separate follow-up +patches. The summary line should be something like : new +package. The body of the commit message can be empty for simple +packages, or it can contain the description of the package (like the +Config.in help text). If anything special has to be done to build the +package, this should also be explained explicitly in the commit +message body. + +When you bump a package to a new version, you should also submit a +separate patch for each package. Don’t forget to update the .hash +file, or add it if it doesn’t exist yet. Also don’t forget to check +if the _LICENSE and _LICENSE_FILES are still valid. The summary line +should be something like : bump to version . If the new version only contains security updates compared +to the existing one, the summary should be : security +bump to version and the commit message body should show +the CVE numbers that are fixed. If some package patches can be +removed in the new version, it should be explained explicitly why +they can be removed, preferably with the upstream commit ID. Also any +other required changes should be explained explicitly, like configure +options that no longer exist or are no longer needed. + +If you are interested in getting notified of build failures and of +further changes in the packages you added or modified, please add +yourself to the DEVELOPERS file. This should be done in the same +patch creating or modifying the package. See the DEVELOPERS file for +more information. + +Buildroot provides a handy tool to check for common coding style +mistakes on files you created or modified, called check-package (see +Section 17.24.2, “How to check the coding style” for more +information). + +21.5.2. Preparing a patch series + +Starting from the changes committed in your local git view, rebase +your development branch on top of the upstream tree before generating +a patch set. To do so, run: + +$ git fetch --all --tags +$ git rebase origin/master + +Now, you are ready to generate then submit your patch set. + +To generate it, run: + +$ git format-patch -M -n -s -o outgoing origin/master + +This will generate patch files in the outgoing subdirectory, +automatically adding the Signed-off-by line. + +Once patch files are generated, you can review/edit the commit +message before submitting them, using your favorite text editor. + +Buildroot provides a handy tool to know to whom your patches should +be sent, called get-developers (see Chapter 22, DEVELOPERS file and +get-developers for more information). This tool reads your patches +and outputs the appropriate git send-email command to use: + +$ ./utils/get-developers outgoing/* + +Use the output of get-developers to send your patches: + +$ git send-email --to buildroot@buildroot.org --cc bob --cc alice outgoing/* + +Alternatively, get-developers -e can be used directly with the +--cc-cmd argument to git send-email to automatically CC the affected +developers: + +$ git send-email --to buildroot@buildroot.org \ + --cc-cmd './utils/get-developers -e' origin/master + +git can be configured to automatically do this out of the box with: + +$ git config sendemail.to buildroot@buildroot.org +$ git config sendemail.ccCmd "$(pwd)/utils/get-developers -e" + +And then just do: + +$ git send-email origin/master + +Note that git should be configured to use your mail account. To +configure git, see man git-send-email or google it. + +If you do not use git send-email, make sure posted patches are not +line-wrapped, otherwise they cannot easily be applied. In such a +case, fix your e-mail client, or better yet, learn to use git +send-email. + +21.5.3. Cover letter + +If you want to present the whole patch set in a separate mail, add +--cover-letter to the git format-patch command (see man +git-format-patch for further information). This will generate a +template for an introduction e-mail to your patch series. + +A cover letter may be useful to introduce the changes you propose in +the following cases: + + * large number of commits in the series; + * deep impact of the changes in the rest of the project; + * RFC ^[4]; + * whenever you feel it will help presenting your work, your + choices, the review process, etc. + +21.5.4. Patch revision changelog + +When improvements are requested, the new revision of each commit +should include a changelog of the modifications between each +submission. Note that when your patch series is introduced by a cover +letter, an overall changelog may be added to the cover letter in +addition to the changelog in the individual commits. The best thing +to rework a patch series is by interactive rebasing: git rebase -i +origin/master. Consult the git manual for more information. + +When added to the individual commits, this changelog is added when +editing the commit message. Below the Signed-off-by section, add --- +and your changelog. + +Although the changelog will be visible for the reviewers in the mail +thread, as well as in patchwork [http://patchwork.buildroot.org], git +will automatically ignores lines below --- when the patch will be +merged. This is the intended behavior: the changelog is not meant to +be preserved forever in the git history of the project. + +Hereafter the recommended layout: + +Patch title: short explanation, max 72 chars + +A paragraph that explains the problem, and how it manifests itself. If +the problem is complex, it is OK to add more paragraphs. All paragraphs +should be wrapped at 72 characters. + +A paragraph that explains the root cause of the problem. Again, more +than one paragraph is OK. + +Finally, one or more paragraphs that explain how the problem is solved. +Don't hesitate to explain complex solutions in detail. + +Signed-off-by: John DOE + +--- +Changes v2 -> v3: + - foo bar (suggested by Jane) + - bar buz + +Changes v1 -> v2: + - alpha bravo (suggested by John) + - charly delta + +Any patch revision should include the version number. The version +number is simply composed of the letter v followed by an integer +greater or equal to two (i.e. "PATCH v2", "PATCH v3" …). + +This can be easily handled with git format-patch by using the option +--subject-prefix: + +$ git format-patch --subject-prefix "PATCH v4" \ + -M -s -o outgoing origin/master + +Since git version 1.8.1, you can also use -v (where is the +version number): + +$ git format-patch -v4 -M -s -o outgoing origin/master + +When you provide a new version of a patch, please mark the old one as +superseded in patchwork [http://patchwork.buildroot.org]. You need to +create an account on patchwork [http://patchwork.buildroot.org] to be +able to modify the status of your patches. Note that you can only +change the status of patches you submitted yourself, which means the +email address you register in patchwork [http:// +patchwork.buildroot.org] should match the one you use for sending +patches to the mailing list. + +You can also add the --in-reply-to option when +submitting a patch to the mailing list. The id of the mail to reply +to can be found under the "Message Id" tag on patchwork [http:// +patchwork.buildroot.org]. The advantage of in-reply-to is that +patchwork will automatically mark the previous version of the patch +as superseded. + +21.6. Reporting issues/bugs or getting help + +Before reporting any issue, please check in the mailing list archive +whether someone has already reported and/or fixed a similar problem. + +However you choose to report bugs or get help, either by opening a +bug in the bug tracker or by sending a mail to the mailing list, +there are a number of details to provide in order to help people +reproduce and find a solution to the issue. + +Try to think as if you were trying to help someone else; in that +case, what would you need? + +Here is a short list of details to provide in such case: + + * host machine (OS/release) + * version of Buildroot + * target for which the build fails + * package(s) for which the build fails + * the command that fails and its output + * any information you think that may be relevant + +Additionally, you should add the .config file (or if you know how, a +defconfig; see Section 9.3, “Storing the Buildroot configuration”). + +If some of these details are too large, do not hesitate to use a +pastebin service. Note that not all available pastebin services will +preserve Unix-style line terminators when downloading raw pastes. +Following pastebin services are known to work correctly: - https:// +gist.github.com/ - http://code.bulix.org/ + +21.7. Using the run-tests framework + +Buildroot includes a run-time testing framework called run-tests +built upon Python scripting and QEMU runtime execution. There are two +types of test cases within the framework, one for build time tests +and another for run-time tests that have a QEMU dependency. The goals +of the framework are the following: + + * build a well defined configuration + * optionally, verify some properties of the build output + * if it is a run-time test: + + + boot it under QEMU + + run some test condition to verify that a given feature is + working + +The run-tests tool has a series of options documented in the tool’s +help -h description. Some common options include setting the download +folder, the output folder, keeping build output, and for multiple +test cases, you can set the JLEVEL for each. + +Here is an example walk through of running a test case. + + * For a first step, let us see what all the test case options are. + The test cases can be listed by executing support/testing/ + run-tests -l. These tests can all be run individually during test + development from the console. Both one at a time and selectively + as a group of a subset of tests. + +$ support/testing/run-tests -l +List of tests +test_run (tests.utils.test_check_package.TestCheckPackage) +Test the various ways the script can be called in a simple top to ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootMusl) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainBuildrootuClibc) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainCCache) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainCtngMusl) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainLinaroArm) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv4) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv5) ... ok +test_run (tests.toolchain.test_external.TestExternalToolchainSourceryArmv7) ... ok +[snip] +test_run (tests.init.test_systemd.TestInitSystemSystemdRoFull) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRoIfupdown) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRoNetworkd) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwFull) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwIfupdown) ... ok +test_run (tests.init.test_systemd.TestInitSystemSystemdRwNetworkd) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRo) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRoNet) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRw) ... ok +test_run (tests.init.test_busybox.TestInitSystemBusyboxRwNet) ... ok + +Ran 157 tests in 0.021s + +OK + +Those runtime tests are regularly executed by Buildroot Gitlab CI +infrastructure, see .gitlab.yml and https://gitlab.com/buildroot.org/ +buildroot/-/jobs. + +21.7.1. Creating a test case + +The best way to get familiar with how to create a test case is to +look at a few of the basic file system support/testing/tests/fs/ and +init support/testing/tests/init/ test scripts. Those tests give good +examples of a basic build and build with run type of tests. There are +other more advanced cases that use things like nested br2-external +folders to provide skeletons and additional packages. + +The test cases by default use a br-arm-full-* uClibc-ng toolchain and +the prebuild kernel for a armv5/7 cpu. It is recommended to use the +default defconfig test configuration except when Glibc/musl or a +newer kernel are necessary. By using the default it saves build time +and the test would automatically inherit a kernel/std library upgrade +when the default is updated. + +The basic test case definition involves + + * Creation of a new test file + * Defining a unique test class + * Determining if the default defconfig plus test options can be + used + * Implementing a def test_run(self): function to optionally startup + the emulator and provide test case conditions. + +After creating the test script, add yourself to the DEVELOPERS file +to be the maintainer of that test case. + +21.7.2. Debugging a test case + +Within the Buildroot repository, the testing framework is organized +at the top level in support/testing/ by folders of conf, infra and +tests. All the test cases live under the test folder and are +organized in various folders representing the catagory of test. + +Lets walk through an example. + + * Using the Busybox Init system test case with a read/write rootfs + tests.init.test_busybox.TestInitSystemBusyboxRw + * A minimal set of command line arguments when debugging a test + case would include -d which points to your dl folder, -o to an + output folder, and -k to keep any output on both pass/fail. With + those options, the test will retain logging and build artifacts + providing status of the build and execution of the test case. + +$ support/testing/run-tests -d dl -o output_folder -k tests.init.test_busybox.TestInitSystemBusyboxRw +15:03:26 TestInitSystemBusyboxRw Starting +15:03:28 TestInitSystemBusyboxRw Building +15:08:18 TestInitSystemBusyboxRw Building done +15:08:27 TestInitSystemBusyboxRw Cleaning up +. +Ran 1 test in 301.140s + +OK + + * For the case of a successful build, the output_folder would + contain a folder with the Buildroot build, build log + and run-time log. If the build failed, the console output would + show the stage at which it failed (setup / build / run). + Depending on the failure stage, the build/run logs and/or + Buildroot build artifacts can be inspected and instrumented. If + the QEMU instance needs to be launched for additional testing, + the first few lines of the run-time log capture it and it would + allow some incremental testing without re-running support/testing + /run-tests. + * You can also make modifications to the current sources inside the + output_folder (e.g. for debug purposes) and rerun the standard + Buildroot make targets (in order to regenerate the complete image + with the new modifications) and then rerun the test. Modifying + the sources directly can speed up debugging compared to adding + patch files, wiping the output directoy, and starting the test + again. + +$ ls output_folder/ +TestInitSystemBusyboxRw/ +TestInitSystemBusyboxRw-build.log +TestInitSystemBusyboxRw-run.log + + * The source file used to implement this example test is found + under support/testing/tests/init/test_busybox.py. This file + outlines the minimal defconfig that creates the build, QEMU + configuration to launch the built images and the test case + assertions. + +To test an existing or new test case within Gitlab CI, there is a +method of invoking a specific test by creating a Buildroot fork in +Gitlab under your account. This can be handy when adding/changing a +run-time test or fixing a bug on a use case tested by a run-time test +case. + +In the examples below, the component of the branch name is a +unique string you choose to identify this specific job being created. + + * to trigger all run-test test case jobs: + + $ git push gitlab HEAD:-runtime-tests + + * to trigger one test case job, a specific branch naming string is + used that includes the full test case name. + + $ git push gitlab HEAD:- + + +--------------------------------------------------------------------- + +^[4] RFC: (Request for comments) change proposal + +Chapter 22. DEVELOPERS file and get-developers + +The main Buildroot directory contains a file named DEVELOPERS that +lists the developers involved with various areas of Buildroot. Thanks +to this file, the get-developers tool allows to: + + * Calculate the list of developers to whom patches should be sent, + by parsing the patches and matching the modified files with the + relevant developers. See Section 21.5, “Submitting patches” for + details. + * Find which developers are taking care of a given architecture or + package, so that they can be notified when a build failure occurs + on this architecture or package. This is done in interaction with + Buildroot’s autobuild infrastructure. + +We ask developers adding new packages, new boards, or generally new +functionality in Buildroot, to register themselves in the DEVELOPERS +file. As an example, we expect a developer contributing a new package +to include in his patch the appropriate modification to the +DEVELOPERS file. + +The DEVELOPERS file format is documented in detail inside the file +itself. + +The get-developers tool, located in utils/ allows to use the +DEVELOPERS file for various tasks: + + * When passing one or several patches as command line argument, + get-developers will return the appropriate git send-email + command. If the -e option is passed, only the email addresses are + printed in a format suitable for git send-email --cc-cmd. + * When using the -a command line option, get-developers will + return the list of developers in charge of the given + architecture. + * When using the -p command line option, get-developers + will return the list of developers in charge of the given + package. + * When using the -c command line option, get-developers will look + at all files under version control in the Buildroot repository, + and list the ones that are not handled by any developer. The + purpose of this option is to help completing the DEVELOPERS file. + * When using without any arguments, it validates the integrity of + the DEVELOPERS file and will note WARNINGS for items that don’t + match. + +Chapter 23. Release Engineering + +23.1. Releases + +The Buildroot project makes quarterly releases with monthly bugfix +releases. The first release of each year is a long term support +release, LTS. + + * Quarterly releases: 2020.02, 2020.05, 2020.08, and 2020.11 + * Bugfix releases: 2020.02.1, 2020.02.2, … + * LTS releases: 2020.02, 2021.02, … + +Releases are supported until the first bugfix release of the next +release, e.g., 2020.05.x is EOL when 2020.08.1 is released. + +LTS releases are supported until the first bugfix release of the next +LTS, e.g., 2020.02.x is supported until 2021.02.1 is released. + +23.2. Development + +Each release cycle consist of two months of development on the master +branch and one month stabilization before the release is made. During +this phase no new features are added to master, only bugfixes. + +The stabilization phase starts with tagging -rc1, and every week +until the release, another release candidate is tagged. + +To handle new features and version bumps during the stabilization +phase, a next branch may be created for these features. Once the +current release has been made, the next branch is merged into master +and the development cycle for the next release continues there. + +Part IV. Appendix + +Table of Contents + +24. Makedev syntax documentation +25. Makeusers syntax documentation +26. Migrating from older Buildroot versions + + 26.1. Migrating to 2016.11 + 26.2. Migrating to 2017.08 + +Chapter 24. Makedev syntax documentation + +The makedev syntax is used in several places in Buildroot to define +changes to be made for permissions, or which device files to create +and how to create them, in order to avoid calls to mknod. + +This syntax is derived from the makedev utility, and more complete +documentation can be found in the package/makedevs/README file. + +It takes the form of a space separated list of fields, one file per +line; the fields are: + ++--------------------------------------------------+ +|name|type|mode|uid|gid|major|minor|start|inc|count| ++--------------------------------------------------+ + +There are a few non-trivial blocks: + + * name is the path to the file you want to create/modify + * type is the type of the file, being one of: + + + f: a regular file + + d: a directory + + r: a directory recursively + + c: a character device file + + b: a block device file + + p: a named pipe + * mode are the usual permissions settings (only numerical values + are allowed) + * uid and gid are the UID and GID to set on this file; can be + either numerical values or actual names + * major and minor are here for device files, set to - for other + files + * start, inc and count are for when you want to create a batch of + files, and can be reduced to a loop, beginning at start, + incrementing its counter by inc until it reaches count + +Let’s say you want to change the permissions of a given file; using +this syntax, you will need to write: + +/usr/bin/foo f 755 0 0 - - - - - +/usr/bin/bar f 755 root root - - - - - +/data/buz f 644 buz-user buz-group - - - - - + +Alternatively, if you want to change owner/permission of a directory +recursively, you can write (to set UID to foo, GID to bar and access +rights to rwxr-x--- for the directory /usr/share/myapp and all files +and directories below it): + +/usr/share/myapp r 750 foo bar - - - - - + +On the other hand, if you want to create the device file /dev/hda and +the corresponding 15 files for the partitions, you will need for /dev +/hda: + +/dev/hda b 640 root root 3 0 0 0 - + +and then for device files corresponding to the partitions of /dev/ +hda, /dev/hdaX, X ranging from 1 to 15: + +/dev/hda b 640 root root 3 1 1 1 15 + +Extended attributes are supported if +BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is enabled. This +is done by adding a line starting with |xattr after the line +describing the file. Right now, only capability is supported as +extended attribute. + ++------------------+ +||xattr|capability | ++------------------+ + + * |xattr is a "flag" that indicate an extended attribute + * capability is a capability to add to the previous file + +If you want to add the capability cap_sys_admin to the binary foo, +you will write : + +/usr/bin/foo f 755 root root - - - - - +|xattr cap_sys_admin+eip + +You can add several capabilities to a file by using several |xattr +lines. If you want to add the capability cap_sys_admin and +cap_net_admin to the binary foo, you will write : + +/usr/bin/foo f 755 root root - - - - - +|xattr cap_sys_admin+eip +|xattr cap_net_admin+eip + +Chapter 25. Makeusers syntax documentation + +The syntax to create users is inspired by the makedev syntax, above, +but is specific to Buildroot. + +The syntax for adding a user is a space-separated list of fields, one +user per line; the fields are: + ++---------------------------------------------------------+ +|username|uid|group|gid|password|home|shell|groups|comment| ++---------------------------------------------------------+ + +Where: + + * username is the desired user name (aka login name) for the user. + It can not be root, and must be unique. If set to -, then just a + group will be created. + * uid is the desired UID for the user. It must be unique, and not + 0. If set to -1, then a unique UID will be computed by Buildroot + in the range [1000…1999] + * group is the desired name for the user’s main group. It can not + be root. If the group does not exist, it will be created. + * gid is the desired GID for the user’s main group. It must be + unique, and not 0. If set to -1, and the group does not already + exist, then a unique GID will be computed by Buildroot in the + range [1000..1999] + * password is the crypt(3)-encoded password. If prefixed with !, + then login is disabled. If prefixed with =, then it is + interpreted as clear-text, and will be crypt-encoded (using MD5). + If prefixed with !=, then the password will be crypt-encoded + (using MD5) and login will be disabled. If set to *, then login + is not allowed. If set to -, then no password value will be set. + * home is the desired home directory for the user. If set to -, no + home directory will be created, and the user’s home will be /. + Explicitly setting home to / is not allowed. + * shell is the desired shell for the user. If set to -, then /bin/ + false is set as the user’s shell. + * groups is the comma-separated list of additional groups the user + should be part of. If set to -, then the user will be a member of + no additional group. Missing groups will be created with an + arbitrary gid. + * comment (aka GECOS [https://en.wikipedia.org/wiki/Gecos_field] + field) is an almost-free-form text. + +There are a few restrictions on the content of each field: + + * except for comment, all fields are mandatory. + * except for comment, fields may not contain spaces. + * no field may contain a colon (:). + +If home is not -, then the home directory, and all files below, will +belong to the user and its main group. + +Examples: + +foo -1 bar -1 !=blabla /home/foo /bin/sh alpha,bravo Foo user + +This will create this user: + + * username (aka login name) is: foo + * uid is computed by Buildroot + * main group is: bar + * main group gid is computed by Buildroot + * clear-text password is: blabla, will be crypt(3)-encoded, and + login is disabled. + * home is: /home/foo + * shell is: /bin/sh + * foo is also a member of groups: alpha and bravo + * comment is: Foo user + +test 8000 wheel -1 = - /bin/sh - Test user + +This will create this user: + + * username (aka login name) is: test + * uid is : 8000 + * main group is: wheel + * main group gid is computed by Buildroot, and will use the value + defined in the rootfs skeleton + * password is empty (aka no password). + * home is / but will not belong to test + * shell is: /bin/sh + * test is not a member of any additional groups + * comment is: Test user + +Chapter 26. Migrating from older Buildroot versions + +Some versions have introduced backward incompatibilities. This +section explains those incompatibilities, and for each explains what +to do to complete the migration. + +26.1. Migrating to 2016.11 + +Before Buildroot 2016.11, it was possible to use only one +br2-external tree at once. With Buildroot 2016.11 came the +possibility to use more than one simultaneously (for details, see +Section 9.2, “Keeping customizations outside of Buildroot”). + +This however means that older br2-external trees are not usable +as-is. A minor change has to be made: adding a name to your +br2-external tree. + +This can be done very easily in just a few steps: + + * First, create a new file named external.desc, at the root of your + br2-external tree, with a single line defining the name of your + br2-external tree: + + $ echo 'name: NAME_OF_YOUR_TREE' >external.desc + + Note. Be careful when choosing a name: It has to be unique and be + made with only ASCII characters from the set [A-Za-z0-9_]. + + * Then, change every occurence of BR2_EXTERNAL in your br2-external + tree with the new variable: + + $ find . -type f | xargs sed -i 's/BR2_EXTERNAL/BR2_EXTERNAL_NAME_OF_YOUR_TREE_PATH/g' + +Now, your br2-external tree can be used with Buildroot 2016.11 +onward. + +Note: This change makes your br2-external tree incompatible with +Buildroot before 2016.11. + +26.2. Migrating to 2017.08 + +Before Buildroot 2017.08, host packages were installed in $(HOST_DIR) +/usr (with e.g. the autotools' --prefix=$(HOST_DIR)/usr). With +Buildroot 2017.08, they are now installed directly in $(HOST_DIR). + +Whenever a package installs an executable that is linked with a +library in $(HOST_DIR)/lib, it must have an RPATH pointing to that +directory. + +An RPATH pointing to $(HOST_DIR)/usr/lib is no longer accepted. + diff --git a/buildroot/docs/manual/manual.txt b/buildroot/docs/manual/manual.txt index 3c531e373..48de65ee1 100644 --- a/buildroot/docs/manual/manual.txt +++ b/buildroot/docs/manual/manual.txt @@ -9,10 +9,10 @@ Buildroot {sys:echo $\{BR2_VERSION%%-git*\}} manual generated on {localdate} The Buildroot manual is written by the Buildroot developers. It is licensed under the GNU General Public License, version 2. Refer to the -http://git.buildroot.org/buildroot/tree/COPYING[COPYING] file in the Buildroot -sources for the full text of this license. +http://git.buildroot.org/buildroot/tree/COPYING?id={sys:git rev-parse HEAD}[COPYING] +file in the Buildroot sources for the full text of this license. -Copyright (C) 2004-2014 The Buildroot developers +Copyright (C) 2004-2020 The Buildroot developers image::logo.png[] @@ -64,6 +64,10 @@ include::debugging-buildroot.txt[] include::contribute.txt[] +include::developers.txt[] + +include::release-engineering.txt[] + = Appendix include::appendix.txt[] diff --git a/buildroot/docs/manual/migrating.txt b/buildroot/docs/manual/migrating.txt new file mode 100644 index 000000000..92e487c71 --- /dev/null +++ b/buildroot/docs/manual/migrating.txt @@ -0,0 +1,58 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[migrating-from-ol-versions]] +== Migrating from older Buildroot versions + +Some versions have introduced backward incompatibilities. This section +explains those incompatibilities, and for each explains what to do to +complete the migration. + +[[br2-external-converting]] +=== Migrating to 2016.11 + +Before Buildroot 2016.11, it was possible to use only one br2-external +tree at once. With Buildroot 2016.11 came the possibility to use more +than one simultaneously (for details, see xref:outside-br-custom[]). + +This however means that older br2-external trees are not usable as-is. +A minor change has to be made: adding a name to your br2-external tree. + +This can be done very easily in just a few steps: + + * First, create a new file named +external.desc+, at the root of your + br2-external tree, with a single line defining the name of your + br2-external tree: ++ +---- +$ echo 'name: NAME_OF_YOUR_TREE' >external.desc +---- ++ +.Note +Be careful when choosing a name: It has to be unique and be made +with only ASCII characters from the set +[A-Za-z0-9_]+. + + * Then, change every occurence of +BR2_EXTERNAL+ in your br2-external + tree with the new variable: ++ +---- +$ find . -type f | xargs sed -i 's/BR2_EXTERNAL/BR2_EXTERNAL_NAME_OF_YOUR_TREE_PATH/g' +---- + +Now, your br2-external tree can be used with Buildroot 2016.11 onward. + +.Note: +This change makes your br2-external tree incompatible with Buildroot +before 2016.11. + +[[migrating-host-usr]] +=== Migrating to 2017.08 + +Before Buildroot 2017.08, host packages were installed in +$(HOST_DIR)/usr+ +(with e.g. the autotools' +--prefix=$(HOST_DIR)/usr+). With Buildroot +2017.08, they are now installed directly in +$(HOST_DIR)+. + +Whenever a package installs an executable that is linked with a library +in +$(HOST_DIR)/lib+, it must have an RPATH pointing to that directory. + +An RPATH pointing to +$(HOST_DIR)/usr/lib+ is no longer accepted. diff --git a/buildroot/docs/manual/package-make-target.txt b/buildroot/docs/manual/package-make-target.txt index 25d3f44ea..795c7d46d 100644 --- a/buildroot/docs/manual/package-make-target.txt +++ b/buildroot/docs/manual/package-make-target.txt @@ -59,16 +59,32 @@ Additionally, there are some other useful make targets: |=================================================== | command/target | Description -| +show-depends+ | Displays the dependencies required to build the +| +show-depends+ | Displays the first-order dependencies required to build the package +| +show-recursive-depends+ | Recursively displays the dependencies + required to build the package + +| +show-rdepends+ | Displays the first-order reverse dependencies of + the package (i.e packages that directly depend on it) + +| +show-recursive-rdepends+ | Recursively displays the reverse + dependencies of the package (i.e the packages that depend on it, + directly or indirectly) + | +graph-depends+ | Generate a dependency graph of the package, in the context of the current Buildroot configuration. See xref:graph-depends[this section] for more details about dependency graphs. +| +graph-rdepends+ | Generate a graph of this package reverse + dependencies (i.e the packages that depend on it, directly or + indirectly) + | +dirclean+ | Remove the whole package build directory +| +reinstall+ | Re-run the install commands + | +rebuild+ | Re-run the compilation commands - this only makes sense when using the +OVERRIDE_SRCDIR+ feature or when you modified a file directly in the build directory diff --git a/buildroot/docs/manual/patch-policy.txt b/buildroot/docs/manual/patch-policy.txt index 6e27e717a..e704a0d3f 100644 --- a/buildroot/docs/manual/patch-policy.txt +++ b/buildroot/docs/manual/patch-policy.txt @@ -19,9 +19,14 @@ global patch directory. ==== Downloaded If it is necessary to apply a patch that is available for download, then add it -to the +_PATCH+ variable. It is downloaded from the same site -as the package itself. It can be a single patch, or a tarball containing a -patch series. +to the +_PATCH+ variable. If an entry contains +://+, +then Buildroot will assume it is a full URL and download the patch +from this location. Otherwise, Buildroot will assume that the patch should be +downloaded from +_SITE+. It can be a single patch, +or a tarball containing a patch series. + +Like for all downloads, a hash should be added to the +.hash+ +file. This method is typically used for packages from Debian. @@ -73,12 +78,12 @@ details. * If a +series+ file exists in the package directory, then patches are applied according to the +series+ file; + -* Otherwise, patch files matching +-*.patch+ - are applied in alphabetical order. +* Otherwise, patch files matching +*.patch+ are applied in alphabetical + order. So, to ensure they are applied in the right order, it is highly recommended to name the patch files like this: - +--.patch+, where ++ - refers to the 'apply order'. + +-.patch+, where ++ refers to the + 'apply order'. . If +BR2_GLOBAL_PATCH_DIR+ is defined, the directories will be enumerated in the order they are specified. The patches are applied @@ -90,8 +95,8 @@ If something goes wrong in the steps _3_ or _4_, then the build fails. === Format and licensing of the package patches -Patches are released under the same license as the software that is -modified. +Patches are released under the same license as the software they apply +to (see xref:legal-info-buildroot[]). A message explaining what the patch does, and why it is needed, should be added in the header commentary of the patch. @@ -106,6 +111,10 @@ upstream SCM software to generate the patch set. Otherwise, concatenate the header with the output of the +diff -purN package-version.orig/ package-version/+ command. +If you update an existing patch (e.g. when bumping the package version), +make sure the existing From header and Signed-off-by tags are not +removed, but do update the rest of the patch comment when appropriate. + At the end, the patch should look like: --------------- diff --git a/buildroot/docs/manual/prerequisite.txt b/buildroot/docs/manual/prerequisite.txt index 6ee01b4a7..4e614cfa1 100644 --- a/buildroot/docs/manual/prerequisite.txt +++ b/buildroot/docs/manual/prerequisite.txt @@ -23,8 +23,8 @@ between distributions). ** +make+ (version 3.81 or any later) ** +binutils+ ** +build-essential+ (only for Debian based systems) -** +gcc+ (version 2.95 or any later) -** `g++` (version 2.95 or any later) +** +gcc+ (version 4.8 or any later) +** `g++` (version 4.8 or any later) ** +bash+ ** +patch+ ** +gzip+ @@ -32,9 +32,10 @@ between distributions). ** +perl+ (version 5.8.7 or any later) ** +tar+ ** +cpio+ -** +python+ (version 2.6 or 2.7) ** +unzip+ ** +rsync+ +** +file+ (must be in +/usr/bin/file+) +** +bc+ * Source fetching tools: ** +wget+ @@ -43,6 +44,14 @@ between distributions). === Optional packages +* Recommended dependencies: ++ +Some features or utilities in Buildroot, like the legal-info, or the +graph generation tools, have additional dependencies. Although they +are not mandatory for a simple build, they are still highly recommended: ++ +** +python+ (version 2.7 or any later) + * Configuration interface dependencies: + For these libraries, you need to install both runtime and development @@ -50,7 +59,7 @@ data, which in many distributions are packaged separately. The development packages typically have a _-dev_ or _-devel_ suffix. + ** +ncurses5+ to use the 'menuconfig' interface -** +qt4+ to use the 'xconfig' interface +** +qt5+ to use the 'xconfig' interface ** +glib2+, +gtk2+ and +glade2+ to use the 'gconfig' interface * Source fetching tools: diff --git a/buildroot/docs/manual/quickstart.txt b/buildroot/docs/manual/quickstart.txt index 74158ae24..80569e85f 100644 --- a/buildroot/docs/manual/quickstart.txt +++ b/buildroot/docs/manual/quickstart.txt @@ -60,10 +60,10 @@ To start the build process, simply run: $ make -------------------- -You *should never* use +make -jN+ with Buildroot: top-level parallel -make is currently not supported. Instead, use the +BR2_JLEVEL+ option -to tell Buildroot to run the compilation of each individual package -with +make -jN+. +By default, Buildroot does not support top-level parallel build, so +running +make -jN+ is not necessary. There is however experimental +support for top-level parallel build, see +xref:top-level-parallel-build[]. The `make` command will generally perform the following steps: @@ -87,15 +87,21 @@ This directory contains several subdirectories: target). This directory contains one subdirectory for each of these components. -* +staging/+ which contains a hierarchy similar to a root filesystem - hierarchy. This directory contains the headers and libraries of the - cross-compilation toolchain and all the userspace packages selected - for the target. However, this directory is 'not' intended to be - the root filesystem for the target: it contains a lot of development - files, unstripped binaries and libraries that make it far too big - for an embedded system. These development files are used to compile - libraries and applications for the target that depend on other - libraries. +* +host/+ contains both the tools built for the host, and the sysroot + of the target toolchain. The former is an installation of tools + compiled for the host that are needed for the proper execution of + Buildroot, including the cross-compilation toolchain. The latter + is a hierarchy similar to a root filesystem hierarchy. It contains + the headers and libraries of all user-space packages that provide + and install libraries used by other packages. However, this + directory is 'not' intended to be the root filesystem for the target: + it contains a lot of development files, unstripped binaries and + libraries that make it far too big for an embedded system. These + development files are used to compile libraries and applications for + the target that depend on other libraries. + +* +staging/+ is a symlink to the target toolchain sysroot inside + +host/+, which exists for backwards compatibility. * +target/+ which contains 'almost' the complete root filesystem for the target: everything needed is present except the device files in @@ -111,10 +117,6 @@ This directory contains several subdirectories: development files (headers, etc.) are not present, the binaries are stripped. -* +host/+ contains the installation of tools compiled for the host - that are needed for the proper execution of Buildroot, including the - cross-compilation toolchain. - These commands, +make menuconfig|nconfig|gconfig|xconfig+ and +make+, are the basic ones that allow to easily and quickly generate images fitting your needs, with all the features and applications you enabled. diff --git a/buildroot/docs/manual/rebuilding-packages.txt b/buildroot/docs/manual/rebuilding-packages.txt index 6faa67adc..06d385514 100644 --- a/buildroot/docs/manual/rebuilding-packages.txt +++ b/buildroot/docs/manual/rebuilding-packages.txt @@ -65,6 +65,16 @@ can help you understand how to work with Buildroot: there is no need for a full rebuild: a simple +make+ invocation will take the changes into account. + * When a package listed in +FOO_DEPENDENCIES+ is rebuilt or removed, + the package +foo+ is not automatically rebuilt. For example, if a + package +bar+ is listed in +FOO_DEPENDENCIES+ with +FOO_DEPENDENCIES + = bar+ and the configuration of the +bar+ package is changed, the + configuration change would not result in a rebuild of package +foo+ + automatically. In this scenario, you may need to either rebuild any + packages in your build which reference +bar+ in their +DEPENDENCIES+, + or perform a full rebuild to ensure any +bar+ dependent packages are + up to date. + Generally speaking, when you're facing a build error and you're unsure of the potential consequences of the configuration changes you've made, do a full rebuild. If you get the same build error, then you are @@ -99,16 +109,20 @@ re-configure, re-compile and re-install this package from scratch. You can ask buildroot to do this with the +make -dirclean+ command. On the other hand, if you only want to restart the build process of a -package from its compilation step, you can run +make --rebuild+, followed by +make+ or +make +. It will -restart the compilation and installation of the package, but not from -scratch: it basically re-executes +make+ and +make install+ -inside the package, so it will only rebuild files that changed. - -If you want to restart the build process of a package from its -configuration step, you can run +make -reconfigure+, followed -by +make+ or +make +. It will restart the configuration, -compilation and installation of the package. +package from its compilation step, you can run +make -rebuild+. It +will restart the compilation and installation of the package, but not from +scratch: it basically re-executes +make+ and +make install+ inside the package, +so it will only rebuild files that changed. + +If you want to restart the build process of a package from its configuration +step, you can run +make -reconfigure+. It will restart the +configuration, compilation and installation of the package. + +While +-rebuild+ implies +-reinstall+ and ++-reconfigure+ implies +-rebuild+, these targets as well +as ++ only act on the said package, and do not trigger re-creating +the root filesystem image. If re-creating the root filesystem in necessary, +one should in addition run +make+ or +make all+. Internally, Buildroot creates so-called _stamp files_ to keep track of which build steps have been completed for each package. They are diff --git a/buildroot/docs/manual/release-engineering.txt b/buildroot/docs/manual/release-engineering.txt new file mode 100644 index 000000000..0cf38183f --- /dev/null +++ b/buildroot/docs/manual/release-engineering.txt @@ -0,0 +1,34 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[RELENG]] +== Release Engineering +=== Releases + +The Buildroot project makes quarterly releases with monthly bugfix +releases. The first release of each year is a long term support +release, LTS. + + - Quarterly releases: 2020.02, 2020.05, 2020.08, and 2020.11 + - Bugfix releases: 2020.02.1, 2020.02.2, ... + - LTS releases: 2020.02, 2021.02, ... + +Releases are supported until the first bugfix release of the next +release, e.g., 2020.05.x is EOL when 2020.08.1 is released. + +LTS releases are supported until the first bugfix release of the next +LTS, e.g., 2020.02.x is supported until 2021.02.1 is released. + +=== Development + +Each release cycle consist of two months of development on the +master+ +branch and one month stabilization before the release is made. During +this phase no new features are added to +master+, only bugfixes. + +The stabilization phase starts with tagging +-rc1+, and every week until +the release, another release candidate is tagged. + +To handle new features and version bumps during the stabilization phase, +a +next+ branch may be created for these features. Once the current +release has been made, the +next+ branch is merged into +master+ and +the development cycle for the next release continues there. diff --git a/buildroot/docs/manual/resources.txt b/buildroot/docs/manual/resources.txt index b327f9e95..69bfff8f2 100644 --- a/buildroot/docs/manual/resources.txt +++ b/buildroot/docs/manual/resources.txt @@ -17,11 +17,11 @@ main method of interaction for Buildroot users and developers. + Only subscribers to the Buildroot mailing list are allowed to post to this list. You can subscribe via the -http://lists.busybox.net/mailman/listinfo/buildroot[mailing list info +http://lists.buildroot.org/mailman/listinfo/buildroot[mailing list info page]. + Mails that are sent to the mailing list are also available in the -http://lists.busybox.net/pipermail/buildroot[mailing list archives] and +http://lists.buildroot.org/pipermail/buildroot[mailing list archives] and via http://gmane.org[Gmane], at http://dir.gmane.org/gmane.comp.lib.uclibc.buildroot[+gmane.comp.lib.uclibc.buildroot+]. Please search the mailing list archives before asking questions, since @@ -42,7 +42,7 @@ better as it will reach more people, both developers and users. Bug tracker:: + Bugs in Buildroot can be reported via the mailing list or alternatively -via the https://bugs.busybox.net/buglist.cgi?product=buildroot[Buildroot +via the https://bugs.buildroot.org/buglist.cgi?product=buildroot[Buildroot bugtracker]. Please refer to xref:reporting-bugs[] before creating a bug report. diff --git a/buildroot/docs/manual/using-buildroot-debugger.txt b/buildroot/docs/manual/using-buildroot-debugger.txt index b5063ca94..d5293beb5 100644 --- a/buildroot/docs/manual/using-buildroot-debugger.txt +++ b/buildroot/docs/manual/using-buildroot-debugger.txt @@ -35,7 +35,7 @@ Then, on the host, you should start the cross gdb using the following command line: ---------------------------- -/output/host/usr/bin/-gdb -x /output/staging/usr/share/buildroot/gdbinit foo +/output/host/bin/-gdb -x /output/staging/usr/share/buildroot/gdbinit foo ---------------------------- Of course, +foo+ must be available in the current directory, built diff --git a/buildroot/docs/manual/using-buildroot-development.txt b/buildroot/docs/manual/using-buildroot-development.txt index a075416ba..da6dd822f 100644 --- a/buildroot/docs/manual/using-buildroot-development.txt +++ b/buildroot/docs/manual/using-buildroot-development.txt @@ -8,7 +8,7 @@ it, configure, compile and install the software component found inside this tarball. The source code is extracted in +output/build/-+, which is a temporary directory: whenever +make clean+ is used, this directory is entirely removed, and -re-recreated at the next +make+ invocation. Even when a Git or +re-created at the next +make+ invocation. Even when a Git or Subversion repository is used as the input for the package source code, Buildroot creates a tarball out of it, and then behaves as it normally does with tarballs. @@ -28,10 +28,22 @@ clean+. Therefore, Buildroot provides a specific mechanism for this use case: the +_OVERRIDE_SRCDIR+ mechanism. Buildroot reads an _override_ file, which allows the user to tell Buildroot the location of the -source for certain packages. By default this _override_ file is named -+local.mk+ and located in the top directory of the Buildroot source -tree, but a different location can be specified through the -+BR2_PACKAGE_OVERRIDE_FILE+ configuration option. +source for certain packages. + +The default location of the override file is +$(CONFIG_DIR)/local.mk+, +as defined by the +BR2_PACKAGE_OVERRIDE_FILE+ configuration option. ++$(CONFIG_DIR)+ is the location of the Buildroot +.config+ file, so ++local.mk+ by default lives side-by-side with the +.config+ file, +which means: + +* In the top-level Buildroot source directory for in-tree builds + (i.e., when +O=+ is not used) +* In the out-of-tree directory for out-of-tree builds (i.e., when + +O=+ is used) + +If a different location than these defaults is required, it can be +specified through the +BR2_PACKAGE_OVERRIDE_FILE+ configuration +option. In this _override_ file, Buildroot expects to find lines of the form: @@ -50,11 +62,11 @@ BUSYBOX_OVERRIDE_SRCDIR = /home/bob/busybox/ When Buildroot finds that for a given package, an +_OVERRIDE_SRCDIR+ has been defined, it will no longer attempt to download, extract and patch the package. Instead, it will directly use -the source code available in in the specified directory and +make -clean+ will not touch this directory. This allows to point Buildroot -to your own directories, that can be managed by Git, Subversion, or -any other version control system. To achieve this, Buildroot will use -_rsync_ to copy the source code of the component from the specified +the source code available in the specified directory and +make clean+ +will not touch this directory. This allows to point Buildroot to your +own directories, that can be managed by Git, Subversion, or any other +version control system. To achieve this, Buildroot will use _rsync_ to +copy the source code of the component from the specified +_OVERRIDE_SRCDIR+ to +output/build/-custom/+. This mechanism is best used in conjunction with the +make @@ -81,3 +93,29 @@ make busybox-rebuild all the root filesystem image in +output/images+ contains the updated BusyBox. + +Source trees for big projects often contain hundreds or thousands of +files which are not needed for building, but will slow down the process +of copying the sources with _rsync_. Optionally, it is possible define ++_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS+ to skip syncing certain files +from the source tree. For example, when working on the +webkitgtk+ +package, the following will exclude the tests and in-tree builds from +a local WebKit source tree: + +------------------ +WEBKITGTK_OVERRIDE_SRCDIR = /home/bob/WebKit +WEBKITGTK_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = \ + --exclude JSTests --exclude ManualTests --exclude PerformanceTests \ + --exclude WebDriverTests --exclude WebKitBuild --exclude WebKitLibraries \ + --exclude WebKit.xcworkspace --exclude Websites --exclude Examples +------------------ + +By default, Buildroot skips syncing of VCS artifacts (e.g., the *.git* and +*.svn* directories). Some packages prefer to have these VCS directories +available during build, for example for automatically determining a precise +commit reference for version information. To undo this built-in filtering at a +cost of a slower speed, add these directories back: + +------------------ +LINUX_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS = --include .git +------------------ diff --git a/buildroot/docs/manual/using-buildroot-toolchain.txt b/buildroot/docs/manual/using-buildroot-toolchain.txt index 9a98628fa..0c0c35fce 100644 --- a/buildroot/docs/manual/using-buildroot-toolchain.txt +++ b/buildroot/docs/manual/using-buildroot-toolchain.txt @@ -9,14 +9,26 @@ can use the toolchain that was generated by Buildroot. The toolchain generated by Buildroot is located by default in +output/host/+. The simplest way to use it is to add -+output/host/usr/bin/+ to your PATH environment variable and then to ++output/host/bin/+ to your PATH environment variable and then to use +ARCH-linux-gcc+, +ARCH-linux-objdump+, +ARCH-linux-ld+, etc. -It is possible to relocate the toolchain - but then +--sysroot+ must -be passed every time the compiler is called to tell where the -libraries and header files are. +Alternatively, Buildroot can also export the toolchain and the development +files of all selected packages, as an SDK, by running the command ++make sdk+. This generates a tarball of the content of the host directory ++output/host/+, named +_sdk-buildroot.tar.gz+ (which can be +overriden by setting the environment variable +BR2_SDK_PREFIX+) and +located in the output directory +output/images/+. -It is also possible to generate the Buildroot toolchain in a directory -other than +output/host+ by using the +Build options -> Host dir+ -option. This could be useful if the toolchain must be shared with -other users. +This tarball can then be distributed to application developers, when +they want to develop their applications that are not (yet) packaged as +a Buildroot package. + +Upon extracting the SDK tarball, the user must run the script ++relocate-sdk.sh+ (located at the top directory of the SDK), to make +sure all paths are updated with the new location. + +Alternatively, if you just want to prepare the SDK without generating +the tarball (e.g. because you will just be moving the +host+ directory, +or will be generating the tarball on your own), Buildroot also allows +you to just prepare the SDK with +make prepare-sdk+ without actually +generating a tarball. diff --git a/buildroot/docs/manual/writing-rules.txt b/buildroot/docs/manual/writing-rules.txt index e6401a488..3b809d5c4 100644 --- a/buildroot/docs/manual/writing-rules.txt +++ b/buildroot/docs/manual/writing-rules.txt @@ -29,7 +29,8 @@ config BR2_PACKAGE_LIBFOO depends on BR2_PACKAGE_LIBBAZ select BR2_PACKAGE_LIBBAR help - This is a comment that explains what libfoo is. + This is a comment that explains what libfoo is. The help text + should be wrapped. http://foosoftware.org/libfoo/ --------------------- @@ -40,6 +41,9 @@ config BR2_PACKAGE_LIBFOO * The help text itself should be indented with one tab and two spaces. +* The help text should be wrapped to fit 72 columns, where tab counts + for 8, so 62 characters in the text itself. + The +Config.in+ files are the input for the configuration tool used in Buildroot, which is the regular _Kconfig_. For further details about the _Kconfig_ language, refer to @@ -137,5 +141,11 @@ endif The documentation uses the http://www.methods.co.nz/asciidoc/[asciidoc] format. -For further details about the http://www.methods.co.nz/asciidoc/[asciidoc] -syntax, refer to http://www.methods.co.nz/asciidoc/userguide.html[]. +For further details about the asciidoc syntax, refer to +http://www.methods.co.nz/asciidoc/userguide.html[]. + +=== Support scripts + +Some scripts in the +support/+ and +utils/+ directories are written in +Python and should follow the +https://www.python.org/dev/peps/pep-0008/[PEP8 Style Guide for Python Code]. diff --git a/buildroot/docs/website/.htaccess b/buildroot/docs/website/.htaccess new file mode 100644 index 000000000..b02beb885 --- /dev/null +++ b/buildroot/docs/website/.htaccess @@ -0,0 +1,62 @@ +# BEGIN Compress text files + + + SetOutputFilter DEFLATE + + +# END Compress text files + +# BEGIN Expire headers + + ExpiresActive On + ExpiresDefault "access plus 1 seconds" + ExpiresByType image/x-icon "access plus 2592000 seconds" + ExpiresByType image/jpeg "access plus 2592000 seconds" + ExpiresByType image/png "access plus 2592000 seconds" + ExpiresByType image/gif "access plus 2592000 seconds" + ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" + ExpiresByType text/css "access plus 604800 seconds" + ExpiresByType text/javascript "access plus 216000 seconds" + ExpiresByType application/javascript "access plus 216000 seconds" + ExpiresByType application/x-javascript "access plus 216000 seconds" + ExpiresByType text/html "access plus 600 seconds" + ExpiresByType application/xhtml+xml "access plus 600 seconds" + +# END Expire headers + +# BEGIN Cache-Control Headers + + + Header set Cache-Control "max-age=2592000, public" + + + Header set Cache-Control "max-age=604800, public" + + + Header set Cache-Control "max-age=216000, private" + + + Header set Cache-Control "max-age=600, private, must-revalidate" + + +# END Cache-Control Headers + +# BEGIN Turn ETags Off + + Header unset ETag + +FileETag None +# END Turn ETags Off + +# BEGIN gzip + +mod_gzip_on Yes +mod_gzip_dechunk Yes +mod_gzip_item_include file .(html?|txt|css|js)$ +mod_gzip_item_include handler ^cgi-script$ +mod_gzip_item_include mime ^text/.* +mod_gzip_item_include mime ^application/x-javascript.* +mod_gzip_item_exclude mime ^image/.* +mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* + +# END gzip diff --git a/buildroot/docs/website/about.html b/buildroot/docs/website/about.html deleted file mode 100644 index 5d7cee30a..000000000 --- a/buildroot/docs/website/about.html +++ /dev/null @@ -1,62 +0,0 @@ - - -
-
- Buildroot menuconfig -
-
- -

Buildroot is a set of Makefiles and patches that makes it easy to -generate a complete embedded Linux system. Buildroot can generate any -or all of a cross-compilation toolchain, a root filesystem, a kernel -image and a bootloader image. Buildroot is useful mainly for people -working with small or embedded systems, using various CPU -architectures (x86, ARM, MIPS, PowerPC, etc.) : it automates the -building process of your embedded system and eases the -cross-compilation process.

- -

The major Buildroot features are:

- -
    - -
  • Can handle everything in your embedded system development - project: cross-compiling toolchain, root filesystem generation, - kernel image compilation and bootloader compilation. Buildroot is - also sufficiently flexible that it can also be used for only one or - several of these steps.
  • - -
  • Is very easy to set up, thanks to its menuconfig, gconfig - and xconfig configuration interfaces, familiar to all embedded Linux - developers. Building a basic embedded Linux system with Buildroot - typically takes 15-30 minutes.
  • - -
  • Supports several hundreds of packages for userspace - applications and libraries: X.org stack, Gtk2, Qt, DirectFB, SDL, - GStreamer and a large number of network-related and system-related - utilities and libraries are supported.
  • - -
  • Supports multiple filesystem types for the root - filesystem image: JFFS2, UBIFS, tarballs, romfs, cramfs, squashfs - and more.
  • - -
  • Can generate an (e)glibc or uClibc cross-compilation toolchain, - or re-use your existing glibc, eglibc or uClibc cross-compilation - toolchain
  • - -
  • Has a simple structure that makes it easy to understand - and extend. It relies only on the well-known Makefile language.
  • - -
- -

Buildroot is maintained by Peter Korsgaard, and licensed under the -GNU -GENERAL PUBLIC LICENSE V2 (Or later). Stable releases are -delivered every three months.

- -
-
- - diff --git a/buildroot/docs/website/association.html b/buildroot/docs/website/association.html new file mode 100644 index 000000000..0215f8587 --- /dev/null +++ b/buildroot/docs/website/association.html @@ -0,0 +1,122 @@ + + +
+
+
+
+
Association
+
+ +

The Buildroot open-source project is supported by a + non-profit organization called the Buildroot + Association. The goal of this non-profit + organization is to engage actions to promote, help + develop and democratise the Buildroot project.

+ +

This non-profit organization is registered as a legal + entity in France, more precisely as an association loi + 1901.

+ +

This organization can receive funding from members, + donors and sponsors. This funding is then used to pay for:

+ +
    +
  • the meeting rooms used during the Buildroot + Developers Meeting twice per year;
  • +
  • travel expenses for contributors + willing to attend the Buildroot Developers + Meeting, and not covered by their employer to do + so;
  • +
  • renting servers and services used to host the + Buildroot infrastructure.
  • +
+ +

The bylaws of the association are available + in French + (official) and + in English + (unofficial translation). The association was declared on + March 14, 2016 to the Préfecture de Haute-Garonne + (France) and is registered under the n°W313024278. See this + official receipt + from the French authorities.

+ +

Our accounting is fully public, including the bank + account summaries, + see accounting. Numerous + other administrative documents related to the association + are available on + its Github + repository

+
+
+ +
+
Becoming a member
+
+ +

To become a member, an individual or a company simply has + to pay its yearly membership. For an individual, the minimum + membership fee per year is 10 EUR. For a company, the + minimum membership fee per year is 150 EUR. Individuals and + companies are free to give more than the minimum + required.

+ +

The membership is valid for the current civil year, i.e + any membership fee paid in 2019 is valid through December 31, + 2019.

+ +

Once the membership fee is received, it will be listed in + the + association accounting + files, which serve as the official list of + members. Therefore, members accept that their name and the + amount of their membership fee is made public.

+ +

There are two possibilities to pay the membership + fee:

+ +
    + +
  • A direct wire-transfer to the association bank + account. Since the bank account is located in France, this + is completely free of charge for any person or company + located in the European Union. The IBAN number of the + association bank account is FR53 2004 1010 1615 0958 + 0P03 772.
  • + +
  • A Paypal payment to the association Paypal account, + whose address + is buildroot-association@buildroot.org.
  • + +
+ +
+
+ +
+
Sponsoring the project
+
+ +

Companies willing to help the Buildroot project can do so + by making a donation to the Buildroot + Association. In exchange for these donations, companies + will be listed on our Sponsors + page and will be thanked in our release announcements.

+ +

As the Buildroot Association is a legal entity + registered in France, it is able to deliver a bill and/or + receipt.

+ +

Please + contact buildroot-association@buildroot.org + if you are a company interested in making a donation.

+ +
+
+ +
+
+
+ + diff --git a/buildroot/docs/website/contribute.html b/buildroot/docs/website/contribute.html index 17ed26fff..aa1cf93f1 100644 --- a/buildroot/docs/website/contribute.html +++ b/buildroot/docs/website/contribute.html @@ -1,38 +1,44 @@ -
-
- -

Contribute

- -

Buildroot is an open source project and you are very welcome to contribute to -it.
-There are many different ways to contribute:

- - - -

For more details on these topics, check out the - -Contributing to buildroot chapter in the Buildroot manual. Thanks for your help!

- -

If you need any support yourself, have a look at -Support.

+
+
+
+ +
+
Contribute
+
+

Buildroot is an open source project and you are very welcome to contribute to + it.
+ There are many different ways to contribute:

+ + + +

For more details on these topics, check out the + + Contributing to buildroot chapter in the Buildroot manual. Thanks for your help!

+ +

If you need any support yourself, have a look at + Support.

+
+
+
diff --git a/buildroot/docs/website/copyright.txt b/buildroot/docs/website/copyright.txt index 0939b748d..b15ac5f91 100644 --- a/buildroot/docs/website/copyright.txt +++ b/buildroot/docs/website/copyright.txt @@ -1,6 +1,6 @@ The code and graphics on this website (and it's mirror sites, if any) are -Copyright (c) 1999-2005 by Erik Andersen, 2006-2014 The Buildroot +Copyright (c) 1999-2005 by Erik Andersen, 2006-2020 The Buildroot developers. All rights reserved. Documents on this Web site including their graphical elements, design, and diff --git a/buildroot/docs/website/css/bootstrap.min.css b/buildroot/docs/website/css/bootstrap.min.css deleted file mode 100644 index 6b15b2dee..000000000 --- a/buildroot/docs/website/css/bootstrap.min.css +++ /dev/null @@ -1,7 +0,0 @@ -@import url(//fonts.googleapis.com/css?family=Telex);/*! - * bootswatch v3.3.0 - * Homepage: http://bootswatch.com - * Copyright 2012-2014 Thomas Park - * Licensed under MIT - * Based on Bootstrap -*//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff !important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:'Telex',sans-serif;font-size:14px;line-height:1.42857143;color:#555555;background-color:#ffffff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#2fa4e7;text-decoration:none}a:hover,a:focus{color:#157ab5;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#ffffff;border:1px solid #dddddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eeeeee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Telex',sans-serif;font-weight:bold;line-height:1.1;color:#317eac}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#999999}.text-primary{color:#2fa4e7}a.text-primary:hover{color:#178acc}.text-success{color:#468847}a.text-success:hover{color:#356635}.text-info{color:#3a87ad}a.text-info:hover{color:#2d6987}.text-warning{color:#c09853}a.text-warning:hover{color:#a47e3c}.text-danger{color:#b94a48}a.text-danger:hover{color:#953b39}.bg-primary{color:#fff;background-color:#2fa4e7}a.bg-primary:hover{background-color:#178acc}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eeeeee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eeeeee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333333;background-color:#f5f5f5;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#999999;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #dddddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #dddddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #dddddd}.table .table{background-color:#ffffff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #dddddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #dddddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #dddddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#555555;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:9px;font-size:14px;line-height:1.42857143;color:#555555}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.42857143;color:#555555;background-color:#ffffff;background-image:none;border:1px solid #cccccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control::-moz-placeholder{color:#999999;opacity:1}.form-control:-ms-input-placeholder{color:#999999}.form-control::-webkit-input-placeholder{color:#999999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eeeeee;opacity:1}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{line-height:38px;line-height:1.42857143 \0}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm{line-height:30px;line-height:1.5 \0}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg{line-height:54px;line-height:1.33 \0}_:-ms-fullscreen,:root input[type="date"],_:-ms-fullscreen,:root input[type="time"],_:-ms-fullscreen,:root input[type="datetime-local"],_:-ms-fullscreen,:root input[type="month"]{line-height:1.42857143}_:-ms-fullscreen.input-sm,:root input[type="date"].input-sm,_:-ms-fullscreen.input-sm,:root input[type="time"].input-sm,_:-ms-fullscreen.input-sm,:root input[type="datetime-local"].input-sm,_:-ms-fullscreen.input-sm,:root input[type="month"].input-sm{line-height:1.5}_:-ms-fullscreen.input-lg,:root input[type="date"].input-lg,_:-ms-fullscreen.input-lg,:root input[type="time"].input-lg,_:-ms-fullscreen.input-lg,:root input[type="datetime-local"].input-lg,_:-ms-fullscreen.input-lg,:root input[type="month"].input-lg{line-height:1.33}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:9px;padding-bottom:9px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:54px;padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:54px;line-height:54px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:47.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:54px;height:54px;line-height:54px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;border-color:#468847;background-color:#dff0d8}.has-success .form-control-feedback{color:#468847}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;border-color:#c09853;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#c09853}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;border-color:#b94a48;background-color:#f2dede}.has-error .form-control-feedback{color:#b94a48}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#959595}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:9px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:29px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:9px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:19.62px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:8px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#555555;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#555555;background-color:#ffffff;border-color:rgba(0,0,0,0.1)}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#555555;background-color:#e6e6e6;border-color:rgba(0,0,0,0.1)}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#ffffff;border-color:rgba(0,0,0,0.1)}.btn-default .badge{color:#ffffff;background-color:#555555}.btn-primary{color:#ffffff;background-color:#2fa4e7;border-color:#2fa4e7}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#178acc;border-color:#1684c2}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#2fa4e7;border-color:#2fa4e7}.btn-primary .badge{color:#2fa4e7;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#73a839;border-color:#73a839}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#59822c;border-color:#547a29}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#73a839;border-color:#73a839}.btn-success .badge{color:#73a839;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#033c73;border-color:#033c73}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#022241;border-color:#011d37}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#033c73;border-color:#033c73}.btn-info .badge{color:#033c73;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#dd5600;border-color:#dd5600}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#aa4200;border-color:#a03e00}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#dd5600;border-color:#dd5600}.btn-warning .badge{color:#dd5600;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#c71c22;border-color:#c71c22}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#9a161a;border-color:#911419}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#c71c22;border-color:#c71c22}.btn-danger .badge{color:#c71c22;background-color:#ffffff}.btn-link{color:#2fa4e7;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#157ab5;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#ffffff;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#333333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#2fa4e7}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#2fa4e7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999999;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:54px;padding:14px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:54px;line-height:54px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555555;text-align:center;background-color:#eeeeee;border:1px solid #cccccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee}.nav>li.disabled>a{color:#999999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eeeeee;border-color:#2fa4e7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #dddddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #dddddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #dddddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #dddddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#ffffff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:#2fa4e7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #dddddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #dddddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#ffffff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block !important;visibility:visible !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:6px;margin-bottom:6px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#2fa4e7;border-color:#1995dc}.navbar-default .navbar-brand{color:#ffffff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-default .navbar-text{color:#dddddd}.navbar-default .navbar-nav>li>a{color:#ffffff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#ffffff;background-color:#178acc}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#178acc}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#dddddd;background-color:transparent}.navbar-default .navbar-toggle{border-color:#178acc}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#178acc}.navbar-default .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#1995dc}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#178acc;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#178acc}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#178acc}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#dddddd;background-color:transparent}}.navbar-default .navbar-link{color:#ffffff}.navbar-default .navbar-link:hover{color:#ffffff}.navbar-default .btn-link{color:#ffffff}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#ffffff}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#dddddd}.navbar-inverse{background-color:#033c73;border-color:#022f5a}.navbar-inverse .navbar-brand{color:#ffffff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-inverse .navbar-text{color:#ffffff}.navbar-inverse .navbar-nav>li>a{color:#ffffff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#ffffff;background-color:#022f5a}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#022f5a}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#022f5a}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#022f5a}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#022a50}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#022f5a;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#022f5a}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#ffffff}.navbar-inverse .navbar-link:hover{color:#ffffff}.navbar-inverse .btn-link{color:#ffffff}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#ffffff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#999999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:8px 12px;line-height:1.42857143;text-decoration:none;color:#2fa4e7;background-color:#ffffff;border:1px solid #dddddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#157ab5;background-color:#eeeeee;border-color:#dddddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#999999;background-color:#f5f5f5;border-color:#dddddd;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999999;background-color:#ffffff;border-color:#dddddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:14px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#ffffff;border:1px solid #dddddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eeeeee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#ffffff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#2fa4e7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#178acc}.label-success{background-color:#73a839}.label-success[href]:hover,.label-success[href]:focus{background-color:#59822c}.label-info{background-color:#033c73}.label-info[href]:hover,.label-info[href]:focus{background-color:#022241}.label-warning{background-color:#dd5600}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#aa4200}.label-danger{background-color:#c71c22}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#9a161a}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#2fa4e7;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#2fa4e7;background-color:#ffffff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eeeeee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#ffffff;border:1px solid #dddddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#2fa4e7}.thumbnail .caption{padding:9px;color:#555555}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{background-color:#fcf8e3;border-color:#fbeed5;color:#c09853}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#ffffff;text-align:center;background-color:#2fa4e7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#73a839}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#033c73}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#dd5600}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#c71c22}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#ffffff;border:1px solid #dddddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555555}a.list-group-item .list-group-item-heading{color:#333333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;color:#555555;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#eeeeee;color:#999999;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#999999}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#2fa4e7;border-color:#2fa4e7}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e6f4fc}.list-group-item-success{color:#468847;background-color:#dff0d8}a.list-group-item-success{color:#468847}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#468847;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#468847;border-color:#468847}.list-group-item-info{color:#3a87ad;background-color:#d9edf7}a.list-group-item-info{color:#3a87ad}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#3a87ad;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#3a87ad;border-color:#3a87ad}.list-group-item-warning{color:#c09853;background-color:#fcf8e3}a.list-group-item-warning{color:#c09853}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#c09853;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#c09853;border-color:#c09853}.list-group-item-danger{color:#b94a48;background-color:#f2dede}a.list-group-item-danger{color:#b94a48}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#b94a48;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#b94a48;border-color:#b94a48}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#ffffff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #dddddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #dddddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #dddddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #dddddd}.panel-default{border-color:#dddddd}.panel-default>.panel-heading{color:#555555;background-color:#f5f5f5;border-color:#dddddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#555555}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-primary{border-color:#dddddd}.panel-primary>.panel-heading{color:#ffffff;background-color:#2fa4e7;border-color:#dddddd}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-primary>.panel-heading .badge{color:#2fa4e7;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-success{border-color:#dddddd}.panel-success>.panel-heading{color:#468847;background-color:#73a839;border-color:#dddddd}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-success>.panel-heading .badge{color:#73a839;background-color:#468847}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-info{border-color:#dddddd}.panel-info>.panel-heading{color:#3a87ad;background-color:#033c73;border-color:#dddddd}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-info>.panel-heading .badge{color:#033c73;background-color:#3a87ad}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-warning{border-color:#dddddd}.panel-warning>.panel-heading{color:#c09853;background-color:#dd5600;border-color:#dddddd}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-warning>.panel-heading .badge{color:#dd5600;background-color:#c09853}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-danger{border-color:#dddddd}.panel-danger>.panel-heading{color:#b94a48;background-color:#c71c22;border-color:#dddddd}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-danger>.panel-heading .badge{color:#c71c22;background-color:#b94a48}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#ffffff;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:rgba(0,0,0,0.9);border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:rgba(0,0,0,0.9)}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:rgba(0,0,0,0.9)}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:rgba(0,0,0,0.9)}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:rgba(0,0,0,0.9)}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;font-weight:normal;line-height:1.42857143;text-align:left;background-color:#ffffff;background-clip:padding-box;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:transform .6s ease-in-out;backface-visibility:hidden;perspective:1000}.carousel-inner>.item.next,.carousel-inner>.item.active.right{transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important;visibility:hidden !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar{background-image:-webkit-linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-image:-o-linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-image:linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb', endColorstr='#ff1d9ce5', GradientType=0);border-bottom:1px solid #178acc;filter:none;-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-default .badge{background-color:#fff;color:#2fa4e7}.navbar-inverse{background-image:-webkit-linear-gradient(#04519b, #044687 60%, #033769);background-image:-o-linear-gradient(#04519b, #044687 60%, #033769);background-image:linear-gradient(#04519b, #044687 60%, #033769);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04519b', endColorstr='#ff033769', GradientType=0);filter:none;border-bottom:1px solid #022241}.navbar-inverse .badge{background-color:#fff;color:#033c73}.navbar .navbar-nav>li>a,.navbar-brand{text-shadow:0 1px 0 rgba(0,0,0,0.1)}@media (max-width:767px){.navbar .dropdown-header{color:#fff}}.btn{text-shadow:0 1px 0 rgba(0,0,0,0.1)}.btn .caret{border-top-color:#fff}.btn-default{background-image:-webkit-linear-gradient(#fff, #fff 60%, #f5f5f5);background-image:-o-linear-gradient(#fff, #fff 60%, #f5f5f5);background-image:linear-gradient(#fff, #fff 60%, #f5f5f5);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff5f5f5', GradientType=0);filter:none;border-bottom:1px solid #e6e6e6}.btn-default:hover{color:#555555}.btn-default .caret{border-top-color:#555555}.btn-default{background-image:-webkit-linear-gradient(#fff, #fff 60%, #f5f5f5);background-image:-o-linear-gradient(#fff, #fff 60%, #f5f5f5);background-image:linear-gradient(#fff, #fff 60%, #f5f5f5);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff5f5f5', GradientType=0);filter:none;border-bottom:1px solid #e6e6e6}.btn-primary{background-image:-webkit-linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-image:-o-linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-image:linear-gradient(#54b4eb, #2fa4e7 60%, #1d9ce5);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb', endColorstr='#ff1d9ce5', GradientType=0);filter:none;border-bottom:1px solid #178acc}.btn-success{background-image:-webkit-linear-gradient(#88c149, #73a839 60%, #699934);background-image:-o-linear-gradient(#88c149, #73a839 60%, #699934);background-image:linear-gradient(#88c149, #73a839 60%, #699934);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff88c149', endColorstr='#ff699934', GradientType=0);filter:none;border-bottom:1px solid #59822c}.btn-info{background-image:-webkit-linear-gradient(#04519b, #033c73 60%, #02325f);background-image:-o-linear-gradient(#04519b, #033c73 60%, #02325f);background-image:linear-gradient(#04519b, #033c73 60%, #02325f);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04519b', endColorstr='#ff02325f', GradientType=0);filter:none;border-bottom:1px solid #022241}.btn-warning{background-image:-webkit-linear-gradient(#ff6707, #dd5600 60%, #c94e00);background-image:-o-linear-gradient(#ff6707, #dd5600 60%, #c94e00);background-image:linear-gradient(#ff6707, #dd5600 60%, #c94e00);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff6707', endColorstr='#ffc94e00', GradientType=0);filter:none;border-bottom:1px solid #aa4200}.btn-danger{background-image:-webkit-linear-gradient(#e12b31, #c71c22 60%, #b5191f);background-image:-o-linear-gradient(#e12b31, #c71c22 60%, #b5191f);background-image:linear-gradient(#e12b31, #c71c22 60%, #b5191f);background-repeat:no-repeat;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe12b31', endColorstr='#ffb5191f', GradientType=0);filter:none;border-bottom:1px solid #9a161a}.panel-primary .panel-heading,.panel-success .panel-heading,.panel-warning .panel-heading,.panel-danger .panel-heading,.panel-info .panel-heading,.panel-primary .panel-title,.panel-success .panel-title,.panel-warning .panel-title,.panel-danger .panel-title,.panel-info .panel-title{color:#fff} \ No newline at end of file diff --git a/buildroot/docs/website/css/bootswatch.less b/buildroot/docs/website/css/bootswatch.less deleted file mode 100644 index 5a4dbac4a..000000000 --- a/buildroot/docs/website/css/bootswatch.less +++ /dev/null @@ -1,127 +0,0 @@ -// Cerulean 3.3.0 -// Bootswatch -// ----------------------------------------------------- - -@import url(//fonts.googleapis.com/css?family=Telex); - -.btn-shadow(@color) { - #gradient > .vertical-three-colors(lighten(@color, 8%), @color, 60%, darken(@color, 4%)); - filter: none; - border-bottom: 1px solid darken(@color, 10%); -} - -// Navbar ===================================================================== - -.navbar { - .btn-shadow(@navbar-default-bg); - filter: none; - .box-shadow(0 1px 10px rgba(0, 0, 0, 0.1)); - - &-default { - - .badge { - background-color: #fff; - color: @navbar-default-bg; - } - } - - &-inverse { - #gradient > .vertical-three-colors(lighten(@navbar-inverse-bg, 8%), lighten(@navbar-inverse-bg, 4%), 60%, darken(@navbar-inverse-bg, 2%)); - filter: none; - border-bottom: 1px solid darken(@navbar-inverse-bg, 10%); - - .badge { - background-color: #fff; - color: @navbar-inverse-bg; - } - } - - .navbar-nav > li > a, - &-brand { - text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); - } -} - -@media (max-width: @grid-float-breakpoint-max) { - - .navbar { - - .dropdown-header { - color: #fff; - } - } -} - -// Buttons ==================================================================== - -.btn { - - text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); - - .caret { - border-top-color: #fff; - } -} - -.btn-default { - - .btn-shadow(@btn-default-bg); - - &:hover { - color: @btn-default-color; - } - - .caret { - border-top-color: @text-color; - } -} - -.btn-default { - .btn-shadow(@btn-default-bg); -} - -.btn-primary { - .btn-shadow(@btn-primary-bg); -} - -.btn-success { - .btn-shadow(@btn-success-bg); -} - -.btn-info { - .btn-shadow(@btn-info-bg); -} - -.btn-warning { - .btn-shadow(@btn-warning-bg); -} - -.btn-danger { - .btn-shadow(@btn-danger-bg); -} - -// Typography ================================================================= - -// Tables ===================================================================== - -// Forms ====================================================================== - -// Navs ======================================================================= - -// Indicators ================================================================= - -// Progress bars ============================================================== - -// Containers ================================================================= - -.panel-primary, -.panel-success, -.panel-warning, -.panel-danger, -.panel-info { - - .panel-heading, - .panel-title { - color: #fff; - } -} diff --git a/buildroot/docs/website/css/buildroot.css b/buildroot/docs/website/css/buildroot.css deleted file mode 100644 index 7138abc49..000000000 --- a/buildroot/docs/website/css/buildroot.css +++ /dev/null @@ -1,46 +0,0 @@ -body { - padding-top: 60px; - padding-bottom: 40px; -} - -.button_column { - width: 430px; -} - -.gplus { - float:right; - margin: 10px 0 0; -} - -div.sponsor-main { - background: #eeeeee; - padding-top: 2em; - padding-bottom: 2em; -} - -div.sponsor { - padding: 0.5em; - height: 12em; - display: table !important; -} - -div.sponsor-description { - background: #eeeeee; - display: table-cell; - vertical-align: middle; - text-align: center; -} - -div.sponsor-description img { - max-width: 99%; - height: 4em; - margin-bottom: 1em; -} - -div.panel-body p { - text-overflow: ellipsis; - width: 95%; - white-space: nowrap; - overflow: hidden; - height: 1.5em; -} diff --git a/buildroot/docs/website/css/main.css b/buildroot/docs/website/css/main.css new file mode 100644 index 000000000..5255531b3 --- /dev/null +++ b/buildroot/docs/website/css/main.css @@ -0,0 +1,260 @@ +/* + * Author: Carlos Alvarez + * URL: http://alvarez.is + * + * Project Name: FLATTY - Free Bootstrap 3 Theme + * Version: 1.0 + * URL: http://blacktie.co + */ + +body { + background-color: #f2f2f2; + font-family: 'Roboto', sans-serif; + font-weight: 300; + font-size: 16px; + color: #555; + + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; +} + +/* Titles */ +h1, h2, h3, h4, h5, h6 { + font-family: 'Roboto', sans-serif; + font-weight: 300; + color: #333; +} + +h1 { + font-size: 40px; +} + +h3 { + color: #95a5a6; + font-weight: 400; +} + +h4 { + color: #95a5a6; + font-weight: 400; + font-size: 20px; +} + +.ellipsis p { + margin-bottom:10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.centered { + text-align: center; +} + +/* Links */ +a { + color: #3498db; + word-wrap: break-word; + + -webkit-transition: color 0.1s ease-in, background 0.1s ease-in; + -moz-transition: color 0.1s ease-in, background 0.1s ease-in; + -ms-transition: color 0.1s ease-in, background 0.1s ease-in; + -o-transition: color 0.1s ease-in, background 0.1s ease-in; + transition: color 0.1s ease-in, background 0.1s ease-in; +} + +a:hover, +a:focus { + color: #7b7b7b; + text-decoration: none; + outline: 0; +} + +a:before, +a:after { + -webkit-transition: color 0.1s ease-in, background 0.1s ease-in; + -moz-transition: color 0.1s ease-in, background 0.1s ease-in; + -ms-transition: color 0.1s ease-in, background 0.1s ease-in; + -o-transition: color 0.1s ease-in, background 0.1s ease-in; + transition: color 0.1s ease-in, background 0.1s ease-in; +} + + hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} + +.navbar-default { + background-color: #3498db; + border-color: transparent; +} + +.navbar-default .navbar-brand { + color: white; +} + +.navbar-default .navbar-nav > li > a { + color: white; +} + +/* Helpers */ + +.mt { + margin-top: 40px; + margin-bottom: 40px; +} + +.nh { + margin-top: 80px; + margin-bottom: 40px; +} + +.form-control { + height: 42px; + font-size: 18px; + width: 280px; +} + +i { + margin: 8px; + color: #3498db; +} + + +/* HeaderWrap */ +#headerwrap { + /* background: url(../img/bg01.jpg) no-repeat center top; */ + background-color: #3498db; + margin-top: -20px; + padding-top:120px; + background-attachment: relative; + background-position: center center; + min-height: 400px; + max-height: 800px; + width: 100%; + + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +#headerwrap h1 { + color: white; + font-size: 60px; + font-weight: bold; + letter-spacing: 1px; +} + +#menubutton { + max-height: 50px; + margin-top: 6px; + padding-top: 15px; + margin-left: 10px; +} + +.panel-sponsor { + min-height: 350px; + text-align: justify; + text-justify: inter-word; +} + +@media (min-width: 768px) and (max-width: 991px) { + .navbar-collapse.collapse { + display: none !important; + } + .navbar-collapse.collapse.in { + display: block !important; + } + .navbar-header .collapse, .navbar-toggle { + display:block !important; + } + .navbar-header { + float:none; + } + .navbar-collapse { + overflow:hidden; + } + #menubutton { + margin-right: 40px; + width: 45px; + } + .text-shrink { + visibility: hidden; + } +} + +@media (max-width:767px) { + #menubutton { + max-height: 50px; + margin-top: 6px; + padding-top: 15px; + margin-left: 15px; + margin-right: 15px; + } +} + +/* entire container, keeps perspective */ +.flip-container { + perspective: 1000; +} + /* flip the pane when hovered */ + .flip-container:hover .flipper, .flip-container.hover .flipper { + transform: rotateY(180deg); + } + +.flip-container, .front, .back { + width: 180px; + height: 180px; +} + +/* flip speed goes here */ +.flipper { + transition: 0.6s; + transform-style: preserve-3d; + + position: relative; +} + +/* hide back of pane during swap */ +.front, .back { + backface-visibility: hidden; + + position: absolute; + top: 0; + left: 0; +} + +/* front pane, placed above back */ +.front { + z-index: 2; + /* for firefox 31 */ + transform: rotateY(0deg); +} + +/* back, initially hidden pane */ +.back { + transform: rotateY(180deg); +} + +.back img { + -moz-transform: scaleX(-1); + -o-transform: scaleX(-1); + -webkit-transform: scaleX(-1); + transform: scaleX(-1); + filter: FlipH; + -ms-filter: "FlipH"; +} + +.panel-box p { + height: 1.5em; +} diff --git a/buildroot/docs/website/css/timeline.css b/buildroot/docs/website/css/timeline.css new file mode 100644 index 000000000..df58461ae --- /dev/null +++ b/buildroot/docs/website/css/timeline.css @@ -0,0 +1,184 @@ +.timeline { + list-style: none; + padding: 20px 0 20px; + position: relative; +} + +.timeline:before { + top: 0; + bottom: 0; + position: absolute; + content: " "; + width: 3px; + background-color: #E4E4E4; + left: 50%; + margin-left: -1.5px; + } + +.timeline > li { + margin-bottom: 20px; + position: relative; +} + +.timeline > li:before, +.timeline > li:after { + content: " "; + display: table; +} + +.timeline > li:after { + clear: both; +} + +.timeline > li:before, +.timeline > li:after { + content: " "; + display: table; +} + +.timeline > li:after { + clear: both; +} + +.timeline > li > .timeline-panel { + width: 46%; + float: left; + border: 1px solid #d4d4d4; + border-radius: 2px; + padding: 20px; + position: relative; + -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175); + box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175); + background-color: white; +} + +.timeline > li > .timeline-panel:before { + position: absolute; + top: 26px; + right: -15px; + display: inline-block; + border-top: 15px solid transparent; + border-left: 15px solid #ccc; + border-right: 0 solid #ccc; + border-bottom: 15px solid transparent; + content: " "; +} + +.timeline > li > .timeline-panel:after { + position: absolute; + top: 27px; + right: -14px; + display: inline-block; + border-top: 14px solid transparent; + border-left: 14px solid #fff; + border-right: 0 solid #fff; + border-bottom: 14px solid transparent; + content: " "; +} + +.timeline > li > .timeline-badge { + color: #fff; + width: 50px; + height: 50px; + line-height: 50px; + font-size: 1.4em; + text-align: center; + position: absolute; + top: 16px; + left: 50%; + margin-left: -25px; + background-color: #E6E6E6; + z-index: 100; + border-top-right-radius: 50%; + border-top-left-radius: 50%; + border-bottom-right-radius: 50%; + border-bottom-left-radius: 50%; +} + +.timeline > li.timeline-inverted > .timeline-panel { + float: right; +} + +.timeline > li.timeline-inverted > .timeline-panel:before { + border-left-width: 0; + border-right-width: 15px; + left: -15px; + right: auto; +} + +.timeline > li.timeline-inverted > .timeline-panel:after { + border-left-width: 0; + border-right-width: 14px; + left: -14px; + right: auto; +} + +.timeline-badge.primary { + background-color: #2e6da4 !important; +} + +.timeline-badge.success { + background-color: #3f903f !important; +} + +.timeline-badge.warning { + background-color: #f0ad4e !important; +} + +.timeline-badge.danger { + background-color: #d9534f !important; +} + +.timeline-badge.info { + background-color: #5bc0de !important; +} + +.timeline-title { + margin-top: 0; + color: inherit; +} + +.timeline-body > p, +.timeline-body > ul { + margin-bottom: 0; +} + +.timeline-body > p + p { + margin-top: 5px; +} + +@media (max-width: 767px) { + ul.timeline:before { + left: 40px; + } + + ul.timeline > li > .timeline-panel { + width: calc(100% - 90px); + width: -moz-calc(100% - 90px); + width: -webkit-calc(100% - 90px); + } + + ul.timeline > li > .timeline-badge { + left: 15px; + margin-left: 0; + top: 16px; + } + + ul.timeline > li > .timeline-panel { + float: right; + } + + ul.timeline > li > .timeline-panel:before { + border-left-width: 0; + border-right-width: 15px; + left: -15px; + right: auto; + } + + ul.timeline > li > .timeline-panel:after { + border-left-width: 0; + border-right-width: 14px; + left: -14px; + right: auto; + } +} diff --git a/buildroot/docs/website/css/variables.less b/buildroot/docs/website/css/variables.less deleted file mode 100644 index 8ac9d6bf9..000000000 --- a/buildroot/docs/website/css/variables.less +++ /dev/null @@ -1,856 +0,0 @@ -// Cerulean 3.3.0 -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -@gray-base: #000; -@gray-darker: lighten(#000, 13.5%); // #222 -@gray-dark: lighten(#000, 20%); // #333 -@gray: lighten(#000, 33.5%); // #555 -@gray-light: lighten(#000, 60%); // #999 -@gray-lighter: lighten(#000, 93.5%); // #eee - -@brand-primary: #2FA4E7; -@brand-success: #73A839; -@brand-info: #033C73; -@brand-warning: #DD5600; -@brand-danger: #C71C22; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -@body-bg: #fff; -//** Global text color on ``. -@text-color: @gray; - -//** Global textual link color. -@link-color: @brand-primary; -//** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); -//** Link hover decoration. -@link-hover-decoration: underline; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -@font-family-sans-serif: 'Telex', sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -//** Default monospace fonts for ``, ``, and `
`.
-@font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
-@font-family-base:        @font-family-sans-serif;
-
-@font-size-base:          14px;
-@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
-@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
-
-@font-size-h1:            floor((@font-size-base * 2.6)); // ~36px
-@font-size-h2:            floor((@font-size-base * 2.15)); // ~30px
-@font-size-h3:            ceil((@font-size-base * 1.7)); // ~24px
-@font-size-h4:            ceil((@font-size-base * 1.25)); // ~18px
-@font-size-h5:            @font-size-base;
-@font-size-h6:            ceil((@font-size-base * 0.85)); // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-@line-height-base:        1.428571429; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
-
-//** By default, this inherits from the ``.
-@headings-font-family:    @font-family-base;
-@headings-font-weight:    bold;
-@headings-line-height:    1.1;
-@headings-color:          #317EAC;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-@icon-font-path:          "../fonts/";
-//** File name for all font files.
-@icon-font-name:          "glyphicons-halflings-regular";
-//** Element ID within SVG icon file.
-@icon-font-svg-id:        "glyphicons_halflingsregular";
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
-
-@padding-base-vertical:     8px;
-@padding-base-horizontal:   12px;
-
-@padding-large-vertical:    14px;
-@padding-large-horizontal:  16px;
-
-@padding-small-vertical:    5px;
-@padding-small-horizontal:  10px;
-
-@padding-xs-vertical:       1px;
-@padding-xs-horizontal:     5px;
-
-@line-height-large:         1.33;
-@line-height-small:         1.5;
-
-@border-radius-base:        4px;
-@border-radius-large:       6px;
-@border-radius-small:       3px;
-
-//** Global color for active items (e.g., navs or dropdowns).
-@component-active-color:    #fff;
-//** Global background color for active items (e.g., navs or dropdowns).
-@component-active-bg:       @brand-primary;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-@caret-width-base:          4px;
-//** Carets increase slightly in size for larger components.
-@caret-width-large:         5px;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-@table-cell-padding:            8px;
-//** Padding for cells in `.table-condensed`.
-@table-condensed-cell-padding:  5px;
-
-//** Default background color used for all tables.
-@table-bg:                      transparent;
-//** Background color used for `.table-striped`.
-@table-bg-accent:               #f9f9f9;
-//** Background color used for `.table-hover`.
-@table-bg-hover:                #f5f5f5;
-@table-bg-active:               @table-bg-hover;
-
-//** Border color for table and cell borders.
-@table-border-color:            #ddd;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-@btn-font-weight:                normal;
-
-@btn-default-color:              @text-color;
-@btn-default-bg:                 #fff;
-@btn-default-border:             rgba(0, 0, 0, 0.1);
-
-@btn-primary-color:              #fff;
-@btn-primary-bg:                 @brand-primary;
-@btn-primary-border:             @btn-primary-bg;
-
-@btn-success-color:              #fff;
-@btn-success-bg:                 @brand-success;
-@btn-success-border:             @btn-success-bg;
-
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                @btn-info-bg;
-
-@btn-warning-color:              #fff;
-@btn-warning-bg:                 @brand-warning;
-@btn-warning-border:             @btn-warning-bg;
-
-@btn-danger-color:               #fff;
-@btn-danger-bg:                  @brand-danger;
-@btn-danger-border:              @btn-danger-bg;
-
-@btn-link-disabled-color:        @gray-light;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-@input-bg:                       #fff;
-//** `` background color
-@input-bg-disabled:              @gray-lighter;
-
-//** Text color for ``s
-@input-color:                    @text-color;
-//** `` border color
-@input-border:                   #ccc;
-
-// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
-//** Default `.form-control` border radius
-@input-border-radius:            @border-radius-base;
-//** Large `.form-control` border radius
-@input-border-radius-large:      @border-radius-large;
-//** Small `.form-control` border radius
-@input-border-radius-small:      @border-radius-small;
-
-//** Border color for inputs on focus
-@input-border-focus:             #66afe9;
-
-//** Placeholder text color
-@input-color-placeholder:        @gray-light;
-
-//** Default `.form-control` height
-@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
-//** Large `.form-control` height
-@input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
-//** Small `.form-control` height
-@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
-
-@legend-color:                   @text-color;
-@legend-border-color:            #e5e5e5;
-
-//** Background color for textual input addons
-@input-group-addon-bg:           @gray-lighter;
-//** Border color for textual input addons
-@input-group-addon-border-color: @input-border;
-
-//** Disabled cursor for form controls and buttons.
-@cursor-disabled:                not-allowed;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-@dropdown-bg:                    #fff;
-//** Dropdown menu `border-color`.
-@dropdown-border:                rgba(0,0,0,.15);
-//** Dropdown menu `border-color` **for IE8**.
-@dropdown-fallback-border:       #ccc;
-//** Divider color for between dropdown items.
-@dropdown-divider-bg:            #e5e5e5;
-
-//** Dropdown link text color.
-@dropdown-link-color:            @gray-dark;
-//** Hover color for dropdown links.
-@dropdown-link-hover-color:      #fff;
-//** Hover background for dropdown links.
-@dropdown-link-hover-bg:         @dropdown-link-active-bg;
-
-//** Active dropdown menu item text color.
-@dropdown-link-active-color:     #fff;
-//** Active dropdown menu item background color.
-@dropdown-link-active-bg:        @component-active-bg;
-
-//** Disabled dropdown menu item background color.
-@dropdown-link-disabled-color:   @text-muted;
-
-//** Text color for headers within dropdown menus.
-@dropdown-header-color:          @text-muted;
-
-//** Deprecated `@dropdown-caret-color` as of v3.1.0
-@dropdown-caret-color:           #000;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-@zindex-navbar:            1000;
-@zindex-dropdown:          1000;
-@zindex-popover:           1060;
-@zindex-tooltip:           1070;
-@zindex-navbar-fixed:      1030;
-@zindex-modal:             1040;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `@screen-xs` as of v3.0.1
-@screen-xs:                  480px;
-//** Deprecated `@screen-xs-min` as of v3.2.0
-@screen-xs-min:              @screen-xs;
-//** Deprecated `@screen-phone` as of v3.0.1
-@screen-phone:               @screen-xs-min;
-
-// Small screen / tablet
-//** Deprecated `@screen-sm` as of v3.0.1
-@screen-sm:                  768px;
-@screen-sm-min:              @screen-sm;
-//** Deprecated `@screen-tablet` as of v3.0.1
-@screen-tablet:              @screen-sm-min;
-
-// Medium screen / desktop
-//** Deprecated `@screen-md` as of v3.0.1
-@screen-md:                  992px;
-@screen-md-min:              @screen-md;
-//** Deprecated `@screen-desktop` as of v3.0.1
-@screen-desktop:             @screen-md-min;
-
-// Large screen / wide desktop
-//** Deprecated `@screen-lg` as of v3.0.1
-@screen-lg:                  1200px;
-@screen-lg-min:              @screen-lg;
-//** Deprecated `@screen-lg-desktop` as of v3.0.1
-@screen-lg-desktop:          @screen-lg-min;
-
-// So media queries don't overlap when required, provide a maximum
-@screen-xs-max:              (@screen-sm-min - 1);
-@screen-sm-max:              (@screen-md-min - 1);
-@screen-md-max:              (@screen-lg-min - 1);
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-@grid-columns:              12;
-//** Padding between columns. Gets divided in half for the left and right.
-@grid-gutter-width:         30px;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-@grid-float-breakpoint:     @screen-sm-min;
-//** Point at which the navbar begins collapsing.
-@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-@container-tablet:             (720px + @grid-gutter-width);
-//** For `@screen-sm-min` and up.
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            (940px + @grid-gutter-width);
-//** For `@screen-md-min` and up.
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      (1140px + @grid-gutter-width);
-//** For `@screen-lg-min` and up.
-@container-lg:                 @container-large-desktop;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-@navbar-height:                    50px;
-@navbar-margin-bottom:             @line-height-computed;
-@navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
-@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
-@navbar-collapse-max-height:       340px;
-
-@navbar-default-color:             #ddd;
-@navbar-default-bg:                @brand-primary;
-@navbar-default-border:            darken(@navbar-default-bg, 6.5%);
-
-// Navbar links
-@navbar-default-link-color:                #fff;
-@navbar-default-link-hover-color:          #fff;
-@navbar-default-link-hover-bg:             darken(@navbar-default-bg, 10%);
-@navbar-default-link-active-color:         #fff;
-@navbar-default-link-active-bg:            darken(@navbar-default-bg, 10%);
-@navbar-default-link-disabled-color:       #ddd;
-@navbar-default-link-disabled-bg:          transparent;
-
-// Navbar brand label
-@navbar-default-brand-color:               @navbar-default-link-color;
-@navbar-default-brand-hover-color:         #fff;
-@navbar-default-brand-hover-bg:            none;
-
-// Navbar toggle
-@navbar-default-toggle-hover-bg:           darken(@navbar-default-bg, 10%);
-@navbar-default-toggle-icon-bar-bg:        #fff;
-@navbar-default-toggle-border-color:       darken(@navbar-default-bg, 10%);
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-@navbar-inverse-color:                      #fff;
-@navbar-inverse-bg:                         @brand-info;
-@navbar-inverse-border:                     darken(@navbar-inverse-bg, 5%);
-
-// Inverted navbar links
-@navbar-inverse-link-color:                 #fff;
-@navbar-inverse-link-hover-color:           #fff;
-@navbar-inverse-link-hover-bg:              darken(@navbar-inverse-bg, 5%);
-@navbar-inverse-link-active-color:          #fff;
-@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 5%);
-@navbar-inverse-link-disabled-color:        #ccc;
-@navbar-inverse-link-disabled-bg:           transparent;
-
-// Inverted navbar brand label
-@navbar-inverse-brand-color:                @navbar-inverse-link-color;
-@navbar-inverse-brand-hover-color:          #fff;
-@navbar-inverse-brand-hover-bg:             none;
-
-// Inverted navbar toggle
-@navbar-inverse-toggle-hover-bg:            darken(@navbar-inverse-bg, 5%);
-@navbar-inverse-toggle-icon-bar-bg:         #fff;
-@navbar-inverse-toggle-border-color:        darken(@navbar-inverse-bg, 5%);
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-@nav-link-padding:                          10px 15px;
-@nav-link-hover-bg:                         @gray-lighter;
-
-@nav-disabled-link-color:                   @gray-light;
-@nav-disabled-link-hover-color:             @gray-light;
-
-//== Tabs
-@nav-tabs-border-color:                     #ddd;
-
-@nav-tabs-link-hover-border-color:          @gray-lighter;
-
-@nav-tabs-active-link-hover-bg:             @body-bg;
-@nav-tabs-active-link-hover-color:          @gray;
-@nav-tabs-active-link-hover-border-color:   #ddd;
-
-@nav-tabs-justified-link-border-color:            #ddd;
-@nav-tabs-justified-active-link-border-color:     @body-bg;
-
-//== Pills
-@nav-pills-border-radius:                   @border-radius-base;
-@nav-pills-active-link-hover-bg:            @component-active-bg;
-@nav-pills-active-link-hover-color:         @component-active-color;
-
-
-//== Pagination
-//
-//##
-
-@pagination-color:                     @link-color;
-@pagination-bg:                        #fff;
-@pagination-border:                    #ddd;
-
-@pagination-hover-color:               @link-hover-color;
-@pagination-hover-bg:                  @gray-lighter;
-@pagination-hover-border:              #ddd;
-
-@pagination-active-color:              @gray-light;
-@pagination-active-bg:                 #f5f5f5;
-@pagination-active-border:             @pagination-hover-border;
-
-@pagination-disabled-color:            @gray-light;
-@pagination-disabled-bg:               #fff;
-@pagination-disabled-border:           #ddd;
-
-
-//== Pager
-//
-//##
-
-@pager-bg:                             @pagination-bg;
-@pager-border:                         @pagination-border;
-@pager-border-radius:                  15px;
-
-@pager-hover-bg:                       @pagination-hover-bg;
-
-@pager-active-bg:                      @pagination-active-bg;
-@pager-active-color:                   @pagination-active-color;
-
-@pager-disabled-color:                 @gray-light;
-
-
-//== Jumbotron
-//
-//##
-
-@jumbotron-padding:              30px;
-@jumbotron-color:                inherit;
-@jumbotron-bg:                   @gray-lighter;
-@jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil((@font-size-base * 1.5));
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-@state-success-text:             #468847;
-@state-success-bg:               #dff0d8;
-@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
-
-@state-info-text:                #3a87ad;
-@state-info-bg:                  #d9edf7;
-@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
-
-@state-warning-text:             #c09853;
-@state-warning-bg:               #fcf8e3;
-@state-warning-border:           darken(spin(@state-warning-bg, -10), 3%);
-
-@state-danger-text:              #b94a48;
-@state-danger-bg:                #f2dede;
-@state-danger-border:            darken(spin(@state-danger-bg, -10), 3%);
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-@tooltip-max-width:           200px;
-//** Tooltip text color
-@tooltip-color:               #fff;
-//** Tooltip background color
-@tooltip-bg:                  rgba(0,0,0,.9);
-@tooltip-opacity:             .9;
-
-//** Tooltip arrow width
-@tooltip-arrow-width:         5px;
-//** Tooltip arrow color
-@tooltip-arrow-color:         @tooltip-bg;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-@popover-bg:                          #fff;
-//** Popover maximum width
-@popover-max-width:                   276px;
-//** Popover border color
-@popover-border-color:                rgba(0,0,0,.2);
-//** Popover fallback border color
-@popover-fallback-border-color:       #ccc;
-
-//** Popover title background color
-@popover-title-bg:                    darken(@popover-bg, 3%);
-
-//** Popover arrow width
-@popover-arrow-width:                 10px;
-//** Popover arrow color
-@popover-arrow-color:                 @popover-bg;
-
-//** Popover outer arrow width
-@popover-arrow-outer-width:           (@popover-arrow-width + 1);
-//** Popover outer arrow color
-@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
-//** Popover outer arrow fallback color
-@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-@label-default-bg:            @gray-light;
-//** Primary label background color
-@label-primary-bg:            @brand-primary;
-//** Success label background color
-@label-success-bg:            @brand-success;
-//** Info label background color
-@label-info-bg:               @brand-info;
-//** Warning label background color
-@label-warning-bg:            @brand-warning;
-//** Danger label background color
-@label-danger-bg:             @brand-danger;
-
-//** Default label text color
-@label-color:                 #fff;
-//** Default text color of a linked label
-@label-link-hover-color:      #fff;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-@modal-inner-padding:         20px;
-
-//** Padding applied to the modal title
-@modal-title-padding:         15px;
-//** Modal title line-height
-@modal-title-line-height:     @line-height-base;
-
-//** Background color of modal content area
-@modal-content-bg:                             #fff;
-//** Modal content border color
-@modal-content-border-color:                   rgba(0,0,0,.2);
-//** Modal content border color **for IE8**
-@modal-content-fallback-border-color:          #999;
-
-//** Modal backdrop background color
-@modal-backdrop-bg:           #000;
-//** Modal backdrop opacity
-@modal-backdrop-opacity:      .5;
-//** Modal header border color
-@modal-header-border-color:   #e5e5e5;
-//** Modal footer border color
-@modal-footer-border-color:   @modal-header-border-color;
-
-@modal-lg:                    900px;
-@modal-md:                    600px;
-@modal-sm:                    300px;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-@alert-padding:               15px;
-@alert-border-radius:         @border-radius-base;
-@alert-link-font-weight:      bold;
-
-@alert-success-bg:            @state-success-bg;
-@alert-success-text:          @state-success-text;
-@alert-success-border:        @state-success-border;
-
-@alert-info-bg:               @state-info-bg;
-@alert-info-text:             @state-info-text;
-@alert-info-border:           @state-info-border;
-
-@alert-warning-bg:            @state-warning-bg;
-@alert-warning-text:          @state-warning-text;
-@alert-warning-border:        @state-warning-border;
-
-@alert-danger-bg:             @state-danger-bg;
-@alert-danger-text:           @state-danger-text;
-@alert-danger-border:         @state-danger-border;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-@progress-bg:                 #f5f5f5;
-//** Progress bar text color
-@progress-bar-color:          #fff;
-//** Variable for setting rounded corners on progress bar.
-@progress-border-radius:      @border-radius-base;
-
-//** Default progress bar color
-@progress-bar-bg:             @brand-primary;
-//** Success progress bar color
-@progress-bar-success-bg:     @brand-success;
-//** Warning progress bar color
-@progress-bar-warning-bg:     @brand-warning;
-//** Danger progress bar color
-@progress-bar-danger-bg:      @brand-danger;
-//** Info progress bar color
-@progress-bar-info-bg:        @brand-info;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-@list-group-bg:                 #fff;
-//** `.list-group-item` border color
-@list-group-border:             #ddd;
-//** List group border radius
-@list-group-border-radius:      @border-radius-base;
-
-//** Background color of single list items on hover
-@list-group-hover-bg:           #f5f5f5;
-//** Text color of active list items
-@list-group-active-color:       @component-active-color;
-//** Background color of active list items
-@list-group-active-bg:          @component-active-bg;
-//** Border color of active list elements
-@list-group-active-border:      @list-group-active-bg;
-//** Text color for content within active list items
-@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
-
-//** Text color of disabled list items
-@list-group-disabled-color:      @gray-light;
-//** Background color of disabled list items
-@list-group-disabled-bg:         @gray-lighter;
-//** Text color for content within disabled list items
-@list-group-disabled-text-color: @list-group-disabled-color;
-
-@list-group-link-color:         #555;
-@list-group-link-hover-color:   @list-group-link-color;
-@list-group-link-heading-color: #333;
-
-
-//== Panels
-//
-//##
-
-@panel-bg:                    #fff;
-@panel-body-padding:          15px;
-@panel-heading-padding:       10px 15px;
-@panel-footer-padding:        @panel-heading-padding;
-@panel-border-radius:         @border-radius-base;
-
-//** Border color for elements within panels
-@panel-inner-border:          #ddd;
-@panel-footer-bg:             #f5f5f5;
-
-@panel-default-text:          @text-color;
-@panel-default-border:        #ddd;
-@panel-default-heading-bg:    #f5f5f5;
-
-@panel-primary-text:          #fff;
-@panel-primary-border:        @panel-default-border;
-@panel-primary-heading-bg:    @brand-primary;
-
-@panel-success-text:          @state-success-text;
-@panel-success-border:        @panel-default-border;
-@panel-success-heading-bg:    @brand-success;
-
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @panel-default-border;
-@panel-info-heading-bg:       @brand-info;
-
-@panel-warning-text:          @state-warning-text;
-@panel-warning-border:        @panel-default-border;
-@panel-warning-heading-bg:    @brand-warning;
-
-@panel-danger-text:           @state-danger-text;
-@panel-danger-border:         @panel-default-border;
-@panel-danger-heading-bg:     @brand-danger;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-@thumbnail-padding:           4px;
-//** Thumbnail background color
-@thumbnail-bg:                @body-bg;
-//** Thumbnail border color
-@thumbnail-border:            #ddd;
-//** Thumbnail border radius
-@thumbnail-border-radius:     @border-radius-base;
-
-//** Custom text color for thumbnail captions
-@thumbnail-caption-color:     @text-color;
-//** Padding around the thumbnail caption
-@thumbnail-caption-padding:   9px;
-
-
-//== Wells
-//
-//##
-
-@well-bg:                     #f5f5f5;
-@well-border:                 darken(@well-bg, 7%);
-
-
-//== Badges
-//
-//##
-
-@badge-color:                 #fff;
-//** Linked badge text color on hover
-@badge-link-hover-color:      #fff;
-@badge-bg:                    @brand-primary;
-
-//** Badge text color in active nav link
-@badge-active-color:          @link-color;
-//** Badge background color in active nav link
-@badge-active-bg:             #fff;
-
-@badge-font-weight:           bold;
-@badge-line-height:           1;
-@badge-border-radius:         10px;
-
-
-//== Breadcrumbs
-//
-//##
-
-@breadcrumb-padding-vertical:   8px;
-@breadcrumb-padding-horizontal: 15px;
-//** Breadcrumb background color
-@breadcrumb-bg:                 #f5f5f5;
-//** Breadcrumb text color
-@breadcrumb-color:              #ccc;
-//** Text color of current page in the breadcrumb
-@breadcrumb-active-color:       @gray-light;
-//** Textual separator for between breadcrumb elements
-@breadcrumb-separator:          "/";
-
-
-//== Carousel
-//
-//##
-
-@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
-
-@carousel-control-color:                      #fff;
-@carousel-control-width:                      15%;
-@carousel-control-opacity:                    .5;
-@carousel-control-font-size:                  20px;
-
-@carousel-indicator-active-bg:                #fff;
-@carousel-indicator-border-color:             #fff;
-
-@carousel-caption-color:                      #fff;
-
-
-//== Close
-//
-//##
-
-@close-font-weight:           bold;
-@close-color:                 #000;
-@close-text-shadow:           0 1px 0 #fff;
-
-
-//== Code
-//
-//##
-
-@code-color:                  #c7254e;
-@code-bg:                     #f9f2f4;
-
-@kbd-color:                   #fff;
-@kbd-bg:                      #333;
-
-@pre-bg:                      #f5f5f5;
-@pre-color:                   @gray-dark;
-@pre-border-color:            #ccc;
-@pre-scrollable-max-height:   340px;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-@component-offset-horizontal: 180px;
-//** Text muted color
-@text-muted:                  @gray-light;
-//** Abbreviations and acronyms border color
-@abbr-border-color:           @gray-light;
-//** Headings small color
-@headings-small-color:        @gray-light;
-//** Blockquote small color
-@blockquote-small-color:      @gray-light;
-//** Blockquote font size
-@blockquote-font-size:        (@font-size-base * 1.25);
-//** Blockquote border color
-@blockquote-border-color:     @gray-lighter;
-//** Page header border color
-@page-header-border-color:    @gray-lighter;
-//** Width of horizontal description list titles
-@dl-horizontal-offset:        @component-offset-horizontal;
-//** Horizontal line color.
-@hr-border:                   @gray-lighter;
diff --git a/buildroot/docs/website/docs.html b/buildroot/docs/website/docs.html
index c44ad8bac..9ef202ff9 100644
--- a/buildroot/docs/website/docs.html
+++ b/buildroot/docs/website/docs.html
@@ -1,51 +1,119 @@
 
 
-
-
- -

Documentation

- -

The Buildroot user manual is where you want to start reading if you -wish to understand how Buildroot works, or wish to change/extend/fix -things. It is available as:

- -

Latest stable release

- - -

Nightly build

- - -

If you find any errors (factual, grammatical, whatever) please -report them to us.

- -

If you find that you need help with Buildroot, you can ask for -help:

- - - -
-
+
+
+
+ +
+
Documentation
+
+

The Buildroot user manual is where you want to start reading if you + wish to understand how Buildroot works, or wish to change/extend/fix + things. It is available as:

+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

HTML
+ Stable | + Nightly +

+ +
+ +
+
+
+
+ +
+
+ +
+
+
+ +

PDF
+ Stable | + Nightly +

+ +
+ +
+
+
+
+ +
+
+ +
+
+
+ +

ASCII
+ Stable | + Nightly +

+ +
+
+ +

If you find any errors (factual, grammatical, whatever) please + report them to us.

+
+
+ +
+
Training
+
+

Bootlin (formerly Free Electrons) + offers a complete 3-days + training course on Buildroot. They also make the training + materials freely available:

+ +
+
+
+
Slides preview
+
+
+ buildroot slides +
+
+
+
+ +
+
+
Training materials
+ +
+
+
+
+
+ +
+
+
diff --git a/buildroot/docs/website/download.html b/buildroot/docs/website/download.html index 772161503..1caecca17 100644 --- a/buildroot/docs/website/download.html +++ b/buildroot/docs/website/download.html @@ -1,92 +1,217 @@ -
-
- -

Download

- -

- -The latest stable release is 2014.11, which can be downloaded -here:

- -buildroot-2014.11.tar.gz -(PGP signature) -or -buildroot-2014.11.tar.bz2 -(PGP signature). - -

- -You can also obtain daily snapshots of the latest Buildroot source tree if you -want to follow development, but cannot or do not wish to use Git. - -

- - -

Repository

- -The buildroot repository can be browsed online through cgit at -http://git.buildroot.net/buildroot. -To grab a copy of the repository use - -
-git clone git://git.buildroot.net/buildroot
- -Or if you're behind a firewall blocking git: - -
-git clone http://git.buildroot.net/git/buildroot.git
- -

- -Please use the native git protocol if at all possible, as it's a lot -more efficient than HTTP. - -

- -If you are not already familiar with using Git, we recommend you visit the Git website. - -

- -Once you've checked out a copy of the source tree, you can update your source -tree at any time so it is in sync with the latest and greatest by entering your -buildroot directory and running the command: +

+
+
+ +
+
Download
+
+ +

Latest long term support release: 2020.02.4

+ +
+
+
+
+
+ +
+
+ +
+
+
+

buildroot-2020.02.4.tar.gz

+

PGP signature

+
+
+
+
+
+ +
+
+ +
+
+
+ +

buildroot-2020.02.4.tar.bz2

+

PGP signature

+
+
+ +

Latest stable release: 2020.05.1

+ +
+
+
+
+
+ +
+
+ +
+
+
+

buildroot-2020.05.1.tar.gz

+

PGP signature

+
+
+
+
+
+ +
+
+ +
+
+
+ +

buildroot-2020.05.1.tar.bz2

+

PGP signature

+
+
+ +

Latest release candidate: 2020.08-rc2

+
+
+
+
+
+ +
+
+ +
+
+
+ +

buildroot-2020.08-rc2.tar.gz

+

PGP signature

+
+
+
+
+
+ +
+
+ +
+
+
+ +

buildroot-2020.08-rc2.tar.bz2

+

PGP signature

+
+
+ + This and earlier releases (and their PGP signatures) can always be downloaded from + http://buildroot.net/downloads/. +
+
+ +
+
Source code
+
+ +
+
+
+
Repository
+
+

The buildroot repository can be browsed online through cgit at + http://git.buildroot.net/buildroot. + To grab a copy of the repository use

+ + +
+ + + + +

+ +

+ Or if you're behind a firewall blocking git: +

+ +
+ + + + +

+ +

+ + Please use the native git protocol if at all possible, as it's a lot + more efficient than HTTP. + +

+ + If you are not already familiar with using Git, we recommend you visit the Git website. + +

+ + Once you've checked out a copy of the source tree, you can update your source + tree at any time so it is in sync with the latest and greatest by entering your + buildroot directory and running the command:

 git pull
 
-Because you've only been granted anonymous access to the tree, you won't be -able to push your changes to the repo. Changes can instead be submitted for -inclusion by posting them to the buildroot mailing list. + Because you've only been granted anonymous access to the tree, you won't be + able to push your changes to the repo. Changes can instead be submitted for + inclusion by posting them to the buildroot mailing list. +
+
+
+ +
+
+
Tarballs
+
+ You can also obtain daily snapshots of the latest Buildroot source tree if you + want to follow development, but cannot or do not wish to use Git. + + + +

+ Older versions can be downloaded from the release archive. +

+
+
+
+
+
+
+
diff --git a/buildroot/docs/website/favicon.png b/buildroot/docs/website/favicon.png new file mode 100644 index 000000000..3bfe1ba76 Binary files /dev/null and b/buildroot/docs/website/favicon.png differ diff --git a/buildroot/docs/website/fonts/glyphicons-halflings-regular.woff b/buildroot/docs/website/fonts/glyphicons-halflings-regular.woff index 8c54182aa..d83c539b8 100644 Binary files a/buildroot/docs/website/fonts/glyphicons-halflings-regular.woff and b/buildroot/docs/website/fonts/glyphicons-halflings-regular.woff differ diff --git a/buildroot/docs/website/footer.html b/buildroot/docs/website/footer.html index 9f7194ffb..82901b7ee 100644 --- a/buildroot/docs/website/footer.html +++ b/buildroot/docs/website/footer.html @@ -1,7 +1,7 @@ -
- - - - - + + + + + + diff --git a/buildroot/docs/website/git.html b/buildroot/docs/website/git.html deleted file mode 100644 index 890397592..000000000 --- a/buildroot/docs/website/git.html +++ /dev/null @@ -1,48 +0,0 @@ - - -
-
- -

Git Access

- -The buildroot repository can be browsed online through cgit at -http://git.buildroot.net/buildroot. -To grab a copy of the repository use - -
-git clone git://git.buildroot.net/buildroot
- -Or if you're behind a firewall blocking git: - -
-git clone http://git.buildroot.net/git/buildroot.git
- -

- -Please use the native git protocol if at all possible, as it's a lot -more efficient than HTTP. - -

- -If you are not already familiar with using Git, we recommend you visit the Git website. - -

- -Once you've checked out a copy of the source tree, you can update your source -tree at any time so it is in sync with the latest and greatest by entering your -buildroot directory and running the command: - -

-git pull
-
- -Because you've only been granted anonymous access to the tree, you won't be -able to push your changes to the repo. Changes can instead be submitted for -inclusion by posting them to the buildroot mailing list. - -
-
- - - diff --git a/buildroot/docs/website/header.html b/buildroot/docs/website/header.html index 98f6ec5bf..e1909291f 100644 --- a/buildroot/docs/website/header.html +++ b/buildroot/docs/website/header.html @@ -1,49 +1,54 @@ - - - Buildroot: making embedded Linux easy - - - - - + + + + + + + - + Buildroot - Making Embedded Linux Easy - - - - - -
+ + + + + + + + + diff --git a/buildroot/docs/website/images/amarula-solutions-logo.png b/buildroot/docs/website/images/amarula-solutions-logo.png new file mode 100644 index 000000000..3fe4aeef8 Binary files /dev/null and b/buildroot/docs/website/images/amarula-solutions-logo.png differ diff --git a/buildroot/docs/website/images/bootlin-logo.png b/buildroot/docs/website/images/bootlin-logo.png new file mode 100644 index 000000000..4f918750e Binary files /dev/null and b/buildroot/docs/website/images/bootlin-logo.png differ diff --git a/buildroot/docs/website/images/browser.png b/buildroot/docs/website/images/browser.png new file mode 100644 index 000000000..56039dfaa Binary files /dev/null and b/buildroot/docs/website/images/browser.png differ diff --git a/buildroot/docs/website/images/bug-buddy.png b/buildroot/docs/website/images/bug-buddy.png new file mode 100644 index 000000000..5d38fd831 Binary files /dev/null and b/buildroot/docs/website/images/bug-buddy.png differ diff --git a/buildroot/docs/website/images/buildroot-slides.png b/buildroot/docs/website/images/buildroot-slides.png new file mode 100644 index 000000000..6ecba3d47 Binary files /dev/null and b/buildroot/docs/website/images/buildroot-slides.png differ diff --git a/buildroot/docs/website/images/clippy.svg b/buildroot/docs/website/images/clippy.svg new file mode 100644 index 000000000..d827e82e5 --- /dev/null +++ b/buildroot/docs/website/images/clippy.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/buildroot/docs/website/images/email.png b/buildroot/docs/website/images/email.png new file mode 100644 index 000000000..367dadc7f Binary files /dev/null and b/buildroot/docs/website/images/email.png differ diff --git a/buildroot/docs/website/images/free-electrons-logo.png b/buildroot/docs/website/images/free-electrons-logo.png index a5c7d8a85..0a774041f 100644 Binary files a/buildroot/docs/website/images/free-electrons-logo.png and b/buildroot/docs/website/images/free-electrons-logo.png differ diff --git a/buildroot/docs/website/images/gift.png b/buildroot/docs/website/images/gift.png new file mode 100644 index 000000000..f527f8283 Binary files /dev/null and b/buildroot/docs/website/images/gift.png differ diff --git a/buildroot/docs/website/images/github_hash_mongrel2.png b/buildroot/docs/website/images/github_hash_mongrel2.png new file mode 100644 index 000000000..c695c3181 Binary files /dev/null and b/buildroot/docs/website/images/github_hash_mongrel2.png differ diff --git a/buildroot/docs/website/images/glyphicons-halflings-white.png b/buildroot/docs/website/images/glyphicons-halflings-white.png deleted file mode 100644 index 3bf6484a2..000000000 Binary files a/buildroot/docs/website/images/glyphicons-halflings-white.png and /dev/null differ diff --git a/buildroot/docs/website/images/glyphicons-halflings.png b/buildroot/docs/website/images/glyphicons-halflings.png deleted file mode 100644 index a99699932..000000000 Binary files a/buildroot/docs/website/images/glyphicons-halflings.png and /dev/null differ diff --git a/buildroot/docs/website/images/gplus.png b/buildroot/docs/website/images/gplus.png deleted file mode 100644 index 0ec57bbe2..000000000 Binary files a/buildroot/docs/website/images/gplus.png and /dev/null differ diff --git a/buildroot/docs/website/images/hammer.png b/buildroot/docs/website/images/hammer.png new file mode 100644 index 000000000..454a5e581 Binary files /dev/null and b/buildroot/docs/website/images/hammer.png differ diff --git a/buildroot/docs/website/images/irc.png b/buildroot/docs/website/images/irc.png new file mode 100644 index 000000000..442be4d74 Binary files /dev/null and b/buildroot/docs/website/images/irc.png differ diff --git a/buildroot/docs/website/images/logilin-logo.png b/buildroot/docs/website/images/logilin-logo.png new file mode 100644 index 000000000..8e8396cf0 Binary files /dev/null and b/buildroot/docs/website/images/logilin-logo.png differ diff --git a/buildroot/docs/website/images/menuconfig.png b/buildroot/docs/website/images/menuconfig.png index dffddfa46..423694f3e 100644 Binary files a/buildroot/docs/website/images/menuconfig.png and b/buildroot/docs/website/images/menuconfig.png differ diff --git a/buildroot/docs/website/images/menuconfig_small.png b/buildroot/docs/website/images/menuconfig_small.png deleted file mode 100644 index dffddfa46..000000000 Binary files a/buildroot/docs/website/images/menuconfig_small.png and /dev/null differ diff --git a/buildroot/docs/website/images/nconfig.png b/buildroot/docs/website/images/nconfig.png new file mode 100644 index 000000000..cc05d6e8e Binary files /dev/null and b/buildroot/docs/website/images/nconfig.png differ diff --git a/buildroot/docs/website/images/package.png b/buildroot/docs/website/images/package.png new file mode 100644 index 000000000..9dd8b1e0a Binary files /dev/null and b/buildroot/docs/website/images/package.png differ diff --git a/buildroot/docs/website/images/pdf-icon.png b/buildroot/docs/website/images/pdf-icon.png new file mode 100644 index 000000000..71ae983de Binary files /dev/null and b/buildroot/docs/website/images/pdf-icon.png differ diff --git a/buildroot/docs/website/images/rockwell-collins-logo.png b/buildroot/docs/website/images/rockwell-collins-logo.png new file mode 100644 index 000000000..b5956a82a Binary files /dev/null and b/buildroot/docs/website/images/rockwell-collins-logo.png differ diff --git a/buildroot/docs/website/images/scaleway-logo.png b/buildroot/docs/website/images/scaleway-logo.png new file mode 100644 index 000000000..168591454 Binary files /dev/null and b/buildroot/docs/website/images/scaleway-logo.png differ diff --git a/buildroot/docs/website/images/smile-logo.png b/buildroot/docs/website/images/smile-logo.png new file mode 100644 index 000000000..046c999a2 Binary files /dev/null and b/buildroot/docs/website/images/smile-logo.png differ diff --git a/buildroot/docs/website/images/tap2open-logo.png b/buildroot/docs/website/images/tap2open-logo.png new file mode 100644 index 000000000..136019b62 Binary files /dev/null and b/buildroot/docs/website/images/tap2open-logo.png differ diff --git a/buildroot/docs/website/images/text.png b/buildroot/docs/website/images/text.png new file mode 100644 index 000000000..e2eee546f Binary files /dev/null and b/buildroot/docs/website/images/text.png differ diff --git a/buildroot/docs/website/images/tkos-logo.png b/buildroot/docs/website/images/tkos-logo.png new file mode 100644 index 000000000..6fe58826e Binary files /dev/null and b/buildroot/docs/website/images/tkos-logo.png differ diff --git a/buildroot/docs/website/images/tux-flat.png b/buildroot/docs/website/images/tux-flat.png new file mode 100644 index 000000000..782699f5e Binary files /dev/null and b/buildroot/docs/website/images/tux-flat.png differ diff --git a/buildroot/docs/website/images/valid-html401.png b/buildroot/docs/website/images/valid-html401.png deleted file mode 100644 index ec9bc0ce0..000000000 Binary files a/buildroot/docs/website/images/valid-html401.png and /dev/null differ diff --git a/buildroot/docs/website/images/xconfig.png b/buildroot/docs/website/images/xconfig.png new file mode 100644 index 000000000..cb99a3a35 Binary files /dev/null and b/buildroot/docs/website/images/xconfig.png differ diff --git a/buildroot/docs/website/images/zillabit-logo.png b/buildroot/docs/website/images/zillabit-logo.png new file mode 100644 index 000000000..6a2ac31f5 Binary files /dev/null and b/buildroot/docs/website/images/zillabit-logo.png differ diff --git a/buildroot/docs/website/images/zip.png b/buildroot/docs/website/images/zip.png new file mode 100644 index 000000000..02a1dc113 Binary files /dev/null and b/buildroot/docs/website/images/zip.png differ diff --git a/buildroot/docs/website/index.html b/buildroot/docs/website/index.html index 36075bc27..300adbb83 100644 --- a/buildroot/docs/website/index.html +++ b/buildroot/docs/website/index.html @@ -1,47 +1,151 @@ -
-
-
-
-
-

Buildroot
Making Embedded Linux Easy

-

Buildroot is a simple, efficient and easy-to-use tool to generate - embedded Linux systems through cross-compilation.

-
-
- Buildroot logo -
+ +
+
+
+
+ +
+
+

Buildroot
+ Making Embedded Linux Easy

+ + +
+
+
+
+ + +
+
+
+

Buildroot is a simple, efficient and easy-to-use tool to + generate embedded Linux systems through cross-compilation.

+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+ +

Can handle everything

+

Cross-compilation toolchain, root filesystem generation, + kernel image compilation and bootloader compilation.

+
+ +
+
+
+
+ +
+
+ +
+
-
- + +

Is very easy

+

Thanks to its kernel-like menuconfig, gconfig and + xconfig configuration interfaces, building a basic system with + Buildroot is easy and typically takes 15-30 minutes.

+ +
+ +
+
+
+
+ +
+
+ +
+
+ +

Supports several thousand packages

+

X.org stack, Gtk3, Qt 5, GStreamer, Webkit, Kodi, a large number of network-related and system-related utilities are supported.

+ +
+
+
+
+ +
+
+
+

Buildroot is for Everyone.

+

Has a simple structure that makes it easy to understand and extend. It relies only on the well-known Makefile language.

-
-
+
-
-
-
-
-

Recent commits

+
+
+ +
+
+
+ +
+
+
+

Our recent activity.

+

Buildroot is an open source project: many developers contribute to it daily.

-
-
- + +
+
+
+
+ +
+
+
+
+
-
+
diff --git a/buildroot/docs/website/js/bootstrap.min.js b/buildroot/docs/website/js/bootstrap.min.js deleted file mode 100644 index 7c1561a8b..000000000 --- a/buildroot/docs/website/js/bootstrap.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Bootstrap v3.2.0 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('