Alt-F-0.1RC4 running on QEMU

59 views
Skip to first unread message

Leonardo Lessa

unread,
Nov 16, 2014, 4:03:43 PM11/16/14
to al...@googlegroups.com
Hi,

First of all I would like to congratulate the developers of this firmware for the good work done on that. I have a DNS323 which I using for some years and I was wondering if I could test the firmware before flash it on the box and also have a safe environment to test my developments before send it to the box.

I found some work done by Juerg Haefliger[1] but I was only able to run the stock firmware on that so I have been working since last week on the alt-f emulation using the latest qemu.

I managed to boot and run the version Alt-F-0.1RC4, using a modified kernel 3.10.32 with the ARM versatile pb, you can find the bootlog below[2].

Everything looks working fine but I was not able to "automount" during the boot the virtual disk (sda). Could someone explain me how the external disks are automatically mounted during the boot ? (I'm able to mount it after the boot using the gui interface)

If someone is interested I could release this work in a near future.


Best regards
Leonardo Lessa


[2] - Boot.log
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.10.32 (llessa@vm-sockbr-devel.cern.ch) (gcc version 4.3.3 (GCC) ) #2 Fri Nov 14 16:09:01 UTC 2014
CPU
: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU
: VIVT data cache, VIVT instruction cache
Machine: DNS-321/323
Memory policy: ECC disabled, Data cache writeback
sched_clock
: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: ramdisk_size=37016 root=/dev/mtdblock3 console=ttyAMA0 init=/init mtdparts=physmap-flash.0:64k(MTD1),64k(MTD2),1536k(Kernel),6336k(uRamdisk),192k(u-boot)
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 255296k/
255296k available, 6848k reserved, 0K highmem
Virtual kernel memory layout:
    vector  
: 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  
: 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc
: 0xd0800000 - 0xff000000   ( 744 MB)
    lowmem  
: 0xc0000000 - 0xd0000000   ( 256 MB)
    modules
: 0xbf000000 - 0xc0000000   (  16 MB)
     
.text : 0xc0008000 - 0xc0407c80   (4096 kB)
     
.init : 0xc0408000 - 0xc042aedc   ( 140 kB)
     
.data : 0xc042c000 - 0xc0457000   ( 172 kB)
       
.bss : 0xc0457000 - 0xc0471138   ( 105 kB)
NR_IRQS
:224
VIC
@f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip
0 "SIC" @ f1003000, 13 irqs
Console: colour dummy device 80x30
Calibrating delay loop... 624.23 BogoMIPS (lpj=3121152)
pid_max
: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU
: Testing write buffer coherency: ok
Setting up static identity map for 0xc0312ea8 - 0xc0312ee4
NET
: Registered protocol family 16
DMA
: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev
:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44) is a PL011 rev1
console
[ttyAMA0] enabled
dev
:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45) is a PL011 rev1
dev
:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46) is a PL011 rev1
fpga
:09: ttyAMA3 at MMIO 0x10009000 (irq = 70) is a PL011 rev1
PCI core found
(slot 11)
PCI host bridge to bus
0000:00
pci_bus
0000:00: root bus resource [mem 0x50000000-0x5fffffff]
pci_bus
0000:00: root bus resource [mem 0x60000000-0x6fffffff pref]
pci_bus
0000:00: root bus resource [io  0x1000-0xffff]
pci_bus
0000:00: No busn resource found for root bus, will use [bus 00-ff]
PCI
: bus0: Fast back to back transfers disabled
pci
0000:00:0c.0: BAR 2: assigned [mem 0x50000000-0x50001fff]
pci
0000:00:0c.0: BAR 1: assigned [mem 0x50002000-0x500023ff]
pci
0000:00:0c.0: BAR 0: assigned [io  0x1000-0x10ff]
bio
: create slab <bio-0> at 0
vgaarb
: loaded
SCSI subsystem initialized
usbcore
: registered new interface driver usbfs
usbcore
: registered new interface driver hub
usbcore
: registered new device driver usb
Switching to clocksource timer3
FS
-Cache: Loaded
NET
: Registered protocol family 2
TCP established hash table entries
: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries
: 2048 (order: 1, 8192 bytes)
TCP
: Hash tables configured (established 2048 bind 2048)
TCP
: reno registered
UDP hash table entries
: 256 (order: 0, 4096 bytes)
UDP
-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET
: Registered protocol family 1
RPC
: Registered named UNIX socket transport module.
RPC
: Registered udp transport module.
RPC
: Registered tcp transport module.
RPC
: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
squashfs
: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
ROMFS MTD
(C) 2007 Red Hat, Inc.
aufs
3.10.x-20140127
msgmni has been
set to 498
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered
(default)
brd
: module loaded
loop
: module loaded
PCI
: enabling device 0000:00:0c.0 (0100 -> 0103)
sym0
: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
sym0
: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0
: SCSI BUS has been reset.
scsi0
: sym-2.2.3
sym0
: unknown interrupt(s) ignored, ISTAT=0x5 DSTAT=0x80 SIST=0x0
scsi
0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.1. PQ: 0 ANSI: 5
scsi target0
:0:0: tagged command queuing enabled, command queue depth 16.
scsi target0
:0:0: Beginning Domain Validation
scsi target0
:0:0: Domain Validation skipping write tests
scsi target0
:0:0: Ending Domain Validation
physmap platform flash device
: 04000000 at 34000000
physmap
-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
5 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 5 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000010000 : "MTD1"
0x000000010000-0x000000020000 : "MTD2"
0x000000020000-0x0000001a0000 : "Kernel"
0x0000001a0000-0x0000007d0000 : "uRamdisk"
0x0000007d0000-0x000000800000 : "u-boot"
smc91x
.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0
: SMC91C11xFD (rev 1) at d0876000 IRQ 57 [nowait]
eth0
: Ethernet addr: 52:54:00:12:34:56
mousedev
: PS/2 mouse device common for all mice
rtc
-pl031 dev:e8: rtc core: registered pl031 as rtc0
md
: linear personality registered for level -1
md
: raid0 personality registered for level 0
md
: raid1 personality registered for level 1
device
-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
usbcore
: registered new interface driver usbhid
usbhid
: USB HID core driver
TCP
: cubic registered
NET
: Registered protocol family 17
VFP support v0
.3: implementor 41 architecture 1 part 10 variant 9 rev 0
sd
0:0:0:0: [sda] 10485760 512-byte logical blocks: (5.36 GB/5.00 GiB)
sd
0:0:0:0: [sda] Write Protect is off
sd
0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2
rtc-pl031 dev:e8: setting system clock to 2014-11-15 19:24:58 UTC (1416079498)
sd 0:0:0:0: [sda] Attached SCSI disk
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/fpga:07/serio1/input/input1
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
Freeing unused kernel memory: 136K (c0408000 - c042a000)
pre-init started, pid=1
pre-init: squash-rd
aufs test_add:293:mount[38]: uid/gid/perm /rootmnt/ro 0/0/0775, 0/0/0755
init started: BusyBox v1.20.2 (2014-11-14 15:45:17 UTC)
/etc/init.d/rcS: line 156: can'
t create /tmp/sys/power_led/trigger: nonexistent directory
rcS
: Board: DNS-323-A1
rcS
: Flashed Firmware: Alt-F-0.1RC4, kernel 3.10.32
rcS
: loadsave_settings: loaded set_2014-11-15_20:01:51.tgz settings file.
rcS
: IP from flash-defaults
eth0
: link up
udhcpc
(v1.20.2) started
udhcpc
: Deconfiguring eth0
Sending discover...
Sending select for 10.0.2.15...
Lease of 10.0.2.15 obtained, lease time 86400
udhcpc
: Renew: Using 10.0.2.15 for 86400 seconds
udhcpc
: Updating /etc/hosts: 10.0.2.15 dns323-qemu.localnet dns323-qemu
/ # uname -a
Linux dns323-qemu 3.10.32 #2 Fri Nov 14 16:09:01 UTC 2014 armv5tejl GNU/Linux


