[Buildroot] [PATCH 1/2] board/cubietech/cubieboard4 : Add config file for cubieboard4.

Giulio Benetti giulio.benetti at benettiengineering.com
Wed Dec 6 15:35:31 UTC 2023


Forgotten to add Buildroot ML in Cc.

-- 
Giulio Benetti
CEO&CTO at Benetti Engineering sas

On 06/12/23 16:27, Giulio Benetti wrote:
> On 06/12/23 15:55, eric wrote:
>> Hi Giulio,
>>   I am wrong.
>> Partition type |0xC| indicates a FAT32 partition with LBA.
> 
> Exactly, my bad, I was wrong, I've pointed everything on the other e-mail.
> 
> Best regards
> -- 
> Giulio Benetti
> CEO&CTO at Benetti Engineering sas
> 
>> Best regards,
>> eric
>>
>> eric <asd617140123 at gmail.com <mailto:asd617140123 at gmail.com>> 於 2023 
>> 年 12月6日 週三 下午10:53寫道:
>>
>>     Hi Giulio,
>>         Thank you for helping me review the patch.
>>     About below comment, I didn't get it. Does the buildroot
>>     have any example about "partition-type notation"?
>>     I think the discription"partition-type = 0xC" can represent 
>> ext2/ext4.
>>
>>     Because this is my first patch, can you give me some hints about
>>     above question?
>>
>>     thanks!!
>>
>>     > +}
>>     > +
>>     > +image sdcard.img {
>>     > +     hdimage {
>>     > +     }
>>     > +
>>     > +     partition u-boot {
>>     > +             in-partition-table = "no"
>>     > +             image = "u-boot-sunxi-with-spl.bin"
>>     > +             offset = 8K
>>     > +             size = 1016K # 1MB - 8KB
>>     > +     }
>>     > +
>>     > +     partition boot {
>>     > +             partition-type = 0xC
>>
>>     Check Buildroot manual for partition-type notation
>>
>>     > +             bootable = "true"
>>     > +             image = "boot.vfat"
>>     > +     }
>>     > +
>>     > +     partition rootfs {
>>     > +             partition-type = 0x83
>>
>>     same here,
>>
>>     Giulio Benetti <giulio.benetti at benettiengineering.com
>> <mailto:giulio.benetti at benettiengineering.com>> 於 2023年12月3日 週
>>     日 上午12:28寫道:
>>
>>         Hi Nigel,
>>
>>         thanks for contributing, please squash this and the next patch,
>>
>>         On 27/11/23 07:43, nigel_wang wrote:
>>
>>         Please provide a commit log here, take a look to the other 
>> boards'
>>         initial adding commit logs,
>>
>>          > Signed-off-by: nigel_wang <asd617140123 at gmail.com
>> <mailto:asd617140123 at gmail.com>>
>>
>>         Here you need to provide your "Name Surname", so it should be 
>> like:
>>         "Nigel Wang <asd617140123 at gmail.com
>> <mailto:asd617140123 at gmail.com>>"
>>
>>          > ---
>>          >   board/cubietech/cubieboard4/boot.cmd      |  5 +++
>>          >   board/cubietech/cubieboard4/genimage.cfg  | 38
>>         +++++++++++++++++++++++
>>          >   board/cubietech/cubieboard4/post-image.sh | 16 ++++++++++
>>          >   3 files changed, 59 insertions(+)
>>          >   create mode 100644 board/cubietech/cubieboard4/boot.cmd
>>          >   create mode 100644 board/cubietech/cubieboard4/genimage.cfg
>>          >   create mode 100755 board/cubietech/cubieboard4/post-image.sh
>>          >
>>          > diff --git a/board/cubietech/cubieboard4/boot.cmd
>>         b/board/cubietech/cubieboard4/boot.cmd
>>          > new file mode 100644
>>          > index 0000000000..6521243696
>>          > --- /dev/null
>>          > +++ b/board/cubietech/cubieboard4/boot.cmd
>>          > @@ -0,0 +1,5 @@
>>          > +setenv fdt_high ffffffff
>>          > +setenv bootargs console=ttyS0,115200 earlyprintk
>>         root=/dev/mmcblk0p2 rootwait
>>          > +fatload mmc 0 $kernel_addr_r zImage
>>          > +fatload mmc 0 $fdt_addr_r sun9i-a80-cubieboard4.dtb
>>          > +bootz $kernel_addr_r - $fdt_addr_r
>>
>>         Please use extlinux.conf instead of boot.cmd since it's easier
>>         to use
>>         for debugging,
>>
>>          > diff --git a/board/cubietech/cubieboard4/genimage.cfg
>>         b/board/cubietech/cubieboard4/genimage.cfg
>>          > new file mode 100644
>>          > index 0000000000..5d5488bcf9
>>          > --- /dev/null
>>          > +++ b/board/cubietech/cubieboard4/genimage.cfg
>>          > @@ -0,0 +1,38 @@
>>          > +# Minimal SD card image for the Cubieboard2
>>          > +# Based in the Orange Pi genimage.cfg
>>          > +
>>          > +image boot.vfat {
>>          > +     vfat {
>>          > +             files = {
>>          > +                     "zImage",
>>          > +                     "sun9i-a80-cubieboard4.dtb",
>>          > +                     "boot.scr"
>>          > +             }
>>          > +     }
>>          > +
>>          > +     size = 10M
>>
>>         Can you please use a value that is a power of 2 here? Like 16M
>>         if really
>>         needed or 8M(the smaller the better)
>>
>>          > +}
>>          > +
>>          > +image sdcard.img {
>>          > +     hdimage {
>>          > +     }
>>          > +
>>          > +     partition u-boot {
>>          > +             in-partition-table = "no"
>>          > +             image = "u-boot-sunxi-with-spl.bin"
>>          > +             offset = 8K
>>          > +             size = 1016K # 1MB - 8KB
>>          > +     }
>>          > +
>>          > +     partition boot {
>>          > +             partition-type = 0xC
>>
>>         Check Buildroot manual for partition-type notation
>>
>>          > +             bootable = "true"
>>          > +             image = "boot.vfat"
>>          > +     }
>>          > +
>>          > +     partition rootfs {
>>          > +             partition-type = 0x83
>>
>>         same here,
>>
>>          > +             image = "rootfs.ext4"
>>          > +             size = 512M
>>          > +     }
>>          > +}
>>          > diff --git a/board/cubietech/cubieboard4/post-image.sh
>>         b/board/cubietech/cubieboard4/post-image.sh
>>          > new file mode 100755
>>          > index 0000000000..9cca1b1789
>>          > --- /dev/null
>>          > +++ b/board/cubietech/cubieboard4/post-image.sh
>>          > @@ -0,0 +1,16 @@
>>          > +#!/bin/sh
>>          > +
>>          > +BOARD_DIR="$(dirname $0)"
>>          > +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
>>          > +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
>>          > +
>>          > +rm -rf "${GENIMAGE_TMP}"
>>          > +
>>          > +genimage                           \
>>          > +     --rootpath "${TARGET_DIR}"     \
>>          > +     --tmppath "${GENIMAGE_TMP}"    \
>>          > +     --inputpath "${BINARIES_DIR}"  \
>>          > +     --outputpath "${BINARIES_DIR}" \
>>          > +     --config "${GENIMAGE_CFG}"
>>          > +
>>          > +exit $?
>>
>>         I review the 2/2 patch now
>>
>>         Best regards
>>         --         Giulio Benetti
>>         CEO&CTO at Benetti Engineering sas
>>
> 




More information about the buildroot mailing list