Changeset 16762


Ignore:
Timestamp:
2009-07-10T03:12:10+02:00 (7 years ago)
Author:
geoff
Message:

petitboot: Update to petitboot to latest

Update the petitboot package to the latest version
in the petitboot git repo.

Add new build config options to allow selection of which of
the petitboot user interface program to run at system boot.

Location:
packages/utils/petitboot
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/petitboot/Makefile

    r15244 r16762  
    99 
    1010PKG_NAME:=petitboot 
    11 PKG_VERSION:=0.2 
     11PKG_VERSION:=53aa807ae41e48fd71653c2d00083a44a8bca14c 
    1212PKG_RELEASE:=1 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    15 PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/ 
    16 PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8 
     15PKG_SOURCE_URL:=git://ozlabs.org/home/jk/git/petitboot 
     16PKG_SOURCE_PROTO:=git 
     17PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 
     18PKG_SOURCE_VERSION:=$(PKG_VERSION) 
     19 
     20PKG_INSTALL=1 
    1721 
    1822include $(INCLUDE_DIR)/package.mk 
    1923 
    2024define Package/petitboot 
    21   SECTION:=boot 
    22   CATEGORY:=Boot Loaders 
    23   DEPENDS:=+libtwin +udev +udevextras +kexec-tools @TARGET_ps3 
    24   TITLE:=Graphical bootloader 
    25   URL:=http://ozlabs.org/~jk/projects/petitboot/ 
     25        SECTION:=boot 
     26        CATEGORY:=Boot Loaders 
     27        TITLE:=A kexec based bootloader 
     28        URL:=http://ozlabs.org/~jk/projects/petitboot/ 
     29        MAINTAINER:=Geoff Levand <geoffrey.levand@am.sony.com> 
     30        DEPENDS:=+kexec-tools +libncurses +libtwin +udev +ps3-utils 
    2631endef 
    2732 
    28 define Build/Configure 
     33define Package/petitboot/description 
     34        Petitboot is a Linux kexec based bootloader with both 
     35        graphical and command-line user interfaces. The OpenWRT 
     36        Petitboot package has configuration options that can be 
     37        used to specify which Petitboot components to build, and 
     38        can also be used to specify that Petitboot should be run 
     39        automatically at system start-up. 
    2940 
     41        Petitboot supports loading Linux kernel and initrd images 
     42        from any device that can be mounted by Linux.  It can 
     43        handle gzipped images and can also load images from the 
     44        network using TFTP, NFS, HTTP, HTTPS, and SFTP.  Petitboot 
     45        looks for bootloader config files on mountable devices in 
     46        the system, and also uses the boot configuration sent to 
     47        it from a DHCP server. 
    3048endef 
    3149 
    32 TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR) 
     50define Package/petitboot/config 
     51        source "$(SOURCE)/petitboot-config.in" 
     52endef 
    3353 
    34 define Build/Compile 
    35         PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ 
    36         PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ 
    37         $(MAKE) -C $(PKG_BUILD_DIR) \ 
    38                 DESTDIR="$(PKG_INSTALL_DIR)" \ 
    39                 $(TARGET_CONFIGURE_OPTS) \ 
    40                 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ 
    41                 all install 
     54petitboot-config-args-y$(CONFIG_PETITBOOT_CUI) += --without-ncurses 
     55petitboot-config-args-y$(CONFIG_PETITBOOT_GUI) += --without-twin 
     56petitboot-config-args-y$(CONFIG_PETITBOOT_PS3) += --enable-ps3=no 
     57 
     58petitboot-cppflags-$(CONFIG_PETITBOOT_DEBUG) += -DDEBUG 
     59petitboot-cppflags-y$(CONFIG_PETITBOOT_DEBUG) += -DNDEBUG 
     60 
     61petitboot-extra-bin-$(CONFIG_PETITBOOT_CUI) += /usr/sbin/pb-cui 
     62petitboot-extra-bin-$(CONFIG_PETITBOOT_GUI) += /usr/sbin/pb-twin 
     63petitboot-extra-data-$(CONFIG_PETITBOOT_GUI) += /usr/share/petitboot/artwork/* 
     64 
     65# The platform inittab and/or initrun should check for /usr/sbin/petitboot 
     66# and run it on startup if found. 
     67 
     68petitboot-install-autorun-$(CONFIG_PETITBOOT_AUTORUN_CUI) = \ 
     69        ln -sf pb-cui $(1)/usr/sbin/petitboot 
     70petitboot-install-autorun-$(CONFIG_PETITBOOT_AUTORUN_GUI) = \ 
     71        ln -sf pb-twin $(1)/usr/sbin/petitboot 
     72 
     73CONFIGURE_ARGS += $(petitboot-config-args-y) 
     74 
     75EXTRA_CPPFLAGS += $(petitboot-cppflags-y) 
     76 
     77define Build/Prepare 
     78        $(call Build/Prepare/Default) 
     79        (cd $(PKG_BUILD_DIR) && $(BASH) -x ./bootstrap) 
    4280endef 
    4381 
    4482define Package/petitboot/install 
    4583        $(INSTALL_DIR) $(1)/usr/sbin 
    46         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot $(1)/usr/sbin/ 
    47         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot-udev-helper \ 
     84        $(INSTALL_BIN) \ 
     85                $(addprefix $(PKG_INSTALL_DIR),$(petitboot-extra-bin-y)) \ 
     86                $(PKG_INSTALL_DIR)/usr/sbin/pb-discover \ 
     87                $(PKG_INSTALL_DIR)/usr/sbin/pb-event \ 
    4888                $(1)/usr/sbin/ 
    49         $(INSTALL_BIN) files/petitboot-wrapper $(1)/usr/sbin/petitboot-wrapper 
     89 
    5090        $(INSTALL_DIR) $(1)/usr/share/petitboot/ 
    51         $(CP) $(PKG_INSTALL_DIR)/usr/share/petitboot/artwork \ 
     91        $(INSTALL_DATA) \ 
     92                $(addprefix $(PKG_INSTALL_DIR),$(petitboot-extra-data-y)) \ 
    5293                $(1)/usr/share/petitboot/ 
     94 
    5395        $(INSTALL_DIR) $(1)/etc/udev/rules.d 
    54         $(CP) $(PKG_BUILD_DIR)/utils/99-petitboot.rules $(1)/etc/udev/rules.d/ 
    55         $(INSTALL_DIR) $(1)/etc/init.d/ 
    56         $(INSTALL_BIN) ./files/petitboot.init $(1)/etc/init.d/petitboot 
     96        $(INSTALL_DATA) \ 
     97                $(PKG_BUILD_DIR)/utils/99-petitboot.rules \ 
     98                $(1)/etc/udev/rules.d/ 
    5799 
     100        $(INSTALL_DIR) $(1)/etc/ 
     101        $(INSTALL_DATA) -T $(PKG_BUILD_DIR)/utils/udhcpc $(1)/etc/udhcpc.user 
     102 
     103        $(INSTALL_DIR) $(1)/etc/init.d 
     104        $(INSTALL_BIN) \ 
     105                ./files/petitboot.init \ 
     106                $(1)/etc/init.d/petitboot 
     107 
     108        $(petitboot-install-autorun-y) 
    58109endef 
    59110 
  • packages/utils/petitboot/files/petitboot.init

    r13597 r16762  
    11#!/bin/sh /etc/rc.common 
    22# Copyright (C) 2006 OpenWrt.org 
    3 START=80 
     3 
     4START=90 
     5 
     6kill_discover() { 
     7        killall -q -KILL pb-discover 
     8        umount -f -d /var/petitboot/mnt/* 2>/dev/null 
     9} 
    410 
    511start() { 
    6         /usr/sbin/petitboot-wrapper & 
     12        kill_discover 
     13        /usr/sbin/pb-discover 2>&- >&- & 
    714} 
    815 
    916stop() { 
    10         killall petitboot-wrapper 
    11         killall petitboot 
     17        # first signal pb-discover to exit 
     18        killall -q -INT pb-discover 
     19        sleep 3 
     20        # now force it 
     21        kill_discover 
    1222} 
Note: See TracChangeset for help on using the changeset viewer.