요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
============================================
The Intel Assabet (SA-1110 evaluation) board
============================================
Please see:
http://developer.intel.com
Also some notes from John G Dorsey <jd5q@andrew.cmu.edu>:
http://www.cs.cmu.edu/~wearable/software/assabet.html
Building the kernel
-------------------
To build the kernel with current defaults::
make assabet_defconfig
make oldconfig
make zImage
The resulting kernel image should be available in linux/arch/arm/boot/zImage.
Installing a bootloader
-----------------------
A couple of bootloaders able to boot Linux on Assabet are available:
BLOB (http://www.lartmaker.nl/lartware/blob/)
BLOB is a bootloader used within the LART project. Some contributed
patches were merged into BLOB to add support for Assabet.
Compaq's Bootldr + John Dorsey's patch for Assabet support
(http://www.handhelds.org/Compaq/bootldr.html)
(http://www.wearablegroup.org/software/bootldr/)
Bootldr is the bootloader developed by Compaq for the iPAQ Pocket PC.
John Dorsey has produced add-on patches to add support for Assabet and
the JFFS filesystem.
RedBoot (http://sources.redhat.com/redboot/)
RedBoot is a bootloader developed by Red Hat based on the eCos RTOS
hardware abstraction layer. It supports Assabet amongst many other
hardware platforms.
RedBoot is currently the recommended choice since it's the only one to have
networking support, and is the most actively maintained.
Brief examples on how to boot Linux with RedBoot are shown below. But first
you need to have RedBoot installed in your flash memory. A known to work
precompiled RedBoot binary is available from the following location:
- ftp://ftp.netwinder.org/users/n/nico/
- ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/
- ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/
Look for redboot-assabet*.tgz. Some installation infos are provided in
redboot-assabet*.txt.
Initial RedBoot configuration
-----------------------------
The commands used here are explained in The RedBoot User's Guide available
on-line at http://sources.redhat.com/ecos/docs.html.
Please refer to it for explanations.
If you have a CF network card (my Assabet kit contained a CF+ LP-E from
Socket Communications Inc.), you should strongly consider using it for TFTP
file transfers. You must insert it before RedBoot runs since it can't detect
it dynamically.
To initialize the flash directory::
fis init -f
To initialize the non-volatile settings, like whether you want to use BOOTP or
a static IP address, etc, use this command::
fconfig -i
Writing a kernel image into flash
---------------------------------
First, the kernel image must be loaded into RAM. If you have the zImage file
available on a TFTP server::
load zImage -r -b 0x100000
If you rather want to use Y-Modem upload over the serial port::
load -m ymodem -r -b 0x100000
To write it to flash::
fis create "Linux kernel" -b 0x100000 -l 0xc0000
Booting the kernel
------------------
The kernel still requires a filesystem to boot. A ramdisk image can be loaded
as follows::
load ramdisk_image.gz -r -b 0x800000
Again, Y-Modem upload can be used instead of TFTP by replacing the file name
by '-y ymodem'.
Now the kernel can be retrieved from flash like this::
fis load "Linux kernel"
or loaded as described previously. To boot the kernel::
exec -b 0x100000 -l 0xc0000
The ramdisk image could be stored into flash as well, but there are better
solutions for on-flash filesystems as mentioned below.
Using JFFS2
-----------
Using JFFS2 (the Second Journalling Flash File System) is probably the most
convenient way to store a writable filesystem into flash. JFFS2 is used in
conjunction with the MTD layer which is responsible for low-level flash
management. More information on the Linux MTD can be found on-line at:
http://www.linux-mtd.infradead.org/. A JFFS howto with some infos about
creating JFFS/JFFS2 images is available from the same site.
For instance, a sample JFFS2 image can be retrieved from the same FTP sites
mentioned below for the precompiled RedBoot image.
To load this file::
load sample_img.jffs2 -r -b 0x100000
The result should look like::
RedBoot> load sample_img.jffs2 -r -b 0x100000
Raw file loaded 0x00100000-0x00377424
Now we must know the size of the unallocated flash::
fis free
Result::
RedBoot> fis free
0x500E0000 .. 0x503C0000
The values above may be different depending on the size of the filesystem and
the type of flash. See their usage below as an example and take care of
substituting yours appropriately.
We must determine some values::
size of unallocated flash: 0x503c0000 - 0x500e0000 = 0x2e0000
size of the filesystem image: 0x00377424 - 0x00100000 = 0x277424
We want to fit the filesystem image of course, but we also want to give it all
the remaining flash space as well. To write it::
fis unlock -f 0x500E0000 -l 0x2e0000
fis erase -f 0x500E0000 -l 0x2e0000
fis write -b 0x100000 -l 0x277424 -f 0x500E0000
fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000
Now the filesystem is associated to a MTD "partition" once Linux has discovered
what they are in the boot process. From Redboot, the 'fis list' command
displays them::
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x50000000 0x50000000 0x00020000 0x00000000
RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000
FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000
Linux kernel 0x50020000 0x00100000 0x000C0000 0x00000000
JFFS2 0x500E0000 0x500E0000 0x002E0000 0x00000000
However Linux should display something like::
SA1100 flash: probing 32-bit flash bus
SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode
Using RedBoot partition definition
Creating 5 MTD partitions on "SA1100 flash":
0x00000000-0x00020000 : "RedBoot"
0x00020000-0x000e0000 : "Linux kernel"
0x000e0000-0x003c0000 : "JFFS2"
0x003c0000-0x003e0000 : "RedBoot config"
0x003e0000-0x00400000 : "FIS directory"
What's important here is the position of the partition we are interested in,
which is the third one. Within Linux, this correspond to /dev/mtdblock2.
Therefore to boot Linux with the kernel and its root filesystem in flash, we
need this RedBoot command::
fis load "Linux kernel"
exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2"
Of course other filesystems than JFFS might be used, like cramfs for example.
You might want to boot with a root filesystem over NFS, etc. It is also
possible, and sometimes more convenient, to flash a filesystem directly from
within Linux while booted from a ramdisk or NFS. The Linux MTD repository has
many tools to deal with flash memory as well, to erase it for example. JFFS2
can then be mounted directly on a freshly erased partition and files can be
copied over directly. Etc...
RedBoot scripting
-----------------
All the commands above aren't so useful if they have to be typed in every
time the Assabet is rebooted. Therefore it's possible to automate the boot
process using RedBoot's scripting capability.
For example, I use this to boot Linux with both the kernel and the ramdisk
images retrieved from a TFTP server on the network::
RedBoot> fconfig
Run script at boot: false true
Boot script:
Enter script, terminate with empty line
>> load zImage -r -b 0x100000
>> load ramdisk_ks.gz -r -b 0x800000
>> exec -b 0x100000 -l 0xc0000
>>
Boot script timeout (1000ms resolution): 3
Use BOOTP for network configuration: true
GDB connection port: 9000
Network debug at boot time: false
Update RedBoot non-volatile configuration - are you sure (y/n)? y
Then, rebooting the Assabet is just a matter of waiting for the login prompt.
Nicolas Pitre
nico@fluxnic.net
June 12, 2001
Status of peripherals in -rmk tree (updated 14/10/2001)
-------------------------------------------------------
Assabet:
Serial ports:
Radio: TX, RX, CTS, DSR, DCD, RI
- PM: Not tested.
- COM: TX, RX, CTS, DSR, DCD, RTS, DTR, PM
- PM: Not tested.
- I2C: Implemented, not fully tested.
- L3: Fully tested, pass.
- PM: Not tested.
Video:
- LCD: Fully tested. PM
(LCD doesn't like being blanked with neponset connected)
- Video out: Not fully
Audio:
UDA1341:
- Playback: Fully tested, pass.
- Record: Implemented, not tested.
- PM: Not tested.
UCB1200:
- Audio play: Implemented, not heavily tested.
- Audio rec: Implemented, not heavily tested.
- Telco audio play: Implemented, not heavily tested.
- Telco audio rec: Implemented, not heavily tested.
- POTS control: No
- Touchscreen: Yes
- PM: Not tested.
Other:
- PCMCIA:
- LPE: Fully tested, pass.
- USB: No
- IRDA:
- SIR: Fully tested, pass.
- FIR: Fully tested, pass.
- PM: Not tested.
Neponset:
Serial ports:
- COM1,2: TX, RX, CTS, DSR, DCD, RTS, DTR
- PM: Not tested.
- USB: Implemented, not heavily tested.
- PCMCIA: Implemented, not heavily tested.
- CF: Implemented, not heavily tested.
- PM: Not tested.
More stuff can be found in the -np (Nicolas Pitre's) tree.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Intel Assabet 보드
1-11이 문서는 Intel Assabet, 즉 SA-1110 evaluation board에서 Linux를 빌드하고 부팅하는 방법을 설명합니다. John G Dorsey `<jd5q@andrew.cmu.edu>`의 추가 참고 자료도 안내합니다.
커널 빌드
12-23당시 기본 설정으로 커널을 빌드하는 명령은 다음과 같습니다.
make assabet_defconfig
make oldconfig
make zImage
결과 kernel image는 `linux/arch/arm/boot/zImage`에 생성됩니다.
bootloader 설치
24-62Assabet에서 Linux를 부팅할 수 있는 bootloader는 다음과 같습니다.
| bootloader | 특징 |
|---|---|
| BLOB | LART project에서 쓰던 bootloader이며 기여된 patch를 병합해 Assabet을 지원합니다. |
| Compaq Bootldr + John Dorsey patch | Compaq이 iPAQ Pocket PC용으로 개발한 bootloader에 Assabet과 JFFS filesystem 지원 patch를 더합니다. |
| RedBoot | Red Hat이 eCos RTOS hardware-abstraction layer를 기반으로 개발했으며 Assabet을 포함한 여러 platform을 지원합니다. |
- http://www.lartmaker.nl/lartware/blob/
http://www.lartmaker.nl/lartware/blob/ - http://www.handhelds.org/Compaq/bootldr.html
http://www.handhelds.org/Compaq/bootldr.html - http://www.wearablegroup.org/software/bootldr/
http://www.wearablegroup.org/software/bootldr/ - http://sources.redhat.com/redboot/
http://sources.redhat.com/redboot/
당시에는 RedBoot만 networking을 지원하고 가장 활발히 유지보수되었으므로 권장 선택이었습니다. 뒤의 절은 flash memory에 RedBoot가 이미 설치되어 있다고 가정하고 Linux 부팅 예를 보여 줍니다.
검증된 precompiled RedBoot binary는 아래 FTP 위치에서 `redboot-assabet*.tgz`를 찾아 받을 수 있으며 설치 정보는 `redboot-assabet*.txt`에 있습니다.
초기 RedBoot 구성
63-84사용 명령은 온라인 RedBoot User's Guide에 설명되어 있습니다.
CF network card를 사용할 수 있다면 TFTP 전송에 쓰는 것이 좋습니다. 문서의 Assabet kit에는 Socket Communications Inc.의 CF+ LP-E가 들어 있었습니다. RedBoot는 card를 동적으로 감지하지 못하므로 실행 전에 삽입해야 합니다.
flash directory를 초기화합니다.
fis init -f
BOOTP 사용 여부나 static IP address 같은 non-volatile 설정을 초기화합니다.
fconfig -i
kernel image를 flash에 기록
85-101먼저 kernel image를 RAM으로 읽어야 합니다. TFTP server에 `zImage`가 있다면 다음 명령을 사용합니다.
load zImage -r -b 0x100000
serial port의 Y-Modem upload를 사용하려면 다음과 같이 합니다.
load -m ymodem -r -b 0x100000
RAM에 올린 image를 flash에 기록합니다.
fis create "Linux kernel" -b 0x100000 -l 0xc0000
커널 부팅
102-124커널을 부팅하려면 filesystem도 필요합니다. ramdisk image는 다음과 같이 RAM에 읽습니다.
load ramdisk_image.gz -r -b 0x800000
TFTP 대신 Y-Modem을 쓰려면 파일 이름을 `-y ymodem`으로 바꿀 수 있습니다. flash에 저장한 kernel은 다음 명령으로 가져옵니다.
fis load "Linux kernel"
kernel을 실행합니다.
exec -b 0x100000 -l 0xc0000
ramdisk image도 flash에 저장할 수 있지만, 뒤에서 설명하는 on-flash filesystem이 더 나은 해법입니다.
JFFS2 사용
125-213JFFS2(Second Journalling Flash File System)는 writable filesystem을 flash에 저장하는 가장 편리한 방법일 수 있습니다. JFFS2는 low-level flash 관리를 담당하는 MTD 계층과 함께 사용합니다. Linux MTD 사이트에는 JFFS/JFFS2 image 생성 방법도 있습니다.
예제 JFFS2 image는 앞서 precompiled RedBoot image를 제공한 FTP site에서 받을 수 있습니다. image를 RAM에 읽습니다.
load sample_img.jffs2 -r -b 0x100000
성공한 load 결과의 주소 범위는 다음과 같습니다.
RedBoot> load sample_img.jffs2 -r -b 0x100000
Raw file loaded 0x00100000-0x00377424
할당되지 않은 flash 범위를 확인합니다.
fis free
예제 결과는 다음과 같습니다.
RedBoot> fis free
0x500E0000 .. 0x503C0000
filesystem 크기와 flash 종류에 따라 주소와 크기는 달라질 수 있습니다. 아래 값은 예일 뿐이므로 자신의 결과로 정확히 바꿔야 합니다.
예제에서 필요한 크기를 계산합니다.
size of unallocated flash: 0x503c0000 - 0x500e0000 = 0x2e0000
size of the filesystem image: 0x00377424 - 0x00100000 = 0x277424
filesystem image를 담으면서 남은 flash 공간 전체를 partition에 주기 위해 해당 영역을 unlock하고 erase한 뒤 image를 기록하고 `JFFS2` FIS entry를 만듭니다.
fis unlock -f 0x500E0000 -l 0x2e0000
fis erase -f 0x500E0000 -l 0x2e0000
fis write -b 0x100000 -l 0x277424 -f 0x500E0000
fis create "JFFS2" -n -f 0x500E0000 -l 0x2e0000
Linux가 부팅 과정에서 flash partition을 발견하면 filesystem은 MTD partition과 연결됩니다. RedBoot의 `fis list` 결과는 다음과 같습니다.
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x50000000 0x50000000 0x00020000 0x00000000
RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000
FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000
Linux kernel 0x50020000 0x00100000 0x000C0000 0x00000000
JFFS2 0x500E0000 0x500E0000 0x002E0000 0x00000000
Linux에서는 같은 partition이 다음처럼 표시되어야 합니다.
SA1100 flash: probing 32-bit flash bus
SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode
Using RedBoot partition definition
Creating 5 MTD partitions on "SA1100 flash":
0x00000000-0x00020000 : "RedBoot"
0x00020000-0x000e0000 : "Linux kernel"
0x000e0000-0x003c0000 : "JFFS2"
0x003c0000-0x003e0000 : "RedBoot config"
0x003e0000-0x00400000 : "FIS directory"
관심 있는 JFFS2 partition은 세 번째이며 Linux에서는 `/dev/mtdblock2`에 대응합니다. kernel과 root filesystem을 모두 flash에서 부팅하는 RedBoot 명령은 다음과 같습니다.
fis load "Linux kernel"
exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2"
JFFS 외에도 cramfs 같은 filesystem을 사용할 수 있고 NFS root로 부팅할 수도 있습니다. ramdisk나 NFS로 부팅한 Linux 안에서 filesystem을 직접 flash하는 방법이 더 편할 때도 있습니다. Linux MTD repository는 erase를 비롯한 flash 도구를 제공하며, 새로 지운 partition에 JFFS2를 직접 mount해 파일을 복사할 수도 있습니다.
RedBoot scripting
214-247Assabet을 재부팅할 때마다 앞의 명령을 직접 입력하지 않도록 RedBoot의 scripting 기능으로 부팅을 자동화할 수 있습니다. 다음 예는 network TFTP server에서 kernel과 ramdisk image를 모두 읽어 부팅하도록 `fconfig` script를 설정합니다.
RedBoot> fconfig
Run script at boot: false true
Boot script:
Enter script, terminate with empty line
>> load zImage -r -b 0x100000
>> load ramdisk_ks.gz -r -b 0x800000
>> exec -b 0x100000 -l 0xc0000
>>
Boot script timeout (1000ms resolution): 3
Use BOOTP for network configuration: true
GDB connection port: 9000
Network debug at boot time: false
Update RedBoot non-volatile configuration - are you sure (y/n)? y
설정 뒤에는 Assabet을 재부팅하고 login prompt가 나타나기를 기다리면 됩니다.
이 절의 작성자는 Nicolas Pitre `<nico@fluxnic.net>`이며 날짜는 June 12, 2001입니다.
-rmk tree 주변장치 상태
248-301다음 상태는 원문 표기 `14/10/2001`(2001-10-14)에 갱신된 -rmk tree 기준입니다. `PM`은 power management 시험 상태를 뜻합니다.
| 보드 | 영역 | 장치·기능 | 상태 또는 신호 |
|---|---|---|---|
| Assabet | Serial | Radio | TX, RX, CTS, DSR, DCD, RI |
| Assabet | Serial | Radio PM | Not tested |
| Assabet | Serial | COM | TX, RX, CTS, DSR, DCD, RTS, DTR, PM |
| Assabet | Serial | COM PM | Not tested |
| Assabet | Serial | I2C | Implemented, not fully tested |
| Assabet | Serial | L3 | Fully tested, pass |
| Assabet | Serial | L3 PM | Not tested |
| Assabet | Video | LCD | Fully tested, PM |
| Assabet | Video | LCD note | Neponset 연결 시 blanking을 좋아하지 않음 |
| Assabet | Video | Video out | Not fully |
| Assabet | UDA1341 | Playback | Fully tested, pass |
| Assabet | UDA1341 | Record | Implemented, not tested |
| Assabet | UDA1341 | PM | Not tested |
| Assabet | UCB1200 | Audio play | Implemented, not heavily tested |
| Assabet | UCB1200 | Audio rec | Implemented, not heavily tested |
| Assabet | UCB1200 | Telco audio play | Implemented, not heavily tested |
| Assabet | UCB1200 | Telco audio rec | Implemented, not heavily tested |
| Assabet | UCB1200 | POTS control | No |
| Assabet | UCB1200 | Touchscreen | Yes |
| Assabet | UCB1200 | PM | Not tested |
| Assabet | PCMCIA | LPE | Fully tested, pass |
| Assabet | Other | USB | No |
| Assabet | IRDA | SIR | Fully tested, pass |
| Assabet | IRDA | FIR | Fully tested, pass |
| Assabet | IRDA | PM | Not tested |
| Neponset | Serial | COM1,2 | TX, RX, CTS, DSR, DCD, RTS, DTR |
| Neponset | Serial | PM | Not tested |
| Neponset | Other | USB | Implemented, not heavily tested |
| Neponset | Other | PCMCIA | Implemented, not heavily tested |
| Neponset | Other | CF | Implemented, not heavily tested |
| Neponset | Other | PM | Not tested |
추가 내용은 Nicolas Pitre의 `-np` tree에서 찾을 수 있습니다.
요약과 해설
assabet.rst:1-301이 문서는 2001년 무렵 Assabet 개발 절차를 기록한 역사적 자료입니다. 핵심 흐름은 `assabet_defconfig`로 `zImage`를 만든 뒤 RedBoot가 image를 RAM에 읽고 FIS directory를 통해 flash에 배치하며, kernel 실행 시 ramdisk 또는 MTD의 JFFS2 partition을 root filesystem으로 넘기는 것입니다.
예제 주소와 크기는 특정 flash 배치의 결과이므로 그대로 복사하면 안 됩니다. `fis free`, load 결과, partition 순서를 자신의 장치에서 확인하고 계산해야 하며, CF network card는 RedBoot 시작 전에 삽입해야 합니다.
kernel과 filesystem image가 host에서 RAM, flash partition, Linux root로 이어지는 경로입니다.