OpenWrt Forum Archive

Topic: Porting OpenWrt for STAR_STR9100, kernel boot but....

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I have a emprex nsd100, this is a little NAS box. Link http://www.emprex.com/02_products_02.php?id=205 I would like port OpenWrt for that device. Find some patches for kernel 2.6.25 on net and apply it. The final results is that kernel boot, but don't run whole system from NFS filesystem. I try boot from /dev/sda1(USB stick) is the same problem.

Uncompressing Linux.......................................................................................................... done, booting the kernel.
Linux version 2.6.25.4artek (artek@the_box) (gcc version 4.3.2 (GCC) ) #1 Wed Feb 18 12:20:18 CET 2009
CPU: FA526id(wb) [66015261] revision 1 (ARMv4), cr=0000397f
Machine: STAR_STR9100
Warning: bad configuration page, trying to continue
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU0: D cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,38400 root=/dev/nfs rw nfsroot=192.168.88.245:/media/share/str9100/ ip=192.168.88.222
PID hash table entries: 128 (order: 7, 512 bytes)
STR9100 CPU Clock: 200 MHz
IRQ Timer1 at interrupt number 0x0 and clock 100000000(Hz)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 28952KB available (3080K code, 246K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
bus: 'platform': registered
net_namespace: 440 bytes
NET: Registered protocol family 16
bus: 'platform': add device ehci-str9100
bus: 'platform': add device ohci-str9100
bus: 'platform': add device i2c-str9100
bus: 'platform': add device led-str9100
bus: 'platform': add device watchdog-str9100
bus: 'platform': add device button-str9100
bus: 'scsi': registered
SCSI subsystem initialized
bus: 'usb': registered
bus: 'usb': add driver usbfs
usbcore: registered new interface driver usbfs
bus: 'usb': add driver hub
usbcore: registered new interface driver hub
bus: 'usb': add driver usb
usbcore: registered new device driver usb
bus: 'serio': registered
bus: 'i2c': registered
bus: 'i2c': add driver dummy
i2c_register_driver: res = 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (extended precision)
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
SGI XFS with no debug enabled
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Non-volatile memory driver v1.2
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
bus: 'platform': add device serial8250
bus: 'platform': add driver serial8250
bus: 'platform': add device serial8250.10
serial8250.10: ttyS0 at MMIO 0xf7800000 (irq = 10) is a 16550A
console [ttyS0] enabled
loop: module loaded
nbd: registered device at major 43
GSW : init
star9100_gsw1000_lan_init dev name = eth0
star9100_gsw1000_lan_probe dev name = eth0

 BIST complete 
eth0: Switch Type: GENERAL(Two Macs mode) 
Lanport

  IC_PLUS_PHY 
config lan port phy 5
configure icplus

Check MAC/PHY icplus 0 Link Status : port cfg reg = f7000008



val = 00463d75



Check MAC/PHY 0 Link Status : UP!

 Configure CPU port  

 Write some default ARL table entries ,default ARL entry for VLAN0 

 Write some default ARL table entries ,default ARL entry for VLAN1 
doneether setup
create proc entry
ok creating proc eth link entry 
eth0: STAR9100 LAN Port Initial Finished 
Driver 'sd' needs updating - please use bus_type methods
bus: 'scsi': add driver sd
base c3000000 phys 10000000
str9100_flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
str9100_flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 3 MTD partitions on "str9100_flash":
0x00000000-0x00020000 : "armboot"
0x00020000-0x007e0000 : "Kernel & Ramdisk"
0x007e0000-0x00800000 : "configure"
usbmon: debugfs is not available
ehci_hcd: block sizes: qh 128 qtd 96 itd 160 sitd 96
registering ehci-str9100
bus: 'platform': add driver ehci-str9100
Initializing STR9100 EHCI controller
ehci-str9100 ehci-str9100: STR9100 EHCI Host Controller
ehci-str9100 ehci-str9100: new USB bus registered, assigned bus number 1
ehci halt: regs fcc00020
ehci halt: regstat fcc00024 temp = 4096
ehci-str9100 ehci-str9100: irq 24, io mem 0xfcc00000
ehci-str9100 ehci-str9100: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
bus: 'usb': add device usb1
usb usb1: configuration #1 chosen from 1 choice
bus: 'usb': add device 1-0:1.0
hub 1-0:1.0: USB hub found
get hub descriptor devnum = 1
hub 1-0:1.0: 2 ports detected
EHCI platform driver Successfully registerd<7>ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
bus: 'platform': add driver ohci-str9100
Initializing STR9100 OHCI controller
ohci-str9100 ohci-str9100: STR9100 OHCI
ohci-str9100 ohci-str9100: new USB bus registered, assigned bus number 2
ohci-str9100 ohci-str9100: irq 23, io mem 0xfc400000
bus: 'usb': add device usb2
usb usb2: configuration #1 chosen from 1 choice
bus: 'usb': add device 2-0:1.0
hub 2-0:1.0: USB hub found
get hub descriptor devnum = 1
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
bus: 'usb': add driver usb-storage
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bus: 'usb': add driver libusual
usbcore: registered new interface driver libusual
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
opening LAN00:aa:bb:cc:dd:21enable
install_isr
IP-Config: Failed to open eth1
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.88.222, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.88.222, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.88.245, rootpath=
Looking up port of RPC 100003/2 on 192.168.88.245
Looking up port of RPC 100005/1 on 192.168.88.245
VFS: Mounted root (nfs filesystem).
Freeing init memory: 120K

Kernel boot hang here, and a don't know what do now hmm Can anyone help me ? I can post patches and kernel confgi if it nessesary.

(Last edited by arteqw on 18 Feb 2009, 13:10)

Hi,

you should at least add

 init=/etc/preinit

to the kernel commandline.

And for booting via nfs, do not include the firewall in your system and remove configuration of eth0 from /etc/config/network, otherwise the communication with your nfs server will stop at a later point :-)

