In this chapter we will see how to copy our embedded_rootfs on our embedded disk.
For this method we use the Slackware floppy disks, obviously this method works only if you have or can use a floppy drive with your embedded system. To transfer data we will use the NFS service configured as a server on your development computer.
Download the floppy images fromhttp://www.slackware.com/getslack/. Select a mirror, search for the directory rootdisks, exmaple: , ftp://ftp.unina.it/pub/linux/distributions/slackware/slackware-10.2/rootdisks , search also for bootdisks. You need to fetch these files: install.1, install.2, network.dsk, bare.i.
Open a shell, changing the current directory to the directory in which you downloaded the files above. Copy image files using the dd command:
$ dd if=install.1 of=/dev/fd0
$ dd if=install.2 of=/dev/fd0
$ dd if=network.dsk of=/dev/fd0
$ dd if=bare.i of=/dev/fd0
|
Power on the embedded, boot from the bare.i floppy, follow the instructions, insert install.1 and install.2 disks when the system asks for them.
Create the disk partitions conforming to the /etc/fstab we created before.
/dev/hda1 (~ 16 mb)
/dev/hda2 (~ 8 mb)
/dev/hda3 (the rest of the disk)
|
Create this directories on the embedded:
# mkdir /mnt/nfs
# mkdir /mnt/disk
|
Create the filesystems:
# mkfs.ext2 /dev/hda1
# mkfs.ext2 /dev/hda2
|
Mount the filesystems:
# mount /dev/hda1 /mnt/disk/
# mkdir /mnt/disk/rw
# mount /dev/hda2 /mnt/disk/rw/
|
Check that /mnt/disco/etc/lilo.conf is proper configured to match this partition layout.
boot = /dev/hda
vga = normal
image = /boot/linux-2.6.11
root = /dev/hda1
label = embedded
|
Now configure the network intarface using the command network. The system will ask you to insert the network.dsk floppy. Insert that disk an press enter. Now you need to perform the probing for the proper chipset driver. In my embedded the module to be loaded is the common 8139too. so i wrote:
p 8130too (press enter)
|
Start portmap
# /sbin/rpc.portmap
|
Mount the nfs export. On the embedded side type:
# mount -t nfs nfs_server_ip:/path/shared/dirdir /mnt/nfs
|
Copy the embedded_rootfs directory on the development server to our embedded disk, from the embedde console type:
# cp -ar /mnt/nfs/path/shared/dir/embedded_rootfs/* /mnt/disk/
|
Copy the squash /usr into the embedded
# dd if=/mnt/nfs/path/shared/dir/embedded_usr_squashfs.dump of=/dev/hda3
|
Peform a chroot and install lilo into the MBR:
# chroot /mnt/disk
# lilo
|
Unmount all on the embedded and reboot it
# umount -a
# reboot
|