1Samsung XE303C12 aka Chromebook Snow 2==================================== 3 4This file describes booting the Chromebook from an SD card containing 5Buildroot kernel and rootfs, using the original bootloader. This is 6the least invasive way to get Buildroot onto the devices and a good 7starting point. 8 9The bootloader will only boot a kernel from a GPT partition marked 10bootable with cgpt tool from vboot-utils package. 11The kernel image must be signed using futility from the same package. 12The signing part is done by sign.sh script in this directory. 13 14It does not really matter where rootfs is as long as the kernel is able 15to find it, but this particular configuration assumes the kernel is on 16partition 1 and rootfs is on partition 2 of the SD card. 17Make sure to check kernel.args if you change this. 18 19Making the boot media 20--------------------- 21Start by configuring and building the images. 22 23 make chromebook_snow_defconfig 24 make menuconfig # if necessary 25 make 26 27The important files are: 28 29 uImage.kpart (kernel and device tree, signed) 30 rootfs.tar 31 bootsd.img (SD card image containing both kernel and rootfs) 32 33Write the image directly to some SD card. 34WARNING: make sure there is nothing important on that card, 35and double-check the device name! 36 37 SD=/dev/mmcblk1 # may be /dev/sdX on some hosts 38 dd if=output/images/bootsd.img of=$SD 39 40Switching to developer mode and booting from SD 41----------------------------------------------- 42Power Chromebook down, then power it up while holding Esc+F3. 43BEWARE: switching to developer mode deletes all user data. 44Create backups if you need them. 45 46While in developer mode, Chromebook will boot into a white screen saying 47"OS verification is off". 48 49Press Ctrl-D at this screen to boot Chromium OS from eMMC. 50Press Ctrl-U at this screen to boot from SD (or USB) 51Press Power to power it off. 52Do NOT press Space unless you mean it. 53This will switch it back to normal mode. 54 55The is no way to get rid of the white screen without re-flashing the bootloader. 56 57Troubleshooting 58--------------- 59Loud *BEEP* after pressing Ctrl-U means there's no valid partition to boot from. 60Which in turn means either bad GPT or improperly signed kernel. 61 62Return to the OS verification screen without any sounds means the code managed 63to reboot the board. May indicate properly signed but invalid image. 64 65Blank screen means the image is valid and properly signed but cannot boot 66for some reason, like missing or incorrect DT. 67 68In case the board becomes unresponsive: 69 70* Press Esc+F3+Power. The board should reboot instantly. 71 Remove SD card to prevent it from attempting a system recovery. 72 73* Hold Power button for around 10s. The board should shut down into 74 its soft-off mode. Press Power button again or open the lid to turn in on. 75 76* If that does not work, disconnect the charger and push a hidden 77 button on the underside with a pin of some sort. The board should shut 78 down completely. Opening the lid and pressing Power button will not work. 79 To turn it back on, connect the charger. 80 81Partitioning SD card manually 82----------------------------- 83Check mksd.sh for partitioning commands. 84 85Use parted and cgpt on a real device, and calculate the partition 86sizes properly. The kernel partition may be as small as 4MB, but 87you will probably want the rootfs to occupy the whole remaining space. 88 89cgpt may be used to check current layout: 90 91 output/host/bin/cgpt show $SD 92 93All sizes and all offsets are in 512-byte blocks. 94 95Writing kernel and rootfs to a partitioned SD card 96-------------------------------------------------- 97Write .kpart directly to the bootable partition: 98 99 dd if=output/images/uImage.kpart of=${SD}1 100 101Make a new filesystem on the rootfs partition, and unpack rootfs.tar there: 102 103 mkfs.ext4 ${SD}2 104 mount ${SD2} /mnt/<ROOTFS-PARTITION> 105 tar -xvf output/images/rootfs.tar -C /mnt/<ROOTFS-PARTITION> 106 umount /mnt/<ROOTFS-PARTITION> 107 108This will require root permissions even if you can write to $SD. 109 110Kernel command line 111------------------- 112The command line is taken from board/chromebook/snow/kernel.args and stored 113in the vboot header (which also holds the signature). 114 115The original bootloader prepends "cros_secure console= " to the supplied 116command line. The only way to suppress this is to enable CMDLINE_FORCE 117in the kernel config, disabling external command line completely. 118 119That's not necessary however. The mainline kernel ignores cros_secure, 120and supplying console=tty1 in kernel.args undoes the effect of console= 121 122Booting with console= suppresses all kernel output. 123As a side effect, it makes /dev/console unusable, which the init in use must 124be able to handle. 125 126WiFi card 127--------- 128Run modprobe mwifiex_sdio to load the driver. 129The name of the device should be mlan0. 130 131Further reading 132--------------- 133https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-arm-chromebook 134http://linux-exynos.org/wiki/Samsung_Chromebook_XE303C12/Installing_Linux 135http://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook 136http://www.de7ec7ed.com/2013/05/application-processor-ap-uart-samsung.html 137http://www.de7ec7ed.com/2013/05/embedded-controller-ec-uart-samsung.html 138