Ostatecznie chyba tak zrobię, póki co jeszcze walczę....

Tak, stary temat wymagał przebudowy. Modem to MC8705. Ogólnie to działa z wersją 2.0, ale czasem nie startuje. Na wersji 3.2 działa bez zarzutu.

Właśnie, czyli nie ma. Ciekawe, że AA miało specjalny pakiet o nazwie sierra-directip, który właśnie zawierał wersję 3.2 modułu.

Witam Forumowiczów,
Nie jestem na bieżąco z OpenWrt, skąd chciałem zapytać jaka jest wersja modułu kernela sierra_net.ko w CC. Próbuję taki moduł skompilować dla kernela 3.16 jednakże z marnym skutkiem. Sierra wypuściła ostatni driver dla kernala 3.0, niestety po drodze zmieniło się API kernala dotyczące USB. Standardowy kernel zawiera ten moduł w wersji 2.0, aktualna to 3.2, wiem, że AA miało wersję 3.2, ale na starszy kernal. Dlatego się zastanawiam, może CC ma jakiś patch na to.

Nie łatwo ale daje się podmienić na najnowszą wersję uhttpd dla AA. Faktycznie funkcjonalność której szukam pojawiła się dopiero w wersji 2015.05.30 (add support for enforcing HTTPS). Funkcje tę załącza się parametrem -q przy uruchamianiu demona uhttpd.

Tak myślałem. Spróbuje podmienić uhttpd na tę wersję z CC.

Witam,
Tak zapytam trochę z innej beczki, zauważyłem w Twojej konfiguracji ciekawy parametr:

option redirect_https '1'

Czy oznacza on, że połączenie zawsze będzie przekierowane na https nawet jeśli przeglądarka zażąda http ?

Swego czasu szukałem na to rozwiązania, nie znalazłem, jednakże wpisanie tego parametru u mnie nie działa. Dodam, że używam uhttpd w wersji z AA czyli 2012.10.30.

8

(5 odpowiedzi, napisanych Oprogramowanie / Software)

Też kiedyś zastanawiałem się na NAS Synology. Jednakże zawsze czegoś brakowało, a to cena, a to głośny. Ostatecznie zdecydowałem się na Micro Server taki:
http://www.powerserver.pl/d8615_serwer_ … ecyfikacja
Postawiłem na tym CentOS a potem to wszystko co potrzebuję (NFS, Samba, Dropbox, git i inne narzędzia których próżno szukać w gotowych produktach). Myślę, że jest to rozwiązanie najbardziej elastyczne.

OK, chyba uwierzę, że było tak od zawsze, chociaż prawie dałbym sobie ręką obciąć, że zawsze widziałem root....

W każdym bądź razie doszedłem jak to zmienić, aby pliki w generowanym obrazie nie przenosiły uid/gid z hosta. Istnieje specjalny parametr o nazwie --squash-uids który należy dodać do wywołania narzędzia, które tworzy ostateczny obraz. W moim przypadku jest to mkfs.ubifs. Wystarczy w miejscu gdzie podawane są parametry obrazu (u mnie .../image/Makefile) dodać powyższy parametr, aby wszystkie pliki systemowe miały uid/gid ustawione na 0 (root).

