damien78 Posted June 6, 2016 Posted June 6, 2016 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.
Igor Posted June 6, 2016 Posted June 6, 2016 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
damien78 Posted June 6, 2016 Author Posted June 6, 2016 OK, how can I integrate the script in a standard compilation. I have not seen this script in : https://github.com/igorpecovnik/lib/blob/master/common.sh#L186. I intend to transfer the kernel modifications in your but he tested it easier for me to use my fork.. thanks
Igor Posted June 6, 2016 Posted June 6, 2016 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.
damien78 Posted June 6, 2016 Author Posted June 6, 2016 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.
damien78 Posted June 12, 2016 Author Posted June 12, 2016 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
Igor Posted June 12, 2016 Posted June 12, 2016 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.
damien78 Posted June 12, 2016 Author Posted June 12, 2016 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- *
damien78 Posted June 14, 2016 Author Posted June 14, 2016 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
Recommended Posts