Quick jump:  What's new

 
Go to:
 
Weblog: linux   
in Dobrica Pavlinušić's random unstructured stuff
GK802

https://github.com/imx6-dongle
https://github.com/imx6-dongle/wiki/wiki
https://github.com/imx6-dongle/wiki/wiki/GK802-hardware



Bus 001 Device 045: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX6Q SystemOnChip in RecoveryMode




chroot

root@nuc:/tmp/n3# cp `which qemu-arm-static` usr/bin/
root@nuc:/tmp/n3# chroot .
root@nuc:/# uname -a
Linux nuc 4.4.0-1-amd64 #1 SMP Debian 4.4.4-1 (2016-03-07) armv7l GNU/Linux
root@nuc:/# file /bin/bash 
/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=1a8601b954c83a01d91298d0f2f8f61ca033ebdd, stripped




u-boot

compile

https://github.com/imx6-dongle/wiki/wiki/U-Boot-basics

dpavlin@nuc:/nuc/imx6/uboot-imx6dongle$


sudo apt-get install make gcc-arm-none-eabi libusb-1.0

export ARCH=arm
export CROSS_COMPILE=arm-none-eabi-

make gk802_config

make

dut

pi@rpi2 ~/imx6/uboot-imx6dongle $ git remote -v
origin  https://github.com/imx6-dongle/uboot-imx6dongle (fetch)
origin  https://github.com/imx6-dongle/uboot-imx6dongle (push)

pi@rpi2 ~/imx6/uboot-imx6dongle $ make gk802_config
Configuring for gk802 - Board: gk802, Options: IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg

pi@rpi2 ~/imx6/uboot-imx6dongle $ sudo apt-get install libusb-1.0

make gk802_config tools

sudo ./tools/imxboot /nuc/imx6/uboot-imx6dongle/u-boot.imx


boot

CPU:   Freescale i.MX6Q rev1.1 at 792 MHz                                                         
CPU:   Temperature 12 C, calibration data: 0x5834de7d                                             
Reset cause: POR                                                                                  
Board: MX6Q-gk802                                                                                 
DRAM:  1 GiB                                                                                      
MMC:   FSL_SDHC: 0, FSL_SDHC: 1                                                                   
enable_hdmi: setup HDMI monitor                                                                   
Display: HDMI (1024x768)                                                                          
In:    serial                                                                                     
Out:   serial                                                                                     
Err:   serial                                                                                     

kernel

sources

compile kernel 4.4

dpavlin@klin:/klin/imx6/linux-imx$ git remote -v
boundarydevices https://github.com/boundarydevices/linux-imx6 (fetch)
boundarydevices https://github.com/boundarydevices/linux-imx6 (push)
gk802   https://github.com/imx6-dongle/linux-imx.git (fetch)
gk802   https://github.com/imx6-dongle/linux-imx.git (push)
origin  https://github.com/xobs/novena-linux (fetch)
origin  https://github.com/xobs/novena-linux (push)
patrykk https://github.com/patrykk/linux-udoo (fetch)
patrykk https://github.com/patrykk/linux-udoo (push)

dpavlin@klin:/klin/imx6/linux-imx$ git checkout -b patrykk/4.4-5.0.11.p7.3 remotes/patrykk/4.4-5.0.11.p7.3

dpavlin@klin:/klin/imx6/linux-imx$ sudo apt-get install firmware-realtek



dpavlin@klin:/klin/imx6/linux-imx$ git checkout -b imx_3.10.17_1.0.0_ga remotes/gk802/imx_3.10.17_1.0.0_ga
Checking out files: 100% (34524/34524), done.
Branch imx_3.10.17_1.0.0_ga set up to track remote branch imx_3.10.17_1.0.0_ga from gk802.
Switched to a new branch 'imx_3.10.17_1.0.0_ga'

dpavlin@klin:/klin/imx6/linux-imx$ make gk802_defconfig

export ARCH=arm
export CROSS_COMPILE=arm-none-eabi-

LOADADDR=0x10800000 make uImage modules -j 4


#mkdir /tmp/boot
#INSTALL_PATH=/tmp/boot make install

mkdir /tmp/modules
INSTALL_MOD_PATH=/tmp/modules make modules_install

compile 3.0.x

https://github.com/imx6-dongle/wiki/wiki

http://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/arm-linux-gnueabi/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabi.tar.xz

pinout

gk802-pinout.jpg

older stuff

Hi-802 is clone of this one

Serial

http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=50&t=226&start=210#p6651
http://www.junklet.net/test/gk802_serial.jpg

XBMC

external player http://www.xbmcandroid.com/2012/12/10/how-to-install-xbmc-nightly-with-external-player-on-the-mk802-stick-or-other-android-tv-devices/

Linux

