Coder Social home page Coder Social logo

miwel503 / meta-iot2000 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siemens/meta-iot2000

0.0 0.0 0.0 1.43 MB

SIMATIC IOT2000 Yocto Board Support Package

License: Other

BitBake 8.38% Makefile 1.13% C 66.03% Shell 4.11% Python 11.37% C++ 1.65% PHP 4.64% Assembly 1.09% Lua 1.60%

meta-iot2000's Introduction

IOT2000 Board Support Package

This packages contains the following elements:

  • meta-iot2000-bsp
  • meta-iot2000-example

For updates, please visit https://github.com/siemens/meta-iot2000. We are also accepting issue reports, feature suggestions and patches this way.

meta-iot2000-bsp

Use this Yocto layer to enable all hardware features of the IOT2000 device. It allows to build standard Yocto images which will contain the required kernel, configurations and tools and will emit a bootable SD card image.

meta-iot2000-example

This Yocto layer builds on top of meta-iot2000-bsp, providing an exemplary image with additional tools and services to exploit features of the IOT2000 conveniently.

This layer shall only be considered as a starting point for own developments. It is not configured to provide product-grade maturity and security.

Building an Image

There are two recommended ways to build one of the provided images, may they be original or already customized: natively on a Linux machine or inside a Docker container.

Note: Before starting the build, make sure that your working directory is located on a native Linux file system such as ext4, xfs, btrfs, etc. NTFS is known to not work.

Native Build

On a compatible distribution, install the packages that Yocto 2.6 requires.

Furthermore, install the kas build tool:

$ sudo pip3 install kas

Clone the meta-iot2000 repository (or unpack an archive of it) into a work directory:

$ git clone https://github.com/siemens/meta-iot2000

Now you can build the example image like this:

$ kas build meta-iot2000/kas-example.yml

To build the BSP image instead, just specify the corresponding configuration file instead:

$ kas build meta-iot2000/kas-bsp.yml

You can also reproduce the Windows or Linux SDK this way:

$ kas build meta-iot2000/kas-sdk-windows-i586.yml
$ kas build meta-iot2000/kas-sdk-linux-x64.yml

Docker Build

Make sure Docker is installed and properly configured for your host system. You may have to switch the storage driver away from legacy aufs, see Docker documentation, if kas warns about this.

Again, the first step is cloning of the repository (or unpacking an archive):

$ git clone https://github.com/siemens/meta-iot2000

Next, install the kas-docker script like this:

$ wget https://raw.githubusercontent.com/siemens/kas/2.0/kas-docker
$ chmod a+x kas-docker

Now you can generate a desired image. The following assumes that your user has permission to use docker. Usually, this is achieved by adding the user to the docker group (which has security implications). Note that running the build as root does not work.

$ ./kas-docker build meta-iot2000/kas-example.yml

The above command disposes the build container after use, keeping downloads and build results in the current work directory.

You may want to use the container interactively:

$ ./kas-docker shell meta-iot2000/kas-example.yml

If you are building from within a proxy-restricted network, make sure the settings are available via the standard environment variables (http_proxy etc.).

Booting the Image from SD card

Under Linux, insert an unused SD card. Assuming the SD card takes device /dev/mmcblk0, use dd to copy the image to it. For example:

$ sudo dd if=build/tmp/deploy/images/iot2000/iot2000-example-image-iot2000.wic \
          of=/dev/mmcblk0 bs=4M oflag=sync

If you built the image in Docker, the .wic file will be located directly in the meta-iot2000 directory.

The example image starts with the IP 192.168.200.1 preconfigured on the first Ethernet interface. You can use ssh to connect to the system.

The BSP image does not configure the network. If you want to ssh into the system, you can use the root terminal via UART to ifconfig the IP address and use that to ssh in.

NOTE: The root password is empty and must be changed before connecting the system to an untrustworthy network.

Booting the Image from USB stick

Under Linux, insert an unused USB stick. Assuming the USB stick takes device /dev/sda, use dd to copy the image to it. For example:

$ sudo dd if=build/tmp/deploy/images/iot2000/iot2000-example-image-iot2000.wic \
          of=/dev/sda bs=4M oflag=sync

In addition, you have to change the boot config. On the first partition, navigate to the folder loader/entries, open the file boot.conf and change the following:

--- loader/entries/boot.conf.orig
+++ loader/entries/boot.conf
@@ -1,3 +1,3 @@
 title boot
 linux /bzImage
-options LABEL=Boot root=/dev/mmcblk0p2 console=ttyS1,115200n8 reboot=efi,warm rw debugshell=5 rootwait initrd=EFI/BOOT/acpi-upgrades-iot2000.cpio
+options LABEL=Boot root=/dev/sda2 console=ttyS1,115200n8 reboot=efi,warm rw debugshell=5 rootwait initrd=EFI/BOOT/acpi-upgrades-iot2000.cpio

meta-iot2000's People

Contributors

jan-kiszka avatar mschend avatar baochengsu avatar xingxinghe avatar cmhe avatar stormc avatar fbezdeka avatar saschaweisenberger avatar johnson325 avatar debevv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.