Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2019, 08:42 PM   #1
schuhumi
Member
schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.
 
Posts: 17
Karma: 222284
Join Date: Jul 2018
Device: PW3
Kernel development / no kexec syscall

Hi,

so my PW3 is on firmware 5.10.1.1 currently, and the kexec syscall is disabled (it seems like it was enabled some time ago https://wiki.mobileread.com/wiki/Kin...el_Development ). So ideally I'd like a solution that doesn't require flashing to boot another kernel (so that it can be distributed without bricking people's devices), but it should also work without a pc.

To start out I'd also like to try the tethered variant as well (I can't find it right now but I read somewhere that using the bootloader a kernel can also just be written into RAM and booted from there). This is probably the most stupid question but in this guide
Quote:
Bring the Kindle into bootloader mode by:
- Pressing the power button until power LED goes off.
- Keep on pressing power button and start pressing the "magic" key.
- Release power button while still pressing "magic" key.
- Release "magic" key.
what is the "magic key" (which seemingly was the home button on older models) on a PW3 which only has literally 1 button - the power one?

To boot another kernel without a kernel and without the kexec syscall enabled, there seems to be the possibility to make kexec a module, which can then be loaded. See this: https://github.com/amonakov/kexec-module
But I just can't get the .ko out of it. I cloned the repo besides the kernel folder (the latter I build already) and modified the Makefile for the kernel part in the following way:
Code:
[simon@yogal390 kernel]$ cat Makefile 
KDIR ?= ../../linux-3.0.35
ARCH ?= arm
MYPWD ?= /home/simon/Downloads/gplrelease/kexec-module/kernel

default: orig
	$(MAKE) -C $(KDIR) -I$(MYPWD)

orig:
	mkdir $@
	ln -s $(KDIR)/arch/$(ARCH)/kernel/relocate_kernel.S
	ln -s $(KDIR)/arch/$(ARCH)/kernel/machine_kexec.c $@/
	ln -s $(KDIR)/kernel/kexec.c $@/
And can actually compile like this (which is pretty much amazing considering this was made for another kernel version):
Code:
[simon@yogal390 kernel]$  make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- 
make -C ../../linux-3.0.35 -I/home/simon/Downloads/gplrelease/kexec-module/kernel
make[1]: Verzeichnis „/home/simon/Downloads/gplrelease/linux-3.0.35“ wird betreten
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[2]: „include/generated/mach-types.h“ ist bereits aktuell.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  Building modules, stage 2.
  MODPOST 36 modules
make[1]: Verzeichnis „/home/simon/Downloads/gplrelease/linux-3.0.35“ wird verlassen
[simon@yogal390 kernel]$ ls
built-in.o  kexec.c      kexec-mod.h      Makefile  relocate_kernel.S
Kbuild      kexec-drv.c  machine_kexec.c  orig
But no built module to be found... But maybe that's because I don't quite grasp how it should build, and it doesn't do anything with that code from the repository.

What this approach stems from is the kindle fire actually: https://forum.xda-developers.com/ama...-ford-t3270272

Has anybody toyed with stuff like this since the kexec syscall is gone? How have you gone about it? Essentially I just want to boot a kernel with the risk of permanent damage
schuhumi is offline   Reply With Quote
Old 09-13-2019, 03:02 AM   #2
encol
Evangelist
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
As far as i remember, PW3 has no "magic key"
encol is offline   Reply With Quote
Advert
Old 09-14-2019, 01:33 PM   #3
WaseemAlkurdi
Zealot
WaseemAlkurdi began at the beginning.
 
Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
Quote:
Originally Posted by encol View Post
As far as i remember, PW3 has no "magic key"
Correct. The last device with the Magic Key was the Kindle Touch. On newer devices, it's either serial port access to U-Boot -or- pre-existing jailbreak and the idme command.

Quote:
Essentially I just want to boot a kernel with the risk of permanent damage
You probably mean without the risk of permanent damage.
WaseemAlkurdi is offline   Reply With Quote
Old 09-16-2019, 10:23 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Both u-boot and the kernel are both network filesystem enabled.
"not requiring a pc" ::

*) use your NSS which is part of most home routers.
*) put the network filesystem on a cloud server
*) use a Linux, Mac, or (*)BSD system


