Booting non-verified u-boot on Samsung ARM Chromebook 2

This page contains brief instructions for getting non-verified u-boot (nv_uboot) onto a Samsung ARM Chromebook 2

For background details, see the main Google wiki for this device:

Basic Setup

Follow instructions on Google wiki to put Chromebook into developer mode and enable USB booting.

Grab a test image

13" peach-pi:

11" peach-pit:

...unpack/untar and "dd" .bin file onto an SD card of at lest 4GB

Get non-verified u-boot (nv_u-boot) image

A pre-built version for the peach-pi (13") is here:

Write u-boot to SD card

The SD card image above has 3 kernel partitions (and 3 corresponding root partitions, as well as several other partitions) The stock chrome OS kernel is on KERN-A (partition 2) and stock root filesystem on ROOT-A (partition 3).

To boot nv_u-boot instead of the stock chromeOS kernel, write nv_u-boot into KERN-B (partition 4):

sudo dd if=nv_uboot-peach-pi.kpart of=${SDCARD}4

Then, make KERN-B (partition 4) highest priority so nv_u-boot boots instead of stock kernel:

sudo cgpt add -i 4 -P 15 -S 1 -T 1 ${SDCARD}

Then, lower the priority of KERN-A:

sudo cgpt add -i 2 -P 0 -S 0 -T 0 ${SDCARD}

The partition table should end up looking as follows:

       start        size    part  contents
           0           1          PMBR (Boot GUID: ECDB714C-1CAF-F842-8013-4B8C523304F8)
           1           1          Pri GPT header
           2          32          Pri GPT table
     2928640     2097152       1  Label: "STATE"
                                  Type: Linux data
                                  UUID: 1FE85161-CAC7-3F43-BF97-1B5605F1E085
       20480       32768       2  Label: "KERN-A"
                                  Type: ChromeOS kernel
                                  UUID: 0E515C4D-97DE-3641-AF8C-750191FCB46B
                                  Attr: priority=0 tries=0 successful=0'
      286720     2641920       3  Label: "ROOT-A"
                                  Type: ChromeOS rootfs
                                  UUID: 9372E97A-F0ED-964D-A91F-2B6E3B755E3C
       53248       32768       4  Label: "KERN-B"
                                  Type: ChromeOS kernel
                                  UUID: DA833F21-118B-E141-9A15-51F515516906
                                  Attr: priority=15 tries=1 successful=1
      282624        4096       5  Label: "ROOT-B"
                                  Type: ChromeOS rootfs
                                  UUID: DA36BF78-2EC2-C243-88C6-ACA88AEE1BE7
       16448           1       6  Label: "KERN-C"
                                  Type: ChromeOS kernel
                                  UUID: BEF77A85-ACC6-6F4E-9911-F176DCD4E338
                                  Attr: priority=0 tries=0 successful=0
       16449           1       7  Label: "ROOT-C"
                                  Type: ChromeOS rootfs
                                  UUID: 74737834-E40C-0448-BF66-CDD9C2B2989C
       86016       32768       8  Label: "OEM"
                                  Type: Linux data
                                  UUID: 13033299-F54D-C642-B996-ADE3DBA48CCE
       16450           1       9  Label: "reserved"
                                  Type: ChromeOS reserved
                                  UUID: 75055E20-5FBC-9A45-A9C2-CFB0FC1714D3
       16451           1      10  Label: "reserved"
                                  Type: ChromeOS reserved
                                  UUID: 2F1F0C69-FD5B-1B4B-8147-5B4CF600A46A
          64       16384      11  Label: "RWFW"
                                  Type: ChromeOS firmware
                                  UUID: 5683C3C5-9571-7447-AE3A-A4C22A35DCC0
      249856       32768      12  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: ECDB714C-1CAF-F842-8013-4B8C523304F8
    31291359          32          Sec GPT table
    31291391           1          Sec GPT header

Add custom root filesystem to SD card

Create a new filesystem on the ROOT-A partition, using Ubuntu (linaro-developer) image:

sudo mke2fs -j -L "rootfs" ${SDCARD}3

If during the creation of the filesystem /dev/${SDCARD}3 is not detected, make sure the partitions are indeed committed to the OS and then try again. Recent versions of ChromeBook2 have replaced the partprobe command by partx in which case the syntax would be as follows:

sudo partx -v -a /dev/${SDCARD}

Mount the new filesystem

sudo mkdir /tmp/mnt
sudo mount ${SDCARD}3 /tmp/mnt

Put Ubuntu (linaro-developer) on the root filesystem:

curl -O
sudo tar -C /tmp/mnt --strip-components=1 -zxf linaro-trusty-developer-20140727-680.tar.gz

Using your custom kernel, create a zImage with the correct DTB appended:

cd arch/arm/boot
cat zImage dts/exynos5800-peach-pi.dtb  > zImage-dtb

Create a uImage from your custom appended-DTB zImage:

mkimage -A arm -O linux -T kernel -C none -a 0x40008000 -e 0x40008000 -n "Linux" -d zImage-dtb uImage-dtb

and copy it to the new rootfs partition:

sudo cp uImage-dtb /tmp/mnt/boot
sudo umount /tmp/mnt

Boot new u-boot, kernel and rootfs

We have u-boot placed in partition four and the rootfs holding the kernel image in partition three: we are ready to boot from the SD card.

Plug new SD card into Chromebook.

Press "ctrl-u" at the dev screen

This will boot u-boot from SD card. u-boot stdout will be on UART console and framebuffer

You should now be at the u-boot prompt

Peach #

Setup u-boot environment

setenv bootdelay 2
setenv bootfile /boot/uImage-dtb
setenv loadaddr 0x41000000
setenv devtype mmc
setenv devnum 1
setenv rootpart 3
setenv devname /dev/mmcblk1p3
setenv bootargs console=tty1 console=ttySAC3,115200 debug earlyprintk rw rootwait root=${devname}
setenv ext2_boot 'ext2load ${devtype} ${devnum}:${rootpart} ${loadaddr} ${bootfile}; bootm ${loadaddr}'
setenv bootcmd run ext2_boot

Now save this u-boot environment


Then tell u-boot to boot (which runs the bootcmd command.

Peach #  boot

When rebooting, u-boot will automatically run the bootcmd every time it boots

USB networking

Neither u-boot or mainline kernel supports WiFi so networking can be added by using a USB ethernet dongle. Since upstream u-boot supports the ASIX chipset, a device with that chipset is recommended. For example, the Linksys USB300m.

WARNING: the ASIX 88178 is not currently supported by uboot, do not use.

Having plugged a USB ethernet dongle you will have to bring up the network interface manually and install the network manager

$ dhclient eth0
$ apt-get install network-manager

PM early feature release

Status: 5 Jan 2015

* integration tree <branch>: git:// <wip/exynos/v3.19-integ>

* kernel configuration: read commit 023bcc12992da2e498f21e99e18f92e8b2d7f77b

  • kconfig fragments for MCPM, cpuidle, cpufreq, sched The base 'exynos_defconfig' has the defaults for basic boot, including framebuffer display (add console=tty1 to commandline). In order to enable topology, MCPM, CPUidle, and CPUfreq use the additional kconfig fragments checked into arch/arm/mach-exynos/configs. To combine the fragments use the tool:

$ ARCH=arm ./scripts/kconfig/ arch/arm/configs/exynos_defconfig arch/arm/mach-exynos/configs/*.config
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig

WorkingGroups/PowerManagement/Doc/Chromebook2_boot (last modified 2015-01-08 16:39:33)