http://www.junklet.net/test/gk802_boot.txt
https://wiki.linaro.org/Boards/MX6QSabreLite
http://boundarydevices.com/linaro-12-09-for-i-mx6/

permalink
GNU fdisk broken

I have been backing up whole disk image from Eee PC, and mounting it using loop file system to access partition in it. However, I have problems with GNU fdisk which reports 4Gb image as:


Disk /backup/eee/hda: 3 GB, 3997486080 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7807590 sectors
Units = sectors of 1 * 512 = 512 bytes


 Device Boot Start End Blocks Id System
 /backup/eee/hda1 63 4803435 2409718 83 Linux
 /backup/eee/hda2 4819563 7759395 1469947 83 Linux
 /backup/eee/hda3 7775523 7775460 0 c FAT32 LBA
 /backup/eee/hda4 7791588 7791525 0 ef EFI FAT

For a start, disk size is wrong:


$ ls -al hda
-rwxrwxrwx 1 dpavlin root 4001292288 2008-01-20 00:59 hda


And then, even more wrong, offsets of partition seem to be wrong. When same image is examined using fdisk from util-linux, sectors are reported like this:


Disk hda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x332b332a


Device Boot Start End Blocks Id System
 hda1 63 4819499 2409718+ 83 Linux
 hda2 4819500 7775459 1477980 83 Linux
 hda3 7775460 7791524 8032+ c W95 FAT32 (LBA)
 hda4 7791525 7807589 8032+ ef EFI (FAT-12/16/32)

And this is correct (let's ignore size for now). I can verify this by mounting second file system as:


sudo mount hda 1 -o loop,offset=`expr 4819500 \* 512`


This seems to be off-by-one error. There is bug reported against Debian package which seems related, but than again, in my case I'm examining same disk image.

permalink
Eee PC saga -- with partial happy end

So, I began looking for Eee PC last year (well, more than two weeks ago, anyway) and my original plan was to buy one while I'm in Berlin for new year. However, since there wasn't any Eees available in Germany until second week of 2008, I was in some disspair becuause we where leaving on 6th.

You can understand when I read Avian's blog post about his new Eee PC. He is in Slovenia, and I'm in Germany and he managed to buy it? How? Quick e-mail later, and he said that it's available in Building of Fun, some kind of on-line web shop in Ljubljana. Since Slovenia is so much closer to Croatia than Germany (in which I was at that time) I just postponed my purchase for better times. In meantime, Kost got interested also, and after return to Croatia he contacted them and we bought our units.

That would be happy part of story, if only one of them didn't have one constantly lit LCD pixel. Reviewing ASUS warranty, I found that I found one point:

 2. TFT LCD defect policy -- Eee PC does not provide ZBD (Zero Bright Dot) warranty for TFT LCD screens.

Yes, it's in there, one you buy the unit, that is. Since we couldn't replace it today I guess I'm out of luck. I will try some of software solutions over the night in hope that it will go away, but some more drastic measures like rubbing LCD screen gently are just too much to ask from me...

Other than that, it's a great device: designed for wifi communication, quick browsing and occasional terminal session using ctrl+alt+t. It's not designed to be primary PC, but all features are so well integrated and working seamlessly that I will have hard time reinstalling it with Debian. Until I need dwm which I got used to so much. I can probably wait for a few more hours :-)

I can't say anything about battery life, other than fact that it got half-filled in two hours while I was working on it with wifi. I will do some monitoring to see how well is battery holding on this device (there isn't acpi command, but all /proc entries are there, so it shouldn't be problem).

Form-factor is just great. Yeah, keyboard is small, but I can type on it (with my big fingers) without any problems. We did try to boot few distribution from USB stick (including Puppy and some Slackware derivative) without any problems. Well, there shouldn't be any: this is basically a palm-top size Intel box (at last!) with strange screen size of 800*480.

After first day with my Eee PC, I'm very pleased with it. To make things a bit easier now that I'm back on ThnikPad, I edited /etc/X11/xinit/xserverrc to remove -nolisten tcp, restarted X using ctrl+alt+backspace, typed xhost mylaptop.lan on eeepc and then started x2x -west -to eeepc.lan:0 on my laptop and now I can pass from laptop to eeepc sitting on left with just a mouse move. Sweet.

permalink
NSLU2

In my last visit to 24C3, I also got one of 99 EUR NSLU2 Slug devices.



unslug Linksys firmware

sudo apt-get install upslug2

existing firmware version

sudo upslug2 -t 00:1A:70:95:AD:6D -v
NSLU2     00:1a:70:95:ad:6d Product ID: 1 Protocol ID: 0 Firmware Version: R23VA5 [0x23A5]

flash

Flasing has great user interface:

