Contents of /smage/branches/alx-0_6_0/core/mkinitrd/mkinitrd-6.3.5-r11.smage2
Parent Directory | Revision Log
Revision 6813 -
(show annotations)
(download)
Wed Jul 22 16:25:19 2015 UTC (8 years, 10 months ago) by niro
File size: 4054 byte(s)
Wed Jul 22 16:25:19 2015 UTC (8 years, 10 months ago) by niro
File size: 4054 byte(s)
-autoload the f2fs module in livecds to support direct mounts of f2fs without the -t option
1 | # $Id$ |
2 | |
3 | PNAME="mkinitrd" |
4 | PVER="6.3.5" |
5 | PBUILD="r11" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | |
9 | DESCRIPTION="Mkinitrd creates filesystem images for use as initial ramdisk (initrd) images." |
10 | HOMEPAGE="http://magellan-linux.de/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-apps/gawk-3 |
14 | >= virtual/which |
15 | >= virtual/debianutils |
16 | >= sys-apps/module-init-tools-3.12 |
17 | >= app-arch/cpio-2 |
18 | >= virtual/gzip |
19 | >= sys-fs/e2fsprogs-1.41 |
20 | >= dev-libs/popt-1.16 |
21 | >= sys-apps/util-linux-2.19 |
22 | >= sys-apps/v86d-0.1.10" |
23 | |
24 | # nasm is needed to rebuild syslinux |
25 | SDEPEND=">= virtual/kernel-sources |
26 | >= sys-apps/findutils-4 |
27 | >= virtual/sed |
28 | >= dev-lang/nasm-2" |
29 | |
30 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
31 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
32 | |
33 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
34 | ALX_ONLY_KEEP="sbin usr/sbin usr/$(mlibdir)/mkinitrd etc/conf.d/mkinitrd" |
35 | sminclude mbuild alx-split |
36 | |
37 | SRC_URI=( |
38 | mirror://${PNAME}/${SRCFILE} |
39 | mirror://${PNAME}/${PNAME}-${PVER}-no-glib2-dep.patch |
40 | mirror://${PNAME}/${PNAME}-${PVER}-respect-rootdelay-and-mount-devtmpfs-in-sysroot-if-supported.patch |
41 | mirror://${PNAME}/${PNAME}-${PVER}-fix-dev-handling.patch |
42 | mirror://${PNAME}/${PNAME}-${PVER}-klibc-1.5.22.patch |
43 | mirror://${PNAME}/${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch |
44 | mirror://${PNAME}/${PNAME}-${PVER}-include-firmware.patch |
45 | mirror://${PNAME}/${PNAME}-${PVER}-respect-cpufreq-governor.patch |
46 | mirror://${PNAME}/${PNAME}-${PVER}-use-util-linux-blkid-to-support-f2fs.patch |
47 | mirror://${PNAME}/${PNAME}-${PVER}-livecd-autoload-f2fs-module.patch |
48 | ) |
49 | |
50 | src_prepare() |
51 | { |
52 | munpack ${SRCFILE} || die |
53 | cd ${SRCDIR} |
54 | |
55 | # no need to link against glib2 - removed in later versions |
56 | mpatch ${PNAME}-${PVER}-no-glib2-dep.patch || die |
57 | |
58 | # respect rootdelay given in cmdline and mount devtmpfs in sysroot before switch-root if supported |
59 | mpatch ${PNAME}-${PVER}-respect-rootdelay-and-mount-devtmpfs-in-sysroot-if-supported.patch || die |
60 | |
61 | # fix broken devtmpfs handling of prior patch and only mount dev if really needed |
62 | # do not umount initrds dev,proc,sys but mount move it to real sysroot |
63 | mpatch ${PNAME}-${PVER}-fix-dev-handling.patch || die |
64 | |
65 | # update klibc to 1.5.22 |
66 | mpatch ${PNAME}-${PVER}-klibc-1.5.22.patch || die |
67 | |
68 | # support variable sysroot and fixed variable substitution while linking cloop mount dirs |
69 | mpatch ${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch || die |
70 | |
71 | # include required firmware blobs in initrd |
72 | mpatch ${PNAME}-${PVER}-include-firmware.patch || die |
73 | |
74 | # respect cpufreq.governor given in cmdline |
75 | mpatch ${PNAME}-${PVER}-respect-cpufreq-governor.patch || die |
76 | |
77 | # use blkid from util-linux, not busybox itself to support f2fs |
78 | mpatch ${PNAME}-${PVER}-use-util-linux-blkid-to-support-f2fs.patch || die |
79 | |
80 | # autoload the f2fs module in livecds to support direct mounts of f2fs without the -t option |
81 | mpatch ${PNAME}-${PVER}-livecd-autoload-f2fs-module.patch || die |
82 | |
83 | # enable scsi,sata and pata checks for 2.6.29 as default |
84 | sed -i -e "s:^\(DOSCSI=\).*:\1yes:" \ |
85 | -e "s:^\(DOSATA=\).*:\1yes:" \ |
86 | -e "s:^\(DOPATA=\).*:\1yes:" \ |
87 | livecd/linuxrc.sh || die |
88 | |
89 | # fix version, we want ${PVER}-${PBUILD} |
90 | echo "${PVER}-${PBUILD}" > VERSION || die |
91 | |
92 | # fix libdir on 64bit arches |
93 | sed -i "s:^\(LIBDIR =\).*:\1 /usr/$(mlibdir):" livecd/Makefile || die |
94 | sed -i "s:^\(LIBDIR.*=\).*:\1 /usr/$(mlibdir)/mkinitrd:" isolinux/Makefile || die |
95 | |
96 | # only load supported fb-drivers with dofb |
97 | : > livecd/modules.framebuffer || die |
98 | local mod |
99 | for mod in i915 mga nouveau r128 radeon savage sis tdfx ttm via uvesafb |
100 | do |
101 | echo "${mod}" >> livecd/modules.framebuffer || die |
102 | done |
103 | } |
104 | |
105 | src_compile() |
106 | { |
107 | cd ${SRCDIR} |
108 | mmake -j1 ARCH=${ARCH/i*86/i386} || die |
109 | } |
110 | |
111 | preinstall() |
112 | { |
113 | add_conf_prot_ignore /etc/conf.d/mkinitrd |
114 | } |
115 | |
116 | postinstall() |
117 | { |
118 | if [ -f /etc/conf.d/mkinitrd ] |
119 | then |
120 | # remove i810fb drivers |
121 | sed -i 's:i810fb::g' /etc/conf.d/mkinitrd |
122 | fi |
123 | |
124 | # re-create initrd |
125 | mount /boot &> /dev/null |
126 | kv="$(readlink /boot/initrd | sed -e 's:initrd-::' -e 's:.img::')" |
127 | if [ -d /lib/modules/${kv} ] |
128 | then |
129 | mkinitrd -f /boot/initrd-"${kv}".img "${kv}" |
130 | else |
131 | echo "Warning: modules dir /lib/modules/${kv} does not exist!" |
132 | fi |
133 | } |