diff options
-rw-r--r-- | mk/vars.mk | 9 | ||||
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/init.d/fs | 58 | ||||
-rw-r--r-- | package/e2fsprogs/Makefile | 10 | ||||
-rw-r--r-- | package/libcec/Makefile | 4 | ||||
-rw-r--r-- | package/libjasper/Makefile | 2 | ||||
-rw-r--r-- | package/qemu/Makefile | 20 | ||||
-rwxr-xr-x | scripts/install-rpi.sh | 120 | ||||
-rw-r--r-- | scripts/scan-tools.sh | 6 | ||||
-rw-r--r-- | target/config/Config.in | 1 | ||||
-rw-r--r-- | target/config/Config.in.adk | 7 | ||||
-rw-r--r-- | target/config/Config.in.tools | 8 | ||||
-rw-r--r-- | target/linux/config/Config.in.audio | 2 | ||||
-rw-r--r-- | target/microblaze/Makefile | 2 | ||||
-rw-r--r-- | target/packages/pkg-available/mpdbox | 1 |
15 files changed, 122 insertions, 130 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index a26dc0734..3215ff1a5 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -123,8 +123,17 @@ TARGET_CXXFLAGS+= -flto TARGET_LDFLAGS+= -flto endif +ifeq ($(ADK_LINUX_MICROBLAZE),y) +TARGET_CFLAGS+= -mxl-barrel-shift +TARGET_CXX_FLAGS+= -mxl-barrel-shift +endif + ifneq ($(ADK_DEBUG),) +ifeq ($(ADK_DEBUG_OPTS),y) +TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer $(ADK_TARGET_CFLAGS_OPT) +else TARGET_CFLAGS+= -g3 -fno-omit-frame-pointer +endif else TARGET_CPPFLAGS+= -DNDEBUG TARGET_CFLAGS+= -fomit-frame-pointer $(ADK_TARGET_CFLAGS_OPT) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2d3525b58..c9a343d59 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 81 +PKG_RELEASE:= 82 PKG_SECTION:= base PKG_DESCR:= basic files and scripts diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs index 8f4397897..e995422ee 100644 --- a/package/base-files/src/etc/init.d/fs +++ b/package/base-files/src/etc/init.d/fs @@ -8,46 +8,26 @@ # activate any logical volumes [ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; } +fstypes="ext2 ext3 ext4 xfs" + # filesystem checks -[ -x /sbin/fsck.ext2 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext2|awk '{ print $1}');do fsck.ext2 $i;done; -} -[ -x /sbin/fsck.ext3 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext3|awk '{ print $1}');do fsck.ext3 $i;done; -} -[ -x /sbin/fsck.ext4 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext4|awk '{ print $1}');do fsck.ext4 $i;done; -} -[ -x /sbin/fsck.xfs ] && { - for i in $(grep -v "^#" /etc/fstab|grep xfs|awk '{ print $1}');do xfs_repair $i;done; -} -# local filesystems -grep ext2 /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext2 >/dev/null 2>&1 - if [ $? -eq 0 ];then - mount -a -t ext2 - fi -fi -grep ext3 /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext3 >/dev/null 2>&1 - if [ $? -eq 0 ];then - mount -a -t ext3 - fi -fi -grep ext4 /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext4 >/dev/null 2>&1 - if [ $? -eq 0 ];then - mount -a -t ext4 - fi -fi -grep xfs /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep xfs >/dev/null 2>&1 +for fs in $fstypes; do + [ -x /usr/sbin/fsck.$fs ] && { + for i in $(grep -v "^#" /etc/fstab|grep $fs|awk '{ print $1}');do + echo "Checking filesystem on $i with $fs" + fsck -p -t $fs $i + done + } +done + +# mount local filesystems +for fs in $fstypes; do + grep $fs /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then - mount -a -t xfs + grep -v "^#" /etc/fstab |grep $fs >/dev/null 2>&1 + if [ $? -eq 0 ];then + mount -a -t $fs + fi fi -fi +done exit 0 diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile index 391d3475b..ada599fb0 100644 --- a/package/e2fsprogs/Makefile +++ b/package/e2fsprogs/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= e2fsprogs -PKG_VERSION:= 1.42.8 -PKG_RELEASE:= 3 -PKG_MD5SUM:= 8ef664b6eb698aa6b733df59b17b9ed4 +PKG_VERSION:= 1.42.9 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 3f8e41e63b432ba114b33f58674563f7 PKG_DESCR:= Ext2/3/4 filesystem utilities (meta-package) PKG_SECTION:= fs PKG_DEPENDS:= libcom-err libuuid libblkid libpthread @@ -16,8 +16,6 @@ PKG_URL:= http://e2fsprogs.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=e2fsprogs/} PKG_OPTS:= dev -PKG_CFLINE_E2FSPROGS:= default y if ADK_TARGET_ROOTFS_CF - PKG_SUBPKGS:= E2FSPROGS LIBE2FS LIBCOM_ERR LIBSS E2FSCK_STATIC PKG_SUBPKGS+= RESIZE2FS TUNE2FS E2FSCK MKE2FS PKGSD_LIBE2FS:= e2fsprogs library @@ -88,6 +86,8 @@ e2fsck-install: ${INSTALL_DIR} ${IDIR_E2FSCK}/usr/sbin ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSCK}/usr/sbin cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext2 + cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext3 + cd $(IDIR_E2FSCK)/usr/sbin && ln -sf e2fsck fsck.ext4 mke2fs-install: ${INSTALL_DIR} ${IDIR_MKE2FS}/usr/sbin diff --git a/package/libcec/Makefile b/package/libcec/Makefile index 4f07c5bae..e4380c197 100644 --- a/package/libcec/Makefile +++ b/package/libcec/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:= libcec PKG_VERSION:= 2.1.4 -PKG_RELEASE:= 2 +PKG_RELEASE:= 3 PKG_MD5SUM:= d65e52ab3295e9e4b73bf4580f3bd4f7 PKG_DESCR:= control your device with your TV remote control PKG_SECTION:= libs PKG_BUILDDEP:= autotool PKG_URL:= http://libcec.pulse-eight.com/ -PKG_SITES:= http://www.openadk.org/distfiles +PKG_SITES:= http://packages.pulse-eight.net/pulse/sources/libcec/ PKG_OPTS:= dev PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc diff --git a/package/libjasper/Makefile b/package/libjasper/Makefile index fe9bb528f..e4b45a1fd 100644 --- a/package/libjasper/Makefile +++ b/package/libjasper/Makefile @@ -20,6 +20,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBJASPER,libjasper,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +XAKE_FLAGS+= GCC_HONOUR_COPTS=s + libjasper-install: $(INSTALL_DIR) $(IDIR_LIBJASPER)/usr/lib $(CP) $(WRKINST)/usr/lib/libjasper*.so* \ diff --git a/package/qemu/Makefile b/package/qemu/Makefile index 6f5d3956a..b4c20b14e 100644 --- a/package/qemu/Makefile +++ b/package/qemu/Makefile @@ -10,8 +10,9 @@ PKG_MD5SUM:= 9541063d999cf9659ed7fdce71314f31 PKG_DESCR:= cpu and system emulator PKG_SECTION:= misc PKG_DEPENDS:= zlib glib -PKG_BUILDDEP:= gettext-tiny libiconv-tiny glib-host -PKG_BUILDDEP+= qemu-host zlib glib +PKG_BUILDDEP:= gettext-tiny libiconv-tiny +PKG_BUILDDEP+= zlib glib +HOST_BUILDDEP:= glib-host PKG_URL:= http://wwww.qemu.org/ PKG_SITES:= http://wiki.qemu.org/download/ @@ -38,9 +39,10 @@ CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ --disable-sdl \ --bindir=/usr/bin -HOST_STYLE:= manual CFLAGS_FOR_BUILD+= -DNATIVE +HOST_STYLE:= manual HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ + --prefix=${STAGING_HOST_DIR}/usr \ --disable-docs \ --disable-werror \ --disable-system \ @@ -48,17 +50,17 @@ HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ host-configure: cd ${WRKBUILD}; rm -f config.{cache,status}; \ - env ${HOST_CONFIGURE_ENV} \ - ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ - ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE) + env ${HOST_CONFIGURE_ENV} \ + ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ + ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE) host-build: cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE) - + ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE) + qemu-hostinstall: cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - DESTDIR='$(STAGING_HOST_DIR)' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) + ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) qemu-install: $(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu diff --git a/scripts/install-rpi.sh b/scripts/install-rpi.sh index d104f5431..ed85cc53e 100755 --- a/scripts/install-rpi.sh +++ b/scripts/install-rpi.sh @@ -3,125 +3,101 @@ # material, please see the LICENCE file in the top-level directory. if [ $(id -u) -ne 0 ];then - printf "Installation is only possible as root\n" + echo "Installation is only possible as root" exit 1 fi -printf "Checking if parted is installed" -parted=$(which parted) - -if [ ! -z $parted -a -x $parted ];then - printf "...okay\n" -else - printf "...failed\n" - exit 1 -fi - -printf "Checking if sfdisk is installed" -sfdisk=$(which sfdisk) - -if [ ! -z $sfdisk -a -x $sfdisk ];then - printf "...okay\n" -else - printf "...failed\n" - exit 1 -fi - -printf "Checking if mke2fs is installed" -mke2fs=$(which mke2fs) - -if [ ! -z $mke2fs -a -x $mke2fs ];then - printf "...okay\n" -else - printf "...failed\n" - exit 1 -fi +for tool in parted sfdisk mkfs.vfat mkfs.ext4;do + if ! which $tool >/dev/null; then + echo "Checking if $tool is installed... failed" + f=1 + fi +done +[[ $f -eq 1 ]] && exit 1 if [ -z $1 ];then - printf "Please give your SD card device as first parameter\n" + echo "Please give your SD card device as first parameter" exit 1 else if [ -z $2 ];then - printf "Please give your install tar archive as second parameter\n" - exit 2 + echo "Please give your install tar archive as second parameter" + exit 1 fi if [ -f $2 ];then - printf "Installing $2 on $1\n" + echo "Installing $2 on $1" else - printf "$2 is not a file, Exiting\n" + echo "$2 is not a file, exiting" exit 1 fi if [ -b $1 ];then - printf "Using $1 as SD card disk for installation\n" - printf "This will destroy all data on $1, are you sure?\n" - printf "Type "y" to continue\n" + echo "Using $1 as SD card disk for installation" + echo "WARNING: This will destroy all data on $1 - type Yes to continue!" read y - if [ "$y" = "y" ];then + if [ "$y" = "Yes" ];then $sfdisk -l $1 2>&1 |grep 'No medium' if [ $? -eq 0 ];then + echo "No medium found" exit 1 else - printf "Starting with installation\n" + echo "Starting with installation" fi else - printf "Exiting.\n" + echo "Exiting." exit 1 fi else - printf "Sorry $1 is not a block device\n" + echo "Sorry $1 is not a block device" exit 1 fi fi if [ $(mount | grep $1| wc -l) -ne 0 ];then - printf "Block device $1 is in use, please umount first.\n" + echo "Block device $1 is in use, please umount first" exit 1 fi +echo "Wiping existing partitions" +dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1 +sync -if [ $($sfdisk -l $1 2>/dev/null|grep Empty|wc -l) -ne 4 ];then - printf "Partitions already exist, should I wipe them?\n" - printf "Type y to continue\n" - read y - if [ $y = "y" ];then - printf "Wiping existing partitions\n" - dd if=/dev/zero of=$1 bs=512 count=1 >/dev/null 2>&1 - else - printf "Exiting.\n" - exit 1 - fi -fi - -printf "Create partition and filesystem for raspberry pi\n" +echo "Create partition and filesystem for raspberry pi" rootpart=${1}2 -$parted -s $1 mklabel msdos +parted -s $1 mklabel msdos sleep 2 -maxsize=$(env LC_ALL=C $parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//') -rootsize=$(($maxsize-16)) +maxsize=$(env LC_ALL=C parted $1 -s unit cyl print |awk '/^Disk/ { print $3 }'|sed -e 's/cyl//') +rootsize=$(($maxsize-34)) +datasize=$(($maxsize-2)) -$parted -s $1 unit cyl mkpart primary fat32 -- 0 16 -$parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize -$parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize -$parted -s $1 set 1 boot on -$sfdisk --change-id $1 3 88 +parted -s $1 unit cyl mkpart primary fat32 -- 0 16 +parted -s $1 unit cyl mkpart primary ext2 -- 16 $rootsize +parted -s $1 unit cyl mkpart primary ext2 $rootsize $datasize +parted -s $1 unit cyl mkpart primary fat32 $datasize $maxsize +parted -s $1 set 1 boot on +sfdisk --change-id $1 4 88 sleep 2 -mkfs.vfat ${1}1 -$mke2fs ${1}2 +mkfs.vfat ${1}1 >/dev/null +mkfs.ext4 -q -O ^huge_file ${1}2 +mkfs.ext4 -q -O ^huge_file ${1}3 sync sleep 2 tmp=$(mktemp -d) -mount -t ext2 ${rootpart} $tmp +mount -t ext4 ${rootpart} $tmp mkdir $tmp/boot +mkdir $tmp/data +mount -t ext4 ${1}3 $tmp/data +mkdir $tmp/data/mpd $tmp/data/xbmc mount -t vfat ${1}1 $tmp/boot -sleep 2 -printf "Extracting install archive\n" +sleep 1 +echo "Extracting install archive" tar -C $tmp -xzpf $2 -printf "Fixing permissions\n" +echo "Fixing permissions" chmod 1777 $tmp/tmp chmod 4755 $tmp/bin/busybox +echo "/dev/mmcblk0p3 /data ext4 rw 0 0" >>$tmp/etc/fstab +umount $tmp/data umount $tmp/boot umount $tmp -printf "Successfully installed.\n" +echo "Successfully installed." exit 0 diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 16b13d4e3..ee8d8a3ff 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -295,6 +295,11 @@ if ! which lzop >/dev/null 2>&1; then host_build_lzop=1 fi +host_build_qemu=0 +if ! which qemu-img >/dev/null 2>&1; then + echo "No qemu found, will build one when required." + host_build_qemu=1 +fi echo "config ADK_HOST_BUILD_TOOLS" > $topdir/target/config/Config.in.prereq printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq @@ -314,6 +319,7 @@ if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCAC if [ $host_build_genext2fs -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_qemu -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_QEMU if ADK_HOST_NEED_QEMU" >> $topdir/target/config/Config.in.prereq ;fi cd $topdir rm -rf tmp diff --git a/target/config/Config.in b/target/config/Config.in index 1255ceae3..501039ed1 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -771,6 +771,7 @@ config ADK_TARGET_ROOTFS_SQUASHFS bool "Compressed read-only root filesystem (squashfs)" select ADK_KERNEL_SQUASHFS select ADK_HOST_NEED_SQUASHFS + select ADK_HOST_NEED_QEMU if ADK_HARDWARE_QEMU select ADK_TARGET_QEMU_WITH_BLOCK if ADK_HARDWARE_QEMU depends on ADK_TARGET_WITH_MTD help diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk index 0c598e50c..7487ac056 100644 --- a/target/config/Config.in.adk +++ b/target/config/Config.in.adk @@ -33,6 +33,13 @@ config ADK_DEBUG All packages and libc will be compiled and packaged with debug information. Mostly useful for NFS root or big USB/CF or hard disk setups. +config ADK_DEBUG_OPTS + bool "use optimization cflags" + depends on ADK_DEBUG + default n + help + All packages and libc will be compiled with debug information and optimization flags on. + config ADK_DEBUG_STRIP bool "strip target binaries/libraries for gdbserver usage" depends on ADK_DEBUG diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index 95e4f6d63..f95a4508b 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -97,6 +97,14 @@ config ADK_HOST_BUILD_MKSH boolean default n +config ADK_HOST_NEED_QEMU + boolean + default n + +config ADK_HOST_BUILD_QEMU + boolean + default n + config ADK_HOST_NEED_SYSLINUX boolean default n diff --git a/target/linux/config/Config.in.audio b/target/linux/config/Config.in.audio index a1a5077e6..f87a7e751 100644 --- a/target/linux/config/Config.in.audio +++ b/target/linux/config/Config.in.audio @@ -124,7 +124,7 @@ config ADK_KPACKAGE_KMOD_SND_BCM2708_SOC_I2S select ADK_KPACKAGE_KMOD_SND select ADK_KERNEL_SND_ARM select ADK_KPACKAGE_KMOD_SND_SOC - select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE + select ADK_KPACKAGE_KMOD_SND_PCM_DMAENGINE if !ADK_KERNEL_VERSION_3_10_34 select ADK_KPACKAGE_KMOD_SND_COMPRESS depends on ADK_TARGET_SYSTEM_RASPBERRY_PI default n diff --git a/target/microblaze/Makefile b/target/microblaze/Makefile index 58d02c5be..4a39e1c3b 100644 --- a/target/microblaze/Makefile +++ b/target/microblaze/Makefile @@ -18,7 +18,7 @@ endif ifeq ($(ADK_TARGET_FS),squashfs) imageinstall: $(BUILD_DIR)/root.squashfs - qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE) + env PATH=$(HOST_PATH) qemu-img create -f raw $(FW_DIR)/$(ROOTFSSQUASHFS) $(ADK_TARGET_MTD_SIZE) dd conv=notrunc if=$(BUILD_DIR)/root.squashfs of=$(FW_DIR)/$(ROOTFSSQUASHFS) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) ifneq ($(ADK_HARDWARE_QEMU),) diff --git a/target/packages/pkg-available/mpdbox b/target/packages/pkg-available/mpdbox index eab49bc8a..b67197c11 100644 --- a/target/packages/pkg-available/mpdbox +++ b/target/packages/pkg-available/mpdbox @@ -49,6 +49,7 @@ config ADK_PKG_MPDBOX select ADK_PACKAGE_PHP_FASTCGI select ADK_PACKAGE_SCREEN select ADK_PACKAGE_VIM + select ADK_PACKAGE_E2FSCK select ADK_PACKAGE_ALSA_UTILS select ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER select ADK_KPACKAGE_KMOD_SND_INTEL8X0 if ADK_TARGET_SYSTEM_QEMU_I686 |