最后,我解决了我的问题。我制作的以下教程解释了如何在三星 Series 5 Chromebook 上安装和使用自定义 3.4.0 内核头文件。注意:您必须有一个非 ARM 处理器才能工作。另外,如果您还没有安装 Chrubuntu 12.04 到三星 Series 5,请使用本教程:http://chromeos-cr48.blogspot.com/2012/04/chrubuntu-1204-now-with-double-bits.html
确保在运行脚本之前以 root 身份登录。
1. 运行我根据 Acer C7 教程修改的脚本(注意:收到消息时不要覆盖内核。只需点击是。如果您覆盖内核,可能会导致您的 Chrubuntu 安装出现故障):
#!/bin/bash
#Edited 11/27/2013
#Fixes the old_bins directory not found error
set -x
#
# Grab verified boot utilities from ChromeOS.
#
mkdir -p /usr/share/vboot
#
#Make a new directory called old_bins
#
mkdir -p /usr/bin/old_bins
mount -o ro /dev/sda3 /mnt
#
#copy the vbutil_* commands to the old_bins directory
#
cp /mnt/usr/bin/vbutil_* /usr/bin/
cp /mnt/usr/bin/vbutil_* /usr/bin/old_bins
cp /mnt/usr/bin/dump_kernel_config /usr/bin
rsync -avz /mnt/usr/share/vboot/ /usr/share/vboot/
umount /mnt
#
# On the Acer C7, ChromeOS is 32-bit, so the verified boot binaries need a
# few 32-bit shared libraries to run under ChrUbuntu, which is 64-bit.
#
apt-get install libc6:i386 libssl1.0.0:i386
#
# Fetch ChromeOS kernel sources from the Git repo.
#
apt-get install git-core
cd /usr/src
git clone https://git.chromium.org/git/chromiumos/third_party/kernel.git
cd kernel
git checkout origin/chromeos-3.4
#
# Configure the kernel
#
# First we patch ``base.config`` to set ``CONFIG_SECURITY_CHROMIUMOS``
# to ``n`` ...
cp ./chromeos/config/base.config ./chromeos/config/base.config.orig
sed -e \
's/CONFIG_SECURITY_CHROMIUMOS=y/CONFIG_SECURITY_CHROMIUMOS=n/' \
./chromeos/config/base.config.orig > ./chromeos/config/base.config
./chromeos/scripts/prepareconfig chromeos-intel-pineview
#
# ... and then we proceed as per Olaf's instructions
#
yes "" | make oldconfig
#
# Build the Ubuntu kernel packages
#
apt-get install kernel-package
make-kpkg kernel_image kernel_headers
#
# Backup current kernel and kernel modules
#
tstamp=$(date +%Y-%m-%d-%H%M)
dd if=/dev/sda6 of=/kernel-backup-$tstamp
cp -Rp /lib/modules/3.4.0 /lib/modules/3.8.0-backup-$tstamp
#
# Install kernel image and modules from the Ubuntu kernel packages we
# just created.
#
dpkg -i /usr/src/linux-*.deb
#
# Extract old kernel config
#
vbutil_kernel --verify /dev/sda6 --verbose | tail -1 > /config-$tstamp-orig.txt
#
# Add ``disablevmx=off`` to the command line, so that VMX is enabled (for VirtualBox & Co)
#
sed -e 's/$/ disablevmx=off/' \
/config-$tstamp-orig.txt > /config-$tstamp.txt
#
# Wrap the new kernel with the verified block and with the new config.
#
vbutil_kernel --pack /newkernel \
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
--version 1 \
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--config=/config-$tstamp.txt \
--vmlinuz /boot/vmlinuz-3.4.0 \
--arch x86_64
#
# Make sure the new kernel verifies OK.
#
vbutil_kernel --verify /newkernel
#
# Copy the new kernel to the KERN-C partition.
#
dd if=/newkernel of=/dev/sda6
2.它不应该完成第一次运行。您将收到关于 fstack-protector-strong 的错误消息。导航到 /usr/src/kernel/arch/x86/Makefile 并将第 78 行从 stackp-y := -fstack-protector-strong 编辑为 stackp-y := -fstack-protector-all
3. 使用新修改的 Makefile 再次运行脚本。同样,不要覆盖内核。
4.您应该会遇到更多错误,但不要担心。现在是时候打开 VMware Workstation 了。当你得到 Kernel 3.4.0 headers are missing 提示时,将提示框指向:/usr/src/linux-headers-3.4.0/include
5.你完成了!现在一切都应该正常了。感谢 michaela_elise(Reddit) 创建原始脚本并指出 -fstack-protector-strong 问题。 (注意:第二次也是最后一次运行脚本后,您可能需要重新启动。第二次运行脚本后,VMware Workstation 出现故障。)