8 if [ "${KERNEL_CC}" != '' ]
10 ARGS="CC=\"${KERNEL_CC}\""
12 if [ "${KERNEL_LD}" != '' ]
14 ARGS="${ARGS} LD=\"${KERNEL_LD}\""
16 if [ "${KERNEL_AS}" != '' ]
18 ARGS="${ARGS} AS=\"${KERNEL_AS}\""
29 if [ "${UTILS_CC}" != '' ]
31 ARGS="CC=\"${UTILS_CC}\""
33 if [ "${UTILS_LD}" != '' ]
35 ARGS="${ARGS} LD=\"${UTILS_LD}\""
37 if [ "${UTILS_AS}" != '' ]
39 ARGS="${ARGS} AS=\"${UTILS_AS}\""
47 if [ "${UTILS_CC}" != '' ]
49 export CC="${UTILS_CC}"
51 if [ "${UTILS_LD}" != '' ]
53 export LD="${UTILS_LD}"
55 if [ "${UTILS_AS}" != '' ]
57 export AS="${UTILS_AS}"
63 if [ "${UTILS_CC}" != '' ]
67 if [ "${UTILS_LD}" != '' ]
71 if [ "${UTILS_AS}" != '' ]
79 if [ "${KERNEL_CC}" != '' ]
81 export CC="${KERNEL_CC}"
83 if [ "${KERNEL_LD}" != '' ]
85 export LD="${KERNEL_LD}"
87 if [ "${KERNEL_AS}" != '' ]
89 export AS="${KERNEL_AS}"
95 if [ "${KERNEL_CC}" != '' ]
99 if [ "${KERNEL_LD}" != '' ]
103 if [ "${KERNEL_AS}" != '' ]
112 gen_die 'compile_generic(): improper usage!'
114 if [ "${2}" = 'kernel' ] || [ "${2}" = 'runtask' ]
118 elif [ "${2}" = 'utils' ]
124 kernel) ARGS="`compile_kernel_args`" ;;
125 utils) ARGS="`compile_utils_args`" ;;
126 *) ARGS="" ;; # includes runtask
130 # the eval usage is needed in the next set of code
131 # as ARGS can contain spaces and quotes, eg:
132 # ARGS='CC="ccache gcc"'
133 if [ "${2}" == 'runtask' ]
135 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${1}" 1 0 1
136 eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${1}
138 elif [ "${DEBUGLEVEL}" -gt "1" ]
140 # Output to stdout and debugfile
141 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
142 eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} 2>&1 | tee -a ${DEBUGFILE}
145 # Output to debugfile only
146 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
147 eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} >> ${DEBUGFILE} 2>&1
150 [ "${RET}" -ne '0' ] &&
151 gen_die "Failed to compile the \"${1}\" target..."
155 if [ "${2}" = 'kernel' ]
158 elif [ "${2}" = 'utils' ]
164 extract_dietlibc_bincache() {
166 rm -rf "${TEMP}/diet" > /dev/null
167 tar -jxpf "${DIETLIBC_BINCACHE}" ||
168 gen_die 'Could not extract dietlibc bincache!'
169 [ ! -d "${TEMP}/diet" ] &&
170 gen_die "${TEMP}/diet directory not found!"
174 clean_dietlibc_bincache() {
176 rm -rf "${TEMP}/diet" > /dev/null
181 # Only run ``make dep'' for 2.4 kernels
182 if [ "${VER}" -eq '2' -a "${PAT}" -le '4' ]
184 print_info 1 "kernel: >> Making dependencies..."
186 compile_generic dep kernel
191 print_info 1 " >> Compiling ${KV} modules..."
193 compile_generic modules kernel
194 export UNAME_MACHINE="${ARCH}"
195 # On 2.4 kernels, if MAKEOPTS > -j1 it can cause failures
196 if [ "${VER}" -eq '2' -a "${PAT}" -le '4' ]
198 MAKEOPTS_SAVE="${MAKEOPTS}"
199 MAKEOPTS="${MAKEOPTS_SAVE/-j?/-j1}"
201 [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
202 compile_generic "modules_install" kernel
203 [ "${VER}" -eq '2' -a "${PAT}" -le '4' ] && MAKEOPTS="${MAKEOPTS_SAVE}"
209 [ "${KERNEL_MAKE}" = '' ] &&
210 gen_die "KERNEL_MAKE undefined - I don't know how to compile a kernel for this arch!"
212 print_info 1 " >> Compiling ${KV} ${KERNEL_MAKE_DIRECTIVE/_install/ [ install ]/}..."
213 compile_generic "${KERNEL_MAKE_DIRECTIVE}" kernel
214 if [ "${KERNEL_MAKE_DIRECTIVE_2}" != '' ]
216 print_info 1 " >> Starting supplimental compile of ${KV}: ${KERNEL_MAKE_DIRECTIVE_2}..."
217 compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel
219 if ! isTrue "${CMD_NOINSTALL}"
221 cp "${KERNEL_BINARY}" "/boot/kernel-${KNAME}-${ARCH}-${KV}" ||
222 gen_die 'Could not copy the kernel binary to /boot!'
223 cp "System.map" "/boot/System.map-${KNAME}-${ARCH}-${KV}" ||
224 gen_die 'Could not copy System.map to /boot!'
225 if [ "${KERNEL_BINARY_2}" != '' ]
227 cp "${KERNEL_BINARY_2}" "/boot/kernelz-${KV}" ||
228 gen_die 'Could not copy the kernelz binary to /boot!'
231 cp "${KERNEL_BINARY}" "${TEMP}/kernel-${KNAME}-${ARCH}-${KV}" ||
232 gen_die "Could not copy the kernel binary to ${TEMP}!"
233 cp "System.map" "${TEMP}/System.map-${KNAME}-${ARCH}-${KV}" ||
234 gen_die "Could not copy System.map to ${TEMP}!"
235 if [ "${KERNEL_BINARY_2}" != '' ]
237 cp "${KERNEL_BINARY_2}" "${TEMP}/kernelz-${KV}" ||
238 gen_die "Could not copy the kernelz binary to ${TEMP}!"
244 if [ ! -f "${BUSYBOX_BINCACHE}" ]
246 [ -f "${BUSYBOX_SRCTAR}" ] ||
247 gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
248 [ -f "${BUSYBOX_CONFIG}" ] ||
249 gen_die "Cound not find busybox config file: ${BUSYBOX_CONFIG}!"
251 rm -rf ${BUSYBOX_DIR} > /dev/null
252 tar -jxpf ${BUSYBOX_SRCTAR} ||
253 gen_die 'Could not extract busybox source tarball!'
254 [ -d "${BUSYBOX_DIR}" ] ||
255 gen_die 'Busybox directory ${BUSYBOX_DIR} is invalid!'
256 cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
257 sed -i ${BUSYBOX_DIR}/.config -e 's/#\? \?CONFIG_FEATURE_INSTALLER[ =].*/CONFIG_FEATURE_INSTALLER=y/g'
259 print_info 1 'busybox: >> Configuring...'
260 yes '' 2>/dev/null | compile_generic oldconfig utils
261 print_info 1 'busybox: >> Compiling...'
262 compile_generic all utils
263 print_info 1 'busybox: >> Copying to cache...'
264 [ -f "${TEMP}/${BUSYBOX_DIR}/busybox" ] ||
265 gen_die 'Busybox executable does not exist!'
266 strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
267 gen_die 'Could not strip busybox binary!'
268 bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" ||
269 gen_die 'bzip2 compression of busybox failed!'
270 mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" ||
271 gen_die 'Could not copy the busybox binary to the package directory, does the directory exist?'
274 rm -rf "${BUSYBOX_DIR}" > /dev/null
279 compile_device_mapper
280 if [ ! -f "${LVM2_BINCACHE}" ]
282 [ -f "${LVM2_SRCTAR}" ] ||
283 gen_die "Could not find LVM2 source tarball: ${LVM2_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
285 rm -rf ${LVM2_DIR} > /dev/null
286 tar -zxpf ${LVM2_SRCTAR} ||
287 gen_die 'Could not extract LVM2 source tarball!'
288 [ -d "${LVM2_DIR}" ] ||
289 gen_die 'LVM2 directory ${LVM2_DIR} is invalid!'
290 rm -rf "${TEMP}/device-mapper" > /dev/null
291 tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
292 gen_die "Could not extract device-mapper binary cache!";
295 print_info 1 'lvm2: >> Configuring...'
296 LDFLAGS="-L${TEMP}/device-mapper/lib" \
297 CFLAGS="-I${TEMP}/device-mapper/include" \
298 CPPFLAGS="-I${TEMP}/device-mapper/include" \
299 ./configure --enable-static_link --prefix=${TEMP}/lvm2 >> ${DEBUGFILE} 2>&1 ||
300 gen_die 'Configure of lvm2 failed!'
301 print_info 1 'lvm2: >> Compiling...'
302 compile_generic '' utils
303 compile_generic 'install' utils
306 print_info 1 ' >> Copying to bincache...'
307 strip "sbin/lvm.static" ||
308 gen_die 'Could not strip lvm.static!'
309 tar -cjf "${LVM2_BINCACHE}" sbin/lvm.static ||
310 gen_die 'Could not create binary cache'
313 rm -rf "${TEMP}/device-mapper" > /dev/null
314 rm -rf "${LVM2_DIR}" lvm2
319 compile_device_mapper
320 if [ ! -f "${DMRAID_BINCACHE}" ]
322 [ -f "${DMRAID_SRCTAR}" ] ||
323 gen_die "Could not find DMRAID source tarball: ${DMRAID_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
325 rm -rf ${DMRAID_DIR} > /dev/null
326 tar -jxpf ${DMRAID_SRCTAR} ||
327 gen_die 'Could not extract DMRAID source tarball!'
328 [ -d "${DMRAID_DIR}" ] ||
329 gen_die 'DMRAID directory ${DMRAID_DIR} is invalid!'
330 rm -rf "${TEMP}/device-mapper" > /dev/null
331 tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
332 gen_die "Could not extract device-mapper binary cache!";
335 print_info 1 'dmraid: >> Configuring...'
337 LDFLAGS="-L${TEMP}/device-mapper/lib" \
338 CFLAGS="-I${TEMP}/device-mapper/include" \
339 CPPFLAGS="-I${TEMP}/device-mapper/include" \
340 ./configure --enable-static_link --prefix=${TEMP}/dmraid >> ${DEBUGFILE} 2>&1 ||
341 gen_die 'Configure of dmraid failed!'
342 mkdir -p "${TEMP}/dmraid"
343 print_info 1 'dmraid: >> Compiling...'
344 compile_generic '' utils
345 #compile_generic 'install' utils
346 mkdir ${TEMP}/dmraid/sbin
347 install -m 0755 -s tools/dmraid "${TEMP}/dmraid/sbin/dmraid"
348 print_info 1 ' >> Copying to bincache...'
350 tar -cjf "${DMRAID_BINCACHE}" sbin/dmraid ||
351 gen_die 'Could not create binary cache'
354 rm -rf "${TEMP}/device-mapper" > /dev/null
355 rm -rf "${DMRAID_DIR}" dmraid
360 # I've disabled dietlibc support for the time being since the
361 # version we use misses a few needed system calls.
364 if [ ! -f "${MODUTILS_BINCACHE}" ]
366 [ ! -f "${MODUTILS_SRCTAR}" ] &&
367 gen_die "Could not find modutils source tarball: ${MODUTILS_SRCTAR}!"
369 rm -rf "${MODUTILS_DIR}"
370 tar -jxpf "${MODUTILS_SRCTAR}"
371 [ ! -d "${MODUTILS_DIR}" ] &&
372 gen_die "Modutils directory ${MODUTILS_DIR} invalid!"
374 print_info 1 "modutils: >> Configuring..."
376 # if [ "${USE_DIETLIBC}" -eq '1' ]
378 # extract_dietlibc_bincache
379 # OLD_CC="${UTILS_CC}"
380 # UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
385 ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 ||
386 gen_die 'Configuring modutils failed!'
389 print_info 1 'modutils: >> Compiling...'
390 compile_generic all utils
392 # if [ "${USE_DIETLIBC}" -eq '1' ]
394 # clean_dietlibc_bincache
395 # UTILS_CC="${OLD_CC}"
398 print_info 1 'modutils: >> Copying to cache...'
399 [ -f "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ] ||
400 gen_die 'insmod.static does not exist after the compilation of modutils!'
401 strip "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ||
402 gen_die 'Could not strip insmod.static!'
403 bzip2 "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static" ||
404 gen_die 'Compression of insmod.static failed!'
405 mv "${TEMP}/${MODUTILS_DIR}/insmod/insmod.static.bz2" "${MODUTILS_BINCACHE}" ||
406 gen_die 'Could not move the compressed insmod binary to the package cache!'
409 rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null
413 compile_module_init_tools() {
414 # I've disabled dietlibc support for the time being since the
415 # version we use misses a few needed system calls.
418 if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ]
420 [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] &&
421 gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}"
423 rm -rf "${MODULE_INIT_TOOLS_DIR}"
424 tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}"
425 [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] &&
426 gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} is invalid"
427 cd "${MODULE_INIT_TOOLS_DIR}"
428 print_info 1 'module-init-tools: >> Configuring'
430 # if [ "${USE_DIETLIBC}" -eq '1' ]
432 # extract_dietlibc_bincache
433 # OLD_CC="${UTILS_CC}"
434 # UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
438 ./configure >> ${DEBUGFILE} 2>&1 ||
439 gen_die 'Configure of module-init-tools failed!'
441 print_info 1 ' >> Compiling...'
442 compile_generic "all" utils
444 # if [ "${USE_DIETLIBC}" -eq '1' ]
446 # clean_dietlibc_bincache
447 # UTILS_CC="${OLD_CC}"
450 print_info 1 ' >> Copying to cache...'
451 [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ] ||
452 gen_die 'insmod.static does not exist after the compilation of module-init-tools!'
453 strip "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ||
454 gen_die 'Could not strip insmod.static!'
455 bzip2 "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static" ||
456 gen_die 'Compression of insmod.static failed!'
457 [ -f "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" ] ||
458 gen_die 'Could not find compressed insmod.static.bz2 binary!'
459 mv "${TEMP}/${MODULE_INIT_TOOLS_DIR}/insmod.static.bz2" "${MODULE_INIT_TOOLS_BINCACHE}" ||
460 gen_die 'Could not move the compressed insmod binary to the package cache!'
463 rm -rf "${MODULE_INIT_TOOLS_DIR}" > /dev/null
468 # I've disabled dietlibc support for the time being since the
469 # version we use misses a few needed system calls.
472 if [ ! -f "${DEVFSD_BINCACHE}" ]
474 [ ! -f "${DEVFSD_SRCTAR}" ] &&
475 gen_die "Could not find devfsd source tarball: ${DEVFSD_SRCTAR}"
477 rm -rf "${DEVFSD_DIR}"
478 tar -jxpf "${DEVFSD_SRCTAR}"
479 [ ! -d "${DEVFSD_DIR}" ] &&
480 gen_die "Devfsd directory ${DEVFSD_DIR} invalid"
483 # if [ "${USE_DIETLIBC}" -eq '1' ]
485 # extract_dietlibc_bincache
486 # OLD_CC="${UTILS_CC}"
487 # UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
490 print_info 1 'devfsd: >> Compiling...'
491 # if [ "${USE_DIETLIBC}" -eq '1' ]
493 # compile_generic 'has_dlopen=0 has_rpcsvc=0' utils
495 compile_generic 'LDFLAGS=-static' utils
498 # if [ "${USE_DIETLIBC}" -eq '1' ]
500 # clean_dietlibc_bincache
501 # UTILS_CC="${OLD_CC}"
504 print_info 1 ' >> Copying to cache...'
505 [ -f "${TEMP}/${DEVFSD_DIR}/devfsd" ] || gen_die 'The devfsd executable does not exist after the compilation of devfsd!'
506 strip "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die 'Could not strip devfsd!'
507 bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die 'Compression of devfsd failed!'
508 [ -f "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" ] || gen_die 'Could not find compressed devfsd.bz2 binary!'
509 mv "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" "${DEVFSD_BINCACHE}" || gen_die 'Could not move compressed binary to the package cache!'
511 # [ -f "${TEMP}/${DEVFSD_DIR}/devfsd.conf" ] || gen_die 'devfsd.conf does not exist after the compilation of devfsd!'
512 # bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd.conf" || gen_die 'Compression of devfsd.conf failed!'
513 # mv "${TEMP}/${DEVFSD_DIR}/devfsd.conf.bz2" "${DEVFSD_CONF_BINCACHE}" || gen_die 'Could not move the compressed configuration to the package cache!'
516 rm -rf "${DEVFSD_DIR}" > /dev/null
520 compile_device_mapper() {
521 if [ ! -f "${DEVICE_MAPPER_BINCACHE}" ]
523 [ ! -f "${DEVICE_MAPPER_SRCTAR}" ] &&
524 gen_die "Could not find device-mapper source tarball: ${DEVICE_MAPPER_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
526 rm -rf "${DEVICE_MAPPER_DIR}"
527 tar -zxpf "${DEVICE_MAPPER_SRCTAR}"
528 [ ! -d "${DEVICE_MAPPER_DIR}" ] &&
529 gen_die "device-mapper directory ${DEVICE_MAPPER_DIR} invalid"
530 cd "${DEVICE_MAPPER_DIR}"
531 ./configure --prefix=${TEMP}/device-mapper --enable-static_link >> ${DEBUGFILE} 2>&1 ||
532 gen_die 'Configuring device-mapper failed!'
533 print_info 1 'device-mapper: >> Compiling...'
534 compile_generic '' utils
535 compile_generic 'install' utils
536 print_info 1 ' >> Copying to cache...'
538 rm -r "${TEMP}/device-mapper/man" ||
539 gen_die 'Could not remove manual pages!'
540 strip "${TEMP}/device-mapper/sbin/dmsetup" ||
541 gen_die 'Could not strip dmsetup binary!'
542 tar -jcpf "${DEVICE_MAPPER_BINCACHE}" device-mapper ||
543 gen_die 'Could not tar up the device-mapper binary!'
544 [ -f "${DEVICE_MAPPER_BINCACHE}" ] ||
545 gen_die 'device-mapper cache not created!'
547 rm -rf "${DEVICE_MAPPER_DIR}" > /dev/null
548 rm -rf "${TEMP}/device-mapper" > /dev/null
557 [ ! -f "${DIETLIBC_BINCACHE}" ] && BUILD_DIETLIBC=1
558 [ ! -f "${DIETLIBC_BINCACHE_TEMP}" ] && BUILD_DIETLIBC=1
559 if ! isTrue "${BUILD_DIETLIBC}"
561 ORIGTEMP=`cat "${DIETLIBC_BINCACHE_TEMP}"`
562 if [ "${TEMP}" != "${ORIGTEMP}" ]
564 print_warning 1 'dietlibc: Bincache exists, but the current temporary directory'
565 print_warning 1 ' is different to the original. Rebuilding.'
570 if [ "${BUILD_DIETLIBC}" -eq '1' ]
572 [ -f "${DIETLIBC_SRCTAR}" ] ||
573 gen_die "Could not find dietlibc source tarball: ${DIETLIBC_SRCTAR}"
575 rm -rf "${DIETLIBC_DIR}" > /dev/null
576 tar -jxpf "${DIETLIBC_SRCTAR}" ||
577 gen_die 'Could not extract dietlibc source tarball'
578 [ -d "${DIETLIBC_DIR}" ] ||
579 gen_die "Dietlibc directory ${DIETLIBC_DIR} is invalid!"
581 print_info 1 "dietlibc: >> Compiling..."
582 compile_generic "prefix=${TEMP}/diet" utils
583 print_info 1 " >> Installing..."
584 compile_generic "prefix=${TEMP}/diet install" utils
585 print_info 1 " >> Copying to bincache..."
587 tar -jcpf "${DIETLIBC_BINCACHE}" diet ||
588 gen_die 'Could not tar up the dietlibc binary!'
589 [ -f "${DIETLIBC_BINCACHE}" ] ||
590 gen_die 'Dietlibc cache not created!'
591 echo "${TEMP}" > "${DIETLIBC_BINCACHE_TEMP}"
594 rm -rf "${DIETLIBC_DIR}" > /dev/null
595 rm -rf "${TEMP}/diet" > /dev/null
600 if [ ! -f "${UDEV_BINCACHE}" ]
603 rm -rf "${UDEV_DIR}" udev
604 [ ! -f "${UDEV_SRCTAR}" ] &&
605 gen_die "Could not find udev tarball: ${UDEV_SRCTAR}"
606 tar -jxpf "${UDEV_SRCTAR}" ||
607 gen_die 'Could not extract udev tarball'
608 [ ! -d "${UDEV_DIR}" ] &&
609 gen_die "Udev tarball ${UDEV_SRCTAR} is invalid"
612 print_info 1 'udev: >> Compiling...'
614 ln -snf "${KERNEL_DIR}" klibc/linux || gen_die "Could not link to ${KERNEL_DIR}"
615 compile_generic "KERNEL_DIR=$KERNEL_DIR USE_KLIBC=true USE_LOG=false DEBUG=false udevdir=/dev all etc/udev/udev.conf" utils
617 strip udev || gen_die 'Failed to strip the udev binary!'
619 print_info 1 ' >> Installing...'
620 install -d "${TEMP}/udev/etc/udev" "${TEMP}/udev/sbin" "${TEMP}/udev/etc/udev/scripts" "${TEMP}/udev/etc/udev/rules.d" "${TEMP}/udev/etc/udev/permissions.d" ||
621 gen_die 'Could not create directory hierarchy'
622 install -m 0755 udev "${TEMP}/udev/sbin" ||
623 gen_die 'Could not install udev binary!'
624 install -m 0644 etc/udev/udev.conf "${TEMP}/udev/etc/udev" ||
625 gen_die 'Could not install udev configuration!'
626 install -m 0644 etc/udev/gentoo/udev.rules "${TEMP}/udev/etc/udev/rules.d/50-udev.rules" ||
627 gen_die 'Could not install udev rules!'
628 install -m 0644 etc/udev/udev.permissions "${TEMP}/udev/etc/udev/permissions.d/50-udev.permissions" ||
629 gen_die 'Could not install udev permissions!'
630 install -m 0755 extras/ide-devfs.sh "${TEMP}/udev/etc/udev/scripts" ||
631 gen_die 'Could not install udev scripts!'
634 print_info 1 ' >> Copying to bincache...'
635 tar -cjf "${UDEV_BINCACHE}" * ||
636 gen_die 'Could not create binary cache'
639 rm -rf "${UDEV_DIR}" udev