HTH,
Thomas

I try boot from usb stick /dev/sda1 with init=/etc/preinit in kernel commandline. Hangs too hmm

Uncompressing Linux.......................................................................................................... done, booting the kernel.
Linux version 2.6.25.4artek (artek@the_box) (gcc version 4.3.2 (GCC) ) #2 Wed Feb 18 14:26:50 CET 2009
CPU: FA526id(wb) [66015261] revision 1 (ARMv4), cr=0000397f
Machine: STAR_STR9100
Warning: bad configuration page, trying to continue
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU0: D cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,38400 root=/dev/sda1 rootwait init=/etc/preinit
PID hash table entries: 128 (order: 7, 512 bytes)
STR9100 CPU Clock: 200 MHz
IRQ Timer1 at interrupt number 0x0 and clock 100000000(Hz)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 28952KB available (3080K code, 246K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
bus: 'platform': registered
net_namespace: 440 bytes
NET: Registered protocol family 16
bus: 'platform': add device ehci-str9100
bus: 'platform': add device ohci-str9100
bus: 'platform': add device i2c-str9100
bus: 'platform': add device led-str9100
bus: 'platform': add device watchdog-str9100
bus: 'platform': add device button-str9100
bus: 'scsi': registered
SCSI subsystem initialized
bus: 'usb': registered
bus: 'usb': add driver usbfs
usbcore: registered new interface driver usbfs
bus: 'usb': add driver hub
usbcore: registered new interface driver hub
bus: 'usb': add driver usb
usbcore: registered new device driver usb
bus: 'serio': registered
bus: 'i2c': registered
bus: 'i2c': add driver dummy
i2c_register_driver: res = 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (extended precision)
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
SGI XFS with no debug enabled
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Non-volatile memory driver v1.2
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
bus: 'platform': add device serial8250
bus: 'platform': add driver serial8250
bus: 'platform': add device serial8250.10
serial8250.10: ttyS0 at MMIO 0xf7800000 (irq = 10) is a 16550A
console [ttyS0] enabled
loop: module loaded
nbd: registered device at major 43
GSW : init
star9100_gsw1000_lan_init dev name = eth0
star9100_gsw1000_lan_probe dev name = eth0

 BIST complete 
eth0: Switch Type: GENERAL(Two Macs mode) 
Lanport

  IC_PLUS_PHY 
config lan port phy 5
configure icplus

Check MAC/PHY icplus 0 Link Status : port cfg reg = f7000008



val = 00463d75



Check MAC/PHY 0 Link Status : UP!

 Configure CPU port  

 Write some default ARL table entries ,default ARL entry for VLAN0 

 Write some default ARL table entries ,default ARL entry for VLAN1 
doneether setup
create proc entry
ok creating proc eth link entry 
eth0: STAR9100 LAN Port Initial Finished 
Driver 'sd' needs updating - please use bus_type methods
bus: 'scsi': add driver sd
base c3000000 phys 10000000
str9100_flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
str9100_flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 3 MTD partitions on "str9100_flash":
0x00000000-0x00020000 : "armboot"
0x00020000-0x007e0000 : "Kernel & Ramdisk"
0x007e0000-0x00800000 : "configure"
usbmon: debugfs is not available
ehci_hcd: block sizes: qh 128 qtd 96 itd 160 sitd 96
registering ehci-str9100
bus: 'platform': add driver ehci-str9100
Initializing STR9100 EHCI controller
ehci-str9100 ehci-str9100: STR9100 EHCI Host Controller
ehci-str9100 ehci-str9100: new USB bus registered, assigned bus number 1
ehci halt: regs fcc00020
ehci halt: regstat fcc00024 temp = 4096
ehci-str9100 ehci-str9100: irq 24, io mem 0xfcc00000
ehci-str9100 ehci-str9100: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
bus: 'usb': add device usb1
usb usb1: configuration #1 chosen from 1 choice
bus: 'usb': add device 1-0:1.0
hub 1-0:1.0: USB hub found
get hub descriptor devnum = 1
hub 1-0:1.0: 2 ports detected
EHCI platform driver Successfully registerd<7>ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
bus: 'platform': add driver ohci-str9100
Initializing STR9100 OHCI controller
ohci-str9100 ohci-str9100: STR9100 OHCI
ohci-str9100 ohci-str9100: new USB bus registered, assigned bus number 2
ohci-str9100 ohci-str9100: irq 23, io mem 0xfc400000
bus: 'usb': add device usb2
usb usb2: configuration #1 chosen from 1 choice
bus: 'usb': add device 2-0:1.0
hub 2-0:1.0: USB hub found
get hub descriptor devnum = 1
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
bus: 'usb': add driver usb-storage
usb 1-1: new high speed USB device using ehci-str9100 and address 2
bus: 'usb': add device 1-1
usb 1-1: configuration #1 chosen from 1 choice
bus: 'usb': add device 1-1:1.0
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bus: 'usb': add driver libusual
usbcore: registered new interface driver libusual
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Waiting for root device /dev/sda1...
scsi 0:0:0:0: Direct-Access     Generic  USB  SD Reader   0.00 PQ: 0 ANSI: 2
bus: 'scsi': add device 0:0:0:0
sd 0:0:0:0: [sda] 3842048 512-byte hardware sectors (1967 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 3842048 512-byte hardware sectors (1967 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing init memory: 120K

Hi, arteqw.

Do you use openwrt buildroot? How about ramdisk image?

regards,
zukky

Yes, I use latest trunk code. With it I compile whole system. I don't try ramdisk, could You explain how use it, what change in kernel config.

(Last edited by arteqw on 18 Feb 2009, 16:33)

Hi, arteqw.

maybe your system is running already, but you just don't see the output of usermode.
Try to ping your target, and telnet if it answers.
In this case you should check the file /etc/inittab.

Do you have the hotplug2 package included in your file system?
Otherwise try to modify /etc/preinit to create manually some more device nodes
(e.g. /dev/ttyS0, please lookup the major/minor numbers yourself :-)

If your are booting via NFS, it should be easy to modify the files and playing around.

Best regards,
Thomas

make menuconfig -> Target Images -> select 'ramdisk'
Then, build.

You can find ramdisk image in trunk/bin directory.

Good luck!

Ok, I still playing with Emprex and i have strange observastion. When I use oryginal rootfs, and my custom kernel, then system boot without problem. In my opinion there is a problem with OpenWrt toolchain(or which part of it). To by sure I compile a sample helloworld code with toolchain from ftp://ftp.linksys.com/opensourcecode/wa … 1.2.11.tgz. Next in kernel commandline add init=/bin/helloworld and result

Initializing USB Mass Storage driver...
bus: 'usb': add driver usb-storage
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
bus: 'usb': add driver libusual
usbcore: registered new interface driver libusual
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
opening LAN00:aa:bb:ccsmileyd:21enable
install_isr
IP-Config: Failed to open eth1
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.88.222, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.88.222, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.88.245, rootpath=
Looking up port of RPC 100003/2 on 192.168.88.245
Looking up port of RPC 100005/1 on 192.168.88.245
VFS: Mounted root (nfs filesystem).
Freeing init memory: 120K
Hello world!

i don't know what to do now :-)

PS. Sory for bad English hmm

Hi,

Can you make us download your compressed target/linux/strxxxx files?

Hi.

Thanks. I tried star9100.tar.gz on latest trunk.

owrt@debian:~/openwrt/trunk$ ls target/linux/star91/
Makefile    compatibly_list.txt  image           star9100.tar
base-files  config-2.6.25        patches-2.6.25
owrt@debian:~/openwrt/trunk$

Applying patch generic/905-i386_build.patch
patching file arch/x86/boot/tools/build.c

Applying patch generic/906-msdosfs_header.patch
patching file include/linux/msdos_fs.h
Hunk #1 FAILED at 57.
1 out of 1 hunk FAILED -- rejects in file include/linux/msdos_fs.h
Patch generic/906-msdosfs_header.patch does not apply (enforce with -f)
make[4]: *** [/home/owrt/openwrt/trunk/build_dir/linux-star91/linux-2.6.25.4/.quilt_checked] Error 1
make[4]: Leaving directory `/home/owrt/openwrt/trunk/target/linux/star91'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/owrt/openwrt/trunk/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/owrt/openwrt/trunk'
make[1]: *** [/home/owrt/openwrt/trunk/staging_dir/target-arm_uClibc-0.9.29/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/owrt/openwrt/trunk'
make: *** [world] エラー 2
owrt@debian:~/openwrt/trunk$

...patch fails.

Which buildroot version do you use?

regards,
zukky

OK.
After changing kernel version, error disappeared.

owrt@debian:~/openwrt/trunk$ cat target/linux/star91/Makefile
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk

ARCH:=arm
BOARD:=star91
BOARDNAME:=Star9100
#FEATURES:=usb
FEATURES:=jffs2

LINUX_VERSION:=2.6.25.20
#LINUX_VERSION:=2.6.25.4
#LINUX_VERSION:=2.4.35.4

include $(INCLUDE_DIR)/target.mk

define Target/Description
  My Port
endef

$(eval $(call BuildTarget))
owrt@debian:~/openwrt/trunk$

Yes, i know about that error, to eliminate this I delete that patch from generic and all is fine :-)

Hi.

What bootloader does your device have?

Mine, corega cg-wlbargn
http://www.corega.co.jp/prod/wlbargn/
star str9102
29lv320cbtc-70g
em6a9160ts-5g x2
(switch can't be seen under heat sink)
ar5416(minipci)

has armboot. It seems almost same as u-boot. Like this.

ARMboot 1.1.0 (Feb 10 2007 - 14:26:40)

Star maintain version 0.14.100000000
ARMboot code: 00000000 -> 000698e8
ARMboot code(Bin file):00000000 ->0001f0f8

STR9100 CPU Clock: 250 MHz

DDR Bank #0: 00000000 32 MB
DDR Controller Data Bus Width: 32 bits
This flash ID = 0x22A8

Flash Bank #1: 4 MB

*** Using default environment
<str9100gsw.c #393> readPhyID(): Phy reg id = 0x273850E9
Begin vitesse7385 switch basic config ...  <str9100gsw.c #521> h2_post_reset(): set_fatal_error(H2_GENERAL_FAILURE)
<str9100gsw.c #521> h2_post_reset(): set_fatal_error(H2_GENERAL_FAILURE)
done

Hit any key to stop autoboot:  0
STR9100>help
go      - start application at address 'addr'
run     - run commands in an environment variable
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
tftpboot- boot image via network using TFTP protocol
               and env variables ipaddr and serverip
rarpboot- boot image via network using RARP/TFTP protocol
bootd file over serial line
run 'bootcmd'
loads   - load S-Record file over serial line
loadb   - load binary file over serial line (kermit mode)
autoscr - run script from memory
md      - memory display
mm      - memory modify (auto-incrementing)
nm      - memory modify (constant address)
mw      - memory write (fill)
cp      - memory copy
cmp     - memory compare
crc32   - checksum calculation
base    - print or set address offset
printenv- print environment variables
setspi- print environment variables
getspi- print environment variables
phywrite- print environment variables
phyread- print environment variables
dumpphy- print environment variables
setenv  - set environment variables
saveenv - save environment variables to persistent storage
protect - enable or disable FLASH write protection
erase   - erase FLASH memory
flinfo  - print FLASH memory information
bdinfo  - print Board Info structure
iminfo  - print header information for application image
loop    - infinite loop on address range
mtest   - simple RAM test
reset   - Perform RESET of the CPU
echo    - echo args to console
sleep   - delay execution for some time
download   - Perform bootload
assign   - Perform give the device a mac
version - print monitor version
help    - print online help
?       - alias for 'help'
STR9100><str9100gsw.c #1044> handle_phy(): Port 4 LINK_UP
printenv
bootcmd=go 10040000
bootdelay=1
baudrate=38400
netmask=255.255.255.0
serverip=192.168.171.198
ipaddr=192.168.171.199
ethaddr=00:0a:79:ac:ab:c6

Environment size: 143/32764 bytes
STR9100>bdinfo
enetaddr      = 00:0A:79:AC:AB:C6
ip_addr       = 192.168.171.199
baudrate      = 38400 bps
arch_number   = 242
env_t         = 000898F0
boot_params   = 00000100
DRAM:00.start = 00000000
DRAM:00.size  = 02000000
STR9100>flinfo

Bank # 1: MXIC: 1x MX29LV320B(64Mbit)
  Size: 4 MB in 71 Sectors
  Sector Start Addresses:
    10000000      10002000      10004000      10006000      10008000
    1000A000      1000C000      1000E000      10010000      10020000
    10030000      10040000      10050000      10060000      10070000
    10080000      10090000      100A0000      100B0000      100C0000
    100D0000      100E0000      100F0000      10100000      10110000
    10120000      10130000      10140000      10150000      10160000
    10170000      10180000      10190000      101A0000      101B0000
    101C0000      101D0000      101E0000      101F0000      10200000
    10210000      10220000      10230000      10240000      10250000
    10260000      10270000      10280000      10290000      102A0000
    102B0000      102C0000      102D0000      102E0000      102F0000
    10300000      10310000      10320000      10330000      10340000
    10350000      10360000      10370000      10380000      10390000
    103A0000      103B0000      103C0000      103D0000      103E0000
    103F0000
STR9100>tftpboot 0x10040000 openwrt-star91-zImage
begin in eth_init()
begin in eth_init_poll()
Check MAC/PHY 0 Link Status : UP!
ARP broadcast 1
eth addr: 00:0d:5e:42:cb:70
TFTP from server 192.168.171.198
; our IP address is 192.168.171.199

Filename 'openwrt-star91-zImage'.
Load address: 0x10040000
Loading: ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
done
Bytes transferred = 2618468 (27f464 hex)
STR9100>bootm
## Booting image at 10040000 ...
Bad Magic Number
STR9100>

It looks like this error is alike when u-boot loads non uImage.

Do you know how to make image for armboot?
Does anyone?

regards,
zukky

Yes it is ARMboot

After

tftpboot 0x1020000 <image>

put

go 0x1020000

Bootloader run kernel :-)

EDIT:

Ok, i know how to generate uImage kernel

in file image/Makefile change define Image/BuildKernel to

define Image/BuildKernel
    cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
    $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \
    -C none -a 0x1020000 -e 0x01020000 -n 'Linux-$(LINUX_VERSION)' \
    -d $(KDIR)/zImage $(KDIR)/uImage
    cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
endef

then you can boot using bootm command in armboot

But, init hang too hmm
http://pastebin.com/m77082b0f

(Last edited by arteqw on 22 Feb 2009, 14:02)

ok, is a success :-) My Emprex boot OpenWrt :-)
http://wstaw.org/p/4d35/

(Last edited by arteqw on 22 Feb 2009, 19:33)

Hi, congulatulation!

What did you chanage? :-)

Here is a new code, work for me :-) http://artekw.cerbero.pl/star9100.tar.gz

But there is a problem with lan driver, it is a lot a drop packet and in dmesg a have

------------[ cut here ]---------
WARNING: at kernel/softirq.c:141 ()
Modules linked in: ppp_async ppp_generic slhc crc_ccitt
Function entered at [<c002ac6c>] from [<c0042bc0>]
Function entered at [<c0042b7c>] from [<c0048904>]
 r5:c034a4a8 r4:c1d8e000
Function entered at [<c0048884>] from [<c024605c>]
 r5:c1df64f8 r4:c1dbc150
Function entered at [<c0245fa0>] from [<c02421fc>]
 r4:c1d9bc60
Function entered at [<c02421d8>] from [<c0227cd0>]
Function entered at [<c0227bdc>] from [<c0227250>]
 r5:60000013 r4:c1df64f8
Function entered at [<c022723c>] from [<c0227320>]
 r4:ffc01190
Function entered at [<c02272fc>] from [<c01d8750>]
Function entered at [<c01d8430>] from [<c022dc10>]
Function entered at [<c022d9f0>] from [<c023d070>]
 r8:c1d8e000 r7:c1cdc34c r6:c1cdc34c r5:c1cdc34c r4:c1c610a0
Function entered at [<c023d018>] from [<c0230b38>]
Function entered at [<c02308e4>] from [<c025a610>]
 r6:c1cf0868 r5:0000000e r4:00000000
Function entered at [<c025a4e8>] from [<c025aaf4>]
 r8:00000000 r7:00000000 r6:c1d97050 r5:c1cdc34c r4:80000000
Function entered at [<c025aa6c>] from [<c025a0d0>]
 r5:c1cdc34c r4:c1cdc34c
Function entered at [<c025a0a0>] from [<c025ad48>]
 r4:c1d8c9e8
Function entered at [<c025abec>] from [<c026cee0>]
Function entered at [<c026cad4>] from [<c026d458>]
Function entered at [<c026d3c4>] from [<c026a4ec>]
 r5:00000000 r4:c1d97050
Function entered at [<c026a448>] from [<c026bc3c>]
 r5:00000000 r4:c1d97050
Function entered at [<c026b8bc>] from [<c0271ed0>]
Function entered at [<c0271e1c>] from [<c02608ec>]
 r7:c1d97050 r6:00000000 r5:c1d97050 r4:c1d97300
Function entered at [<c026084c>] from [<c0263174>]
 r6:c03355d4 r5:00000000 r4:c1d970b4
Function entered at [<c0262d78>] from [<c0222930>]
Function entered at [<c02228e8>] from [<c0220310>]
 r6:00000000 r5:c1d8feb8 r4:00000000
Function entered at [<c02201fc>] from [<c00907f4>]
Function entered at [<c0090728>] from [<c009106c>]
 r7:00000003 r6:c1d8ff80 r5:be86bc00 r4:c1de9af8
Function entered at [<c0090f90>] from [<c0091494>]
 r6:00000000 r5:00000000 r4:c1de9af8
Function entered at [<c0091448>] from [<c00269e0>]
 r6:000001a0 r5:000001a0 r4:00075130
---[ end trace 8f94abdf58fc907e ]---

It seems problem with IRQ, i don't know how to fix this hmm This driver was ported by some guy from http://tinyhack.com/category/agestar/ I found a new kernel(maybe with better driver) for 2.6.16, but i don't know how to patch a 2.6.25.20 with changes from 2.6.16. Need help. Patch with STAR9100 support for 2.6.16 is  here -> http://artekw.cerbero.pl/2.6.26-star.tar.gz I think this driver seems better than that from 2.4 kernel.

Sory for english. I forget a working firmware is here -> http://artekw.cerbero.pl/star9100

(Last edited by arteqw on 23 Feb 2009, 15:32)

Hi all,

I think that I can help a tiny bit.

I have managed to compile 2.6.25.4 successfully using the files from here: http://tinyhack.com/patch-2.6.25.4-for- … 080618.bz2 and using arteqws files.

I can't actually upload or test due to armboot not having a TFTP server and I have no serial cable smile

Procedure:

1.) Delete target/linux/generic/linux-2.6.25/906-msdosfs_header.patch

You can alternatively fix it up so that it works for 2.6.25.4 (but breaks for other versions of 2.6.25).

Changing the relevant part to this might work as this code doesn't exist in 2.6.25.4 (untested):
+#ifdef __KERNEL__
+/* media of boot sector */
+static inline int fat_valid_media(u8 media)
+{
+    return 0xf8 <= media || media == 0xf0;
+}
+#endif

2.) Make a target/linux/star9100 directory

3.) Place arteqws files http://artekw.cerbero.pl/star9100.tar.gz in the correct folders

4.) Delete the (4) files in target/linux/star9100/patches-2.6.25

5.) get the kernel patch for 2.6.25.4 from kernel.org ftp://ftp.kernel.org/pub/linux/kernel/v … 6.25.4.bz2 , bunzip it and place in the target/linux/star9100/patches-2.6.25 folder. Call it 100-patches-2.6.25.4 so that it is executed first.

6.) Download Yohanes patch http://tinyhack.com/patch-2.6.25.4-for- … 080618.bz2  extract and place in the target/linux/star9100/patches-2.6.25 folder. Call it 200-patch-2.6.25.4-for-agestar-20080618 you will also need to open it with gedit and replace every occurance of "2.6.25.4" with "2.6.25", I think that is all. You will need to search for "mach-types" and delete the diff (similar to the one below).

7.) Create a 300-mach-patch with (modded from star/arteqws patches, just changed patch paths) or place this inside the other patch in step 6:

diff -urN linux-2.6.25-ori/arch/arm/tools/mach-types linux-2.6.25/arch/arm/tools/mach-types
--- linux-2.6.25-ori/arch/arm/tools/mach-types    2008-05-15 17:00:12.000000000 +0200
+++ linux-2.6.25/arch/arm/tools/mach-types    2009-02-17 09:41:04.882689088 +0100
@@ -1720,3 +1720,4 @@
lg_ks20            MACH_LG_KS20        LG_KS20            1725
hhgps            MACH_HHGPS        HHGPS            1726
nokia_n810_wimax    MACH_NOKIA_N810_WIMAX    NOKIA_N810_WIMAX    1727
+str9100                 ARCH_STR9100            STR9100                 1728

Now you should be able to compile without any problems.

Let me know if it actually works lol tongue

Unfortunately have no time to get serial and test etc so best of luck whoever takes this on and please put this into the OpenWRT repo if it works!!!

Cheers,
Joe

(Last edited by Z3r0 on 27 Feb 2009, 06:56)

You don't understand me. I succsefully ported STR9100 for openwrt, and my files from tar.gz works. You don't need use patch from that site. To compile OpenWrt for STR9100 you need untar my archive to correct folders and do "make". You got working 2.6.25.20 kernel big_smile and rootfs in tar.gz file format Thats all :-)

My problem is that patch http://tinyhack.com/patch-2.6.25.4-for- … 080618.bz2 have hackish lan driver and don't work corectly. It is a lot droped packet under pinging str9100 box!! I would like to fix this ? Can you help me ?

ok thanks Z3r0, it fix my problem completly

no, after more testing lan suck hmm

Hi.

Thank you for your code for u-boot image.
I wrote it to image/Makefile and modified load address for my device.

define Image/BuildKernel
        cp $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/zImage
        $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \
        -C none -a 0x10040000 -e 0x010040000 -n 'Linux-$(LINUX_VERSION)' \
        -d $(KDIR)/zImage $(KDIR)/uImage
        cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
endef

Unfortunately boot fails.

STR9100>tftpboot 10040000 openwrt-star91-uImage
begin in eth_init()
begin in eth_init_poll()
Check MAC/PHY 0 Link Status : UP!
ARP broadcast 1
eth addr: 00:0d:5e:42:cb:70
TFTP from server 192.168.171.198
; our IP address is 192.168.171.199

Filename 'openwrt-star91-uImage'.
Load address: 0x10040000
Loading: #################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
done
Bytes transferred = 2626384 (281350 hex)
STR9100>bootm
## Booting image at 10040000 ...
Bad Magic Number
STR9100>

I read this post.
http://pastebin.com/m77082b0f
How did you generate uImage.bin?

BTW, Do you know how to bump to newer kernel version? Does anyone?

regards,
zukky

Thanks for interesting to run OpenWrt at STAR9100.

I working on it last week, and i have way how to write kernel permanently do device.
There is a latest and working code http://artekw.cerbero.pl/star9100-01032009.tar.gz. You need untar this to correct folders. For my Emprex i generate uImage and merge it with armboot with this tools http://artekw.cerbero.pl/mergetool.tar.gz. After that I got firmware, and now i upload it via oficial upgrade webgui. Now, in bootloader i change some variable:

setenv bootm 10020000
setenv

Now OpenWrt will boot automaticly :-)
Here is working uImage and whole firmware(to upload via webgui) http://artekw.cerbero.pl/openwrt/emprex

To answer for your question about kernel. I don't know how to bump kernel. In my opinion this isn't a problem. Problem is a lan driver, because it a lot of dropped packet, and using telnet or ssh is a nightmare!. I looking for people those help porting a new lan driver from 2.6.16 kernel http://artekw.cerbero.pl/2.6.26-star.tar.gz.

If you have any question, ask :-)


Sory for my english :P

The discussion might have continued from here.