Difference between revisions of "OLinuXino"
(→Linux) |
|||
Line 1: | Line 1: | ||
= Linux = | = Linux = | ||
+ | NOTE: My board failed, had to send it back but more than a month later there's still no news. I contacted Antratek multiple times, but they just say they forwarded my requests to Olimex. Grr. | ||
+ | |||
== Disk Image == | == Disk Image == | ||
I got a problem with the disk image. Although it was a 4GB SD card, there was not enough space on the card to fit the image. This caused problems with the /var directory. | I got a problem with the disk image. Although it was a 4GB SD card, there was not enough space on the card to fit the image. This caused problems with the /var directory. |
Latest revision as of 17:20, 8 March 2014
Linux
NOTE: My board failed, had to send it back but more than a month later there's still no news. I contacted Antratek multiple times, but they just say they forwarded my requests to Olimex. Grr.
Disk Image
I got a problem with the disk image. Although it was a 4GB SD card, there was not enough space on the card to fit the image. This caused problems with the /var directory.
I dumped the card back to disk to verify
$ dd if=/dev/sdf of=/tmp/sdcard.img $ ls -l /tmp/sdcard.img a20_debian_kernel_3_4_LAN_USBx2_Cards_LCD_HDMI_SATA_TS_X_GPIO_OTG_MIC_release5.img -rw-r--r-- 1 hans hans 3980394496 Jan 4 21:44 a20_debian_kernel_3_4_LAN_USBx2_Cards_LCD_HDMI_SATA_TS_X_GPIO_OTG_MIC_release5.img -rw-r--r-- 1 hans hans 3941597184 Jan 4 21:44 /tmp/sdcard.img
Clearly the sizes don't match. How to fix this? Well, the sdcard.img partition table is not correct, so delete the partition in the image and recreate it:
$ fdisk -u /tmp/sdcard.img
(delete (d) partition 2 and recreate it (n p), using the default parameters. The new partition will be a bit smaller. print the table (p) Then quit(q)).
You'll see that partition 2 starts at sector 34816. This way we know the offset for the loopback device (you need root):
# losetup /dev/loop0 /tmp/sdcard.img -o $((34816*512)) # losetup /dev/loop1 a20_debian_kernel_3_4_LAN_USBx2_Cards_LCD_HDMI_SATA_TS_X_GPIO_OTG_MIC_release5.img -o $((34816*512))
Format the new (correct) partition, copy the files, and write the image.
# mkfs.ext3 /dev/loop0 # mkdir /tmp/src /tmp/dest # mount /dev/loop0 /tmp/dest # mount /dev/loop1 /tmp/src # cp -ar /tmp/src /tmp/dest # umount /tmp/src /tmp/dest # dd bs=4M if=/tmp/sdcard.img of=/dev/sdf # sync
I found the info here
SPI
Currently looking at SPI support. Found this info that seems promising (haven't tested anything).