ZyXEL NSA emulation
</code><code>qemu-system-arm versatilepb -m 128M -kernel uImage -initrd initramfs -nographic
#NAS_Jun_2019
Accepted Solution
-
That's strange... Shouldn't I have at least some output regardless? I've seen two options to redirect the serial output using qemu. One was defining the use of ttyAM0 and the other method was the stdio redirection done
If the kernel can't open the 'other side' of the serial port, you won't see anything. If you use uboot, there is something called 'earlyprintk', which AFAIK means that uboot passes a function pointer which can be used to write to the serial port initialized by uboot, so that the kernel can log until it has opened it's own serial port. But that moves the problem to uboot. Although a uboot for an Arm platform supported by qemu should be able to boot a Kirkwood kernel.
By building the kernel you can add some generic serial port drivers, in hope one will fit the qemu serial port, but I don't know if the 'Kirkwood core' will try to use them.
0
All Replies
-
Indeed, that ain't gonna work. The NSA kernel is designed to have it's console on serial, and the Kirkwood serial port is probably the only serial port for which a driver is available. So you won't see anything unless this port is simulated. And there are some other problems. For instance the startscript /etc/init.d/rcS will reboot the box if it can't find the right flash partitions.If this is only about ffp, you can use any (emulated) Armv5+ system. Ffp will happily run on any kernel 2.6.14+, or something like that.If you want the userland, you can clone the filesystem and cleanup /etc/init.d/rcS a bit, and chroot that.1
-
That's strange... Shouldn't I have at least some output regardless? I've seen two options to redirect the serial output using qemu. One was defining the use of ttyAM0 and the other method was the stdio redirection done by this flag:
-serial stdio<br>
/etc/init.d/rcS will reboot the box if it can't find the right flash partitions.Correct and I already modified that within the initramfs.
And yes, I am using a chroot environment at the moment, however having the actual kernel loaded would be extremely useful in some cases.
Well, your statement sounds totally clear and sounds like an impossible no what do you think about the serial output tweaking? Stuff like the webserver or anything else won't actually show up? What if I load the whole thing using u-boot? I could get one uboot up with the virt machine emulation...
Also, what if I rebuild the kernel using the GPL source but enable some additional features?
Thanks a lot
0 -
That's strange... Shouldn't I have at least some output regardless? I've seen two options to redirect the serial output using qemu. One was defining the use of ttyAM0 and the other method was the stdio redirection done
If the kernel can't open the 'other side' of the serial port, you won't see anything. If you use uboot, there is something called 'earlyprintk', which AFAIK means that uboot passes a function pointer which can be used to write to the serial port initialized by uboot, so that the kernel can log until it has opened it's own serial port. But that moves the problem to uboot. Although a uboot for an Arm platform supported by qemu should be able to boot a Kirkwood kernel.
By building the kernel you can add some generic serial port drivers, in hope one will fit the qemu serial port, but I don't know if the 'Kirkwood core' will try to use them.
0 -
Okay, sounds great! I already have a working uboot under qemu, just need to figure out how can I load the kernel from there so either initialize the virtualization with network support (then tftp load) or find a way to attach a device. But that's my task to figure out!
Thanks Mijzelf!0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 149 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 263 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight