Outils pour utilisateurs

Outils du site


cubieboard:start

La Cubieboard

Basée sur un A10 , 1Ghz, 4Go de NAND, 512 Mo de RAM … mieux que Beagleboard pour …50€

http://docs.cubieboard.org/tutorials/dvk521/start

Avant tout , je trouve un fonctionnement curieux. Si apres tout un tas de manip on arrive a un blocage au boot apres la ligne 'flash..' et que rien n'y fait ( enfin, je n'ai pas trouvé, plusieurs u-boot,script.bin etc), une chose extraordinaire se passe après un certain temps sans rien faire sur la carte .. le boot refonctionne. franchement c'est tres chiant.

Je mets en dessous la trace d'u-boot revenue la miraculeusement après une nuit de sommeil.

HELLO! BOOT0 is starting!
boot0 version : 1.5.1
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x0003c000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.133] boot1 version : 1.4.0
[       0.133] pmu type = 3
[       0.135] bat vol = 0
[       0.161] axi:ahb:apb=3:2:2
[       0.161] set dcdc2=1400, clock=1008 successed
[       0.163] key
[       0.175] no key found
[       0.175] flash init start
[       2.289] flash init finish
[       2.290] fs init ok
[       2.291] fattype FAT12
[       2.291] fs mount ok
[       2.298] script finish
[       2.299] power finish
[       2.306] BootMain start
[       2.306] 0
[       2.341] key value = 0
[       2.341] recovery key high 6, low 4
[       2.341] unable to find fastboot_key key_max value
[       2.349] test for multi os boot with display
[       2.351] logo name is invalid or dont need show logo
[       2.356] load kernel start
[       2.383] load kernel successed
[       2.383] start address = 0x4a000000
[       2.385] jump to


U-Boot 2013.01-05530-g8843079-dirty (Feb 04 2013 - 02:41:41) Allwinner Technology 

Board: Cubieboard
I2C:   ready
DRAM:  1 GiB
NAND:  0 MiB
MMC:   SUNXI SD/MMC: 0
MMC init failed
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   wemac
Hit any key to stop autoboot:  0 
sun4i#printenv
baudrate=115200
boot_nand=ext4load nand 1:0 0x48000000 /boot${kernel} && bootm 0x48000000
bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n ${uenvcmd}; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run setargs boot_nand;
bootdelay=3
bootenv=/uEnv.txt
bootscr=/boot.scr
console=ttyS0,115200
ethact=wemac
kernel=/uImage
loadbootenv=ext4load nand 1:0 $scriptaddr /boot${bootenv} || fatload nand 0:0 $scriptaddr ${bootenv}
loadbootscr=ext4load nand 1:0 $scriptaddr /boot${bootscr} || fatload nand 0:0 $scriptaddr ${bootscr}
loglevel=8
panicarg=panic=10
root=/dev/nandb rootwait
scriptaddr=0x44000000
setargs=setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial

Environment size: 930/131068 bytes
sun4i#

à noter que les autre u-boot que j'avais n'implémentait pas ext4load, ce qui explique juste le blocage.

Bref

recup d'une wheezy : http://cubian.org/downloads/

après boot login username et password : cubie

sudo ~/nandinstall/install.sh
ou
apt-get install cubian-nandinstall
sudo cubian-nandinstall

Add GPG key

wget -O - http://packages.cubian.org/cubian.gpg.key 
apt-key add -

ajouter

 deb http://packages.cubian.org/ wheezy main 

puis apt-get update

Resizing the partition (Remember this must only be done from a live“SD”)

cubian-resizefs /dev/nandd

sinon Installation sur la flash récuperer http://dl.cubieforums.com/loz/boot_partition/bootloader/cubie_nand_uboot_partition_image.bin sur une clé

#axel http://dl.cubieforums.com/loz/boot_partition/bootloader/cubie_nand_uboot_partition_image.bin
dd if=cubie_nand_uboot_partition_image.bin of=/dev/nand bs=4096
sync
#attendre 1 min

#format the nandb partition as ext4
mkfs.ext4 /dev/nandb
mount /dev/nandb /mnt

# copie rootfs
rsync -avc --exclude-from=/excludefile / /mnt

mkdir /tmp/boot
mount /dev/mmc0blk0p1 /tmp/boot

#make a boot folder on our nandb
mkdir /mnt/boot 
cp /tmp/boot/uImage /mnt/boot/uImage

#ssh key
cd /etc/ssh
ssh-keygen -t rsa1 -f ssh_host_key -N ""
ssh-keygen -t rsa -f ssh_host_rsa_key -N ""
ssh-keygen -t dsa -f ssh_host_dsa_key -N ""

umount /mnt
umount /tmp/boot
sync

une fois installé

refaire le kernel

Départ de la debian armhf

apt-get install uboot-mkimage libncurses5-dev

config-cubie.txt

make uImage modules

restera a recopier le kernel et les modules

cp arch/arm/boot/uImage /boot
mkdir -p ../modules
rm -rf ../modules/*
make modules_install INSTALL_MOD_PATH=../modules/
cd ../modules
tar cvfz modules.tgz *

cd /
#tar xvfz ...

GPIO

  • I2C , i2c-detect donne 3 port utilisables (TWI)
    • pin 6 du connecteur cote réseau: PB18 (TWI1-SCK)
    • pin 7 : PB19 (TWI1-SDA)
    • script.txt:
      [twi0_para]
      twi0_used = 1
      twi0_scl = port:PB00<2><default><default><default>
      twi0_sda = port:PB01<2><default><default><default>
      #  pas visibles
      
      [twi1_para]
      twi1_used = 1
      twi1_scl = port:PB18<2><default><default><default>
      twi1_sda = port:PB19<2><default><default><default>
      # broches 2 : 6 et 7
       
      [twi2_para]
      twi2_used = 1
      twi2_scl = port:PB20<2><default><default><default>
      twi2_sda = port:PB21<2><default><default><default>
      #  pas visibles
  • SPI
[spi0_para]
spi_used = 1
spi_cs_bitmap = 1
spi_cs0 = port:PI10<3><default><default><default>
spi_sclk = port:PI11<3><default><default><default>
spi_mosi = port:PI12<3><default><default><default>
spi_miso = port:PI13<3><default><default><default>
  • 45 PI10 (SPI0-CS/UART5-TX/EINT22)
  • 46 PI12 (SPI0-MOSI/UART6-TX/EINT24)
  • 47 PI11 (SPI0-CLK/UART5-RX/EINT23)
  • 48 PI13 (SPI0-MISO/UART6-RX/EINT25)
  • 7 pins pour IRQ PH7, PH14, PH15, PI10, PI11, PI12 and PI13

http://quick2wire.com/articles/how-to-add-quick2wire-as-a-raspbian-software-source/

les 2 LEDS

de :http://linux-sunxi.org/Cubieboard/Programming/StatusLEDs

  echo 255 > /sys/class/leds/blue\:ph21\:led2/brightness
  echo timer > /sys/class/leds/blue\:ph21\:led2/trigger
  echo mmc0 > /sys/class/leds/blue\:ph21\:led2/trigger
  echo heartbeat > /sys/class/leds/blue\:ph21\:led2/trigger
  cat /sys/class/leds/blue\:ph21\:led2/trigger pour les infos

sur la cubian un simple python script to turn on an LED on Pin 61

# Pin 61 is PI13 (Port I, 201+13) = gpio214
int gpio = 214
#export the pin
f= open ('/sys/class/gpio/export','w')
f.write(str(gpio))
f.close()
# Set the direction
path = '/sys/class/gpio/gpio' + gpio + '/direction'
f= open (path,'w')
f.write('out')
f.close()
#write '1' to the pin value
path = '/sys/class/gpio/gpio' + gpio + '/value'
f= open (path,'w')
f.write('1')
f.close()

boot partout

bootcmd=nfs 0x43000000 192.168.1.10:/home/cubieboard/script.bin; nfs 0x48000000 192.168.1.10:/home/cubieboard/uImage; bootm 0x48000000

Trucs qui marchent

  • jack2 jack-1.9.9.tar.bz2 attention a supprimer TOUT les lib*jack* faire un find /usr -name “*jack*” avant pour les trouver. Installation par ./waf install
  • pd-0.44.0-extended-20130522.deb compilé sur la cubie
    • chmod 4755 /usr/bin/pd-extended 
    •  apt-get install fake-hwclock 

      faire le crontab a * * * * *

en commandes groupées

http://www.watterott.com/en/Power-Supply-5V-3A ? a voir

  • Alain
  • Antoine V
  • Antoine T
  • Ben
  • Antoën
cubieboard/start.txt · Dernière modification : 2024/02/09 17:10 de 127.0.0.1