root@flexibity:/etc# ls -l
lrwxrwxrwx    1 root     root             7 Oct 17  2014 TZ -> /tmp/TZ
-rw-r--r--    1 root     root           255 Oct 17  2014 banner
drwxr-xr-x    2 root     root           496 Oct 17  2014 config
drwxr-xr-x    2 root     root           160 Oct 17  2014 crontabs
-rw-r--r--    1 root     root            68 Jun 12  2014 diag.sh
drwxr-xr-x    2 root     root           392 Oct 17  2014 dropbear
lrwxrwxrwx    1 root     root            10 Oct 17  2014 fstab -> /tmp/fstab
lrwxrwxrwx    1 root     root            19 Oct 17  2014 functions.sh -> ../lib/functions.sh
-rw-r--r--    1 root     root           123 Jun 12  2014 group
-rw-r--r--    1 root     root            20 Jun 12  2014 hosts
drwxr-xr-x    5 root     root           360 Oct 17  2014 hotplug.d
-rw-r--r--    1 root     root           833 Jun 12  2014 hotplug2-common.rules
-rw-r--r--    1 root     root            80 Jun 12  2014 hotplug2-init.rules
-rw-r--r--    1 root     root           242 Oct 17  2014 hotplug2.rules
drwxr-xr-x    2 root     root          1216 Oct 17  2014 init.d
-rw-r--r--    1 root     root           136 Jun 12  2014 inittab
drwxr-xr-x    3 root     root           288 Oct 17  2014 mc
drwxr-xr-x    2 root     root           376 Oct 17  2014 modules-boot.d
drwxr-xr-x    2 root     root           968 Oct 17  2014 modules.d
lrwxrwxrwx    1 root     root            12 Oct 17  2014 mtab -> /proc/mounts
-rw-r--r--    1 root     root           209 Oct 17  2014 openwrt_release
-rw-r--r--    1 root     root             8 Oct 17  2014 openwrt_version
-rw-r--r--    1 root     root           188 Oct 17  2014 opkg.conf
-rw-r--r--    1 root     root           190 Jan  1 00:00 passwd
-rw-r--r--    1 root     root           190 Jun 12  2014 passwd-
-rwxr-xr-x    1 root     root           888 Jun 12  2014 preinit
-rw-r--r--    1 root     root           480 Jun 12  2014 profile
-rw-r--r--    1 root     root          2478 Jun 12  2014 protocols
-rwxr-xr-x    1 root     root          1555 Jun 12  2014 rc.common
drwxr-xr-x    2 root     root          1408 Oct 17  2014 rc.d
-rw-r--r--    1 root     root           132 Jun 12  2014 rc.local
lrwxrwxrwx    1 root     root            16 Oct 17  2014 resolv.conf -> /tmp/resolv.conf
-rw-r--r--    1 root     root            20 Oct 17  2014 screenrc
-rw-r--r--    1 root     root          4712 Oct 17  2014 ser2net.conf
-rw-r--r--    1 root     root          3017 Jun 12  2014 services
-rw-------    1 root     root           149 Jan  1 00:00 shadow
-rw-------    1 root     root           116 Jun 12  2014 shadow-
-rw-r--r--    1 root     root             9 Jun 12  2014 shells
-rw-r--r--    1 root     root           838 Jun 12  2014 sysctl.conf
-rw-r--r--    1 root     root           128 Jun 12  2014 sysupgrade.conf
drwxr-xr-x    2 root     root           160 Jan  1 00:00 uci-defaults
-rw-r--r--    1 root     root           509 Jan  1 00:00 uhttpd.crt
-rw-r--r--    1 root     root           608 Jan  1 00:00 uhttpd.key

Gdyby Ktoś korzystał z tych informacji, nich sprawdzi czy posiadana wersja mkfs obsługuje ten parametr. Szukając informacji natknąłem się na patche, które dodawały obsługę tego parametru w starych mkfs.ubifs.

Tak, ale wcześniej mam wrażenie że właścicielem wszystkich plików systemowych był root. Wrzuciłem jakiś stary obraz do urządzenia i też mam właściciela jako uid=1000...
Chwilka, może to zawsze tak było, tylko jakoś tego nie zauważyłem...
Cezary a w twoich obrazach kto jest właścicielem wszystkich plików - root ? czy uid twojego użytkownika na którym kompilujesz ?

Witam,
Ostatnio zauważyłem, że właścicielem wszystkich plików (systemowych) nie jest root tylko użytkownik o uid=1000. Jak zrobię ls to dostaję coś takiego:

root@flexibity:/etc# ls -l
lrwxrwxrwx    1 1000     1000             7 Oct 17 09:44 TZ -> /tmp/TZ
-rw-r--r--    1 1000     1000           255 Oct 17 09:21 banner
drwxr-xr-x    2 1000     1000           496 Oct 17 09:44 config
drwxr-xr-x    2 1000     1000           160 Oct 17 09:21 crontabs
-rw-r--r--    1 1000     1000            68 Jun 12 12:48 diag.sh
drwx------    2 root     1000           320 Oct 17 10:09 dropbear
lrwxrwxrwx    1 1000     1000            10 Oct 17 09:44 fstab -> /tmp/fstab
lrwxrwxrwx    1 1000     1000            19 Oct 17 09:44 functions.sh -> ../lib/functions.sh
-rw-r--r--    1 1000     1000           123 Jun 12 12:48 group
-rw-r--r--    1 1000     1000            20 Jun 12 12:48 hosts
drwxr-xr-x    5 1000     1000           360 Oct 17 09:44 hotplug.d
-rw-r--r--    1 1000     1000           833 Jun 12 12:48 hotplug2-common.rules
-rw-r--r--    1 1000     1000            80 Jun 12 12:48 hotplug2-init.rules
-rw-r--r--    1 1000     1000           242 Oct 17 09:12 hotplug2.rules
drwxr-xr-x    2 1000     1000          1216 Oct 17 09:44 init.d
-rw-r--r--    1 1000     1000           136 Jun 12 12:48 inittab
drwxr-xr-x    3 1000     1000           288 Oct 17 09:44 mc
drwxr-xr-x    2 1000     1000           376 Oct 17 09:44 modules-boot.d
drwxr-xr-x    2 1000     1000           968 Oct 17 09:44 modules.d
lrwxrwxrwx    1 1000     1000            12 Oct 17 09:44 mtab -> /proc/mounts
-rw-r--r--    1 1000     1000           209 Oct 17 09:21 openwrt_release
-rw-r--r--    1 1000     1000             8 Oct 17 09:21 openwrt_version
-rw-r--r--    1 1000     1000           188 Oct 17 09:13 opkg.conf
-rw-r--r--    1 1000     1000           190 Oct 17 10:14 passwd
-rw-r--r--    1 1000     1000           190 Jun 12 12:48 passwd-
-rwxr-xr-x    1 1000     1000           888 Jun 12 12:48 preinit
-rw-r--r--    1 1000     1000           480 Jun 12 12:48 profile
-rw-r--r--    1 1000     1000          2478 Jun 12 12:48 protocols
-rwxr-xr-x    1 1000     1000          1555 Jun 12 12:48 rc.common
drwxr-xr-x    2 1000     1000          1408 Oct 17 09:44 rc.d
-rw-r--r--    1 1000     1000           132 Jun 12 12:48 rc.local
lrwxrwxrwx    1 1000     1000            16 Oct 17 09:44 resolv.conf -> /tmp/resolv.conf
-rw-r--r--    1 1000     1000            20 Oct 17 09:14 screenrc
-rw-r--r--    1 1000     1000          4712 Oct 17 09:12 ser2net.conf
-rw-r--r--    1 1000     1000          3017 Jun 12 12:48 services
-rw-------    1 1000     1000           153 Oct 17 10:14 shadow
-rw-------    1 1000     1000           116 Jun 12 12:48 shadow-
-rw-r--r--    1 1000     1000             9 Jun 12 12:48 shells
-rw-r--r--    1 1000     1000           838 Jun 12 12:48 sysctl.conf
-rw-r--r--    1 1000     1000           128 Jun 12 12:48 sysupgrade.conf
drwxr-xr-x    2 1000     1000           160 Jan  1  1970 uci-defaults
-rw-r--r--    1 root     root           509 Jan  1  1970 uhttpd.crt
-rw-r--r--    1 root     root           607 Jan  1  1970 uhttpd.key

Wcześniej właścicielem wszystkich tych plików był root. Dotyczy to wszystkich plików systemowych.
Po ponownym skompilowaniu całości jest to samo. Dodam, że uid=1000 ma użytkownik na którym pracuję na komputerze host. Ktoś spotkał się z takim czymś ?

12

(6 odpowiedzi, napisanych Oprogramowanie / Software)

Wreszcie jakieś sensowne zastosowanie routera wink

13

(7 odpowiedzi, napisanych Oprogramowanie / Software)

Sprawdziłem, wszystko działa poprawnie. Zrobiłem przy okazji router GSM. Wyniki całkiem przyzwoite: ping 71ms, download 7,65Mbps, upload 1,44Mbps. Używam SIM operatora T-Mobile, który u mnie nie wspiera LTE, ciekawe jak bym spróbował na PLAY, bo modem mam LTE.

14

(7 odpowiedzi, napisanych Oprogramowanie / Software)

Przejrzałem wszystkie dostępne łaty, doszedłem czego brakuje w oryginalnych od AA. Otóż dla mojego przypadku wyrzuciłem oryginalną łatę 002-layer7_2.22.patch w kŧórej zostały wycięte ważne zmiany dla starszych kerneli (kernel 3.3 pewnie już to ma dlatego wycieli). Zamiast niej należy zaaplikować 100-netfilter_layer7_2.22.patch który jest dostępny w zasobie powyżej.
Kompilacja przechodzi bezbłędnie.
Muszę jeszcze tylko sprawdzić czy iptables w ogóle działa na sprzęcie.

15

(7 odpowiedzi, napisanych Oprogramowanie / Software)

Tak, na samym początku próbowałem z wersją 3.3, jednak pomimo udanej kompilacji kernel w ogóle nie startował. Długo nie szukałem przyczyny, użyłem więc 2.6.36, który wcześniej już miałem przetestowany i działający. I tak zostało. Do dzisiaj. Powalcze jeszcze trochę, może uda mi się połatać 2.6.36.

16

(7 odpowiedzi, napisanych Oprogramowanie / Software)

