BootStrap Python WebServer - Deprecated
Note : Une alternative préférable et surtout recommandée consiste désormais à installer la dernière version de la BusyBox avec le daemon httpd intégré. voir http://wizz-cc.blogspot.fr/2012/10/karotz-busybox-update_6.html
On utilisera pour cet exemple les scripts python déjà disponibles dans le système d'origine du Karotz.
Se connecter root puis se positionner sur /usr
# cd /usr
# wget http://karotz.wizz.cc/wizz_iis.tar
décompresser l'archive
# tar xf wizz_iis.tar
Rapatrier les scripts .py sur /usr
# mv www/*.py ./
Lancer le serveur - port 80 par défaut
# python wizz_iis.py [port] &
Lancer son navigateur préféré sur l'ip de son Karotz !
Pour le lancement automatique, ajouter la ligne de commande au script de démarrage /usr/yaffs_start.sh (en fin de fichier)
/usr/bin/python /usr/wizz_iis.py &
Affichage des articles dont le libellé est system. Afficher tous les articles
Affichage des articles dont le libellé est system. Afficher tous les articles
dimanche 30 septembre 2012
jeudi 27 septembre 2012
Karotz - RootFS System Update
Mise à jour du système RootFS
Procédure : se connecter root en telnet - cf post précédent
** New ** : nouvelle mise à jour release r2
se positionner sur /usr/karotz - ce qui permet de conserver les fichiers images rootfs pour une utilisation ultérieure
# cd /usr/karotz
récupérer la dernière image rootfs sur wizz.cc
# wget http://karotz.wizz.cc/rootfs.wizz.120719r1.img.gz
# wget http://karotz.wizz.cc/rootfs.wizz.120719r1.img.gz.md5
vérification du checksum de l'image téléchargée
# md5sum rootfs.wizz.120719r1.img.gz
# cat rootfs.wizz.120719r1.img.gz.md5
si les 2 checksum sont identiques alors on peut flasher
# /sbin/flash_eraseall /dev/mtd2
# /sbin/nandwrite -pm /dev/mtd2 rootfs.wizz.120719r1.img.gz
# reboot
Modified : linuxrc, /karotz/etc/passwd, /karotz/etc/inittab, /karotz/scripts/rootfs_update.sh, /karotz/scripts/yaffs_update.sh, etc...
L'accès Telnet de type root est désormais permanent - 2 utilisateurs de type root ont été ajoutés karotz & wizz. Les mises à jour automatiques sont désactivées. On pourra tjs les faire manuellement... à conditions qu'il y en ait de nouvelles ;-)
On peut désormais jouer avec son linux embarqué... Attention qd même à ce que vous faites...
+ Pour autoriser plusieurs sessions telnet simultanées, ajouter un fichier securetty dans /usr/etc avec les lignes pts/0 pts/1 etc...
Pour revenir - si besoin - au dernier système rootfs Violet, suivre la même procédure en téléchargeant l'image Violet 12071900 :
# wget http://karotz.wizz.cc/rootfs.violet.120719r0.img.gz
# wget http://karotz.wizz.cc/rootfs.violet.120719r0.img.gz.md5
Procédure : se connecter root en telnet - cf post précédent
** New ** : nouvelle mise à jour release r2
se positionner sur /usr/karotz - ce qui permet de conserver les fichiers images rootfs pour une utilisation ultérieure
# cd /usr/karotz
récupérer la dernière image rootfs sur wizz.cc
# wget http://karotz.wizz.cc/rootfs.wizz.120719r1.img.gz
# wget http://karotz.wizz.cc/rootfs.wizz.120719r1.img.gz.md5
vérification du checksum de l'image téléchargée
# md5sum rootfs.wizz.120719r1.img.gz
# cat rootfs.wizz.120719r1.img.gz.md5
si les 2 checksum sont identiques alors on peut flasher
# /sbin/flash_eraseall /dev/mtd2
# /sbin/nandwrite -pm /dev/mtd2 rootfs.wizz.120719r1.img.gz
# reboot
Modified : linuxrc, /karotz/etc/passwd, /karotz/etc/inittab, /karotz/scripts/rootfs_update.sh, /karotz/scripts/yaffs_update.sh, etc...
L'accès Telnet de type root est désormais permanent - 2 utilisateurs de type root ont été ajoutés karotz & wizz. Les mises à jour automatiques sont désactivées. On pourra tjs les faire manuellement... à conditions qu'il y en ait de nouvelles ;-)
On peut désormais jouer avec son linux embarqué... Attention qd même à ce que vous faites...
+ Pour autoriser plusieurs sessions telnet simultanées, ajouter un fichier securetty dans /usr/etc avec les lignes pts/0 pts/1 etc...
Pour revenir - si besoin - au dernier système rootfs Violet, suivre la même procédure en téléchargeant l'image Violet 12071900 :
# wget http://karotz.wizz.cc/rootfs.violet.120719r0.img.gz
# wget http://karotz.wizz.cc/rootfs.violet.120719r0.img.gz.md5
Rappel des partitions sur la nand :
dev: size erasesize name
mtd0: 00040000 00020000 bootloader
mtd1: 00300000 00020000 Kernel
mtd2: 00500000 00020000 ramdisk - / RootFS (ro)
mtd3: 00300000 00020000 kernel rescue
mtd4: 00500000 00020000 ramdisk rescue
mtd5: 00300000 00020000 yaffs rescue
mtd6: 0ea00000 00020000 yaffs - /usr (rw)
mtd7: 000c0000 00020000 mystery box
dev: size erasesize name
mtd0: 00040000 00020000 bootloader
mtd1: 00300000 00020000 Kernel
mtd2: 00500000 00020000 ramdisk - / RootFS (ro)
mtd3: 00300000 00020000 kernel rescue
mtd4: 00500000 00020000 ramdisk rescue
mtd5: 00300000 00020000 yaffs rescue
mtd6: 0ea00000 00020000 yaffs - /usr (rw)
mtd7: 000c0000 00020000 mystery box
dimanche 1 janvier 2012
Karotz - Boot Process
Le Karotz est architecturé autour d'une carte Pragmatec ARM9 et d'un module 2440 sur lequel tourne un Linux 2.6.28. Pour le développement croisé voir le pdf ARM9 Dev Starter Kit.
Boot
- Machine: RABBITV3 by PRAGMATEC
CPU: ARM920T [41129200] revision 0 (ARMv4T) - pict - pdf - html
CPU: Module 2440SODIMM S3C2440A
Os: Linux version 2.6.28-pragmatec - Faq - pdf
BusyBox v1.17.4 - GCC: (GNU) 3.2.2 (Buildroot 2010.11) 4.3.5
ARM9 Development Starter Kit
- linuxrc - view
- dmesg - view karotz_sys_dmesg.txt
- whoami - root
- mount
rootfs on / type rootfs (rw)
/dev/root on / type cramfs (ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw)
ramfs on /var type ramfs (rw)
none on /dev type tmpfs (rw,mode=755)
/dev/uba1 on /mnt/usbkey type vfat
(rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
/dev/mtdblock6 on /usr type yaffs (rw)
none on /dev/pts type devpts (rw,mode=622)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
- cat /etc/inittab - ln /karotz/etc/inittab
# Startup the system
::once:/karotz/scripts/karotz_init.sh
::respawn:/karotz/bin/power
# Configuration programm
::once:/usr/scripts/miniusb_read.sh
::restart:/sbin/init
#::askfirst:/bin/bash
# Stuff to do before rebooting
::shutdown:/karotz/scripts/karotz_shutdown.sh
::shutdown:/bin/umount -a -r
- ll -lR - view karotz_sys_dir.txt
- ps
PID USER COMMAND
1 root /bin/sh /linuxrc
2 root [kthreadd]
3 root [ksoftirqd/0]
4 root [watchdog/0]
5 root [events/0]
6 root [khelper]
155 root [kblockd/0]
166 root [khubd]
169 root [kseriod]
195 root [pdflush]
196 root [pdflush]
197 root [kswapd0]
198 root [aio/0]
199 root [nfsiod]
886 root [scsi_tgtd/0]
892 root [mtdblockd]
893 root [nftld]
894 root [inftld]
923 root [s3c2410-spi.0]
931 root [uwbd]
944 root [wusbd]
979 root [hid_compat]
1020 root [rpciod/0]
1067 root [rt73usb]
1377 root /karotz/bin/led -l FFCFAF -p 000000 -d 1500
1380 root /sbin/inetd /tmp/wizz_inetd_telnet.conf
1346 root /sbin/inetd
1382 root ps
- cat /etc/group - ln /karotz/etc/group
root:*:0:
daemon:*:1:
bin:*:2:
sys:*:3:
adm:*:4:
tty:*:5:
disk:*:6:
lp:*:7:
mail:*:8:
news:*:9:
uucp:*:10:
kmem:*:15:
dbus:x:81:
ppp:x:99:
nogroup:x:100:
- cat /etc/passwd - ln /karotz/etc/passwd
root:*:0:0:root:/usr/karotz:/bin/bash
bin:*:1:1:bin:/bin:
daemon:*:2:2:daemon:/sbin:
nobody:*:99:99:Nobody:/:
dbus:x:81:81:dbus:/var/run/dbus:/bin/sh
- /bin/printenv
KMOD=/lib/modules/
TERM=linux
k_nbclick=0
LD_LIBRARY_PATH=/lib:/usr/lib
AUTO_UPDATE=yes
GST_REGISTRY_UPDATE=no
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:./
GST_REGISTRY=/usr/karotz/registry
devfs=udev
PWD=/
LANG=C
SHLVL=1
HOME=/
WIZZ_HOME=/usr/karotz
DISPLAY=unix:0.0
_=/bin/printenv
- /bin/busybox
BusyBox v1.17.4 (2012-03-29 10:05:08 CEST) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as.
Currently defined functions: where are chpasswd and ftpd? ;-))...
[, [[, addgroup, adduser, ar, arping, ash, awk, basename, bootchartd, bunzip2, bzcat, cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, devmem, df, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env, ether-wake, expr, false, fdflush, fdformat, fgconsole, fgrep, find, flock, fold, free, freeramdisk, fsck, fuser, getopt, getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod, install, ip, ipaddr, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kill, killall, killall5, klogd, last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, losetup, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma, makedevs, md5sum, mdev, mesg, mkdir, mkfifo, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, pipe_progress, pivot_root, poweroff, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot, renice, reset, resize, rev, rm, rmdir, rmmod, route, run-parts, runlevel, sed, seq, setarch, setconsole, setkeycodes, setlogcons, setsid, sh, sha1sum, sha256sum, sha512sum, sleep, smemcap, sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, umount, uname, uniq, unix2dos, unlzma, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, xz, xzcat, yes, zcat
Inscription à :
Articles (Atom)