[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#749688: linux: add mips64 and mips64el support



On Fri, Jun 27, 2014 at 2:17 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Hi,
>
> On Sat, Jun 14, 2014 at 12:36:58AM +0800, Yunqiang Su wrote:
>> New 'add mips64 support': I forgot to add mips64 and mips64el into
>> debian/config/defines
>
> I had a look at the patches, and they look fine to me except a few minor
> things (see the comments below), though I haven't done any test build
> yet. Once you have updated them, I'll test them and commit them if they
> are fine.
>
> I have seen they are against the experimental branch. That's fine to me
> (and probably better as so far we have loongson 3 support only there),
> but note that until it is decided if jessie will be shipped with 3.14 or
> 3.16, we are not sure your changes will land in sid soon.
>
>
>> diff --git a/debian/config/mipsel/defines b/debian/config/mipsel/defines
>> index eea73f0..d968393 100644
>> --- a/debian/config/mipsel/defines
>> +++ b/debian/config/mipsel/defines
>> @@ -20,32 +20,37 @@ hardware: BCM91250A
>>  hardware-long: Broadcom BCM91250A systems (aka SWARM)
>>
>>  [sb1-bcm91250a_image]
>> -configs: mips/config.sb1-bcm91250a
>> +configs: kernelarch-mips/config.sb1-bcm91250a
>>
>>  [4kc-malta_description]
>>  hardware: MIPS Malta
>>  hardware-long: MIPS Malta boards
>>
>>  [4kc-malta_image]
>> -configs: mips/config.4kc-malta
>> +configs: kernelarch-mips/config.4kc-malta
>>
>>  [5kc-malta_description]
>>  hardware: MIPS Malta (64-bit)
>>  hardware-long: MIPS Malta boards (64-bit)
>>
>>  [5kc-malta_image]
>> -configs: mips/config.5kc-malta
>> +configs: kernelarch-mips/config.5kc-malta
>>
>>  [loongson-2e_description]
>>  hardware: Loongson 2E
>>  hardware-long: Lemote Loongson 2E systems
>>
>> +[loongson-2e_image]
>> +configs: kernelarch-mips/config.loongson-2e
>> +
>>  [loongson-2f_description]
>>  hardware: Loongson 2F
>>  hardware-long: Lemote Loongson 2F systems
>>
>>  [loongson-2f_image]
>> +initramfs: true
>>  recommends: libc6-loongson2f
>> +configs: kernelarch-mips/config.loongson-2f
>
> Why adding an initramfs here? I think we should switch to initramfs for
> all flavors, but we have to think about the transition and do it
> consistently. In any case this has to be done in a separate patch, the
> mips64 patches should not change the existing flavours.
>
>>  [loongson-3_description]
>>  hardware: Loongson 3A/3B
>> @@ -53,3 +58,4 @@ hardware-long: Loongson 3A or 3B based systems (e.g. from Loongson or Lemote)
>>
>>  [loongson-3_image]
>>  initramfs: true
>> +configs: kernelarch-mips/config.loongson-3
>
>> diff --git a/debian/config/mips64/defines b/debian/config/mips64/defines
>> new file mode 100644
>> index 0000000..c42abad
>> --- /dev/null
>> +++ b/debian/config/mips64/defines
>> @@ -0,0 +1,26 @@
>> +[base]
>> +flavours:
>> + sb1-bcm91250a
>> + octeon
>> +kernel-arch: mips
>> +
>> +[build]
>> +image-file: vmlinux
>> +
>> +[image]
>> +initramfs: true
>
> As Ben said, it looks like a good idea to enable initramfs by default.
> However I think (but I haven't tested) that it is already the default so
> this line is probably useless
>
>> +install-stem: vmlinux
>> +
>> +[sb1-bcm91250a_description]
>> +hardware: BCM91250A
>> +hardware-long: Broadcom BCM91250A systems (aka SWARM)
>> +
>> +[sb1-bcm91250a_image]
>> +configs: kernelarch-mips/config.sb1-bcm91250a
>
> This platform is a MIPS64 one without the R2 instructions, while the
> Debian mips64el port is AFAIK a MIPS64R2 only port.
>

No, it is not mips64r2 port, it's mips3 port.
I pushed all patches for mips3, include gcc-4.8/4.9.

I am testing mips64r2 in my private buildd for now.
Finally the official port will be mips3.

>> +[octeon_description]
>> +hardware: Octeon
>> +hardware-long: Cavium Networks Octeon
>> +
>> +[octeon_image]
>> +configs: kernelarch-mips/config.octeon
>> diff --git a/debian/config/mips64el/defines b/debian/config/mips64el/defines
>> new file mode 100644
>> index 0000000..5c9bfb0
>> --- /dev/null
>> +++ b/debian/config/mips64el/defines
>> @@ -0,0 +1,51 @@
>> +[base]
>> +flavours:
>> + sb1-bcm91250a
>> + loongson-2e
>> + loongson-2f
>> + loongson-3
>> + octeon
>> +kernel-arch: mips
>> +
>> +[build]
>> +image-file: vmlinux
>> +
>> +[image]
>> +initramfs: true
>
> Same comment as for mips64el.
>
>> +install-stem: vmlinux
>> +
>> +[sb1-bcm91250a_description]
>> +hardware: BCM91250A
>> +hardware-long: Broadcom BCM91250A systems (aka SWARM)
>> +
>> +[sb1-bcm91250a_image]
>> +configs: kernelarch-mips/config.sb1-bcm91250a
>> +
>> +[loongson-2e_description]
>> +hardware: Loongson 2E
>> +hardware-long: Lemote Loongson 2E systems
>> +
>> +[loongson-2e_image]
>> +configs: kernelarch-mips/config.loongson-2e
>> +
>> +[loongson-2f_description]
>> +hardware: Loongson 2F
>> +hardware-long: Lemote Loongson 2F systems
>> +
>> +[loongson-2f_image]
>> +recommends: libc6-loongson2f
>> +configs: kernelarch-mips/config.loongson-2f
>
> Same comment about R2 instruction set.
>
>> +[loongson-3_description]
>> +hardware: Loongson 3A/3B
>> +hardware-long: Loongson 3A or 3B based systems (e.g. from Loongson or Lemote)
>> +
>> +[loongson-3_image]
>> +configs: kernelarch-mips/config.loongson-3
>> +
>> +[octeon_description]
>> +hardware: Octeon
>> +hardware-long: Cavium Networks Octeon
>> +
>> +[octeon_image]
>> +configs: kernelarch-mips/config.octeon
>> diff --git a/debian/config/defines b/debian/config/defines
>> index e292cfa..25e1150 100644
>>
>> diff --git a/debian/installer/mipsel/package-list b/debian/installer/mipsel/package-list
>> index b51e0a5..c94fcfd 100644
>> --- a/debian/installer/mipsel/package-list
>> +++ b/debian/installer/mipsel/package-list
>> @@ -4,8 +4,4 @@
>>  # It overwrites specifications from /usr/share/kernel-wedge/package-list.
>>  #
>>  Package: kernel-image
>> -Provides_sb1-bcm91250a: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> -Provides_4kc-malta: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> -Provides_loongson-2e: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> -Provides_loongson-2f: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> -Provides_loongson-3: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> +Provides: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>
> I am not sure if we should do that, as for example loongson-3 already
> has initramfs support, and at some point we might start building some
> features as modules. Worst case we can probably revert that part if
> needed.
>
>> diff --git a/debian/installer/mips64el/kernel-versions b/debian/installer/mips64el/kernel-versions
>> new file mode 100644
>> index 0000000..9392add
>> --- /dev/null
>> +++ b/debian/installer/mips64el/kernel-versions
>> @@ -0,0 +1,6 @@
>> +# arch version flavour       installedname suffix build-depends
>> +mips64el -       sb1-bcm91250a -             y      -
>> +mips64el -       loongson-2e   -             y      -
>> +mips64el -       loongson-2f   -             y      -
>> +mips64el -       loongson-3    -             y      -
>> +mips64   -       octeon        -             y      -
>
> That should be mips64el, not mips64.
>
>
>> diff --git a/debian/installer/mips64el/package-list b/debian/installer/mips64el/package-list
>> new file mode 100644
>> index 0000000..49a4ddb
>> --- /dev/null
>> +++ b/debian/installer/mips64el/package-list
>> @@ -0,0 +1,11 @@
>> +# This file is used to build up the control file. The kernel version and
>> +# "-di" are appended to the package names. Section can be left out. So can
>> +# architecture, which is derived from the files in the modules directory.
>> +# It overwrites specifications from /usr/share/kernel-wedge/package-list.
>> +#
>> +Package: kernel-image
>> +Provides_sb1-bcm91250a: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> +Provides_5kc-malta: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> +Provides_loongson-2e: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> +Provides_loongson-2f: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>> +Provides_loongson-3: ata-modules, ext2-modules, ext3-modules, ext4-modules, rtc-modules
>
> I am not sure if it is better to group this defines or not, but at least
> I think it should be consistent among all mips* architectures.
>
> Aurelien
>
> --
> Aurelien Jarno                          GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net                 http://www.aurel32.net
>



-- 
Yunqiang Su


Reply to: