# umount /dev/sdc1


# git clone http://daniel-baumann.ch/git/software/dosfstools.git

# cd dosfstools


# make

cc -O2 -fomit-frame-pointer -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -g   -c -o fatlabel.o src/fatlabel.c

.

.

.

cc   mkfs.fat.o   -o mkfs.fat

# ./fsck.fat -V /dev/sdc1

fsck.fat 3.0.24 (2013-11-23)

0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.

1) Remove dirty bit

2) No action

? 1

Starting check/repair pass.

Starting verification pass.

Leaving filesystem unchanged.

/dev/sdc1: 14 files, 2383/7161 clusters


./fsck.fat -a /dev/sdc1



dosfstools.tar.gz


'Embedded Linux' 카테고리의 다른 글

CodeViser의 S3C6410 Interface 설정  (0) 2014.11.18
Semaphore을 이용한 동기화 (binary semaphore)  (0) 2014.08.22
동기화 Mutex  (0) 2014.08.22
기본적인 pthread 사용법 정리  (0) 2014.08.22
Wireless Tools for Linux  (0) 2014.07.07
Posted by 깍수
,

Frankly speaking, you cannot create a Linux partition larger than 2 TB using the fdisk command. The fdisk won't create partitions larger than 2 TB. This is fine for desktop and laptop users, but on server you need a large partition. 

To solve this problem use GNU parted command with GPT. It supports Intel EFI/GPT partition tables. Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. It is a part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the outdated PC BIOS, one of the few remaining relics of the original IBM PC. EFI uses GPT where BIOS uses a Master Boot Record (MBR).

Linux GPT Kernel Support

File Systems

    Partition Types

        [*] Advanced partition selection

        [*] EFI GUID Partition support (NEW)

.... 


Set Partition Table to GPT using Parted mklabel

In our case, we need to create a partition >2TB. So, we should use parted command.
Before creating the partition command, we should set the disk label to GPT.
GPT stands for GUID partition table format (GPT).

Use parted’s mklabel command to set disk label to GPT as shown below.

# parted /dev/sdb

GNU Parted 2.1

Using /dev/sdb

Welcome to GNU Parted! Type 'help' to view a list of commands.


(parted) mklabel gpt

Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?

Yes/No? yes

(parted)


- 파티션 생성

mkpart 명령을 사용하며 형식은 mkpart <Label> <Start> <End>

(parted) mkpart system 66 1090 


생성된 원하는 파일 시스템을 적용하여 사용하면된다.(ext4, vfat 생성)

#mkfs.ext4 /dev/sdc2 -L system

#mkfs.vfat -F 32 /dev/sdc1 -n media

#sync 


Posted by 깍수
,

아래 사이트를 참조하여 해당 유틸을 컴파일 하여 Target board의 sbin, lib 디렉토리에 유틸과 Library를 복사 한다.

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html


첨부된 코드를 압축을 풀고 Makefile을 아래와 같이 자신의 툴체인에 맞게 수정한다

## Compiler to use (modify this for cross compile).

CC = arm-none-linux-gnueabi-gcc

## Other tools you need to modify for cross compile (static lib only).

AR = arm-none-linux-gnueabi-ar

RANLIB = arm-none-linux-gnueabi-ranlib

  • iwconfig manipulate the basic wireless parameters
  • iwlist allow to initiate scanning and list frequencies, bit-rates, encryption keys...
  • iwspy allow to get per node link quality
  • iwpriv allow to manipulate the Wireless Extensions specific to a driver (private)
  • ifrename allow to name interfaces based on various static criteria


Posted by 깍수
,

클립 보드 사용하기


복사하고 싶은 내용을 블럭을 씌운다음 

Ctrl + Insert : 복사

Shift + Delete : 잘라내기

Shift + Insert : 붙여넣기

'Embedded Linux > Tip' 카테고리의 다른 글

시간 측정 방법  (0) 2014.08.26
dpkg를 이용한 package 정보를 알고 싶을 때  (0) 2014.08.14
Target board에 대한 Toolchain 선택  (1) 2013.12.04
Posted by 깍수
,

* 표현 형식

x/[범위][형식][단위] [메모리 주소 or 함수명]


- 형식

x : 16진수, u : 부호 없는 10진수, d : 10진수, o : 8진수, t : 2진수


- 범위

기본적으로 4Bytes 단위


- 단위

b : 1byte, h : 2byte, w : 4byte, g : 8byte


예) 0x40018010 번지의 값을 16진수로 읽을 경우

(gdb) x/2xw 0x40018010

0x40018010 :    0x00000008    0x000001aa        <= 결과

Posted by 깍수
,

android나 Linux를 컴파일 할경우 가장 많이 사용하는 툴체인은 아마도 GCC를 사용할 것이다.

필자의 경우 CodeSourcery사의 툴체인을 사용한다. gcc version 4.4.1 (Sourcery G++ Lite 2010q1-188)


eabi 버젼을 사용하고 있다. 이 버젼의 툴체인을 사용하여 target 보드에서 테스트하려고 코드를 컴파일 하면

아래와 같은 에러 메세지를 확인할 수 있다.


Target(ARM) board에서 코드를 컴파일하여 테스트할 경우 linux-gnueabi를 사용하면 정상적으로 컴파일 되고

보드에 올려서 그 결과를 확인할 수 있다.

'Embedded Linux > Tip' 카테고리의 다른 글

시간 측정 방법  (0) 2014.08.26
dpkg를 이용한 package 정보를 알고 싶을 때  (0) 2014.08.14
[vim] Copy&Paste  (0) 2014.04.23
Posted by 깍수
,