PS: DO NOT put swap on the network filesystem, the Kindle kernels are not configured to support such use (we have threads on that subject here).
knc1 is offline   Reply With Quote
Old 09-18-2019, 01:56 PM   #5
WaseemAlkurdi
Zealot
WaseemAlkurdi began at the beginning.
 
Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
Quote:
Originally Posted by knc1 View Post
Both u-boot and the kernel are both network filesystem enabled.
"not requiring a pc" ::

*) use your NSS which is part of most home routers.
*) put the network filesystem on a cloud server
*) use a Linux, Mac, or (*)BSD system


PS: DO NOT put swap on the network filesystem, the Kindle kernels are not configured to support such use (we have threads on that subject here).
I have the U-Boot commands for netboot on file, but how are you supposed to connect to the Kindle when it's still in U-Boot? We don't have an Ethernet port. Is it some sort of fancy USB Networking mode in U-Boot?
WaseemAlkurdi is offline   Reply With Quote
Advert
Old 03-20-2020, 05:08 PM   #6
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
Just noticed this thread.

I'm very interested in working to get a newer kernel booting on PW3, and would like a method that allows testing kernels with low risk of bricking.

I hadn't heard of idme until now, and didn't know kindles had fastboot.

@WaseemAlkurdi Is this the same fastboot from Android world?
Can I use the standard android fastboot util to send an image with fastboot boot?
edrex is offline   Reply With Quote
Old 03-20-2020, 05:35 PM   #7
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
oic, fastboot requires soldering to usb serial pads.
edrex is offline   Reply With Quote
Old 03-20-2020, 08:32 PM   #8
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by edrex View Post
Just noticed this thread.

I'm very interested in working to get a newer kernel booting on PW3, and would like a method that allows testing kernels with low risk of bricking.

I hadn't heard of idme until now, and didn't know kindles had fastboot.

@WaseemAlkurdi Is this the same fastboot from Android world?
Can I use the standard android fastboot util to send an image with fastboot boot?
Quote:
Originally Posted by edrex View Post
oic, fastboot requires soldering to usb serial pads.
*) It is a "Kindle special" variety of fastboot.
It is available on this forum. I do not have a link to it.

*) What size image?
The "Kindle fastboot" can not handle the size of the 'main' file system image.

*) Fastboot boot: Haven't heard it mentioned, give it a try.
Let us know the details of your new brick.

*) Hot soldering to serial port is not requited.
You do have to connect to the serial port, but the serial port thread contains at least three ways to avoid use of hot solder.

*) Low risk testing: both the startup of the Kindle's u-boot and of the Kindle's kernel support network filesystems.
That is: boot from an external source, if it breaks, don't boot from an external source next time.
That is the way 'real' embedded devices are developed.

