From 04dc12f590f77688c815cdb92262f9ef602b8a85 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 3 Feb 2012 20:13:51 +0100 Subject: [PATCH] new package: add package 'bcm2835-bootloader' Signed-off-by: Stephan Raue --- packages/linux/meta | 4 +++ packages/tools/bcm2835-bootloader/build | 34 +++++++++++++++++++++++ packages/tools/bcm2835-bootloader/meta | 36 +++++++++++++++++++++++++ projects/RPi/options | 4 +-- scripts/image | 7 ++++- 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100755 packages/tools/bcm2835-bootloader/build create mode 100644 packages/tools/bcm2835-bootloader/meta diff --git a/packages/linux/meta b/packages/linux/meta index e2d8a4186a..37708ea8a1 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -49,3 +49,7 @@ fi if [ "$BOOTLOADER" = "atv-bootloader" ]; then PKG_DEPENDS="$PKG_DEPENDS atv-bootloader" fi + +if [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then + PKG_DEPENDS="$PKG_DEPENDS bcm2835-bootloader" +fi diff --git a/packages/tools/bcm2835-bootloader/build b/packages/tools/bcm2835-bootloader/build new file mode 100755 index 0000000000..ede376c57f --- /dev/null +++ b/packages/tools/bcm2835-bootloader/build @@ -0,0 +1,34 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD + +rm -rf ./vmlinuz + +python ./imagetool-uncompressed.py \ + first32k.bin \ + boot-uncompressed.txt \ + args-uncompressed.txt \ + $(kernel_path)/arch/arm/boot/Image \ + vmlinuz diff --git a/packages/tools/bcm2835-bootloader/meta b/packages/tools/bcm2835-bootloader/meta new file mode 100644 index 0000000000..8246ea1f92 --- /dev/null +++ b/packages/tools/bcm2835-bootloader/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="bcm2835-bootloader" +PKG_VERSION="1.0" +PKG_REV="1" +PKG_ARCH="arm" +PKG_LICENSE="nonfree" +PKG_SITE="http://www.broadcom.com" +PKG_URL="http://sraue.openelec.tv/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux Python" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="bcm2835-bootloader: Tool to create a bootable kernel for RaspberryPi" +PKG_LONGDESC="bcm2835-bootloader: Tool to create a bootable kernel for RaspberryPi" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/projects/RPi/options b/projects/RPi/options index fbebc5f792..de268999fe 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -93,8 +93,8 @@ # LOOP optimazion support LOOP_SUPPORT="yes" -# Bootloader to use (syslinux / u-boot / atv-bootloader) - BOOTLOADER="syslinux" +# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader) + BOOTLOADER="bcm2835-bootloader" # Configuration for u-boot UBOOT_CONFIG="" diff --git a/scripts/image b/scripts/image index c0619fa35c..8604d5ae61 100755 --- a/scripts/image +++ b/scripts/image @@ -177,7 +177,12 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" KERNEL_ARCH="arm" fi - cp -PR $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel + if [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then + cp -PR $BUILD/bcm2835-bootloader-*/vmlinuz $TARGET_IMG/$IMAGE_NAME.kernel + chmod 0644 $TARGET_IMG/$IMAGE_NAME.kernel + else + cp -PR $BUILD/linux-*/arch/$KERNEL_ARCH/boot/$KERNEL_IMAGE $TARGET_IMG/$IMAGE_NAME.kernel + fi if [ "$BOOTLOADER" = "atv-bootloader" ]; then cp -PR $BUILD/atv-bootloader-*/mach_kernel $TARGET_IMG/$IMAGE_NAME.mach_kernel