03-30-2016, 07:47 PM
(03-30-2016, 06:18 PM)ak_hepcat Wrote: New member! I've tried to read up before posting my question.
I just received my new Pine64, installed the base system and kernel (thanks longsleep!) and booted just fine. Video was wonky, but that's apparently known.
I saw an updated kernel available, as well as the updated uboot, so using the method above I went ahead and installed them.
Well, i didn't get far, because I couldn't boot anymore.
After hooking up a serial console (hooray for my BusPirate 4.0!) I saw that uboot wasn't able to boot the new kernel.
I was able to boot the old kernel manually, and set out to find out why.
Here's the old kernel that boots just fine:
root@p64:/boot# od -xa old/kernel.img |head
0000000 4e41 5244 494f 2144 30c0 00c9 0000 4108
A N D R O I D ! @ 0 I nul nul nul bs A
0000020 0000 0000 0000 4100 0000 0000 0000 40f0
nul nul nul nul nul nul nul A nul nul nul nul nul nul p @
0000040 0100 4000 0800 0000 0000 0000 0000 0000
nul soh nul @ nul bs nul nul nul nul nul nul nul nul nul nul
0000060 6950 656e 3436 0000 0000 0000 0000 0000
P i n e 6 4 nul nul nul nul nul nul nul nul nul nul
0000100 0000 0000 0000 0000 0000 0000 0000 0000
nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
And the newly installed kernel:
root@p64:/boot# od -xa pine64/Image |head
0000000 0010 1400 0000 0000 0000 0008 0000 0000
dle nul nul dc4 nul nul nul nul nul nul bs nul nul nul nul nul
0000020 0000 0000 0000 0000 0000 0000 0000 0000
nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
*
0000060 0000 0000 0000 0000 5241 644d 0000 0000
nul nul nul nul nul nul nul nul A R M d nul nul nul nul
0000100 0015 d280 03f5 2a00 0012 9400 0094 9400
nak nul nul R u etx nul * dc2 nul nul dc4 dc4 nul nul dc4
0000120 0050 9400 0016 d538 03e0 aa16 0121 9400
So, the magic at the beginning of the file is different. Too different apparently for uboot?
here's what my environment looks like, using the new kernel:
sunxi#setenv kernel_filename pine64/Image
sunxi#printenv
baudrate=115200
boot_kernel=boota ${kernel_addr}
bootargs=console=tty0 console=ttyS0,115200n8 no_console_suspend earlycon=uart,mmio32,0x01c28000 root=/dev/mmcblk0p2 rw rootwait
bootcmd=run mmcbootcmd
bootdelay=3
bootenv_filename=uEnv.txt
bootscript=run load_dtb load_kernel set_cmdline boot_kernel
console=tty0 console=ttyS0,115200n8 no_console_suspend
fdt_addr=45000000
fdt_filename=pine64/sun50i-a64-pine64-plus.dtb
fdtaddr=45000000
filesize=c94000
import_bootenv=env import -t ${load_addr} ${filesize}
initrd_filename=initrd.img
kernel_addr=4107f800
kernel_filename=pine64/Image
load_addr=41000000
load_bootenv=fatload mmc 0:1 ${load_addr} ${bootenv_filename}
load_dtb=fatload mmc 0:1 ${fdt_addr} ${fdt_filename}; fdt addr ${fdt_addr}; fdt resize
load_kernel=fatload mmc 0:1 ${kernel_addr} ${kernel_filename}
mmcbootcmd=if run load_bootenv; then echo Loading boot environment ...; run import_bootenv; fi; run bootscript
pine64_model=pine64-plus
root=/dev/mmcblk0p2
set_cmdline=setenv bootargs console=${console} earlycon=uart,mmio32,0x01c28000 root=${root} rw rootwait
sunxi_serial=0410519008044810020b
and here's the boot with 3.10.65-3-pine64-longsleep-2
sunxi#run bootscript
[mmc]: Has init
[ 119.367]---drivers/mmc/mmc.c 2733 mmc_init
reading pine64/sun50i-a64-pine64-plus.dtb
69174 bytes read in 18 ms (3.7 MiB/s)
[mmc]: Has init
[ 119.430]---drivers/mmc/mmc.c 2733 mmc_init
reading pine64/Image
11302096 bytes read in 556 ms (19.4 MiB/s)
1
boota: bad boot image magic, maybe not a boot.img?
is this a *me* issue that I can correct with some uEnv tweaking, or something different?
*** edit
there's 2059 bytes of 'header' at the beginning of the old kernel image that's not on the new Image.
transplanting this header creates a file that is recognized, but doesn't work (presumably it doesn't have the right offsets, or some other data)
@longsleep correct me if I'm wrong
I think you have a uboot / kernel mismatch. The latest image provided by @longsleep should boot using booti and kernel does not require the Android magic header.
For the previous message in the thread - the Linux image supports the WiFi part of that adapter, I am not sure about the bluetooth.