Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build armhf libs #241

Open
wants to merge 7 commits into
base: knulli-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions check-armhf-libs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# list libraries in 64 and 32 bit builds
ls output/h700/target/usr/lib | awk 'BEGIN {FS="."} {print $1}' |grep lib | sort | uniq > ./liblist64.txt
ls output/h700_armhf_libs/target/usr/lib | awk 'BEGIN {FS="."} {print $1}' |grep lib | sort | uniq > ./liblist32.txt

echo
echo Missing libs:

if [[ $1 == '-a' ]]; then
diff ./liblist64.txt ./liblist32.txt | grep lib | grep \<
exit 0
fi

ignored='avahi libdns_sd' # avahi
ignored+=' samba libsmb libsamdb libnss libndr' # samba
ignored+=' libtevent wbclient dcerpc libnetapi' # samba
ignored+=' nfsid ntfs libbtrfs libext2fs libe2p libcom_err libss' # fs
ignored+=' libfdisk libparted' # fs
ignored+=' pigpio bluetooth libi2c' # hw
ignored+=' libelf libdw libasm' # elfutils
ignored+=' libgamestream moonlight' # moonlight
ignored+=' lightspark mupen libretro solarus' # emulators
ignored+=' mosquitto libxtables' # net
ignored+=' alpm' # pacman
ignored+=' libSAASound' # used by simcoupe
ignored+=' libSDL2_mixer_ext' # used by thextech
ignored+=' libgomp' # gcc
ignored+=' libip4tc libip6tc' # iptables
ignored+=' libprocps' # procps
ignored+=' libsyslog' # sysklogd

diff ./liblist64.txt ./liblist32.txt | grep lib | grep \< > libdiff.txt

for ignore in $ignored; do
grep -v $ignore libdiff.txt > libdiff.txt.grep
mv libdiff.txt.grep libdiff.txt
done

cat libdiff.txt
rm libdiff.txt
49 changes: 49 additions & 0 deletions configs/batocera-board.libs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# users
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/users.txt"

# toolchain definition
BR2_OPTIMIZE_2=y
BR2_ENABLE_LTO=y
BR2_SHARED_STATIC_LIBS=y
BR2_GCC_ENABLE_GRAPHITE=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
# required for utf-8
BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY=y
BR2_STRIP_EXCLUDE_DIRS="usr/ryujinx usr/bin/vpinball usr/share/ecwolf usr/bin/vita3k usr/bin/dmdserver"

# Allow to build GOLD linker, but do not use as default
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-gold --enable-plugins"

# prefer linux tools over busybox tools
BR2_PACKAGE_BUSYBOX=n

# system
BR2_TARGET_GENERIC_HOSTNAME="knulli"
BR2_TARGET_GENERIC_ISSUE="knulli"
BR2_INIT_SYSV=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_ROOT_PASSWD="linux"
BR2_SYSTEM_ENABLE_NLS=y
BR2_ENABLE_LOCALE_WHITELIST="C ar ca cs_CZ cy cy_GB cy de en el es es_MX eu eu_ES fr fr_FR fi_FI gl_ES he hu id_ID it ja ja_JP ja ko nb nb_NO nl nn nn_NO oc oc_FR pl pt pt_PT pt_BR ru ru_RU uk uk_UA ro_RO sk_SK sv sv_SE tr vi_VN zh zh_CN zh_TW"
BR2_GENERATE_LOCALE="en_US.UTF-8 ar_YE.UTF-8 ca_ES.UTF-8 cs_CZ.UTF-8 cy_GB.UTF-8 de_DE.UTF-8 el_GR.UTF-8 en_GB.UTF-8 es_ES.UTF-8 es_MX.UTF-8 eu_ES.UTF-8 fr_FR.UTF-8 fi_FI.UTF-8 gl_ES.UTF-8 he_IL.UTF-8 hu_HU.UTF-8 id_ID.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 nb_NO.UTF-8 nl_NL.UTF-8 nn_NO.UTF-8 oc_FR.UTF-8 pl_PL.UTF-8 pt_BR.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 uk_UA.UTF-8 ro_RO.UTF-8 sk_SK.UTF-8 sv_SE.UTF-8 tr_TR.UTF-8 vi_VN.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8"
BR2_TARGET_TZ_INFO=y
BR2_TARGET_LOCALTIME="Europe/Paris"
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set

# Initramfs decompression support
BR2_LINUX_KERNEL_LZ4=y

# disable the mosquitto broker which is on by default
BR2_PACKAGE_MOSQUITTO_BROKER=n

# System
BR2_PACKAGE_BATOCERA_SYSTEM=n
BR2_PACKAGE_BATOCERA_EXTRAS=n
BR2_PACKAGE_BATOCERA_TOOLS=n
BR2_PACKAGE_BATOCERA_ALL_SYSTEMS=n
BR2_PACKAGE_BATOCERA_LINUX_FIRMWARES=n
BR2_SYSTEM_BIN_SH_DASH=y # /bin/sh implementation; set here because a `choice` cannot be `select`ed, e.g. from batocera-system/Config.in

# Enables ccache
BR2_CCACHE=y
67 changes: 67 additions & 0 deletions configs/batocera-h700_armhf_libs.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
include batocera-board.libs

# Target definition
BR2_arm=y
BR2_ARM_EABIHF=y
BR2_cortex_a53=y
BR2_ARM_FPU_NEON_FP_ARMV8=y
BR2_PACKAGE_BATOCERA_TARGET_H700=y
BR2_TARGET_OPTIMIZATION="-pipe -fsigned-char -mcpu=cortex-a53 -mtune=cortex-a53"
#BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/patches $(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/allwinner/patches $(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/allwinner/h700/patches"

# Build tar file only
BR2_TARGET_ROOTFS_TAR=y
BR2_TARGET_ROOTFS_TAR_NONE=y

# Batocera system
BR2_PACKAGE_BATOCERA_KODI20=n


######
# Linux headers same as kernel, a 4.9 series
BR2_LINUX_KERNEL=y
BR2_KERNEL_HEADERS_AS_KERNEL=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/allwinner/h700/linux-sunxi64-legacy.config"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.170"
BR2_LINUX_KERNEL_VERSION="4.9.170"
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="4.9.170"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
BR2_DEFAULT_KERNEL_HEADERS="4.9.170"
BR2_TOOLCHAIN_HEADERS_AT_LEAST="4.9"

BR2_PACKAGE_HAS_LIBMALI=y
BR2_PACKAGE_PROVIDES_LIBMALI="mali-g31-fbdev"
BR2_PACKAGE_MALI_G31_FBDEV=y

## To enable libFLAC++
BR2_INSTALL_LIBSTDCPP=y

## Add packages that are missed by automatic config

BR2_PACKAGE_LIBMALI=y
BR2_PACKAGE_LIBEGL=y
#BR2_PACKAGE_LIBOPENCL=y # missing in 32 bit libmali

BR2_PACKAGE_KEYUTILS=y
BR2_PACKAGE_LIBLCF=y
BR2_PACKAGE_PUGIXML=y
BR2_PACKAGE_SPIRV_TOOLS=y
BR2_PACKAGE_ZSTD=y
BR2_PACKAGE_INOTIFY_TOOLS=y
BR2_PACKAGE_LIRC_TOOLS=y
BR2_PACKAGE_TPM2_TSS=y
BR2_PACKAGE_SQLITE=y

BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_LIBS=y
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS=y


## Include trimmed list of packages from 64-bit build
include batocera-h700_armhf_libs.packages
Loading