João Cardoso

unread,
Nov 17, 2014, 11:39:46 AM11/17/14
to al...@googlegroups.com


On Sunday, November 16, 2014 9:03:43 PM UTC, Leonardo Lessa wrote:
Hi,

First of all I would like to congratulate the developers of this firmware for the good work done on that. I have a DNS323 which I using for some years and I was wondering if I could test the firmware before flash it on the box and also have a safe environment to test my developments before send it to the box.

I found some work done by Juerg Haefliger[1] but I was only able to run the stock firmware on that so I have been working since last week on the alt-f emulation using the latest qemu.

It's interesting. But the most difficult part with firmware development is precisely to uncover and support the box specific hardware, so emulation has limited interest, nothing can replace the "bare metal".

 

I managed to boot and run the version Alt-F-0.1RC4, using a modified kernel 3.10.32 with the ARM versatile pb, you can find the bootlog below[2].

Everything looks working fine but I was not able to "automount" during the boot the virtual disk (sda). Could someone explain me how the external disks are automatically mounted during the boot ? (I'm able to mount it after the boot using the gui interface)

Hot plugging: /etc/init.d/rcS makes 'mdev' scans the system for devices and it calls /usr/sbin/hot.sh, that handles the event. Logs go to /var/log/hot*.log. medv is configured through /etc/mdev.conf. hot.sh is aftwerward called for any newly created devices.
Most desktop linux computers use 'udev' instead of 'mdev', but it is too bloated for embedded devices usage.


If someone is interested I could release this work in a near future.

Have you used Alt-F kernel default configuration and added/modified it, or have you used juergh's kernel configuration and added/adapted it for Alt-F? i.e., what was the starting point?

This could be interesting for playing with kexec on kirkwood kernels. The DNS-321/323 are mach-orion and kexec works OK, but the DNS-320/320L/325 are mach-kirkwood and I was not able to make kexec work on it.
 
...

Leonardo Lessa

unread,
Nov 20, 2014, 4:33:59 AM11/20/14
to al...@googlegroups.com


On Monday, November 17, 2014 5:39:46 PM UTC+1, João Cardoso wrote:


On Sunday, November 16, 2014 9:03:43 PM UTC, Leonardo Lessa wrote:
Hi,

First of all I would like to congratulate the developers of this firmware for the good work done on that. I have a DNS323 which I using for some years and I was wondering if I could test the firmware before flash it on the box and also have a safe environment to test my developments before send it to the box.

I found some work done by Juerg Haefliger[1] but I was only able to run the stock firmware on that so I have been working since last week on the alt-f emulation using the latest qemu.

It's interesting. But the most difficult part with firmware development is precisely to uncover and support the box specific hardware, so emulation has limited interest, nothing can replace the "bare metal".

 

I managed to boot and run the version Alt-F-0.1RC4, using a modified kernel 3.10.32 with the ARM versatile pb, you can find the bootlog below[2].

Everything looks working fine but I was not able to "automount" during the boot the virtual disk (sda). Could someone explain me how the external disks are automatically mounted during the boot ? (I'm able to mount it after the boot using the gui interface)

Hot plugging: /etc/init.d/rcS makes 'mdev' scans the system for devices and it calls /usr/sbin/hot.sh, that handles the event. Logs go to /var/log/hot*.log. medv is configured through /etc/mdev.conf. hot.sh is aftwerward called for any newly created devices.
Most desktop linux computers use 'udev' instead of 'mdev', but it is too bloated for embedded devices usage.

Thanks for the explanation, I'll have a look on that.
 


If someone is interested I could release this work in a near future.

Have you used Alt-F kernel default configuration and added/modified it, or have you used juergh's kernel configuration and added/adapted it for Alt-F? i.e., what was the starting point?

This could be interesting for playing with kexec on kirkwood kernels. The DNS-321/323 are mach-orion and kexec works OK, but the DNS-320/320L/325 are mach-kirkwood and I was not able to make kexec work on it.

I used the Alt-F kernel default configuration modifying it to run as mach-versarile, actually it was the same approach of Juergh's and the post above. In my case I have the mtdblocks working and the kernel version is the same as used on Alt-F but still a versatile emulation not mach-orion or mach-kirkwood. I'll check if somehow qemu is able to run mach-kirkwood kernels.
Reply all
Reply to author
Forward
0 new messages