Skip to content

Instantly share code, notes, and snippets.

@danboid
Created October 30, 2015 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danboid/807f2e14fa8a7555f247 to your computer and use it in GitHub Desktop.
Save danboid/807f2e14fa8a7555f247 to your computer and use it in GitHub Desktop.
Updating the BananaPi ALARM kernel the "easy" way
Install latest ALARM ARMv7 kernel:
# pacman -S linux-armv7
Copy /boot/zImage and your board-specific .dtb to the boot partition:
# mount /dev/mmcblk0p1 /mnt
# cp /boot/zImage /boot/dtbs/sun7i-a20-bananapi.dtb /mnt
Create /mnt/boot.cmd with the following contents:
fatload mmc 0 0x46000000 zImage
fatload mmc 0 0x49000000 sun7i-a20-bananapi.dtb
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10
bootz 0x46000000 - 0x49000000
Replace fatload with ext2load if needed.
If you are using an older U-Boot you might require the following line to keep the extracted kernel from overwriting the device tree configuration:
setenv fdt_high ffffffff
If you wish to use an initramfs, then the bootz command becomes:
bootz 0x46000000 0x<initramfs-address> 0x49000000
Now generate uEnv.txt:
# cd /mnt; mv uEnv.txt uEnv.txt.old
# mkimage -C none -A arm -T script -d boot.cmd uEnv.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment