From 8321c76f4c42ed34dc0816529f8b3b8980acb39a Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Thu, 27 Jul 2017 21:11:23 +0100 Subject: [PATCH] Use the correct size limit for CRAMFS (10M) --- brick/scripts/img.js | 5 +++-- brick/scripts/mkimg | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/brick/scripts/img.js b/brick/scripts/img.js index e1517cb8..50036f89 100644 --- a/brick/scripts/img.js +++ b/brick/scripts/img.js @@ -16,8 +16,9 @@ function build() { bootnews += " " let cr = fs.readFileSync("cram.bin") - if (cr.length > 10878976) { - console.log("too big") + + if (cr.length > 10485760) { + console.log("too big by " + (cr.length - 10485760)) return } let img = fs.readFileSync("EV3 Firmware V1.09D.bin") diff --git a/brick/scripts/mkimg b/brick/scripts/mkimg index b4377b8b..451712ae 100755 --- a/brick/scripts/mkimg +++ b/brick/scripts/mkimg @@ -1,6 +1,9 @@ #!/bin/sh # dd if=EV3\ Firmware\ V1.09D.bin of=orig.cram bs=65536 skip=37 count=400 +sudo cp linux/pxt/uf2daemon/server dev-ev3/home/root/lms2012/sys/uf2d +sudo cp linux/pxt/kernel/d_usbdev.ko dev-ev3/home/root/lms2012/sys/mod/d_usbdev.ko +sudo chown -R root:root dev-ev3/home/root/lms2012 sudo mkfs.cramfs dev-ev3 cram.bin node img ls -l firmware.bin