translator, wb_editors
4427
правок
(Новая страница: «Run the script and specify the name of the device with the flash card: <pre> sudo bash create_partitions.sh $MYDISK </pre>») |
Matveevrj (обсуждение | вклад) Метки: правка с мобильного устройства правка из мобильной версии |
||
(не показано 25 промежуточных версий 2 участников) | |||
Строка 31: | Строка 31: | ||
*find out the name of the device corresponding to the map. This is usually /dev/mmcblk0 or /dev/sdX (where X is the letter). This command can help <pre>dmesg | tail</pre> | *find out the name of the device corresponding to the map. This is usually /dev/mmcblk0 or /dev/sdX (where X is the letter). This command can help <pre>dmesg | tail</pre> | ||
*:<b> Do not confuse the device name! Incorrectly specifying the name of the device, you will lose all data on your computer forever!</b> | *:<b> Do not confuse the device name! Incorrectly specifying the name of the device, you will lose all data on your computer forever!</b> | ||
* | *unmount the map partitions that Linux mounted automatically: | ||
**if the device is called / dev /mmcblk0, the partitions are called/dev /mmcblk0p1,/dev /mmcblk0p2, etc. | **if the device is called /dev/mmcblk0, the partitions are called /dev/mmcblk0p1, /dev/mmcblk0p2, etc. | ||
**if the device is called / dev /sdb, the partitions are/dev /sdb1,/dev /sdb2, etc. | **if the device is called /dev/sdb, the partitions are /dev/sdb1, /dev/sdb2, etc. | ||
*An example of a command:<pre>umount /dev/mmcblk0p1</pre> | *An example of a command:<pre>umount /dev/mmcblk0p1</pre> | ||
*flash the card:<pre>sudo dd if=sdcard.dd of=/dev/mmcblk0 bs=4M</pre> | *flash the card:<pre>sudo dd if=sdcard.dd of=/dev/mmcblk0 bs=4M</pre> | ||
Строка 64: | Строка 64: | ||
*copy the root filesystem to the second partition | *copy the root filesystem to the second partition | ||
First you need to find out the name of the device with the flash card. Use the search. You can, for example, try to run the program GParted and see it. Dev / dev / sdb, and may look like / dev /mmcblk0 | First you need to find out the name of the device with the flash card. Use the search. You can, for example, try to run the program GParted and see it. Dev /dev/sdb, and may look like /dev/mmcblk0 | ||
When the device is found, we create a variable to facilitate the use of the following commands | When the device is found, we create a variable to facilitate the use of the following commands | ||
Строка 91: | Строка 91: | ||
=== | ===Bootloader=== | ||
See [[Special:MyLanguage/Сборка U-Boot/en|Building U-Boot]]. | |||
An image loader to write to the partition: loader[https://github.com/contactless/wirenboard/tree/master/contrib/u-boot u-boot] | |||
Download image | |||
<pre> | <pre> | ||
wget "https://github.com/contactless/wirenboard/blob/master/contrib/u-boot/u-boot.sb.cl25?raw=true" -O u-boot.sb | wget "https://github.com/contactless/wirenboard/blob/master/contrib/u-boot/u-boot.sb.cl25?raw=true" -O u-boot.sb | ||
</pre> | </pre> | ||
Find out the names of the partitions. The script divided the card into partitions, we need to know the name of the first of them. If the device name for the microSD card was <b>/dev/sdX</b>, the first partition will have the device name <b>/dev/sdX1</b>. If the device was named <b>/dev/mmcblkX</b> , the first section is partition <b>/dev/mmcblkXp1</b> (note the <b>p</b> before the partition number). | |||
Finding the name of the first section, enter it here: | |||
<pre> | <pre> | ||
MYDISK1="/dev/sdb1" | MYDISK1="/dev/sdb1" | ||
</pre> | </pre> | ||
Now download the partition image to the card | |||
<pre> | <pre> | ||
sudo dd if=u-boot.sb of=$MYDISK1 bs=512 seek=4 | sudo dd if=u-boot.sb of=$MYDISK1 bs=512 seek=4 | ||
Строка 117: | Строка 115: | ||
=== | ===Creating FS=== | ||
Find the name of the second section on the flash drive and write it in a variable | |||
<pre> | <pre> | ||
MYDISK2="/dev/sdb2" | MYDISK2="/dev/sdb2" | ||
</pre> | </pre> | ||
<b>rootfs</b> | <b>rootfs</b> will become the name of this partition. | ||
<pre> | <pre> | ||
Строка 131: | Строка 129: | ||
=== | ===Copy image to partition=== | ||
Released image (including kernel, dtbs, modules and firmware): [https://github.com/contactless/wirenboard/releases releases] | |||
See also [[Special:MyLanguage/Сборка образа/en|Image Building]] | |||
<pre> | <pre> | ||
Строка 142: | Строка 140: | ||
</pre> | </pre> | ||
Now we need to mount the file system we created earlier.'' How to do it in the terminal?'' | |||
By default in Ubuntu it is mounted in <b>/media/$USER/rootfs/</b>. Find where the system is mounted on your computer. | |||
Unpack the image into a section: | |||
<pre> | <pre> | ||
sudo tar xfpz rootfs.tar.gz -C /media/$USER/rootfs/ | sudo tar xfpz rootfs.tar.gz -C /media/$USER/rootfs/ | ||
Строка 152: | Строка 150: | ||
Unmount the file system: | |||
<pre> | <pre> | ||
umount /media/user/rootfs | umount /media/user/rootfs | ||
Строка 158: | Строка 156: | ||
== | ==Example== | ||
Ubuntu OS, SD card is connected to the built-in reader and defined as /dev/mmcblk0. | |||
[https://github.com/contactless/wirenboard/ | [https://github.com/contactless/wirenboard/ The repository] is downloaded, we are in its root. | ||
Image file rootfs.tar.gz is located inside the rootfs system folder. | |||
<pre> | <pre> | ||
Строка 184: | Строка 182: | ||
See [[Special:MyLanguage/Стандартный образ ФС/en|FS standart image]]. |