forked from agherzan/meta-chip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
162 lines (123 loc) · 5.52 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
This README file contains information on building the meta-chip BSP layer.
Please see the corresponding sections below for details.
Dependencies
============
This layer depends on:
URI: git://git.openembedded.org/bitbake
branch: master
URI: git://git.openembedded.org/openembedded-core
layers: meta
branch: master
URI: git://github.com/linux-sunxi/meta-sunxi.git
branch: master
Contributing
============
Mailing list
The main communication tool we use is a mailing list:
* <yocto@yoctoproject.org>
* <https://lists.yoctoproject.org/listinfo/yocto>
Feel free to ask any kind of questions but always prepend your email subject
with "[meta-chip]". This is because we use the 'yocto' mailing list and
not a particular 'meta-chip' mailing list.
Patches and pull requests
All the contributions should be compliant with the openembedded patch
guidelines: <http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines>
To contribute to this project you should send pull requests to the github
repository (<https://github.com/agherzan/meta-chip>). **Additionally** you can
send the patches for review to the above specified mailing list so that
more people can see and review your contributions..
When creating patches for the mailing list, please use something like:
git format-patch -s --subject-prefix='meta-chip][PATCH' origin
When sending patches to the mailing list, please use something like:
git send-email --to yocto@yoctoproject.org <generated patch>
Github issues
In order to manage and trace the meta-chip issues, we use github issues:
<https://github.com/agherzan/meta-chip/issues>
Table of Contents
=================
I. Building the meta-chip BSP layer
II. Flashing a C.H.I.P. board
I. Building the meta-chip BSP layer
========================================
To build a machine supported by this BSP layer follow the next steps:
1. source poky/oe-init-build-env chip-build
2. Add needed layer to bblayers.conf:
- meta-chip
3 Set MACHINE to "chip" in local.conf
4. bitbake chip-hwup-image
II. Flashing a C.H.I.P. board
========================================
As part of the build including this BSP layer, a U-Boot script and a
shell script are created to assist in flashing your images to the CHIP
board. Note that this script assumes a maximum size for your UBI
image of 167772160 (0x0A000000) bytes. If your UBI image exceeds
that, then you will need to adapt this to your environment.
To successfully run this script you will first need to set your board
into FEL mode. Insert a wire into the U14 header between pin 7 (FEL)
and GND. Then connect the board with a USB cable to your host. More
details here:
https://docs.getchip.com/chip.html#flash-chip-with-an-os
You need to specify the base filename of your UBI image using the
UBI_IMAGE shell variable before invoking the generated script as
follows:
# UBI_IMAGE=chip-hwup-image-chip.ubi \
./tmp/deploy/images/chip/flash_CHIP_board.sh
This script will take some time to execute. The output of this script
as run on your host machine should look similar to the following:
# UBI_IMAGE=chip-hwup-image-chip.ubi ./tmp/deploy/images/chip/flash_CHIP_board.sh
100% [================================================] 3537 kB, 513.9 kB/s
100% [================================================] 619 kB, 551.1 kB/s
100% [================================================] 2 kB, 476.0 kB/s
100% [================================================] 71303 kB, 531.1 kB/s
If you have a serial console connected to your board, you will see
progress and a message on the console indicating when flashing is
complete:
U-Boot 2016.01 (Jun 20 2017 - 02:54:42 -0400) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
DRAM: 512 MiB
NAND: 8192 MiB
video-mode 720x480-24@60 not available, falling back to 1024x768-24@60
Setting up a 720x480i composite-ntsc console (overscan 40x20)
In: serial
Out: serial
Err: serial
Net: usb_ether
starting USB...
No controllers found
Hit any key to stop autoboot: 0
(FEL boot)
## Executing script at 43100000
Erasing NAND
NAND erase.chip: device 0 whole chip
Skipping bad block at 0xeb000000
Skipping bad block at 0x1b1000000
Erasing at 0x1ffc00000 -- 100% complete.
OK
Writing SPL (with ECC) to NAND address 0x00000000
NAND write: 3537408 bytes written: OK
Writing SPL (with ECC) to NAND address 0x400000
NAND write: 3537408 bytes written: OK
Writing UBoot image to address 0x800000
NAND write: device 0 offset 0x800000, size 0x97236
619062 bytes written: OK
Enabling Splash
Setting Video Mode
Saving default environment
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc00000 -- 100% complete.
Writing to NAND... OK
Writing UBI rootfs to NAND address 0x1000000
NAND write: device 0 offset 0x1000000, size 0xa000000
167772160 bytes written: OK
===========================================================
Flashing Complete. Please power down and disable FEL mode.
===========================================================
Additionally, once the image is properly flashed, the status LED on
the CHIP board will flash on and off every 2 seconds. This indicates
that it is safe to power down your board and disable FEL mode.
WARNING: This will erase the entire contents of your CHIP board.
NOTE: This setup is still compatible with the CHIP flashing utility
available at http://flash.getchip.com if you choose to reinstall the
stock images.