Skip to contentSkip to conversation

configs,board: add OLPC XO laptops

PATCH New Lubomir Rintel 2 participants 5 messages Apr 16, 2020 – Apr 17, 2020

lore
Share & tools
lore
#0 lore raw

v3 cover configs,board: add OLPC XO laptops

Hi,

With few consumer distros remaining to support the Geode-based systems, let alone optimize for them, Buildroot is a very handy way to make good use of a rather uniquely engineered XO-1 laptop. Also, with 5.3 kernel, the XO-1.75 is in a pretty good shape.

Let's add support for both machines.

Compared to the previous iteration of the set, this removes a large amount of packages and kernel options that were enabled, based on review feedback from Thomas Petazzoni. What is left is hopefully pretty much a minimal configuration.

The patches apply on top of today's master. They were tested on XO-1 and XO-1.75 laptops.

Thanks,
Lubo

#1 lore raw

PATCH v3 1/3 configs, board/olpc: add scripts for OLPC laptops

There are muliple generations of OLPC laptops, x86 ones based on Geode, VIA and ARM based with Marvell Armada. All of boot with OpenFirmware and share some peripherals.

This patch adds the common files.

---
 DEVELOPERS               |  3 ++
 board/olpc/genimage.cfg  |  9 ++++++
 board/olpc/linux.config  | 66 ++++++++++++++++++++++++++++++++++++++++
 board/olpc/olpc.fth      | 46 ++++++++++++++++++++++++++++
 board/olpc/post-build.sh |  4 +++
 5 files changed, 128 insertions(+)
 create mode 100644 board/olpc/genimage.cfg
 create mode 100644 board/olpc/linux.config
 create mode 100644 board/olpc/olpc.fth
 create mode 100755 board/olpc/post-build.sh
DEVELOPERS +3 -0
index 3d9c976a95..b35f543d00 100644
@@ -1542,6 +1542,9 @@ F:	support/legal-info/
 N:	Lucas De Marchi <[email protected]>
 F:	package/fswebcam/
 
+N:	Lubomir Rintel <[email protected]>
+F:	board/olpc/
+
 N:	Ludovic Desroches <[email protected]>
 F:	board/atmel/
 F:	configs/at91*
board/olpc/genimage.cfg new file +9 -0
new file mode 100644
index 0000000000..baafe31714
@@ -0,0 +1,9 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/olpc/linux.config new file +66 -0

66 lines not on this page · raw message

board/olpc/olpc.fth new file +46 -0

46 lines not on this page · raw message

board/olpc/post-build.sh new file +4 -0
new file mode 100755
index 0000000000..4d4cf97086
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+install -m 0644 -D $BOARD_DIR/olpc.fth $TARGET_DIR/boot/olpc.fth
Signature · 1 line
2.26.0
#2 lore raw

PATCH v3 2/3 configs,board/olpc: add OLPC XO-1 support

In reply to Lubomir Rintel
---
 DEVELOPERS                   |  1 +
 board/olpc/xo-1/linux.config | 81 ++++++++++++++++++++++++++++++++++++
 configs/olpc_xo1_defconfig   | 20 +++++++++
 3 files changed, 102 insertions(+)
 create mode 100644 board/olpc/xo-1/linux.config
 create mode 100644 configs/olpc_xo1_defconfig
DEVELOPERS +1 -0
index b35f543d00..7cf0630fb8 100644
@@ -1544,6 +1544,7 @@ F:	package/fswebcam/
 
 N:	Lubomir Rintel <[email protected]>
 F:	board/olpc/
+F:	configs/olpc_xo1_defconfig
 
 N:	Ludovic Desroches <[email protected]>
 F:	board/atmel/
board/olpc/xo-1/linux.config new file +81 -0

81 lines not on this page · raw message

configs/olpc_xo1_defconfig new file +20 -0
new file mode 100644
index 0000000000..e36972e6e1
@@ -0,0 +1,20 @@
+BR2_x86_geode=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/olpc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olpc/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olpc/xo-1/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olpc/linux.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB8388_V9=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB8388_OLPC=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_USB_THINFIRM=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="XO1"
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O dir_index,^huge_file,^64bit,^extent"
+BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.26.0
#3 lore raw

PATCH v3 3/3 configs, board/olpc: add OLPC XO-1.75 configuration

In reply to Lubomir Rintel
---
 DEVELOPERS                      |  1 +
 board/olpc/xo-1.75/linux.config | 47 +++++++++++++++++++++++++++++++++
 configs/olpc_xo175_defconfig    | 25 ++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100644 board/olpc/xo-1.75/linux.config
 create mode 100644 configs/olpc_xo175_defconfig
DEVELOPERS +1 -0
index 7cf0630fb8..f94d3e4faf 100644
@@ -1545,6 +1545,7 @@ F:	package/fswebcam/
 N:	Lubomir Rintel <[email protected]>
 F:	board/olpc/
 F:	configs/olpc_xo1_defconfig
+F:	configs/olpc_xo175_defconfig
 
 N:	Ludovic Desroches <[email protected]>
 F:	board/atmel/
board/olpc/xo-1.75/linux.config new file +47 -0

47 lines not on this page · raw message

configs/olpc_xo175_defconfig new file +25 -0
new file mode 100644
index 0000000000..bd5cdaad37
@@ -0,0 +1,25 @@
+BR2_arm=y
+BR2_pj4=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/olpc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/olpc/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olpc/xo-1.75/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/olpc/linux.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9=y
+BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688=y
+BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787=y
+BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797=y
+BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8887=y
+BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8897=y
+BR2_PACKAGE_WPA_SUPPLICANT=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="XO175"
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O dir_index,^huge_file,^64bit,^extent"
+BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.26.0
#4 lore raw

v3 cover configs,board: add OLPC XO laptops

In reply to Lubomir Rintel

Hello Lubomir,

Quoted 4 lines · On Thu, 16 Apr 2020 11:59:51 +0200 Lubomir Rintel <[email protected]> wrote:

With few consumer distros remaining to support the Geode-based systems, let alone optimize for them, Buildroot is a very handy way to make good use of a rather uniquely engineered XO-1 laptop. Also, with 5.3 kernel, the XO-1.75 is in a pretty good shape.

Thanks, I have applied your patches. One thing that was not good is that the kernel version was not explicitly specified, while we always do this in our defconfigs to ensure that the kernel version being built has been tested by someone, instead of using just the default latest kernel. I assumed you had tested with Linux 5.6, since it is currently the latest.

Another thing that would be nice to have is a board/olpc/readme.txt, which gives some details on how to use the defconfigs, and especially how to flash/boot the resulting system on the hardware. See other readme.txt files in board/ for some examples.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com