[OpenWrt-Devel] Mikrotik ar71xx -> ath79 port

Christopher Hill ch6574 at gmail.com
Mon Feb 17 10:03:10 EST 2020


Hi,

New here, and am looking for some advice on porting an existing device
to ath79 - specifically a Mikrotik RB493G (which is NAND).

The area I'm looking for guidance / tips on is getting the lzma-loader
to boot the new kernel. I have compiled a new image* and I can tftp boot
this and see on the serial console the lzma-loader running and
decompressing the kernel and then starting it... but then nothing
happens next.

I have two questions below that I would be grateful for any opinions over.

Thanks,
Chris


* The new dts file and makefile changes are here:
https://github.com/ch6574/openwrt/tree/rb493g



This is what I see on the serial console:

  OpenWrt kernel loader for AR7XXX/AR9XXX
  Copyright (C) 2011 Gabor Juhos <juhosg at openwrt.org>
  Decompressing kernel... done!
  Starting kernel at 80060000...

That's it.

I've tried adding extra bootargs "earlycon" and "earlyprintk" in the dts
"chosen" section however I still don't see anything. Running binwalk on
my new ath79 image vs the 19.07 ar71xx initramfs image reveals some
differences:

19.01 ar71xx:

  DECIMAL HEXADECIMAL DESCRIPTION

--------------------------------------------------------------------------------
  0       0x0         ELF, 32-bit MSB MIPS-I executable, MIPS, version 1
(SYSV)
  9580    0x256C      Copyright string: "Copyright (C) 2011 Gabor Juhos
<juhosg at openwrt.org>"
  9788    0x263C      LZMA compressed data, properties: 0x6D, dictionary
size: 8388608 bytes, uncompressed size: 7543556 bytes

New ath79:

  DECIMAL HEXADECIMAL DESCRIPTION

--------------------------------------------------------------------------------
  0       0x0         ELF, 32-bit MSB MIPS-I executable, MIPS, version 1
(SYSV)
  9532    0x253C      Copyright string: "Copyright (C) 2011 Gabor Juhos
<juhosg at openwrt.org>"
  9740    0x260C      LZMA compressed data, properties: 0x6D, dictionary
size: 8388608 bytes, uncompressed size: 12739582 bytes

So my ath79 image is quite a lot bigger, almost double.


Question 1 -  Am I running into size issues and simply clobbering other
areas of memory?





Next using binwalk to extract and unpack the LZMA data reveals their
content is very different:

19.01 ar71xx:

  $ tree
_openwrt-19.07.0-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf.extracted/ |
head -20
  _openwrt-19.07.0-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf.extracted/
  ├── 263C
  ├── 263C.7z
  └── _263C.extracted
      ├── 45DB88.xz
      ├── 4F2D34
      ├── 4F2D34.7z
      └── _4F2D34.extracted
          ├── 0.cpio
          └── cpio-root
              ├── bin
              │   ├── ash -> busybox
              │   ├── board_detect
              │   ├── busybox
              │   ├── cat -> busybox
              │   ├── chgrp -> busybox


New ath79:

  $ tree
_openwrt-ath79-nand-mikrotik_routerboard-rb493g-initramfs-kernel.bin.extracted/
  ├── 260C
  ├── 260C.7z
  └── _260C.extracted
      ├── [
      ├── [[
      ├── 00-netstate
      ├── 00_preinit.conf
      ├── 00-sysctl
      ├── 00-wifi-migration
      ├── 01_leds
      ├── 02_default_set_state
      ├── 02_network
      ├── 02_sysinfo
      ├── 0b26f36ae0f4106d
  <snip>
      ├── 540B28.xz
      ├── 5D3B84.cpio
  <snip>
      ├── cpio-root
      │   ├── bin
      │   │   ├── ash -> busybox
      │   │   ├── board_detect


Question 2 - are these differences in how the image is being packed
causing problems?



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list