我正在尝试为运行 ChrUbuntu 的 Samsung XE500C21 构建自定义内核。我需要至少 3.4.0 的内核,因为我正在尝试运行 VMWare Workstation。我正在运行 ChrUbuntu 13.04。我尝试了所有 Acer C7 bash 脚本,但没有一个对我有用。我需要一个专门用于 Samsung XE500C21 的脚本。请帮忙。
答案1
最后,我解决了我的问题。我制作的以下教程解释了如何在 Samsung Series 5 Chromebook 上安装和运行自定义 3.4.0 内核头文件。注意:您必须拥有非 ARM 处理器才能实现此功能。此外,如果您尚未安装 Chrubuntu 12.04,请使用本教程将 Chrubuntu 12.04 安装到您的 Samsung 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 故障。)