xref: /OK3568_Linux_fs/buildroot/board/olpc/readme.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunOLPC XO Laptops
2*4882a593Smuzhiyun===============
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThis document explains how to build and run images that run on the OLPC
5*4882a593SmuzhiyunXO laptops.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunSupported models
8*4882a593Smuzhiyun----------------
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun* OLPC XO-1
11*4882a593Smuzhiyun  The original NS Geode based OLPC laptop, uses the x86 architecture.
12*4882a593Smuzhiyun  Can be booted either from an internal MTD device formatted with JFFS2
13*4882a593Smuzhiyun  or from a FAT or EXT4 partition on a SD card or a USB flash stick.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun* OLPC XO-7.5
16*4882a593Smuzhiyun  The ARM-based laptop. Needs a recent enough firmware to provide a good
17*4882a593Smuzhiyun  enough flattened device tree to the kernel. Can be from a FAT or EXT4
18*4882a593Smuzhiyun  partition on a internal eMMC, a SD card or a USB flash stick.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunConfigure and build
21*4882a593Smuzhiyun===================
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  $ make olpc_xo1_defconfig   # Configure for XO-1
24*4882a593Smuzhiyun
25*4882a593Smuzhiyunor:
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  $ make olpc_xo175_defconfig # Configure for XO-1.75
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunThen:
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun  $ make menuconfig           # Customize the build configuration
32*4882a593Smuzhiyun  $ make                      # Build
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunPreparing the machine
35*4882a593Smuzhiyun=====================
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunFirmware security
38*4882a593Smuzhiyun-----------------
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunMost OLPC machines were shipped with the security system that disallows
41*4882a593Smuzhiyunbooting unsigned software. If this is the case with your machine, in order
42*4882a593Smuzhiyunto run the image you've built on it you'll need to get a developer key and
43*4882a593Smuzhiyundeactivate the security system.
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunThe procedure is descriped in the OLPC wiki:
46*4882a593Smuzhiyunhttp://wiki.laptop.org/go/Activation_and_Developer_Keys
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunFirmware upgrade
49*4882a593Smuzhiyun----------------
50*4882a593Smuzhiyun
51*4882a593SmuzhiyunIt is always preferrable to use an up to date firmware. The firmware images
52*4882a593Smuzhiyunare available at http://wiki.laptop.org/go/Firmware. For the XO-1.75 laptop
53*4882a593Smuzhiyunto boot the mainline kernel a firmware Q4E00JA or newer is needed. You can
54*4882a593Smuzhiyunget it at http://dev.laptop.org/~quozl/q4e00ja.rom.
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunTo update the firmware, place the .rom file on to your bootable media,
57*4882a593Smuzhiyunconnect a charged battery pack and a wall adapter, and enter the Open
58*4882a593SmuzhiyunFirmware prompt by pressing ESC during the early boot (needs an unlocked
59*4882a593Smuzhiyunlaptop -- see "Firmware security" above). Then use the "flash" command
60*4882a593Smuzhiyunto update the firmware:
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun  ok flash ext:\q4e00ja.rom   \ Flash the "q4e00ja.rom" from the SD card
63*4882a593Smuzhiyun  ok flash u:\q4e00ja.rom     \ Flash the "q4e00ja.rom" from USB stick
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunCreate the bootable SD card or USB flash stick
66*4882a593Smuzhiyun==============================================
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunWhen the build is finished, an image file called "sdcard.img" will be created.
69*4882a593SmuzhiyunIt is suitable for writing directly to a SD card, USB flash stick or (on a
70*4882a593SmuzhiyunXO-1.75) the internal eMMC flash.
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunBefore writing the image, please double check that you're using the right
73*4882a593Smuzhiyundevice (e.g. with "lsblk" command). Doing the following will DESTROY ALL DATA
74*4882a593Smuzhiyunthat's currently on the media.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun  # cat output/images/sdcard.img >/dev/<device>
77*4882a593Smuzhiyun
78*4882a593SmuzhiyunFlashing the JFFS2 image (XO-1 only)
79*4882a593Smuzhiyun====================================
80*4882a593Smuzhiyun
81*4882a593SmuzhiyunUnlike XO-1.75, the internal NAND flash on XO-1 is accessed without a
82*4882a593SmuzhiyunFTL and needs a flash-friendly filesystem. A build configured for XO-1
83*4882a593Smuzhiyuncreates a file named "root.jffs2" that can be written to it.
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunOne way to write it is from the Open Firmware prompt. First, partition
86*4882a593Smuzhiyunand format a USB flash disk with a FAT file system and place the
87*4882a593Smuzhiyun"root.jffs2" file onto it. Then power on the machine, enter the
88*4882a593SmuzhiyunOpen Firmware port by pressing the ESC key and run the following:
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun  ok patch noop ?open-crcs copy-nand  \ Disable CRC check
91*4882a593Smuzhiyun  ok copy-nand u:\root.jffs2
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunBooting the machine
94*4882a593Smuzhiyun===================
95*4882a593Smuzhiyun
96*4882a593SmuzhiyunOnce your machine is unlocked, it will automatically boot from your media
97*4882a593Smuzhiyunwherever it will detect it attached to the USB bus or the SD card slot,
98*4882a593Smuzhiyunotherwise it will proceed booting from the internal flash.
99