diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index 76ed2e9..695540c 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -123,6 +123,7 @@ rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true #FIXME: Also reinstall these: rm -f /boot/uboot/*dtbs.tar.gz || true +rm -f /boot/uboot/*modules.tar.gz || true 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 diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index 1f29c3b..70c673f 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -143,6 +143,7 @@ rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true #FIXME: Also reinstall these: rm -f /boot/uboot/*dtbs.tar.gz || true +rm -f /boot/uboot/*modules.tar.gz || true 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 diff --git a/mk_mmc.sh b/mk_mmc.sh index e843572..33cd182 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -872,11 +872,16 @@ function flash_kernel_base_installer { cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf zcat /proc/config.gz > /target/boot/config-\$(uname -r) + + #FIXME: replaced by un tarring... cp -r /lib/modules/\$(uname -r) /target/lib/modules/ mkdir -p /target/boot/uboot || true 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 cat /proc/mounts > /target/mounts 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 } +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 { echo "NetInstall: Adding Device Tweaks" touch ${TEMPDIR}/initrd-tree/etc/rcn.conf @@ -1051,6 +1064,7 @@ function create_custom_netinstall_image { initrd_cleanup initrd_preseed_settings extract_zimage + package_modules initrd_device_settings recompress_initrd } @@ -1281,6 +1295,7 @@ function populate_boot { echo "-----------------------------" 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.. #https://code.launchpad.net/~linaro-maintainers/linaro-images/ @@ -1462,7 +1477,7 @@ function check_uboot_type { unset boot_scr_wrapper unset usbnet_mem - boot_partition_size="64" + boot_partition_size="100" case "${UBOOT_TYPE}" in beagle_bx)