aboutsummaryrefslogtreecommitdiffstats
path: root/platforms/bananaPro/README.md
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2019-12-05 07:51:14 +0100
committerJybz <j.biernacki@free.fr>2019-12-05 07:51:14 +0100
commit6bd962556291bb122fab1024795c74b27fc1c470 (patch)
treeac1c0448797bb60af080b42aaa348d5d8463e81a /platforms/bananaPro/README.md
parent2a82e889e8fc50d72be705ded4a50292c02b38b0 (diff)
downloadmageia4arm-6bd962556291bb122fab1024795c74b27fc1c470.tar
mageia4arm-6bd962556291bb122fab1024795c74b27fc1c470.tar.gz
mageia4arm-6bd962556291bb122fab1024795c74b27fc1c470.tar.bz2
mageia4arm-6bd962556291bb122fab1024795c74b27fc1c470.tar.xz
mageia4arm-6bd962556291bb122fab1024795c74b27fc1c470.zip
sync
Diffstat (limited to 'platforms/bananaPro/README.md')
-rw-r--r--platforms/bananaPro/README.md115
1 files changed, 115 insertions, 0 deletions
diff --git a/platforms/bananaPro/README.md b/platforms/bananaPro/README.md
new file mode 100644
index 0000000..5643069
--- /dev/null
+++ b/platforms/bananaPro/README.md
@@ -0,0 +1,115 @@
+Banana Pro SBC
+==========
+
+Short
+-----
+* [Board Informations](#SBC_INFO)
+* [U-Boot](#UBOOT_INFO)
+* [Kernel](#KERNEL_INFO)
+
+<a id="SBC_INFO"/>
+# About the Banana Pro SBC from LeMaker
+
+## External links
+http://wiki.lemaker.org/BananaPro/Pi:Building_u-boot,_script.bin_and_linux-kernel#Building_the_kernel
+http://wiki.lemaker.org/BananaPro/Pi:Setting_up_the_bootable_SD_card
+https://sites.google.com/site/manisbutareed/bringing-my-beagles-to-heel/selected-annotated-u-boot-commands
+https://linux-sunxi.org/Mainline_Kernel_Howto
+https://linux-sunxi.org/Manual_build_howto#Setting_up_the_boot_partition
+https://stackoverflow.com/questions/28891221/uenv-txt-vs-boot-scr
+https://github.com/linux-sunxi/u-boot-sunxi/wiki
+
+## LeMaker BPS (board package support)
+git clone --recursive https://github.com/LeMaker/lemaker-bsp.git
+./fex2bin ../sunxi-boards/sys_config/a20/BananaPro.fex ../../mageia4arm/bananaPro/script.bin
+
+<a id="UBOOT_INFO"/>
+# About U-Boot
+The mainline U-Boot is used for this port.
+## Mainline
+```
+CONFIG_PATH=~/workspaces/mageia4arm/platforms/bananaPro
+git clone https://gitlab.denx.de/u-boot/u-boot
+cd u-boot
+make CROSS_COMPILE=arm-linux-gnu- Bananapro_defconfig
+cp ${CONFIG_PATH}/UBOOT.config ./.config
+#Just modify few unimportant things, like prompt, name, ...
+make ARCH=arm CROSS_COMPILE=arm-linux-gnu- -j8
+make ARCH=arm CROSS_COMPILE=arm-linux-gnu-
+#cp ./u-boot.dtb ${CONFIG_PATH}/sun7i-a20-bananapro.dtb
+cp -f ./u-boot.dtb ${CONFIG_PATH}/u-boot.dtb
+cp -f ./arch/arm/dts/sun7i-a20-bananapro.dtb ${CONFIG_PATH}/sun7i-a20-bananapro.dtb
+cp -f ./u-boot-sunxi-with-spl.bin ${CONFIG_PATH}/u-boot-sunxi-with-spl.bin
+#Inside "specialFunctions.sh"
+#dd if=${CONFIG_PATH}/u-boot-sunxi-with-spl.bin of=${DEVICE} bs=1024 seek=8
+
+echo '
+setenv KERNEL_FILE /boot/vmlinuz
+setenv INIT_FILE /boot/initrd.img
+#setenv DTB_FILE /boot/sun7i-a20-bananapro.dtb
+setenv DTB_FILE /boot/u-boot.dtb
+
+setenv KERNEL_ADDR 0x40008000
+#setenv INIT_ADDR 0x45000000
+setenv INIT_ADDR -
+setenv DTB_ADDR 0x48000000
+
+ext4load mmc 0:1 ${KERNEL_ADDR} ${KERNEL_FILE}
+#ext4load mmc 0:1 ${INIT_ADDR} ${INIT_FILE}
+ext4load mmc 0:1 ${DTB_ADDR} ${DTB_FILE}
+
+setenv bootargs console=ttyS0,115200 disp.screen0_output_mode=EDID:1024x768p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p1 rootfstype=ext4 elevator=deadline rootwait
+
+#printenv
+bootz ${KERNEL_ADDR} ${INIT_ADDR} ${DTB_ADDR}
+
+#Compile boot.scr : mkimage -C none -A arm -T script -d "${CONFIG_PATH}/boot.cmd" "${CONFIG_PATH}/boot.scr"
+' >${CONFIG_PATH}/boot.cmd
+```
+
+mkimage -C none -A arm -T script -d ${CONFIG_PATH}/boot.cmd ${CONFIG_PATH}/boot.scr
+
+## UBoot Sunxi From LeMaker
+Obsolet, see 'LeMaker BPS (board package support)'.
+
+## UBoot Sunxi
+Generic u-boot for sunxi
+```
+git clone https://github.com/linux-sunxi/u-boot-sunxi
+make CROSS_COMPILE=arm-linux-gnu- Bananapro_config
+make CROSS_COMPILE=arm-linux-gnu- -j8
+make CROSS_COMPILE=arm-linux-gnu-
+#Need network support to give the MAC address.
+#Do not activate boot timing.
+#Default conf use bootz and dtb tree.
+```
+
+## Default LeMaker script
+```
+setenv bootargs console=ttyS0,115200 noinitrd
+disp.screen0_output_mode=EDID:1280x720p50 init=/init
+root=/dev/mmcblk0p2 rootwait panic=10 ${extra}
+fatload mmc 0 0x43000000 script.bin
+fatload mmc 0 0x48000000 uImage
+bootm 0x48000000
+```
+
+## DTB from Linux Mainline
+```
+git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth=1
+make ARCH=arm CROSS_COMPILE=arm-linux-gnu- sunxi_defconfig
+ARCH=arm CROSS_COMPILE=arm-linux-gnu- make -j8 dtbs
+cp ./arch/arm/boot/dts/sun7i-a20-bananapro.dtb ./sun7i-a20-bananapro.dtb
+```
+
+<a id="KERNEL_INFO"/>
+# About the Kernel
+
+Not Written.
+
+## Generate symlink
+```
+#Generating a symbolic relative link to the "last" kernel :
+ln -r -s ./vmlinuz-5.2.13-desktop-2.mga7 ./vmlinuz
+rm -f ./vmlinuz && ln -r -s ./vmlinuz-5.3.1-desktop-2.mga7 ./vmlinuz
+```