source: live-build/trunk/fuentes/scripts/build/lb_binary_linux-image @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11set -e
12
13# Including common functions
14( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15
16# Setting static variables
17DESCRIPTION="$(Echo 'install linux-image into binary')"
18HELP=""
19USAGE="${PROGRAM} [--force]"
20
21Arguments "${@}"
22
23# Reading configuration files
24Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25Set_defaults
26
27if [ "${LB_BINARY_IMAGES}" = "virtual-hdd" ] || [ "${LB_LINUX_PACKAGES}" = "none" ]
28then
29        exit 0
30fi
31
32Echo_message "Begin install linux-image..."
33
34# Requiring stage file
35Require_stagefile .build/config .build/bootstrap
36
37# Checking stage file
38Check_stagefile .build/binary_linux-image
39
40# Checking lock file
41Check_lockfile .lock
42
43# Creating lock file
44Create_lockfile .lock
45
46case "${LB_INITRAMFS}" in
47        casper)
48                DESTDIR="binary/casper"
49                ;;
50
51        live-boot)
52                DESTDIR="binary/live"
53                ;;
54
55        *)
56                DESTDIR="binary/boot"
57                ;;
58esac
59
60case "${LB_ARCHITECTURES}" in
61        powerpc|ppc64el)
62                LINUX="vmlinux"
63                ;;
64
65        *)
66                LINUX="vmlinuz"
67                ;;
68esac
69
70Check_multiarchitectures
71
72# Creating directory
73mkdir -p "${DESTDIR}"
74
75# Installing linux-image
76if [ "${LB_LINUX_PACKAGES}" != "none" ]
77then
78        cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
79        cp chroot/boot/initrd.img-* "${DESTDIR}"
80fi
81
82case "${LB_INITRAMFS}" in
83        live-boot)
84                if [ -e chroot/usr/share/doc/live-boot/parameters.txt ]
85                then
86                        cp chroot/usr/share/doc/live-boot/parameters.txt "${DESTDIR}"/parameters
87                fi
88                ;;
89esac
90
91# Creating stage file
92Create_stagefile .build/binary_linux-image
Note: See TracBrowser for help on using the repository browser.