Zmiany które dodałem dotyczą tylko konfiguracji portów szeregowych, więc raczej to nie problem. Zapomniałem dopisać, że korzystam z kernela 2.6.36. Z rozwiązania podanego tutaj wynika, że potrzebne są dodatkowo biblioteki libip*tc i libipq, których w konfiguracji OpenWrt nie miałem. Dodałem je, więc teraz dostałem błędy dotyczące layer7 (najpierw brak nagłówka xt_layer7.h).
Natomiast tutaj widzę że dla wersji kernela 2.6.36 istnieje kilka patchy dotyczących netfiltera layer 7, których standardowo AA nie zawiera. Czy to dobry trop ? Kompiluję bez -j.

17

(7 odpowiedzi, napisanych Oprogramowanie / Software)

Witam Forumowiczów,
Po małej przerwie wracam do zabawy z OpenWrt. Między czasie zbudowałem swoją własną platformę sprzętową opartą na bazie modułu MMnet1001 firmy Propox. Z racji moich zajęć (automatyka i tym podobne) platforma zawiera wyposażenie "przemysłowe". Jeśli Ktoś jest zainteresowany szczegółami sprzętu proszę o info, wtedy napiszę coś więcej o działaniu i peryferiach. Foto mojego sprzętu:

PunBB bbcode test

Na płycie mam zainstalowane OpenWrt AA z gałęzi trunk, własna konfiguracja i niektóre patche obsługujące znajdujące się peryferia (głównie modem GSM i wszystkie porty szeregowe). Z racji tego, że są dwa interfejsy sieciowe (Ethernet i GSM) chciałem wrzucić iptables, ale jest jakiś problem. W konfiguracji OpenWrt zaznaczyłem tylko narzędzie iptables, dodałem również w kernelu wsparcie dla netfiltering. Przy próbie kompilacji całości jest problem w kompilacją narzędzia iptables:

sed -e 's/@PACKAGE_AND_VERSION@/iptables 1.4.10/g' -e '/@MATCH@/ r extensions/matches4.man' -e '/@TARGET@/ r extensions/targets4.man' iptables.8.in >iptables.8;
sed -e 's/@PACKAGE_AND_VERSION@/iptables 1.4.10/g' -e '/@MATCH@/ r extensions/matches6.man' -e '/@TARGET@/ r extensions/targets6.man' ip6tables.8.in >ip6tables.8;
make[6]: Leaving directory `/home/lukasz/multi/openwrt/build_dir/linux-at91_9260/iptables-1.4.10'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/lukasz/multi/openwrt/build_dir/linux-at91_9260/iptables-1.4.10'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/lukasz/multi/openwrt/build_dir/linux-at91_9260/iptables-1.4.10'
make[3]: *** [/home/lukasz/multi/openwrt/build_dir/linux-at91_9260/iptables-1.4.10/.built] Error 2
make[3]: Leaving directory `/home/lukasz/multi/openwrt/package/iptables'
make[2]: *** [package/iptables/compile] Error 2
make[2]: Leaving directory `/home/lukasz/multi/openwrt'
make[1]: *** [/home/lukasz/multi/openwrt/staging_dir/target-arm_v5te_uClibc-0.9.33.2_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/lukasz/multi/openwrt'
make: *** [world] Błąd 2

Poszperałem trochę w sieci, widzę że takie problemy się pojawiały już, ale nie mogę znaleźć rozwiązania, np. tutaj jest ten sam problem, ale śledząc rozwiązanie dochodzę, że potrzebne zmiany już mam. Również znaleziony patch nr 210 nie pomaga.
Może Ktoś z Forumowiczów już przerabiał ten temat i podpowie gdzie szukać przyczyny ?

Pozdrawiam

18

(79 odpowiedzi, napisanych Oprogramowanie / Software)

Nazwa modemu: Sierra Wireless MC8705
Vendor=1199 ProdID=68a3 Rev= 0.06
Interfejs diagnostyczny: /dev/ttyUSB3

Działa w trybie DirectIP opisany tutaj:
http://eko.one.pl/?p=openwrt-modemygsm# … ctipmodems

Modem jest co prawda w formie karty miniPCIe, ale korzysta z interfejsu USB.

Po małej przerwie... Podłożyłem oryginalną zawartość rootfs od producenta na kartę CompactFlash w ext2 i system uruchamia się. Kernel skompilowany z OpenWrt.

RomBOOT


U-Boot 1.3.4 (Jan 28 2010 - 11:36:04)

DRAM:  64 MB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xc1e1)
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0xa0000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   linux-2.6
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3336512 Bytes =  3.2 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Linux version 2.6.30 (lukasz@hp) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #3 Mon Sep 2 19:49:48 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Atmel AT91SAM9G20-EK
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,4M(linux),-(root) rw rootfstype=ext2 init=/etc/preinit
[    0.000000] NR_IRQS:192
[    0.000000] AT91: 96 gpio irqs in 3 banks
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [ttyS0] enabled
[    0.080000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.090000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.100000] Memory: 64MB = 64MB total
[    0.110000] Memory: 61480KB available (3008K code, 241K data, 124K init, 0K highmem)
[    0.110000] Calibrating delay loop... 197.83 BogoMIPS (lpj=989184)
[    0.330000] Mount-cache hash table entries: 512
[    0.330000] CPU: Testing write buffer coherency: ok
[    0.340000] net_namespace: 296 bytes
[    0.350000] NET: Registered protocol family 16
[    0.360000] AT91: Power Management
[    0.360000] AT91: Starting after user reset
[    0.390000] bio: create slab <bio-0> at 0
[    0.400000] SCSI subsystem initialized
[    0.400000] usbcore: registered new interface driver usbfs
[    0.410000] usbcore: registered new interface driver hub
[    0.420000] usbcore: registered new device driver usb
[    0.430000] NET: Registered protocol family 2
[    0.430000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.440000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.450000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.450000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.460000] TCP reno registered
[    0.460000] NET: Registered protocol family 1
[    0.470000] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.480000] JFFS2 version 2.2. (NAND) Š 2001-2006 Red Hat, Inc.
[    0.490000] msgmni has been set to 120
[    0.490000] io scheduler noop registered
[    0.500000] io scheduler anticipatory registered (default)
[    0.540000] atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
[    0.550000] atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
[    0.560000] atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
[    0.570000] atmel_usart.3: ttyS3 at MMIO 0xfffb8000 (irq = 8) is a ATMEL_SERIAL
[    0.580000] atmel_usart.4: ttyS4 at MMIO 0xfffd0000 (irq = 23) is a ATMEL_SERIAL
[    0.580000] atmel_usart.5: ttyS5 at MMIO 0xfffd4000 (irq = 24) is a ATMEL_SERIAL
[    0.590000] atmel_usart.6: ttyS6 at MMIO 0xfffd8000 (irq = 25) is a ATMEL_SERIAL
[    0.620000] brd: module loaded
[    0.630000] loop: module loaded
[    0.630000] ssc ssc.0: Atmel SSC device at 0xc4898000 (irq 14)
[    0.640000] Driver 'sd' needs updating - please use bus_type methods
[    0.640000] scsi0 : pata_at91
[    0.650000] ata1: PATA max PIO4 mmio cmd 0x50c00000 ctl 0x50e00000 irq 88
[    0.660000] dm9000 Ethernet Driver, V1.31
[    0.660000] dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
[    0.670000] eth0 (dm9000): not using net_device_ops yet
[    0.680000] eth0: dm9000e at c4876000,c487e004 IRQ 89 MAC: 00:00:00:00:00:00 (chip)
[    0.690000] MACB_mii_bus: probed
[    0.690000] eth1: Atmel MACB at 0xfffc4000 irq 21 (00:04:9f:ef:01:01)
[    0.700000] eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
[    0.710000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
[    0.720000] AT91 NAND: 8-bit, Software ECC
[    0.730000] Scanning device for bad blocks
[    0.760000] 6 cmdlinepart partitions found on MTD device atmel_nand
[    0.770000] Creating 6 MTD partitions on "atmel_nand":
[    0.770000] 0x000000000000-0x000000020000 : "bootstrap"
[    0.780000] 0x000000020000-0x000000060000 : "uboot"
[    0.790000] 0x000000060000-0x000000080000 : "env1"
[    0.790000] 0x000000080000-0x0000000a0000 : "env2"
[    0.800000] 0x0000000a0000-0x0000004a0000 : "linux"
[    0.810000] 0x0000004a0000-0x000008000000 : "root"
[    0.810000] usbmon: debugfs is not available
[    0.820000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.830000] at91_ohci at91_ohci: AT91 OHCI
[    0.830000] at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
[    0.840000] at91_ohci at91_ohci: irq 20, io mem 0x00500000
[    0.850000] ata1.00: ATA-0: Turbo Industrial CF Card, YUAN1026, max UDMA/33
[    0.850000] ata1.00: 2031120 sectors, multi 0: LBA
[    0.880000] ata1.00: configured for PIO4
[    0.910000] usb usb1: configuration #1 chosen from 1 choice
[    0.920000] ata1.00: configured for PIO4
[    0.920000] ata1: EH complete
[    0.920000] scsi 0:0:0:0: Direct-Access     ATA      Turbo Industrial YUAN PQ: 0 ANSI: 5
[    0.930000] hub 1-0:1.0: USB hub found
[    0.940000] hub 1-0:1.0: 2 ports detected
[    0.940000] sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors: (1.03 GB/991 MiB)
[    0.950000] sd 0:0:0:0: [sda] Write Protect is off
[    0.960000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    0.970000]  sda: sda1
[    0.970000] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.980000] Initializing USB Mass Storage driver...
[    0.980000] usbcore: registered new interface driver usb-storage
[    0.990000] USB Mass Storage support registered.
[    0.990000] udc: at91_udc version 3 May 2006
[    1.000000] mice: PS/2 mouse device common for all mice
[    1.010000] rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
[    1.010000] IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
[    1.020000] rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
[    1.020000] i2c /dev entries driver
[    1.030000] at24 0-0050: 256 byte 24c02 EEPROM (writable)
[    1.030000] i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
[    1.040000] Registered led device: ds1
[    1.060000] usbcore: registered new interface driver usbhid
[    1.060000] usbhid: v2.6:USB HID core driver
[    1.070000] TCP cubic registered
[    1.070000] NET: Registered protocol family 17
[    1.070000] RPC: Registered udp transport module.
[    1.080000] RPC: Registered tcp transport module.
[    1.090000] rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
[    1.100000] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
[    1.110000] VFS: Mounted root (ext2 filesystem) on device 8:1.
[    1.120000] Freeing init memory: 124K
[    1.120000] Failed to execute /etc/preinit.  Attempting defaults...
running /etc/init.d/rcS
starting udevd...
cannot open /dev/null
[    2.090000] dm9000 dm9000.0: WARNING: no IRQ resource flags set.
[    2.140000] eth0: link down
[    2.180000] SPI-Microchip MCP2515 CAN Driver 3.5.3_SSV_MCP2515 (c) Jan 15 2010 14:56:33
[    2.180000]  Atmel AT91 and MCP2515 port by H.J. Oertel (oe@port.de)
[    2.190000]  MAX_CHANNELS 1
[    2.190000]  CAN_MAX_OPEN 2
[    2.250000] at91adc: Loaded module
/opt/apache/bin/apachectl start: httpd (pid 494) already running

Please press Enter to activate this console. [    3.690000] eth1: link up (100/Full)

running /etc/profile
~ $

Widać, że problem leży w samej zawartości rootfs którą generuje OpenWrt. Metoda kopiowania zawartości na nośnik jest raczej dobra, skoro inna zawartość się uruchamia. Może teraz Ktoś zauważy gdzie jest problem ?

Rootfs od producenta, który uruchamia się: http://www.embedded-systems.pl/sbc6020/ … 20.tar.bz2

Rootfs wygenerowany z OpenWrt który sprawia problem jak wyżej: http://www.embedded-systems.pl/sbc6020/ … tfs.tar.gz

Podstawiłem na próbę oryginalny skompilowany kernel od producenta, efekt identyczny, czyli chyba to nie sprawa lipnego kernela. Zaczynałem już tak mysleć.

Albo ja nie potrafię przygotować rootfs albo jest jakiś inny problem:

RomBOOT


U-Boot 1.3.4 (Jan 28 2010 - 11:36:04)

DRAM:  64 MB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xc1e1)
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0xa0000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   linux-2.6
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3385664 Bytes =  3.2 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Linux version 2.6.30 (lukasz@hp) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Thu Aug 29 12:23:24 CEST 2013
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Atmel AT91SAM9G20-EK
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 ubi.mtd=5 root=/dev/sda1 mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,4M(linux),-(root) rw rootfstype=ext2 init=/etc/preinit
[    0.000000] NR_IRQS:192
[    0.000000] AT91: 96 gpio irqs in 3 banks
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [ttyS0] enabled
[    0.080000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.090000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.100000] Memory: 64MB = 64MB total
[    0.110000] Memory: 61432KB available (3060K code, 241K data, 124K init, 0K highmem)
[    0.120000] Calibrating delay loop... 197.83 BogoMIPS (lpj=989184)
[    0.330000] Mount-cache hash table entries: 512
[    0.330000] CPU: Testing write buffer coherency: ok
[    0.340000] net_namespace: 296 bytes
[    0.350000] NET: Registered protocol family 16
[    0.360000] AT91: Power Management
[    0.360000] AT91: Starting after user reset
[    0.390000] bio: create slab <bio-0> at 0
[    0.400000] SCSI subsystem initialized
[    0.400000] usbcore: registered new interface driver usbfs
[    0.410000] usbcore: registered new interface driver hub
[    0.420000] usbcore: registered new device driver usb
[    0.430000] NET: Registered protocol family 2
[    0.430000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.440000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.450000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.450000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.460000] TCP reno registered
[    0.460000] NET: Registered protocol family 1
[    0.470000] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.480000] JFFS2 version 2.2. (NAND) (SUMMARY)  Š 2001-2006 Red Hat, Inc.
[    0.490000] JFFS2: default compression mode: priority
[    0.490000] msgmni has been set to 120
[    0.500000] io scheduler noop registered
[    0.500000] io scheduler anticipatory registered (default)
[    0.550000] atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
[    0.560000] atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
[    0.570000] atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
[    0.570000] atmel_usart.3: ttyS3 at MMIO 0xfffb8000 (irq = 8) is a ATMEL_SERIAL
[    0.580000] atmel_usart.4: ttyS4 at MMIO 0xfffd0000 (irq = 23) is a ATMEL_SERIAL
[    0.590000] atmel_usart.5: ttyS5 at MMIO 0xfffd4000 (irq = 24) is a ATMEL_SERIAL
[    0.600000] atmel_usart.6: ttyS6 at MMIO 0xfffd8000 (irq = 25) is a ATMEL_SERIAL
[    0.620000] brd: module loaded
[    0.630000] loop: module loaded
[    0.640000] ssc ssc.0: Atmel SSC device at 0xc4898000 (irq 14)
[    0.640000] Driver 'sd' needs updating - please use bus_type methods
[    0.650000] scsi0 : pata_at91
[    0.650000] ata1: PATA max PIO4 mmio cmd 0x50c00000 ctl 0x50e00000 irq 88
[    0.660000] dm9000 Ethernet Driver, V1.31
[    0.670000] dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
[    0.670000] eth0 (dm9000): not using net_device_ops yet
[    0.680000] eth0: dm9000e at c4876000,c487e004 IRQ 89 MAC: 00:00:00:00:00:00 (chip)
[    0.690000] MACB_mii_bus: probed
[    0.700000] eth1: Atmel MACB at 0xfffc4000 irq 21 (00:04:9f:ef:01:01)
[    0.700000] eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
[    0.720000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
[    0.730000] AT91 NAND: 8-bit, Software ECC
[    0.730000] Scanning device for bad blocks
[    0.770000] 6 cmdlinepart partitions found on MTD device atmel_nand
[    0.770000] Creating 6 MTD partitions on "atmel_nand":
[    0.780000] 0x000000000000-0x000000020000 : "bootstrap"
[    0.780000] 0x000000020000-0x000000060000 : "uboot"
[    0.790000] 0x000000060000-0x000000080000 : "env1"
[    0.800000] 0x000000080000-0x0000000a0000 : "env2"
[    0.800000] 0x0000000a0000-0x0000004a0000 : "linux"
[    0.810000] 0x0000004a0000-0x000008000000 : "root"
[    0.820000] UBI: attaching mtd5 to ubi0
[    0.820000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    0.830000] UBI: logical eraseblock size:    129024 bytes
[    0.830000] UBI: smallest flash I/O unit:    2048
[    0.840000] UBI: sub-page size:              512
[    0.840000] UBI: VID header offset:          512 (aligned 512)
[    0.850000] UBI: data offset:                2048
[    1.000000] UBI: attached mtd5 to ubi0
[    1.000000] UBI: MTD device name:            "root"
[    1.010000] UBI: MTD device size:            123 MiB
[    1.010000] UBI: number of good PEBs:        987
[    1.020000] UBI: number of bad PEBs:         0
[    1.020000] UBI: max. allowed volumes:       128
[    1.020000] UBI: wear-leveling threshold:    4096
[    1.030000] UBI: number of internal volumes: 1
[    1.030000] UBI: number of user volumes:     1
[    1.040000] UBI: available PEBs:             0
[    1.040000] UBI: total number of reserved PEBs: 987
[    1.050000] UBI: number of PEBs reserved for bad PEB handling: 9
[    1.050000] UBI: max/mean erase counter: 2/0
[    1.060000] UBI: background thread "ubi_bgt0d" started, PID 362
[    1.070000] usbmon: debugfs is not available
[    1.070000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.080000] at91_ohci at91_ohci: AT91 OHCI
[    1.080000] ata1.00: ATA-0: Turbo Industrial CF Card, YUAN1026, max UDMA/33
[    1.090000] ata1.00: 2031120 sectors, multi 0: LBA
[    1.100000] at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
[    1.100000] at91_ohci at91_ohci: irq 20, io mem 0x00500000
[    1.120000] ata1.00: configured for PIO4
[    1.160000] ata1.00: configured for PIO4
[    1.160000] ata1: EH complete
[    1.160000] scsi 0:0:0:0: Direct-Access     ATA      Turbo Industrial YUAN PQ: 0 ANSI: 5
[    1.180000] sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors: (1.03 GB/991 MiB)
[    1.190000] sd 0:0:0:0: [sda] Write Protect is off
[    1.190000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    1.200000]  sda: sda1
[    1.210000] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.210000] usb usb1: configuration #1 chosen from 1 choice
[    1.220000] hub 1-0:1.0: USB hub found
[    1.220000] hub 1-0:1.0: 2 ports detected
[    1.230000] Initializing USB Mass Storage driver...
[    1.230000] usbcore: registered new interface driver usb-storage
[    1.240000] USB Mass Storage support registered.
[    1.240000] udc: at91_udc version 3 May 2006
[    1.250000] mice: PS/2 mouse device common for all mice
[    1.260000] rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
[    1.260000] IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
[    1.270000] rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
[    1.270000] i2c /dev entries driver
[    1.280000] at24 0-0050: 256 byte 24c02 EEPROM (writable)
[    1.280000] i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
[    1.290000] Registered led device: ds1
[    1.310000] usbcore: registered new interface driver usbhid
[    1.310000] usbhid: v2.6:USB HID core driver
[    1.320000] TCP cubic registered
[    1.320000] NET: Registered protocol family 17
[    1.320000] RPC: Registered udp transport module.
[    1.330000] RPC: Registered tcp transport module.
[    1.340000] rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
[    1.350000] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
[    1.360000] VFS: Mounted root (ext2 filesystem) on device 8:1.
[    1.370000] Freeing init memory: 124K
[    1.370000] Warning: unable to open an initial console.
[    1.410000] Kernel panic - not syncing: Attempted to kill init!
[    1.410000] Backtrace:
[    1.420000] [<c002b35c>] (dump_backtrace+0x0/0x110) from [<c027322c>] (dump_stack+0x18/0x1c)
[    1.420000]  r6:c3812c40 r5:0000000b r4:c0342c34
[    1.430000] [<c0273214>] (dump_stack+0x0/0x1c) from [<c027338c>] (panic+0x48/0x10c)
[    1.440000] [<c0273344>] (panic+0x0/0x10c) from [<c003e398>] (do_exit+0x68/0x5c0)
[    1.440000]  r3:c032bb1c r2:00000019 r1:00002710 r0:c02d8582
[    1.450000]  r7:c3818e40
[    1.450000] [<c003e330>] (do_exit+0x0/0x5c0) from [<c003ebec>] (do_group_exit+0x94/0xc8)
[    1.460000]  r7:c3818e40
[    1.460000] [<c003eb58>] (do_group_exit+0x0/0xc8) from [<c00474d0>] (get_signal_to_deliver+0x300/0x338)
[    1.470000]  r4:00106001
[    1.470000] [<c00471d0>] (get_signal_to_deliver+0x0/0x338) from [<c0029eb0>] (do_signal.part.0+0x68/0x4c8)
[    1.480000] [<c0029e48>] (do_signal.part.0+0x0/0x4c8) from [<c002a78c>] (do_notify_resume+0x40/0x44)
[    1.490000] [<c002a74c>] (do_notify_resume+0x0/0x44) from [<c0027c4c>] (work_pending+0x1c/0x20)

z CompactFlash na ext2 też mi nie chce ruszyć...

Hmmm, to być może przerasta moje możliwości.
Ale wpadła mi do głowy inna alternatywa, przynajmniej tymczasowa. Ta płytka wyposażona jest w gniazdo CompactFlash. Po włożeniu karty kernel wykrywa ją przy starcie. Może tam umieścić rootfs i wtedy system wstanie. Czy jeśli tę kartę sformatuje do np. ext2 i wrzucę na nią pliki, ustawię w uboot odpowiednie parametry to system wstanie ?

Z poziomu uboota:

mw.b 0x20400000 0xFF 0x400000
wykonuję taką operacją gdy obrazy nie są wyrównane do rozmiaru strony
tftp 0x20400000 rootfs
nand erase 0x4A0000
nand write 0x20400000 0x4A0000 0x400000

Wykorzystałem automat generujący obraz z OpenWrt, konfiguracja jest następująca:
woluminy są w pliku ubinize.cfg

[rootfs]
# Volume mode (other option is static)
mode=ubi
# Source image
image=root.ubifs
# Volume ID in UBI image
vol_id=0
# Allow for dynamic resize
vol_type=dynamic
# Volume name
vol_name=rootfs
# Autoresize volume at first mount
vol_flags=autoresize

Parametry obrazów w Makefile:

UBIFS_OPTS = -m 2048 -e 126KiB -c 1996 -U
UBINIZE_OPTS = -m 2048 -p 128KiB -s 512

Może mógłbyś te wartości zweryfikować z kartą katalogową którą umieściłęm powyżej.

Jakieś pomysły co dalej ?