wip: tar up modules for flash-kernel usage

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/22/head
Robert Nelson 12 years ago
parent 07d714050c
commit afeae621db

@ -123,6 +123,7 @@ rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
#FIXME: Also reinstall these: #FIXME: Also reinstall these:
rm -f /boot/uboot/*dtbs.tar.gz || true rm -f /boot/uboot/*dtbs.tar.gz || true
rm -f /boot/uboot/*modules.tar.gz || true
if [ "x${boot_image}" == "xbootm" ] ; then if [ "x${boot_image}" == "xbootm" ] ; then
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd

@ -143,6 +143,7 @@ rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
#FIXME: Also reinstall these: #FIXME: Also reinstall these:
rm -f /boot/uboot/*dtbs.tar.gz || true rm -f /boot/uboot/*dtbs.tar.gz || true
rm -f /boot/uboot/*modules.tar.gz || true
if [ "x${boot_image}" == "xbootm" ] ; then if [ "x${boot_image}" == "xbootm" ] ; then
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd

@ -872,11 +872,16 @@ function flash_kernel_base_installer {
cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf
zcat /proc/config.gz > /target/boot/config-\$(uname -r) zcat /proc/config.gz > /target/boot/config-\$(uname -r)
#FIXME: replaced by un tarring...
cp -r /lib/modules/\$(uname -r) /target/lib/modules/ cp -r /lib/modules/\$(uname -r) /target/lib/modules/
mkdir -p /target/boot/uboot || true mkdir -p /target/boot/uboot || true
mount /dev/mmcblk0p1 /target/boot/uboot mount /dev/mmcblk0p1 /target/boot/uboot
#mkdir -p /target/lib/modules/\$(uname -r) || true
#tar xf /target/boot/uboot/\$(uname -r)-modules.tar.gz -C /target/lib/modules/\$(uname -r)
mount -o bind /sys /target/sys mount -o bind /sys /target/sys
cat /proc/mounts > /target/mounts cat /proc/mounts > /target/mounts
chroot /target update-initramfs -c -k \$(uname -r) chroot /target update-initramfs -c -k \$(uname -r)
@ -984,6 +989,14 @@ function extract_zimage {
dpkg -x "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/kernel dpkg -x "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/kernel
} }
package_modules () {
echo "NetInstall: Packaging Modules for later use"
linux_version=$(ls ${TEMPDIR}/kernel/boot/vmlinuz-* | awk -F'vmlinuz-' '{print $2}')
cd ${TEMPDIR}/kernel/lib/modules/${linux_version}
tar czf ${TEMPDIR}/kernel/${linux_version}-modules.tar.gz *
cd "${DIR}"/
}
function initrd_device_settings { function initrd_device_settings {
echo "NetInstall: Adding Device Tweaks" echo "NetInstall: Adding Device Tweaks"
touch ${TEMPDIR}/initrd-tree/etc/rcn.conf touch ${TEMPDIR}/initrd-tree/etc/rcn.conf
@ -1051,6 +1064,7 @@ function create_custom_netinstall_image {
initrd_cleanup initrd_cleanup
initrd_preseed_settings initrd_preseed_settings
extract_zimage extract_zimage
package_modules
initrd_device_settings initrd_device_settings
recompress_initrd recompress_initrd
} }
@ -1281,6 +1295,7 @@ function populate_boot {
echo "-----------------------------" echo "-----------------------------"
cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/ cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/
cp -v ${TEMPDIR}/kernel/${linux_version}-modules.tar.gz ${TEMPDIR}/disk/
#This should be compatible with hwpacks variable names.. #This should be compatible with hwpacks variable names..
#https://code.launchpad.net/~linaro-maintainers/linaro-images/ #https://code.launchpad.net/~linaro-maintainers/linaro-images/
@ -1462,7 +1477,7 @@ function check_uboot_type {
unset boot_scr_wrapper unset boot_scr_wrapper
unset usbnet_mem unset usbnet_mem
boot_partition_size="64" boot_partition_size="100"
case "${UBOOT_TYPE}" in case "${UBOOT_TYPE}" in
beagle_bx) beagle_bx)

Loading…
Cancel
Save