Last edited by knc1; 03-21-2020 at 03:14 PM.
knc1 is offline   Reply With Quote
Old 10-08-2020, 02:20 PM   #9
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
An update to this - it's fairly trivial to build a kernel with the kexec call and /proc/atags enabled, but I've not been able to use the userspace tools to switch to a different kernel. Here are the steps that you should follow if you want to try this yourself; I used NiLuJe's toolchain for this.
  • Download the GPL release for your PW3 version here from here
  • Extract the kernel source from within the tar.gz archive
  • Apply this patch (otherwise the build will fail).
  • Load the base kernel .config for the PW3:
    make ARCH=arm CROSS_COMPILE=arm-kindlepw2-linux-gnueabi- imx60_wario_defconfig
  • Add these options to the kernel config:
    CONFIG_KEXEC=y
    CONFIG_ATAGS_PROC=y
  • Build a kernel uImage (you need to set LOCALVERSION to an empty variable if you've initialised a git repo inside the kernel source folder, otherwise the kernel name will be 3.0.35-lab126+ and you'll cause a boot loop when the kernel can't find a kernel module folder with the appended "+" ):
    make ARCH=arm CROSS_COMPILE=arm-kindlepw2-linux-gnueabi- LOCALVERSION= uImage
  • Reboot PW3 into fastboot mode:
    idme -d --bootmode fastboot; reboot
  • Flash kernel uImage to PW3:
    sudo ./fastboot flash kernel uImage
  • Change back to main boot mode:
    sudo ./fastboot setvar bootmode main
  • Reboot the PW3
    sudo ./fastboot reboot
The PW3 should now be running your custom kernel. From here, it gets a bit murkier - the original instructions for kexec stuff mention grabbing a copy of the kexec binary from the Debian armel kexec-tools package.

There's 2 versions of this with differing features - one is from v2.0.3 and the other from v2.0.7. The latter requires you to specify the --atags flag because the kernel sources for the PW3 (and all other Kindles?) do not include DTS/DTB files.

Here's the commands that I used when attempting to load a different kernel (you can get the kernel boot commands from /proc/cmdline):
Code:
./kexec \
  -l /mnt/us/uImage \
  --type uImage \
  --atags \ #remove this for v2.0.3
  --command-line="rootwait log_pos_goal=0x8fff0000 console=ttymxc0,115200 root=/dev/mmcblk0p1 ro ip=off debug ignore_loglevel video=mxcepdcfb:E60,bpp=8,x_mem=3M"
./kexec -e
Regardless of which version you use, kexec will cause the Kindle to halt when you attempt to execute the new kernel - 2.0.3 will halt silently after outputting Starting new kernel and 2.0.7 will cause a kernel panic, output a stack trace to the serial console and reboot after around 40 seconds:

Spoiler:
[root@kindle us]# ./kexec -d -l /root/kernels/uImage --type uImage --atags --command-line="rootwait log_pos_goal=0x8fff0000 console=ttymxc0,115200 root=/dev/mmcblk0p1 ro ip=off debug ignore_loglevel video=mxcepdcfb:E60,bpp=8,x_mem=3M"
kernel: 0x40280008 kernel_size: 0x24c71c
kexec_load: entry = 0x80008000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0x45068
segment[0].bufsz = 0xe4
segment[0].mem = 0x80001000
segment[0].memsz = 0x1000
segment[1].buf = 0x40280048
segment[1].bufsz = 0x24c6dc
segment[1].mem = 0x80008000
segment[1].memsz = 0x24d000
[root@kindle us]# ./kexec -e
[ 252.725856] imx2-wdt imx2-wdt.0: Device shutdown: Expect reboot!
[ 252.731913] Starting new kernel
[ 252.842635] Unable to handle kernel paging request at virtual address ffe00000
[ 252.850123] Unhandled fault: external abort on non-linefetch (0x008) at 0x06926cae
[ 252.857940] Internal error: : 8 [#1] PREEMPT
[ 252.862400] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.870293] Internal error: : 1808 [#2] PREEMPT
[ 252.875011] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.882900] Internal error: : 1808 [#3] PREEMPT
[ 252.887621] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.895511] Internal error: : 1808 [#4] PREEMPT
[ 252.900228] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.908117] Internal error: : 1808 [#5] PREEMPT
[ 252.912836] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.920726] Internal error: : 1808 [#6] PREEMPT
[ 252.925444] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.933333] Internal error: : 1808 [#7] PREEMPT
[ 252.938057] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.945940] Internal error: : 1808 [#8] PREEMPT
[ 252.950659] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.958542] Internal error: : 1808 [#9] PREEMPT
[ 252.963264] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.971149] Internal error: : 1808 [#10] PREEMPT
[ 252.975961] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.983846] Internal error: : 1808 [#11] PREEMPT
[ 252.988655] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 252.996538] Internal error: : 1808 [#12] PREEMPT
[ 253.001347] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.009233] Internal error: : 1808 [#13] PREEMPT
[ 253.014041] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.021923] Internal error: : 1808 [#14] PREEMPT
[ 253.026728] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.034611] Internal error: : 1808 [#15] PREEMPT
[ 253.039419] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.047301] Internal error: : 1808 [#16] PREEMPT
[ 253.052105] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.059986] Internal error: : 1808 [#17] PREEMPT
[ 253.064804] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000173
[ 253.072683] Internal error: : 1808 [#18] PREEMPT
[ 253.077485] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.085363] Internal error: : 1808 [#19] PREEMPT
[ 253.090163] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.098043] Internal error: : 1808 [#20] PREEMPT
[ 253.102844] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.110739] Internal error: : 1808 [#21] PREEMPT
[ 253.115538] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.123408] Internal error: : 1808 [#22] PREEMPT
[ 253.128204] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.136073] Internal error: : 1808 [#23] PREEMPT
[ 253.140869] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.148737] Internal error: : 1808 [#24] PREEMPT
[ 253.153533] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.161401] Internal error: : 1808 [#25] PREEMPT
[ 253.166198] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.174066] Internal error: : 1808 [#26] PREEMPT
[ 253.178866] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.186741] Internal error: : 1808 [#27] PREEMPT
[ 253.191542] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.199415] Internal error: : 1808 [#28] PREEMPT
[ 253.204216] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.212090] Internal error: : 1808 [#29] PREEMPT
[ 253.216892] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.224766] Internal error: : 1808 [#30] PREEMPT
[ 253.229568] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.237441] Internal error: : 1808 [#31] PREEMPT
[ 253.242242] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.250116] Internal error: : 1808 [#32] PREEMPT
[ 253.254916] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.262788] Internal error: : 1808 [#33] PREEMPT
[ 253.267590] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.275464] Internal error: : 1808 [#34] PREEMPT
[ 253.280266] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.288138] Internal error: : 1808 [#35] PREEMPT
[ 253.292941] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.300813] Internal error: : 1808 [#36] PREEMPT
[ 253.305617] Unhandled fault: external abort on non-linefetch (0x008) at 0x1b478597
[ 253.313419] Internal error: : 8 [#37] PREEMPT
[ 253.317962] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.325846] Internal error: : 1808 [#38] PREEMPT
[ 253.330649] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.338536] Internal error: : 1808 [#39] PREEMPT
[ 253.343342] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.351227] Internal error: : 1808 [#40] PREEMPT
[ 253.356032] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.363918] Internal error: : 1808 [#41] PREEMPT
[ 253.368723] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.376607] Internal error: : 1808 [#42] PREEMPT
[ 253.381413] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.389300] Internal error: : 1808 [#43] PREEMPT
[ 253.394107] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.401993] Internal error: : 1808 [#44] PREEMPT
[ 253.406798] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.414685] Internal error: : 1808 [#45] PREEMPT
[ 253.419495] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.427379] Internal error: : 1808 [#46] PREEMPT
[ 253.432187] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.440058] Internal error: : 1808 [#47] PREEMPT
[ 253.444861] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.452730] Internal error: : 1808 [#48] PREEMPT
[ 253.457533] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.465404] Internal error: : 1808 [#49] PREEMPT
[ 253.470206] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.478074] Internal error: : 1808 [#50] PREEMPT
[ 253.482875] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.490742] Internal error: : 1808 [#51] PREEMPT
[ 253.495544] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.503412] Internal error: : 1808 [#52] PREEMPT
[ 253.508215] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.516083] Internal error: : 1808 [#53] PREEMPT
[ 253.520883] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.528752] Internal error: : 1808 [#54] PREEMPT
[ 253.533554] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.541421] Internal error: : 1808 [#55] PREEMPT
[ 253.546220] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000174
[ 253.554086] Internal error: : 1808 [#56] PREEMPT
[ 253.558840] Modules linked in: ath6kl_sdio cfg80211 g_ether arcotg_udc cyttsp4_mt_b mxc_epdc_fb mxc_epdc_eink(P) cyttsp4_core cyttsp4_i2c fuse ehci_hcd fsl_otg_arc [last unloaded: g_file_storage]
[ 253.577265] CPU: 0 Tainted: P (3.0.35-lab126 #9)
[ 253.583425] PC is at __rcu_read_lock+0x24/0x2c
[ 253.588085] LR is at atomic_notifier_call_chain+0x20/0x50
[ 253.593720] pc : [<c00a4540>] lr : [<c0089390>] psr: 200001d3
[ 253.593838] sp : ffdfa218 ip : ffdfa228 fp : ffdfa224
[ 253.605523] r10: 00000001 r9 : 200001d3 r8 : 00000000
[ 253.610938] r7 : 00001808 r6 : ffdfa254 r5 : 00000001 r4 : c04e1860
[ 253.617671] r3 : 698a604b r2 : 00000000 r1 : 00000001 r0 : c04e1860
[ 253.624425] Flags: nzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment user
[ 253.631958] Control: 10c52c79 Table: 99914059 DAC: 00000015
[ 253.637898] Process (pid: -473747393, stack limit = 0xffdfa2e8)
[ 253.644190] Stack: (0xffdfa218 to 0xe34c704d)
[ 253.648671] Backtrace: invalid frame pointer 0xffdfa224
[ 253.654272] Unable to handle kernel paging request at virtual address e582334c
[ 253.661711] Unhandled fault: external abort on non-linefetch (0x008) at 0x42698af8
[ 253.669495] Internal error: : 8 [#57] PREEMPT
[ 253.674049] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.681914] Internal error: : 1808 [#58] PREEMPT
[ 253.686723] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.694587] Internal error: : 1808 [#59] PREEMPT
[ 253.699397] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.707259] Internal error: : 1808 [#60] PREEMPT
[ 253.712068] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.719932] Internal error: : 1808 [#61] PREEMPT
[ 253.724748] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.732622] Internal error: : 1808 [#62] PREEMPT
[ 253.737437] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.745309] Internal error: : 1808 [#63] PREEMPT
[ 253.750122] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.757996] Internal error: : 1808 [#64] PREEMPT
[ 253.762809] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.770682] Internal error: : 1808 [#65] PREEMPT
[ 253.775496] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.783370] Internal error: : 1808 [#66] PREEMPT
[ 253.788184] Unhandled fault: external abort on non-linefetch (0x1808) at 0x00000175
[ 253.796052] Internal error: : 1808 [#67] PREEMPT
[ 253.800839] Modules linked in: ath6kl_sdio cfg80211 g_ether arcotg_udc cyttsp4_mt_b mxc_epdc_fb mxc_epdc_eink(P) cyttsp4_core cyttsp4_i2c fuse ehci_hcd fsl_otg_arc [last unloaded: g_file_storage]
[ 253.819355] CPU: 0 Tainted: P (3.0.35-lab126 #9)
[ 253.825522] PC is at do_alignment_ldrstr+0xe0/0x10c
[ 253.830582] LR is at 0x23
[ 253.833409] pc : [<c004035c>] lr : [<00000023>] psr: 600001d3
[ 253.833533] sp : ffdf80e8 ip : 00000003 fp : ffdf80fc
[ 253.845233] r10: 00000801 r9 : 00000175 r8 : c00a4540
[ 253.850662] r7 : c04d6154 r6 : e5823174 r5 : 00000174 r4 : ffdf8208
[ 253.857410] r3 : 22698a61 r2 : ffdf8208 r1 : 00000000 r0 : 00000175
[ 253.864175] Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment user
[ 253.871723] Control: 10c52c79 Table: 99914059 DAC: 00000015
[ 253.877679] Process -� (pid: 1043973861, stack limit = 0xffdf62e8)
[ 253.884167] Stack: (0xffdf80e8 to 0x00002000)
[ 253.888656] Backtrace: invalid frame pointer 0xffdf80fc
[ 253.894275] -� (1043973861): undefined instruction: pc=c004035c
[ 253.900466] Code: e1833404 e782310c e89da830 e792310c (e4c03001)
[ 253.906947] Unhandled fault: external abort on non-linefetch (0x008) at 0x100b44e3
[ 253.914742] Internal error: : 8 [#68] PREEMPT
[ 253.919272] Modules linked in: ath6kl_sdio cfg80211 g_ether arcotg_udc cyttsp4_mt_b mxc_epdc_fb mxc_epdc_eink(P) cyttsp4_core cyttsp4_i2c fuse ehci_hcd fsl_otg_arc [last unloaded: g_file_storage]
[ 253.937784] CPU: 0 Tainted: P D (3.0.35-lab126 #9)
[ 253.943951] PC is at do_alignment_ldrstr+0xa8/0x10c
[ 253.949005] LR is at 0x32
[ 253.951832] pc : [<c0040324>] lr : [<00000032>] psr: 200001d3
[ 253.951954] sp : ffdf7c10 ip : 00000003 fp : ffdf7c24
[ 253.963652] r10: 00000001 r9 : 100b44e3 r8 : c006300c
[ 253.969080] r7 : c04d6154 r6 : e59730b8 r5 : 000000b8 r4 : ffdf7d30
[ 253.975829] r3 : 00000000 r2 : ffdf7d30 r1 : 00100000 r0 : 100b44e3
[ 253.982593] Flags: nzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment user
[ 253.990139] Control: 10c52c79 Table: 99914059 DAC: 00000015
[ 253.996092] Process -� (pid: 1043973861, stack limit = 0xffdf62e8)
[ 254.002578] Stack: (0xffdf7c10 to 0x00002000)
[ 254.007070] Backtrace: invalid frame pointer 0xffdf7c24
[ 254.012679] -� (1043973861): undefined instruction: pc=c0040324
[ 254.018870] Code: e89da830 e3510000 0a00000d e3a03000 (e4d0e001)
[ 254.025161] ---[ end trace d8053e1c707e46ab ]---
[ 254.029980] Kernel panic - not syncing: Fatal exception in interrupt
[ 254.036499] Backtrace: invalid frame pointer 0xffdf7a94
HW


U-Boot 2009.08-lab126 (Oct 12 2018 - 06:10:48)

CPU: Freescale i.MX6 family TO0.0 at 996 MHz
Temperature: 44 C, calibration data 0x5bd52d5f
mx6sl pll1: 996MHz
mx6sl pll2: 528MHz
mx6sl pll3: 480MHz
mx6sl pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 24000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 198000000Hz
emi_slow clock: 22000000Hz
ddr clock : 396000000Hz
usdhc1 clock : 198000000Hz
usdhc2 clock : 198000000Hz
usdhc3 clock : 198000000Hz
usdhc4 clock : 198000000Hz
MMC: FSL_ESDHC: 0,FSL_ESDHC: 1,FSL_ESDHC: 2
Board: Muscat WFO
Boot Reason: [ POR ]
Boot Device: NAND
Board Id:
S/N:
I2C: ready
DRAM: 512 MB
Using default environment

In: serial
Out: serial
Err: serial
Quick Memory Test 0x80000000, 0x1fff0000
POST done in 111 ms
Battery voltage: 4125 mV

Hit any key to stop autoboot: 0
## Booting kernel from Legacy Image at 80800000 ...
Image Name: Linux-3.0.35-lab126
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2413244 Bytes = 2.3 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...


I'm not sure how to go about debugging this further but in all honesty, I'm not that bothered - if all you want to do is add kernel features that are available at compile time only, the steps above should be enough to get you going. It goes without saying that it's a very good idea to have a serial cable attached when doing any of this - it's useful for keeping an eye on the things during boot and it'll make life easier when dealing with the inevitable bricks that you'll cause when messing around with fastboot and custom kernels.
katadelos is offline   Reply With Quote
Old 10-08-2020, 02:32 PM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Note that, for features you can enable as modules, the approach is much less destructive, as you don't actually need to flash a kernel, just push the modules to the device .

(I've used this myself on Kobo kernels to enable FUSE support, there are a few comments about it -- essentially similar to what you've just detailed -- in the x-compile.sh script in the x-tc tarballs of my snapshots).
NiLuJe is offline   Reply With Quote
Old 10-09-2020, 06:46 PM   #11
trcm
Connoisseur
trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!
 
Posts: 96
Karma: 100000
Join Date: Dec 2018
Location: London
Device: Kindle PW4, Libra H2O
For making modules, does one not just;
Code:
$ make
$ make modules

Last edited by trcm; 10-09-2020 at 06:48 PM. Reason: Clarify
trcm is offline   Reply With Quote
Old 10-09-2020, 07:55 PM   #12
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Notice your "make" step? It means it requires the same hoop jumping necessary for the kernel to actually build in the first place .
NiLuJe is offline   Reply With Quote
Old 08-05-2021, 07:34 AM   #13
dYue
Junior Member
dYue began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2021
Device: Kindle Paperwhite 2 & 4
Has anyone actually confirmed whether kexec has been disabled? How was it verified? I must have been blind to any information on that.
dYue is offline   Reply With Quote
Old 08-05-2021, 07:49 AM   #14
dYue
Junior Member
dYue began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2021
Device: Kindle Paperwhite 2 & 4
Nevermind, I should have checked myself.
dYue is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading or kexec-ing newer kernel? Yasen6275 Kindle Developer's Corner 6 04-02-2014 04:28 AM
[K3] Custom Kernel (rescue shell !, kexec, patched recovery) seaniko7 Kindle Developer's Corner 16 03-29-2014 05:13 PM
Custom 3.3 kernel with kexec support and patched recovery seaniko7 Kindle Developer's Corner 10 09-09-2012 04:14 PM
PRS-T1 How-to: Compiling the kernel and kernel modules altruizine Sony Reader Dev Corner 9 09-03-2012 09:12 PM
iLiad iLiad kernel development jayakumar iRex Developer's Corner 65 07-05-2010 04:00 AM


All times are GMT -4. The time now is 01:59 PM.


MobileRead.com is a privately owned, operated and funded community.