)]}'
{
  "commit": "9c4a6fce2032fcb5bb8339d53fd3dadfd7ddfb98",
  "tree": "97bc1532be75bc9faa9574b70be283555e641063",
  "parents": [
    "fe1d45e08650213ec83a72d3499c3dd703243792"
  ],
  "author": {
    "name": "Alexander Clouter",
    "email": "alex@digriz.org.uk",
    "time": "Wed Jan 20 20:50:07 2010 +0000"
  },
  "committer": {
    "name": "Ralf Baechle",
    "email": "ralf@linux-mips.org",
    "time": "Thu Jan 28 00:03:30 2010 +0100"
  },
  "message": "MIPS: Fix vmlinuz build for 32bit-only math shells\n\nPOSIX requires $((\u003cexpression\u003e)) arithmetic in sh only to have long\narithmetic so on 32-bit sh binaries might do only 32-bit arithmetic but\nthe arithmetic done in arch/mips/boot/compressed/Makefile needs 64-bit.\n\nI play with the AR7 platform, so VMLINUX_LOAD_ADDRESS is\n0xffffffff94100000, and for an example 4MiB kernel\nVMLINUZ_LOAD_ADDRESS is made out to be:\n----\nalex@berk:~$ bash -c \u0027printf \"%x\\n\" $((0xffffffff94100000 + 0x400000))\u0027\nffffffff94500000\nalex@berk:~$ dash -c \u0027printf \"%x\\n\" $((0xffffffff94100000 + 0x400000))\u0027\n80000000003fffff\n----\n\nThe former is obviously correct whilst the later breaks things royally.\n\nFortunately working with only the lower 32bit\u0027s works for both bash and\ndash:\n----\n$ bash -c \u0027printf \"%x\\n\" $((0x94100000 + 0x400000))\u0027\n94500000\n$ dash -c \u0027printf \"%x\\n\" $((0x94100000 + 0x400000))\u0027\n94500000\n----\n\nSo, we can split the original 64bit string to two parts, and only\ncalculate the low 32bit part, which is big enough (1GiB kernel sizes\nanyone?) for a normal Linux kernel image file, now, we calculate the\nVMLINUZ_LOAD_ADDRESS like this:\n\n1. if present, append top 32bit of VMLINUX_LOAD_ADDRESS\" as a prefix\n2. get the sum of the low 32bit of VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE\n\nThis patch fixes vmlinuz kernel builds on systems where only a\n32bit-only math shell is available.\n\nPatch Changelog:\n  Version 2\n    - simplified method by using \u0027expr\u0027 for \u0027substr\u0027 and making it work\n\twith dash once again\n  Version 1\n    - Revert the removals of \u0027-n \"$(VMLINUX_SIZE)\"\u0027 to avoid the error\n        of \"make clean\"\n    - Consider more cases of the VMLINUX_LOAD_ADDRESS\n  Version 0\n    - initial release\n\nSigned-off-by: Alexander Clouter \u003calex@digriz.org.uk\u003e\nAcked-by: Wu Zhangjin \u003cwuzhangjin@gmail.com\u003e\nPatchwork: http://patchwork.linux-mips.org/patch/861/\nSigned-off-by: Ralf Baechle \u003cralf@linux-mips.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bdcfd49f022d5fe0c2361c33337ff982b02d97dd",
      "old_mode": 33188,
      "old_path": "arch/mips/boot/compressed/Makefile",
      "new_id": "9df903d714d72995fc9313e1ee66ffe8a44ed20f",
      "new_mode": 33188,
      "new_path": "arch/mips/boot/compressed/Makefile"
    }
  ]
}
