Embedded-linux - Riptutorial

1y ago
8 Views
2 Downloads
839.58 KB
8 Pages
Last View : 8d ago
Last Download : 3m ago
Upload by : Karl Gosselin
Transcription

embedded-linux #embedded -linux

Table of Contents About 1 Chapter 1: Getting started with embedded-linux 2 Remarks 2 Examples 2 Installation or Setup Credits 2 6

About You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: embedded-linux It is an unofficial and free embedded-linux ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official embedded-linux. The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners. Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to info@zzzprojects.com https://riptutorial.com/ 1

Chapter 1: Getting started with embeddedlinux Remarks This section provides an overview of what embedded-linux is, and why a developer might want to use it. It should also mention any large subjects within embedded-linux, and link out to the related topics. Since the Documentation for embedded-linux is new, you may need to create initial versions of those related topics. Examples Installation or Setup Detailed instructions on getting embedded-linux set up or installed. ARM Versatile Express Emulation On Qemu Environment Introduction: Host ubuntu :- 12.04 Linux kernel version: linux-4.4 busybox version: 1.24.0 Cross compiler tool chain: x gnu.tar.bz2 qemu version: qemu-2.5 Download and Installation of QEMU: mkdir Source Code cd Source Code git clone git://git.qemu-project.org/qemu.git cd qemu git checkout remotes/origin/stable-2.5 -b stable-2.5 cd ././ mkdir -p Binary images/Qemu Bin cd Qemu src/qemu cd Source Code/qemu ./configure --target-list arm-softmmu --prefix /Path/to/your/Binary images/Qemu Bin make make install ARM Cross Compiler Tool chain installation: https://riptutorial.com/ 2

Download Source code: http://sourcery.mentor.com/public/gnu toolchain/arm-none-linux-gnueabi/ Download – x-gnu.tar.bz2 mkdir -p Binary images/ARM Cross Tools cd Binary images/ARM Cross Tools tar xvf x-gnu.tar.bz2 Download Linux kernel source code : # cd Source Code git clone https://github.com/torvalds/linux cd linux Switch to version v4.4 git checkout v4.4 Prepare for compilation: Load default config for target board i.e vexpress defconfig. make ARCH arm CROSS COMPILE /path/to/your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- vexpress defconfig Adjust or enable some settings as of now not required in future it might required. make ARCH arm CROSS COMPILE path to your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- menuconfig Compile the kernel make ARCH arm CROSS COMPILE /path/to/your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- all Verify qemu and kernel can run successfully: /Binary images/Qemu Bin/qemu-system-arm -M vexpress-a9 -m 512M -dtb ./arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel ./arch/arm/boot/zImage -append “console ttyAMA0” -serial stdio Compiling Busybox for ARM on QEMU : Download Busybox from https://busybox.net/downloads/ cd busybox make ARCH arm CROSS COMPILE /path/to/your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- defconfig Enable or disable some settings as mentioned below make ARCH arm CROSS COMPILE /path/to/your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- menuconfig https://riptutorial.com/ 3

Busybox Settings — Build Options — [*] Build BusyBox as a static binary (no shared libs) make ARCH arm CROSS COMPILE /path/to/your/Binary images/ARM Cross Tools/arm-2014.05/bin/armnone-linux-gnueabi- install The above command builds Busybox and creates a directory called install containing the root filesystem tree. Next, you need to create folder for mounting Virtual file systems like proc, sys and init scripts. mkdir mkdir mkdir mkdir mkdir mkdir mkdir -p -p -p -p -p -p -p install/proc/ install/sys/ install/tmp/ install/root/ install/var/ install/mnt/ install/etc/init.d/ Create a file name rcS inside folder install/etc/init.d/ and edit rcS file with below content #!/bin/sh PATH /sbin:/bin:/usr/sbin:/usr/bin runlevel S prevlevel N umask 022 export PATH runlevel prevlevel mount -a echo /sbin/mdev /proc/sys/kernel/hotplug mdev -s Create a file name inittab inside install/etc/ and edit it with below content. # /etc/inittab ::sysinit:/etc/init.d/rcS console::askfirst:-/bin/sh ::ctrlaltdel:/sbin/reboot ::shutdown:/bin/umount -a -r ::restart:/sbin/init Download and copy fstab file to /etc/. folder in rootfs wget clone https://github.com/mahadevvinay/Embedded Stuff/tree/master/Embedded Linux Virtual Setup/fstab Create ext3 image file and Copy all the files in our install folder to image: dd if /dev/zero of RootFS.ext3 bs 1M count ((32)) sudo mkfs.ext3 RootFS.ext3 mkdir tmpfs sudo mount -t ext3 RootFS.ext3 tmpfs/ -o loop sudo cp -r install/* tmpfs/. sudo umount tmpfs https://riptutorial.com/ 4

