Samsung Chromebook 2 XE503C12/Mainline Linux Kernel

From Linux Exynos
Jump to: navigation, search

Contents

General Notes


Preparing your machine

You will need to ensure that developer mode is enabled and that verification of the kernel is disabled. Steps on how to do this can be found at Samsung_Chromebook_2_XE503C12/Installing_Linux. It is highly recommended that you also set up nv-uboot as it helps make things a bit more straight forward

If you have enabled booting from USB/SD cards you can partition and install linux to this device and still continue to use your existing chrome install by using ctrl+d to boot from the internal MMC (chromeos) or ctrl+u to boot from USB/SD (linux distro). The is very useful during the initial bootstrap phases as you can use the chromeos install to recover from a failed boot and chroot into the linux install to repair it or access its tools

Kernel Compiling

Based on the notes from Jan 6th 2015 (http://irclog.whitequark.org/linux-exynos/2015-01-06#11395278)

Obtain the 'dp-integ' branch from javier's website at

http://cgit.collabora.com/git/user/javier/linux.git/log/?h=wip/exynos/dp-integ

# These are diffrent from the uboot Loadaddr as uboot will move the file around in mem to the addr specified below
# after stripping the uImage header
LINUX_LOAD_ADDR=0x40008000
LINUX_ENTRY_POINT=0x40008000
 
if ! uname -m | grep arm > /dev/null; then
    export ARCH=arm
    export CROSS_COMPILE="arm-linux-gnueabihf-"
fi
 
# Enable all the drivers for the base hardware
make exynos_defconfig
# Disable SIMPLE_FB as it gets in the way at startup
sed -i s/CONFIG_FB_SIMPLE=y/CONFIG_FB_SIMPLE=n/ .config
make -j4 bzImage exynos5800-peach-pi.dtb exynos5420-peach-pit.dtb

Creating a uImage

# Choose the correct dtb file below for your laptop
DTB=exynos5420-peach-pit.dtb # 11" chromebook (XE503C12)
#DTB=exynos5800-peach-pi.dtb # 13" chromebook (XE503C32)
 
# Append the DTB file to the end of the kernel as DTB can overwrite kernel image in some cases
cat arch/arm/boot/zImage arch/arm/boot/dts/$DTB > zImage.dtb
# Take the concatenated kernel/dtb image and add a uImage header
mkimage -A arm -O linux -T kernel -C none -a $LINUX_LOAD_ADDR -e $LINUX_ENTRY_POINT -n Linux -d zImage.dtb uImage
 
cp uImage /boot
cp arch/arm/boot/dts/$DTB /boot

You should now be able to update your env.txt to point to uImage and the DTB in /boot and reboot into the new kernel

on startup you should see 4 penguins (Heterogeneous Multi processing is enabled by default, if this is disabled there will be 8 penguins)

Creating a FIT Image

cat << __EOF__ > arch/arm/boot/kernel.its
/dts-v1/;
 
/ {
    description = "Chrome OS kernel image with one or more FDT blobs";
    #address-cells = <1>;
    images {
        kernel@1{
            description = "kernel";
            data = /incbin/("zImage");
            type = "kernel_noload";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0>;
            entry = <0>;
        };
        fdt@1{
            description = "<dtb_filename>";
            data = /incbin/("dts/<dtb_filename>");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
            hash@1{
                algo = "sha1";
            };
        };
    };
    configurations {
        default = "conf@1";
        conf@1{
            kernel = "kernel@1";
            fdt = "fdt@1";
        };
    };
};
__EOF__
mkimage -f arch/arm/boot/kernel.its vmlinux.fit

You should now write the vmlinux.fit image to your raw kernel partition