sudo upslug2 -t 00:1A:70:95:AD:6D -i slugosbe-4.8-beta-nslu2.bin    
Upgrading LKG95AD6D 00:1a:70:95:ad:6d
    . original flash contents  * packet timed out
    ! being erased             - erased
    u being upgraded           U upgraded
    v being verified           V verified 

  Display:
    <status> <address completed>+<bytes transmitted but not completed>
  Status:
    * timeout occured          + sequence error detected

  4605bf+000000 ...UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUu----------------------------

First flashing didn't end up quite well, since I got blinking green/amber led (even after power cycle). After that, I plugged 4Gb USB stick into port 2, re-flashed unit again, and it booted!

first login

Default password after flasing is: opeNSLUg

networking

Useful one-liner because I want to allocate default NSLU IP 192.168.1.77 to eth0 on which it is connected while rest of my network if same class 192.168.1.0/24 but on wifi.

ifconfig eth0 192.168.1.76 pointopoint 192.168.1.77 netmask 255.255.255.254 up

links

fetchrss: http://del.icio.us/rss/dpavlin/nslu2
  • There was an error: 500 Server closed connection without sending any data back

permalink
iBook

Linux installation on Apple iBook G4

Based on instructions from:

Download files from http://http.us.debian.org/debian/dists/testing/main/installer-powerpc/current/images/powerpc/netboot/ (except mini.iso) by alt+clink on filenames and put it in root folder of first HFS+ partition.

My df output follows:

mac:~ apollo$ df
Filesystem              512-blocks     Used    Avail Capacity  Mounted on
/dev/disk0s3              18612224 16109544  2316560    87%    /
devfs                          195      195        0   100%    /dev
fdesc                            2        2        0   100%    /dev
<volfs>                       1024     1024        0   100%    /.vol
/dev/disk0s5              79199360 46155456 33043904    58%    /Volumes/ko3moc
automount -nsl [201]             0        0        0   100%    /Network
automount -fstab [206]           0        0        0   100%    /automount/Servers
automount -static [206]          0        0        0   100%    /automount/static
permalink
Cisco VPN

Use vpnc instead of Cisco VPN client



Source

svn co http://svn.unix-ag.uni-kl.de/vpnc/trunk vpnc
cd vpnc
make
sudo make install

Support template

pcf2vpnc Support_template.pcf > /etc/vpnc/foobar.conf

Hash password security, eh?

Start connection

sudo /usr/local/sbin/vpnc --no-detach --debug 2 foobar

Fix routes

I didn't like that all my traffic was going over VPN

sudo route del default
route add default gw 192.168.1.1
route add -net 192.168.4.0 netmask 255.255.255.0 dev tun0
permalink
OpenMoko arrived

After four (4) weeks of waiting from the moment credit card has been charged, it finally arrived. It seems that shipping GSM-like devices to Croatia as person (as opposed to company) isn't something envisioned by Hrvatske agencije za telekomunikacije so we had to get additional papers (most of which I don't have) and in the end they settled with hardware specification of Neo1973 from OpenMoko wiki.

I must say that people all over the process where helpful and nice: we had to communicate much more with them then I hoped, but in the end it worked out o.k.

And now several obligatory pictures (hopefully not redundant :-)

http://blog.rot13.org/2007/08/24/openmoko-goodies.jpghttp://blog.rot13.org/2007/08/24/openmoko-size.jpghttp://blog.rot13.org/2007/08/24/openmoko-assembly_required.jpg

After that I got rootfs flashed and I now have new (semi-functional) phone :-)


root@fic-gta01:~$ cat /proc/cpuinfo
Processor       : ARM920T rev 0 (v4l)
BogoMIPS        : 132.71
Features        : swp half thumb
CPU implementer : 0x41
CPU architecture: 4T
CPU variant     : 0x1
CPU part        : 0x920
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format A
Cache format    : Harvard
I size          : 16384
I assoc         : 64
I line length   : 32
I sets          : 8
D size          : 16384
D assoc         : 64
D line length   : 32
D sets          : 8


Hardware : GTA01
 Revision : 0240
 Serial : 0000000000000000
 root@fic-gta01:~$ free
 total used free shared buffers cached
 Mem: 126644 52604 74040 0 84 39100
 -/+ buffers/cache: 13420 113224
 Swap: 0 0 0
 root@fic-gta01:~$ df
 Filesystem 1k-blocks Used Available Use% Mounted on
 /dev/mtdblock4 62576 42572 20004 68% /
 tmpfs 40 0 40 0% /mnt/.psplash
 /dev/mtdblock4 62576 42572 20004 68% /dev/.static/dev
 tmpfs 2048 64 1984 3% /dev
 tmpfs 63320 4 63316 0% /tmp
 tmpfs 63320 116 63204 0% /var/volatile
 tmpfs 63320 16 63304 0% /dev/shm
 tmpfs 63320 0 63320 0% /media/ram
 /dev/mmcblk0p1 495168 0 495168 0% /media/card

permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...