board: add support for Chromebook Snow
PATCH v4 2/2 board: add support for Chromebook Snow
Chromebook Snow (Samsung XE303C12) is an Exynos 5 board with a keyboard, an 11 inch screen and a battery attached. It is relatively developer-friendly and can run mainline Linux kernels with little to no effort.
There is barely anything special about this target as far as toolchain is concerned, but its bootloader only accepts signed kernel images in a Chromium OS specific format, and is not controllable otherwise.
This config provides a script for building the proper kernel blobs, and a short manual for booting Buildroot images on this device.
In-tree exynos_defconfig is used for the kernel, with a fragment to change mwifiex into a module. When built statically, mwifiex attempts to load its firmware before rootfs is mounted and fails.
---
v2: script to make complete SD card image
explicit kernel version in defconfig
comments and text updates
v3: host-dtc dependency
text tweaks
v4: in-tree defconfig + fragment instead of custom kernel config
scripts updated to use buildroot's *_DIR variables directly device tree tpm patch for nv-uboot
minor text fixes
board/chromebook/snow/kernel.args | 1 + board/chromebook/snow/kernel.its | 37 +++++++ board/chromebook/snow/linux-4.3-dts-tpm.patch | 26 +++++ board/chromebook/snow/linux-4.3.fragment | 2 + board/chromebook/snow/mksd.sh | 69 +++++++++++++ board/chromebook/snow/readme.txt | 137 ++++++++++++++++++++++++++ board/chromebook/snow/sign.sh | 41 ++++++++ configs/chromebook_snow_defconfig | 25 +++++ 8 files changed, 338 insertions(+) create mode 100644 board/chromebook/snow/kernel.args create mode 100644 board/chromebook/snow/kernel.its create mode 100644 board/chromebook/snow/linux-4.3-dts-tpm.patch create mode 100644 board/chromebook/snow/linux-4.3.fragment create mode 100755 board/chromebook/snow/mksd.sh create mode 100644 board/chromebook/snow/readme.txt create mode 100755 board/chromebook/snow/sign.sh create mode 100644 configs/chromebook_snow_defconfig
board/chromebook/snow/kernel.args new file +1 -0
@@ -0,0 +1 @@ +console=tty1 clk_ignore_unused root=/dev/mmcblk1p2 rootfstype=ext4 ro
board/chromebook/snow/kernel.its new file +37 -0
@@ -0,0 +1,37 @@ +/dts-v1/; + +/ { + description = "Buildroot kernel for Chromebook Snow"; + images { + kernel at 1 { + description = "kernel"; + data = /incbin/("zImage"); + type = "kernel_noload"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0>; + entry = <0>; + hash at 1 { + algo = "sha1"; + }; + }; + fdt at 1{ + description = "exynos5250-snow.dtb"; + data = /incbin/("exynos5250-snow.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + hash at 1 { + algo = "sha1"; + }; + }; + }; + configurations { + default = "conf at 1"; + conf at 1{ + kernel = "kernel at 1"; + fdt = "fdt at 1"; + }; + }; +};
board/chromebook/snow/linux-4.3-dts-tpm.patch new file +26 -0
@@ -0,0 +1,26 @@ +Some versions of u-boot for this Chromebook check for tpm node +in the device tree and fail badly (reboot) if it is not found. + +While not exactly correct, it is much easier to patch the mainline +device tree to match u-boot expectations than to fix u-boot on +this device. + +See https://code.google.com/p/chromium/issues/detail?id=220169 +and https://lkml.org/lkml/2013/3/4/242 + +Signed-off-by: Alex Suykov <[email protected]> + +--- a/arch/arm/boot/dts/exynos5250-snow.dts ++++ b/arch/arm/boot/dts/exynos5250-snow.dts +@@ -474,6 +474,11 @@ + status = "okay"; + samsung,i2c-sda-delay = <100>; + samsung,i2c-max-bus-freq = <66000>; ++ ++ tpm { ++ compatible = "infineon,slb9635tt"; ++ reg = <0x20>; ++ }; + }; + + &i2c_5 {
board/chromebook/snow/linux-4.3.fragment new file +2 -0
@@ -0,0 +1,2 @@ +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m
board/chromebook/snow/mksd.sh new file +69 -0
69 lines not on this page · raw message
board/chromebook/snow/readme.txt new file +137 -0
137 lines not on this page · raw message
board/chromebook/snow/sign.sh new file +41 -0
41 lines not on this page · raw message
configs/chromebook_snow_defconfig new file +25 -0
@@ -0,0 +1,25 @@ +BR2_arm=y +BR2_cortex_a15=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.3" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3=y +BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_TARGET_GENERIC_GETTY_TERM="linux" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/chromebook/snow/sign.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/chromebook/snow/mksd.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_SAME_AS_HEADERS=y +BR2_LINUX_KERNEL_PATCH="board/chromebook/snow/linux-4.3-dts-tpm.patch" +BR2_LINUX_KERNEL_DEFCONFIG="exynos" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/chromebook/snow/linux-4.3.fragment" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5250-snow" +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DTC=y +BR2_PACKAGE_HOST_PARTED=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_VBOOT_UTILS=y
Signature · 1 line
2.6.4
PATCH v4 2/2 board: add support for Chromebook Snow
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alex" == Alex Suykov <[email protected]> writes:
Hi,
Sorry for the really slow response!
Quoted 31 lines
Chromebook Snow (Samsung XE303C12) is an Exynos 5 board with a keyboard, an 11 inch screen and a battery attached. It is relatively developer-friendly and can run mainline Linux kernels with little to no effort.
There is barely anything special about this target as far as toolchain is concerned, but its bootloader only accepts signed kernel images in a Chromium OS specific format, and is not controllable otherwise.
This config provides a script for building the proper kernel blobs, and a short manual for booting Buildroot images on this device.
In-tree
exynos_defconfigis used for the kernel, with a fragment to change mwifiex into a module. When built statically, mwifiex attempts to load its firmware before rootfs is mounted and fails.Signed-off-by Alex Suykov <[email protected]>---
v2: script to make complete SD card image
explicit kernel version in defconfig
comments and text updates
v3: host-dtc dependency
text tweaks
v4: in-tree defconfig + fragment instead of custom kernel config
scripts updated to use buildroot's*_DIRvariables directly device tree tpm patch for nv-uboot
minor text fixes+++ b/configs/chromebook_snow_defconfig
configs/chromebook_snow_defconfig new file +1
-0@@ -0,0 +1,25 @@ +BR2_arm=y
configs/chromebook_snow_defconfig line 11
Quoted 10 lines
configs/chromebook_snow_defconfig new file +10
-0+BR2_cortex_a15=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.3" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_3=y +BR2_TARGET_GENERIC_GETTY_PORT="tty1" +BR2_TARGET_GENERIC_GETTY_TERM="linux" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/chromebook/snow/sign.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/chromebook/snow/mksd.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
This has been reversed so you now do BR2_KERNEL_HEADERS_AS_KERNEL=y instead.
configs/chromebook_snow_defconfig line 12
Quoted 1 line
configs/chromebook_snow_defconfig new file +1
-0+BR2_LINUX_KERNEL_PATCH="board/chromebook/snow/linux-4.3-dts-tpm.patch"
You forgot to lock the kernel version to a 4.3 series kernel. I've now set it to 4.3.6.
configs/chromebook_snow_defconfig line 24
Quoted 12 lines
configs/chromebook_snow_defconfig new file +12
-0+BR2_LINUX_KERNEL_DEFCONFIG="exynos" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/chromebook/snow/linux-4.3.fragment" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5250-snow" +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_PACKAGE_HOST_DTC=y +BR2_PACKAGE_HOST_PARTED=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
For fit support in mkimage we need to enable:
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
Committed with that fixed, thanks.
If you have time, it would be nice to verify that 4.6.3 works correctly and then send a patch to update the defconfig.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v4 2/2 board: add support for Chromebook Snow
Quoted 2 lines · Peter Korsgaard
If you have time, it would be nice to verify that 4.6.3 works correctly and then send a patch to update the defconfig.
Just sent a patch.
Since it's been a long time, I did full builds with the old 4.3 and the new 4.6 configs using current buildroot git tree. Both were successful and I had no problems booting them on the device.
One minor issue, savedefconfig does not add BR2_KERNEL_HEADERS_AS_KERNEL=y into the defconfig, it seems to be the default setting. There's nothing in the board config that would require specific headers version, so I left it as is. Please check if that's ok.
PATCH v4 2/2 board: add support for Chromebook Snow
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alex" == Alex Suykov <[email protected]> writes:
Quoted 2 lines · Peter Korsgaard
If you have time, it would be nice to verify that 4.6.3 works correctly and then send a patch to update the defconfig.
Just sent a patch.
Thanks!
Quoted 3 lines
Since it's been a long time, I did full builds with the old 4.3 and the new 4.6 configs using current buildroot git tree. Both were successful and I had no problems booting them on the device.
Great, good to hear!
Quoted 4 lines
One minor issue, savedefconfig does not add BR2_KERNEL_HEADERS_AS_KERNEL=y into the defconfig, it seems to be the default setting. There's nothing in the board config that would require specific headers version, so I left it as is. Please check if that's ok.
Yes, indeed - This is now our default setting if you are also building a Linux kernel, so it doesn't end up in the defconfig.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard