FPGARM4U rfs

From Fpga4u

Jump to: navigation, search

Root FileSystem

Prepare the Root FileSystem

Download the packages for a basic Root File System from the Debian repository

# debootstrap --verbose --foreign --arch arm etch ./FPGARM4U_rfs_etch   http://ftp.at.debian.org/debian

Create two character devices needed for the boot process

# mknod ./FPGARM4U_rfs_etch/dev/console c 5 1
# mknod ./FPGARM4U_rfs_etch/dev/ttyS0 c 4 64

Compress the whole file system

# tar cpvzf FPGARM4U_rfs_etch.tgz ./FPGARM4U_rfs_etch/

Clean an USB disk which will be used to store the rfs

# dd if=/dev/zero of=/dev/<sdg> bs=4M

Create a partition in the USB disk

# cfdisk /dev/sdg

select: primary, type=83, bootable

Format the partition as Ext2 file system

# mkfs.ext2 /dev/sdg1

Untar the compressed rfs in the new partition

#

Add configuration files

# ...


Boot the first time the system specifying the "init" command in the Linux Kernel command line:

mem=64M console=ttyS0,115200 root=/dev/sda1 rw rootdelay=15 init=/bin/bash

(the Linux Kernel command line is setup in the U-Boot environment)

when the system is bootedt, install the following Debian Packages in this (correct) order:

# ...<installFPGARM4U.sh>

set the root password

# passwd

Then remove the "init" specification in the Linux Kernel command line:

mem=64M console=ttyS0,115200 root=/dev/sda1 rw rootdelay=15

(the Linux Kernel command line is setup in the U-Boot environment)

now you get a full Root FileSystem. Reboot and ... enjoy the Login prompt :-)

Restore the Root FileSystem

Create a partition in the USB disk

# cfdisk /dev/sdg

primary, type=83, bootable

If you have a ready image file, you can directly write the binary file on the USB disk

# dd if=/FPGARM4U_rfs.img of=/dev/<sdg1>

Correct the errors on the image file.

# fsck.ext2 /dev/<sdg1>

Reboot.

Personal tools