tag:blogger.com,1999:blog-20931246168655762172024-02-20T18:34:59.419-08:00Write EnabledAnonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-2093124616865576217.post-67738193353426180442012-07-01T15:57:00.001-07:002012-07-01T15:57:49.454-07:00Getting Fedora-17 ARM images to understand booting LVM volumesIn order to get your uInitrd to understand booting from a LVM volume, you need to regenerate the initramfs and uInitrd images with the LVM bits. To do so, follow these steps (substitute your versions as necessary):<br />
<ol>
<li>Install LVM (yum -y install lvm2)</li>
<li>Update initramfs image (in /boot run dracut -f initramfs-3.3.6-3.fc17.armv5tel.kirkwood.img 3.3.6-3.fc17.armv5tel.k<br />irkwood)</li>
<li>Update uInitrd image (in /boot/uboot run mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/ini<br />tramfs-3.3.6-3.fc17.armv5tel.kirkwood.img uInitrd-kirkwood)</li>
</ol>
So now you're wondering how to do this if you don't already have a running system? Well, in theory you can run dracut and mkimage from a host system, but I've been unsuccessful getting a working image that way. So to create my bootstrap uInitrd, I built a throwaway system, then used uInitrd to boot my LVM enabled system. <br />
<br />
The easiest approach would be to do the above steps, the move the boot media to a another computer, and copy the root filesystem to a temporary file, delete the partition with the root filesystem, and add it to a volume group (as a PV) and create a LV and copy the root filesystem back. It sounds complicated but it's not.Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-12528855796354783852012-07-01T15:31:00.000-07:002012-07-01T15:49:55.353-07:00GuruPlug booting from MMCBack in 2010, <a href="http://write-enabled.blogspot.com/2010/09/guruplug-plus-gets-new-os.html">I wrote how to put Fedora 12 on a GuruPlug</a>. Now in 2012, I find myself wanting a more modern operating system. Knowing that a Fedora 17 image is available, I want to prepare my GuruPlug to boot Fedora 17. One goal that I didn't achieve last time was to boot using an initrd so that I could have LVM volume management (and presumably encryption) of the root filesystem. At the time, the uboot code to support loading an image from MMC was not yet available, so instead I opted to use the GuruPlug flash for the kernel (using a non-Fedora kernel) and boot directly to the partitioned ext3 formatted root.<br />
<br />
I was having to use a non-Fedora kernel which was less than optimal. Also, having the kernel in nand made it harder to update. If we have it on the micro SD card, its easy to update using standard update utilities (yum). <br />
<br />
Now the uboot image is available, and we can load both uImage and uInitrd from MMC, so I'm going to do some upgrades.<br />
<br />
First item is to get that updated uboot code loaded. Again, we are lucky that someone else had done the work of compiling for us. <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html">On this page</a>, you can download the updated uboot 2011.12 (Jan 08 2012) image (<a href="http://people.debian.org/%7Etbm/u-boot/2011.12-2/guruplug/u-boot.kwb">u-boot.kwb</a>). In my previous explanation of upgrading, I explained tftp loading of the images. This time, I'm going to use a usb stick. Newer uboots seem much less finicky.<br />
<br />
Be sure and printenv a copy of your environment as you will lose all these settings on upgrade. <br />
<br />
<blockquote class="tr_bq" style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: xx-small;">U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41) <b> </b> <br />Marvell-GuruPlug <br /> <br />SoC: Kirkwood 88F6281_A0 <br />DRAM: 512 MB <br />NAND: 512 MiB <br />In: serial <br />Out: serial <br />Err: serial <br />Net: egiga0, egiga1 <br />88E1121 Initialized on egiga0 <br />88E1121 Initialized on egiga1 <br />Hit any key to stop autoboot: 0 <br /><br />Marvell>> printenv <br />bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000<br />bootdelay=3 <br />baudrate=115200 <br />x_bootcmd_usb=usb start <br />x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000 <br />x_bootargs=console=ttyS0,115200 <br />ethact=egiga0 <br />ethaddr=01:02:03:04:05:06 <br />eth1addr=01:02:03:04:05:07 <br />x_bootargs_root=ubi.mtd=2 root=0811 rootdelay=10 <br />stdin=serial <br />stdout=serial <br />stderr=serial <br /> <br />Environment size: 412/131068 bytes <br /> </span><br />
<span style="font-size: x-small;"><span style="font-size: xx-small;">Marvell>> usb start <br />(Re)start USB... <br />USB: Register 10011 NbrPorts 1 <br />USB EHCI 1.00 <br />scanning bus for devices... 3 USB Device(s) found <br /> scanning bus for storage devices... Device NOT ready <br /> Request Sense returned 02 3A 00 <br />1 Storage Device(s) found <br /><br />Marvell>> usb part <br />## Unknown partition table <br /> <br /> <br />Partition Map for USB <b>device 1</b> -- Partition Type: DOS <br /> <br /><b>Partition</b> Start Sector Num Sectors Type <br /> <b>1</b> 63 15794113 c <br /> <br />## Unknown partition table <br /> <br />## Unknown partition table <br /> <br />## Unknown partition table <br />Marvell>> fatload usb <b>1:1</b> 0x0800000 u-boot.kwb <br />reading u-boot.kwb <br />...................... <br /> <br />227200 bytes read <br />Marvell>> nand erase 0x0 0x60000 <br /> <br />NAND erase: device 0 offset 0x0, size 0x60000 <br />Erasing at 0x40000 -- 100% complete. <br />OK <br />Marvell>> nand write 0x0800000 0x0 0x60000 <br /> <br />NAND write: device 0 offset 0x0, size 0x60000 <br /> 393216 bytes written: OK <br />Marvell>> reset <br />resetting ... <br /> <br /> <br /><b>U-Boot 2011.12 (Jan 08 2012 - 21:46:50) </b> <br />Marvell-GuruPlug <br /> <br />SoC: Kirkwood 88F6281_A0 <br />DRAM: 512 MiB <br />WARNING: Caches not enabled <br />NAND: 512 MiB <br /><b>*** Warning - bad CRC, using default environment </b> <br /> <br />In: serial <br />Out: serial <br />Err: serial <br />Net: egiga0, egiga1 <br />88E1121 Initialized on egiga0 <br />88E1121 Initialized on egiga1 <br />Hit any key to stop autoboot: 0 <br />Marvell>> </span> </span></blockquote>
<br />
Note that I searched for partitions and uboot told me that my USB FAT filesystem was on USB (for GuruPlug MMC appears as USB) device 1, parition 1, or 1:1.<br />
<br />
Now we need to fix the environment that was lost. <br />
<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">Marvell>> setenv ethaddr 01:02:03:04:05:06 </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> setenv eth1addr 01:02:03:04:05:07 </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> setenv x_bootcmd_usb 'usb start' </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> setenv x_bootcmd_kernel 'nand read.e 0x6400000 0x100000 0x400000' </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> setenv x_bootargs_root 'root=ubi.mtd=2 root=0811 rootdelay=10' </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> setenv bootcmd '${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000' </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"> saveenv </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Saving Environment to NAND... </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Erasing Nand... </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Erasing at 0x60000 -- 100% complete. </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Writing to Nand... done </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Marvell</span></span><span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">>></span></span></blockquote>
<br />
That gets you back to where you were, but with the updated uboot. If you want to go ahead and update to Fedora 17, you can then download the Kirkwood ARM image, copy it to a micro SD card, and then boot it by changing these variables:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace; font-size: xx-small;">bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10<br />bootcmd=run x_bootcmd_usb; ${x_bootcmd_uimage}; ${x_bootcmd_uinitrd}; setenv bo}<br />x_boot_mem=bootm 0x00800000 0x01100000 <br />x_bootargs=console=ttyS0,115200 <br />x_bootargs_root=root=LABEL=rootfs rootdelay=10 <br />x_bootcmd_ethernet=ping 192.168.2.1 <br />x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000 <br />x_bootcmd_uimage=fatload usb 1:1 0x00800000 uImage-kirkwood <br />x_bootcmd_uinitrd=fatload usb 1:1 0x01100000 uInitrd-kirkwood<br />x_bootcmd_usb=usb start; usb tree; usb part; fatinfo usb 1; fatls usb 1 </span> </blockquote>
<br />
Then your boot will look something like this:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace; font-size: xx-small;"> U-Boot 2011.12 (Jan 08 2012 - 21:46:50) <br />Marvell-GuruPlug <br /> <br />SoC: Kirkwood 88F6281_A0 <br />DRAM: 512 MiB <br />WARNING: Caches not enabled <br />NAND: 512 MiB <br />In: serial <br />Out: serial <br />Err: serial <br />Net: egiga0, egiga1 <br />88E1121 Initialized on egiga0 <br />88E1121 Initialized on egiga1 <br />Hit any key to stop autoboot: 0 <br />(Re)start USB... <br />USB: Register 10011 NbrPorts 1 <br />USB EHCI 1.00 <br />scanning bus for devices... 3 USB Device(s) found <br /> scanning bus for storage devices... Device NOT ready <br /> Request Sense returned 02 3A 00 <br />2 Storage Device(s) found <br /> <br />Device Tree: <br /> 1 Hub (480 Mb/s, 0mA) <br /> | u-boot EHCI Host Controller <br /> | <br /> +-2 Hub (480 Mb/s, 100mA) <br /> | USB2.0 Hub <br /> | <br /> +-3 Mass Storage (480 Mb/s, 500mA) <br /> USB Storage 000000009909 <br /> <br />## Unknown partition table <br /> <br /> <br />Partition Map for USB device 1 -- Partition Type: DOS <br /> <br />Partition Start Sector Num Sectors Type <br /> 1 2048 524288 c <br /> 2 526336 15626240 8e <br />Interface: USB <br /> Device 1: Vendor: Generic Rev: 9909 Prod: STORAGE DEVICE <br /> Type: Removable Hard Disk <br /> Capacity: 7887.0 MB = 7.7 GB (16152576 x 512) <br />Partition 1: Filesystem: FAT16 "uboot " <br /> 436 readme.txt <br /> 71 boot.scr <br /> 3244464 uimage-3.3.6-3.fc17.armv5tel.kirkwood <br /> 9808824 uinitrd-3.3.6-3.fc17.armv5tel.kirkwood <br /> 3292112 uimage-kirkwood <br /> 12165177 uinitrd-kirkwood <br /> 93 klist.txt <br /> 3291896 uimage-3.4.2-3.fc17.armv5tel.kirkwood <br /> 12142387 uinitrd-3.4.2-3.fc17.armv5tel.kirkwood <br /> 3292112 uimage-3.4.3-1.fc17.armv5tel.kirkwood <br /> 12165177 uinitrd-3.4.3-1.fc17.armv5tel.kirkwood <br /> <br />13 file(s), 0 dir(s) <br /> <br />reading uImage-kirkwood <br /> <br />3292112 bytes read <br />reading uInitrd-kirkwood <br /> <br />12165177 bytes read <br />## Booting kernel from Legacy Image at 00800000 ... <br /> Image Name: 3.4.3-1.fc17.armv5tel.kirkwood <br /> Image Type: ARM Linux Kernel Image (uncompressed) <br /> Data Size: 3292048 Bytes = 3.1 MiB <br /> Load Address: 00008000 <br /> Entry Point: 00008000 <br /> Verifying Checksum ... OK <br />## Loading init Ramdisk from Legacy Image at 01100000 ... <br /> Image Name: initramfs <br /> Image Type: ARM Linux RAMDisk Image (uncompressed) <br /> Data Size: 12165113 Bytes = 11.6 MiB <br /> Load Address: 00000000 <br /> Entry Point: 00000000 <br /> Verifying Checksum ... OK <br /> Loading Kernel Image ... OK <br />OK <br /> <br />Starting kernel ... <br /> <br />Uncompressing Linux... done, booting the kernel. <br />[ 0.000000] Booting Linux on physical CPU 0 <br />...</span></blockquote>Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-56171597240174442512012-01-02T22:05:00.000-08:002012-01-02T22:05:38.603-08:00Fedora 14 ARM on Pandaboard, part 3Now that you have a <a href="http://write-enabled.blogspot.com/2011/12/fedora-14-arm-on-pandaboard.html">Pandaboard booting Fedora 14 ARM</a>, there are still some cleanup tasks to do.<br />
<br />
Set the system time and install the ntp daemon.<br />
<br />
<blockquote class="tr_bq"># date 123017102011 <br />
Fri Dec 30 17:10:00 EST 2011 <br />
# yum install ntp ntpdate<br />
Loaded plugins: presto<br />
Setting up Install Process<br />
Resolving Dependencies<br />
--> Running transaction check<br />
---> Package ntp.armv5tel 0:4.2.6p2-7.fc14 set to be installed<br />
---> Package ntpdate.armv5tel 0:4.2.6p2-7.fc14 set to be installed<br />
--> Finished Dependency Resolution<br />
<br />
Dependencies Resolved<br />
<br />
================================================================================<br />
Package Arch Version Repository Size<br />
================================================================================<br />
Installing:<br />
ntp armv5tel 4.2.6p2-7.fc14 fedora 573 k<br />
ntpdate armv5tel 4.2.6p2-7.fc14 fedora 73 k<br />
<br />
Transaction Summary<br />
================================================================================<br />
Install 2 Package(s)<br />
<br />
Total download size: 645 k<br />
Installed size: 1.7 M<br />
Is this ok [y/N]: y<br />
Downloading Packages:<br />
Setting up and reading Presto delta metadata<br />
Processing delta metadata<br />
Package(s) data still to download: 645 k<br />
(1/2): ntp-4.2.6p2-7.fc14.armv5tel.rpm | 573 kB 00:18 <br />
(2/2): ntpdate-4.2.6p2-7.fc14.armv5tel.rpm | 73 kB 00:01 <br />
--------------------------------------------------------------------------------<br />
Total 30 kB/s | 645 kB 00:21 <br />
Running rpm_check_debug<br />
Running Transaction Test<br />
Transaction Test Succeeded<br />
Running Transaction<br />
Warning: RPMDB altered outside of yum.<br />
Installing : ntpdate-4.2.6p2-7.fc14.armv5tel 1/2 <br />
Installing : ntp-4.2.6p2-7.fc14.armv5tel 2/2 <br />
<br />
Installed:<br />
ntp.armv5tel 0:4.2.6p2-7.fc14 ntpdate.armv5tel 0:4.2.6p2-7.fc14 <br />
<br />
Complete!<br />
#</blockquote>Turn on ntpd and start it.<br />
<br />
<blockquote class="tr_bq"># chkconfig ntpd on<br />
# service ntpd start<br />
Starting ntpd: [ OK ]<br />
# </blockquote><br />
<br />
Enable LVM monitoring service (this is one of the %post failures during the LVM installation)<br />
<br />
<blockquote class="tr_bq"># chkconfig lvm2-monitor on <br />
# service lvm2-monitor start <br />
Starting monitoring for VG panda: 1 logical volume(s) in volume group "panda" <br />
monitored <br />
[ OK ] <br />
# </blockquote><br />
<br />
Lock the guest account.<br />
<br />
<blockquote class="tr_bq"># usermod -L guest <br />
#</blockquote><br />
Add /boot/uboot as an entry in fstab. The entry should look like this:<br />
<br />
<blockquote class="tr_bq">LABEL="uboot" /boot/uboot vfat defaults,noauto 0 0</blockquote>You also will want to update the / entry in fstab to mount the filesystem ext4 since that's what we formatted it as (mounting as ext3 is perfectly valid but will use none of the ext4 capabilities or features). That line will now look like:<br />
<br />
<blockquote class="tr_bq">LABEL="rootfs" / ext4 defaults 1 1</blockquote><br />
Additional items you might want to address:<br />
<ol><li>Change the root password </li>
<li>Add swap (create lvol, mkswap, and enable it)</li>
<li>Install openssh-clients for ssh support</li>
<li>Change the hostname (/etc/sysconfig/network) </li>
<li>Set the timezone (it's currently in EST)</li>
</ol><br />
Well, that should be enough to get started. <br />
<ol></ol>Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-45455420186679718832012-01-01T09:39:00.000-08:002012-01-01T09:39:14.105-08:00Fedora 14 ARM on Pandaboard, part 2From <a href="http://write-enabled.blogspot.com/2011/12/fedora-14-arm-on-pandaboard.html">my previous entry</a>, you'll have already created a bootable SD card. Yeah, it doesn't boot much and ends with a kernel panic, but that's just what we need so far to get Fedora 14 on the Pandaboard.<br />
<br />
<u><b>Install a different u-boot.bin </b></u><br />
<br />
Unfortunately the u-boot.bin on the validation image doesn't read boot.scr (autoboot script) and the settings are hard-coded. In order to get a more flexible u-boot.bin, we'll borrow from <a href="http://lists.fedoraproject.org/pipermail/arm/2011-June/001548.html">Jon Master's previous Fedora 13 Pandaboard image</a>. Download the <a href="http://scotland.proximity.on.ca/fedora-arm/boards/PandaBoard/images/f13/beta3/20110622-0/fedora_arm_image_pandaboard-uboot-20110622-0.tar.xz">fedora_arm_image_pandaboard-uboot-20110622-0.tar.xz file</a>, extract u-boot.bin, and copy it to the uboot filesystem:<br />
<br />
<br />
<blockquote class="tr_bq"># tar -x uboot/u-boot.bin -f fedora_arm_image_pandaboard-uboot-20110622-0.tar.xz <br />
# ls uboot<br />
u-boot.bin<br />
# mount /dev/sde1 /mnt/tmp<br />
# cp uboot/u-boot.bin /mnt/tmp/<br />
cp: overwrite `/mnt/tmp/u-boot.bin'? y<br />
# umount /mnt/tmp</blockquote><br />
<br />
<span style="font-size: small;"><u><b>Download Fedora 14 ARM image and install the root filesystem</b></u></span><br />
<br />
<br />
Go ahead and download the <a href="http://fedora.roving-it.com/rootfs-f14-minimal-RC1.tar.bz2">F14 ARM RC1 minimal image</a> previously referenced.<br />
<br />
Insert the SD card and wait until the card is recognized. Then create the physical volume, volume group, logical volume, root filesystem, and install the files to the root filesystem.<br />
<br />
<blockquote class="tr_bq"># pvcreate /dev/sde2<br />
Writing physical volume data to disk "/dev/sde2"<br />
Physical volume "/dev/sde2" successfully created<br />
# vgcreate panda /dev/sde2<br />
Volume group "panda" successfully created<br />
# lvcreate -L 2G -n root panda<br />
Logical volume "root" created<br />
# mkfs -t ext4 -L rootfs /dev/mapper/panda-root<br />
mke2fs 1.41.14 (22-Dec-2010)<br />
Filesystem label=rootfs<br />
OS type: Linux<br />
Block size=4096 (log=2)<br />
Fragment size=4096 (log=2)<br />
Stride=0 blocks, Stripe width=0 blocks<br />
131072 inodes, 524288 blocks<br />
26214 blocks (5.00%) reserved for the super user<br />
First data block=0<br />
Maximum filesystem blocks=536870912<br />
16 block groups<br />
32768 blocks per group, 32768 fragments per group<br />
8192 inodes per group<br />
Superblock backups stored on blocks: <br />
32768, 98304, 163840, 229376, 294912<br />
<br />
Writing inode tables: done <br />
Creating journal (16384 blocks): done<br />
Writing superblocks and filesystem accounting information: done<br />
<br />
This filesystem will be automatically checked every 38 mounts or<br />
180 days, whichever comes first. Use tune2fs -c or -i to override.<br />
# mount /dev/mapper/panda-root /mnt/tmp<br />
# tar -xf rootfs-f14-minimal-RC1.tar.bz2 -C /mnt/tmp</blockquote>One thing that I haven't mentioned is that the minimal image doesn't contain lvm2, which we're going to need. Go ahead and install that (and its dependencies) now:<br />
<br />
<blockquote class="tr_bq"># rpm -ivh --ignorearch --root=/mnt/tmp http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-2.02.73-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-libs-2.02.73-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-libs-1.02.54-3.fc14.armv5tel.rpm http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-libs-1.02.54-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-2.02.73-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/lvm2-libs-2.02.73-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-1.02.54-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-1.02.54-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-event-libs-1.02.54-3.fc14.armv5tel.rpm<br />
Retrieving http://dl.fedoraproject.org/pub/fedora-secondary/releases/14/Everything/arm/os/Packages/device-mapper-libs-1.02.54-3.fc14.armv5tel.rpm<br />
Preparing... ########################################### [100%]<br />
1:device-mapper-libs ########################################### [ 17%]<br />
warning: %post(device-mapper-libs-1.02.54-3.fc14.armv5tel) scriptlet failed, exit status 127<br />
2:device-mapper ########################################### [ 33%]<br />
3:device-mapper-event-lib########################################### [ 50%]<br />
warning: %post(device-mapper-event-libs-1.02.54-3.fc14.armv5tel) scriptlet failed, exit status 127<br />
4:device-mapper-event ########################################### [ 67%]<br />
5:lvm2-libs ########################################### [ 83%]<br />
warning: %post(lvm2-libs-2.02.73-3.fc14.armv5tel) scriptlet failed, exit status 127<br />
6:lvm2 ########################################### [100%]<br />
warning: %post(lvm2-2.02.73-3.fc14.armv5tel) scriptlet failed, exit status 127<br />
# </blockquote><br />
<br />
You can ignore the %post errors as %post is simply trying to run ldconfig to update the dynamic linker/loader cache or chkconfig to enable a service.<br />
<br />
Now there is still one problem with getting LVM to work: The generated initramfs files have no LVM support. This is a huge problem (the system will not be able to detect the root filesystem which is on a logical volume). It's also a huge pain to fix it as dracut did not generate a bootable image when I tried to update the initramfs on my host system. Because of that, I've made it easy on you - <a href="http://bjohnson.fedorapeople.org/images/initramfs-2.6.40.3-0.fc14.armv7l.omap.img">here is an initramfs with LVM support included</a>. Let's install that:<br />
<br />
<blockquote class="tr_bq"># cp initramfs-2.6.40.3-0.fc14.armv7l.omap.img /mnt/tmp/boot/<br />
cp: overwrite `/mnt/tmp/boot/initramfs-2.6.40.3-0.fc14.armv7l.omap.img'? y<br />
#</blockquote><br />
<br />
The next thing we'll need to do is update the boot files stored in the uboot filesystem (mkimage is in the uboot-tools package if it's not installed on your system). <br />
<blockquote class="tr_bq"># mkdir /mnt/tmp/boot/uboot<br />
# mount /dev/sde1 /mnt/tmp/boot/uboot<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n 2.6.40.3.fc14.armv7l.omap -d /mnt/tmp/boot/vmlinuz-2.6.40.3-0.fc14.armv7l.omap /mnt/tmp/boot/uboot/uImage<br />
Image Name: 2.6.40.3.fc14.armv7l.omap<br />
Created: Fri Dec 30 16:44:41 2011<br />
Image Type: ARM Linux Kernel Image (uncompressed)<br />
Data Size: 3919956 Bytes = 3828.08 kB = 3.74 MB<br />
Load Address: 80008000<br />
Entry Point: 80008000<br />
# mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /mnt/tmp/boot/initramfs-2.6.40.3-0.fc14.armv7l.omap.img /mnt/tmp/boot/uboot/uInitrd<br />
Image Name: initramfs<br />
Created: Fri Dec 30 16:46:50 2011<br />
Image Type: ARM Linux RAMDisk Image (uncompressed)<br />
Data Size: 8043128 Bytes = 7854.62 kB = 7.67 MB<br />
Load Address: 00000000<br />
Entry Point: 00000000<br />
#</blockquote>In order to boot, we'll need to also create a boot script and compile it.<br />
<br />
<blockquote class="tr_bq"># echo "setenv bootargs 'console=ttyO2,115200n8 ro rootwait root=/dev/mapper/panda-root init=/sbin/init earlyprintk rd_NO_PLYMOUTH'" > /mnt/tmp/boot/uboot/boot.cmd<br />
# echo "setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 81600000 uInitrd; bootm 80300000 81600000'" >> /mnt/tmp/boot/uboot/boot.cmd <br />
# echo "boot" >> /mnt/tmp/boot/uboot/boot.cmd<br />
# mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Pandaboard boot script" -d /mnt/tmp/boot/uboot/boot.cmd /mnt/tmp/boot/uboot/boot.scr<br />
Image Name: Pandaboard boot script<br />
Created: Fri Dec 30 16:49:18 2011<br />
Image Type: ARM Linux Script (uncompressed)<br />
Data Size: 257 Bytes = 0.25 kB = 0.00 MB<br />
Load Address: 00000000<br />
Entry Point: 00000000<br />
Contents:<br />
Image 0: 249 Bytes = 0.24 kB = 0.00 MB<br />
# </blockquote>Create the klist.txt file that contains the list of installed kernels. This is actually not needed in this case since there is no xpfa repository with an updated grubby that can use it. I'm just doing it for completeness.<br />
<br />
<blockquote class="tr_bq"># echo "2.6.40.3.fc14.armv7l.omap" > /mnt/tmp/boot/uboot/klist.txt<br />
#</blockquote><br />
This should be all that's required. Let's unmount these filesystems, deactivate the volume group, eject the media, and try booting on the Pandaboard.<br />
<br />
<br />
<br />
<blockquote class="tr_bq"># umount /mnt/tmp/boot/uboot /mnt/tmp<br />
# vgchange -an panda<br />
0 logical volume(s) in volume group "panda" now active<br />
# eject /dev/sde<br />
#</blockquote><br />
If all has gone well, you're now sitting at the login prompt. The root password is "fedoraarm". <br />
<br />
Next post will be dedicated to a few cleanup items.Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-54083717777395940312011-12-30T14:38:00.000-08:002011-12-30T14:38:20.242-08:00Fedora 14 ARM on Pandaboard<a href="http://lists.fedoraproject.org/pipermail/arm/2011-June/001548.html">Jon Masters has provided a Pandaboard Fedora 13 image</a> which mostly works great (the <a href="http://groups.google.com/group/pandaboard/browse_thread/thread/508c088f0b8375d3">MLO</a> appears to not work on the new ES model, but you can strip the MLO from the Pandaboard validation image and use it instead).<br />
<br />
However, if you have the desire to stay current, you might want to try a little newer version of Fedora. I expect the floodgates to open shortly as the Fedora ARM team is working on bootstrapping Fedora 15, but in the meantime, <a href="http://lists.fedoraproject.org/pipermail/arm/2011-December/002386.html">Peter Robinson has provided a Fedora 14 ARM image</a>. No, it's not specific to the Pandaboard, but we can get it working anyway with a little elbow grease. And if we leverage the work of others, we won't even have to do any compiling!<br />
<br />
<u><b>Partitioning & formatting your SD card</b></u><br />
<br />
This is perhaps the most critical step - and <a href="http://comments.gmane.org/gmane.comp.embedded.pandaboard/2790">one with many nuances and folklore</a>. The image provided by Peter is "generic" in the fact that it doesn't have Pandaboard specific files or image layout. What this means is that we'll have to provide an additional partition: the MLO/uboot partition for Pandaboard.<br />
<br />
There have been some reported problems with specific SD cards, so I would suggest using a high quality SD card (I have used both <a href="http://www.microcenter.com/single_product_results.phtml?product_id=0349728">Micro Center "generic"</a> card and a <a href="http://www.bestbuy.com/site/PNY+-+8GB+Secure+Digital+High+Capacity+%28SDHC%29+Class+10+Memory+Card/1227075.p?id=1218238310425&skuId=1227075&st=PNY%20professional&cp=7&lp=2">PNY professional</a> card without issues). If there is any doubt about the card, <a href="http://pandaboard.org/node/13531/">try the validation image first</a>.<br />
<br />
Once you have the card in hand, you can insert it into your computer and examine /var/log/messages to determine which device is assigned by the kernel. In my case, this is what was reported:<br />
<br />
<blockquote class="tr_bq">sd 4:0:0:2: [<b>sde</b>] 15644672 512-byte logical blocks: (8.01 GB/7.45 GiB)</blockquote><br />
Also, it's worth noting that if there are mountable filesystems, they are probably mounted. That's not what we want, so be sure to unmount any mounted filesystems from this card.<br />
<br />
Now I use fdisk to create two partitions:<br />
<ol><li>The uboot/MLO partition sized at about 64 MB.</li>
<li>The rest of the card for the system.</li>
</ol>There is two things worth mentioning here. Most people also create a separate swap, boot, and root partitions. I'm not going to do that here. I'm going to instead create a 2nd partitions to use as a PV (Physical Volume) for LVM. I will then later create Logical Volumes for swap and root filesystems. I will not be creating a separate /boot filesystem. The reason that this is many times distinct from the root filesystem is because it makes recovery easier if you can mount up root and make changes. Since the /uboot partition/filesystem will be copies of files from /boot, I won't make it separate - the /uboot filesystem will contain the important files.<br />
<br />
Now create the two partitions:<br />
<br />
<blockquote class="tr_bq"># fdisk /dev/sde<br />
<br />
Command (m for help): c<br />
DOS Compatibility flag is set (DEPRECATED!)<br />
<br />
Command (m for help): o<br />
Building a new DOS disklabel with disk identifier 0xaa802e39.<br />
Changes will remain in memory only, until you decide to write them.<br />
After that, of course, the previous content won't be recoverable.<br />
<br />
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)<br />
<br />
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to<br />
switch off the mode (with command 'c').<br />
Command (m for help): n<br />
Partition type:<br />
p primary (0 primary, 0 extended, 4 free)<br />
e extended<br />
Select (default p): p<br />
Partition number (1-4, default 1): 1<br />
First sector (62-15644671, default 62): 63<br />
Last sector, +sectors or +size{K,M,G} (63-15644671, default 15644671): +64M<br />
<br />
Command (m for help): t<br />
Selected partition 1<br />
Hex code (type L to list codes): 6<br />
Changed system type of partition 1 to 6 (FAT16)<br />
<br />
Command (m for help): a<br />
Partition number (1-4): 1<br />
<br />
Command (m for help): p<br />
<br />
Disk /dev/sde: 8010 MB, 8010072064 bytes<br />
247 heads, 62 sectors/track, 1021 cylinders, total 15644672 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0xaa802e39<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sde1 * 63 131135 65536+ 6 FAT16<br />
Partition 1 does not end on cylinder boundary.<br />
<br />
Command (m for help): n<br />
Partition type:<br />
p primary (1 primary, 0 extended, 3 free)<br />
e extended<br />
Select (default p): p<br />
Partition number (1-4, default 2): 2<br />
First sector (62-15644671, default 62): 131136<br />
Last sector, +sectors or +size{K,M,G} (131136-15644671, default 15644671): <br />
Using default value 15644671<br />
<br />
Command (m for help): t<br />
Partition number (1-4): 2<br />
Hex code (type L to list codes): 8e<br />
Changed system type of partition 2 to 8e (Linux LVM)<br />
<br />
Command (m for help): p<br />
<br />
Disk /dev/sde: 8010 MB, 8010072064 bytes<br />
247 heads, 62 sectors/track, 1021 cylinders, total 15644672 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0xaa802e39<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sde1 * 63 131135 65536+ 6 FAT16<br />
Partition 1 does not end on cylinder boundary.<br />
/dev/sde2 131136 15644671 7756768 8e Linux LVM<br />
Partition 2 does not end on cylinder boundary.<br />
<br />
Command (m for help): w<br />
The partition table has been altered!<br />
<br />
Calling ioctl() to re-read partition table.<br />
<br />
WARNING: If you have created or modified any DOS 6.x<br />
partitions, please see the fdisk manual page for additional<br />
information.<br />
Syncing disks.<br />
#</blockquote>You'll notice that I forced the 1st partition to start at sector 63 even though this was listed as no longer a requirement. For whatever reason, I was unable to get a starting sector of 2048 (the default when not using DOS-compatability mode) to work. Your mileage may vary.<br />
<br />
We'll want to format that first partition too:<br />
<br />
<blockquote class="tr_bq"># mkfs -t vfat -F 16 -n uboot /dev/sde1<br />
mkfs.vfat 3.0.12 (29 Oct 2011)<br />
#</blockquote><u><b> Installing the boot files</b></u><br />
<br />
Now to save some time creating the boot partition, we're going to borrow MLO and uboot binaries from the <a href="http://pandaboard.org/node/13531/">Pandaboard validation image</a> and a previous Fedora-13 Pandaboard image. Download this image and copy the binaries to your local directory. Now let's discover how the image is laid out:<br />
<blockquote class="tr_bq"><br />
# fdisk -l validation-19102011.img <br />
<br />
Disk validation-19102011.img: 83 MB, 83886080 bytes<br />
255 heads, 63 sectors/track, 10 cylinders, total 163840 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x00000000<br />
<br />
Device Boot Start End Blocks Id System<br />
validation-19102011.img1 * 63 80324 40131 c W95 FAT32 (LBA)<br />
validation-19102011.img2 80325 144584 32130 83 Linux<br />
# </blockquote>From this, we can know that the uboot filesystem is located at 512 bytes per sector x 63 sectors = 32256 bytes. Let's mount it and copy out the files we need. All we really need is MLO and u-boot.bin, but we'll go ahead and grab the uImage for some quick testing too.<br />
<br />
<blockquote class="tr_bq"># mkdir tmp<br />
# losetup --offset 32256 --show --find ./validation-19102011.img <br />
/dev/loop0<br />
# mount /dev/loop0 ./tmp<br />
# ls tmp<br />
MLO u-boot.bin uImage<br />
# cp tmp/MLO tmp/u-boot.bin tmp/uImage .<br />
# umount ./tmp<br />
# losetup -d /dev/loop0<br />
# rmdir tmp<br />
# </blockquote><br />
<br />
Now, let's copy the MLO, u-boot.bin, and uImage files to the flash. The MLO must be the first file written, and never be re-written, so we have to take special precautions to make sure that this happens correctly with no other writes.<br />
<br />
<blockquote class="tr_bq"># mount /dev/sde1 /mnt/tmp<br />
# cp MLO /mnt/tmp/<br />
# sync<br />
# umount /mnt/tmp<br />
# mount /dev/sde1 /mnt/tmp<br />
# cp u-boot.bin uImage /mnt/tmp/<br />
# umount /mnt/tmp</blockquote>So this should be enough to at least test and make sure we laid it out right. Let's eject the media and try booting it on the Pandaboard.<br />
<br />
<blockquote class="tr_bq"># eject /dev/sde <br />
#</blockquote><u><b> A quick test</b></u><br />
<br />
<blockquote class="tr_bq">Welcome to minicom 2.5<br />
<br />
OPTIONS: I18n <br />
Compiled on Apr 6 2011, 07:59:07.<br />
Port /dev/ttyUSB0<br />
<br />
Press CTRL-A Z for help on special keys<br />
<br />
<br />
<br />
Texas Instruments X-Loader 1.41 (Sep 29 2011 - 10:43:53)<br />
OMAP4460: 1.2 GHz capable SOM<br />
Starting OS Bootloader from MMC/SD1 ...<br />
<br />
<br />
U-Boot 1.1.4-gc1cd80bc-dirty (Oct 12 2011 - 17:56:27)<br />
<br />
Load address: 0x80e80000<br />
DRAM: 1024 MB<br />
Flash: 0 kB<br />
Using default environment<br />
<br />
In: serial <br />
Out: serial <br />
Err: serial <br />
Hit any key to stop autoboot: 0 <br />
mmc read: Invalid size <br />
<br />
4020344 bytes read <br />
## Booting image at 82000000 ... <br />
Image Name: Linux-3.0.4+ <br />
Image Type: ARM Linux Kernel Image (uncompressed) <br />
Data Size: 4020280 Bytes = 3.8 MB <br />
Load Address: 80008000 <br />
Entry Point: 80008000 <br />
Verifying Checksum ... OK <br />
OK <br />
<br />
Starting kernel ... <br />
<br />
Uncompressing Linux... done, booting the kernel. <br />
[ 0.000000] Linux version 3.0.4+ (danders@ccd-dev) (gcc version 4.3.3 (Sourc1<br />
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387f <br />
...<br />
[ 8.663208] Waiting 3sec before mounting root device... <br />
[ 12.223846] b301 65536 mmcblk0p1 00000000-0000-0000-0000-00000001<br />
[ 12.233856] b302 7756768 mmcblk0p2 00000000-0000-0000-0000-00000002<br />
[ 12.242279] No filesystem could mount root, tried: ext3 <br />
[ 12.242279] Kernel panic - not syncing: VFS: Unable to mount root fs on unkn)<br />
...</blockquote><br />
If you saw your board get at least to the point of trying to mount the root and failing, this is a good sign. This means that the MLO, u-boot.bin, and uImage files are all functional.<br />
<br />
Next step is to get it booting a Fedora image - that's the next post.Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-87326377240702297852011-02-03T07:47:00.000-08:002011-02-03T07:47:39.375-08:00GuruPlug Plus Gets a New OS - Redux, part 3 (Fedora ARM on microSDHC)<u><b>Booting a Fedora ARM Root Filesystem from microSDHC</b></u><br />
(this continues from the previous post)<br />
<br />
Now we have a fabulous new kernel and shiny new uboot. Time to get Fedora ARM working.<br />
<br />
Although Fedora 12 is quite old at this point, I'm going to use it since the ARM packages for both Fedora 13, 14, and rawhide are incomplete.<br />
<br />
My first thought was to partition the SD card with 3 partitions: 1) a partition to support /boot (about 512 MB), 2) an ext3 partition (about 2 GB) for the root filesystem (since you'll soon see that booting a logical volume is going to be too much work), and 3) a partition to be a physical volume for LVM for anything that I might want to mount later.<br />
<br />
In the end I decided that I really didn't need /boot separate unless I was going to also be using LVM for the root filesystem. The problem is that the Linux kernel by itself can not boot a filesystem on a logical volume. You have to boot Linux with an initrd which loads the LVM modules, then boots from the root filesystem. That's just too much effort at this point so I'm going to make the root filesystem ext3. And that means that I won't need a separate /boot to hold the kernels.<br />
<br />
This is what my microSDHC looks like:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"># fdisk -l /dev/sde</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Disk /dev/sde: 7973 MB, 7973371904 bytes</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">246 heads, 62 sectors/track, 1021 cylinders, total 15572992 sectors</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Units = sectors of 1 * 512 = 512 bytes</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Sector size (logical/physical): 512 bytes / 512 bytes</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">I/O size (minimum/optimal): 512 bytes / 512 bytes</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Disk identifier: 0x5e8436c8</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> Device Boot Start End Blocks Id System</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">/dev/sde1 62 2120027 1059983 83 Linux</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">/dev/sde2 2120028 15572291 6726132 8e Linux LVM</span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">#</span><br />
<br />
You can get a copy of the root filesystem here: https://fedoraproject.org/wiki/Architectures/ARM/Using#Latest_Release:_Fedora_12<br />
<br />
Assuming you've mounted your root filesystem (sde1 in my example) under /media/sdhc, you'll need to copy the contents of the pre-built root filesystem onto your SDHC card<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"># tar -jxf rootfs-f12.tar.bz2</span></div><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"># cp -ar rootfs-f12/* /media/sdhc/</span></span><br />
<br />
Now we're going to need the major/minor numbers of the root filesystem to feed to the kernel through uboot. But don't fret, it can be found quite easily if you don't know. Go ahead and test boot the kernel and let it tell you what the available major/minors are:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Marvell>> nand read.e 0x6400000 0x100000 0x400000 <br />
<br />
NAND read: device 0 offset 0x100000, size 0x400000 <br />
4194304 bytes read: OK <br />
Marvell>> setenv bootargs console=ttyS0,115200 rootdelay=10 <br />
Marvell>> bootm 0x6400000 <br />
## Booting kernel from Legacy Image at 06400000 ... <br />
Image Name: Linux-2.6.36 <br />
Image Type: ARM Linux Kernel Image (uncompressed) <br />
Data Size: 2947644 Bytes = 2.8 MB <br />
Load Address: 00008000 <br />
Entry Point: 00008000 <br />
Verifying Checksum ... OK <br />
Loading Kernel Image ... OK <br />
OK <br />
<br />
Starting kernel ... <br />
<br />
Uncompressing Linux... done, booting the kernel. <br />
Linux version 2.6.36 (kelly@speedy) (gcc version 4.4.3 (Sourcery G++ Lite er) )0<br />
...</span></div><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">VFS: Cannot open root device "(null)" or unknown-block(2,0) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Please append a correct "root=" boot option; here are the available partitions: </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">1f00 1024 mtdblock0 (driver?) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">1f01 4096 mtdblock1 (driver?) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">1f02 519168 mtdblock2 (driver?) </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">0810 7786496 sdb driver: sd </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> 0811 1059983 sdb1 </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> 0812 6726132 sdb2 </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)</span></span><br />
<br />
From this boot attempt, we can see that our SDHC card is sdb and the root partition that I created is sdb1 which has a major/minor of 0811.<br />
<br />
<br />
With this info, we can now setup the uboot environment to boot this filesystem:<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Marvell>> editenv x_bootargs_root <br />
edit: ubi.mtd=2 root=0811 rootdelay=10 <br />
Marvell>> saveenv <br />
Saving Environment to NAND... <br />
Erasing Nand... <br />
Erasing at 0x40000 -- 100% complete. <br />
Writing to Nand... done <br />
Marvell>> reset <br />
resetting ... </span><br />
<br />
With a little luck, you'll now now a login prompt to your new Fedora 12 ARM system (default root password: "fedoraarm").<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">Fedora release 12 (Constantine) <br />
Kernel 2.6.36 on an armv5tel (/dev/ttyS0) </span><br />
<br />
There was probably a lot of complaints about modules, which you can fix by installing the kernel modules <a href="http://write-enabled.blogspot.com/2010/09/guruplug-plus-gets-new-os-redux-part-2.html">that you got from the same place as your kernel</a>. These should be untarred to the / directory (which installs them in /lib/modules).<br />
<br />
<span style="font-size: x-small;"><b>Note: The pre-built rootfs you just booted has a guest user with no password. Consider the security implications of this for your use case and take appropriate action.</b></span><br />
<br />
Additional packages I needed to install to meet my goals:<br />
<ul><li>cryptsetup-luks</li>
<li>device-mapper</li>
<li>lvm2</li>
<li>nfs-utils </li>
<li>rpcbind</li>
</ul>Also, if you're trying to use the plug as a NFS server like I am, the kernel that is installed has the sunrpc functionality built in whereas Fedora assumes that it's a module to be loaded. This will cause the startup scripts to emit an error. This can be worked around by adding the following line to /etc/fstab:<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0</span>Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-14081954063840889572010-10-09T15:10:00.000-07:002010-10-09T14:10:12.080-07:00GuruPlug Plus Gets a New OS - Redux, part 2 (uboot/kernel)<u><span style="font-size: small;"><b>Flashing a new uboot & kernel </b></span></u><br />
(this continues from the previous post) <br />
Hit any key to stop the autoboot. Since they factory uboot and kernel images have incorrect arcNumbers, flashing one and not the other will cause the kernel to not boot. Because of this we're going to go ahead and flash both. <br />
<br />
In order to do this, you'll need:<br />
<ul><li>a working tftp server (in Fedora 'yum install tftp-server' and make sure xinetd is reloaded and running). I'm using a tftp server because the GuruPlug is picky about USB keys. </li>
<li>either no firewall or configuration settings for tftp (you can drop the firewall settings temporarily with 'sudo server iptables stop' and when you're finished 'sudo service iptables start'</li>
<li><a href="http://www.plugcomputer.org/index.php/us/resources/downloads?func=fileinfo&id=71">A new uboot image</a>. I choose this one mostly for convenience. In Fedora, this should be copied to /var/lib/tftpboot.</li>
<li><a href="http://sheeva.with-linux.com/sheeva/2.6.35.7/">A new kernel image</a>. I choose this one mostly for convenience. The only thing that I have found that I don't care for in this image is the kernel timestamps, but I can live with that for now. In Fedora, this should be copied to /var/lib/tftpboot.</li>
</ul>First thing we will do is set the serverip and ipaddr variables. Serverip is the IP address of the tftp server, and ipaddr is the GuruPlug address. They need to be on the same subnet.<br />
<blockquote>Marvell>> setenv serverip 192.168.1.10 <br />
Marvell>> setenv ipaddr 192.168.1.11 <br />
Marvell>> </blockquote>Now we're ready to load the uboot image and flash it to nand memory.<br />
<blockquote>Marvell>> tftp 0x6400000 uboot.guruplug.bin <br />
Using egiga0 device <br />
TFTP from server 192.168.1.10; our IP address is 192.168.1.11 <br />
Filename 'uboot.guruplug.bin'. <br />
Load address: 0x6400000 <br />
Loading: ############# <br />
done <br />
Bytes transferred = 180220 (2bffc hex) <br />
Marvell>> nand erase 0x0 0x100000 <br />
<br />
NAND erase: device 0 offset 0x0, size 0x100000 <br />
Erasing at 0xe0000 -- 100% complete. <br />
OK <br />
Marvell>> nand write.e 0x6400000 0x0 0x100000 <br />
<br />
NAND write: device 0 offset 0x0, size 0x100000 <br />
1048576 bytes written: OK <br />
Marvell>> </blockquote>Ok, now we're ready to load the new kernel image and flash it to nand memory.<br />
<br />
<blockquote>Marvell>> tftp 0x6400000 sheeva-2.6.35.7-uImage <br />
Using egiga0 device <br />
TFTP from server 192.168.1.20; our IP address is 192.168.1.30 <br />
Filename 'sheeva-2.6.35.7-uImage'. <br />
Load address: 0x6400000 <br />
Loading: ################################################################# <br />
################################################################# <br />
############################################################# <br />
done <br />
Bytes transferred = 2798652 (2ab43c hex) Marvell>> nand erase 0x100000 0x400000 <br />
<br />
NAND erase: device 0 offset 0x100000, size 0x400000 <br />
Erasing at 0x4e0000 -- 100% complete. <br />
OK <br />
Marvell>> nand write.e 0x6400000 0x100000 0x400000 <br />
<br />
NAND write: device 0 offset 0x100000, size 0x400000 <br />
4194304 bytes written: OK <br />
Marvell>> </blockquote>At this point you'll want to reboot by using the reset command. There are a couple things to be aware of at this point. These are completely normal: You'll get a CRC error for your environment and your MAC addresses are likely lost for your ethernet interfaces and you'll have to fix that. We'll do that on this first boot.<br />
<blockquote>Marvell>> reset <br />
resetting ... <br />
<br />
<br />
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41) <br />
Marvell-GuruPlug <br />
<br />
SoC: Kirkwood 88F6281_A0 <br />
DRAM: 512 MB <br />
NAND: 512 MiB <br />
<b>*** Warning - bad CRC or NAND, using default </b>environment <br />
<br />
In: serial <br />
Out: serial <br />
Err: serial <br />
Net: egiga0, egiga1 <br />
88E1121 Initialized on egiga0 <br />
88E1121 Initialized on egiga1 <br />
Hit any key to stop autoboot: 0 <br />
Marvell>> setenv <br />
setenv - set environment variables <br />
<br />
Marvell>> printenv <br />
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${;<br />
bootdelay=3 <br />
baudrate=115200 <br />
x_bootcmd_usb=usb start <br />
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000 <br />
x_bootargs=console=ttyS0,115200 <br />
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs <br />
stdin=serial <br />
stdout=serial <br />
stderr=serial <br />
<b>ethaddr=03:41:7d:ab:b4:7c</b> <br />
ethact=egiga0 <br />
<b>eth1addr=04:41:7d:ab:b4:7d</b> <br />
<br />
Environment size: 423/131068 bytes <br />
Marvell>> </blockquote><br />
Yep, just as predicted. Let's fix those up and reboot:<br />
<br />
<blockquote>Marvell>> editenv ethaddr <br />
edit: 11:43:1c:77:a3:bb <br />
Marvell>> editenv eth1addr <br />
edit: 11:43:1c:77:a3:bc <br />
Marvell>> saveenv <br />
Saving Environment to NAND... <br />
Erasing Nand... <br />
Erasing at 0x40000 -- 100% complete. <br />
Writing to Nand... done <br />
Marvell>> reset <br />
resetting ... <br />
<br />
U-Boot 2010.03-01161-gd91b0a9 (Apr 22 2010 - 03:24:41) <br />
Marvell-GuruPlug <br />
<br />
SoC: Kirkwood 88F6281_A0 <br />
DRAM: 512 MB <br />
NAND: 512 MiB <br />
In: serial <br />
Out: serial <br />
Err: serial <br />
Net: egiga0, egiga1 <br />
88E1121 Initialized on egiga0 <br />
88E1121 Initialized on egiga1 <br />
Hit any key to stop autoboot: 0 <br />
(Re)start USB... <br />
USB: Register 10011 NbrPorts 1 <br />
USB EHCI 1.00 <br />
scanning bus for devices... 3 USB Device(s) found <br />
scanning bus for storage devices... Device NOT ready <br />
Request Sense returned 02 3A 00 <br />
1 Storage Device(s) found <br />
<br />
NAND read: device 0 offset 0x100000, size 0x400000 <br />
4194304 bytes read: OK <br />
## Booting kernel from Legacy Image at 06400000 ... <br />
Image Name: Linux-2.6.35.7 <br />
Image Type: ARM Linux Kernel Image (uncompressed) <br />
Data Size: 2798588 Bytes = 2.7 MB <br />
Load Address: 00008000 <br />
Entry Point: 00008000 <br />
Verifying Checksum ... OK <br />
Loading Kernel Image ... OK <br />
OK <br />
<br />
Starting kernel ... <br />
<br />
Uncompressing Linux... done, booting the kernel. <br />
[ 0.000000] Linux version 2.6.35.7 (kelly@speedy) (gcc version 4.4.3 (Source0<br />
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397<br />
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache <br />
[ 0.000000] Machine: Marvell GuruPlug Reference Board <br />
[ 0.000000] Memory policy: ECC disabled, Data cache writeback <br />
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pa8<br />
[ 0.000000] Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:ros<br />
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) <br />
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) <br />
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) <br />
[ 0.000000] Memory: 256MB 256MB = 512MB total <br />
[ 0.000000] Memory: 513680k/513680k available, 10608k reserved, 0K highmem <br />
[ 0.000000] Virtual kernel memory layout: <br />
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) <br />
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) <br />
[ 0.000000] DMA : 0xffc00000 - 0xffe00000 ( 2 MB) <br />
[ 0.000000] vmalloc : 0xe0800000 - 0xfe800000 ( 480 MB) <br />
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) <br />
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB) <br />
[ 0.000000] .init : 0xc0008000 - 0xc002b000 ( 140 kB) <br />
[ 0.000000] .text : 0xc002b000 - 0xc04fd000 (4936 kB) <br />
[ 0.000000] .data : 0xc051e000 - 0xc054e7e0 ( 194 kB) <br />
[ 0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, 1<br />
[ 0.000000] Hierarchical RCU implementation. <br />
[ 0.000000] RCU-based detection of stalled CPUs is disabled. <br />
[ 0.000000] Verbose stalled-CPUs detection is disabled. <br />
[ 0.000000] NR_IRQS:114 <br />
[ 0.000000] Console: colour dummy device 80x30 <br />
[ 21.474963] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776) <br />
[ 21.714888] pid_max: default: 32768 minimum: 301 <br />
[ 21.714954] Mount-cache hash table entries: 512 <br />
[ 21.715203] CPU: Testing write buffer coherency: ok <br />
[ 21.717038] NET: Registered protocol family 16 <br />
[ 21.718247] Kirkwood: MV88F6281-A0, TCLK=200000000. <br />
[ 21.718261] Feroceon L2: Cache support initialised. <br />
[ 21.732685] bio: create slab <bio-0> at 0 <br />
[ 21.733189] vgaarb: loaded <br />
[ 21.733691] SCSI subsystem initialized <br />
[ 21.734415] usbcore: registered new interface driver usbfs <br />
[ 21.734671] usbcore: registered new interface driver hub <br />
[ 21.734847] usbcore: registered new device driver usb <br />
[ 21.737378] cfg80211: Calling CRDA to update world regulatory domain <br />
[ 21.737567] Switching to clocksource orion_clocksource <br />
[ 21.751467] NET: Registered protocol family 2 <br />
[ 21.751664] IP route cache hash table entries: 4096 (order: 2, 16384 bytes) <br />
[ 21.752354] TCP established hash table entries: 16384 (order: 5, 131072 byte)<br />
[ 21.752708] TCP bind hash table entries: 16384 (order: 4, 65536 bytes) <br />
[ 21.752912] TCP: Hash tables configured (established 16384 bind 16384) <br />
[ 21.752922] TCP reno registered <br />
[ 21.752933] UDP hash table entries: 256 (order: 0, 4096 bytes) <br />
[ 21.752956] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) <br />
[ 21.753095] NET: Registered protocol family 1 <br />
[ 21.753340] RPC: Registered udp transport module. <br />
[ 21.753351] RPC: Registered tcp transport module. <br />
[ 21.753360] RPC: Registered tcp NFSv4.1 backchannel transport module. <br />
[ 21.836710] JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc. <br />
[ 21.837960] JFS: nTxBlock = 4013, nTxLock = 32105 <br />
[ 21.839308] msgmni has been set to 1003 <br />
[ 21.841654] alg: No test for stdrng (krng) <br />
[ 21.841700] io scheduler noop registered <br />
[ 21.841710] io scheduler deadline registered <br />
[ 21.841811] io scheduler cfq registered (default) <br />
[ 21.849009] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled <br />
[ 21.849872] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A <br />
[ 22.203935] console [ttyS0] enabled <br />
[ 22.215396] brd: module loaded <br />
[ 22.222241] loop: module loaded <br />
[ 22.226963] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND )<br />
[ 22.235759] Scanning device for bad blocks <br />
[ 22.308974] Bad eraseblock 1843 at 0x00000e660000 <br />
[ 22.352006] Bad eraseblock 2867 at 0x000016660000 <br />
[ 22.398578] Bad eraseblock 3986 at 0x00001f240000 <br />
[ 22.407376] Creating 3 MTD partitions on "orion_nand": <br />
[ 22.412553] 0x000000000000-0x000000100000 : "u-boot" <br />
[ 22.418708] 0x000000100000-0x000000500000 : "uImage" <br />
[ 22.424758] 0x000000500000-0x000020000000 : "root" <br />
[ 22.431735] UBI: attaching mtd2 to ubi0 <br />
[ 22.435595] UBI: physical eraseblock size: 131072 bytes (128 KiB) <br />
[ 22.441926] UBI: logical eraseblock size: 129024 bytes <br />
[ 22.447354] UBI: smallest flash I/O unit: 2048 <br />
[ 22.452095] UBI: sub-page size: 512 <br />
[ 22.456737] UBI: VID header offset: 512 (aligned 512) <br />
[ 22.462609] UBI: data offset: 2048 <br />
[ 23.267491] UBI: attached mtd2 to ubi0 <br />
[ 23.271299] UBI: MTD device name: "root" <br />
[ 23.276199] UBI: MTD device size: 507 MiB <br />
[ 23.281201] UBI: number of good PEBs: 4053 <br />
[ 23.285931] UBI: number of bad PEBs: 3 <br />
[ 23.290407] UBI: max. allowed volumes: 128 <br />
[ 23.295043] UBI: wear-leveling threshold: 4096 <br />
[ 23.299780] UBI: number of internal volumes: 1 <br />
[ 23.304243] UBI: number of user volumes: 1 <br />
[ 23.308718] UBI: available PEBs: 0 <br />
[ 23.313181] UBI: total number of reserved PEBs: 4053 <br />
[ 23.318181] UBI: number of PEBs reserved for bad PEB handling: 40 <br />
[ 23.324299] UBI: max/mean erase counter: 2/0 <br />
[ 23.328601] UBI: image sequence number: -1 <br />
[ 23.332760] UBI: background thread "ubi_bgt0d" started, PID 465 <br />
[ 23.339820] MV-643xx 10/100/1000 ethernet driver version 1.4 <br />
[ 23.345692] mv643xx_eth smi: probed <br />
[ 23.351963] net eth0: port 0 with MAC address f0:ad:4e:00:17:93 <br />
[ 23.360584] net eth1: port 0 with MAC address f0:ad:4e:00:17:94 <br />
[ 23.366691] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver <br />
[ 23.373333] orion-ehci orion-ehci.0: Marvell Orion EHCI <br />
[ 23.378646] orion-ehci orion-ehci.0: new USB bus registered, assigned bus nu1<br />
[ 23.407617] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000 <br />
[ 23.427615] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00 <br />
[ 23.434187] hub 1-0:1.0: USB hub found <br />
[ 23.437992] hub 1-0:1.0: 1 port detected <br />
[ 23.442558] Initializing USB Mass Storage driver... <br />
[ 23.447668] usbcore: registered new interface driver usb-storage <br />
[ 23.453703] USB Mass Storage support registered. <br />
[ 23.458519] usbcore: registered new interface driver ums-datafab <br />
[ 23.464660] usbcore: registered new interface driver ums-freecom <br />
[ 23.470864] usbcore: registered new interface driver ums-jumpshot <br />
[ 23.477098] usbcore: registered new interface driver ums-sddr09 <br />
[ 23.483228] usbcore: registered new interface driver ums-sddr55 <br />
[ 23.489558] mice: PS/2 mouse device common for all mice <br />
[ 23.495335] rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0 <br />
[ 23.501453] i2c /dev entries driver <br />
[ 23.505576] cpuidle: using governor ladder <br />
[ 23.510182] cpuidle: using governor menu <br />
[ 23.514376] sdhci: Secure Digital Host Controller Interface driver <br />
[ 23.520638] sdhci: Copyright(c) Pierre Ossman <br />
[ 23.525390] mmc0: mvsdio driver initialized, lacking card detect (fall back )<br />
[ 23.534529] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver <br />
[ 23.540973] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver <br />
[ 23.587646] mv_xor mv_xor.0: Marvell XOR: ( xor cpy ) <br />
[ 23.595288] mmc0: new high speed SDIO card at address 0001 <br />
[ 23.627645] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy ) <br />
[ 23.667643] mv_xor mv_xor.2: Marvell XOR: ( xor cpy ) <br />
[ 23.707646] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy ) <br />
[ 23.717283] usbcore: registered new interface driver hiddev <br />
[ 23.723063] usbcore: registered new interface driver usbhid <br />
[ 23.728769] usbhid: USB HID core driver <br />
[ 23.732622] oprofile: hardware counters not available <br />
[ 23.737754] oprofile: using timer interrupt. <br />
[ 23.743491] TCP cubic registered <br />
[ 23.746741] NET: Registered protocol family 17 <br />
[ 23.751414] lib80211: common routines for IEEE802.11 drivers <br />
[ 23.757700] usb 1-1: new high speed USB device using orion-ehci and address 2<br />
[ 23.765796] rtc-mv rtc-mv: setting system clock to 2010-09-30 17:15:40 UTC ()<br />
[ 23.872392] UBIFS: mounted UBI device 0, volume 0, name "rootfs" <br />
[ 23.878461] UBIFS: file system size: 515837952 bytes (503748 KiB, 491 MiB,)<br />
[ 23.886505] UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LE)<br />
[ 23.893864] UBIFS: media format: w4/r0 (latest is w4/r0) <br />
[ 23.899735] UBIFS: default compressor: zlib <br />
[ 23.903934] UBIFS: reserved for root: 0 bytes (0 KiB) <br />
[ 23.909880] VFS: Mounted root (ubifs filesystem) on device 0:13. <br />
[ 23.915947] Freeing init memory: 140K <br />
[ 23.967703] hub 1-1:1.0: USB hub found <br />
[ 23.971764] hub 1-1:1.0: 4 ports detected <br />
modprobe: FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such filey<br />
<br />
INIT: version 2.86 booting <br />
[ 24.267939] usb 1-1.1: new high speed USB device using orion-ehci and addres3<br />
[ 24.417916] scsi0 : usb-storage 1-1.1:1.0 <br />
Starting the hotplug events dispatcher: udevd. <br />
Synthesizing the initial hotplug events...[ 25.448862] scsi 0:0:0:0: Direct-A0<br />
[ 25.487658] sd 0:0:0:0: [sda] Attached SCSI removable disk <br />
[ 25.534923] sd 0:0:0:0: Attached scsi generic sg0 type 0 <br />
done. <br />
Waiting for /dev to be fully populated...[ 25.643065] scsi 0:0:0:1: Direct-Ac0<br />
[ 25.856648] sd 0:0:0:1: Attached scsi generic sg1 type 0 <br />
[ 25.862808] sd 0:0:0:1: [sdb] 15572992 512-byte logical blocks: (7.97 GB/7.4)<br />
[ 25.927690] sd 0:0:0:1: [sdb] Write Protect is off <br />
[ 25.932528] sd 0:0:0:1: [sdb] Assuming drive cache: write through <br />
[ 26.101923] sd 0:0:0:1: [sdb] Assuming drive cache: write through <br />
[ 26.108161] sdb: sdb1 sdb2 <br />
[ 26.256963] sd 0:0:0:1: [sdb] Assuming drive cache: write through <br />
[ 26.310164] sd 0:0:0:1: [sdb] Attached SCSI removable disk <br />
[ 62.691332] EXT3-fs: barriers not enabled <br />
[ 62.697559] kjournald starting. Commit interval 5 seconds <br />
[ 62.757697] EXT3-fs (sdb1): using internal journal <br />
[ 62.762537] EXT3-fs (sdb1): mounted filesystem with writeback data mode <br />
done. <br />
Setting the system clock. <br />
Activating swap...done. <br />
Setting the system clock. <br />
Cleaning up ifupdown.... <br />
Loading kernel modules...FATAL: Could not load /lib/modules/2.6.35.7/modules.dey<br />
Checking file systems...fsck 1.41.3 (12-Oct-2008) <br />
done. <br />
Setting kernel variables (/etc/sysctl.conf)...done. <br />
Mounting local filesystems...done. <br />
Activating swapfile swap...done. <br />
Setting up networking.... <br />
Configuring network interfaces...done. <br />
Starting portmap daemon.... <br />
Setting up ALSA...done (none loaded). <br />
INIT: Entering runlevel: 2 <br />
Starting enhanced syslogd: rsyslogd. <br />
Starting system message bus: dbus. <br />
Starting OpenBSD Secure Shell server: sshd. <br />
Starting MySQL database server: mysqld. <br />
Checking for corrupt, not cleanly closed and upgrade needing tables.. <br />
Starting MTA: exim4. <br />
ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system pos!<br />
Starting Network Interface Plugging Daemon: eth0 eth1. <br />
Starting web server: lighttpd. <br />
Starting Samba daemons: nmbd smbd. <br />
Starting file alteration monitor: FAM. <br />
Starting NTP server: ntpd. <br />
[ 75.207567] warning: `ntpd' uses 32-bit capabilities (legacy support in use) <br />
Starting periodic command scheduler: crond. <br />
uap0: error fetching interface information: Device not found <br />
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy<br />
SIOCSIFADDR: No such device <br />
uap0: ERROR while getting interface flags: No such device <br />
uap0: ERROR while getting interface flags: No such device <br />
No such device <br />
ERR:UAPHOSTCMD is not supported by uap0 <br />
ERR:Command sending failed! <br />
No such device <br />
ERR:UAPHOSTCMD is not supported by uap0 <br />
ERR:Command sending failed! <br />
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy<br />
iptables v1.4.2: can't initialize iptables table `nat': iptables who? (do you n)<br />
Perhaps iptables or your kernel needs to be upgraded. <br />
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy<br />
iptables v1.4.2: can't initialize iptables table `nat': iptables who? (do you n)<br />
Perhaps iptables or your kernel needs to be upgraded. <br />
Starting very small DHCP server: udhcpd (v0.9.9-pre) started <br />
Unable to open /var/lib/udhcpd.leases for reading <br />
SIOCGIFADDR failed, is the interface up and configured?: No such device <br />
Starting DNS forwarder and DHCP server: dnsmasq. <br />
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy<br />
iptables v1.4.2: can't initialize iptables table `filter': iptables who? (do yo)<br />
Perhaps iptables or your kernel needs to be upgraded. <br />
ERROR: Module btmrvl_sdio does not exist in /proc/modules <br />
ERROR: Module btmrvl does not exist in /proc/modules <br />
Starting bluetooth: bluetoothd. <br />
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directy<br />
[ 76.187926] eth0: link up, 1000 Mb/s, full duplex, flow control disabled <br />
Can't open HCI socket.: Address family not supported by protocol <br />
Can't open HCI socket.: Address family not supported by protocol <br />
<br />
Debian GNU/Linux 5.0 guruplug-debian ttyS0 <br />
<br />
guruplug-debian login: </bio-0></blockquote><br />
If your intent was only to upgrade uboot and the kernel, I have good new for you - you're mostly done. If you want to keep Debian, just login with root/nosoup4u and install the kernel modules that were in the same directory as the kernel (untar them to /).Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com4tag:blogger.com,1999:blog-2093124616865576217.post-85586339088636406552010-09-30T18:23:00.000-07:002010-09-30T18:23:30.660-07:00GuruPlug Plus Gets a New OS - Redux, part 1 (connecting)I should have mentioned in my first post about updating the GuruPlug what my goals were. Here are my initial goals:<br />
<ul><li>Modern uboot</li>
<li>Modern kernel</li>
<li> As little compiling of custom binaries as possible (leverage other peoples work)</li>
<li> <a href="http://fedoraproject.org/wiki/Architectures/ARM">Fedora ARM</a> for the OS booted from a <a href="http://www.amazon.com/Ridata-Lightning-MicroSDHC-Memory-RDMICSDHC8G-LIG2/dp/B002NKM3BO/ref=sr_1_sc_1?ie=UTF8&qid=1285736688&sr=8-1-spell">8GB micro-SDHC card</a></li>
<li>eSATA support for the data drives </li>
<li>Logical Volume Management (LVM) for the data drives</li>
<li><a href="http://en.wikipedia.org/wiki/Linux_Unified_Key_Setup">LUKS</a> encryption for the data drives</li>
<li>NFSv4 server</li>
</ul>Previously <a href="http://write-enabled.blogspot.com/2010/09/guruplug-plus-gets-new-os.html">I wrote about loading a new operating system</a> on the GuruPlug Plus. After that I did some work on upgrading uboot & the kernel. Because upgrading uboot nukes some of the previous work, I'm going to present the 1,2,3 approach to upgrading uboot, the kernel, and getting a working Fedora ARM system with the least amount of work. I'm writing specifically about the GuruPlug Plus, but in general it should also apply to the non-Plus model.<br />
<br />
In order to do this upgrade, you should have a working tftp server, the GuruPlug JTAG board, and about an hour of time.<br />
<br />
<br />
<u><b>Connecting to the GuruPlug</b></u><br />
The first thing you'll want to do is make sure you can communicate with the plug. You'll need to hook up the JTAG board and mini-USB cable according to the directions in the <a href="http://code.google.com/p/guruplug/downloads/detail?name=GuruPlug%20Server-Quick%20Start%20Guide-100507.pdf&can=2&q=">Quick Start Guide</a>. I'm running Fedora 13 on x86_64 and for me it <i>just worked</i>. When you plug the USB cable into your computer, you'll see something like this in dmesg:<br />
<blockquote>kernel: usb 3-1: new full speed USB device using uhci_hcd and address 9<br />
kernel: usb 3-1: New USB device found, idVendor=9e88, idProduct=9e8f<br />
kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3<br />
kernel: usb 3-1: Product: SheevaPlug JTAGKey FT2232D B<br />
kernel: usb 3-1: Manufacturer: FTDI<br />
kernel: usb 3-1: SerialNumber: FTTBJ9W7<br />
kernel: usb 3-1: Ignoring serial port reserved for JTAG<br />
kernel: ftdi_sio 3-1:1.1: FTDI USB Serial Device converter detected<br />
kernel: usb 3-1: Detected FT2232C<br />
kernel: usb 3-1: Number of endpoints 2<br />
kernel: usb 3-1: Endpoint 1 MaxPacketSize 64<br />
kernel: usb 3-1: Endpoint 2 MaxPacketSize 64<br />
kernel: usb 3-1: Setting MaxPacketSize 64<br />
kernel: usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0 </blockquote>From this output, you can tell that the communications for the GuruPlug serial port will happen on ttyUSB0 (yours may be different). At this point you'll want to configure minicom on your computer. This should be done as root:<br />
<blockquote>$ sudo minicom -s</blockquote>Under <i>Serial Port Setup</i>, change these settings:<br />
<ul><li>Serial Device: /dev/ttyUSB0</li>
<li>Bps/Par/Bits: 115,200 8N1</li>
<li>Hardware Flow Control: No</li>
<li>Software Flow Control: No</li>
</ul>Then select <i>Save Setup as dfl</i>. <br />
<br />
This would also be a good time to plug in an Ethernet cable from your plug to a switch/hub. Note that the top plug on a Plus model is eth0. This is labelled as <i>RJ45 #2</i> in the <a href="http://code.google.com/p/guruplug/downloads/detail?name=GuruPlug%20Server-Quick%20Start%20Guide-100507.pdf&can=2&q=">Quick Start Guide</a>. <br />
<br />
Now run:<br />
<blockquote>$ minicom -o</blockquote>to connect to the serial port and plug in power to the GuruPlug. When it starts booting, you should see something similar to this:<br />
<br />
<blockquote>U-Boot 2009.11-rc1-00602-g28a9c08-dirty (Feb 09 2010 - 18:15:21) <br />
Marvell-Plug2L <br />
<br />
SoC: Kirkwood 88F6281_A0 <br />
DRAM: 512 MB <br />
NAND: 512 MiB <br />
<br />
<br />
In: serial <br />
Out: serial <br />
Err: serial <br />
Net: egiga0, egiga1 <br />
88E1121 Initialized on egiga0 <br />
88E1121 Initialized on egiga1 <br />
Hit any key to stop autoboot: 0 <br />
Marvell>> </blockquote><br />
Hit any key at this point to stop the autoboot. See the next post regarding update of uboot and the kernel.Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-34876058080318228392010-09-26T18:34:00.000-07:002010-09-28T21:28:11.697-07:00GuruPlug Plus Gets a New OSI won't bore you with the details of what a <a href="http://www.globalscaletechnologies.com/p-32-guruplug-server-plus.aspx">GuruPlug Plus</a> is all about since it's been widely discussed in the media since the beginning of 2010. But let's just say that Globalscale Technologies has had a few issue delivering on their promise. Although the plug started shipping in April, the plugs had overheating problems when both ethernet connections were used at 1Gb/s. This was only fixed in the production models recently and started shipping to customers in September.<br />
<br />
So, having my plug finally in hand, I'm setting out to do a few upgrades and make it useful for my purposes. This will include uboot update, kernel update, and OS update. I'm going to take the same route as Paul Whalen with his blog post on putting <a href="http://paulfedora.wordpress.com/2010/05/13/installing-fedora-12-on-a-guruplug/">Fedora 12 on a micro SDHC card for the root filesystem</a>.<br />
<br />
In creating the root filesystem on the SDHC, I would recommend one thing to amend Paul's instructions with. Rather than a "cp -r" I would also use the "-a" option to preserve the mode, owenership, and timestamps of the files being copied.<br />
<br />
I did want to create a LVM volume group and logical volume and mount it so that I'd have more flexibility in resizing the filesystems if needed. However, it appears that the default kernel has no LVM capabilities. So for now, I'll just stick to a partition for the root filesystem.Anonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0tag:blogger.com,1999:blog-2093124616865576217.post-84166766360826107912010-09-26T14:15:00.000-07:002010-09-26T14:15:17.998-07:00The BeginningWorld blogging, not I<br />
Popularity noticed<br />
Reluctantly joinedAnonymoushttp://www.blogger.com/profile/10941327763577504629noreply@blogger.com0