0
damien78

kernel upgrade fail On nand

Recommended Posts

Hi,
 
when I try to update my core the apt-get install operation fails.
 
This is because the post-installation script creates a symbolic link as the boot partition does not support because she is fat.
 
Also the boot is only possible with a uImage not zImage I think.
To compensate I am forced to make a copy instead of the link.

Share this post


Link to post
Share on other sites

Our post install script should handle this scenario:

#!/bin/bash



# Pass maintainer script parameters to hook scripts
export DEB_MAINT_PARAMS="$*"

# Tell initramfs builder whether it's wanted
export INITRD=Yes

test -d /etc/kernel/postinst.d && run-parts --arg="3.4.112-sun7i" --arg="/boot/vmlinuz-3.4.112-sun7i" /etc/kernel/postinst.d

if [ "$(grep nand /proc/partitions)" != "" ] && [ "$(grep mmc /proc/partitions)" = "" ]; then
mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /boot/vmlinuz-3.4.112-sun7i /boot/uImage
cp /boot/uImage /tmp/uImage
sync
mountpoint -q /boot || mount /boot
cp /tmp/uImage /boot/uImage
rm -f /boot/vmlinuz-3.4.112-sun7i
else
ln -sf vmlinuz-3.4.112-sun7i /boot/zImage > /dev/null 2>&1 || mv /boot/vmlinuz-3.4.112-sun7i /boot/zImage
fi
if [ -f "/boot/initrd.img-3.4.112-sun7i" ]; then 
mkimage -A arm -O linux -T ramdisk -C gzip -n uInitrd -d /boot/initrd.img-3.4.112-sun7i /boot/uInitrd > /dev/null 2>&1
rm /boot/initrd.img-3.4.112-sun7i
fi
rm -f /boot/.next
exit 0

Share this post


Link to post
Share on other sites

Those scripts are in kernel source. 

 

We modify them with patches and if you use our build tools, this patch, which add such functionality, is standard in all kernels except maybe some DEV versions.

 

If you are compiling kernel on your own, without patches referring to some quick manual from internet than you'll need lots of luck.  :)

Share this post


Link to post
Share on other sites

Hi,

Your kernel work is really great! I will abandon the dan-and fork in order to contribute effectively.

my change its simple and not dependent on the work's dan-and.

My goal is to have a system of emmision effective receipt for any type of infrared remote control.

For that I have to review the management of the PWM. I hoped successfully operate the PWM as the mainline.

Share this post


Link to post
Share on other sites

Hi,

 

I have compile your kernel with my patch successfully.

 

I have installed generated package but card not boot from nand kernel stop after 6s and no message.

 

Can you help me?

 

I must execute part of nand-sata-install?

 

thank you

Share this post


Link to post
Share on other sites

Without logs I can't help much.

 

How did you install the kernel? Any errors on install? Can you boot from SD card and provide a content of first nand partition.

Share this post


Link to post
Share on other sites

Hi,

 

There is no error during installation.

my boot partition :

bin
boot.axf
boot.cmd
boot.ini
boot.scr
config-3.4.112-sun7i-gd47d367-dirty
initrd.img-3.4.112-sun7i-gd47d367-dirty
linux
magic.bin
script.bin
script.bin.old
script.old
System.map-3.4.112-sun7i-gd47d367-dirty
uEnv.txt
uImage
uImage-3.4.108
uImage-3.4.110
uImage-3.4.111-ir+
uImage-cma
uImage-ir
upgrade.log

I installed the packages:

linux-headers-sun7i_5.14_armhf.deb
linux-image-sun7i_5.14_armhf.deb
linux-image-sun7i-dbg_5.14_armhf.deb
linux-u-boot-cubietruck_5.14_armhf.deb

with "dpkg -i"

cat boot.cmd 
setenv bootargs console=tty1 root=/dev/sda1 rootwait rootfstype=ext4 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1
#--------------------------------------------------------------------------------------------------------------------------------
# Boot loader script to boot with different boot methods for old and new kernel
#--------------------------------------------------------------------------------------------------------------------------------
if ext4load mmc 0 0x00000000 /boot/.next || fatload mmc 0 0x00000000 .next
then
# sunxi mainline kernel
#--------------------------------------------------------------------------------------------------------------------------------
ext4load mmc 0 0x49000000 /boot/dtb/${fdtfile} || fatload mmc 0 0x49000000 /dtb/${fdtfile}
ext4load mmc 0 0x46000000 /boot/zImage || fatload mmc 0 0x46000000 zImage
env set fdt_high ffffffff
bootz 0x46000000 - 0x49000000
#--------------------------------------------------------------------------------------------------------------------------------
else
# sunxi android kernel
#--------------------------------------------------------------------------------------------------------------------------------
ext4load mmc 0 0x43000000 /boot/script.bin || fatload mmc 0 0x43000000 script.bin
ext4load mmc 0 0x48000000 /boot/zImage || fatload mmc 0 0x48000000 zImage
bootz 0x48000000
#--------------------------------------------------------------------------------------------------------------------------------
fi
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

I boot if I replace the uImage installed by the package with other uImage- *

Share this post


Link to post
Share on other sites

Hi,

 

I compiled with one of my patch and it works.

 

Can you tell me how you manage to debug the kernel? you use the connection ttl series with kgdb?

thanks

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0