Embedded Linux development: Assorted words

Source: Internet
Author: User

1. Compiler: Commonly used has Sourcery,linaro and so on. Of course, the chip manufacturers will generally also provide the available compilers.

2. Configure and compile the output o to another location: Make O=some_dir

The advantage of doing this is to keep the source tree clean.

Note: The O option must be given in each make command:

Make Gconfig o= ...

Make Arch=arm cross_compile= ... O= ...

3. Multi-process Parallel compilation: Make J=n,n is the number of concurrent processes.

4. Devicetree position (take arm as an example): arch/arm/boot/dts/

5. disk image file Analysis

Winhex can be used under windows;

Linux can be loaded with Losetup disk image to loopback device (/DEV/LOOPX)

Then use the parted tool to analyze the partition on the loopback device.

Continue to load image by partition with Losetup after obtaining partition information

You can then mount the loopback partition with mount.

6. EASYBCD Installing CentOS

We need a FAT32 partition to copy the ISO to the FAT32 partition;

Extracting images/and isolinux/from ISO;

Use EASYBCD to add Grub Startup items and start from them;

Root (HDX, y)

Kernel (hdx,y)/isolinux/vmlinuz

INITRD (hdx,y)/isolinux/initrd.img

Boot

7. The compiled uboot (including SPL) may need to be converted to an image before it can be written to flash. Conversion Tools General Factory Chamber of Commerce offers

8.64-bit CentOS may require additional 32-bit LIB to make Gconfig/xconfig

9. Vncserver If the bad display name is reported, add our hostname in/etc/hosts

TFTP of BusyBox.

Tftp-g-r file host #get remote

Tftp-p-L file host #put Local

NFS configuration file (man)

/home/user Ip/mask (insecure,rw,sync,all_squash,anonuid=0,anongid=0)

The root of TFTP server is specified in/etc/xinetd.d/tftp with the-s parameter

Generally in/var/lib/tftpboot

Driver's makefile: see Documentation/kbuild

Compilation of DTS

Execution directory [Arch/arm/boot]

# SCRIPTS/DTC/DTC Dts/xxx.dts-o xxx.dtb-o DTB #-o filename-o format

15. After compiling, you can see the kernel symbol table and kernel in memory position in System.map.

Cat/proc/iomem can see the memory layout

Uboot Board Config:

Include/configs/xxx.h

Autoconf.mk #在make后生成

18. The initramfs+ static dev test can be used first kernel

/dev Directory decentralized console,tty[0-4],ttys[0-4].

Use--static to compile a program that prints a message as/bin/init

19. Static Dev and simple init test pass and then use DEVTMPFS

Kgdb.

See documentation/docbook,kgdb need to start parameters

(DocBook need make htmldocs, install Xmlto beforehand)

Down to the board or uimage,vmlinux is the debug file for GdB (compiled with the-G option)

Minicom-s configuration serial port, clear modem initialization sequence

C-aq Exit Minicom

Arm-linux-xxx-gdb Vmlinux

(GDB) Set Remotebaud 38400

(GDB) Target Remote/dev/ttyusb0 # Assume that your host is connected to the Development Board via TtyUSB0

21. You cannot mount the DEVTMPFS automatically when using INITRAMFS, you need to mount it manually:

Mount Devtmpfs/dev-t Devtmpfs

Mtd_utils:

Flash_erase-j/DEV/MTD1 0 0 #格式化为jffs, using raw dev

Mount/dev/mtdblock1/mnt/mtdblock1-t jffs2 #使用block Dev

There are some other flash_xxx tools

23. Generally the more popular board in the kernel will have defconfig, for example

Make Arch=arm Socfpga_defconfig

Available Defconfig in arch/arm/configs/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.