The complete command is to emulate: /Qemu /Binary images/Qemu Bin/bin/qemu-system-arm -M vexpress-a9 -dtb path to your linux folder/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel path to your linux folder/arch/arm/boot/zImage -append root /dev/mmcblk0 console ttyAMA0 -sd path to your busybox-1.24.0/RootFS.ext3 -serial stdio The above setup is for Qemu, same procedure can be used to setup any Embedded Target. Read Getting started with embedded-linux online: etting-started-with-embedded-linux https://riptutorial.com/ 5

Credits S. No Chapters Contributors 1 Getting started with embedded-linux Community, Thiru Shetty, vinay hunachyal https://riptutorial.com/ 6

Chapter 1: Getting started with embedded-linux Remarks This section provides an overview of what embedded-linux is, and why a developer might want to use it. It should also mention any large subjects within embedded-linux, and link out to the related topics. Since the Documentation for embedded-linux is new, you may need to create initial .

Related Documents:

Linux in a Nutshell Linux Network Administrator’s Guide Linux Pocket Guide Linux Security Cookbook Linux Server Hacks Linux Server Security Running Linux SELinux Understanding Linux Network Internals Linux Books Resource Center linux.oreilly.comis a complete catalog of O’Reilly’s books on Linux and Unix and related technologies .

Other Linux resources from O’Reilly Related titles Building Embedded Linux Systems Linux Device Drivers Linux in a Nutshell Linux Pocket Guide Running Linux Understanding Linux Network Internals Understanding the Linux Kernel Linux Books Resource Center linu

Perfection PC Perfection PC Inc. Philips Philips Electronics Planar Planar Systems Inc PLEXON Plexon, Inc. Pogo Linux Pogo Linux, Inc. Pogo Linux Altura M2 Pogo Linux, Inc. Pogo Linux Velocity -D50 Pogo Linux, Inc. Pogo Linux Verona 330 Pogo Linux, Inc. Pogo Linux Vor

The Linux BSP release is composed of three packages: documentation, sources and binaries. Package Name Contents linux-socfpga-13.02 -src.bsx Source code (self extracting) linux-socfpga-13.02 -bin.tar.gz Binaries Embedded Linux Getting Started Guide (this doc) Documentation Linux BSP User Manual - 13.02.pdf Linux BSP Release Notes

Thomas Petazzoni I CTO and Embedded Linux engineer at Free Electrons I Embedded Linux development: kernel and driver development, system integration, boot time and power consumption optimization, consulting, etc. I Embedded Linux training, Linux driver development training and Android system development training, with materialsFile Size: 1MB

Yes. Oracle Autonomous Linux, which is based on Oracle Linux, is 100% application binary compatible with IBM's Red Hat Enterprise Linux. This means that applications certified to run on Red Hat Enterprise Linux can run on Oracle Autonomous Linux unmodified. Oracle Linux binaries are provided for patching and updating Red Hat Enterprise Linux

Official Kali Linux Documentation This PDF has been autogenerated on docs.kali.org - Apr 7, 2013 00. Introduction to Kali Linux What is Kali Linux ? Kali Linux is an advanced Penetration Testing and Security Auditing Linux distribution. Kali Linux Features Kali is a complete re-build of BackTrack Linux, adhering completely to Debian development .

vi 6 4kÚezpÜhªÔ ã 15 7 4kÚeypã[njªÔ ã 16 h p 8Ù it hcÕ ã hÔ Ý 1 zià[ yj³Ý 17 2 zetãp[njÝ 17 3 4 Üyh³Ý p[njÝ 18